Date: Tue, 21 Feb 2006 19:04:30 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 92138 for review Message-ID: <200602211904.k1LJ4UHR059332@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=92138 Change 92138 by imp@imp_Speedy on 2006/02/21 19:04:11 fix ohci address, mostly. Affected files ... .. //depot/projects/arm/src/sys/arm/at91/at91.c#8 edit Differences ... ==== //depot/projects/arm/src/sys/arm/at91/at91.c#8 (text+ko) ==== @@ -216,6 +216,7 @@ bus_set_resource(kid, SYS_RES_MEMORY, 0, addr, size); } +#define NORMDEV 50 static int at91_attach(device_t dev) @@ -234,19 +235,20 @@ sc->sc_irq_rman.rm_descr = "AT91RM92 IRQs"; sc->sc_mem_rman.rm_type = RMAN_ARRAY; sc->sc_mem_rman.rm_descr = "AT91RM92 Memory"; +#if 0 sc->sc_usbmem_rman.rm_type = RMAN_ARRAY; sc->sc_usbmem_rman.rm_descr = "AT91RM92 USB Memory-mapped regs"; +#endif if (rman_init(&sc->sc_irq_rman) != 0 || rman_manage_region(&sc->sc_irq_rman, 1, 31) != 0) panic("at91_attach: failed to set up IRQ rman"); if (rman_init(&sc->sc_mem_rman) != 0 || rman_manage_region(&sc->sc_mem_rman, 0xfff00000ul, - 0xfffffffful) != 0) + 0xfffffffful) != 0) panic("at91_attach: failed to set up memory rman"); - if (rman_init(&sc->sc_usbmem_rman) != 0 || - rman_manage_region(&sc->sc_usbmem_rman, 0x00300000, - 0x003fffff) != 0) - panic("at91_attach: failed to set up USB memory rman"); + if (rman_manage_region(&sc->sc_mem_rman, AT91RM92_OHCI_BASE, + AT91RM92_OHCI_BASE + AT91RM92_OHCI_SIZE - 1) != 0) + panic("at91_attach: failed to set up ohci memory"); for (i = 0; i < 32; i++) { bus_space_write_4(sc->sc_st, sc->sc_sys_sh, IC_SVR + @@ -286,45 +288,46 @@ bus_space_write_4(sc->sc_st, sc->sc_sys_sh, 0xa44, 0xffffffff); /* Disable all interrupts for the SDRAM controller */ bus_space_write_4(sc->sc_st, sc->sc_sys_sh, 0xfa8, 0xffffffff); - at91_add_child(dev, 0, "at91_st", 0, 0, 0, 1); - at91_add_child(dev, 0, "at91_pio", 0, AT91RM92_BASE + // PMC + i = 0; + at91_add_child(dev, i++, "at91_st", 0, 0, 0, AT91RM92_IRQ_SYSTEM); + at91_add_child(dev, i++, "at91_pio", 0, AT91RM92_BASE + // PIOA AT91RM92_PIOA_BASE, AT91RM92_PMC_SIZE, 1); - at91_add_child(dev, 0, "at91_pio", 1, AT91RM92_BASE + // PMC + at91_add_child(dev, i++, "at91_pio", 1, AT91RM92_BASE + // PIOB AT91RM92_PIOB_BASE, AT91RM92_PMC_SIZE, 1); - at91_add_child(dev, 0, "at91_pio", 2, AT91RM92_BASE + // PMC + at91_add_child(dev, i++, "at91_pio", 2, AT91RM92_BASE + // PIOC AT91RM92_PIOC_BASE, AT91RM92_PMC_SIZE, 1); - at91_add_child(dev, 0, "at91_pio", 3, AT91RM92_BASE + // PMC + at91_add_child(dev, i++, "at91_pio", 3, AT91RM92_BASE + // PIOD AT91RM92_PIOD_BASE, AT91RM92_PMC_SIZE, 1); - at91_add_child(dev, 3, "at91_pmc", 0, AT91RM92_BASE + // PMC + at91_add_child(dev, i++, "at91_pmc", 0, AT91RM92_BASE + // PMC AT91RM92_PMC_BASE, AT91RM92_PMC_SIZE, 1); - at91_add_child(dev, 10, "at91_udp", 0, AT91RM92_BASE + // UDP + at91_add_child(dev, NORMDEV, "at91_udp", 0, AT91RM92_BASE + // UDP AT91RM92_UDP_BASE, AT91RM92_UDP_SIZE, AT91RM92_IRQ_UDP); - at91_add_child(dev, 10, "at91_mci", 0, AT91RM92_BASE + // MCI + at91_add_child(dev, NORMDEV, "at91_mci", 0, AT91RM92_BASE + // MCI AT91RM92_MCI_BASE, AT91RM92_MCI_SIZE, AT91RM92_IRQ_MCI); - at91_add_child(dev, 10, "at91_twi", 0, AT91RM92_BASE + // TWI + at91_add_child(dev, NORMDEV, "at91_twi", 0, AT91RM92_BASE + // TWI AT91RM92_TWI_BASE, AT91RM92_TWI_SIZE, AT91RM92_IRQ_TWI); - at91_add_child(dev, 10, "ate", 0, AT91RM92_BASE + // EMAC + at91_add_child(dev, NORMDEV, "ate", 0, AT91RM92_BASE + // EMAC AT91RM92_EMAC_BASE, AT91RM92_EMAC_SIZE, AT91RM92_IRQ_EMAC); - at91_add_child(dev, 10, "uart", 0, AT91RM92_BASE + // DBGU + at91_add_child(dev, NORMDEV, "uart", 0, AT91RM92_BASE + // DBGU AT91RM92_SYS_BASE + DBGU, DBGU_SIZE, AT91RM92_IRQ_SYSTEM); - at91_add_child(dev, 10, "uart", 1, AT91RM92_BASE + // USART0 + at91_add_child(dev, NORMDEV, "uart", 1, AT91RM92_BASE + // USART0 AT91RM92_USART0_BASE, AT91RM92_USART_SIZE, AT91RM92_IRQ_USART0); - at91_add_child(dev, 10, "uart", 2, AT91RM92_BASE + // USART1 + at91_add_child(dev, NORMDEV, "uart", 2, AT91RM92_BASE + // USART1 AT91RM92_USART1_BASE, AT91RM92_USART_SIZE, AT91RM92_IRQ_USART1); - at91_add_child(dev, 10, "uart", 3, AT91RM92_BASE + // USART2 + at91_add_child(dev, NORMDEV, "uart", 3, AT91RM92_BASE + // USART2 AT91RM92_USART2_BASE, AT91RM92_USART_SIZE, AT91RM92_IRQ_USART2); - at91_add_child(dev, 10, "uart", 4, AT91RM92_BASE + // USART3 + at91_add_child(dev, NORMDEV, "uart", 4, AT91RM92_BASE + // USART3 AT91RM92_USART3_BASE, AT91RM92_USART_SIZE, AT91RM92_IRQ_USART3); - at91_add_child(dev, 10, "at91_ssc", 0, AT91RM92_BASE + // SSC0 + at91_add_child(dev, NORMDEV, "at91_ssc", 0, AT91RM92_BASE + // SSC0 AT91RM92_SSC0_BASE, AT91RM92_SSC_SIZE, AT91RM92_IRQ_SSC0); - at91_add_child(dev, 10, "at91_ssc", 1, AT91RM92_BASE + // SSC1 + at91_add_child(dev, NORMDEV, "at91_ssc", 1, AT91RM92_BASE + // SSC1 AT91RM92_SSC1_BASE, AT91RM92_SSC_SIZE, AT91RM92_IRQ_SSC1); - at91_add_child(dev, 10, "at91_ssc", 2, AT91RM92_BASE + // SSC2 + at91_add_child(dev, NORMDEV, "at91_ssc", 2, AT91RM92_BASE + // SSC2 AT91RM92_SSC2_BASE, AT91RM92_SSC_SIZE, AT91RM92_IRQ_SSC2); - at91_add_child(dev, 10, "at91_spi", 0, AT91RM92_BASE + // SPI + at91_add_child(dev, NORMDEV, "at91_spi", 0, AT91RM92_BASE + // SPI AT91RM92_SPI_BASE, AT91RM92_SPI_SIZE, AT91RM92_IRQ_SPI); // Not sure that the following belongs on this bus. - at91_add_child(dev, 10, "ohci", 0, // UHP + at91_add_child(dev, NORMDEV, "ohci", 0, // UHP AT91RM92_OHCI_BASE, AT91RM92_OHCI_SIZE, AT91RM92_IRQ_UHP); bus_generic_probe(dev); bus_generic_attach(dev); @@ -362,10 +365,12 @@ start, end, count, flags, child); break; case SYS_RES_MEMORY: +#if 0 if (start >= 0x00300000 && start <= 0x003fffff) rle->res = rman_reserve_resource(&sc->sc_usbmem_rman, start, end, count, flags, child); else +#endif rle->res = rman_reserve_resource(&sc->sc_mem_rman, start, end, count, flags, child); rman_set_bustag(rle->res, &at91_bs_tag);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602211904.k1LJ4UHR059332>