1 Index: linux-2.6.21.7/net/bluetooth/Kconfig
2 ===================================================================
3 --- linux-2.6.21.7.orig/net/bluetooth/Kconfig
4 +++ linux-2.6.21.7/net/bluetooth/Kconfig
5 @@ -30,6 +30,12 @@ menuconfig BT
6 Bluetooth kernel modules are provided in the BlueZ packages.
7 For more information, see <http://www.bluez.org/>.
13 + depends on BT && ARCH_GUMSTIX
16 tristate "L2CAP protocol support"
18 Index: linux-2.6.21.7/net/bluetooth/Makefile
19 ===================================================================
20 --- linux-2.6.21.7.orig/net/bluetooth/Makefile
21 +++ linux-2.6.21.7/net/bluetooth/Makefile
22 @@ -9,5 +9,6 @@ obj-$(CONFIG_BT_RFCOMM) += rfcomm/
23 obj-$(CONFIG_BT_BNEP) += bnep/
24 obj-$(CONFIG_BT_CMTP) += cmtp/
25 obj-$(CONFIG_BT_HIDP) += hidp/
26 +obj-$(CONFIG_BT_GUMSTIX)+= gumstix_bluetooth.o
28 bluetooth-objs := af_bluetooth.o hci_core.o hci_conn.o hci_event.o hci_sock.o hci_sysfs.o lib.o
29 Index: linux-2.6.21.7/net/bluetooth/af_bluetooth.c
30 ===================================================================
31 --- linux-2.6.21.7.orig/net/bluetooth/af_bluetooth.c
32 +++ linux-2.6.21.7/net/bluetooth/af_bluetooth.c
33 @@ -327,12 +327,20 @@ static struct net_proto_family bt_sock_f
34 .create = bt_sock_create,
37 +#ifdef CONFIG_ARCH_GUMSTIX
38 +extern void gumstix_bluetooth_load(void);
41 static int __init bt_init(void)
45 BT_INFO("Core ver %s", VERSION);
47 +#ifdef CONFIG_ARCH_GUMSTIX
48 + gumstix_bluetooth_load();
51 err = bt_sysfs_init();
54 Index: linux-2.6.21.7/net/bluetooth/gumstix_bluetooth.c
55 ===================================================================
57 +++ linux-2.6.21.7/net/bluetooth/gumstix_bluetooth.c
60 + * Gumstix bluetooth module intialization driver
62 + * Author: Craig Hughes
63 + * Created: December 9, 2004
64 + * Copyright: (C) 2004 Craig Hughes
66 + * This program is free software; you can redistribute it and/or modify
67 + * it under the terms of the GNU General Public License as published by
68 + * the Free Software Foundation; either version 2 of the License, or
69 + * (at your option) any later version.
73 +#include <linux/module.h>
75 +#include <asm/hardware.h>
76 +#include <asm/arch/pxa-regs.h>
77 +#include <asm/delay.h>
79 +#include <asm/arch/gumstix.h>
81 +static void gumstix_bluetooth_load(void)
85 +EXPORT_SYMBOL(gumstix_bluetooth_load);
87 +int __init gumstix_bluetooth_init(void)
89 + /* Set up GPIOs to use the BTUART */
90 + pxa_gpio_mode(GPIO42_HWRXD_MD);
91 + pxa_gpio_mode(GPIO43_HWTXD_MD);
92 + pxa_gpio_mode(GPIO44_HWCTS_MD);
93 + pxa_gpio_mode(GPIO45_HWRTS_MD);
98 +void __exit gumstix_bluetooth_exit(void)
102 +module_init(gumstix_bluetooth_init);
103 +module_exit(gumstix_bluetooth_exit);
105 +MODULE_LICENSE("GPL");
106 +MODULE_AUTHOR("Craig Hughes <craig@gumstix.com>");
107 +MODULE_DESCRIPTION("Gumstix board bluetooth module initialization driver");
108 +MODULE_VERSION("1:0.1");