]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap1/board-h6300.c
h63xx: tsc2101 alsa sound support
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap1 / board-h6300.c
index 2bcc34f9e6c9c08e06377d73172cad4aec75a56e..888e654549dac68ebdcbb53260fae154eca568aa 100644 (file)
@@ -29,6 +29,9 @@
 #include <asm/arch/usb.h>
 #include <asm/arch/keypad.h>
 #include <asm/arch/common.h>
+#include <asm/arch/mcbsp.h>
+#include <asm/arch/omap-alsa.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,9 +107,60 @@ 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 h63xx_uart_bt_device = {
+       .name   = "h6300_bt",
+       .id     = 1,
+};
+EXPORT_SYMBOL(h63xx_uart_bt_device);
+
+static struct omap_mcbsp_reg_cfg mcbsp_regs = { 
+       .spcr2  = 0x0000,
+       .spcr1  = 0x0000,
+       .rcr2   = 0x8041,
+       .rcr1   = 0x0040,
+       .xcr2   = 0x00a1,
+       .xcr1   = 0x00a0,
+       .srgr2  = 0xb000,
+       .srgr1  = 0x0000,
+       .pcr0   = 0x0081,
+};
+
+static struct omap_alsa_codec_config alsa_config = {
+       .name                   = "iPAQ h6300 TSC2101",
+       .mcbsp_regs_alsa        = &mcbsp_regs,
+       .codec_configure_dev    = NULL, //tsc2101_configure,
+       .codec_set_samplerate   = NULL, //tsc2101_set_samplerate,
+       .codec_clock_setup      = NULL, //tsc2101_clock_setup,
+       .codec_clock_on         = NULL, //tsc2101_clock_on,
+       .codec_clock_off        = NULL, //tsc2101_clock_off,
+       .get_default_samplerate = NULL, //tsc2101_get_default_samplerate,
+};
+
+static struct platform_device h6300_mcbsp1_sound_device = {
+       .name   = "omap_alsa_mcbsp",
+       .id     = 1,
+       .dev = {
+               .platform_data  = &alsa_config,
+       },
+};
+
 static struct platform_device *h6300_devices[] __initdata = {
        &h6300_lcd_device,
        &h6300_kp_device,
+       &h63xx_uart_bt_device,
+       &h6300_mcbsp1_sound_device,
 };
 
 static struct omap_lcd_config h6300_lcd_config __initdata = {
@@ -169,6 +223,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")