aboutsummaryrefslogtreecommitdiff
path: root/kernel/drivers
diff options
context:
space:
mode:
authorMarvin Borner2021-06-18 22:30:25 +0200
committerMarvin Borner2021-06-18 22:30:25 +0200
commit02a0c882275959c0fbd58754418ecc1218821e76 (patch)
tree7174e4c11a030b6bd7081a71ffa3bd6eee194c4e /kernel/drivers
parentb3d8e50aab8f3587f510db13ac8dcbb82e287998 (diff)
Renamed device prefix from 'io_' to 'dev_'
Diffstat (limited to 'kernel/drivers')
-rw-r--r--kernel/drivers/bga.c8
-rw-r--r--kernel/drivers/ps2/keyboard.c8
-rw-r--r--kernel/drivers/ps2/mouse.c8
-rw-r--r--kernel/drivers/timer.c6
-rw-r--r--kernel/drivers/vbe.c8
-rw-r--r--kernel/drivers/vmware.c8
6 files changed, 23 insertions, 23 deletions
diff --git a/kernel/drivers/bga.c b/kernel/drivers/bga.c
index 2f3b1fa..cc93b75 100644
--- a/kernel/drivers/bga.c
+++ b/kernel/drivers/bga.c
@@ -2,11 +2,11 @@
#include <assert.h>
#include <def.h>
+#include <dev.h>
#include <drivers/bga.h>
#include <drivers/cpu.h>
#include <drivers/pci.h>
#include <fb.h>
-#include <io.h>
#include <mem.h>
#include <mm.h>
@@ -75,7 +75,7 @@ static res bga_control(u32 request, void *arg1, void *arg2, void *arg3)
UNUSED(arg3);
switch (request) {
- case IOCTL_FB_GET: {
+ case DEVCTL_FB_GET: {
if (!generic.fb)
return -ENOENT;
@@ -121,7 +121,7 @@ CLEAR void bga_install(void)
{
bga_enable(1920, 1200, 32);
- struct io_dev *dev = zalloc(sizeof(*dev));
+ struct dev_dev *dev = zalloc(sizeof(*dev));
dev->control = bga_control;
- io_add(IO_FRAMEBUFFER, dev);
+ dev_add(DEV_FRAMEBUFFER, dev);
}
diff --git a/kernel/drivers/ps2/keyboard.c b/kernel/drivers/ps2/keyboard.c
index 3516a7e..b16f4b2 100644
--- a/kernel/drivers/ps2/keyboard.c
+++ b/kernel/drivers/ps2/keyboard.c
@@ -1,11 +1,11 @@
// MIT License, Copyright (c) 2020 Marvin Borner
#include <def.h>
+#include <dev.h>
#include <drivers/cpu.h>
#include <drivers/int.h>
#include <drivers/ps2.h>
#include <errno.h>
-#include <io.h>
#include <mem.h>
#include <print.h>
#include <proc.h>
@@ -43,7 +43,7 @@ static void keyboard_handler(void)
state = 0;
merged = 0;
- io_unblock(IO_KEYBOARD);
+ dev_unblock(DEV_KEYBOARD);
}
static res keyboard_read(void *buf, u32 offset, u32 count)
@@ -75,8 +75,8 @@ CLEAR void ps2_keyboard_install(u8 device)
int_event_handler_add(1, keyboard_handler);
queue = stack_new();
- struct io_dev *dev = zalloc(sizeof(*dev));
+ struct dev_dev *dev = zalloc(sizeof(*dev));
dev->read = keyboard_read;
dev->ready = keyboard_ready;
- io_add(IO_KEYBOARD, dev);
+ dev_add(DEV_KEYBOARD, dev);
}
diff --git a/kernel/drivers/ps2/mouse.c b/kernel/drivers/ps2/mouse.c
index ab20c90..086f522 100644
--- a/kernel/drivers/ps2/mouse.c
+++ b/kernel/drivers/ps2/mouse.c
@@ -1,11 +1,11 @@
// MIT License, Copyright (c) 2020 Marvin Borner
#include <assert.h>
+#include <dev.h>
#include <drivers/cpu.h>
#include <drivers/int.h>
#include <drivers/ps2.h>
#include <errno.h>
-#include <io.h>
#include <mem.h>
#include <print.h>
#include <proc.h>
@@ -33,7 +33,7 @@ static void mouse_finish(void)
event->but.middle = (mouse_byte[0] >> 2) & 1;
stack_push_bot(queue, event);
mouse_cycle = 0;
- io_unblock(IO_MOUSE);
+ dev_unblock(DEV_MOUSE);
}
static void mouse_handler(void)
@@ -141,8 +141,8 @@ CLEAR void ps2_mouse_install(u8 device)
int_event_handler_add(12, mouse_handler);
queue = stack_new();
- struct io_dev *dev = zalloc(sizeof(*dev));
+ struct dev_dev *dev = zalloc(sizeof(*dev));
dev->read = mouse_read;
dev->ready = mouse_ready;
- io_add(IO_MOUSE, dev);
+ dev_add(DEV_MOUSE, dev);
}
diff --git a/kernel/drivers/timer.c b/kernel/drivers/timer.c
index 44d66f3..977647c 100644
--- a/kernel/drivers/timer.c
+++ b/kernel/drivers/timer.c
@@ -1,11 +1,11 @@
// MIT License, Copyright (c) 2020 Marvin Borner
#include <def.h>
+#include <dev.h>
#include <drivers/cpu.h>
#include <drivers/int.h>
#include <drivers/rtc.h>
#include <drivers/timer.h>
-#include <io.h>
#include <mem.h>
#include <proc.h>
@@ -70,7 +70,7 @@ CLEAR void timer_install(void)
timer_phase(1000);
int_event_handler_add(0, timer_handler);
- struct io_dev *dev = zalloc(sizeof(*dev));
+ struct dev_dev *dev = zalloc(sizeof(*dev));
dev->read = timer_read;
- io_add(IO_TIMER, dev);
+ dev_add(DEV_TIMER, dev);
}
diff --git a/kernel/drivers/vbe.c b/kernel/drivers/vbe.c
index fd91062..2ba9fb1 100644
--- a/kernel/drivers/vbe.c
+++ b/kernel/drivers/vbe.c
@@ -2,11 +2,11 @@
#include <assert.h>
#include <def.h>
+#include <dev.h>
#include <drivers/cpu.h>
#include <drivers/vbe.h>
#include <errno.h>
#include <fb.h>
-#include <io.h>
#include <mem.h>
#include <mm.h>
#include <multiboot.h>
@@ -31,7 +31,7 @@ static res vbe_control(u32 request, void *arg1, void *arg2, void *arg3)
UNUSED(arg3);
switch (request) {
- case IOCTL_FB_GET: {
+ case DEVCTL_FB_GET: {
if (!generic.fb)
return -ENOENT;
@@ -67,7 +67,7 @@ CLEAR void vbe_install(u32 data)
generic.fb = vbe->fb;
fb_protect(&generic);
- struct io_dev *dev = zalloc(sizeof(*dev));
+ struct dev_dev *dev = zalloc(sizeof(*dev));
dev->control = vbe_control;
- io_add(IO_FRAMEBUFFER, dev);
+ dev_add(DEV_FRAMEBUFFER, dev);
}
diff --git a/kernel/drivers/vmware.c b/kernel/drivers/vmware.c
index 24f56a0..b2069b6 100644
--- a/kernel/drivers/vmware.c
+++ b/kernel/drivers/vmware.c
@@ -2,10 +2,10 @@
// VMWare extensions/backdoors for better VM integration
#include <def.h>
+#include <dev.h>
#include <drivers/int.h>
#include <drivers/ps2.h>
#include <drivers/vmware.h>
-#include <io.h>
#include <mem.h>
#include <print.h>
#include <stack.h>
@@ -125,7 +125,7 @@ static void vmware_mouse_handler(void)
event->but.right = (buttons & VMMOUSE_RIGHT_CLICK) != 0;
event->but.middle = (buttons & VMMOUSE_MIDDLE_CLICK) != 0;
stack_push_bot(queue, event);
- io_unblock(IO_MOUSE);
+ dev_unblock(DEV_MOUSE);
}
static res vmware_mouse_ready(void)
@@ -152,8 +152,8 @@ CLEAR void vmware_mouse_install(u8 device)
int_event_handler_add(12, vmware_mouse_handler);
queue = stack_new();
- struct io_dev *dev = zalloc(sizeof(*dev));
+ struct dev_dev *dev = zalloc(sizeof(*dev));
dev->read = vmware_mouse_read;
dev->ready = vmware_mouse_ready;
- io_add(IO_MOUSE, dev);
+ dev_add(DEV_MOUSE, dev);
}