]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap1/board-h6300.c
h63xx: bluetooth support
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap1 / board-h6300.c
index 2bcc34f9e6c9c08e06377d73172cad4aec75a56e..09f14777f1f4d38db23467e58e23bc320a50ab03 100644 (file)
@@ -29,6 +29,7 @@
 #include <asm/arch/usb.h>
 #include <asm/arch/keypad.h>
 #include <asm/arch/common.h>
+#include <asm/arch/h6300_uart_info.h>
 
 #define _h6300_KEY_CALENDAR    67      // xmodmap 75 aka F9
 #define _H6300_KEY_TELEPHONE   68      // xmodmap 76 aka F10
@@ -104,6 +105,24 @@ static struct platform_device h6300_kp_device = {
        .resource       = h6300_kp_resources,
 };
 
+/*
+ * Bluetooth - Relies on h6300_bt module,
+ * so make the calls indirectly through pointers. Requires that the
+ * h6300_bt bluetooth module be loaded before any attempt to use
+ * bluetooth (obviously).
+ */
+static struct platform_omap_serial_funcs h6300_omap_platform__uart_bt_funcs = {
+       .configure      = NULL,
+       .set_txrx       = NULL,
+       .get_txrx       = NULL,
+};
+
+struct platform_device btuart_device = {
+       .name   = "h6300_bt",
+       .id     = 1,
+};
+EXPORT_SYMBOL(btuart_device);
+
 static struct platform_device *h6300_devices[] __initdata = {
        &h6300_lcd_device,
        &h6300_kp_device,
@@ -169,6 +188,8 @@ static void __init h6300_init(void)
 static void __init h6300_map_io(void)
 {
        omap1_map_common_io();
+
+       h63xx_uart_bt_device.dev.platform_data  = &h6300_omap_platform__uart_bt_funcs;
 }
 
 MACHINE_START(OMAP_H6300, "HP iPAQ h6300")