aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-davinci/board-da830-evm.c14
-rw-r--r--arch/arm/mach-davinci/board-da850-evm.c18
-rw-r--r--arch/arm/mach-davinci/include/mach/da8xx.h6
-rw-r--r--arch/arm/mach-davinci/include/mach/mux.h5
-rw-r--r--arch/arm/mach-davinci/mux.c3
5 files changed, 22 insertions, 24 deletions
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
index db5ac0f3788e..925705649ed0 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -157,7 +157,7 @@ static __init void da830_evm_usb_init(void)
157 __func__, ret); 157 __func__, ret);
158 } 158 }
159 159
160 ret = da8xx_pinmux_setup(da830_evm_usb11_pins); 160 ret = davinci_cfg_reg_list(da830_evm_usb11_pins);
161 if (ret) { 161 if (ret) {
162 pr_warning("%s: USB 1.1 PinMux setup failed: %d\n", 162 pr_warning("%s: USB 1.1 PinMux setup failed: %d\n",
163 __func__, ret); 163 __func__, ret);
@@ -254,7 +254,7 @@ static inline void da830_evm_init_mmc(void)
254{ 254{
255 int ret; 255 int ret;
256 256
257 ret = da8xx_pinmux_setup(da830_evm_mmc_sd_pins); 257 ret = davinci_cfg_reg_list(da830_evm_mmc_sd_pins);
258 if (ret) { 258 if (ret) {
259 pr_warning("da830_evm_init: mmc/sd mux setup failed: %d\n", 259 pr_warning("da830_evm_init: mmc/sd mux setup failed: %d\n",
260 ret); 260 ret);
@@ -407,7 +407,7 @@ static inline void da830_evm_init_nand(int mux_mode)
407 return; 407 return;
408 } 408 }
409 409
410 ret = da8xx_pinmux_setup(da830_evm_emif25_pins); 410 ret = davinci_cfg_reg_list(da830_evm_emif25_pins);
411 if (ret) 411 if (ret)
412 pr_warning("da830_evm_init: emif25 mux setup failed: %d\n", 412 pr_warning("da830_evm_init: emif25 mux setup failed: %d\n",
413 ret); 413 ret);
@@ -427,7 +427,7 @@ static inline void da830_evm_init_lcdc(int mux_mode)
427{ 427{
428 int ret; 428 int ret;
429 429
430 ret = da8xx_pinmux_setup(da830_lcdcntl_pins); 430 ret = davinci_cfg_reg_list(da830_lcdcntl_pins);
431 if (ret) 431 if (ret)
432 pr_warning("da830_evm_init: lcdcntl mux setup failed: %d\n", 432 pr_warning("da830_evm_init: lcdcntl mux setup failed: %d\n",
433 ret); 433 ret);
@@ -507,7 +507,7 @@ static __init void da830_evm_init(void)
507 pr_warning("da830_evm_init: edma registration failed: %d\n", 507 pr_warning("da830_evm_init: edma registration failed: %d\n",
508 ret); 508 ret);
509 509
510 ret = da8xx_pinmux_setup(da830_i2c0_pins); 510 ret = davinci_cfg_reg_list(da830_i2c0_pins);
511 if (ret) 511 if (ret)
512 pr_warning("da830_evm_init: i2c0 mux setup failed: %d\n", 512 pr_warning("da830_evm_init: i2c0 mux setup failed: %d\n",
513 ret); 513 ret);
@@ -523,7 +523,7 @@ static __init void da830_evm_init(void)
523 soc_info->emac_pdata->mdio_max_freq = DA830_EVM_MDIO_FREQUENCY; 523 soc_info->emac_pdata->mdio_max_freq = DA830_EVM_MDIO_FREQUENCY;
524 soc_info->emac_pdata->rmii_en = 1; 524 soc_info->emac_pdata->rmii_en = 1;
525 525
526 ret = da8xx_pinmux_setup(da830_cpgmac_pins); 526 ret = davinci_cfg_reg_list(da830_cpgmac_pins);
527 if (ret) 527 if (ret)
528 pr_warning("da830_evm_init: cpgmac mux setup failed: %d\n", 528 pr_warning("da830_evm_init: cpgmac mux setup failed: %d\n",
529 ret); 529 ret);
@@ -542,7 +542,7 @@ static __init void da830_evm_init(void)
542 i2c_register_board_info(1, da830_evm_i2c_devices, 542 i2c_register_board_info(1, da830_evm_i2c_devices,
543 ARRAY_SIZE(da830_evm_i2c_devices)); 543 ARRAY_SIZE(da830_evm_i2c_devices));
544 544
545 ret = da8xx_pinmux_setup(da830_evm_mcasp1_pins); 545 ret = davinci_cfg_reg_list(da830_evm_mcasp1_pins);
546 if (ret) 546 if (ret)
547 pr_warning("da830_evm_init: mcasp1 mux setup failed: %d\n", 547 pr_warning("da830_evm_init: mcasp1 mux setup failed: %d\n",
548 ret); 548 ret);
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index ef691ae5e67a..6c137e0492ff 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -206,12 +206,12 @@ static __init void da850_evm_setup_nor_nand(void)
206 int ret = 0; 206 int ret = 0;
207 207
208 if (ui_card_detected & !HAS_MMC) { 208 if (ui_card_detected & !HAS_MMC) {
209 ret = da8xx_pinmux_setup(da850_nand_pins); 209 ret = davinci_cfg_reg_list(da850_nand_pins);
210 if (ret) 210 if (ret)
211 pr_warning("da850_evm_init: nand mux setup failed: " 211 pr_warning("da850_evm_init: nand mux setup failed: "
212 "%d\n", ret); 212 "%d\n", ret);
213 213
214 ret = da8xx_pinmux_setup(da850_nor_pins); 214 ret = davinci_cfg_reg_list(da850_nor_pins);
215 if (ret) 215 if (ret)
216 pr_warning("da850_evm_init: nor mux setup failed: %d\n", 216 pr_warning("da850_evm_init: nor mux setup failed: %d\n",
217 ret); 217 ret);
@@ -568,12 +568,12 @@ static int __init da850_evm_config_emac(void)
568 568
569 if (rmii_en) { 569 if (rmii_en) {
570 val |= BIT(8); 570 val |= BIT(8);
571 ret = da8xx_pinmux_setup(da850_rmii_pins); 571 ret = davinci_cfg_reg_list(da850_rmii_pins);
572 pr_info("EMAC: RMII PHY configured, MII PHY will not be" 572 pr_info("EMAC: RMII PHY configured, MII PHY will not be"
573 " functional\n"); 573 " functional\n");
574 } else { 574 } else {
575 val &= ~BIT(8); 575 val &= ~BIT(8);
576 ret = da8xx_pinmux_setup(da850_cpgmac_pins); 576 ret = davinci_cfg_reg_list(da850_cpgmac_pins);
577 pr_info("EMAC: MII PHY configured, RMII PHY will not be" 577 pr_info("EMAC: MII PHY configured, RMII PHY will not be"
578 " functional\n"); 578 " functional\n");
579 } 579 }
@@ -626,7 +626,7 @@ static __init void da850_evm_init(void)
626 pr_warning("da850_evm_init: edma registration failed: %d\n", 626 pr_warning("da850_evm_init: edma registration failed: %d\n",
627 ret); 627 ret);
628 628
629 ret = da8xx_pinmux_setup(da850_i2c0_pins); 629 ret = davinci_cfg_reg_list(da850_i2c0_pins);
630 if (ret) 630 if (ret)
631 pr_warning("da850_evm_init: i2c0 mux setup failed: %d\n", 631 pr_warning("da850_evm_init: i2c0 mux setup failed: %d\n",
632 ret); 632 ret);
@@ -643,7 +643,7 @@ static __init void da850_evm_init(void)
643 ret); 643 ret);
644 644
645 if (HAS_MMC) { 645 if (HAS_MMC) {
646 ret = da8xx_pinmux_setup(da850_mmcsd0_pins); 646 ret = davinci_cfg_reg_list(da850_mmcsd0_pins);
647 if (ret) 647 if (ret)
648 pr_warning("da850_evm_init: mmcsd0 mux setup failed:" 648 pr_warning("da850_evm_init: mmcsd0 mux setup failed:"
649 " %d\n", ret); 649 " %d\n", ret);
@@ -679,20 +679,20 @@ static __init void da850_evm_init(void)
679 __raw_writel(0, IO_ADDRESS(DA8XX_UART1_BASE) + 0x30); 679 __raw_writel(0, IO_ADDRESS(DA8XX_UART1_BASE) + 0x30);
680 __raw_writel(0, IO_ADDRESS(DA8XX_UART0_BASE) + 0x30); 680 __raw_writel(0, IO_ADDRESS(DA8XX_UART0_BASE) + 0x30);
681 681
682 ret = da8xx_pinmux_setup(da850_mcasp_pins); 682 ret = davinci_cfg_reg_list(da850_mcasp_pins);
683 if (ret) 683 if (ret)
684 pr_warning("da850_evm_init: mcasp mux setup failed: %d\n", 684 pr_warning("da850_evm_init: mcasp mux setup failed: %d\n",
685 ret); 685 ret);
686 686
687 da8xx_register_mcasp(0, &da850_evm_snd_data); 687 da8xx_register_mcasp(0, &da850_evm_snd_data);
688 688
689 ret = da8xx_pinmux_setup(da850_lcdcntl_pins); 689 ret = davinci_cfg_reg_list(da850_lcdcntl_pins);
690 if (ret) 690 if (ret)
691 pr_warning("da850_evm_init: lcdcntl mux setup failed: %d\n", 691 pr_warning("da850_evm_init: lcdcntl mux setup failed: %d\n",
692 ret); 692 ret);
693 693
694 /* Handle board specific muxing for LCD here */ 694 /* Handle board specific muxing for LCD here */
695 ret = da8xx_pinmux_setup(da850_evm_lcdc_pins); 695 ret = davinci_cfg_reg_list(da850_evm_lcdc_pins);
696 if (ret) 696 if (ret)
697 pr_warning("da850_evm_init: evm specific lcd mux setup " 697 pr_warning("da850_evm_init: evm specific lcd mux setup "
698 "failed: %d\n", ret); 698 "failed: %d\n", ret);
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h
index 03acfd39042b..33471c9cbca3 100644
--- a/arch/arm/mach-davinci/include/mach/da8xx.h
+++ b/arch/arm/mach-davinci/include/mach/da8xx.h
@@ -146,10 +146,4 @@ extern const short da850_mmcsd0_pins[];
146extern const short da850_nand_pins[]; 146extern const short da850_nand_pins[];
147extern const short da850_nor_pins[]; 147extern const short da850_nor_pins[];
148 148
149#ifdef CONFIG_DAVINCI_MUX
150int da8xx_pinmux_setup(const short pins[]);
151#else
152static inline int da8xx_pinmux_setup(const short pins[]) { return 0; }
153#endif
154
155#endif /* __ASM_ARCH_DAVINCI_DA8XX_H */ 149#endif /* __ASM_ARCH_DAVINCI_DA8XX_H */
diff --git a/arch/arm/mach-davinci/include/mach/mux.h b/arch/arm/mach-davinci/include/mach/mux.h
index 2a68c1d8a24b..48888db00fad 100644
--- a/arch/arm/mach-davinci/include/mach/mux.h
+++ b/arch/arm/mach-davinci/include/mach/mux.h
@@ -907,9 +907,14 @@ enum davinci_da850_index {
907#ifdef CONFIG_DAVINCI_MUX 907#ifdef CONFIG_DAVINCI_MUX
908/* setup pin muxing */ 908/* setup pin muxing */
909extern int davinci_cfg_reg(unsigned long reg_cfg); 909extern int davinci_cfg_reg(unsigned long reg_cfg);
910extern int davinci_cfg_reg_list(const short pins[]);
910#else 911#else
911/* boot loader does it all (no warnings from CONFIG_DAVINCI_MUX_WARNINGS) */ 912/* boot loader does it all (no warnings from CONFIG_DAVINCI_MUX_WARNINGS) */
912static inline int davinci_cfg_reg(unsigned long reg_cfg) { return 0; } 913static inline int davinci_cfg_reg(unsigned long reg_cfg) { return 0; }
914static inline int davinci_cfg_reg_list(const short pins[])
915{
916 return 0;
917}
913#endif 918#endif
914 919
915#endif /* __INC_MACH_MUX_H */ 920#endif /* __INC_MACH_MUX_H */
diff --git a/arch/arm/mach-davinci/mux.c b/arch/arm/mach-davinci/mux.c
index c942c893a2eb..e9d530a8f79f 100644
--- a/arch/arm/mach-davinci/mux.c
+++ b/arch/arm/mach-davinci/mux.c
@@ -21,7 +21,6 @@
21 21
22#include <mach/mux.h> 22#include <mach/mux.h>
23#include <mach/common.h> 23#include <mach/common.h>
24#include <mach/da8xx.h>
25 24
26/* 25/*
27 * Sets the DAVINCI MUX register based on the table 26 * Sets the DAVINCI MUX register based on the table
@@ -92,7 +91,7 @@ int __init_or_module davinci_cfg_reg(const unsigned long index)
92} 91}
93EXPORT_SYMBOL(davinci_cfg_reg); 92EXPORT_SYMBOL(davinci_cfg_reg);
94 93
95int da8xx_pinmux_setup(const short pins[]) 94int __init_or_module davinci_cfg_reg_list(const short pins[])
96{ 95{
97 int i, error = -EINVAL; 96 int i, error = -EINVAL;
98 97