X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Farm%2Fmach-omap1%2Fboard-h6300.c;h=888e654549dac68ebdcbb53260fae154eca568aa;hb=c872ebcdd22885f52cb1123472b0a7335f872785;hp=2bcc34f9e6c9c08e06377d73172cad4aec75a56e;hpb=1e03ce74496b1229c5e8d582963379013726e421;p=linux-2.6-omap-h63xx.git diff --git a/arch/arm/mach-omap1/board-h6300.c b/arch/arm/mach-omap1/board-h6300.c index 2bcc34f9e6c..888e654549d 100644 --- a/arch/arm/mach-omap1/board-h6300.c +++ b/arch/arm/mach-omap1/board-h6300.c @@ -29,6 +29,9 @@ #include #include #include +#include +#include +#include #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")