Commit 70451127 authored by Tony Lindgren's avatar Tony Lindgren

ARM: OMAP2+: Remove hwmod .rev data and use local SoC checks instead

We can just check for omap2 and 3 for i2c and smartreflex locally.
The rest of the .rev data is already unused.

Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent b57250fa
...@@ -53,15 +53,10 @@ int omap_i2c_reset(struct omap_hwmod *oh) ...@@ -53,15 +53,10 @@ int omap_i2c_reset(struct omap_hwmod *oh)
u16 i2c_con; u16 i2c_con;
int c = 0; int c = 0;
if (oh->class->rev == OMAP_I2C_IP_VERSION_2) { if (soc_is_omap24xx() || soc_is_omap34xx() || soc_is_am35xx())
i2c_con = OMAP4_I2C_CON_OFFSET;
} else if (oh->class->rev == OMAP_I2C_IP_VERSION_1) {
i2c_con = OMAP2_I2C_CON_OFFSET; i2c_con = OMAP2_I2C_CON_OFFSET;
} else { else
WARN(1, "Cannot reset I2C block %s: unsupported revision\n", i2c_con = OMAP4_I2C_CON_OFFSET;
oh->name);
return -EINVAL;
}
/* Disable I2C */ /* Disable I2C */
v = omap_hwmod_read(oh, i2c_con); v = omap_hwmod_read(oh, i2c_con);
......
...@@ -503,7 +503,6 @@ struct omap_hwmod_omap4_prcm { ...@@ -503,7 +503,6 @@ struct omap_hwmod_omap4_prcm {
* struct omap_hwmod_class - the type of an IP block * struct omap_hwmod_class - the type of an IP block
* @name: name of the hwmod_class * @name: name of the hwmod_class
* @sysc: device SYSCONFIG/SYSSTATUS register data * @sysc: device SYSCONFIG/SYSSTATUS register data
* @rev: revision of the IP class
* @pre_shutdown: ptr to fn to be executed immediately prior to device shutdown * @pre_shutdown: ptr to fn to be executed immediately prior to device shutdown
* @reset: ptr to fn to be executed in place of the standard hwmod reset fn * @reset: ptr to fn to be executed in place of the standard hwmod reset fn
* @enable_preprogram: ptr to fn to be executed during device enable * @enable_preprogram: ptr to fn to be executed during device enable
...@@ -529,7 +528,6 @@ struct omap_hwmod_omap4_prcm { ...@@ -529,7 +528,6 @@ struct omap_hwmod_omap4_prcm {
struct omap_hwmod_class { struct omap_hwmod_class {
const char *name; const char *name;
struct omap_hwmod_class_sysconfig *sysc; struct omap_hwmod_class_sysconfig *sysc;
u32 rev;
int (*pre_shutdown)(struct omap_hwmod *oh); int (*pre_shutdown)(struct omap_hwmod *oh);
int (*reset)(struct omap_hwmod *oh); int (*reset)(struct omap_hwmod *oh);
int (*enable_preprogram)(struct omap_hwmod *oh); int (*enable_preprogram)(struct omap_hwmod *oh);
......
...@@ -91,7 +91,6 @@ static struct omap_hwmod_class_sysconfig i2c_sysc = { ...@@ -91,7 +91,6 @@ static struct omap_hwmod_class_sysconfig i2c_sysc = {
static struct omap_hwmod_class i2c_class = { static struct omap_hwmod_class i2c_class = {
.name = "i2c", .name = "i2c",
.sysc = &i2c_sysc, .sysc = &i2c_sysc,
.rev = OMAP_I2C_IP_VERSION_1,
.reset = &omap_i2c_reset, .reset = &omap_i2c_reset,
}; };
......
...@@ -68,7 +68,6 @@ static struct omap_hwmod_class_sysconfig i2c_sysc = { ...@@ -68,7 +68,6 @@ static struct omap_hwmod_class_sysconfig i2c_sysc = {
static struct omap_hwmod_class i2c_class = { static struct omap_hwmod_class i2c_class = {
.name = "i2c", .name = "i2c",
.sysc = &i2c_sysc, .sysc = &i2c_sysc,
.rev = OMAP_I2C_IP_VERSION_1,
.reset = &omap_i2c_reset, .reset = &omap_i2c_reset,
}; };
......
...@@ -96,7 +96,6 @@ static struct omap_hwmod_class_sysconfig omap2xxx_gpio_sysc = { ...@@ -96,7 +96,6 @@ static struct omap_hwmod_class_sysconfig omap2xxx_gpio_sysc = {
struct omap_hwmod_class omap2xxx_gpio_hwmod_class = { struct omap_hwmod_class omap2xxx_gpio_hwmod_class = {
.name = "gpio", .name = "gpio",
.sysc = &omap2xxx_gpio_sysc, .sysc = &omap2xxx_gpio_sysc,
.rev = 0,
}; };
/* system dma */ /* system dma */
......
...@@ -534,7 +534,6 @@ static struct omap_hwmod_class_sysconfig am33xx_gpio_sysc = { ...@@ -534,7 +534,6 @@ static struct omap_hwmod_class_sysconfig am33xx_gpio_sysc = {
struct omap_hwmod_class am33xx_gpio_hwmod_class = { struct omap_hwmod_class am33xx_gpio_hwmod_class = {
.name = "gpio", .name = "gpio",
.sysc = &am33xx_gpio_sysc, .sysc = &am33xx_gpio_sysc,
.rev = 2,
}; };
/* gpio1 */ /* gpio1 */
...@@ -643,7 +642,6 @@ static struct omap_hwmod_class_sysconfig am33xx_i2c_sysc = { ...@@ -643,7 +642,6 @@ static struct omap_hwmod_class_sysconfig am33xx_i2c_sysc = {
static struct omap_hwmod_class i2c_class = { static struct omap_hwmod_class i2c_class = {
.name = "i2c", .name = "i2c",
.sysc = &am33xx_i2c_sysc, .sysc = &am33xx_i2c_sysc,
.rev = OMAP_I2C_IP_VERSION_2,
.reset = &omap_i2c_reset, .reset = &omap_i2c_reset,
}; };
......
...@@ -484,7 +484,6 @@ static struct omap_hwmod am35xx_uart4_hwmod = { ...@@ -484,7 +484,6 @@ static struct omap_hwmod am35xx_uart4_hwmod = {
static struct omap_hwmod_class i2c_class = { static struct omap_hwmod_class i2c_class = {
.name = "i2c", .name = "i2c",
.sysc = &i2c_sysc, .sysc = &i2c_sysc,
.rev = OMAP_I2C_IP_VERSION_1,
.reset = &omap_i2c_reset, .reset = &omap_i2c_reset,
}; };
...@@ -707,7 +706,6 @@ static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = { ...@@ -707,7 +706,6 @@ static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = { static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
.name = "gpio", .name = "gpio",
.sysc = &omap3xxx_gpio_sysc, .sysc = &omap3xxx_gpio_sysc,
.rev = 1,
}; };
/* gpio1 */ /* gpio1 */
...@@ -1029,7 +1027,6 @@ static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = { ...@@ -1029,7 +1027,6 @@ static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = { static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
.name = "smartreflex", .name = "smartreflex",
.sysc = &omap34xx_sr_sysc, .sysc = &omap34xx_sr_sysc,
.rev = 1,
}; };
static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = { static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
...@@ -1044,7 +1041,6 @@ static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = { ...@@ -1044,7 +1041,6 @@ static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = { static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
.name = "smartreflex", .name = "smartreflex",
.sysc = &omap36xx_sr_sysc, .sysc = &omap36xx_sr_sysc,
.rev = 2,
}; };
/* SR1 */ /* SR1 */
......
...@@ -1075,7 +1075,6 @@ static struct omap_hwmod_class_sysconfig omap44xx_gpio_sysc = { ...@@ -1075,7 +1075,6 @@ static struct omap_hwmod_class_sysconfig omap44xx_gpio_sysc = {
static struct omap_hwmod_class omap44xx_gpio_hwmod_class = { static struct omap_hwmod_class omap44xx_gpio_hwmod_class = {
.name = "gpio", .name = "gpio",
.sysc = &omap44xx_gpio_sysc, .sysc = &omap44xx_gpio_sysc,
.rev = 2,
}; };
/* gpio1 */ /* gpio1 */
...@@ -1374,7 +1373,6 @@ static struct omap_hwmod_class_sysconfig omap44xx_i2c_sysc = { ...@@ -1374,7 +1373,6 @@ static struct omap_hwmod_class_sysconfig omap44xx_i2c_sysc = {
static struct omap_hwmod_class omap44xx_i2c_hwmod_class = { static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
.name = "i2c", .name = "i2c",
.sysc = &omap44xx_i2c_sysc, .sysc = &omap44xx_i2c_sysc,
.rev = OMAP_I2C_IP_VERSION_2,
.reset = &omap_i2c_reset, .reset = &omap_i2c_reset,
}; };
...@@ -2367,7 +2365,6 @@ static struct omap_hwmod_class_sysconfig omap44xx_smartreflex_sysc = { ...@@ -2367,7 +2365,6 @@ static struct omap_hwmod_class_sysconfig omap44xx_smartreflex_sysc = {
static struct omap_hwmod_class omap44xx_smartreflex_hwmod_class = { static struct omap_hwmod_class omap44xx_smartreflex_hwmod_class = {
.name = "smartreflex", .name = "smartreflex",
.sysc = &omap44xx_smartreflex_sysc, .sysc = &omap44xx_smartreflex_sysc,
.rev = 2,
}; };
/* smartreflex_core */ /* smartreflex_core */
......
...@@ -620,7 +620,6 @@ static struct omap_hwmod_class_sysconfig omap54xx_gpio_sysc = { ...@@ -620,7 +620,6 @@ static struct omap_hwmod_class_sysconfig omap54xx_gpio_sysc = {
static struct omap_hwmod_class omap54xx_gpio_hwmod_class = { static struct omap_hwmod_class omap54xx_gpio_hwmod_class = {
.name = "gpio", .name = "gpio",
.sysc = &omap54xx_gpio_sysc, .sysc = &omap54xx_gpio_sysc,
.rev = 2,
}; };
/* gpio1 */ /* gpio1 */
...@@ -819,7 +818,6 @@ static struct omap_hwmod_class omap54xx_i2c_hwmod_class = { ...@@ -819,7 +818,6 @@ static struct omap_hwmod_class omap54xx_i2c_hwmod_class = {
.name = "i2c", .name = "i2c",
.sysc = &omap54xx_i2c_sysc, .sysc = &omap54xx_i2c_sysc,
.reset = &omap_i2c_reset, .reset = &omap_i2c_reset,
.rev = OMAP_I2C_IP_VERSION_2,
}; };
/* i2c1 */ /* i2c1 */
......
...@@ -693,7 +693,6 @@ static struct omap_hwmod_class_sysconfig dra7xx_aes_sysc = { ...@@ -693,7 +693,6 @@ static struct omap_hwmod_class_sysconfig dra7xx_aes_sysc = {
static struct omap_hwmod_class dra7xx_aes_hwmod_class = { static struct omap_hwmod_class dra7xx_aes_hwmod_class = {
.name = "aes", .name = "aes",
.sysc = &dra7xx_aes_sysc, .sysc = &dra7xx_aes_sysc,
.rev = 2,
}; };
/* AES1 */ /* AES1 */
...@@ -737,7 +736,6 @@ static struct omap_hwmod_class_sysconfig dra7xx_sha0_sysc = { ...@@ -737,7 +736,6 @@ static struct omap_hwmod_class_sysconfig dra7xx_sha0_sysc = {
static struct omap_hwmod_class dra7xx_sha0_hwmod_class = { static struct omap_hwmod_class dra7xx_sha0_hwmod_class = {
.name = "sham", .name = "sham",
.sysc = &dra7xx_sha0_sysc, .sysc = &dra7xx_sha0_sysc,
.rev = 2,
}; };
struct omap_hwmod dra7xx_sha0_hwmod = { struct omap_hwmod dra7xx_sha0_hwmod = {
...@@ -811,7 +809,6 @@ static struct omap_hwmod_class_sysconfig dra7xx_gpio_sysc = { ...@@ -811,7 +809,6 @@ static struct omap_hwmod_class_sysconfig dra7xx_gpio_sysc = {
static struct omap_hwmod_class dra7xx_gpio_hwmod_class = { static struct omap_hwmod_class dra7xx_gpio_hwmod_class = {
.name = "gpio", .name = "gpio",
.sysc = &dra7xx_gpio_sysc, .sysc = &dra7xx_gpio_sysc,
.rev = 2,
}; };
/* gpio1 */ /* gpio1 */
...@@ -1085,7 +1082,6 @@ static struct omap_hwmod_class dra7xx_i2c_hwmod_class = { ...@@ -1085,7 +1082,6 @@ static struct omap_hwmod_class dra7xx_i2c_hwmod_class = {
.name = "i2c", .name = "i2c",
.sysc = &dra7xx_i2c_sysc, .sysc = &dra7xx_i2c_sysc,
.reset = &omap_i2c_reset, .reset = &omap_i2c_reset,
.rev = OMAP_I2C_IP_VERSION_2,
}; };
/* i2c1 */ /* i2c1 */
...@@ -2019,7 +2015,6 @@ static struct omap_hwmod_class_sysconfig dra7xx_smartreflex_sysc = { ...@@ -2019,7 +2015,6 @@ static struct omap_hwmod_class_sysconfig dra7xx_smartreflex_sysc = {
static struct omap_hwmod_class dra7xx_smartreflex_hwmod_class = { static struct omap_hwmod_class dra7xx_smartreflex_hwmod_class = {
.name = "smartreflex", .name = "smartreflex",
.sysc = &dra7xx_smartreflex_sysc, .sysc = &dra7xx_smartreflex_sysc,
.rev = 2,
}; };
/* smartreflex_core */ /* smartreflex_core */
......
...@@ -484,7 +484,6 @@ static struct omap_hwmod_class_sysconfig dm81xx_gpio_sysc = { ...@@ -484,7 +484,6 @@ static struct omap_hwmod_class_sysconfig dm81xx_gpio_sysc = {
static struct omap_hwmod_class dm81xx_gpio_hwmod_class = { static struct omap_hwmod_class dm81xx_gpio_hwmod_class = {
.name = "gpio", .name = "gpio",
.sysc = &dm81xx_gpio_sysc, .sysc = &dm81xx_gpio_sysc,
.rev = 2,
}; };
static struct omap_hwmod_opt_clk gpio1_opt_clks[] = { static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
......
...@@ -119,7 +119,10 @@ static int __init sr_dev_init(struct omap_hwmod *oh, void *user) ...@@ -119,7 +119,10 @@ static int __init sr_dev_init(struct omap_hwmod *oh, void *user)
} }
sr_data->name = oh->name; sr_data->name = oh->name;
sr_data->ip_type = oh->class->rev; if (cpu_is_omap343x())
sr_data->ip_type = 1;
else
sr_data->ip_type = 2;
sr_data->senn_mod = 0x1; sr_data->senn_mod = 0x1;
sr_data->senp_mod = 0x1; sr_data->senp_mod = 0x1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment