diff options
author | Sudhakar Rajashekhara <sudhakar.raj@ti.com> | 2009-07-16 05:45:32 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-08-26 03:57:02 -0400 |
commit | c96b56c53fb76c540a1a8103c7594859db4351dd (patch) | |
tree | 45495df6f3b0c460d7745a62575f67c5b09f8c75 /arch/arm/mach-davinci | |
parent | 2259bbd460c5c15567e2e311d0ab0fe763b40031 (diff) |
davinci: Rearrange the da830/omap-l137 macros and functions
Rearrange the PINMUX macros and pinmux_setup function which
are common between da830/omap-l137 and da850/omap-l138.
Also, replace the da830 string in function names to da8xx.
Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci')
-rw-r--r-- | arch/arm/mach-davinci/board-da830-evm.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-davinci/da830.c | 35 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/da8xx.h | 23 | ||||
-rw-r--r-- | arch/arm/mach-davinci/mux.c | 14 |
4 files changed, 38 insertions, 38 deletions
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index 9185a706d14c..90256693b8d8 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c | |||
@@ -61,7 +61,7 @@ static __init void da830_evm_init(void) | |||
61 | pr_warning("da830_evm_init: edma registration failed: %d\n", | 61 | pr_warning("da830_evm_init: edma registration failed: %d\n", |
62 | ret); | 62 | ret); |
63 | 63 | ||
64 | ret = da830_pinmux_setup(da830_i2c0_pins); | 64 | ret = da8xx_pinmux_setup(da830_i2c0_pins); |
65 | if (ret) | 65 | if (ret) |
66 | pr_warning("da830_evm_init: i2c0 mux setup failed: %d\n", | 66 | pr_warning("da830_evm_init: i2c0 mux setup failed: %d\n", |
67 | ret); | 67 | ret); |
@@ -75,7 +75,7 @@ static __init void da830_evm_init(void) | |||
75 | soc_info->emac_pdata->mdio_max_freq = DA830_EVM_MDIO_FREQUENCY; | 75 | soc_info->emac_pdata->mdio_max_freq = DA830_EVM_MDIO_FREQUENCY; |
76 | soc_info->emac_pdata->rmii_en = 1; | 76 | soc_info->emac_pdata->rmii_en = 1; |
77 | 77 | ||
78 | ret = da830_pinmux_setup(da830_cpgmac_pins); | 78 | ret = da8xx_pinmux_setup(da830_cpgmac_pins); |
79 | if (ret) | 79 | if (ret) |
80 | pr_warning("da830_evm_init: cpgmac mux setup failed: %d\n", | 80 | pr_warning("da830_evm_init: cpgmac mux setup failed: %d\n", |
81 | ret); | 81 | ret); |
diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c index 999f69c9372b..3a9b6346c310 100644 --- a/arch/arm/mach-davinci/da830.c +++ b/arch/arm/mach-davinci/da830.c | |||
@@ -428,27 +428,6 @@ static struct davinci_clk da830_clks[] = { | |||
428 | CLK(NULL, NULL, NULL), | 428 | CLK(NULL, NULL, NULL), |
429 | }; | 429 | }; |
430 | 430 | ||
431 | #define PINMUX0 0x00 | ||
432 | #define PINMUX1 0x04 | ||
433 | #define PINMUX2 0x08 | ||
434 | #define PINMUX3 0x0c | ||
435 | #define PINMUX4 0x10 | ||
436 | #define PINMUX5 0x14 | ||
437 | #define PINMUX6 0x18 | ||
438 | #define PINMUX7 0x1c | ||
439 | #define PINMUX8 0x20 | ||
440 | #define PINMUX9 0x24 | ||
441 | #define PINMUX10 0x28 | ||
442 | #define PINMUX11 0x2c | ||
443 | #define PINMUX12 0x30 | ||
444 | #define PINMUX13 0x34 | ||
445 | #define PINMUX14 0x38 | ||
446 | #define PINMUX15 0x3c | ||
447 | #define PINMUX16 0x40 | ||
448 | #define PINMUX17 0x44 | ||
449 | #define PINMUX18 0x48 | ||
450 | #define PINMUX19 0x4c | ||
451 | |||
452 | /* | 431 | /* |
453 | * Device specific mux setup | 432 | * Device specific mux setup |
454 | * | 433 | * |
@@ -1036,20 +1015,6 @@ const short da830_eqep1_pins[] __initdata = { | |||
1036 | -1 | 1015 | -1 |
1037 | }; | 1016 | }; |
1038 | 1017 | ||
1039 | int da830_pinmux_setup(const short pins[]) | ||
1040 | { | ||
1041 | int i, error = -EINVAL; | ||
1042 | |||
1043 | if (pins) | ||
1044 | for (i = 0; pins[i] >= 0; i++) { | ||
1045 | error = davinci_cfg_reg(pins[i]); | ||
1046 | if (error) | ||
1047 | break; | ||
1048 | } | ||
1049 | |||
1050 | return error; | ||
1051 | } | ||
1052 | |||
1053 | /* FIQ are pri 0-1; otherwise 2-7, with 7 lowest priority */ | 1018 | /* FIQ are pri 0-1; otherwise 2-7, with 7 lowest priority */ |
1054 | static u8 da830_default_priorities[DA830_N_CP_INTC_IRQ] = { | 1019 | static u8 da830_default_priorities[DA830_N_CP_INTC_IRQ] = { |
1055 | [IRQ_DA8XX_COMMTX] = 7, | 1020 | [IRQ_DA8XX_COMMTX] = 7, |
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h index 65b42431ddec..8c8dc135472c 100644 --- a/arch/arm/mach-davinci/include/mach/da8xx.h +++ b/arch/arm/mach-davinci/include/mach/da8xx.h | |||
@@ -37,6 +37,27 @@ | |||
37 | #define DA8XX_GPIO_BASE 0x01e26000 | 37 | #define DA8XX_GPIO_BASE 0x01e26000 |
38 | #define DA8XX_PSC1_BASE 0x01e27000 | 38 | #define DA8XX_PSC1_BASE 0x01e27000 |
39 | 39 | ||
40 | #define PINMUX0 0x00 | ||
41 | #define PINMUX1 0x04 | ||
42 | #define PINMUX2 0x08 | ||
43 | #define PINMUX3 0x0c | ||
44 | #define PINMUX4 0x10 | ||
45 | #define PINMUX5 0x14 | ||
46 | #define PINMUX6 0x18 | ||
47 | #define PINMUX7 0x1c | ||
48 | #define PINMUX8 0x20 | ||
49 | #define PINMUX9 0x24 | ||
50 | #define PINMUX10 0x28 | ||
51 | #define PINMUX11 0x2c | ||
52 | #define PINMUX12 0x30 | ||
53 | #define PINMUX13 0x34 | ||
54 | #define PINMUX14 0x38 | ||
55 | #define PINMUX15 0x3c | ||
56 | #define PINMUX16 0x40 | ||
57 | #define PINMUX17 0x44 | ||
58 | #define PINMUX18 0x48 | ||
59 | #define PINMUX19 0x4c | ||
60 | |||
40 | void __init da830_init(void); | 61 | void __init da830_init(void); |
41 | 62 | ||
42 | int da8xx_register_edma(void); | 63 | int da8xx_register_edma(void); |
@@ -72,6 +93,6 @@ extern const short da830_ecap2_pins[]; | |||
72 | extern const short da830_eqep0_pins[]; | 93 | extern const short da830_eqep0_pins[]; |
73 | extern const short da830_eqep1_pins[]; | 94 | extern const short da830_eqep1_pins[]; |
74 | 95 | ||
75 | int da830_pinmux_setup(const short pins[]); | 96 | int da8xx_pinmux_setup(const short pins[]); |
76 | 97 | ||
77 | #endif /* __ASM_ARCH_DAVINCI_DA8XX_H */ | 98 | #endif /* __ASM_ARCH_DAVINCI_DA8XX_H */ |
diff --git a/arch/arm/mach-davinci/mux.c b/arch/arm/mach-davinci/mux.c index d310f579aa85..898905e48946 100644 --- a/arch/arm/mach-davinci/mux.c +++ b/arch/arm/mach-davinci/mux.c | |||
@@ -91,3 +91,17 @@ int __init_or_module davinci_cfg_reg(const unsigned long index) | |||
91 | return 0; | 91 | return 0; |
92 | } | 92 | } |
93 | EXPORT_SYMBOL(davinci_cfg_reg); | 93 | EXPORT_SYMBOL(davinci_cfg_reg); |
94 | |||
95 | int da8xx_pinmux_setup(const short pins[]) | ||
96 | { | ||
97 | int i, error = -EINVAL; | ||
98 | |||
99 | if (pins) | ||
100 | for (i = 0; pins[i] >= 0; i++) { | ||
101 | error = davinci_cfg_reg(pins[i]); | ||
102 | if (error) | ||
103 | break; | ||
104 | } | ||
105 | |||
106 | return error; | ||
107 | } | ||