From patchwork Tue Feb 7 09:11:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenyou Yang X-Patchwork-Id: 725051 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 3vHdyD4rs7z9s2s for ; Tue, 7 Feb 2017 20:16:52 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B2E23B3874; Tue, 7 Feb 2017 10:16:50 +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 cre0_nIkIS2R; Tue, 7 Feb 2017 10:16:50 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0A3704B9A2; Tue, 7 Feb 2017 10:16:50 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 83C084BA58 for ; Tue, 7 Feb 2017 10:16:47 +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 ISvN8wG5TYa8 for ; Tue, 7 Feb 2017 10:16:47 +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 080F44B99D for ; Tue, 7 Feb 2017 10:16:44 +0100 (CET) Received: from apsmtp01.atmel.com (10.168.254.31) by DVREDG02.corp.atmel.com (10.42.103.31) with Microsoft SMTP Server (TLS) id 14.3.235.1; Tue, 7 Feb 2017 02:16:38 -0700 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, 7 Feb 2017 17:21:17 +0800 From: Wenyou Yang To: U-Boot Mailing List Date: Tue, 7 Feb 2017 17:11:33 +0800 Message-ID: <20170207091135.23008-3-wenyou.yang@atmel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170207091135.23008-1-wenyou.yang@atmel.com> References: <20170207091135.23008-1-wenyou.yang@atmel.com> MIME-Version: 1.0 Subject: [U-Boot] [PATCH v2 2/4] board: at91sam9x5ek: 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 driver and the dts file, remove unneeded hard coded related code from the board file Signed-off-by: Wenyou Yang Reviewed-by: Simon Glass --- Changes in v2: None board/atmel/at91sam9x5ek/at91sam9x5ek.c | 68 --------------------------------- 1 file changed, 68 deletions(-) diff --git a/board/atmel/at91sam9x5ek/at91sam9x5ek.c b/board/atmel/at91sam9x5ek/at91sam9x5ek.c index 0ae42dd158..9bd5eaf363 100644 --- a/board/atmel/at91sam9x5ek/at91sam9x5ek.c +++ b/board/atmel/at91sam9x5ek/at91sam9x5ek.c @@ -15,17 +15,10 @@ #include #include #include -#ifdef CONFIG_MACB -#include -#endif -#include #ifdef CONFIG_LCD_INFO #include #include #endif -#ifdef CONFIG_ATMEL_SPI -#include -#endif DECLARE_GLOBAL_DATA_PTR; @@ -92,21 +85,6 @@ static void at91sam9x5ek_nand_hw_init(void) } #endif -int board_eth_init(bd_t *bis) -{ - int rc = 0; - -#ifdef CONFIG_MACB - if (has_emac0()) - rc = macb_eth_initialize(0, - (void *)ATMEL_BASE_EMAC0, 0x00); - if (has_emac1()) - rc = macb_eth_initialize(1, - (void *)ATMEL_BASE_EMAC1, 0x00); -#endif - return rc; -} - #ifdef CONFIG_LCD vidinfo_t panel_info = { .vl_col = 800, @@ -205,42 +183,6 @@ void lcd_show_board_info(void) #endif /* CONFIG_LCD_INFO */ #endif /* CONFIG_LCD */ -#ifndef CONFIG_DM_SPI -/* SPI chip select control */ -#ifdef CONFIG_ATMEL_SPI -int spi_cs_is_valid(unsigned int bus, unsigned int cs) -{ - return bus == 0 && cs < 2; -} - -void spi_cs_activate(struct spi_slave *slave) -{ - switch (slave->cs) { - case 1: - at91_set_pio_output(AT91_PIO_PORTA, 7, 0); - break; - case 0: - default: - at91_set_pio_output(AT91_PIO_PORTA, 14, 0); - break; - } -} - -void spi_cs_deactivate(struct spi_slave *slave) -{ - switch (slave->cs) { - case 1: - at91_set_pio_output(AT91_PIO_PORTA, 7, 1); - break; - case 0: - default: - at91_set_pio_output(AT91_PIO_PORTA, 14, 1); - break; - } -} -#endif /* CONFIG_ATMEL_SPI */ -#endif - #ifdef CONFIG_GENERIC_ATMEL_MCI int board_mmc_init(bd_t *bd) { @@ -268,14 +210,6 @@ int board_init(void) at91sam9x5ek_nand_hw_init(); #endif -#ifdef CONFIG_ATMEL_SPI - at91_spi0_hw_init(1 << 4); -#endif - -#ifdef CONFIG_MACB - at91_macb_hw_init(); -#endif - #if defined(CONFIG_USB_OHCI_NEW) || defined(CONFIG_USB_EHCI) at91_uhp_hw_init(); #endif @@ -302,8 +236,6 @@ void at91_spl_board_init(void) at91_mci_hw_init(); #elif CONFIG_SYS_USE_NANDFLASH at91sam9x5ek_nand_hw_init(); -#elif CONFIG_SYS_USE_SPIFLASH - at91_spi0_hw_init(1 << 4); #endif }