diff options
author | Justin Waters <justin@justin-linux.(none)> | 2008-01-21 16:38:46 -0500 |
---|---|---|
committer | Justin Waters <justin@justin-linux.(none)> | 2008-01-22 11:25:35 -0500 |
commit | 405bb978ee2321b6cf5381a012c812bdc7679e40 (patch) | |
tree | fcab2b9817cbadafc512f39972468ea9ccecc8d5 /board | |
parent | 3c7ac4df9c9718e0bf11705a1a4d0e4b9dae700f (diff) |
Fix various configuration problems with Atmel patch
The CMD API has changed significantly since the patches were originally written. This fixes these problems and cleans up the code a little.
Signed-off-by: Justin Waters <justin.waters@timesys.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/at91rm9200ek/at91rm9200ek.c | 8 | ||||
-rw-r--r-- | board/at91sam9260ek/at91sam9260ek.c | 6 | ||||
-rw-r--r-- | board/at91sam9260ek/dm9161a.c | 8 | ||||
-rw-r--r-- | board/at91sam9260ek/nand.c | 8 | ||||
-rw-r--r-- | board/at91sam9261ek/at91sam9261ek.c | 4 | ||||
-rw-r--r-- | board/at91sam9261ek/nand.c | 6 | ||||
-rw-r--r-- | board/at91sam9263ek/at91sam9263ek.c | 6 | ||||
-rw-r--r-- | board/at91sam9263ek/dm9161a.c | 7 | ||||
-rw-r--r-- | board/at91sam9263ek/nand.c | 6 | ||||
-rw-r--r-- | board/at91sam9rlek/nand.c | 6 |
10 files changed, 35 insertions, 30 deletions
diff --git a/board/at91rm9200ek/at91rm9200ek.c b/board/at91rm9200ek/at91rm9200ek.c index 5fd841a826b..aacfee6e2bf 100644 --- a/board/at91rm9200ek/at91rm9200ek.c +++ b/board/at91rm9200ek/at91rm9200ek.c @@ -62,7 +62,7 @@ int dram_init (void) } #ifdef CONFIG_DRIVER_ETHER -#if (CONFIG_COMMANDS & CFG_CMD_NET) +#ifdef CONFIG_CMD_NET /* * Name: @@ -82,14 +82,14 @@ void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops) p_phyops->AutoNegotiate = dm9161_AutoNegotiate; } -#endif /* CONFIG_COMMANDS & CFG_CMD_NET */ +#endif /* CONFIG_CMD_NET */ #endif /* CONFIG_DRIVER_ETHER */ /* * Disk On Chip (NAND) Millenium initialization. * The NAND lives in the CS2* space */ -#if (CONFIG_COMMANDS & CFG_CMD_NAND) +#ifdef CONFIG_CMD_NAND extern ulong nand_probe (ulong physadr); #define AT91_SMARTMEDIA_BASE 0x40000000 /* physical address to access memory on NCS3 */ @@ -139,4 +139,4 @@ void nand_init (void) #endif printf ("%4lu MB\n", nand_probe(AT91_SMARTMEDIA_BASE) >> 20); } -#endif +#endif /* CONFIG_CMD_NAND */ diff --git a/board/at91sam9260ek/at91sam9260ek.c b/board/at91sam9260ek/at91sam9260ek.c index 5fce346a25b..d5d9f0dcc2f 100644 --- a/board/at91sam9260ek/at91sam9260ek.c +++ b/board/at91sam9260ek/at91sam9260ek.c @@ -73,7 +73,7 @@ int board_late_init(void) DECLARE_GLOBAL_DATA_PTR; /* Fix Ethernet Initialization Bug when starting Linux from U-Boot */ -#if (CONFIG_COMMANDS & CFG_CMD_NET) +#ifdef CONFIG_CMD_NET eth_init(gd->bd); #endif @@ -110,7 +110,7 @@ int AT91F_Serial_Hardware_Init(void) #ifdef CONFIG_DRIVER_ETHER -#if (CONFIG_COMMANDS & CFG_CMD_NET) +#ifdef CONFIG_CMD_NET extern AT91PS_EMAC p_mac; @@ -191,5 +191,5 @@ int AT91F_EMAC_Hardware_Init(void) AT91C_BASE_PIOA->PIO_PDR = (periphAEnable | periphBEnable); } -#endif /* CONFIG_COMMANDS & CFG_CMD_NET */ +#endif /* CONFIG_CMD_NET */ #endif /* CONFIG_DRIVER_ETHER */ diff --git a/board/at91sam9260ek/dm9161a.c b/board/at91sam9260ek/dm9161a.c index 135e2e11275..4590af077a6 100644 --- a/board/at91sam9260ek/dm9161a.c +++ b/board/at91sam9260ek/dm9161a.c @@ -26,8 +26,7 @@ #include <dm9161.h> #ifdef CONFIG_DRIVER_ETHER - -#if (CONFIG_COMMANDS & CFG_CMD_NET) +#ifdef CONFIG_CMD_NET /* * Name: @@ -97,7 +96,7 @@ static uchar dm9161a_GetLinkSpeed (AT91PS_EMAC p_mac) return TRUE; } - if ((stat1 & DM9161_100BASE_T4_HD) && (stat2 & DM9161_100HDX)) { + if ((stat1 & DM9161_100BASE_TX_HD) && (stat2 & DM9161_100HDX)) { /*set MII for 100BaseTX and Half Duplex */ p_mac->EMAC_NCFGR = (p_mac->EMAC_NCFGR & ~(AT91C_EMAC_SPD | AT91C_EMAC_FD)) @@ -295,7 +294,6 @@ void at91_GetPhyInterface(AT91PS_PhyOps p_phyops) p_phyops->Reset = dm9161a_ResetPhy; } -#endif /* CONFIG_COMMANDS & CFG_CMD_NET */ - +#endif /* CONFIG_CMD_NET */ #endif /* CONFIG_DRIVER_ETHER */ diff --git a/board/at91sam9260ek/nand.c b/board/at91sam9260ek/nand.c index 2a339a9ed71..0d9bdde153c 100644 --- a/board/at91sam9260ek/nand.c +++ b/board/at91sam9260ek/nand.c @@ -23,7 +23,7 @@ #include <common.h> #include <asm/arch/hardware.h> -#if (CONFIG_COMMANDS & CFG_CMD_NAND) +#ifdef CONFIG_CMD_NAND #include <nand.h> @@ -95,7 +95,7 @@ static int at91sam9260ek_nand_ready(struct mtd_info *mtd) return (*AT91C_PIOC_PDSR & AT91C_PIO_PC13); } -void board_nand_init(struct nand_chip *nand) +int board_nand_init(struct nand_chip *nand) { nand->eccmode = NAND_ECC_SOFT; nand->hwcontrol = at91sam9260ek_nand_hwcontrol; @@ -103,5 +103,7 @@ void board_nand_init(struct nand_chip *nand) nand->chip_delay = 18; at91sam9260ek_nand_init(nand); + + return 0; } -#endif +#endif /* CONFIG_CMD_NAND */ diff --git a/board/at91sam9261ek/at91sam9261ek.c b/board/at91sam9261ek/at91sam9261ek.c index 003f846b826..b7ef19291c5 100644 --- a/board/at91sam9261ek/at91sam9261ek.c +++ b/board/at91sam9261ek/at91sam9261ek.c @@ -130,8 +130,8 @@ int board_late_init(void) DECLARE_GLOBAL_DATA_PTR; /* Fix Ethernet Initialization Bug when starting Linux from U-Boot */ -#if (CONFIG_COMMANDS & CFG_CMD_NET) -#ifdef CONFIG_DRIVER_DM9000 +#ifdef CONFIG_CMD_NET +#ifdef CONFIG_DRIVER_DM9000 /* configure SMC's NCS2 to use it with DM9000 chip */ at91sam9261ek_dm9000_init(); #endif diff --git a/board/at91sam9261ek/nand.c b/board/at91sam9261ek/nand.c index ee33961000b..1ae7e6119a3 100644 --- a/board/at91sam9261ek/nand.c +++ b/board/at91sam9261ek/nand.c @@ -23,7 +23,7 @@ #include <common.h> #include <asm/arch/hardware.h> -#if (CONFIG_COMMANDS & CFG_CMD_NAND) +#ifdef CONFIG_CMD_NAND #include <nand.h> @@ -100,7 +100,7 @@ static int at91sam9261ek_nand_ready(struct mtd_info *mtd) return (*AT91C_PIOC_PDSR & AT91C_PIO_PC15); } -void board_nand_init(struct nand_chip *nand) +int board_nand_init(struct nand_chip *nand) { /* Init due to switch 8/16 bits mode */ if (nand->write_byte) @@ -120,5 +120,7 @@ void board_nand_init(struct nand_chip *nand) nand->chip_delay = 18; at91sam9261ek_nand_init(nand); + + return 0; } #endif diff --git a/board/at91sam9263ek/at91sam9263ek.c b/board/at91sam9263ek/at91sam9263ek.c index 05195adc015..d9b8714bcb4 100644 --- a/board/at91sam9263ek/at91sam9263ek.c +++ b/board/at91sam9263ek/at91sam9263ek.c @@ -74,7 +74,7 @@ int board_late_init(void) DECLARE_GLOBAL_DATA_PTR; /* Fix Ethernet Initialization Bug when starting Linux from U-Boot */ -#if (CONFIG_COMMANDS & CFG_CMD_NET) +#ifdef CONFIG_CMD_NET eth_init(gd->bd); #endif @@ -128,7 +128,7 @@ int AT91F_Serial_Hardware_Init(void) #ifdef CONFIG_DRIVER_ETHER -#if (CONFIG_COMMANDS & CFG_CMD_NET) +#ifdef CONFIG_CMD_NET extern AT91PS_EMAC p_mac; @@ -220,5 +220,5 @@ void AT91F_EMAC_Hardware_Init(void) #endif } -#endif /* CONFIG_COMMANDS & CFG_CMD_NET */ +#endif /* CONFIG_CMD_NET */ #endif /* CONFIG_DRIVER_ETHER */ diff --git a/board/at91sam9263ek/dm9161a.c b/board/at91sam9263ek/dm9161a.c index 63177d29fc0..6783da2713e 100644 --- a/board/at91sam9263ek/dm9161a.c +++ b/board/at91sam9263ek/dm9161a.c @@ -26,8 +26,7 @@ #include <dm9161.h> #ifdef CONFIG_DRIVER_ETHER - -#if (CONFIG_COMMANDS & CFG_CMD_NET) +#ifdef CONFIG_CMD_NET /* * Name: @@ -97,7 +96,7 @@ static uchar dm9161a_GetLinkSpeed (AT91PS_EMAC p_mac) return TRUE; } - if ((stat1 & DM9161_100BASE_T4_HD) && (stat2 & DM9161_100HDX)) { + if ((stat1 & DM9161_100BASE_TX_HD) && (stat2 & DM9161_100HDX)) { /*set MII for 100BaseTX and Half Duplex */ p_mac->EMAC_NCFGR = (p_mac->EMAC_NCFGR & ~(AT91C_EMAC_SPD | AT91C_EMAC_FD)) @@ -294,7 +293,7 @@ void at91_GetPhyInterface(AT91PS_PhyOps p_phyops) p_phyops->Reset = dm9161a_ResetPhy; } -#endif /* CONFIG_COMMANDS & CFG_CMD_NET */ +#endif /* CONFIG_CMD_NET */ #endif /* CONFIG_DRIVER_ETHER */ diff --git a/board/at91sam9263ek/nand.c b/board/at91sam9263ek/nand.c index 96c15058c13..b8c3e63ac54 100644 --- a/board/at91sam9263ek/nand.c +++ b/board/at91sam9263ek/nand.c @@ -23,7 +23,7 @@ #include <common.h> #include <asm/arch/hardware.h> -#if (CONFIG_COMMANDS & CFG_CMD_NAND) +#if (CONFIG_CMD_NAND) #include <nand.h> @@ -95,7 +95,7 @@ static int at91sam9263ek_nand_ready(struct mtd_info *mtd) return (*AT91C_PIOA_PDSR & AT91C_PIO_PA22); } -void board_nand_init(struct nand_chip *nand) +int board_nand_init(struct nand_chip *nand) { nand->eccmode = NAND_ECC_SOFT; nand->hwcontrol = at91sam9263ek_nand_hwcontrol; @@ -103,5 +103,7 @@ void board_nand_init(struct nand_chip *nand) nand->chip_delay = 18; at91sam9263ek_nand_init(nand); + + return 0; } #endif diff --git a/board/at91sam9rlek/nand.c b/board/at91sam9rlek/nand.c index 62623f5fbe8..4d30101df2c 100644 --- a/board/at91sam9rlek/nand.c +++ b/board/at91sam9rlek/nand.c @@ -23,7 +23,7 @@ #include <common.h> #include <asm/arch/hardware.h> -#if (CONFIG_COMMANDS & CFG_CMD_NAND) +#ifdef CONFIG_CMD_NAND #include <nand.h> @@ -94,7 +94,7 @@ static int at91sam9RLek_nand_ready(struct mtd_info *mtd) return (*AT91C_PIOD_PDSR & AT91C_PIO_PD17); } -void board_nand_init(struct nand_chip *nand) +int board_nand_init(struct nand_chip *nand) { /* Init due to switch 8/16 bits mode */ if (nand->write_byte) @@ -114,5 +114,7 @@ void board_nand_init(struct nand_chip *nand) nand->chip_delay = 18; at91sam9RLek_nand_init(nand); + + return 0; } #endif |