]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap1/board-h2.c
[PATCH] ARM: OMAP: Alsa modularisations and support for tsc2101 3/3 (round 2)
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap1 / board-h2.c
index 4cc6a31521f64ea47fa90ae157573704b401fd68..51634ce12cb1326a2e015c1e8244e75810c2163c 100644 (file)
@@ -41,6 +41,8 @@
 #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>
 
 extern int omap_gpio_init(void);
 
@@ -240,6 +242,7 @@ static struct platform_device h2_kp_device = {
 
 #define H2_IRDA_FIRSEL_GPIO_PIN        17
 
+#if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE)
 static int h2_transceiver_mode(struct device *dev, int state)
 {
        if (state & IR_SIRMODE)
@@ -249,9 +252,16 @@ static int h2_transceiver_mode(struct device *dev, int state)
 
        return 0;
 }
+#endif
 
 static struct omap_irda_config h2_irda_data = {
        .transceiver_cap        = IR_SIRMODE | IR_MIRMODE | IR_FIRMODE,
+       .rx_channel             = OMAP_DMA_UART3_RX,
+       .tx_channel             = OMAP_DMA_UART3_TX,
+       .dest_start             = UART3_THR,
+       .src_start              = UART3_RHR,
+       .tx_trigger             = 0,
+       .rx_trigger             = 0,
 };
 
 static struct resource h2_irda_resources[] = {
@@ -271,12 +281,54 @@ static struct platform_device h2_irda_device = {
        .resource       = h2_irda_resources,
 };
 
+static struct platform_device h2_lcd_device = {
+       .name           = "lcd_h2",
+       .id             = -1,
+};
+
+static struct omap_mcbsp_reg_cfg mcbsp_regs = { 
+       .spcr2 = FREE | FRST | GRST | XRST | XINTM(3),
+       .spcr1 = RINTM(3) | RRST,
+       .rcr2  = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) |
+                RWDLEN2(OMAP_MCBSP_WORD_16) | RDATDLY(1),
+       .rcr1  = RFRLEN1(OMAP_MCBSP_WORD_8) | RWDLEN1(OMAP_MCBSP_WORD_16),
+       .xcr2  = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) | 
+                XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(1) | XFIG,
+       .xcr1  = XFRLEN1(OMAP_MCBSP_WORD_8) | XWDLEN1(OMAP_MCBSP_WORD_16),
+       .srgr1 = FWID(15),
+       .srgr2 = GSYNC | CLKSP | FSGM | FPER(31),
+
+       .pcr0  = CLKXM | CLKRM | FSXP | FSRP | CLKXP | CLKRP,
+       //.pcr0 = CLKXP | CLKRP,        /* mcbsp: slave */
+};
+static struct omap_alsa_codec_config alsa_config = {
+       .name                   = "H2 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 h2_mcbsp1_device = {
+       .name   = "omap_alsa_mcbsp",
+       .id     = 1,
+       .dev = {
+               .platform_data  = &alsa_config,
+       }, 
+};    
+
 static struct platform_device *h2_devices[] __initdata = {
        &h2_nor_device,
        &h2_nand_device,
        &h2_smc91x_device,
        &h2_irda_device,
        &h2_kp_device,
+       &h2_lcd_device,
+       &h2_mcbsp1_device,
 };
 
 static void __init h2_init_smc91x(void)
@@ -325,7 +377,6 @@ static struct omap_uart_config h2_uart_config __initdata = {
 };
 
 static struct omap_lcd_config h2_lcd_config __initdata = {
-       .panel_name     = "h2",
        .ctrl_name      = "internal",
 };