From patchwork Tue Apr 18 07:31:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenyou Yang X-Patchwork-Id: 751719 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3w6cYY3LYZz9s3s for ; Tue, 18 Apr 2017 17:42:57 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 34AFDC21C8C; Tue, 18 Apr 2017 07:42:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id DC18BC21CC0; Tue, 18 Apr 2017 07:42:01 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 8414EC21CDA; Tue, 18 Apr 2017 07:41:28 +0000 (UTC) Received: from ussmtp01.atmel.com (nasmtp01.atmel.com [192.199.1.246]) by lists.denx.de (Postfix) with ESMTPS id 063CEC21CC3 for ; Tue, 18 Apr 2017 07:41:26 +0000 (UTC) Received: from apsmtp01.atmel.com (10.168.254.31) by DVREDG02.corp.atmel.com (10.42.103.31) with Microsoft SMTP Server id 14.3.235.1; Tue, 18 Apr 2017 01:41:21 -0600 Received: from shaarm01.corp.atmel.com (10.168.254.13) by apsmtp01.atmel.com (10.168.254.31) with Microsoft SMTP Server id 14.3.235.1; Tue, 18 Apr 2017 15:47:25 +0800 From: Wenyou Yang To: U-Boot Mailing List Date: Tue, 18 Apr 2017 15:31:01 +0800 Message-ID: <20170418073102.29990-3-wenyou.yang@atmel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170418073102.29990-1-wenyou.yang@atmel.com> References: <20170418073102.29990-1-wenyou.yang@atmel.com> MIME-Version: 1.0 Cc: Tom Rini , Stelian Pop Subject: [U-Boot] [PATCH v4 2/3] board: at91sam9263ek: Clean up code X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Because 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 Reviewed-by: Simon Glass Signed-off-by: Wenyou Yang Reviewed-by: Simon Glass --- Changes in v4: None Changes in v3: None Changes in v2: None board/atmel/at91sam9263ek/at91sam9263ek.c | 59 ------------------------------- 1 file changed, 59 deletions(-) diff --git a/board/atmel/at91sam9263ek/at91sam9263ek.c b/board/atmel/at91sam9263ek/at91sam9263ek.c index e4e32f60ae..2aafafe35e 100644 --- a/board/atmel/at91sam9263ek/at91sam9263ek.c +++ b/board/atmel/at91sam9263ek/at91sam9263ek.c @@ -19,11 +19,6 @@ #include #include #include -#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB) -#include -#endif -#include -#include DECLARE_GLOBAL_DATA_PTR; @@ -77,34 +72,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, @@ -209,22 +176,8 @@ void lcd_show_board_info(void) #endif /* CONFIG_LCD_INFO */ #endif -#ifdef CONFIG_GENERIC_ATMEL_MCI -int board_mmc_init(bd_t *bd) -{ - at91_mci_hw_init(); - - return atmel_mci_init((void *)ATMEL_BASE_MCI1); -} -#endif - 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(); return 0; } @@ -242,9 +195,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 +217,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; -}