From patchwork Thu Jan 24 16:48:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Stach X-Patchwork-Id: 215454 X-Patchwork-Delegate: twarren@nvidia.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 B24592C0079 for ; Fri, 25 Jan 2013 03:50:36 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1BC5E4A186; Thu, 24 Jan 2013 17:49:57 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 0qYE24OL3eoG; Thu, 24 Jan 2013 17:49:56 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 480674A142; Thu, 24 Jan 2013 17:48:50 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A0CA14A0BB for ; Thu, 24 Jan 2013 17:48:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 R2twom59+9kl for ; Thu, 24 Jan 2013 17:48:35 +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 km20343-01.keymachine.de (ns.km20343-01.keymachine.de [84.19.182.79]) by theia.denx.de (Postfix) with ESMTPS id 48A284A0F2 for ; Thu, 24 Jan 2013 17:48:29 +0100 (CET) Received: from localhost.localdomain (g231089207.adsl.alicedsl.de [92.231.89.207]) by km20343-01.keymachine.de (Postfix) with ESMTPA id 7C33A7D4421; Thu, 24 Jan 2013 17:48:28 +0100 (CET) From: Lucas Stach To: u-boot@lists.denx.de Date: Thu, 24 Jan 2013 17:48:19 +0100 Message-Id: <1359046100-19385-11-git-send-email-dev@lynxeye.de> X-Mailer: git-send-email 1.8.0.2 In-Reply-To: <1359046100-19385-1-git-send-email-dev@lynxeye.de> References: <1359046100-19385-1-git-send-email-dev@lynxeye.de> Cc: Stephen Warren , Tom Warren Subject: [U-Boot] [PATCH 10/11] tegra20: remove old pinmux setup X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de All boards are converted to the new tablebased pinmux setup. Get rid of the old method. Signed-off-by: Lucas Stach --- arch/arm/cpu/tegra-common/board.c | 25 -------------------- arch/arm/include/asm/arch-tegra/board.h | 12 ---------- board/nvidia/common/board.c | 41 +-------------------------------- drivers/i2c/tegra_i2c.c | 9 -------- drivers/input/tegra-kbc.c | 4 +--- drivers/video/tegra.c | 3 --- include/configs/colibri_t20_iris.h | 4 ---- include/configs/harmony.h | 3 --- include/configs/medcom-wide.h | 3 --- include/configs/paz00.h | 3 --- include/configs/plutux.h | 3 --- include/configs/seaboard.h | 3 --- include/configs/tec.h | 3 --- include/configs/trimslice.h | 4 ---- include/configs/ventana.h | 3 --- include/configs/whistler.h | 4 ---- 16 files changed, 2 insertions(+), 125 deletions(-) diff --git a/arch/arm/cpu/tegra-common/board.c b/arch/arm/cpu/tegra-common/board.c index 1ec6c06..bb6a035 100644 --- a/arch/arm/cpu/tegra-common/board.c +++ b/arch/arm/cpu/tegra-common/board.c @@ -102,30 +102,6 @@ int checkboard(void) } #endif /* CONFIG_DISPLAY_BOARDINFO */ -static int uart_configs[] = { -#if defined(CONFIG_TEGRA20) - #if defined(CONFIG_TEGRA_UARTA_UAA_UAB) - FUNCMUX_UART1_UAA_UAB, - #elif defined(CONFIG_TEGRA_UARTA_GPU) - FUNCMUX_UART1_GPU, - #elif defined(CONFIG_TEGRA_UARTA_SDIO1) - FUNCMUX_UART1_SDIO1, - #else - FUNCMUX_UART1_IRRX_IRTX, - #endif - FUNCMUX_UART2_UARTB, - -1, - FUNCMUX_UART4_GMC, - -1, -#else /* Tegra30 */ - FUNCMUX_UART1_ULPI, /* UARTA */ - -1, - -1, - -1, - -1, -#endif -}; - /** * Set up the specified uarts * @@ -145,7 +121,6 @@ static void setup_uarts(int uart_ids) if (uart_ids & (1 << i)) { enum periph_id id = id_for_uart[i]; - funcmux_select(id, uart_configs[i]); clock_ll_start_uart(id); } } diff --git a/arch/arm/include/asm/arch-tegra/board.h b/arch/arm/include/asm/arch-tegra/board.h index 3db0d93..fffd55e 100644 --- a/arch/arm/include/asm/arch-tegra/board.h +++ b/arch/arm/include/asm/arch-tegra/board.h @@ -34,16 +34,4 @@ void board_init_uart_f(void); /* Set up any early GPIOs the board might need for proper operation */ void gpio_early_init(void); /* overrideable GPIO config */ -/* - * Hooks to allow boards to set up the pinmux for a specific function. - * Has to be implemented in the board files as we don't yet support pinmux - * setup from FTD. If a board file does not implement one of those functions - * an empty stub function will be called. - */ - -void pin_mux_usb(void); /* overrideable USB pinmux setup */ -void pin_mux_spi(void); /* overrideable SPI pinmux setup */ -void pin_mux_nand(void); /* overrideable NAND pinmux setup */ -void pin_mux_display(void); /* overrideable DISPLAY pinmux setup */ - #endif diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c index d9d0e59..c76791c 100644 --- a/board/nvidia/common/board.c +++ b/board/nvidia/common/board.c @@ -69,18 +69,6 @@ int timer_init(void) } #endif -void __pin_mux_usb(void) -{ -} - -void pin_mux_usb(void) __attribute__((weak, alias("__pin_mux_usb"))); - -void __pin_mux_spi(void) -{ -} - -void pin_mux_spi(void) __attribute__((weak, alias("__pin_mux_spi"))); - void __gpio_early_init_uart(void) { } @@ -88,19 +76,6 @@ void __gpio_early_init_uart(void) void gpio_early_init_uart(void) __attribute__((weak, alias("__gpio_early_init_uart"))); -void __pin_mux_nand(void) -{ - funcmux_select(PERIPH_ID_NDFLASH, FUNCMUX_DEFAULT); -} - -void pin_mux_nand(void) __attribute__((weak, alias("__pin_mux_nand"))); - -void __pin_mux_display(void) -{ -} - -void pin_mux_display(void) __attribute__((weak, alias("__pin_mux_display"))); - /* * Routine: power_det_init * Description: turn off power detects @@ -132,9 +107,6 @@ int board_init(void) gpio_config_uart(); #endif #ifdef CONFIG_TEGRA_SPI -#ifndef CONFIG_TEGRA_TABLEBASED_PINMUX - pin_mux_spi(); -#endif spi_init(); #endif #ifdef CONFIG_PWM_TEGRA @@ -142,9 +114,6 @@ int board_init(void) debug("%s: Failed to init pwm\n", __func__); #endif #ifdef CONFIG_LCD -#ifndef CONFIG_TEGRA_TABLEBASED_PINMUX - pin_mux_display(); -#endif tegra_lcd_check_next_stage(gd->fdt_blob, 0); #endif /* boot param addr */ @@ -169,19 +138,12 @@ int board_init(void) #endif /* CONFIG_TEGRA_I2C */ #ifdef CONFIG_USB_EHCI_TEGRA -#ifndef CONFIG_TEGRA_TABLEBASED_PINMUX - pin_mux_usb(); -#endif board_usb_init(gd->fdt_blob); #endif #ifdef CONFIG_LCD tegra_lcd_check_next_stage(gd->fdt_blob, 0); #endif -#if defined(CONFIG_TEGRA_NAND) && !defined(CONFIG_TEGRA_TABLEBASED_PINMUX) - pin_mux_nand(); -#endif - #ifdef CONFIG_TEGRA_LP0 /* save Sdram params to PMC 2, 4, and 24 for WB0 */ warmboot_save_sdram_params(); @@ -202,9 +164,8 @@ void gpio_early_init(void) __attribute__((weak, alias("__gpio_early_init"))); int board_early_init_f(void) { -#if defined(CONFIG_TEGRA30) || defined(CONFIG_TEGRA_TABLEBASED_PINMUX) pinmux_init(); -#endif + board_init_uart_f(); /* Initialize periph GPIOs */ diff --git a/drivers/i2c/tegra_i2c.c b/drivers/i2c/tegra_i2c.c index efc77fa..6a6157d 100644 --- a/drivers/i2c/tegra_i2c.c +++ b/drivers/i2c/tegra_i2c.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -42,7 +41,6 @@ struct i2c_bus { int id; enum periph_id periph_id; int speed; - int pinmux_config; struct i2c_control *control; struct i2c_ctlr *regs; int is_dvc; /* DVC type, rather than I2C */ @@ -99,8 +97,6 @@ static void i2c_init_controller(struct i2c_bus *i2c_bus) setbits_le32(&dvc->ctrl3, DVC_CTRL_REG3_I2C_HW_SW_PROG_MASK); } - - funcmux_select(i2c_bus->periph_id, i2c_bus->pinmux_config); } static void send_packet_headers( @@ -322,11 +318,6 @@ static int i2c_get_config(const void *blob, int node, struct i2c_bus *i2c_bus) { i2c_bus->regs = (struct i2c_ctlr *)fdtdec_get_addr(blob, node, "reg"); - /* - * We don't have a binding for pinmux yet. Leave it out for now. So - * far no one needs anything other than the default. - */ - i2c_bus->pinmux_config = FUNCMUX_DEFAULT; i2c_bus->speed = fdtdec_get_int(blob, node, "clock-frequency", 0); i2c_bus->periph_id = clock_decode_periph_id(blob, node); diff --git a/drivers/input/tegra-kbc.c b/drivers/input/tegra-kbc.c index 88471d3..9d980a4 100644 --- a/drivers/input/tegra-kbc.c +++ b/drivers/input/tegra-kbc.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include @@ -348,8 +347,7 @@ static int init_tegra_keyboard(void) #error "Tegra keyboard driver requires FDT definitions" #endif - /* Set up pin mux and enable the clock */ - funcmux_select(PERIPH_ID_KBC, FUNCMUX_DEFAULT); + /* enable the clock */ clock_enable(PERIPH_ID_KBC); config_kbc_gpio(config.kbc); diff --git a/drivers/video/tegra.c b/drivers/video/tegra.c index afcb008..1ebefb6 100644 --- a/drivers/video/tegra.c +++ b/drivers/video/tegra.c @@ -27,7 +27,6 @@ #include #include -#include #include #include #include @@ -275,8 +274,6 @@ static int handle_stage(const void *blob) * variable. */ - funcmux_select(PERIPH_ID_DISP1, FUNCMUX_DEFAULT); - fdtdec_setup_gpio(&config.panel_vdd); fdtdec_setup_gpio(&config.lvds_shutdown); fdtdec_setup_gpio(&config.backlight_vdd); diff --git a/include/configs/colibri_t20_iris.h b/include/configs/colibri_t20_iris.h index 513a5ba..6b68ebf 100644 --- a/include/configs/colibri_t20_iris.h +++ b/include/configs/colibri_t20_iris.h @@ -18,9 +18,6 @@ #include "tegra20-common.h" -/* Enable tablebased pinmux */ -#define CONFIG_TEGRA_TABLEBASED_PINMUX - /* Enable FDT support */ #define CONFIG_DEFAULT_DEVICE_TREE tegra20-colibri_t20_iris #define CONFIG_OF_CONTROL @@ -32,7 +29,6 @@ /* Board-specific serial config */ #define CONFIG_TEGRA_ENABLE_UARTA -#define CONFIG_TEGRA_UARTA_SDIO1 #define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE #define CONFIG_BOARD_EARLY_INIT_F diff --git a/include/configs/harmony.h b/include/configs/harmony.h index d64d501..8d1fd47 100644 --- a/include/configs/harmony.h +++ b/include/configs/harmony.h @@ -27,9 +27,6 @@ #include #include "tegra20-common.h" -/* Enable tablebased pinmux */ -#define CONFIG_TEGRA_TABLEBASED_PINMUX - /* Enable fdt support for Harmony. Flash the image in u-boot-dtb.bin */ #define CONFIG_DEFAULT_DEVICE_TREE tegra20-harmony #define CONFIG_OF_CONTROL diff --git a/include/configs/medcom-wide.h b/include/configs/medcom-wide.h index a2913ee..bae4ba0 100644 --- a/include/configs/medcom-wide.h +++ b/include/configs/medcom-wide.h @@ -28,9 +28,6 @@ #include "tegra20-common.h" -/* Enable tablebased pinmux */ -#define CONFIG_TEGRA_TABLEBASED_PINMUX - /* Enable fdt support for Medcom-Wide. Flash the image in u-boot-dtb.bin */ #define CONFIG_DEFAULT_DEVICE_TREE tegra20-medcom-wide #define CONFIG_OF_CONTROL diff --git a/include/configs/paz00.h b/include/configs/paz00.h index 8acd65b..2edb4aa 100644 --- a/include/configs/paz00.h +++ b/include/configs/paz00.h @@ -20,9 +20,6 @@ #include #include "tegra20-common.h" -/* Enable tablebased pinmux */ -#define CONFIG_TEGRA_TABLEBASED_PINMUX - /* Enable fdt support for Paz00. Flash the image in u-boot-dtb.bin */ #define CONFIG_DEFAULT_DEVICE_TREE tegra20-paz00 #define CONFIG_OF_CONTROL diff --git a/include/configs/plutux.h b/include/configs/plutux.h index 5a02c27..deee237 100644 --- a/include/configs/plutux.h +++ b/include/configs/plutux.h @@ -28,9 +28,6 @@ #include "tegra20-common.h" -/* Enable tablebased pinmux */ -#define CONFIG_TEGRA_TABLEBASED_PINMUX - /* Enable fdt support for Plutux. Flash the image in u-boot-dtb.bin */ #define CONFIG_DEFAULT_DEVICE_TREE tegra20-plutux #define CONFIG_OF_CONTROL diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index 4e3bf1c..de0c777 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -35,9 +35,6 @@ #include "tegra20-common.h" -/* Enable tablebased pinmux */ -#define CONFIG_TEGRA_TABLEBASED_PINMUX - /* Enable fdt support for Seaboard. Flash the image in u-boot-dtb.bin */ #define CONFIG_DEFAULT_DEVICE_TREE tegra20-seaboard #define CONFIG_OF_CONTROL diff --git a/include/configs/tec.h b/include/configs/tec.h index 74c56d8..caeb9cd 100644 --- a/include/configs/tec.h +++ b/include/configs/tec.h @@ -28,9 +28,6 @@ #include "tegra20-common.h" -/* Enable tablebased pinmux */ -#define CONFIG_TEGRA_TABLEBASED_PINMUX - /* Enable fdt support for TEC. Flash the image in u-boot-dtb.bin */ #define CONFIG_DEFAULT_DEVICE_TREE tegra20-tec #define CONFIG_OF_CONTROL diff --git a/include/configs/trimslice.h b/include/configs/trimslice.h index c581717..32c9cf6 100644 --- a/include/configs/trimslice.h +++ b/include/configs/trimslice.h @@ -27,9 +27,6 @@ #include #include "tegra20-common.h" -/* Enable tablebased pinmux */ -#define CONFIG_TEGRA_TABLEBASED_PINMUX - /* Enable fdt support for TrimSlice. Flash the image in u-boot-dtb.bin */ #define CONFIG_DEFAULT_DEVICE_TREE tegra20-trimslice #define CONFIG_OF_CONTROL @@ -41,7 +38,6 @@ /* Board-specific serial config */ #define CONFIG_TEGRA_ENABLE_UARTA -#define CONFIG_TEGRA_UARTA_GPU #define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE #define CONFIG_MACH_TYPE MACH_TYPE_TRIMSLICE diff --git a/include/configs/ventana.h b/include/configs/ventana.h index 9a023b0..b55ebc9 100644 --- a/include/configs/ventana.h +++ b/include/configs/ventana.h @@ -27,9 +27,6 @@ #include #include "tegra20-common.h" -/* Enable tablebased pinmux */ -#define CONFIG_TEGRA_TABLEBASED_PINMUX - /* Enable fdt support for Ventana. Flash the image in u-boot-dtb.bin */ #define CONFIG_DEFAULT_DEVICE_TREE tegra20-ventana #define CONFIG_OF_CONTROL diff --git a/include/configs/whistler.h b/include/configs/whistler.h index d45fa44..3f9553a 100644 --- a/include/configs/whistler.h +++ b/include/configs/whistler.h @@ -27,9 +27,6 @@ #include #include "tegra20-common.h" -/* Enable tablebased pinmux */ -#define CONFIG_TEGRA_TABLEBASED_PINMUX - /* Enable fdt support for Whistler. Flash the image in u-boot-dtb.bin */ #define CONFIG_DEFAULT_DEVICE_TREE tegra20-whistler #define CONFIG_OF_CONTROL @@ -41,7 +38,6 @@ /* Board-specific serial config */ #define CONFIG_TEGRA_ENABLE_UARTA -#define CONFIG_TEGRA_UARTA_UAA_UAB #define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE #define CONFIG_MACH_TYPE MACH_TYPE_WHISTLER