update arm/at91rm9200 work with rework rework110202
Subsystems (3)
PATCH v2 1/1 update arm/at91rm9200 work with rework rework110202
* 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
--- arch/arm/cpu/arm920t/at91/reset.c | 2 +- arch/arm/cpu/arm920t/at91/timer.c | 12 +- arch/arm/include/asm/arch-at91/at91_mc.h | 12 +- arch/arm/include/asm/arch-at91/at91_pmc.h | 10 +- arch/arm/include/asm/arch-at91/at91rm9200.h | 209 ++++++++++++++------------- board/BuS/eb_cpux9k2/cpux9k2.c | 52 ++++---- board/atmel/at91rm9200ek/at91rm9200ek.c | 4 +- board/atmel/at91rm9200ek/led.c | 22 ++-- drivers/net/at91_emac.c | 32 ++-- include/configs/at91rm9200ek.h | 5 +- include/configs/eb_cpux9k2.h | 23 ++-- 11 files changed, 196 insertions(+), 187 deletions(-)
arch/arm/cpu/arm920t/at91/reset.c +1 -1
@@ -42,7 +42,7 @@ void __attribute__((weak)) board_reset(void)void reset_cpu (ulong ignored) { -at91_st_t *st = (at91_st_t *)AT91_ST_BASE ; +at91_st_t *st = (at91_st_t *)ATMEL_BASE_ST ;#if defined(CONFIG_AT91RM9200_USART )/*shutdown the console to avoid strange chars during reset */ serial_exit ();
arch/arm/cpu/arm920t/at91/timer.c +6 -6
@@ -32,7 +32,7 @@#include <common.h> -#include <asm/arch/io.h> +#include <asm/io.h> #include <asm/arch/hardware.h> #include <asm/arch/at91_tc.h> #include <asm/arch/at91_pmc.h>
@@ -44,11 +44,11 @@ DECLARE_GLOBAL_DATA_PTR;int timer_init (void ) { -at91_tc_t *tc = (at91_tc_t *)AT91_TC_BASE ; -at91_pmc_t *pmc = (at91_pmc_t *)AT91_PMC_BASE ; +at91_tc_t *tc = (at91_tc_t *)ATMEL_BASE_TC ; +at91_pmc_t *pmc = (at91_pmc_t *)ATMEL_BASE_PMC ;/* enables TC1.0 clock */ -writel (1 <<AT91_ID_TC0 , &pmc->pcer);/* enable clock */ +writel (1 <<ATMEL_ID_TC0 , &pmc->pcer);/* enable clock */ writel (0 , &tc->bcr); writel(AT91_TC_BMR_TC0XC0S_NONE | AT91_TC_BMR_TC1XC1S_NONE |
@@ -96,14 +96,14 @@ void __udelay(unsigned long usec)void reset_timer_masked (void ) {/* reset time */ -at91_tc_t *tc = (at91_tc_t *)AT91_TC_BASE ; +at91_tc_t *tc = (at91_tc_t *)ATMEL_BASE_TC ; gd->lastinc =readl (&tc->tc[0 ].cv) &0x0000ffff ; gd->tbl =0 ; }ulong get_timer_raw (void ) { -at91_tc_t *tc = (at91_tc_t *)AT91_TC_BASE ; +at91_tc_t *tc = (at91_tc_t *)ATMEL_BASE_TC ;u32 now; now =readl (&tc->tc[0 ].cv) &0x0000ffff ;
arch/arm/include/asm/arch-at91/at91_mc.h +6 -6
@@ -23,12 +23,12 @@#ifndef AT91_MC_H #define AT91_MC_H -#define AT91_ASM_MC_EBI_CSA (AT91_MC_BASE + 0x60) -#define AT91_ASM_MC_EBI_CFG (AT91_MC_BASE + 0x64) -#define AT91_ASM_MC_SMC_CSR0 (AT91_MC_BASE + 0x70) -#define AT91_ASM_MC_SDRAMC_MR (AT91_MC_BASE + 0x90) -#define AT91_ASM_MC_SDRAMC_TR (AT91_MC_BASE + 0x94) -#define AT91_ASM_MC_SDRAMC_CR (AT91_MC_BASE + 0x98) +#define AT91_ASM_MC_EBI_CSA (ATMEL_BASE_MC + 0x60) +#define AT91_ASM_MC_EBI_CFG (ATMEL_BASE_MC + 0x64) +#define AT91_ASM_MC_SMC_CSR0 (ATMEL_BASE_MC + 0x70) +#define AT91_ASM_MC_SDRAMC_MR (ATMEL_BASE_MC + 0x90) +#define AT91_ASM_MC_SDRAMC_TR (ATMEL_BASE_MC + 0x94) +#define AT91_ASM_MC_SDRAMC_CR (ATMEL_BASE_MC + 0x98)#ifndef __ASSEMBLY__
arch/arm/include/asm/arch-at91/at91_pmc.h +5 -5
@@ -17,11 +17,11 @@#ifndef AT91_PMC_H #define AT91_PMC_H -#define AT91_ASM_PMC_MOR (AT91_PMC_BASE + 0x20) -#define AT91_ASM_PMC_PLLAR (AT91_PMC_BASE + 0x28) -#define AT91_ASM_PMC_PLLBR (AT91_PMC_BASE + 0x2c) -#define AT91_ASM_PMC_MCKR (AT91_PMC_BASE + 0x30) -#define AT91_ASM_PMC_SR (AT91_PMC_BASE + 0x68) +#define AT91_ASM_PMC_MOR (ATMEL_BASE_PMC + 0x20) +#define AT91_ASM_PMC_PLLAR (ATMEL_BASE_PMC + 0x28) +#define AT91_ASM_PMC_PLLBR (ATMEL_BASE_PMC + 0x2c) +#define AT91_ASM_PMC_MCKR (ATMEL_BASE_PMC + 0x30) +#define AT91_ASM_PMC_SR (ATMEL_BASE_PMC + 0x68)#ifndef __ASSEMBLY__
arch/arm/include/asm/arch-at91/at91rm9200.h +110 -99
225 lines not on this page · raw message
board/BuS/eb_cpux9k2/cpux9k2.c +26 -26
134 lines not on this page · raw message
board/atmel/at91rm9200ek/at91rm9200ek.c +2 -2
@@ -44,7 +44,7 @@ int board_init(void)* 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);/* arch number of AT91RM9200EK-Board */ gd->bd->bi_arch_number =MACH_TYPE_AT91RM9200EK ;
@@ -65,6 +65,6 @@ int dram_init (void)#ifdef CONFIG_DRIVER_AT91EMAC int board_eth_init (bd_t *bis) { -return at91emac_register (bis, (u32 )AT91_EMAC_BASE ); +return at91emac_register (bis, (u32 )ATMEL_BASE_EMAC ); }#endif
board/atmel/at91rm9200ek/led.c +12 -10
@@ -26,8 +26,10 @@*/ #include <common.h> -#include <asm/arch/gpio.h> +#include <asm/io.h> +#include <asm/arch/hardware.h> #include <asm/arch/at91_pmc.h> +#include <asm/arch/at91_pio.h> /* bit mask in PIO port B */ #define GREEN_LED (1<<0)
@@ -36,47 +38,47 @@void green_LED_on (void ) { -at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE ; +at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO ;writel (GREEN_LED , &pio->piob.codr); }void yellow_LED_on (void ) { -at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE ; +at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO ;writel (YELLOW_LED , &pio->piob.codr); }void red_LED_on (void ) { -at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE ; +at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO ;writel (RED_LED , &pio->piob.codr); }void green_LED_off (void ) { -at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE ; +at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO ;writel (GREEN_LED , &pio->piob.sodr); }void yellow_LED_off (void ) { -at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE ; +at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO ;writel (YELLOW_LED , &pio->piob.sodr); }void red_LED_off (void ) { -at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE ; +at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO ;writel (RED_LED , &pio->piob.sodr); }void coloured_LED_init (void ) { -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 ;/* Enable PIOB clock */ -writel (1 <<AT91_ID_PIOB , &pmc->pcer); +writel (1 <<ATMEL_ID_PIOB , &pmc->pcer);/* Disable peripherals on LEDs */ writel (GREEN_LED |YELLOW_LED |RED_LED , &pio->piob.per);
drivers/net/at91_emac.c +16 -16
@@ -342,34 +342,34 @@ static int at91emac_init(struct eth_device *netdev, bd_t *bd)u32 value;emac_device *dev;at91_emac_t *emac; -at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE ; -at91_pmc_t *pmc = (at91_pmc_t *)AT91_PMC_BASE ; +at91_pio_t *pio = (at91_pio_t *)ATMEL_BASE_PIO ; +at91_pmc_t *pmc = (at91_pmc_t *)ATMEL_BASE_PMC ; emac = (at91_emac_t *) netdev->iobase; dev = (emac_device *) netdev->priv;/* PIO Disable Register */ - value =AT91_PMX_AA_EMDIO |AT91_PMX_AA_EMDC | -AT91_PMX_AA_ERXER |AT91_PMX_AA_ERX1 | -AT91_PMX_AA_ERX0 |AT91_PMX_AA_ECRS | -AT91_PMX_AA_ETX1 |AT91_PMX_AA_ETX0 | -AT91_PMX_AA_ETXEN |AT91_PMX_AA_EREFCK ; + value =ATMEL_PMX_AA_EMDIO |ATMEL_PMX_AA_EMDC | +ATMEL_PMX_AA_ERXER |ATMEL_PMX_AA_ERX1 | +ATMEL_PMX_AA_ERX0 |ATMEL_PMX_AA_ECRS | +ATMEL_PMX_AA_ETX1 |ATMEL_PMX_AA_ETX0 | +ATMEL_PMX_AA_ETXEN |ATMEL_PMX_AA_EREFCK ;writel (value, &pio->pioa.pdr);writel (value, &pio->pioa.asr);#ifdef CONFIG_RMII - value =AT91_PMX_BA_ERXCK ; + value =ATMEL_PMX_BA_ERXCK ;#else - value =AT91_PMX_BA_ERXCK |AT91_PMX_BA_ECOL | -AT91_PMX_BA_ERXDV |AT91_PMX_BA_ERX3 | -AT91_PMX_BA_ERX2 |AT91_PMX_BA_ETXER | -AT91_PMX_BA_ETX3 |AT91_PMX_BA_ETX2 ; + value =ATMEL_PMX_BA_ERXCK |ATMEL_PMX_BA_ECOL | +ATMEL_PMX_BA_ERXDV |ATMEL_PMX_BA_ERX3 | +ATMEL_PMX_BA_ERX2 |ATMEL_PMX_BA_ETXER | +ATMEL_PMX_BA_ETX3 |ATMEL_PMX_BA_ETX2 ;#endif writel (value, &pio->piob.pdr);writel (value, &pio->piob.bsr); -writel (1 <<AT91_ID_EMAC , &pmc->pcer); +writel (1 <<ATMEL_ID_EMAC , &pmc->pcer);writel (readl (&emac->ctl) |AT91_EMAC_CTL_CSR , &emac->ctl);/* Init Ethernet buffers */
@@ -476,11 +476,11 @@ static int at91emac_write_hwaddr(struct eth_device *netdev) {emac_device *dev;at91_emac_t *emac; -at91_pmc_t *pmc = (at91_pmc_t *)AT91_PMC_BASE ; +at91_pmc_t *pmc = (at91_pmc_t *)ATMEL_BASE_PMC ; emac = (at91_emac_t *) netdev->iobase; dev = (emac_device *) netdev->priv; -writel (1 <<AT91_ID_EMAC , &pmc->pcer); +writel (1 <<ATMEL_ID_EMAC , &pmc->pcer);DEBUG_AT91EMAC ("init MAC-ADDR %x%x \n" ,cpu_to_le16 (*((u16 *)(netdev->enetaddr +4 ))),cpu_to_le32 (*((u32 *)netdev->enetaddr)));
@@ -498,7 +498,7 @@ int at91emac_register(bd_t *bis, unsigned long iobase)struct eth_device *dev;if (iobase ==0 ) - iobase =AT91_EMAC_BASE ; + iobase =ATMEL_BASE_EMAC ; emac =malloc (sizeof (*emac)+512 );if (emac ==NULL )return -1 ;
include/configs/at91rm9200ek.h +1 -4
@@ -61,7 +61,6 @@#define CONFIG_SYS_HZ 1000/* CPU configuration */ -#define CONFIG_ARM920T #define CONFIG_AT91RM9200 #define CONFIG_AT91RM9200EK #define CONFIG_CPUAT91
@@ -71,8 +70,6 @@#define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG -#define CONFIG_AT91FAMILY -/* * Memory Configuration */
@@ -172,7 +169,7 @@#define CONFIG_DOS_PARTITION 1#define CONFIG_SYS_USB_OHCI_CPU_INIT 1 -#define CONFIG_SYS_USB_OHCI_REGS_BASE AT91_USB_HOST_BASE +#define CONFIG_SYS_USB_OHCI_REGS_BASE ATMEL_USB_HOST_BASE#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91rm9200"#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15
include/configs/eb_cpux9k2.h +11 -12
@@ -29,12 +29,11 @@/*--------------------------------------------------------------------------*/ -#define CONFIG_ARM920T 1/* This is an ARM920T Core */ -#define CONFIG_AT91RM9200 1/* It's an Atmel AT91RM9200 SoC */ -#define CONFIG_EB_CPUX9K2 1/* on an EP+CPUX9K2 Board */ -#define USE_920T_MMU 1 +#define CONFIG_AT91RM9200 /* It's an Atmel AT91RM9200 SoC */ +#define CONFIG_EB_CPUX9K2 /* on an EP+CPUX9K2 Board */ +#define USE_920T_MMU -#define CONFIG_VERSION_VARIABLE 1 +#define CONFIG_VERSION_VARIABLE #define CONFIG_IDENT_STRING " on EB+CPUx9K2"#include <asm/arch/hardware.h> /* needed for port definitions */
@@ -217,19 +216,19 @@#define CONFIG_SYS_I2C_INIT_BOARD #define I2C_INIT i2c_init_board(); -#define I2C_ACTIVE writel(AT91_PMX_AA_TWD, &pio->pioa.mddr); -#define I2C_TRISTATE writel(AT91_PMX_AA_TWD, &pio->pioa.mder); -#define I2C_READ ((readl(&pio->pioa.pdsr) & AT91_PMX_AA_TWD) != 0) +#define I2C_ACTIVE writel(ATMEL_PMX_AA_TWD, &pio->pioa.mddr); +#define I2C_TRISTATE writel(ATMEL_PMX_AA_TWD, &pio->pioa.mder); +#define I2C_READ ((readl(&pio->pioa.pdsr) & ATMEL_PMX_AA_TWD) != 0)#define I2C_SDA (bit) \ if (bit) \ - writel(AT91_PMX_AA_TWD, &pio->pioa.sodr); \ + writel(ATMEL_PMX_AA_TWD, &pio->pioa.sodr); \ else \ - writel(AT91_PMX_AA_TWD, &pio->pioa.codr); + writel(ATMEL_PMX_AA_TWD, &pio->pioa.codr);#define I2C_SCL (bit) \ if (bit) \ - writel(AT91_PMX_AA_TWCK, &pio->pioa.sodr); \ + writel(ATMEL_PMX_AA_TWCK, &pio->pioa.sodr); \ else \ - writel(AT91_PMX_AA_TWCK, &pio->pioa.codr); + writel(ATMEL_PMX_AA_TWCK, &pio->pioa.codr);#define I2C_DELAY udelay(2500000/CONFIG_SYS_I2C_SPEED)
Signature · 1 line
1.7.1
PATCH v2 1/1 update arm/at91rm9200 work with rework rework110202
Dear Jens Scharsig,
Quoted 5 lines · In message <[email protected]> you wrote:
* convert at91rm9200ek and
eb_cpux9k2board toATMEL_xxxname scheme
* Fix:timer.ccompile errorio.hnot found with arm/at91rm9200
* update arm920t/at91 toATMEL_xxxname scheme
* update arm920t/at91 soc lib
* updateat91_emacdriver
...
arch/arm/include/asm/arch-at91/at91rm9200.h line 104
Quoted 6 lines
/* Port B */
arch/arm/include/asm/arch-at91/at91rm9200.h +0
-5-#define AT91_PMX_BA_ERXCK 0x00080000 -#define AT91_PMX_BA_ECOL 0x00040000 -#define AT91_PMX_BA_ERXDV 0x00020000 -#define AT91_PMX_BA_ERX3 0x00010000 -#define AT91_PMX_BA_ERX2 0x00008000
----------------------------^^^
Please, no space before tabs
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Gew?hnlich glaubt der Mensch, wenn er nur Worte h?rt, es m?sse sich dabei doch auch was denken lassen. -- Goethe, Faust I
PATCH v2 1/1 update arm/at91rm9200 work with rework rework110202
Dear Wolfgang Denk,
Quoted 17 lines
Dear Jens Scharsig,
Quoted 5 lines · In message<[email protected]> you wrote:
* convert at91rm9200ek and
eb_cpux9k2board toATMEL_xxxname scheme
* Fix:timer.ccompile errorio.hnot found with arm/at91rm9200
* update arm920t/at91 toATMEL_xxxname scheme
* update arm920t/at91 soc lib
* updateat91_emacdriver...
arch/arm/include/asm/arch-at91/at91rm9200.h line 104
Quoted 6 lines
/* Port B */
arch/arm/include/asm/arch-at91/at91rm9200.h +0
-5-#define AT91_PMX_BA_ERXCK 0x00080000 -#define AT91_PMX_BA_ECOL 0x00040000 -#define AT91_PMX_BA_ERXDV 0x00020000 -#define AT91_PMX_BA_ERX3 0x00010000 -#define AT91_PMX_BA_ERX2 0x00008000----------------------------^^^
Quoted 1 line
Please, no space before tabs
Those lines that are being removed by the patch.
Best Regards,
Reinhard
PATCH v2 1/1 update arm/at91rm9200 work with rework rework110202
Dear Reinhard Meyer,
Quoted 18 lines · In message <[email protected]> you wrote:
Dear Wolfgang Denk,
Quoted 17 lines
Dear Jens Scharsig,
Quoted 5 lines · In message<[email protected]> you wrote:
* convert at91rm9200ek and
eb_cpux9k2board toATMEL_xxxname scheme
* Fix:timer.ccompile errorio.hnot found with arm/at91rm9200
* update arm920t/at91 toATMEL_xxxname scheme
* update arm920t/at91 soc lib
* updateat91_emacdriver...
arch/arm/include/asm/arch-at91/at91rm9200.h line 104
Quoted 6 lines
/* Port B */
arch/arm/include/asm/arch-at91/at91rm9200.h +0
-5-#define AT91_PMX_BA_ERXCK 0x00080000 -#define AT91_PMX_BA_ECOL 0x00040000 -#define AT91_PMX_BA_ERXDV 0x00020000 -#define AT91_PMX_BA_ERX3 0x00010000 -#define AT91_PMX_BA_ERX2 0x00008000----------------------------^^^
Quoted 2 lines
Quoted 1 line
Please, no space before tabs
Those lines that are being removed by the patch.
Oops. I marked the wrong line.
I meant this one:
-> checkpatch ~/Mail/U-Boot/3377
WARNING: please, no space before tabs
#379: FILE: arch/arm/include/asm/arch-at91/at91rm9200.h:112:
+#define ATMEL_PMX_BA_ERX2 ^I0x00008000$
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de EMACS belongs in <sys/errno.h>: Editor too big!
PATCH v2 1/1 update arm/at91rm9200 work with rework rework110202
Am 11.02.2011 21:13, schrieb Wolfgang Denk:
Quoted 35 lines
Dear Reinhard Meyer,
Quoted 18 lines · In message <[email protected]> you wrote:
Dear Wolfgang Denk,
Quoted 17 lines
Dear Jens Scharsig,
Quoted 5 lines · In message<[email protected]> you wrote:
* convert at91rm9200ek and
eb_cpux9k2board toATMEL_xxxname scheme
* Fix:timer.ccompile errorio.hnot found with arm/at91rm9200
* update arm920t/at91 toATMEL_xxxname scheme
* update arm920t/at91 soc lib
* updateat91_emacdriver...
arch/arm/include/asm/arch-at91/at91rm9200.h line 104
Quoted 6 lines
/* Port B */
arch/arm/include/asm/arch-at91/at91rm9200.h +0
-5-#define AT91_PMX_BA_ERXCK 0x00080000 -#define AT91_PMX_BA_ECOL 0x00040000 -#define AT91_PMX_BA_ERXDV 0x00020000 -#define AT91_PMX_BA_ERX3 0x00010000 -#define AT91_PMX_BA_ERX2 0x00008000----------------------------^^^
Quoted 2 lines
Quoted 1 line
Please, no space before tabs
Those lines that are being removed by the patch.
Oops. I marked the wrong line.
I meant this one:
-> checkpatch ~/Mail/U-Boot/3377
WARNING: please, no space before tabs
#379: FILE:arch/arm/include/asm/arch-at91/at91rm9200.h:112:
+#defineATMEL_PMX_BA_ERX2^I0x00008000$
Quoted 4 lines
Best regards,
Wolfgang Denk
I don't know, why my checkpatch version does not report this. But I have fix this in V3 of the Patch.
Best regards,
Jens Scharsig
PATCH v2 1/1 update arm/at91rm9200 work with rework rework110202
Dear Jens Scharsig,
Quoted 2 lines · In message <[email protected]> you wrote:
I don't know, why my checkpatch version does not report this.
Try and update against curent Linux kernel version.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de In an organization, each person rises to the level of his own incom- petency - The Peter Principle