ARM: tegra: remove unused code for spi registration
Laxman Dewangan [Thu, 19 Dec 2013 11:48:56 +0000 (16:48 +0530)]
SPI controller registration is moved to DT, there is unused code
for registering the spi from board files under CONFIG_OF.

As this is no more used, removing this unused code.

Change-Id: Ie805500e921534648a4344a3584a090b1139f88c
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/347521

arch/arm/mach-tegra/board-ardbeg.c
arch/arm/mach-tegra/board-bonaire.c
arch/arm/mach-tegra/board-dalmore.c
arch/arm/mach-tegra/board-loki.c
arch/arm/mach-tegra/board-pismo.c
arch/arm/mach-tegra/board-pluto.c
arch/arm/mach-tegra/board-vcm30_t124.c

index 5c7d156..c5e5717 100644 (file)
@@ -798,45 +798,6 @@ static void ardbeg_modem_init(void)
        }
 }
 
-#ifndef CONFIG_USE_OF
-static struct platform_device *ardbeg_spi_devices[] __initdata = {
-       &tegra11_spi_device1,
-       &tegra11_spi_device3,
-       &tegra11_spi_device4,
-};
-
-static struct tegra_spi_platform_data ardbeg_spi1_pdata = {
-       .dma_req_sel            = 15,
-       .spi_max_frequency      = 25000000,
-       .clock_always_on        = false,
-};
-
-static struct tegra_spi_platform_data ardbeg_spi3_pdata = {
-       .dma_req_sel            = 15,
-       .spi_max_frequency      = 25000000,
-       .clock_always_on        = false,
-};
-
-static struct tegra_spi_platform_data ardbeg_spi4_pdata = {
-       .dma_req_sel            = 18,
-       .spi_max_frequency      = 25000000,
-       .clock_always_on        = false,
-};
-
-static void __init ardbeg_spi_init(void)
-{
-       tegra11_spi_device1.dev.platform_data = &ardbeg_spi1_pdata;
-       tegra11_spi_device3.dev.platform_data = &ardbeg_spi3_pdata;
-       tegra11_spi_device4.dev.platform_data = &ardbeg_spi4_pdata;
-       platform_add_devices(ardbeg_spi_devices,
-                       ARRAY_SIZE(ardbeg_spi_devices));
-}
-#else
-static void __init ardbeg_spi_init(void)
-{
-}
-#endif
-
 #ifdef CONFIG_USE_OF
 static struct of_dev_auxdata ardbeg_auxdata_lookup[] __initdata = {
        OF_DEV_AUXDATA("nvidia,tegra114-spi", 0x7000d400, "spi-tegra114.0",
@@ -1178,7 +1139,6 @@ static void __init tegra_ardbeg_late_init(void)
        ardbeg_modem_init();
        ardbeg_xusb_init();
        ardbeg_i2c_init();
-       ardbeg_spi_init();
        ardbeg_audio_init();
        platform_add_devices(ardbeg_devices, ARRAY_SIZE(ardbeg_devices));
        //tegra_ram_console_debug_init();
index e0c708f..fb5a144 100644 (file)
@@ -26,8 +26,6 @@
 #include <linux/clk.h>
 #include <linux/serial_8250.h>
 #include <linux/i2c.h>
-#include <linux/spi/spi.h>
-#include <linux/spi/spi-tegra.h>
 #include <linux/i2c/panjit_ts.h>
 #include <linux/dma-mapping.h>
 #include <linux/delay.h>
@@ -224,53 +222,6 @@ static void bonaire_apbdma_init(void)
        platform_device_register(&tegra_apbdma);
 }
 
-static struct platform_device *bonaire_spi_devices[] __initdata = {
-       &tegra11_spi_device4,
-};
-
-/* struct spi_clk_parent spi_parent_clk_bonaire[] = { */
-/*     [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 bonaire_spi_pdata = { */
-/*     .is_dma_based           = true, */
-/*     .max_dma_buffer         = 16 * 1024, */
-/*     .is_clkon_always        = false, */
-/*     .max_rate               = 25000000, */
-/* }; */
-
-/* static void __init bonaire_spi_init(void) */
-/* { */
-/*     int i; */
-/*     struct clk *c; */
-/*     struct board_info board_info, display_board_info; */
-
-/*     tegra_get_board_info(&board_info); */
-/*     tegra_get_display_board_info(&display_board_info); */
-
-/*     for (i = 0; i < ARRAY_SIZE(spi_parent_clk_bonaire); ++i) { */
-/*             c = tegra_get_clock_by_name(spi_parent_clk_bonaire[i].name); */
-/*             if (IS_ERR_OR_NULL(c)) { */
-/*                     pr_err("Not able to get the clock for %s\n", */
-/*                                     spi_parent_clk_bonaire[i].name); */
-/*             continue; */
-/*             } */
-/*             spi_parent_clk_bonaire[i].parent_clk = c; */
-/*             spi_parent_clk_bonaire[i].fixed_clk_rate = clk_get_rate(c); */
-/*     } */
-/*     bonaire_spi_pdata.parent_clk_list = spi_parent_clk_bonaire; */
-/*     bonaire_spi_pdata.parent_clk_count = ARRAY_SIZE(spi_parent_clk_bonaire); */
-/*     tegra11_spi_device4.dev.platform_data = &bonaire_spi_pdata; */
-/*     platform_add_devices(bonaire_spi_devices, */
-/*                     ARRAY_SIZE(bonaire_spi_devices)); */
-/* } */
-
 #define GPIO_KEY(_id, _gpio, _iswake)          \
        {                                       \
                .code = _id,                    \
@@ -592,7 +543,6 @@ static void __init tegra_bonaire_init(void)
        bonaire_hs_uart_init();
        bonaire_sdhci_init();
        bonaire_i2c_init();
-       /* bonaire_spi_init(); */
        bonaire_regulator_init();
        bonaire_suspend_init();
        bonaire_touch_init();
index 62d1365..b00439f 100644 (file)
@@ -612,29 +612,6 @@ static void dalmore_audio_init(void)
        dalmore_audio_pdata.codec_dai_name = "rt5640-aif1";
 }
 
-#ifndef CONFIG_USE_OF
-static struct platform_device *dalmore_spi_devices[] __initdata = {
-        &tegra11_spi_device4,
-};
-
-static struct tegra_spi_platform_data dalmore_spi_pdata = {
-       .dma_req_sel            = 0,
-       .spi_max_frequency      = 25000000,
-       .clock_always_on        = false,
-};
-
-static void __init dalmore_spi_init(void)
-{
-       tegra11_spi_device4.dev.platform_data = &dalmore_spi_pdata;
-        platform_add_devices(dalmore_spi_devices,
-                                ARRAY_SIZE(dalmore_spi_devices));
-}
-#else
-static void __init dalmore_spi_init(void)
-{
-}
-#endif
-
 static __initdata struct tegra_clk_init_table touch_clk_init_table[] = {
        /* name         parent          rate            enabled */
        { "extern2",    "pll_p",        41000000,       false},
@@ -757,7 +734,6 @@ static void __init tegra_dalmore_late_init(void)
        platform_device_register(&tegra114_pinctrl_device);
        dalmore_pinmux_init();
        dalmore_i2c_init();
-       dalmore_spi_init();
        dalmore_usb_init();
        dalmore_xusb_init();
        dalmore_uart_init();
index dcfdf4e..82a1856 100644 (file)
@@ -637,37 +637,6 @@ static void loki_modem_init(void)
        }
 }
 
-#ifndef CONFIG_USE_OF
-static struct platform_device *loki_spi_devices[] __initdata = {
-       &tegra11_spi_device1,
-       &tegra11_spi_device4,
-};
-
-static struct tegra_spi_platform_data loki_spi1_pdata = {
-       .dma_req_sel            = 15,
-       .spi_max_frequency      = 25000000,
-       .clock_always_on        = false,
-};
-
-static struct tegra_spi_platform_data loki_spi4_pdata = {
-       .dma_req_sel            = 18,
-       .spi_max_frequency      = 25000000,
-       .clock_always_on        = false,
-};
-
-static void __init loki_spi_init(void)
-{
-       tegra11_spi_device1.dev.platform_data = &loki_spi1_pdata;
-       tegra11_spi_device4.dev.platform_data = &loki_spi4_pdata;
-       platform_add_devices(loki_spi_devices,
-                       ARRAY_SIZE(loki_spi_devices));
-}
-#else
-static void __init loki_spi_init(void)
-{
-}
-#endif
-
 #ifdef CONFIG_USE_OF
 struct of_dev_auxdata loki_auxdata_lookup[] __initdata = {
        OF_DEV_AUXDATA("nvidia,tegra114-spi", 0x7000d400, "spi-tegra114.0",
@@ -837,7 +806,6 @@ static void __init tegra_loki_late_init(void)
        loki_modem_init();
        loki_xusb_init();
        loki_i2c_init();
-       loki_spi_init();
        loki_uart_init();
        loki_audio_init();
        platform_add_devices(loki_devices, ARRAY_SIZE(loki_devices));
index a7a5874..f92d8b4 100644 (file)
@@ -601,26 +601,6 @@ static void pismo_audio_init(void)
        pismo_audio_pdata.codec_dai_name = "rt5640-aif1";
 }
 
-
-static struct platform_device *pismo_spi_devices[] __initdata = {
-       &tegra11_spi_device4,
-};
-
-static struct tegra_spi_platform_data pismo_spi_pdata = {
-       .spi_max_frequency      = 25000000,
-       .is_clkon_always        = false,
-};
-
-static void __init pismo_spi_init(void)
-{
-       struct board_info display_board_info;
-
-       tegra_get_display_board_info(&display_board_info);
-
-       tegra11_spi_device4.dev.platform_data = &pismo_spi_pdata;
-       platform_add_devices(pismo_spi_devices, ARRAY_SIZE(pismo_spi_devices));
-}
-
 struct rm_spi_ts_platform_data rm31080ts_pismo_data = {
        .gpio_reset = 0,
        .config = 0,
@@ -656,7 +636,6 @@ static void __init tegra_pismo_init(void)
        tegra_enable_pinmux();
        pismo_pinmux_init();
        pismo_i2c_init();
-       pismo_spi_init();
        pismo_usb_init();
        pismo_uart_init();
        pismo_audio_init();
@@ -701,6 +680,19 @@ struct of_dev_auxdata pismo_auxdata_lookup[] __initdata = {
        OF_DEV_AUXDATA("nvidia,tegra114-vi", TEGRA_VI_BASE, "vi", NULL),
        OF_DEV_AUXDATA("nvidia,tegra114-isp", TEGRA_ISP_BASE, "isp", NULL),
        OF_DEV_AUXDATA("nvidia,tegra114-tsec", TEGRA_TSEC_BASE, "tsec", NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-spi", 0x7000d400, "spi-tegra114.0",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-spi", 0x7000d600, "spi-tegra114.1",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-spi", 0x7000d800, "spi-tegra114.2",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-spi", 0x7000da00, "spi-tegra114.3",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-spi", 0x7000dc00, "spi-tegra114.4",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-spi", 0x7000de00, "spi-tegra114.5",
+                               NULL),
+
        {}
 };
 #endif
index a760a82..de5ee8e 100644 (file)
@@ -1137,34 +1137,6 @@ static void pluto_audio_init(void)
                                        ARRAY_SIZE(aic326x_spi_board_info));
 }
 
-#ifndef CONFIG_USE_OF
-static struct platform_device *pluto_spi_devices[] __initdata = {
-        &tegra11_spi_device4,
-};
-
-static struct tegra_spi_platform_data pluto_spi_pdata = {
-       .dma_req_sel            = 0,
-       .spi_max_frequency      = 25000000,
-       .clock_always_on        = false,
-};
-
-static void __init pluto_spi_init(void)
-{
-        struct board_info board_info, display_board_info;
-
-        tegra_get_board_info(&board_info);
-        tegra_get_display_board_info(&display_board_info);
-
-       tegra11_spi_device4.dev.platform_data = &pluto_spi_pdata;
-        platform_add_devices(pluto_spi_devices,
-                                ARRAY_SIZE(pluto_spi_devices));
-}
-#else
-static void __init pluto_spi_init(void)
-{
-}
-#endif
-
 static __initdata struct tegra_clk_init_table touch_clk_init_table[] = {
        /* name         parent          rate            enabled */
        { "extern2",    "pll_p",        41000000,       false},
@@ -1329,7 +1301,6 @@ static void __init tegra_pluto_late_init(void)
        platform_device_register(&tegra114_pinctrl_device);
        pluto_pinmux_init();
        pluto_i2c_init();
-       pluto_spi_init();
        pluto_usb_init();
        pluto_xusb_init();
        pluto_uart_init();
index 89609d6..22971c1 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/platform_data/tegra_usb.h>
 #include <linux/platform_data/tegra_nor.h>
 #include <linux/platform_data/tegra_ahci.h>
-#include <linux/spi/spi-tegra.h>
 #include <linux/of_platform.h>
 #include <linux/kernel.h>
 #include <linux/clocksource.h>
@@ -429,37 +428,6 @@ static void vcm30_t124_usb_init(void)
        }
 }
 
-#ifndef CONFIG_USE_OF
-static struct platform_device *vcm30_t124_spi_devices[] __initdata = {
-       &tegra11_spi_device1,
-       &tegra11_spi_device4,
-};
-
-static struct tegra_spi_platform_data vcm30_t124_spi1_pdata = {
-       .dma_req_sel            = 15,
-       .spi_max_frequency      = 25000000,
-       .clock_always_on        = false,
-};
-
-static struct tegra_spi_platform_data vcm30_t124_spi4_pdata = {
-       .dma_req_sel            = 18,
-       .spi_max_frequency      = 25000000,
-       .clock_always_on        = false,
-};
-
-static void __init vcm30_t124_spi_init(void)
-{
-       tegra11_spi_device1.dev.platform_data = &vcm30_t124_spi1_pdata;
-       tegra11_spi_device4.dev.platform_data = &vcm30_t124_spi4_pdata;
-       platform_add_devices(vcm30_t124_spi_devices,
-                       ARRAY_SIZE(vcm30_t124_spi_devices));
-}
-#else
-static void __init vcm30_t124_spi_init(void)
-{
-}
-#endif
-
 #ifdef CONFIG_USE_OF
 struct of_dev_auxdata vcm30_t124_auxdata_lookup[] __initdata = {
        OF_DEV_AUXDATA("nvidia,tegra114-hsuart", TEGRA_UARTA_BASE,
@@ -482,6 +450,19 @@ struct of_dev_auxdata vcm30_t124_auxdata_lookup[] __initdata = {
                                NULL),
        OF_DEV_AUXDATA("nvidia,tegra124-ahub", 0x70300000,
                                "tegra30-ahub-apbif", NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-spi", 0x7000d400, "spi-tegra114.0",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-spi", 0x7000d600, "spi-tegra114.1",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-spi", 0x7000d800, "spi-tegra114.2",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-spi", 0x7000da00, "spi-tegra114.3",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-spi", 0x7000dc00, "spi-tegra114.4",
+                               NULL),
+       OF_DEV_AUXDATA("nvidia,tegra114-spi", 0x7000de00, "spi-tegra114.5",
+                               NULL),
+
        {}
 };
 #endif
@@ -507,7 +488,6 @@ static void __init tegra_vcm30_t124_late_init(void)
 /*     vcm30_t124_xusb_init(); */
        vcm30_t124_nor_init();
        vcm30_t124_i2c_init();
-       vcm30_t124_spi_init();
        vcm30_t124_uart_init();
        vcm30_t124_pca953x_init();
        platform_add_devices(vcm30_t124_devices,