Message ID | 20130426035210.26065.39995.stgit@muffinssi.local (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, 2013-04-25 at 20:52 -0700, Tony Lindgren wrote: > Without WLAN we cannot switch omap4 to use device tree > only booting. This patch can be reverted when the > binding for wl12xx is added. > > Cc: Luciano Coelho <coelho@ti.com> > Cc: Benoit Cousson <b-cousson@ti.com> > Cc: Rajendra Nayak <rnayak@ti.com> > Cc: devicetree-discuss@lists.ozlabs.org > Signed-off-by: Tony Lindgren <tony@atomide.com> > --- Tested-by: Luciano Coelho <coelho@ti.com>
Op 26 apr. 2013, om 05:52 heeft Tony Lindgren <tony@atomide.com> het volgende geschreven: > Without WLAN we cannot switch omap4 to use device tree > only booting. This patch can be reverted when the > binding for wl12xx is added. How much boards am I allowed to add to this? I need to get the wl12xx wifi expansionboards for beagleboard, beagleboard xM and beaglebone working with DT :) regards, Koen-- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Koen, On Fri, 2013-04-26 at 11:33 +0200, Koen Kooi wrote: > Op 26 apr. 2013, om 05:52 heeft Tony Lindgren <tony@atomide.com> het volgende geschreven: > > > Without WLAN we cannot switch omap4 to use device tree > > only booting. This patch can be reverted when the > > binding for wl12xx is added. > > How much boards am I allowed to add to this? I need to get the wl12xx wifi expansionboards for beagleboard, beagleboard xM and beaglebone working with DT :) Do you know where I can get a wl12xx wifi expansion board for beaglebone?
On Fri, 2013-04-26 at 14:00 +0300, Luciano Coelho wrote: > Hi Koen, > > On Fri, 2013-04-26 at 11:33 +0200, Koen Kooi wrote: > > Op 26 apr. 2013, om 05:52 heeft Tony Lindgren <tony@atomide.com> het volgende geschreven: > > > > > Without WLAN we cannot switch omap4 to use device tree > > > only booting. This patch can be reverted when the > > > binding for wl12xx is added. > > > > How much boards am I allowed to add to this? I need to get the wl12xx wifi expansionboards for beagleboard, beagleboard xM and beaglebone working with DT :) > > Do you know where I can get a wl12xx wifi expansion board for > beaglebone? Uhmmm, never mind. I somehow thought this was with the WiLink 8 chip, but you said wl12xx, so it's not. ;)
* Koen Kooi <koen@dominion.thruhere.net> [130426 02:39]: > > Op 26 apr. 2013, om 05:52 heeft Tony Lindgren <tony@atomide.com> het volgende geschreven: > > > Without WLAN we cannot switch omap4 to use device tree > > only booting. This patch can be reverted when the > > binding for wl12xx is added. > > How much boards am I allowed to add to this? I need to get the wl12xx wifi expansionboards for beagleboard, beagleboard xM and beaglebone working with DT :) As long as it's trivial changes, go for it. It will be gone after we have the binding for wl12xx. But let's not add the bluetooth serial port hack.. And let's not churn the board-*.c files, at this point pretty much the next step is to start dropping the board-*.c files. Regards, Tony -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 73762ac..69c520e 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -15,6 +15,7 @@ #include <linux/io.h> #include <linux/clk.h> #include <linux/err.h> +#include <linux/gpio.h> #include <linux/slab.h> #include <linux/of.h> #include <linux/pinctrl/machine.h> @@ -22,6 +23,7 @@ #include <linux/platform_data/omap_ocp2scp.h> #include <linux/platform_data/mailbox-omap.h> #include <linux/usb/omap_control_usb.h> +#include <linux/wl12xx.h> #include <asm/mach-types.h> #include <asm/mach/map.h> @@ -640,6 +642,40 @@ static void __init omap_init_ocp2scp(void) static inline void omap_init_ocp2scp(void) { } #endif +#if IS_ENABLED(CONFIG_WL12XX) + +static struct wl12xx_platform_data wl12xx __initdata; + +void __init omap_init_wl12xx_of(void) +{ + int ret; + + if (!of_have_populated_dt()) + return; + + if (of_machine_is_compatible("ti,omap4-sdp")) { + wl12xx.board_ref_clock = WL12XX_REFCLOCK_26; + wl12xx.board_tcxo_clock = WL12XX_TCXOCLOCK_26; + wl12xx.irq = gpio_to_irq(53); + } else if (of_machine_is_compatible("ti,omap4-panda")) { + wl12xx.board_ref_clock = WL12XX_REFCLOCK_38; + wl12xx.irq = gpio_to_irq(53); + } else { + return; + } + + ret = wl12xx_set_platform_data(&wl12xx); + if (ret) { + pr_err("error setting wl12xx data: %d\n", ret); + return; + } +} +#else +static inline omap_init_wl12xx_of(void) +{ +} +#endif + /*-------------------------------------------------------------------------*/ static int __init omap2_init_devices(void) @@ -664,6 +700,9 @@ static int __init omap2_init_devices(void) omap_init_mcspi(); omap_init_sham(); omap_init_aes(); + } else { + /* These can be removed when bindings are done */ + omap_init_wl12xx_of(); } omap_init_sti(); omap_init_rng();
Without WLAN we cannot switch omap4 to use device tree only booting. This patch can be reverted when the binding for wl12xx is added. Cc: Luciano Coelho <coelho@ti.com> Cc: Benoit Cousson <b-cousson@ti.com> Cc: Rajendra Nayak <rnayak@ti.com> Cc: devicetree-discuss@lists.ozlabs.org Signed-off-by: Tony Lindgren <tony@atomide.com> --- arch/arm/mach-omap2/devices.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html