organize device drivers into subdirectories
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
#include <amd64/sse.h>
|
#include <amd64/sse.h>
|
||||||
#include <aux/compiler.h>
|
#include <aux/compiler.h>
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
#include <device/partitions.h>
|
#include <device/storage/partitions.h>
|
||||||
#include <devices.h>
|
#include <devices.h>
|
||||||
#include <fs/vfs.h>
|
#include <fs/vfs.h>
|
||||||
#include <fs_types.h>
|
#include <fs_types.h>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
#include <device/debugconsole.h>
|
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
#include <device/partdrv.h>
|
#include <device/storage/partdrv.h>
|
||||||
#include <device/partitions.h>
|
#include <device/storage/partitions.h>
|
||||||
#include <device/ramdrv.h>
|
#include <device/storage/ramdrv.h>
|
||||||
#include <device/terminal.h>
|
#include <device/sys/debugconsole.h>
|
||||||
|
#include <device/sys/terminal.h>
|
||||||
#include <device_info.h>
|
#include <device_info.h>
|
||||||
#include <devices.h>
|
#include <devices.h>
|
||||||
#include <id/id_alloc.h>
|
#include <id/id_alloc.h>
|
||||||
@@ -22,8 +22,8 @@
|
|||||||
#include <sys/debug.h>
|
#include <sys/debug.h>
|
||||||
|
|
||||||
#if defined(__x86_64__)
|
#if defined(__x86_64__)
|
||||||
#include <device/pci.h>
|
#include <device/pci/pci.h>
|
||||||
#include <device/ps2_kb.h>
|
#include <device/ps2/ps2_kb.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct device_table {
|
struct device_table {
|
||||||
|
|||||||
1
kernel/device/pci/.gitignore
vendored
Normal file
1
kernel/device/pci/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
*.o
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
#include <amd64/io.h>
|
#include <amd64/io.h>
|
||||||
#include <device/pci.h>
|
#include <device/pci/pci.h>
|
||||||
#include <device/pci_ide.h>
|
#include <device/pci/pci_ide.h>
|
||||||
#include <device/pci_info.h>
|
#include <device/pci/pci_info.h>
|
||||||
#include <device/pci_xhci.h>
|
#include <device/pci/pci_xhci.h>
|
||||||
#include <libk/lengthof.h>
|
#include <libk/lengthof.h>
|
||||||
#include <libk/std.h>
|
#include <libk/std.h>
|
||||||
#include <libk/string.h>
|
#include <libk/string.h>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef _KERNEL_DEVICE_PCI_H
|
#ifndef _KERNEL_DEVICE_PCI_H
|
||||||
#define _KERNEL_DEVICE_PCI_H
|
#define _KERNEL_DEVICE_PCI_H
|
||||||
|
|
||||||
#include <device/pci_info.h>
|
#include <device/pci/pci_info.h>
|
||||||
#include <libk/std.h>
|
#include <libk/std.h>
|
||||||
#include <proc/proc.h>
|
#include <proc/proc.h>
|
||||||
#include <proc/reschedule.h>
|
#include <proc/reschedule.h>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#include <libk/std.h>
|
#include <libk/std.h>
|
||||||
|
|
||||||
#include <device/pci.h>
|
#include <device/pci/pci.h>
|
||||||
|
|
||||||
const struct pci_vendor pci_vendors[] = {
|
const struct pci_vendor pci_vendors[] = {
|
||||||
{0x0001, "SafeNet (wrong ID)"},
|
{0x0001, "SafeNet (wrong ID)"},
|
||||||
@@ -2,10 +2,10 @@
|
|||||||
#include <amd64/intr_defs.h>
|
#include <amd64/intr_defs.h>
|
||||||
#include <amd64/io.h>
|
#include <amd64/io.h>
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
#include <device/idedrv.h>
|
#include <device/pci/pci.h>
|
||||||
#include <device/partitions.h>
|
#include <device/pci/pci_info.h>
|
||||||
#include <device/pci.h>
|
#include <device/storage/idedrv.h>
|
||||||
#include <device/pci_info.h>
|
#include <device/storage/partitions.h>
|
||||||
#include <devices.h>
|
#include <devices.h>
|
||||||
#include <libk/fieldsizeof.h>
|
#include <libk/fieldsizeof.h>
|
||||||
#include <libk/lengthof.h>
|
#include <libk/lengthof.h>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef _KERNEL_DEVICE_PCI_IDE_H
|
#ifndef _KERNEL_DEVICE_PCI_IDE_H
|
||||||
#define _KERNEL_DEVICE_PCI_IDE_H
|
#define _KERNEL_DEVICE_PCI_IDE_H
|
||||||
|
|
||||||
#include <device/pci_info.h>
|
#include <device/pci/pci_info.h>
|
||||||
#include <libk/std.h>
|
#include <libk/std.h>
|
||||||
#include <proc/proc.h>
|
#include <proc/proc.h>
|
||||||
#include <proc/reschedule.h>
|
#include <proc/reschedule.h>
|
||||||
@@ -2,10 +2,10 @@
|
|||||||
#include <amd64/intr_defs.h>
|
#include <amd64/intr_defs.h>
|
||||||
#include <device/def_device_op.h>
|
#include <device/def_device_op.h>
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
#include <device/pci.h>
|
#include <device/pci/pci.h>
|
||||||
#include <device/pci_info.h>
|
#include <device/pci/pci_info.h>
|
||||||
#include <device/pci_xhci.h>
|
#include <device/pci/pci_xhci.h>
|
||||||
#include <device/xhci.h>
|
#include <device/usb/xhci.h>
|
||||||
#include <devices.h>
|
#include <devices.h>
|
||||||
#include <libk/align.h>
|
#include <libk/align.h>
|
||||||
#include <libk/lengthof.h>
|
#include <libk/lengthof.h>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef _KERNEL_DEVICE_PCI_XHCI_H
|
#ifndef _KERNEL_DEVICE_PCI_XHCI_H
|
||||||
#define _KERNEL_DEVICE_PCI_XHCI_H
|
#define _KERNEL_DEVICE_PCI_XHCI_H
|
||||||
|
|
||||||
#include <device/pci_info.h>
|
#include <device/pci/pci_info.h>
|
||||||
#include <libk/std.h>
|
#include <libk/std.h>
|
||||||
#include <proc/proc.h>
|
#include <proc/proc.h>
|
||||||
#include <proc/reschedule.h>
|
#include <proc/reschedule.h>
|
||||||
9
kernel/device/pci/src.mk
Normal file
9
kernel/device/pci/src.mk
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
c += device/pci/pci.c \
|
||||||
|
device/pci/pci_defs.c \
|
||||||
|
device/pci/pci_ide.c \
|
||||||
|
device/pci/pci_xhci.c
|
||||||
|
|
||||||
|
o += device/pci/pci.o \
|
||||||
|
device/pci/pci_defs.o \
|
||||||
|
device/pci/pci_ide.o \
|
||||||
|
device/pci/pci_xhci.o
|
||||||
1
kernel/device/ps2/.gitignore
vendored
Normal file
1
kernel/device/ps2/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
*.o
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#include <amd64/intr_defs.h>
|
#include <amd64/intr_defs.h>
|
||||||
#include <amd64/io.h>
|
#include <amd64/io.h>
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
#include <device/ps2_kb.h>
|
#include <device/ps2/ps2_kb.h>
|
||||||
#include <devices.h>
|
#include <devices.h>
|
||||||
#include <irq/irq.h>
|
#include <irq/irq.h>
|
||||||
#include <kb_defs.h>
|
#include <kb_defs.h>
|
||||||
3
kernel/device/ps2/src.mk
Normal file
3
kernel/device/ps2/src.mk
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
c += device/ps2/ps2_kb.c
|
||||||
|
|
||||||
|
o += device/ps2/ps2_kb.o
|
||||||
@@ -1,31 +1,12 @@
|
|||||||
c += device/device.c \
|
include device/storage/src.mk
|
||||||
device/terminal.c \
|
include device/sys/src.mk
|
||||||
device/ramdrv.c \
|
|
||||||
device/partdrv.c \
|
|
||||||
device/partitions.c \
|
|
||||||
device/debugconsole.c
|
|
||||||
|
|
||||||
o += device/device.o \
|
|
||||||
device/terminal.o \
|
|
||||||
device/ramdrv.o \
|
|
||||||
device/partdrv.o \
|
|
||||||
device/partitions.o \
|
|
||||||
device/debugconsole.o
|
|
||||||
|
|
||||||
ifeq ($(platform),amd64)
|
ifeq ($(platform),amd64)
|
||||||
c += device/ps2_kb.c \
|
include device/pci/src.mk
|
||||||
device/idedrv.c \
|
include device/ps2/src.mk
|
||||||
device/pci.c \
|
include device/usb/src.mk
|
||||||
device/pci_defs.c \
|
|
||||||
device/pci_ide.c \
|
|
||||||
device/pci_xhci.c \
|
|
||||||
device/xhci.c
|
|
||||||
|
|
||||||
o += device/ps2_kb.o \
|
|
||||||
device/idedrv.o \
|
|
||||||
device/pci.o \
|
|
||||||
device/pci_defs.o \
|
|
||||||
device/pci_ide.o \
|
|
||||||
device/pci_xhci.o \
|
|
||||||
device/xhci.o
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
c += device/device.c
|
||||||
|
|
||||||
|
o += device/device.o
|
||||||
|
|||||||
1
kernel/device/storage/.gitignore
vendored
Normal file
1
kernel/device/storage/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
*.o
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
#include <amd64/intr_defs.h>
|
#include <amd64/intr_defs.h>
|
||||||
#include <amd64/io.h>
|
#include <amd64/io.h>
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
#include <device/idedrv.h>
|
#include <device/storage/idedrv.h>
|
||||||
#include <device/partitions.h>
|
#include <device/storage/partitions.h>
|
||||||
#include <devices.h>
|
#include <devices.h>
|
||||||
#include <irq/irq.h>
|
#include <irq/irq.h>
|
||||||
#include <libk/list.h>
|
#include <libk/list.h>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
#include <device/partdrv.h>
|
#include <device/storage/partdrv.h>
|
||||||
#include <devices.h>
|
#include <devices.h>
|
||||||
#include <libk/std.h>
|
#include <libk/std.h>
|
||||||
#include <mm/malloc.h>
|
#include <mm/malloc.h>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
#include <device/partdrv.h>
|
#include <device/storage/partdrv.h>
|
||||||
#include <device/partitions.h>
|
#include <device/storage/partitions.h>
|
||||||
#include <devices.h>
|
#include <devices.h>
|
||||||
#include <libk/fieldsizeof.h>
|
#include <libk/fieldsizeof.h>
|
||||||
#include <libk/lengthof.h>
|
#include <libk/lengthof.h>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
#include <device/partitions.h>
|
#include <device/storage/partitions.h>
|
||||||
#include <device/ramdrv.h>
|
#include <device/storage/ramdrv.h>
|
||||||
#include <devices.h>
|
#include <devices.h>
|
||||||
#include <libk/align.h>
|
#include <libk/align.h>
|
||||||
#include <libk/std.h>
|
#include <libk/std.h>
|
||||||
9
kernel/device/storage/src.mk
Normal file
9
kernel/device/storage/src.mk
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
c += device/storage/partdrv.c \
|
||||||
|
device/storage/ramdrv.c \
|
||||||
|
device/storage/partitions.c \
|
||||||
|
device/storage/idedrv.c
|
||||||
|
|
||||||
|
o += device/storage/partdrv.o \
|
||||||
|
device/storage/ramdrv.o \
|
||||||
|
device/storage/partitions.o \
|
||||||
|
device/storage/idedrv.o
|
||||||
1
kernel/device/sys/.gitignore
vendored
Normal file
1
kernel/device/sys/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
*.o
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#include <device/debugconsole.h>
|
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
|
#include <device/sys/debugconsole.h>
|
||||||
#include <libk/std.h>
|
#include <libk/std.h>
|
||||||
#include <proc/proc.h>
|
#include <proc/proc.h>
|
||||||
#include <proc/reschedule.h>
|
#include <proc/reschedule.h>
|
||||||
5
kernel/device/sys/src.mk
Normal file
5
kernel/device/sys/src.mk
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
c += device/sys/debugconsole.c \
|
||||||
|
device/sys/terminal.c
|
||||||
|
|
||||||
|
o += device/sys/debugconsole.o \
|
||||||
|
device/sys/terminal.o
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#include <Flanterm/src/flanterm_backends/fb.h>
|
#include <Flanterm/src/flanterm_backends/fb.h>
|
||||||
#include <device/def_device_op.h>
|
#include <device/def_device_op.h>
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
#include <device/terminal.h>
|
#include <device/sys/terminal.h>
|
||||||
#include <libk/std.h>
|
#include <libk/std.h>
|
||||||
#include <limine/requests.h>
|
#include <limine/requests.h>
|
||||||
#include <mm/malloc.h>
|
#include <mm/malloc.h>
|
||||||
1
kernel/device/usb/.gitignore
vendored
Normal file
1
kernel/device/usb/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
*.o
|
||||||
3
kernel/device/usb/src.mk
Normal file
3
kernel/device/usb/src.mk
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
c += device/usb/xhci.c
|
||||||
|
|
||||||
|
o += device/usb/xhci.o
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#include <device/def_device_op.h>
|
#include <device/def_device_op.h>
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
#include <device/usb.h>
|
#include <device/usb/usb.h>
|
||||||
#include <device/xhci.h>
|
#include <device/usb/xhci.h>
|
||||||
#include <irq/irq.h>
|
#include <irq/irq.h>
|
||||||
#include <libk/list.h>
|
#include <libk/list.h>
|
||||||
#include <libk/std.h>
|
#include <libk/std.h>
|
||||||
Reference in New Issue
Block a user