diff --git a/sys/mips/idt/files.idt b/sys/mips/idt/files.idt index 4148ac4a6aa6..09b9959c1226 100644 --- a/sys/mips/idt/files.idt +++ b/sys/mips/idt/files.idt @@ -6,3 +6,5 @@ mips/idt/if_kr.c optional kr mips/idt/obio.c standard mips/idt/uart_cpu_rc32434.c optional uart mips/idt/uart_bus_rc32434.c optional uart +mips/mips/intr_machdep.c standard +mips/mips/tick.c standard diff --git a/sys/mips/idt/idt_machdep.c b/sys/mips/idt/idt_machdep.c index 040c3f90a042..eebe608e8116 100644 --- a/sys/mips/idt/idt_machdep.c +++ b/sys/mips/idt/idt_machdep.c @@ -75,6 +75,12 @@ __FBSDID("$FreeBSD$"); extern int *edata; extern int *end; +void +platform_cpu_init() +{ + /* Nothing special */ +} + void platform_halt(void) { @@ -131,6 +137,9 @@ platform_start(__register_t a0, __register_t a1, kernend = round_page((vm_offset_t)&end); memset(&edata, 0, kernend - (vm_offset_t)(&edata)); + /* Initialize pcpu stuff */ + mips_pcpu0_init(); + /* * Looking for mem=XXM argument */ diff --git a/sys/mips/idt/obio.c b/sys/mips/idt/obio.c index 893e88321bdd..44e9bfa6ea44 100644 --- a/sys/mips/idt/obio.c +++ b/sys/mips/idt/obio.c @@ -76,8 +76,10 @@ static int obio_setup_intr(device_t, device_t, struct resource *, int, static int obio_teardown_intr(device_t, device_t, struct resource *, void *); -static void obio_mask_irq(unsigned int irq) +static void +obio_mask_irq(void *arg) { + unsigned int irq = (unsigned int)arg; int ip_bit, mask, mask_register; /* mask IRQ */ @@ -88,8 +90,10 @@ static void obio_mask_irq(unsigned int irq) ICU_REG_WRITE(mask_register, mask | ip_bit); } -static void obio_unmask_irq(unsigned int irq) +static void +obio_unmask_irq(void *arg) { + unsigned int irq = (unsigned int)arg; int ip_bit, mask, mask_register; /* unmask IRQ */ @@ -274,7 +278,7 @@ obio_setup_intr(device_t dev, device_t child, struct resource *ires, event = sc->sc_eventstab[irq]; if (event == NULL) { error = intr_event_create(&event, (void *)irq, 0, irq, - (mask_fn)obio_mask_irq, (mask_fn)obio_unmask_irq, + obio_mask_irq, obio_unmask_irq, NULL, NULL, "obio intr%d:", irq); diff --git a/sys/mips/idt/uart_bus_rc32434.c b/sys/mips/idt/uart_bus_rc32434.c index 35e937d6ce70..40e47705fc07 100644 --- a/sys/mips/idt/uart_bus_rc32434.c +++ b/sys/mips/idt/uart_bus_rc32434.c @@ -88,10 +88,10 @@ uart_rc32434_probe(device_t dev) sc->sc_class = &uart_ns8250_class; bcopy(&sc->sc_sysdev->bas, &sc->sc_bas, sizeof(sc->sc_bas)); sc->sc_sysdev->bas.regshft = 2; - sc->sc_sysdev->bas.bst = 0; + sc->sc_sysdev->bas.bst = mips_bus_space_generic; sc->sc_sysdev->bas.bsh = MIPS_PHYS_TO_KSEG1(IDT_BASE_UART0); sc->sc_bas.regshft = 2; - sc->sc_bas.bst = 0; + sc->sc_bas.bst = mips_bus_space_generic; sc->sc_bas.bsh = MIPS_PHYS_TO_KSEG1(IDT_BASE_UART0); return (uart_bus_probe(dev, 2, 330000000UL/2, 0, 0)); diff --git a/sys/mips/idt/uart_cpu_rc32434.c b/sys/mips/idt/uart_cpu_rc32434.c index 6bbc5bd04eb1..51be944df7e3 100644 --- a/sys/mips/idt/uart_cpu_rc32434.c +++ b/sys/mips/idt/uart_cpu_rc32434.c @@ -71,7 +71,7 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) /* Got it. Fill in the instance and return it. */ di->ops = uart_getops(&uart_ns8250_class); di->bas.chan = 0; - di->bas.bst = 0; + di->bas.bst = mips_bus_space_generic; di->bas.regshft = 2; di->bas.rclk = 330000000UL/2; /* IPbus clock */ di->baudrate = 115200; @@ -79,7 +79,7 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) di->stopbits = 1; di->parity = UART_PARITY_NONE; uart_bus_space_io = 0; - uart_bus_space_mem = 0; + uart_bus_space_mem = mips_bus_space_generic; di->bas.bsh = MIPS_PHYS_TO_KSEG1(maddr); return (0); }