ARM: OMAP2+: Cleanup omap2_spi_dev_attr and other legacy data
authorSuman Anna <s-anna@ti.com>
Tue, 13 Feb 2018 01:32:40 +0000 (19:32 -0600)
committerTony Lindgren <tony@atomide.com>
Wed, 14 Feb 2018 18:28:12 +0000 (10:28 -0800)
The omap2_spi_dev_attr data was used to supply instance-specific
data for legacy non-DT devices. The SPI legacy device support
including the usage of the hwmod class revision data has been
dropped in commit 6f3ab009a178 ("ARM: OMAP2+: Remove unused legacy
code for device init") and this data is therefore no longer needed.
So, cleanup the structure and all the associated data in various
hwmod data files.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
13 files changed:
arch/arm/mach-omap2/omap_hwmod_2420_data.c
arch/arm/mach-omap2/omap_hwmod_2430_data.c
arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_common_data.h
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
arch/arm/mach-omap2/omap_hwmod_33xx_data.c
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
arch/arm/mach-omap2/omap_hwmod_43xx_data.c
arch/arm/mach-omap2/omap_hwmod_44xx_data.c
arch/arm/mach-omap2/omap_hwmod_54xx_data.c
arch/arm/mach-omap2/omap_hwmod_7xx_data.c
arch/arm/mach-omap2/omap_hwmod_81xx_data.c
include/linux/platform_data/spi-omap2-mcspi.h

index 9f16b1b8d882afd68b5a78dbebcc626e49731c9b..fe66cf2478741c00a48f82addf68ef7782d8a7c6 100644 (file)
@@ -14,7 +14,6 @@
  */
 
 #include <linux/i2c-omap.h>
-#include <linux/platform_data/spi-omap2-mcspi.h>
 #include <linux/omap-dma.h>
 
 #include "omap_hwmod.h"
index 409f0e6347076677090f351edefb1e4c1c4eb162..cdbd09b211682a6008549baf857f0b5c24a9665a 100644 (file)
@@ -16,7 +16,6 @@
 #include <linux/i2c-omap.h>
 #include <linux/platform_data/asoc-ti-mcbsp.h>
 #include <linux/platform_data/hsmmc-omap.h>
-#include <linux/platform_data/spi-omap2-mcspi.h>
 #include <linux/omap-dma.h>
 
 #include "omap_hwmod.h"
@@ -157,10 +156,6 @@ static struct omap_hwmod omap2430_mailbox_hwmod = {
 };
 
 /* mcspi3 */
-static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
-       .num_chipselect = 2,
-};
-
 static struct omap_hwmod omap2430_mcspi3_hwmod = {
        .name           = "mcspi3",
        .main_clk       = "mcspi3_fck",
@@ -172,7 +167,6 @@ static struct omap_hwmod omap2430_mcspi3_hwmod = {
                },
        },
        .class          = &omap2xxx_mcspi_class,
-       .dev_attr       = &omap_mcspi3_dev_attr,
 };
 
 /* usbhsotg */
index 00a5ae5df82da6915b5e5703539d35e2efe335a4..5345919a81f8b19c0f69a556ec1816482f35887c 100644 (file)
@@ -12,8 +12,6 @@
 #include <linux/types.h>
 #include <linux/omap-dma.h>
 
-#include <linux/platform_data/spi-omap2-mcspi.h>
-
 #include "omap_hwmod.h"
 #include "omap_hwmod_common_data.h"
 #include "cm-regbits-24xx.h"
@@ -159,7 +157,6 @@ static struct omap_hwmod_class_sysconfig omap2xxx_mcspi_sysc = {
 struct omap_hwmod_class omap2xxx_mcspi_class = {
        .name   = "mcspi",
        .sysc   = &omap2xxx_mcspi_sysc,
-       .rev    = OMAP2_MCSPI_REV,
 };
 
 /*
@@ -593,10 +590,6 @@ struct omap_hwmod omap2xxx_gpio4_hwmod = {
 };
 
 /* mcspi1 */
-static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
-       .num_chipselect = 4,
-};
-
 struct omap_hwmod omap2xxx_mcspi1_hwmod = {
        .name           = "mcspi1",
        .main_clk       = "mcspi1_fck",
@@ -608,14 +601,9 @@ struct omap_hwmod omap2xxx_mcspi1_hwmod = {
                },
        },
        .class          = &omap2xxx_mcspi_class,
-       .dev_attr       = &omap_mcspi1_dev_attr,
 };
 
 /* mcspi2 */
-static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
-       .num_chipselect = 2,
-};
-
 struct omap_hwmod omap2xxx_mcspi2_hwmod = {
        .name           = "mcspi2",
        .main_clk       = "mcspi2_fck",
@@ -627,7 +615,6 @@ struct omap_hwmod omap2xxx_mcspi2_hwmod = {
                },
        },
        .class          = &omap2xxx_mcspi_class,
-       .dev_attr       = &omap_mcspi2_dev_attr,
 };
 
 static struct omap_hwmod_class omap2xxx_counter_hwmod_class = {
index bbda6887388bcae23e4969c05d8285202b312f35..6f81d7a4fec1820969bf173237a6534293f849bd 100644 (file)
@@ -139,8 +139,6 @@ extern struct omap_hwmod_class am33xx_epwmss_hwmod_class;
 extern struct omap_hwmod_class am33xx_ehrpwm_hwmod_class;
 extern struct omap_hwmod_class am33xx_spi_hwmod_class;
 
-extern struct omap2_mcspi_dev_attr mcspi_attrib;
-
 void omap_hwmod_am33xx_reg(void);
 void omap_hwmod_am43xx_reg(void);
 
index b1118b1124d97d5c5f81a67033487dd5a91feb68..5efe91c6e95befc207e17dd0904ff46aa810780b 100644 (file)
@@ -17,7 +17,6 @@
 #include <linux/types.h>
 
 #include <linux/platform_data/hsmmc-omap.h>
-#include <linux/platform_data/spi-omap2-mcspi.h>
 #include "omap_hwmod.h"
 #include "i2c.h"
 #include "wd_timer.h"
@@ -879,13 +878,9 @@ static struct omap_hwmod_class_sysconfig am33xx_mcspi_sysc = {
 struct omap_hwmod_class am33xx_spi_hwmod_class = {
        .name           = "mcspi",
        .sysc           = &am33xx_mcspi_sysc,
-       .rev            = OMAP4_MCSPI_REV,
 };
 
 /* spi0 */
-struct omap2_mcspi_dev_attr mcspi_attrib = {
-       .num_chipselect = 2,
-};
 struct omap_hwmod am33xx_spi0_hwmod = {
        .name           = "spi0",
        .class          = &am33xx_spi_hwmod_class,
@@ -896,7 +891,6 @@ struct omap_hwmod am33xx_spi0_hwmod = {
                        .modulemode     = MODULEMODE_SWCTRL,
                },
        },
-       .dev_attr       = &mcspi_attrib,
 };
 
 /* spi1 */
@@ -910,7 +904,6 @@ struct omap_hwmod am33xx_spi1_hwmod = {
                        .modulemode     = MODULEMODE_SWCTRL,
                },
        },
-       .dev_attr       = &mcspi_attrib,
 };
 
 /*
index 232d03045c6d942d9ae99966335e0de208d97de7..53e1ac3724f287fb94c803a07d50a2eb3436f32f 100644 (file)
@@ -17,8 +17,6 @@
 #include <linux/i2c-omap.h>
 
 #include "omap_hwmod.h"
-#include <linux/platform_data/spi-omap2-mcspi.h>
-
 #include "omap_hwmod_common_data.h"
 
 #include "control.h"
index 7515119cab64bc5fc3e34dc0c75bb5885ba9896e..23008cb351407468fc5eee451d7ae446a24495ba 100644 (file)
@@ -23,7 +23,6 @@
 #include "l3_3xxx.h"
 #include "l4_3xxx.h"
 #include <linux/platform_data/asoc-ti-mcbsp.h>
-#include <linux/platform_data/spi-omap2-mcspi.h>
 
 #include "soc.h"
 #include "omap_hwmod.h"
@@ -1189,14 +1188,9 @@ static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
 static struct omap_hwmod_class omap34xx_mcspi_class = {
        .name = "mcspi",
        .sysc = &omap34xx_mcspi_sysc,
-       .rev = OMAP3_MCSPI_REV,
 };
 
 /* mcspi1 */
-static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
-       .num_chipselect = 4,
-};
-
 static struct omap_hwmod omap34xx_mcspi1 = {
        .name           = "mcspi1",
        .main_clk       = "mcspi1_fck",
@@ -1208,14 +1202,9 @@ static struct omap_hwmod omap34xx_mcspi1 = {
                },
        },
        .class          = &omap34xx_mcspi_class,
-       .dev_attr       = &omap_mcspi1_dev_attr,
 };
 
 /* mcspi2 */
-static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
-       .num_chipselect = 2,
-};
-
 static struct omap_hwmod omap34xx_mcspi2 = {
        .name           = "mcspi2",
        .main_clk       = "mcspi2_fck",
@@ -1227,16 +1216,9 @@ static struct omap_hwmod omap34xx_mcspi2 = {
                },
        },
        .class          = &omap34xx_mcspi_class,
-       .dev_attr       = &omap_mcspi2_dev_attr,
 };
 
 /* mcspi3 */
-
-
-static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
-       .num_chipselect = 2,
-};
-
 static struct omap_hwmod omap34xx_mcspi3 = {
        .name           = "mcspi3",
        .main_clk       = "mcspi3_fck",
@@ -1248,16 +1230,9 @@ static struct omap_hwmod omap34xx_mcspi3 = {
                },
        },
        .class          = &omap34xx_mcspi_class,
-       .dev_attr       = &omap_mcspi3_dev_attr,
 };
 
 /* mcspi4 */
-
-
-static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
-       .num_chipselect = 1,
-};
-
 static struct omap_hwmod omap34xx_mcspi4 = {
        .name           = "mcspi4",
        .main_clk       = "mcspi4_fck",
@@ -1269,7 +1244,6 @@ static struct omap_hwmod omap34xx_mcspi4 = {
                },
        },
        .class          = &omap34xx_mcspi_class,
-       .dev_attr       = &omap_mcspi4_dev_attr,
 };
 
 /* usbhsotg */
index 4f31ce899869f4d97be377446eb3979d764fbe2e..5f73b730d4fc7c89f3819c2cd76da42c4093f22e 100644 (file)
@@ -14,7 +14,6 @@
  * GNU General Public License for more details.
  */
 
-#include <linux/platform_data/spi-omap2-mcspi.h>
 #include "omap_hwmod.h"
 #include "omap_hwmod_33xx_43xx_common_data.h"
 #include "prcm43xx.h"
@@ -237,7 +236,6 @@ static struct omap_hwmod am43xx_spi2_hwmod = {
                        .modulemode   = MODULEMODE_SWCTRL,
                },
        },
-       .dev_attr       = &mcspi_attrib,
 };
 
 static struct omap_hwmod am43xx_spi3_hwmod = {
@@ -251,7 +249,6 @@ static struct omap_hwmod am43xx_spi3_hwmod = {
                        .modulemode   = MODULEMODE_SWCTRL,
                },
        },
-       .dev_attr       = &mcspi_attrib,
 };
 
 static struct omap_hwmod am43xx_spi4_hwmod = {
@@ -265,7 +262,6 @@ static struct omap_hwmod am43xx_spi4_hwmod = {
                        .modulemode   = MODULEMODE_SWCTRL,
                },
        },
-       .dev_attr       = &mcspi_attrib,
 };
 
 static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
index 70eb826d5f6539e05664ff257b98533b8b8bd24c..5a313483b3b80168e558f7e8772a376f0075d248 100644 (file)
@@ -27,7 +27,6 @@
 
 #include <linux/omap-dma.h>
 
-#include <linux/platform_data/spi-omap2-mcspi.h>
 #include <linux/platform_data/asoc-ti-mcbsp.h>
 
 #include "omap_hwmod.h"
@@ -1838,14 +1837,9 @@ static struct omap_hwmod_class_sysconfig omap44xx_mcspi_sysc = {
 static struct omap_hwmod_class omap44xx_mcspi_hwmod_class = {
        .name   = "mcspi",
        .sysc   = &omap44xx_mcspi_sysc,
-       .rev    = OMAP4_MCSPI_REV,
 };
 
 /* mcspi1 */
-static struct omap2_mcspi_dev_attr mcspi1_dev_attr = {
-       .num_chipselect = 4,
-};
-
 static struct omap_hwmod omap44xx_mcspi1_hwmod = {
        .name           = "mcspi1",
        .class          = &omap44xx_mcspi_hwmod_class,
@@ -1858,14 +1852,9 @@ static struct omap_hwmod omap44xx_mcspi1_hwmod = {
                        .modulemode   = MODULEMODE_SWCTRL,
                },
        },
-       .dev_attr       = &mcspi1_dev_attr,
 };
 
 /* mcspi2 */
-static struct omap2_mcspi_dev_attr mcspi2_dev_attr = {
-       .num_chipselect = 2,
-};
-
 static struct omap_hwmod omap44xx_mcspi2_hwmod = {
        .name           = "mcspi2",
        .class          = &omap44xx_mcspi_hwmod_class,
@@ -1878,14 +1867,9 @@ static struct omap_hwmod omap44xx_mcspi2_hwmod = {
                        .modulemode   = MODULEMODE_SWCTRL,
                },
        },
-       .dev_attr       = &mcspi2_dev_attr,
 };
 
 /* mcspi3 */
-static struct omap2_mcspi_dev_attr mcspi3_dev_attr = {
-       .num_chipselect = 2,
-};
-
 static struct omap_hwmod omap44xx_mcspi3_hwmod = {
        .name           = "mcspi3",
        .class          = &omap44xx_mcspi_hwmod_class,
@@ -1898,14 +1882,9 @@ static struct omap_hwmod omap44xx_mcspi3_hwmod = {
                        .modulemode   = MODULEMODE_SWCTRL,
                },
        },
-       .dev_attr       = &mcspi3_dev_attr,
 };
 
 /* mcspi4 */
-static struct omap2_mcspi_dev_attr mcspi4_dev_attr = {
-       .num_chipselect = 1,
-};
-
 static struct omap_hwmod omap44xx_mcspi4_hwmod = {
        .name           = "mcspi4",
        .class          = &omap44xx_mcspi_hwmod_class,
@@ -1918,7 +1897,6 @@ static struct omap_hwmod omap44xx_mcspi4_hwmod = {
                        .modulemode   = MODULEMODE_SWCTRL,
                },
        },
-       .dev_attr       = &mcspi4_dev_attr,
 };
 
 /*
index 2275789854dc19ba7b6af405db2065641972def9..f901b17bd73af3997ece866a8fb4ee2fb673df1b 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/i2c-omap.h>
 
 #include <linux/omap-dma.h>
-#include <linux/platform_data/spi-omap2-mcspi.h>
 #include <linux/platform_data/asoc-ti-mcbsp.h>
 
 #include "omap_hwmod.h"
@@ -1123,15 +1122,9 @@ static struct omap_hwmod_class_sysconfig omap54xx_mcspi_sysc = {
 static struct omap_hwmod_class omap54xx_mcspi_hwmod_class = {
        .name   = "mcspi",
        .sysc   = &omap54xx_mcspi_sysc,
-       .rev    = OMAP4_MCSPI_REV,
 };
 
 /* mcspi1 */
-/* mcspi1 dev_attr */
-static struct omap2_mcspi_dev_attr mcspi1_dev_attr = {
-       .num_chipselect = 4,
-};
-
 static struct omap_hwmod omap54xx_mcspi1_hwmod = {
        .name           = "mcspi1",
        .class          = &omap54xx_mcspi_hwmod_class,
@@ -1144,15 +1137,9 @@ static struct omap_hwmod omap54xx_mcspi1_hwmod = {
                        .modulemode   = MODULEMODE_SWCTRL,
                },
        },
-       .dev_attr       = &mcspi1_dev_attr,
 };
 
 /* mcspi2 */
-/* mcspi2 dev_attr */
-static struct omap2_mcspi_dev_attr mcspi2_dev_attr = {
-       .num_chipselect = 2,
-};
-
 static struct omap_hwmod omap54xx_mcspi2_hwmod = {
        .name           = "mcspi2",
        .class          = &omap54xx_mcspi_hwmod_class,
@@ -1165,15 +1152,9 @@ static struct omap_hwmod omap54xx_mcspi2_hwmod = {
                        .modulemode   = MODULEMODE_SWCTRL,
                },
        },
-       .dev_attr       = &mcspi2_dev_attr,
 };
 
 /* mcspi3 */
-/* mcspi3 dev_attr */
-static struct omap2_mcspi_dev_attr mcspi3_dev_attr = {
-       .num_chipselect = 2,
-};
-
 static struct omap_hwmod omap54xx_mcspi3_hwmod = {
        .name           = "mcspi3",
        .class          = &omap54xx_mcspi_hwmod_class,
@@ -1186,15 +1167,9 @@ static struct omap_hwmod omap54xx_mcspi3_hwmod = {
                        .modulemode   = MODULEMODE_SWCTRL,
                },
        },
-       .dev_attr       = &mcspi3_dev_attr,
 };
 
 /* mcspi4 */
-/* mcspi4 dev_attr */
-static struct omap2_mcspi_dev_attr mcspi4_dev_attr = {
-       .num_chipselect = 1,
-};
-
 static struct omap_hwmod omap54xx_mcspi4_hwmod = {
        .name           = "mcspi4",
        .class          = &omap54xx_mcspi_hwmod_class,
@@ -1207,7 +1182,6 @@ static struct omap_hwmod omap54xx_mcspi4_hwmod = {
                        .modulemode   = MODULEMODE_SWCTRL,
                },
        },
-       .dev_attr       = &mcspi4_dev_attr,
 };
 
 /*
index d0f1fd65d01fb135c09af1d865291f7d40833cbc..d66dc806425d25f0e6d26456dd1082c5a9b2ac36 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/i2c-omap.h>
 
 #include <linux/omap-dma.h>
-#include <linux/platform_data/spi-omap2-mcspi.h>
 #include <linux/platform_data/asoc-ti-mcbsp.h>
 
 #include "omap_hwmod.h"
@@ -1375,15 +1374,9 @@ static struct omap_hwmod_class_sysconfig dra7xx_mcspi_sysc = {
 static struct omap_hwmod_class dra7xx_mcspi_hwmod_class = {
        .name   = "mcspi",
        .sysc   = &dra7xx_mcspi_sysc,
-       .rev    = OMAP4_MCSPI_REV,
 };
 
 /* mcspi1 */
-/* mcspi1 dev_attr */
-static struct omap2_mcspi_dev_attr mcspi1_dev_attr = {
-       .num_chipselect = 4,
-};
-
 static struct omap_hwmod dra7xx_mcspi1_hwmod = {
        .name           = "mcspi1",
        .class          = &dra7xx_mcspi_hwmod_class,
@@ -1396,15 +1389,9 @@ static struct omap_hwmod dra7xx_mcspi1_hwmod = {
                        .modulemode   = MODULEMODE_SWCTRL,
                },
        },
-       .dev_attr       = &mcspi1_dev_attr,
 };
 
 /* mcspi2 */
-/* mcspi2 dev_attr */
-static struct omap2_mcspi_dev_attr mcspi2_dev_attr = {
-       .num_chipselect = 2,
-};
-
 static struct omap_hwmod dra7xx_mcspi2_hwmod = {
        .name           = "mcspi2",
        .class          = &dra7xx_mcspi_hwmod_class,
@@ -1417,15 +1404,9 @@ static struct omap_hwmod dra7xx_mcspi2_hwmod = {
                        .modulemode   = MODULEMODE_SWCTRL,
                },
        },
-       .dev_attr       = &mcspi2_dev_attr,
 };
 
 /* mcspi3 */
-/* mcspi3 dev_attr */
-static struct omap2_mcspi_dev_attr mcspi3_dev_attr = {
-       .num_chipselect = 2,
-};
-
 static struct omap_hwmod dra7xx_mcspi3_hwmod = {
        .name           = "mcspi3",
        .class          = &dra7xx_mcspi_hwmod_class,
@@ -1438,15 +1419,9 @@ static struct omap_hwmod dra7xx_mcspi3_hwmod = {
                        .modulemode   = MODULEMODE_SWCTRL,
                },
        },
-       .dev_attr       = &mcspi3_dev_attr,
 };
 
 /* mcspi4 */
-/* mcspi4 dev_attr */
-static struct omap2_mcspi_dev_attr mcspi4_dev_attr = {
-       .num_chipselect = 1,
-};
-
 static struct omap_hwmod dra7xx_mcspi4_hwmod = {
        .name           = "mcspi4",
        .class          = &dra7xx_mcspi_hwmod_class,
@@ -1459,7 +1434,6 @@ static struct omap_hwmod dra7xx_mcspi4_hwmod = {
                        .modulemode   = MODULEMODE_SWCTRL,
                },
        },
-       .dev_attr       = &mcspi4_dev_attr,
 };
 
 /*
index 333a896c0c9afbab7fdd453ae98a1a4f33c44c7b..686655f884c15a562e9408a0ea7389cf44f2f8fb 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/types.h>
 
 #include <linux/platform_data/hsmmc-omap.h>
-#include <linux/platform_data/spi-omap2-mcspi.h>
 
 #include "omap_hwmod_common_data.h"
 #include "cm81xx.h"
@@ -1118,11 +1117,6 @@ static struct omap_hwmod_class_sysconfig dm816x_mcspi_sysc = {
 static struct omap_hwmod_class dm816x_mcspi_class = {
        .name = "mcspi",
        .sysc = &dm816x_mcspi_sysc,
-       .rev = OMAP3_MCSPI_REV,
-};
-
-static struct omap2_mcspi_dev_attr dm816x_mcspi1_dev_attr = {
-       .num_chipselect = 4,
 };
 
 static struct omap_hwmod dm81xx_mcspi1_hwmod = {
@@ -1136,7 +1130,6 @@ static struct omap_hwmod dm81xx_mcspi1_hwmod = {
                },
        },
        .class          = &dm816x_mcspi_class,
-       .dev_attr       = &dm816x_mcspi1_dev_attr,
 };
 
 static struct omap_hwmod_ocp_if dm81xx_l4_ls__mcspi1 = {
index 13c83a25958a6b9bd8db6524a508e412dfc21ff1..0bf9fddb830640dd282c38ee1a001e9c9d2b4f6e 100644 (file)
@@ -2,10 +2,6 @@
 #ifndef _OMAP2_MCSPI_H
 #define _OMAP2_MCSPI_H
 
-#define OMAP2_MCSPI_REV 0
-#define OMAP3_MCSPI_REV 1
-#define OMAP4_MCSPI_REV 2
-
 #define OMAP4_MCSPI_REG_OFFSET 0x100
 
 #define MCSPI_PINDIR_D0_IN_D1_OUT      0
@@ -17,10 +13,6 @@ struct omap2_mcspi_platform_config {
        unsigned int pin_dir:1;
 };
 
-struct omap2_mcspi_dev_attr {
-       unsigned short num_chipselect;
-};
-
 struct omap2_mcspi_device_config {
        unsigned turbo_mode:1;