at91.c (187599) | at91.c (191408) |
---|---|
1/*- 2 * Copyright (c) 2005 Olivier Houchard. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 10 unchanged lines hidden (view full) --- 19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 * SUCH DAMAGE. 24 */ 25 26#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2005 Olivier Houchard. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 10 unchanged lines hidden (view full) --- 19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 * SUCH DAMAGE. 24 */ 25 26#include <sys/cdefs.h> |
27__FBSDID("$FreeBSD: head/sys/arm/at91/at91.c 187599 2009-01-22 21:54:26Z imp $"); | 27__FBSDID("$FreeBSD: head/sys/arm/at91/at91.c 191408 2009-04-22 23:54:41Z stas $"); |
28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/bus.h> 32#include <sys/kernel.h> 33#include <sys/malloc.h> 34#include <sys/module.h> 35 --- 377 unchanged lines hidden (view full) --- 413 AT91RM92_BASE + AT91RM92_SPI_BASE, AT91RM92_SPI_SIZE, 414 AT91RM92_IRQ_SPI 415 }, 416 { 417 "ohci", 0, 418 AT91RM92_OHCI_BASE, AT91RM92_OHCI_SIZE, 419 AT91RM92_IRQ_UHP 420 }, | 28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/bus.h> 32#include <sys/kernel.h> 33#include <sys/malloc.h> 34#include <sys/module.h> 35 --- 377 unchanged lines hidden (view full) --- 413 AT91RM92_BASE + AT91RM92_SPI_BASE, AT91RM92_SPI_SIZE, 414 AT91RM92_IRQ_SPI 415 }, 416 { 417 "ohci", 0, 418 AT91RM92_OHCI_BASE, AT91RM92_OHCI_SIZE, 419 AT91RM92_IRQ_UHP 420 }, |
421 { 422 "at91_cfata", 0, 423 AT91RM92_CF_BASE, AT91RM92_CF_SIZE, 424 -1 425 }, |
|
421 { 0, 0, 0, 0, 0 } 422}; 423 424static void 425at91_cpu_add_builtin_children(device_t dev, struct at91_softc *sc) 426{ 427 int i; 428 struct cpu_devs *walker; --- 73 unchanged lines hidden (view full) --- 502 panic("at91_attach: failed to set up IRQ rman"); 503 if (rman_init(&sc->sc_mem_rman) != 0 || 504 rman_manage_region(&sc->sc_mem_rman, 0xdff00000ul, 505 0xdffffffful) != 0) 506 panic("at91_attach: failed to set up memory rman"); 507 if (rman_manage_region(&sc->sc_mem_rman, AT91RM92_OHCI_BASE, 508 AT91RM92_OHCI_BASE + AT91RM92_OHCI_SIZE - 1) != 0) 509 panic("at91_attach: failed to set up ohci memory"); | 426 { 0, 0, 0, 0, 0 } 427}; 428 429static void 430at91_cpu_add_builtin_children(device_t dev, struct at91_softc *sc) 431{ 432 int i; 433 struct cpu_devs *walker; --- 73 unchanged lines hidden (view full) --- 507 panic("at91_attach: failed to set up IRQ rman"); 508 if (rman_init(&sc->sc_mem_rman) != 0 || 509 rman_manage_region(&sc->sc_mem_rman, 0xdff00000ul, 510 0xdffffffful) != 0) 511 panic("at91_attach: failed to set up memory rman"); 512 if (rman_manage_region(&sc->sc_mem_rman, AT91RM92_OHCI_BASE, 513 AT91RM92_OHCI_BASE + AT91RM92_OHCI_SIZE - 1) != 0) 514 panic("at91_attach: failed to set up ohci memory"); |
515 if (rman_manage_region(&sc->sc_mem_rman, AT91RM92_CF_BASE, 516 AT91RM92_CF_BASE + AT91RM92_CF_SIZE - 1) != 0) 517 panic("at91_attach: failed to set up CompactFlash ATA memory"); |
|
510 511 for (i = 0; i < 32; i++) { 512 bus_space_write_4(sc->sc_st, sc->sc_sys_sh, IC_SVR + 513 i * 4, i); 514 /* Priority. */ 515 bus_space_write_4(sc->sc_st, sc->sc_sys_sh, IC_SMR + i * 4, 516 irq_prio[i]); 517 if (i < 8) --- 242 unchanged lines hidden --- | 518 519 for (i = 0; i < 32; i++) { 520 bus_space_write_4(sc->sc_st, sc->sc_sys_sh, IC_SVR + 521 i * 4, i); 522 /* Priority. */ 523 bus_space_write_4(sc->sc_st, sc->sc_sys_sh, IC_SMR + i * 4, 524 irq_prio[i]); 525 if (i < 8) --- 242 unchanged lines hidden --- |