From 807339944419aa238003e6361be2513c719ab26c Mon Sep 17 00:00:00 2001 From: Jens Scharsig Date: Sat, 19 Feb 2011 06:17:02 +0000 Subject: update arm/at91rm9200 work with rework rework110202 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * convert at91rm9200ek and eb_cpux9k2 board to ATMEL_xxx name scheme * Fix: timer.c compile error io.h not found with arm/at91rm9200 * update arm920t/at91 to ATMEL_xxx name scheme * update arm920t/at91 soc lib * update at91_emac driver Signed-off-by: Jens Scharsig Tested-by: Andreas Bießmann --- board/BuS/eb_cpux9k2/cpux9k2.c | 52 +++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'board/BuS') diff --git a/board/BuS/eb_cpux9k2/cpux9k2.c b/board/BuS/eb_cpux9k2/cpux9k2.c index fe62a0fcaf..e9a1cb276c 100644 --- a/board/BuS/eb_cpux9k2/cpux9k2.c +++ b/board/BuS/eb_cpux9k2/cpux9k2.c @@ -57,12 +57,12 @@ DECLARE_GLOBAL_DATA_PTR; int board_init(void) { - at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE; + at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO; /* Enable Ctrlc */ console_init_f(); /* Correct IRDA resistor problem / Set PA23_TXD in Output */ - writel(AT91_PMX_AA_TXD2, &pio->pioa.oer); + writel(ATMEL_PMX_AA_TXD2, &pio->pioa.oer); gd->bd->bi_arch_number = MACH_TYPE_EB_CPUX9K2; /* adress of boot parameters */ @@ -147,7 +147,7 @@ int dram_init(void) int board_eth_init(bd_t *bis) { int rc = 0; - rc = at91emac_register(bis, (u32) AT91_EMAC_BASE); + rc = at91emac_register(bis, (u32) ATMEL_BASE_EMAC); return rc; } #endif @@ -164,9 +164,9 @@ int board_eth_init(bd_t *bis) void cpux9k2_nand_hw_init(void) { unsigned long csr; - at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE; - at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE; - at91_mc_t *mc = (at91_mc_t *) AT91_MC_BASE; + at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO; + at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC; + at91_mc_t *mc = (at91_mc_t *) ATMEL_BASE_MC; /* Setup Smart Media, fitst enable the address range of CS3 */ writel(readl(&mc->ebi.csa) | AT91_EBI_CSA_CS3A, &mc->ebi.csa); @@ -178,23 +178,23 @@ void cpux9k2_nand_hw_init(void) AT91_SMC_CSR_WSEN; writel(csr, &mc->smc.csr[3]); - writel(AT91_PMX_CA_SMOE | AT91_PMX_CA_SMWE, &pio->pioc.asr); - writel(AT91_PMX_CA_BFCK | AT91_PMX_CA_SMOE | AT91_PMX_CA_SMWE, + writel(ATMEL_PMX_CA_SMOE | ATMEL_PMX_CA_SMWE, &pio->pioc.asr); + writel(ATMEL_PMX_CA_BFCK | ATMEL_PMX_CA_SMOE | ATMEL_PMX_CA_SMWE, &pio->pioc.pdr); /* Configure PC2 as input (signal Nand READY ) */ - writel(AT91_PMX_CA_BFAVD, &pio->pioc.per); - writel(AT91_PMX_CA_BFAVD, &pio->pioc.odr); /* disable output */ - writel(AT91_PMX_CA_BFCK, &pio->pioc.codr); + writel(ATMEL_PMX_CA_BFAVD, &pio->pioc.per); + writel(ATMEL_PMX_CA_BFAVD, &pio->pioc.odr); /* disable output */ + writel(ATMEL_PMX_CA_BFCK, &pio->pioc.codr); /* PIOC clock enabling */ - writel(1 << AT91_ID_PIOC, &pmc->pcer); + writel(1 << ATMEL_ID_PIOC, &pmc->pcer); } static void board_nand_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl) { - at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE; + at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO; struct nand_chip *this = mtd->priv; ulong IO_ADDR_W = (ulong) this->IO_ADDR_W; @@ -219,7 +219,7 @@ static void board_nand_hwcontrol(struct mtd_info *mtd, static int board_nand_dev_ready(struct mtd_info *mtd) { - at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE; + at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO; return ((readl(&pio->pioc.pdsr) & (1 << 2)) != 0); } @@ -248,8 +248,8 @@ int drv_video_init(void) #endif char *s; unsigned long csr; - at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE; - at91_mc_t *mc = (at91_mc_t *) AT91_MC_BASE; + at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC; + at91_mc_t *mc = (at91_mc_t *) ATMEL_BASE_MC; printf("Init Video as "); s = getenv("displaywidth"); @@ -270,7 +270,7 @@ int drv_video_init(void) AT91_SMC_CSR_ACSS_STANDARD | AT91_SMC_CSR_DBW_16 | AT91_SMC_CSR_BAT_16 | AT91_SMC_CSR_WSEN; writel(csr, &mc->smc.csr[2]); - writel(1 << AT91_ID_PIOB, &pmc->pcer); + writel(1 << ATMEL_ID_PIOB, &pmc->pcer); vcxk_init(display_width, display_height); #ifdef CONFIG_SPLASH_SCREEN @@ -290,11 +290,11 @@ int drv_video_init(void) void i2c_init_board(void) { u32 pin; - at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE; - at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE; + at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC; + at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO; - writel(1 << AT91_ID_PIOA, &pmc->pcer); - pin = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK; + writel(1 << ATMEL_ID_PIOA, &pmc->pcer); + pin = ATMEL_PMX_AA_TWD | ATMEL_PMX_AA_TWCK; writel(pin, &pio->pioa.idr); writel(pin, &pio->pioa.pudr); writel(pin, &pio->pioa.per); @@ -310,7 +310,7 @@ void i2c_init_board(void) void __led_toggle(led_id_t mask) { - at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE; + at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO; if (readl(&pio->piod.odsr) & mask) writel(mask, &pio->piod.codr); @@ -320,10 +320,10 @@ void __led_toggle(led_id_t mask) void __led_init(led_id_t mask, int state) { - at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE; - at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE; + at91_pmc_t *pmc = (at91_pmc_t *) ATMEL_BASE_PMC; + at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO; - writel(1 << AT91_ID_PIOD, &pmc->pcer); /* Enable PIOB clock */ + writel(1 << ATMEL_ID_PIOD, &pmc->pcer); /* Enable PIOB clock */ /* Disable peripherals on LEDs */ writel(STATUS_LED_BIT | STATUS_LED_BIT1, &pio->piod.per); /* Enable pins as outputs */ @@ -336,7 +336,7 @@ void __led_init(led_id_t mask, int state) void __led_set(led_id_t mask, int state) { - at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE; + at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO; if (state == STATUS_LED_ON) writel(mask, &pio->piod.codr); else -- cgit v1.2.1