This patch adds definitions to hook up one of the ti-ssp ports to the SSP GPIO
driver.

Signed-off-by: Cyril Chemparathy <[email protected]>
---
 arch/arm/mach-davinci/board-tnetv107x-evm.c |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-davinci/board-tnetv107x-evm.c 
b/arch/arm/mach-davinci/board-tnetv107x-evm.c
index 2f13544..7b4f86e 100644
--- a/arch/arm/mach-davinci/board-tnetv107x-evm.c
+++ b/arch/arm/mach-davinci/board-tnetv107x-evm.c
@@ -40,6 +40,8 @@
 #include <mach/ti_ssp.h>
 #include <mach/tnetv107x.h>
 
+#define SSP_GPIO_START         128
+
 #define EVM_MMC_WP_GPIO                21
 #define EVM_MMC_CD_GPIO                24
 #define EVM_SPI_CS_GPIO                54
@@ -263,6 +265,25 @@ static struct platform_device spi_master_device = {
        .dev.platform_data = &spi_master_data,
 };
 
+static struct ti_ssp_gpio_data ssp_gpio_data = {
+       .port_data = {
+               .ssp_dev_name = "ti-ssp",
+               .port = 0,
+               .iosel = SSP_PIN_SEL(0, SSP_OUT)        |
+                        SSP_PIN_SEL(1, SSP_OUT)        |
+                        SSP_PIN_SEL(2, SSP_OUT)        |
+                        SSP_PIN_SEL(3, SSP_OUT)        |
+                        SSP_INPUT_SEL(3),
+       },
+       .start          = SSP_GPIO_START,
+};
+
+static struct platform_device ssp_gpio_device = {
+       .name           = "ti-ssp-gpio",
+       .id             = 0,
+       .dev.platform_data = &ssp_gpio_data,
+};
+
 static struct regulator_consumer_supply usb_consumers[] = {
        REGULATOR_SUPPLY("vbus", "musb_hdrc.1"),
 };
@@ -363,6 +384,8 @@ static __init void tnetv107x_evm_board_init(void)
        tnetv107x_devices_init(&evm_device_info);
 
        platform_device_register(&spi_master_device);
+       platform_device_register(&ssp_gpio_device);
+
        spi_register_board_info(spi_info, ARRAY_SIZE(spi_info));
 }
 
-- 
1.7.0.4


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to