From 4a2c3c659f0df978f039289361de5d648b403d32 Mon Sep 17 00:00:00 2001
From: Yegor Yefremov <yegorslists@googlemail.com>
Date: Mon, 14 Apr 2014 11:03:31 +0200
Subject: [PATCH] Add wl127x platform data for Baltos

---
 arch/arm/mach-omap2/pdata-quirks.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index cec9d6c..b25082a 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -35,7 +35,7 @@ struct pdata_init {
 struct of_dev_auxdata omap_auxdata_lookup[];
 static struct twl4030_gpio_platform_data twl_gpio_auxdata;
 
-#if IS_ENABLED(CONFIG_WL12XX)
+#if IS_ENABLED(CONFIG_WL12XX) || IS_ENABLED(CONFIG_WL18XX)
 
 static struct wl12xx_platform_data wl12xx __initdata;
 
@@ -286,11 +286,17 @@ static struct iommu_platform_data omap4_iommu_pdata = {
 };
 #endif
 
+#define GPIO_TO_PIN(bank, gpio) (32 * (bank) + (gpio))
+
 #ifdef CONFIG_SOC_AM33XX
 static void __init am335x_evmsk_legacy_init(void)
 {
 	legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 31);
 }
+static void __init onrisc_legacy_init(void)
+{
+	legacy_init_wl12xx(0, 0, GPIO_TO_PIN(3, 7));
+}
 #endif
 
 #ifdef CONFIG_SOC_OMAP5
@@ -404,6 +410,7 @@ static struct pdata_init pdata_quirks[] __initdata = {
 #endif
 #ifdef CONFIG_SOC_AM33XX
 	{ "ti,am335x-evmsk", am335x_evmsk_legacy_init, },
+	{ "vscom,onrisc", onrisc_legacy_init, },
 #endif
 #ifdef CONFIG_SOC_OMAP5
 	{ "ti,omap5-uevm", omap5_uevm_legacy_init, },
-- 
1.7.7

