ARM: tegra: use proper header file for spi on Macallan/roth/pismo
Laxman Dewangan [Wed, 11 Dec 2013 13:22:42 +0000 (18:22 +0530)]
The header file linux/spi-tegra.h is not used any more and spi
driver uses the linux/spi/spi-tegra.h.

Use correct header file from board files of Macallan, roth and pismo.

Change-Id: If5a8826eae7b7ec5b651ef14d56e193116b7d0c0
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/344231
GVS: Gerrit_Virtual_Submit

arch/arm/mach-tegra/board-macallan.c
arch/arm/mach-tegra/board-pismo.c
arch/arm/mach-tegra/board-roth.c

index a881bce..56d20ae 100644 (file)
@@ -35,7 +35,7 @@
 #include <linux/spi/spi.h>
 #include <linux/spi/rm31080a_ts.h>
 #include <linux/memblock.h>
-#include <linux/spi-tegra.h>
+#include <linux/spi/spi-tegra.h>
 #include <linux/nfc/pn544.h>
 #include <linux/skbuff.h>
 #include <linux/ti_wilink_st.h>
@@ -501,41 +501,15 @@ static struct platform_device *macallan_spi_devices[] __initdata = {
        &tegra11_spi_device1,
 };
 
-struct spi_clk_parent spi_parent_clk_macallan[] = {
-       [0] = {.name = "pll_p"},
-#ifndef CONFIG_TEGRA_PLLM_RESTRICTED
-       [1] = {.name = "pll_m"},
-       [2] = {.name = "clk_m"},
-#else
-       [1] = {.name = "clk_m"},
-#endif
-};
-
 static struct tegra_spi_platform_data macallan_spi_pdata = {
-       .max_dma_buffer         = 16 * 1024,
-       .is_clkon_always        = false,
-       .max_rate               = 25000000,
+       .spi_max_frequency      = 25000000,
+       .is_clkon_always        = false,
 };
 
 static void __init macallan_spi_init(void)
 {
-       int i;
-       struct clk *c;
-
-       for (i = 0; i < ARRAY_SIZE(spi_parent_clk_macallan); ++i) {
-               c = tegra_get_clock_by_name(spi_parent_clk_macallan[i].name);
-               if (IS_ERR_OR_NULL(c)) {
-                       pr_err("Not able to get the clock for %s\n",
-                                       spi_parent_clk_macallan[i].name);
-                       continue;
-               }
-               spi_parent_clk_macallan[i].parent_clk = c;
-               spi_parent_clk_macallan[i].fixed_clk_rate = clk_get_rate(c);
-       }
-       macallan_spi_pdata.parent_clk_list = spi_parent_clk_macallan;
-       macallan_spi_pdata.parent_clk_count = ARRAY_SIZE(spi_parent_clk_macallan);
-       macallan_spi_pdata.is_dma_based = (tegra_revision == TEGRA_REVISION_A01)
-                                                       ? false : true ;
+       macallan_spi_pdata.dma_req_sel = (tegra_revision == TEGRA_REVISION_A01)
+                                                       ? 0 : 15 ;
        tegra11_spi_device1.dev.platform_data = &macallan_spi_pdata;
        platform_add_devices(macallan_spi_devices,
                                ARRAY_SIZE(macallan_spi_devices));
index e345238..a7a5874 100644 (file)
@@ -35,7 +35,7 @@
 #include <linux/spi/spi.h>
 #include <linux/spi/rm31080a_ts.h>
 #include <linux/memblock.h>
-#include <linux/spi-tegra.h>
+#include <linux/spi/spi-tegra.h>
 #include <linux/nfc/pn544.h>
 #include <linux/rfkill-gpio.h>
 #include <linux/skbuff.h>
@@ -606,46 +606,19 @@ static struct platform_device *pismo_spi_devices[] __initdata = {
        &tegra11_spi_device4,
 };
 
-struct spi_clk_parent spi_parent_clk_pismo[] = {
-       [0] = {.name = "pll_p"},
-#ifndef CONFIG_TEGRA_PLLM_RESTRICTED
-       [1] = {.name = "pll_m"},
-       [2] = {.name = "clk_m"},
-#else
-       [1] = {.name = "clk_m"},
-#endif
-};
-
 static struct tegra_spi_platform_data pismo_spi_pdata = {
-       .is_dma_based           = false,
-       .max_dma_buffer         = 16 * 1024,
-       .is_clkon_always        = false,
-       .max_rate               = 25000000,
+       .spi_max_frequency      = 25000000,
+       .is_clkon_always        = false,
 };
 
 static void __init pismo_spi_init(void)
 {
-       int i;
-       struct clk *c;
        struct board_info display_board_info;
 
        tegra_get_display_board_info(&display_board_info);
 
-       for (i = 0; i < ARRAY_SIZE(spi_parent_clk_pismo); ++i) {
-               c = tegra_get_clock_by_name(spi_parent_clk_pismo[i].name);
-               if (IS_ERR_OR_NULL(c)) {
-                       pr_err("Not able to get the clock for %s\n",
-                                       spi_parent_clk_pismo[i].name);
-                       continue;
-               }
-               spi_parent_clk_pismo[i].parent_clk = c;
-               spi_parent_clk_pismo[i].fixed_clk_rate = clk_get_rate(c);
-       }
-       pismo_spi_pdata.parent_clk_list = spi_parent_clk_pismo;
-       pismo_spi_pdata.parent_clk_count = ARRAY_SIZE(spi_parent_clk_pismo);
        tegra11_spi_device4.dev.platform_data = &pismo_spi_pdata;
-       platform_add_devices(pismo_spi_devices,
-                       ARRAY_SIZE(pismo_spi_devices));
+       platform_add_devices(pismo_spi_devices, ARRAY_SIZE(pismo_spi_devices));
 }
 
 struct rm_spi_ts_platform_data rm31080ts_pismo_data = {
index 571d932..857d50b 100644 (file)
@@ -33,7 +33,7 @@
 #include <linux/platform_data/tegra_usb.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/rm31080a_ts.h>
-#include <linux/spi-tegra.h>
+#include <linux/spi/spi-tegra.h>
 #include <linux/memblock.h>
 #include <linux/rfkill-gpio.h>
 #include <linux/skbuff.h>
@@ -538,43 +538,15 @@ static struct platform_device *roth_spi_devices[] __initdata = {
        &tegra11_spi_device4,
 };
 
-struct spi_clk_parent spi_parent_clk_roth[] = {
-       [0] = {.name = "pll_p"},
-#ifndef CONFIG_TEGRA_PLLM_RESTRICTED
-       [1] = {.name = "pll_m"},
-       [2] = {.name = "clk_m"},
-#else
-       [1] = {.name = "clk_m"},
-#endif
-};
-
 static struct tegra_spi_platform_data roth_spi_pdata = {
-       .is_dma_based           = false,
-       .max_dma_buffer         = 16 * 1024,
-       .is_clkon_always        = false,
-       .max_rate               = 25000000,
+       .spi_max_frequency      = 25000000,
+       .is_clkon_always        = false,
 };
 
 static void __init roth_spi_init(void)
 {
-       int i;
-       struct clk *c;
-
-       for (i = 0; i < ARRAY_SIZE(spi_parent_clk_roth); ++i) {
-               c = tegra_get_clock_by_name(spi_parent_clk_roth[i].name);
-               if (IS_ERR_OR_NULL(c)) {
-                       pr_err("Not able to get the clock for %s\n",
-                               spi_parent_clk_roth[i].name);
-                       continue;
-               }
-               spi_parent_clk_roth[i].parent_clk = c;
-               spi_parent_clk_roth[i].fixed_clk_rate = clk_get_rate(c);
-       }
-       roth_spi_pdata.parent_clk_list = spi_parent_clk_roth;
-       roth_spi_pdata.parent_clk_count = ARRAY_SIZE(spi_parent_clk_roth);
        tegra11_spi_device4.dev.platform_data = &roth_spi_pdata;
-       platform_add_devices(roth_spi_devices,
-               ARRAY_SIZE(roth_spi_devices));
+       platform_add_devices(roth_spi_devices, ARRAY_SIZE(roth_spi_devices));
 }
 
 static __initdata struct tegra_clk_init_table touch_clk_init_table[] = {