>From 4055d12d73d305c9fa68ab09019f2dacb240f6e9 Mon Sep 17 00:00:00 2001 From: Jonathan DE CESCO <[email protected]> Date: Thu, 4 Nov 2010 17:12:44 +0100 Subject: [PATCH] Enable TI Wl12xx BT Initialization in Medfield init file
---
arch/x86/kernel/mrst.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 44 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/mrst.c b/arch/x86/kernel/mrst.c
index dce79e2..11cadc5 100644
--- a/arch/x86/kernel/mrst.c
+++ b/arch/x86/kernel/mrst.c
@@ -1645,4 +1645,48 @@ static int __init setup_hsu_dma_enable_flag(char *p)
}
early_param("hsu_dma", setup_hsu_dma_enable_flag);
+#if defined (CONFIG_TI_ST) || defined (CONFIG_TI_ST_MODULE)
+
+static int btfm_gpios[] = {
+ -1, /* BT */
+ -1, /* FM */
+ -1
+};
+
+static struct platform_device linux_btfm_device = {
+ .name = "kim", /* named after init manager for ST */
+ .id = -1,
+ .dev.platform_data = &btfm_gpios,
+};
+
+
+static int __init btfm_init(void)
+{
+ int retval = 0;
+ int bt_enable;
+
+ /*
+ * Shared transport (BT and FM)
+ */
+
+ /* Get the GPIO number from the SFI table */
+ bt_enable = get_gpio_by_name("BT-reset"); /*Name as defined in the SFI
table*/
+ if (bt_enable == -1)
+ {
+ printk(KERN_ERR "%s: Unable to find BT-reset GPIO in the SFI table\n",
__func__);
+ retval = -EIO;
+ goto out;
+ }
+
+ /* Set the GPIO number in the platform structure */
+ ((int *)(linux_btfm_device.dev.platform_data))[0] = bt_enable;
+
+ retval = platform_device_register(&linux_btfm_device);
+ printk(KERN_INFO "%s: BT-init with BT_EN:%d\n", __func__, bt_enable);
+out:
+ return retval;
+}
+device_initcall(btfm_init);
+
+#endif
--
1.6.2.5
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris,
92196 Meudon Cedex, France
Registration Number: 302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
0031-Enable-TI-Wl12xx-BT-Initialization-in-Medfield-init.patch
Description: 0031-Enable-TI-Wl12xx-BT-Initialization-in-Medfield-init.patch
_______________________________________________ MeeGo-kernel mailing list [email protected] http://lists.meego.com/listinfo/meego-kernel
