davinci: da850: clean up pinmux arrays in da850.c
Subsystems (3)
cover davinci: da850: clean up pinmux arrays in da850.c
The following patch series is an attempt to clean up unused and platform specific pinmux arrays in the da850 CPU files. This series was developed as a result of the following email thread:
http://www.mail-archive.com/davinci-linux-open-source at linux.davincidsp.com/msg19921.html
This patch is against commit cda6ca38f96f0719ce3500da856e7d4bf0abbc38 of linux-davinci.
This series should not be applied until someone with a da850 EVM can please test and confirm the mcasp and mmc interfaces continue to work properly with these patches.
---
changes since v0:
- correct use of __initdata/__initconst attributes
Michael Williamson (5):
davinci: da850: remove unused pinmux array
davinci: da850: remove unused emif pinmux array
davinci: da850: move da850_evm specific mcasp pins to board file.
davinci: da850: move da850_evm specific mmcsd pinmux array to board
file.
davinci: da850: remove unused uart pinmux arrays.
arch/arm/mach-davinci/board-da850-evm.c | 18 ++++++++- arch/arm/mach-davinci/da850.c | 56 ---------------------------- arch/arm/mach-davinci/include/mach/da8xx.h | 7 --- 3 files changed, 16 insertions(+), 65 deletions(-)
PATCH 1/5 davinci: da850: remove unused pinmux array
The da850_cpgmac_pins pinmux array is not used. Remove it.
--- arch/arm/mach-davinci/da850.c | 11 ----------- arch/arm/mach-davinci/include/mach/da8xx.h | 1 - 2 files changed, 0 insertions(+), 12 deletions(-)
arch/arm/mach-davinci/da850.c +0 -11
@@ -577,17 +577,6 @@ const short da850_i2c1_pins[] __initdata = {-1 }; -const short da850_cpgmac_pins[]__initdata = { -DA850_MII_TXEN ,DA850_MII_TXCLK ,DA850_MII_COL ,DA850_MII_TXD_3 , -DA850_MII_TXD_2 ,DA850_MII_TXD_1 ,DA850_MII_TXD_0 ,DA850_MII_RXER , -DA850_MII_CRS ,DA850_MII_RXCLK ,DA850_MII_RXDV ,DA850_MII_RXD_3 , -DA850_MII_RXD_2 ,DA850_MII_RXD_1 ,DA850_MII_RXD_0 ,DA850_MDIO_CLK , -DA850_MDIO_D ,DA850_RMII_TXD_0 ,DA850_RMII_TXD_1 ,DA850_RMII_TXEN , -DA850_RMII_CRS_DV ,DA850_RMII_RXD_0 ,DA850_RMII_RXD_1 ,DA850_RMII_RXER , -DA850_RMII_MHZ_50_CLK , --1 -}; -const short da850_mcasp_pins[]__initdata = {DA850_AHCLKX ,DA850_ACLKX ,DA850_AFSX ,DA850_AHCLKR ,DA850_ACLKR ,DA850_AFSR ,DA850_AMUTE ,
arch/arm/mach-davinci/include/mach/da8xx.h +0 -1
@@ -128,7 +128,6 @@ extern const short da850_uart1_pins[];extern const short da850_uart2_pins[];extern const short da850_i2c0_pins[];extern const short da850_i2c1_pins[]; -extern const short da850_cpgmac_pins[];extern const short da850_mcasp_pins[];extern const short da850_lcdcntl_pins[];extern const short da850_mmcsd0_pins[];
Signature · 1 line
1.7.0.4
PATCH 2/5 davinci: da850: remove unused emif pinmux array
In reply to Michael WilliamsonThe da850_emif25_pins pinmux array is not used. Remove it.
--- arch/arm/mach-davinci/da850.c | 16 ---------------- arch/arm/mach-davinci/include/mach/da8xx.h | 1 - 2 files changed, 0 insertions(+), 17 deletions(-)
arch/arm/mach-davinci/da850.c +0 -16
@@ -600,22 +600,6 @@ const short da850_mmcsd0_pins[] __initdata = {-1 }; -const short da850_emif25_pins[]__initdata = { -DA850_EMA_BA_1 ,DA850_EMA_CLK ,DA850_EMA_WAIT_1 ,DA850_NEMA_CS_2 , -DA850_NEMA_CS_3 ,DA850_NEMA_CS_4 ,DA850_NEMA_WE ,DA850_NEMA_OE , -DA850_EMA_D_0 ,DA850_EMA_D_1 ,DA850_EMA_D_2 ,DA850_EMA_D_3 , -DA850_EMA_D_4 ,DA850_EMA_D_5 ,DA850_EMA_D_6 ,DA850_EMA_D_7 , -DA850_EMA_D_8 ,DA850_EMA_D_9 ,DA850_EMA_D_10 ,DA850_EMA_D_11 , -DA850_EMA_D_12 ,DA850_EMA_D_13 ,DA850_EMA_D_14 ,DA850_EMA_D_15 , -DA850_EMA_A_0 ,DA850_EMA_A_1 ,DA850_EMA_A_2 ,DA850_EMA_A_3 , -DA850_EMA_A_4 ,DA850_EMA_A_5 ,DA850_EMA_A_6 ,DA850_EMA_A_7 , -DA850_EMA_A_8 ,DA850_EMA_A_9 ,DA850_EMA_A_10 ,DA850_EMA_A_11 , -DA850_EMA_A_12 ,DA850_EMA_A_13 ,DA850_EMA_A_14 ,DA850_EMA_A_15 , -DA850_EMA_A_16 ,DA850_EMA_A_17 ,DA850_EMA_A_18 ,DA850_EMA_A_19 , -DA850_EMA_A_20 ,DA850_EMA_A_21 ,DA850_EMA_A_22 ,DA850_EMA_A_23 , --1 -}; -/* FIQ are pri 0-1; otherwise 2-7, with 7 lowest priority */ static u8 da850_default_priorities[DA850_N_CP_INTC_IRQ ] = { [IRQ_DA8XX_COMMTX ] =7 ,
arch/arm/mach-davinci/include/mach/da8xx.h +0 -1
@@ -131,6 +131,5 @@ extern const short da850_i2c1_pins[];extern const short da850_mcasp_pins[];extern const short da850_lcdcntl_pins[];extern const short da850_mmcsd0_pins[]; -extern const short da850_emif25_pins[];#endif /* __ASM_ARCH_DAVINCI_DA8XX_H */
Signature · 1 line
1.7.0.4
PATCH 3/5 davinci: da850: move da850_evm specific mcasp pins to board file.
In reply to Michael WilliamsonThe da850_mcasp_pins pinmux array is specific to the da850_evm, and is not generic. Move the array to the board file, make it static initdata, and rename it accordingly.
--- arch/arm/mach-davinci/board-da850-evm.c | 9 ++++++++- arch/arm/mach-davinci/da850.c | 7 ------- arch/arm/mach-davinci/include/mach/da8xx.h | 1 - 3 files changed, 8 insertions(+), 9 deletions(-)
arch/arm/mach-davinci/board-da850-evm.c +8 -1
@@ -664,6 +664,13 @@ static struct snd_platform_data da850_evm_snd_data = { .rxnumevt = 1, }; +static const short da850_evm_mcasp_pins[]__initconst = { +DA850_AHCLKX ,DA850_ACLKX ,DA850_AFSX , +DA850_AHCLKR ,DA850_ACLKR ,DA850_AFSR ,DA850_AMUTE , +DA850_AXR_11 ,DA850_AXR_12 , +-1 +}; +static int da850_evm_mmc_get_ro (int index) {return gpio_get_value (DA850_MMCSD_WP_PIN );
@@ -1106,7 +1113,7 @@ static __init void da850_evm_init(void)__raw_writel (0 ,IO_ADDRESS (DA8XX_UART1_BASE ) +0x30 );__raw_writel (0 ,IO_ADDRESS (DA8XX_UART0_BASE ) +0x30 ); - ret =davinci_cfg_reg_list (da850_mcasp_pins); + ret =davinci_cfg_reg_list (da850_evm_mcasp_pins);if (ret)pr_warning ("da850_evm_init: mcasp mux setup failed: %d\n" , ret);
arch/arm/mach-davinci/da850.c +0 -7
@@ -577,13 +577,6 @@ const short da850_i2c1_pins[] __initdata = {-1 }; -const short da850_mcasp_pins[]__initdata = { -DA850_AHCLKX ,DA850_ACLKX ,DA850_AFSX , -DA850_AHCLKR ,DA850_ACLKR ,DA850_AFSR ,DA850_AMUTE , -DA850_AXR_11 ,DA850_AXR_12 , --1 -}; -const short da850_lcdcntl_pins[]__initdata = {DA850_LCD_D_0 ,DA850_LCD_D_1 ,DA850_LCD_D_2 ,DA850_LCD_D_3 ,DA850_LCD_D_4 ,DA850_LCD_D_5 ,DA850_LCD_D_6 ,DA850_LCD_D_7 ,
arch/arm/mach-davinci/include/mach/da8xx.h +0 -1
@@ -128,7 +128,6 @@ extern const short da850_uart1_pins[];extern const short da850_uart2_pins[];extern const short da850_i2c0_pins[];extern const short da850_i2c1_pins[]; -extern const short da850_mcasp_pins[];extern const short da850_lcdcntl_pins[];extern const short da850_mmcsd0_pins[];
Signature · 1 line
1.7.0.4
PATCH 4/5 davinci: da850: move da850_evm specific mmcsd pinmux array to board file.
In reply to Michael WilliamsonThe da850_mmcsd0_pins pinmux array contains pins that are specific to the da850 evm board (the write protect and card detect GPIO pins). Move the array to the board file.
--- arch/arm/mach-davinci/board-da850-evm.c | 9 ++++++++- arch/arm/mach-davinci/da850.c | 7 ------- arch/arm/mach-davinci/include/mach/da8xx.h | 1 - 3 files changed, 8 insertions(+), 9 deletions(-)
arch/arm/mach-davinci/board-da850-evm.c +8 -1
@@ -690,6 +690,13 @@ static struct davinci_mmc_config da850_mmc_config = { .version = MMC_CTLR_VERSION_2, }; +static const short da850_evm_mmcsd0_pins[]__initconst = { +DA850_MMCSD0_DAT_0 ,DA850_MMCSD0_DAT_1 ,DA850_MMCSD0_DAT_2 , +DA850_MMCSD0_DAT_3 ,DA850_MMCSD0_CLK ,DA850_MMCSD0_CMD , +DA850_GPIO4_0 ,DA850_GPIO4_1 , +-1 +}; +static void da850_panel_power_ctrl (int val) {/* lcd backlight */
@@ -1077,7 +1084,7 @@ static __init void da850_evm_init(void) ret);if (HAS_MMC ) { - ret =davinci_cfg_reg_list (da850_mmcsd0_pins); + ret =davinci_cfg_reg_list (da850_evm_mmcsd0_pins);if (ret)pr_warning ("da850_evm_init: mmcsd0 mux setup failed:" " %d\n" , ret);
arch/arm/mach-davinci/da850.c +0 -7
@@ -586,13 +586,6 @@ const short da850_lcdcntl_pins[] __initdata = {-1 }; -const short da850_mmcsd0_pins[]__initdata = { -DA850_MMCSD0_DAT_0 ,DA850_MMCSD0_DAT_1 ,DA850_MMCSD0_DAT_2 , -DA850_MMCSD0_DAT_3 ,DA850_MMCSD0_CLK ,DA850_MMCSD0_CMD , -DA850_GPIO4_0 ,DA850_GPIO4_1 , --1 -}; -/* FIQ are pri 0-1; otherwise 2-7, with 7 lowest priority */ static u8 da850_default_priorities[DA850_N_CP_INTC_IRQ ] = { [IRQ_DA8XX_COMMTX ] =7 ,
arch/arm/mach-davinci/include/mach/da8xx.h +0 -1
@@ -129,6 +129,5 @@ extern const short da850_uart2_pins[];extern const short da850_i2c0_pins[];extern const short da850_i2c1_pins[];extern const short da850_lcdcntl_pins[]; -extern const short da850_mmcsd0_pins[];#endif /* __ASM_ARCH_DAVINCI_DA8XX_H */
Signature · 1 line
1.7.0.4
PATCH 5/5 davinci: da850: remove unused uart pinmux arrays.
In reply to Michael WilliamsonThe da850 uart pinmux arrays are not used. Remove them.
--- arch/arm/mach-davinci/da850.c | 15 --------------- arch/arm/mach-davinci/include/mach/da8xx.h | 3 --- 2 files changed, 0 insertions(+), 18 deletions(-)
arch/arm/mach-davinci/da850.c +0 -15
@@ -552,21 +552,6 @@ static const struct mux_config da850_pins[] = {#endif }; -const short da850_uart0_pins[]__initdata = { -DA850_NUART0_CTS ,DA850_NUART0_RTS ,DA850_UART0_RXD ,DA850_UART0_TXD , --1 -}; - -const short da850_uart1_pins[]__initdata = { -DA850_UART1_RXD ,DA850_UART1_TXD , --1 -}; - -const short da850_uart2_pins[]__initdata = { -DA850_UART2_RXD ,DA850_UART2_TXD , --1 -}; -const short da850_i2c0_pins[]__initdata = {DA850_I2C0_SDA ,DA850_I2C0_SCL ,-1
arch/arm/mach-davinci/include/mach/da8xx.h +0 -3
@@ -123,9 +123,6 @@ extern const short da830_ecap2_pins[];extern const short da830_eqep0_pins[];extern const short da830_eqep1_pins[]; -extern const short da850_uart0_pins[]; -extern const short da850_uart1_pins[]; -extern const short da850_uart2_pins[];extern const short da850_i2c0_pins[];extern const short da850_i2c1_pins[];extern const short da850_lcdcntl_pins[];
Signature · 1 line
1.7.0.4
cover davinci: da850: clean up pinmux arrays in da850.c
In reply to Michael WilliamsonHi,
Quoted 23 lines · Michael Williamson
The following patch series is an attempt to clean up unused and platform specific pinmux arrays in the da850 CPU files. This series was developed as a result of the following email thread:
http://www.mail-archive.com/davinci-linux-open-source at linux.davincidsp.com/msg19921.html
This patch is against commit
cda6ca38f96f0719ce3500da856e7d4bf0abbc38of linux-davinci.This series should not be applied until someone with a da850 EVM can please test and confirm the mcasp and mmc interfaces continue to work properly with these patches.
---
changes since v0:
- correct use of __initdata/__initconst attributesMichael Williamson (5):
davinci: da850: remove unused pinmux array
davinci: da850: remove unused emif pinmux array
davinci: da850: moveda850_evmspecific mcasp pins to board file.
davinci: da850: moveda850_evmspecific mmcsd pinmux array to board
file.
davinci: da850: remove unused uart pinmux arrays.
Quoted 5 lines
arch/arm/mach-davinci/board-da850-evm.c | 18 ++++++++- arch/arm/mach-davinci/da850.c | 56 ---------------------------- arch/arm/mach-davinci/include/mach/da8xx.h | 7 --- 3 files changed, 16 insertions(+), 65 deletions(-)
These patches apply cleanly to davinci tree at [1].
The kernel was built using da8xx_omapl_defconfig.
Tested Ethernet (booted using NFS), UART, Audio, MMC/SD and NAND.
For the entire series:
[1] http://git.kernel.org/?p=linux/kernel/git/khilman/linux-davinci.git;a=summary
Thanks,
Sudhakar
cover davinci: da850: clean up pinmux arrays in da850.c
Hi Sudhakar,
Quoted 34 lines · Sudhakar
Hi,
Quoted 23 lines · Michael Williamson
The following patch series is an attempt to clean up unused and platform specific pinmux arrays in the da850 CPU files. This series was developed as a result of the following email thread:
http://www.mail-archive.com/davinci-linux-open-source at linux.davincidsp.com/msg19921.html
This patch is against commit
cda6ca38f96f0719ce3500da856e7d4bf0abbc38of linux-davinci.This series should not be applied until someone with a da850 EVM can please test and confirm the mcasp and mmc interfaces continue to work properly with these patches.
---
changes since v0:
- correct use of __initdata/__initconst attributesMichael Williamson (5):
davinci: da850: remove unused pinmux array
davinci: da850: remove unused emif pinmux array
davinci: da850: moveda850_evmspecific mcasp pins to board file.
davinci: da850: moveda850_evmspecific mmcsd pinmux array to board
file.
davinci: da850: remove unused uart pinmux arrays.Quoted 5 lines
arch/arm/mach-davinci/board-da850-evm.c | 18 ++++++++- arch/arm/mach-davinci/da850.c | 56 ---------------------------- arch/arm/mach-davinci/include/mach/da8xx.h | 7 --- 3 files changed, 16 insertions(+), 65 deletions(-)These patches apply cleanly to davinci tree at [1].
Quoted 8 lines
The kernel was built using
da8xx_omapl_defconfig.Tested Ethernet (booted using NFS), UART, Audio, MMC/SD and NAND.
For the entire series:
[1] http://git.kernel.org/?p=linux/kernel/git/khilman/linux-davinci.git;a=summary
Thanks for testing.
Will add your tested-by and queue for 2.6.39.
Kevin