From patchwork Fri Feb 24 10:09:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenyou Yang X-Patchwork-Id: 732073 X-Patchwork-Delegate: andreas.biessmann@googlemail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3vV6xw02rcz9s2G for ; Fri, 24 Feb 2017 21:37:56 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 64BECB39A4; Fri, 24 Feb 2017 11:37:54 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hmskPWgA69lu; Fri, 24 Feb 2017 11:37:54 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5E4CFB39C8; Fri, 24 Feb 2017 11:30:49 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9EDEDA7CD0 for ; Fri, 24 Feb 2017 11:18:23 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id otiAcwP0knfS for ; Fri, 24 Feb 2017 11:18:23 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from ussmtp01.atmel.com (nasmtp01.atmel.com [192.199.1.246]) by theia.denx.de (Postfix) with ESMTPS id B0DD0B38B9 for ; Fri, 24 Feb 2017 11:16:02 +0100 (CET) Received: from apsmtp01.atmel.com (10.168.254.30) by DVREDG02.corp.atmel.com (10.42.103.31) with Microsoft SMTP Server id 14.3.235.1; Fri, 24 Feb 2017 03:15:53 -0700 Received: from shaarm01.corp.atmel.com (10.168.254.13) by apsmtp01.corp.atmel.com (10.168.254.30) with Microsoft SMTP Server id 14.3.235.1; Fri, 24 Feb 2017 18:19:43 +0800 From: Wenyou Yang To: U-Boot Mailing List Date: Fri, 24 Feb 2017 18:09:45 +0800 Message-ID: <20170224100945.27204-4-wenyou.yang@atmel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170224100945.27204-1-wenyou.yang@atmel.com> References: <20170224100945.27204-1-wenyou.yang@atmel.com> MIME-Version: 1.0 Cc: Stelian Pop Subject: [U-Boot] [PATCH v2 3/3] board: at91sam9260ek: clean up code X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 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" 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 --- Changes in v2: None board/atmel/at91sam9260ek/at91sam9260ek.c | 73 ------------------------------- 1 file changed, 73 deletions(-) diff --git a/board/atmel/at91sam9260ek/at91sam9260ek.c b/board/atmel/at91sam9260ek/at91sam9260ek.c index 98193bfdc6..e1bbc93924 100644 --- a/board/atmel/at91sam9260ek/at91sam9260ek.c +++ b/board/atmel/at91sam9260ek/at91sam9260ek.c @@ -13,12 +13,6 @@ #include #include #include -#include - -#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB) -# include -#endif -#include DECLARE_GLOBAL_DATA_PTR; @@ -67,63 +61,8 @@ static void at91sam9260ek_nand_hw_init(void) } #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) { - at91_periph_clk_enable(ATMEL_ID_PIOA); - at91_periph_clk_enable(ATMEL_ID_PIOB); - at91_periph_clk_enable(ATMEL_ID_PIOC); - return 0; } @@ -139,9 +78,6 @@ int board_init(void) #ifdef CONFIG_HAS_DATAFLASH at91_spi0_hw_init((1 << 0) | (1 << 1)); #endif -#ifdef CONFIG_MACB - at91sam9260ek_macb_hw_init(); -#endif return 0; } @@ -159,12 +95,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_EMAC0, 0x00); -#endif - return rc; -}