diff mbox

[RFC,10/9] OMAP4: HWMOD: differentiate 4430 and 4460 bandgap

Message ID 1306381285-17764-1-git-send-email-nm@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Nishanth Menon May 26, 2011, 3:41 a.m. UTC
OMAP4430 and 4460 have slightly different functional clocks.
we need to map this back into hwmod database as well to ensure
sanity.

Signed-off-by: Nishanth Menon <nm@ti.com>
---
Depends on the series posted earlier for http://marc.info/?l=linux-omap&m=130637503008641&w=2
missed tracking this down after a last min update :(
Boot tested on both SDP4430 and SDP4460

 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |   30 ++++++++++++++++++++++-----
 1 files changed, 24 insertions(+), 6 deletions(-)

Comments

vikram pandita May 26, 2011, 3:46 a.m. UTC | #1
On Wed, May 25, 2011 at 8:41 PM, Nishanth Menon <nm@ti.com> wrote:
> diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
<snip>
> +static struct omap_hwmod_opt_clk bandgap446x_opt_clks[] = {
> +       { .role = "fclk", .clk = "bandgap_ts_fclk" },
> +};
> +
> +static struct omap_hwmod omap446x_bandgap_hwmod = {
> +       .name           = "bandgap",
> +       .class          = &omap44xx_bandgap_hwmod_class,
> +       .prcm           = {
> +               .omap4 = {
> +                       .clkctrl_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL,
> +               },
> +       },
> +       .opt_clks       = bandgap446x_opt_clks,
> +       .opt_clks_cnt   = ARRAY_SIZE(bandgap446x_opt_clks),
> +       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP4460),

Does it call for having CHIP_IS_OMAP446X instead of CHIP_IS_OMAP4460 ?

What happens when we get say es2.0 for 4460? how do you accommodate that?
Take care of that case when the new silicon arrives or fix it now :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Nishanth Menon May 26, 2011, 3:54 a.m. UTC | #2
On Wed, May 25, 2011 at 20:46, Pandita, Vikram <vikram.pandita@ti.com> wrote:
> On Wed, May 25, 2011 at 8:41 PM, Nishanth Menon <nm@ti.com> wrote:
>> diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
> <snip>
>> +static struct omap_hwmod_opt_clk bandgap446x_opt_clks[] = {
>> +       { .role = "fclk", .clk = "bandgap_ts_fclk" },
>> +};
>> +
>> +static struct omap_hwmod omap446x_bandgap_hwmod = {
>> +       .name           = "bandgap",
>> +       .class          = &omap44xx_bandgap_hwmod_class,
>> +       .prcm           = {
>> +               .omap4 = {
>> +                       .clkctrl_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL,
>> +               },
>> +       },
>> +       .opt_clks       = bandgap446x_opt_clks,
>> +       .opt_clks_cnt   = ARRAY_SIZE(bandgap446x_opt_clks),
>> +       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP4460),
>
> Does it call for having CHIP_IS_OMAP446X instead of CHIP_IS_OMAP4460 ?
>
> What happens when we get say es2.0 for 4460? how do you accommodate that?
> Take care of that case when the new silicon arrives or fix it now :-)

Probably Paul/Benoit can state their preference.

Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 27319c4..9ac9cac 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -762,11 +762,11 @@  static struct omap_hwmod_class omap44xx_bandgap_hwmod_class = {
 };
 
 /* bandgap */
-static struct omap_hwmod_opt_clk bandgap_opt_clks[] = {
+static struct omap_hwmod_opt_clk bandgap443x_opt_clks[] = {
 	{ .role = "fclk", .clk = "bandgap_fclk" },
 };
 
-static struct omap_hwmod omap44xx_bandgap_hwmod = {
+static struct omap_hwmod omap443x_bandgap_hwmod = {
 	.name		= "bandgap",
 	.class		= &omap44xx_bandgap_hwmod_class,
 	.prcm		= {
@@ -774,9 +774,26 @@  static struct omap_hwmod omap44xx_bandgap_hwmod = {
 			.clkctrl_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL,
 		},
 	},
-	.opt_clks	= bandgap_opt_clks,
-	.opt_clks_cnt	= ARRAY_SIZE(bandgap_opt_clks),
-	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP44XX),
+	.opt_clks	= bandgap443x_opt_clks,
+	.opt_clks_cnt	= ARRAY_SIZE(bandgap443x_opt_clks),
+	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
+};
+
+static struct omap_hwmod_opt_clk bandgap446x_opt_clks[] = {
+	{ .role = "fclk", .clk = "bandgap_ts_fclk" },
+};
+
+static struct omap_hwmod omap446x_bandgap_hwmod = {
+	.name		= "bandgap",
+	.class		= &omap44xx_bandgap_hwmod_class,
+	.prcm		= {
+		.omap4 = {
+			.clkctrl_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL,
+		},
+	},
+	.opt_clks	= bandgap446x_opt_clks,
+	.opt_clks_cnt	= ARRAY_SIZE(bandgap446x_opt_clks),
+	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP4460),
 };
 
 /*
@@ -5074,7 +5091,8 @@  static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
 /*	&omap44xx_aess_hwmod, */
 
 	/* bandgap class */
-	&omap44xx_bandgap_hwmod,
+	&omap443x_bandgap_hwmod,
+	&omap446x_bandgap_hwmod,
 
 	/* counter class */
 /*	&omap44xx_counter_32k_hwmod, */