mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-02 09:36:15 +00:00
board: at91sam9260ek: Clean up code
Since the introduction of the pinctrl and clk drivers and the device tree files, remove unneeded hard coded related code from the board file. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
83f1c2ef30
commit
c97c2eb1fe
1 changed files with 0 additions and 74 deletions
|
@ -13,12 +13,6 @@
|
||||||
#include <asm/arch/at91_common.h>
|
#include <asm/arch/at91_common.h>
|
||||||
#include <asm/arch/clk.h>
|
#include <asm/arch/clk.h>
|
||||||
#include <asm/arch/gpio.h>
|
#include <asm/arch/gpio.h>
|
||||||
#include <atmel_mci.h>
|
|
||||||
|
|
||||||
#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
|
|
||||||
# include <net.h>
|
|
||||||
#endif
|
|
||||||
#include <netdev.h>
|
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
|
@ -67,63 +61,8 @@ static void at91sam9260ek_nand_hw_init(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_MACB
|
|
||||||
static void at91sam9260ek_macb_hw_init(void)
|
|
||||||
{
|
|
||||||
struct at91_port *pioa = (struct at91_port *)ATMEL_BASE_PIOA;
|
|
||||||
|
|
||||||
at91_periph_clk_enable(ATMEL_ID_EMAC0);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Disable pull-up on:
|
|
||||||
* RXDV (PA17) => PHY normal mode (not Test mode)
|
|
||||||
* ERX0 (PA14) => PHY ADDR0
|
|
||||||
* ERX1 (PA15) => PHY ADDR1
|
|
||||||
* ERX2 (PA25) => PHY ADDR2
|
|
||||||
* ERX3 (PA26) => PHY ADDR3
|
|
||||||
* ECRS (PA28) => PHY ADDR4 => PHYADDR = 0x0
|
|
||||||
*
|
|
||||||
* PHY has internal pull-down
|
|
||||||
*/
|
|
||||||
writel(pin_to_mask(AT91_PIN_PA14) |
|
|
||||||
pin_to_mask(AT91_PIN_PA15) |
|
|
||||||
pin_to_mask(AT91_PIN_PA17) |
|
|
||||||
pin_to_mask(AT91_PIN_PA25) |
|
|
||||||
pin_to_mask(AT91_PIN_PA26) |
|
|
||||||
pin_to_mask(AT91_PIN_PA28),
|
|
||||||
&pioa->pudr);
|
|
||||||
|
|
||||||
at91_phy_reset();
|
|
||||||
|
|
||||||
/* Re-enable pull-up */
|
|
||||||
writel(pin_to_mask(AT91_PIN_PA14) |
|
|
||||||
pin_to_mask(AT91_PIN_PA15) |
|
|
||||||
pin_to_mask(AT91_PIN_PA17) |
|
|
||||||
pin_to_mask(AT91_PIN_PA25) |
|
|
||||||
pin_to_mask(AT91_PIN_PA26) |
|
|
||||||
pin_to_mask(AT91_PIN_PA28),
|
|
||||||
&pioa->puer);
|
|
||||||
|
|
||||||
/* Initialize EMAC=MACB hardware */
|
|
||||||
at91_macb_hw_init();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_GENERIC_ATMEL_MCI
|
|
||||||
int board_mmc_init(bd_t *bd)
|
|
||||||
{
|
|
||||||
at91_mci_hw_init();
|
|
||||||
|
|
||||||
return atmel_mci_init((void *)ATMEL_BASE_MCI);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int board_early_init_f(void)
|
int board_early_init_f(void)
|
||||||
{
|
{
|
||||||
at91_periph_clk_enable(ATMEL_ID_PIOA);
|
|
||||||
at91_periph_clk_enable(ATMEL_ID_PIOB);
|
|
||||||
at91_periph_clk_enable(ATMEL_ID_PIOC);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,16 +71,12 @@ int board_init(void)
|
||||||
/* adress of boot parameters */
|
/* adress of boot parameters */
|
||||||
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
|
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
|
||||||
|
|
||||||
at91_seriald_hw_init();
|
|
||||||
#ifdef CONFIG_CMD_NAND
|
#ifdef CONFIG_CMD_NAND
|
||||||
at91sam9260ek_nand_hw_init();
|
at91sam9260ek_nand_hw_init();
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_HAS_DATAFLASH
|
#ifdef CONFIG_HAS_DATAFLASH
|
||||||
at91_spi0_hw_init((1 << 0) | (1 << 1));
|
at91_spi0_hw_init((1 << 0) | (1 << 1));
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_MACB
|
|
||||||
at91sam9260ek_macb_hw_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -159,12 +94,3 @@ void reset_phy(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int board_eth_init(bd_t *bis)
|
|
||||||
{
|
|
||||||
int rc = 0;
|
|
||||||
#ifdef CONFIG_MACB
|
|
||||||
rc = macb_eth_initialize(0, (void *)ATMEL_BASE_EMAC0, 0x00);
|
|
||||||
#endif
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue