aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorLuciano Coelho <luca@coelho.fi>2015-03-18 12:38:26 -0400
committerTony Lindgren <tony@atomide.com>2015-03-24 12:47:57 -0400
commit44486b48b066330e0ed0a66478cc49f5975ec6c1 (patch)
tree9961c30c1a665a3dbba3e738072b8077c284f141 /arch/arm
parent6f921fab5844941f7605b7f1a265f5fc7fe969a7 (diff)
wl12xx: use frequency instead of enumerations for pdata clocks
Instead of defining an enumeration with the FW specific values for the different clock rates, use the actual frequency instead. Also add a boolean to specify whether the clock is XTAL or not. Change all board files to reflect this. Signed-off-by: Luciano Coelho <luca@coelho.fi> [Eliad - small fixes, update board file changes] Signed-off-by: Eliad Peller <eliad@wizery.com> Tested-by: Nikita Kiryanov <nikita@compulab.co.il> Acked-by: Kalle Valo <kvalo@codeaurora.org> Acked-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-davinci/board-da850-evm.c3
-rw-r--r--arch/arm/mach-omap2/pdata-quirks.c29
2 files changed, 16 insertions, 16 deletions
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index 916589ca8d44..853b941b710e 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -1386,7 +1386,8 @@ static const short da850_wl12xx_pins[] __initconst = {
1386static struct wl12xx_platform_data da850_wl12xx_wlan_data __initdata = { 1386static struct wl12xx_platform_data da850_wl12xx_wlan_data __initdata = {
1387 .irq = -1, 1387 .irq = -1,
1388 .irq_trigger = IRQ_TYPE_EDGE_RISING, 1388 .irq_trigger = IRQ_TYPE_EDGE_RISING,
1389 .board_ref_clock = WL12XX_REFCLOCK_38, 1389 .ref_clock_freq = 38400000,
1390 .ref_clock_xtal = false,
1390}; 1391};
1391 1392
1392static __init int da850_wl12xx_init(void) 1393static __init int da850_wl12xx_init(void)
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index e86fb0d55c59..cebdf8d0dc08 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -39,14 +39,14 @@ static struct twl4030_gpio_platform_data twl_gpio_auxdata;
39 39
40static struct wl12xx_platform_data wl12xx __initdata; 40static struct wl12xx_platform_data wl12xx __initdata;
41 41
42static void __init __used legacy_init_wl12xx(unsigned ref_clock, 42static void __init __used legacy_init_wl12xx(u32 ref_clock_freq,
43 unsigned tcxo_clock, 43 u32 tcxo_clock_freq,
44 int gpio) 44 int gpio)
45{ 45{
46 int res; 46 int res;
47 47
48 wl12xx.board_ref_clock = ref_clock; 48 wl12xx.ref_clock_freq = ref_clock_freq;
49 wl12xx.board_tcxo_clock = tcxo_clock; 49 wl12xx.tcxo_clock_freq = tcxo_clock_freq;
50 wl12xx.irq = gpio_to_irq(gpio); 50 wl12xx.irq = gpio_to_irq(gpio);
51 wl12xx.irq_trigger = IRQ_TYPE_LEVEL_HIGH; 51 wl12xx.irq_trigger = IRQ_TYPE_LEVEL_HIGH;
52 52
@@ -57,8 +57,8 @@ static void __init __used legacy_init_wl12xx(unsigned ref_clock,
57 } 57 }
58} 58}
59#else 59#else
60static inline void legacy_init_wl12xx(unsigned ref_clock, 60static inline void legacy_init_wl12xx(u32 ref_clock_freq,
61 unsigned tcxo_clock, 61 u32 tcxo_clock_freq,
62 int gpio) 62 int gpio)
63{ 63{
64} 64}
@@ -130,7 +130,7 @@ static void __init omap3_sbc_t3730_twl_init(void)
130static void __init omap3_sbc_t3730_legacy_init(void) 130static void __init omap3_sbc_t3730_legacy_init(void)
131{ 131{
132 omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub"); 132 omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub");
133 legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 136); 133 legacy_init_wl12xx(38400000, 0, 136);
134} 134}
135 135
136static void __init omap3_sbc_t3530_legacy_init(void) 136static void __init omap3_sbc_t3530_legacy_init(void)
@@ -175,12 +175,12 @@ static void __init omap3_igep0030_rev_g_legacy_init(void)
175static void __init omap3_evm_legacy_init(void) 175static void __init omap3_evm_legacy_init(void)
176{ 176{
177 hsmmc2_internal_input_clk(); 177 hsmmc2_internal_input_clk();
178 legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 149); 178 legacy_init_wl12xx(38400000, 0, 149);
179} 179}
180 180
181static void __init omap3_zoom_legacy_init(void) 181static void __init omap3_zoom_legacy_init(void)
182{ 182{
183 legacy_init_wl12xx(WL12XX_REFCLOCK_26, 0, 162); 183 legacy_init_wl12xx(26000000, 0, 162);
184} 184}
185 185
186static void am35xx_enable_emac_int(void) 186static void am35xx_enable_emac_int(void)
@@ -247,7 +247,7 @@ static void __init omap3_sbc_t3517_legacy_init(void)
247 am35xx_emac_reset(); 247 am35xx_emac_reset();
248 hsmmc2_internal_input_clk(); 248 hsmmc2_internal_input_clk();
249 omap3_sbc_t3517_wifi_init(); 249 omap3_sbc_t3517_wifi_init();
250 legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 145); 250 legacy_init_wl12xx(38400000, 0, 145);
251} 251}
252 252
253static void __init am3517_evm_legacy_init(void) 253static void __init am3517_evm_legacy_init(void)
@@ -292,18 +292,17 @@ static void __init omap3_tao3530_legacy_init(void)
292#ifdef CONFIG_ARCH_OMAP4 292#ifdef CONFIG_ARCH_OMAP4
293static void __init omap4_sdp_legacy_init(void) 293static void __init omap4_sdp_legacy_init(void)
294{ 294{
295 legacy_init_wl12xx(WL12XX_REFCLOCK_26, 295 legacy_init_wl12xx(26000000, 26000000, 53);
296 WL12XX_TCXOCLOCK_26, 53);
297} 296}
298 297
299static void __init omap4_panda_legacy_init(void) 298static void __init omap4_panda_legacy_init(void)
300{ 299{
301 legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 53); 300 legacy_init_wl12xx(38400000, 0, 53);
302} 301}
303 302
304static void __init var_som_om44_legacy_init(void) 303static void __init var_som_om44_legacy_init(void)
305{ 304{
306 legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 41); 305 legacy_init_wl12xx(38400000, 0, 41);
307} 306}
308#endif 307#endif
309 308
@@ -318,7 +317,7 @@ static struct iommu_platform_data omap4_iommu_pdata = {
318#ifdef CONFIG_SOC_AM33XX 317#ifdef CONFIG_SOC_AM33XX
319static void __init am335x_evmsk_legacy_init(void) 318static void __init am335x_evmsk_legacy_init(void)
320{ 319{
321 legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 31); 320 legacy_init_wl12xx(38400000, 0, 31);
322} 321}
323#endif 322#endif
324 323