[Armadeus-commitlog] SF.net SVN: armadeus:[1016] branches/tsc210x/buildroot/target/device/ armadeu
Brought to you by:
sszy
Revision: 1016
http://armadeus.svn.sourceforge.net/armadeus/?rev=1016&view=rev
Author: artemys
Date: 2009-01-14 14:16:13 +0000 (Wed, 14 Jan 2009)
Log Message:
-----------
[TSC BRANCH] [LINUX] Add SSI device declaration to apf9328
Modified Paths:
--------------
branches/tsc210x/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch
Modified: branches/tsc210x/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch
===================================================================
--- branches/tsc210x/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch 2009-01-14 12:59:57 UTC (rev 1015)
+++ branches/tsc210x/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch 2009-01-14 14:16:13 UTC (rev 1016)
@@ -3,11 +3,11 @@
(Take a look at armadeus/target/linux/ directory to know how to generate it)
--- linux-2.6.27.2.original/arch/arm/mach-imx/apf9328.c
+++ linux-2.6.27.2.mod/arch/arm/mach-imx/apf9328.c
-@@ -0,0 +1,677 @@
+@@ -0,0 +1,731 @@
+/*
+ * linux/arch/arm/mach-imx/apf9328.c
+ *
-+ * Copyright (c) 2005 Armadeus
++ * Copyright (c) 2005-2009 Armadeus systems
+ * This work is based on scb9328.c from Sascha Hauer
+ *
+ * This program is free software; you can redistribute it and/or modify
@@ -45,14 +45,15 @@
+#include <mach/imx-uart.h>
+#include <mach/mmc.h>
+#include <mach/spi_imx.h>
-+#include <mach/imx-regs.h> // imx_gpio_mode()
++#include <mach/imx-regs.h> /* imx_gpio_mode() */
+#include <mach/imx-alsa.h>
+#include <linux/spi/max1027.h>
+#include <linux/usb/isp116x.h>
++#include <mach/imx_ssi.h>
+
+#ifdef CONFIG_DM9000
+#include <linux/dm9000.h>
-+#endif // CONFIG_DM9000
++#endif
+
+#include "generic.h"
+
@@ -188,24 +189,87 @@
+};
+
+#if defined(CONFIG_SND_IMX_TSC2102) || defined(CONFIG_SND_IMX_TSC2102_MODULE)
-+static struct imx_alsa_codec_config tsc2102_alsa_pdata;
++int apf9328_ssi_gpio_init(struct platform_device *pdev)
++{
++ /* Activate SSI on PortC */
++ imx_gpio_mode(PC3_PF_SSI_RXFS);
++ FMCR &= ~(SSI_RXFS_SEL);
++ imx_gpio_mode(PC4_PF_SSI_RXCLK);
++ FMCR &= ~(SSI_RXCLK_SEL);
++ imx_gpio_mode(PC5_PF_SSI_RXDAT);
++ FMCR &= ~(SSI_RXDAT_SEL);
++ imx_gpio_mode(PC6_PF_SSI_TXDAT);
++ imx_gpio_mode(PC7_PF_SSI_TXFS);
++ FMCR &= ~(SSI_TXFS_SEL);
++ imx_gpio_mode(PC8_PF_SSI_TXCLK);
++ FMCR &= ~(SSI_TXCLK_SEL);
++
++ printk("SSI pins configured\n");
++ return 0;
++}
+
++static struct imx_ssi_platform_data apf9328_ssi_pdata = {
++ .init = apf9328_ssi_gpio_init,
++};
++
+static struct resource ssi_resources[] = {
-+ [0] = {
-+ .start = (IMX_SSI_BASE),
-+ .end = (IMX_SSI_BASE + 0x28),
-+ .flags = IORESOURCE_MEM,
-+ },
++ [0] = {
++ .start = (0x00218000),
++ .end = (0x00218000 + 0x28),
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = SSI_TX_INT,
++ .end = SSI_TX_INT,
++ .flags = IORESOURCE_IRQ
++ },
++ [2] = {
++ .start = SSI_TX_ERR_INT,
++ .end = SSI_TX_ERR_INT,
++ .flags = IORESOURCE_IRQ
++ },
++ [3] = {
++ .start = SSI_RX_INT,
++ .end = SSI_RX_INT,
++ .flags = IORESOURCE_IRQ
++ },
++ [4] = {
++ .start = SSI_RX_ERR_INT,
++ .end = SSI_RX_ERR_INT,
++ .flags = IORESOURCE_IRQ
++ },
++ [5] = {
++ .name = "tx0",
++ .start = DMA_REQ_SSI_T,
++ .end = DMA_REQ_SSI_T,
++ .flags = IORESOURCE_DMA
++ },
++ [6] = {
++ .name = "rx0",
++ .start = DMA_REQ_SSI_R,
++ .end = DMA_REQ_SSI_R,
++ .flags = IORESOURCE_DMA
++ },
+};
+
++static struct platform_device apf9328_ssi_device = {
++ .name = "imx-ssi",
++ .id = 0,
++ .num_resources = ARRAY_SIZE(ssi_resources),
++ .resource = ssi_resources,
++ .dev = {
++ .platform_data = &apf9328_ssi_pdata,
++ }
++};
++
++static struct imx_sound_platform_data apf9328_alsa_pdata;
++
+static struct platform_device tsc2102_alsa_device = {
-+ .name = "tsc210x-alsa", // Should be the same as the driver name
-+ .id = 0,
-+ .num_resources = ARRAY_SIZE(ssi_resources),
-+ .resource = ssi_resources,
-+ .dev = {
-+ .platform_data = &tsc2102_alsa_pdata,
-+ }
++ .name = "tsc210x-alsa",
++ .id = 0,
++ .dev = {
++ .platform_data = &apf9328_alsa_pdata,
++ }
+};
+#endif /* defined(CONFIG_SND_IMX_TSC2102) || defined(CONFIG_SND_IMX_TSC2102_MODULE) */
+
@@ -417,19 +481,6 @@
+ imx_gpio_mode( GPIO_PORTD | TSC2102_INT_GPIOD | GPIO_IN | GPIO_GIUS );
+ //imx_gpio_irq_type( IRQ_GPIOD(8), __IRQT_FALEDGE );
+
-+ // Activate SSI on PortC ----
-+ imx_gpio_mode( PC3_PF_SSI_RXFS );
-+ FMCR &= ~(SSI_RXFS_SEL);
-+ imx_gpio_mode( PC4_PF_SSI_RXCLK );
-+ FMCR &= ~(SSI_RXCLK_SEL);
-+ imx_gpio_mode( PC5_PF_SSI_RXDAT );
-+ FMCR &= ~(SSI_RXDAT_SEL);
-+ imx_gpio_mode( PC6_PF_SSI_TXDAT );
-+ imx_gpio_mode( PC7_PF_SSI_TXFS );
-+ FMCR &= ~(SSI_TXFS_SEL);
-+ imx_gpio_mode( PC8_PF_SSI_TXCLK );
-+ FMCR &= ~(SSI_TXCLK_SEL);
-+
+ printk("TSC2102 GPIOs initialized\n");
+ return 0;
+}
@@ -449,11 +500,13 @@
+};
+
+static struct tsc210x_config apf9328_tsc2102_config = {
-+ .use_internal = 1, // -> use internal voltage reference
-+ .monitor = TSC_BAT1 | TSC_AUX | TSC_TEMP,
-+ .init = tsc2102_init_gpio
-+/* .apm_report = palmte_get_power_status,
-+ .alsa_config = &palmte_alsa_config,*/
++ .use_internal = 1, // -> use internal voltage reference
++ .monitor = TSC_BAT1 | TSC_AUX | TSC_TEMP,
++ .init = tsc2102_init_gpio,
++/* .apm_report = palmte_get_power_status,*/
++/*#if defined(CONFIG_SND_IMX_TSC2102) || defined(CONFIG_SND_IMX_TSC2102_MODULE)
++ .alsa_config = &apf9328_alsa_pdata,
++#endif*/
+};
+
+#endif // CONFIG_SPI_TSC2102
@@ -570,23 +623,24 @@
+static struct platform_device *devices[] __initdata = {
+ &imx_uart1_device,
+ &imx_uart2_device,
-+#ifdef CONFIG_DM9000
++#ifdef CONFIG_DM9000
+ &dm9000x_device,
-+#endif // CONFIG_DM9000
++#endif
+#ifdef CONFIG_SPI_IMX
+ &imx_spi1,
+ &imx_spi2,
-+#endif //CONFIG_SPI_IMX
++#endif
+ &imx_pwm_device,
+#ifdef CONFIG_IMX_BACKLIGHT
+ &imxbl_device,
-+#endif // CONFIG_IMX_BACKLIGHT
++#endif
+#if defined(CONFIG_SND_IMX_TSC2102) || defined(CONFIG_SND_IMX_TSC2102_MODULE)
+ &tsc2102_alsa_device,
-+#endif // CONFIG_SND_IMX_TSC2102 || CONFIG_SND_IMX_TSC2102_MODULE
++ &apf9328_ssi_device,
++#endif
+#ifdef CONFIG_ARMADEUS_ISP1761
+ &devfull_isp1761_device,
-+#endif // CONFIG_ARMADEUS_ISP1761
++#endif
+};
+
+static void __init apf9328_init(void)
@@ -891,7 +945,7 @@
DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
(Take a look at armadeus/target/linux/ directory to know how to generate it)
--- linux-2.6.27.2.original/arch/arm/mach-imx/include/mach/apf9328.h
-+++ linux-2.6.27.2.mod/arch/arm/mach-imx/include/mach/apf9328.h
++++ linux-2.6.27.2.mod/arch/arm/mach-imx/include/mach/apf9328.h
@@ -0,0 +1,63 @@
+/*
+ * linux/include/asm-arm/arch-imx/apf9328.h
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|