X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=board%2Fatmel%2Fat91sam9263ek%2Fat91sam9263ek.c;h=b37e9d3c7ad0be09ba483c45779a8fd15a10a924;hb=235c5b8315c6a9eb566fd3d99a098cc6db869fc5;hp=04e5812db3d0fb0646bcf57dd27c774e38f76808;hpb=715b3a9b2486e8d7a32365d817c77209b35ee796;p=platform%2Fkernel%2Fu-boot.git diff --git a/board/atmel/at91sam9263ek/at91sam9263ek.c b/board/atmel/at91sam9263ek/at91sam9263ek.c index 04e5812..b37e9d3 100644 --- a/board/atmel/at91sam9263ek/at91sam9263ek.c +++ b/board/atmel/at91sam9263ek/at91sam9263ek.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include @@ -19,11 +20,7 @@ #include #include #include -#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB) -#include -#endif -#include -#include +#include DECLARE_GLOBAL_DATA_PTR; @@ -77,34 +74,6 @@ static void at91sam9263ek_nand_hw_init(void) } #endif -#ifdef CONFIG_MACB -static void at91sam9263ek_macb_hw_init(void) -{ - at91_pio_t *pio = (at91_pio_t *) ATMEL_BASE_PIO; - - at91_periph_clk_enable(ATMEL_ID_EMAC); - - /* - * Disable pull-up on: - * RXDV (PC25) => PHY normal mode (not Test mode) - * ERX0 (PE25) => PHY ADDR0 - * ERX1 (PE26) => PHY ADDR1 => PHYADDR = 0x0 - * - * PHY has internal pull-down - */ - writel(1 << 25, &pio->pioc.pudr); - writel((1 << 25) | (1 <<26), &pio->pioe.pudr); - - at91_phy_reset(); - - /* Re-enable pull-up */ - writel(1 << 25, &pio->pioc.puer); - writel((1 << 25) | (1 <<26), &pio->pioe.puer); - - at91_macb_hw_init(); -} -#endif - #ifdef CONFIG_LCD vidinfo_t panel_info = { .vl_col = 240, @@ -166,14 +135,14 @@ static void at91sam9263ek_lcd_hw_init(void) #include #include -#ifndef CONFIG_SYS_NO_FLASH +#ifdef CONFIG_MTD_NOR_FLASH extern flash_info_t flash_info[]; #endif void lcd_show_board_info(void) { ulong dram_size, nand_size; -#ifndef CONFIG_SYS_NO_FLASH +#ifdef CONFIG_MTD_NOR_FLASH ulong flash_size; #endif int i; @@ -192,7 +161,7 @@ void lcd_show_board_info(void) nand_size = 0; for (i = 0; i < CONFIG_SYS_MAX_NAND_DEVICE; i++) nand_size += nand_info[i]->size; -#ifndef CONFIG_SYS_NO_FLASH +#ifdef CONFIG_MTD_NOR_FLASH flash_size = 0; for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i++) flash_size += flash_info[i].size; @@ -200,7 +169,7 @@ void lcd_show_board_info(void) lcd_printf (" %ld MB SDRAM, %ld MB NAND", dram_size >> 20, nand_size >> 20 ); -#ifndef CONFIG_SYS_NO_FLASH +#ifdef CONFIG_MTD_NOR_FLASH lcd_printf (",\n %ld MB NOR", flash_size >> 20); #endif @@ -209,24 +178,22 @@ void lcd_show_board_info(void) #endif /* CONFIG_LCD_INFO */ #endif -#ifdef CONFIG_GENERIC_ATMEL_MCI -int board_mmc_init(bd_t *bd) +#ifdef CONFIG_DEBUG_UART_BOARD_INIT +void board_debug_uart_init(void) { - at91_mci_hw_init(); - - return atmel_mci_init((void *)ATMEL_BASE_MCI1); + at91_seriald_hw_init(); } #endif +#ifdef CONFIG_BOARD_EARLY_INIT_F 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_PIOCDE); - - at91_seriald_hw_init(); +#ifdef CONFIG_DEBUG_UART + debug_uart_init(); +#endif return 0; } +#endif int board_init(void) { @@ -242,9 +209,6 @@ int board_init(void) at91_set_pio_output(AT91_PIO_PORTE, 20, 1); /* select spi0 clock */ at91_spi0_hw_init(1 << 0); #endif -#ifdef CONFIG_MACB - at91sam9263ek_macb_hw_init(); -#endif #ifdef CONFIG_USB_OHCI_NEW at91_uhp_hw_init(); #endif @@ -267,12 +231,3 @@ void reset_phy(void) { } #endif - -int board_eth_init(bd_t *bis) -{ - int rc = 0; -#ifdef CONFIG_MACB - rc = macb_eth_initialize(0, (void *) ATMEL_BASE_EMAC, 0x00); -#endif - return rc; -}