*
*/
#include <lunaix/device.h>
-#include <lunaix/isrm.h>
+#include <lunaix/generic/isrm.h>
#include <sys/port_io.h>
}
static void
-com_irq_handler(const isr_param* param)
+com_irq_handler(const struct hart_state* hstate)
{
- uart_general_irq_handler(param->execp->vector, &com_ports);
+ int vector = hart_vector_stamp(hstate);
+ uart_general_irq_handler(vector, &com_ports);
}
static int
uart_enable_fifo(uart, UART_FIFO8);
llist_append(&com_ports, &uart->local_ports);
- struct serial_dev* sdev = serial_create(&def->class);
+ struct serial_dev* sdev = serial_create(&def->class, "S");
sdev->backend = uart;
sdev->write = uart_general_tx;
sdev->exec_cmd = uart_general_exec_cmd;
}
static struct device_def uart_pmio_def = {
- .class = DEVCLASS(DEVIF_SOC, DEVFN_CHAR, DEV_SERIAL, 0),
+ .class = DEVCLASS(DEVIF_SOC, DEVFN_CHAR, DEV_UART16550),
.name = "16550 Generic UART (I/O)",
.init = upiom_init
};
-EXPORT_DEVICE(uart16550_pmio, &uart_pmio_def, load_earlystage);
\ No newline at end of file
+EXPORT_DEVICE(uart16550_pmio, &uart_pmio_def, load_onboot);
\ No newline at end of file