Hi Nishant,
You can make the opp init more generic by changing omap_init_opp_table to be:
int __init omap_init_opp_table(struct omap_opp_def *opp_list)
instead of below. And then..
> +int __init omap_init_opp_table(void)
> +{
> + struct omap_opp_def *opp_def;
> + u32 opp_def_size;
> + int i, r;
> +
> + /*
> + * Allow multiple calls, but initialize only if not already initalized
> + * even if the previous call failed, coz, no reason we'd succeed again
> + */
> + if (omap_table_init)
> + return 0;
> + omap_table_init = 1;
> +
> + /* Select the OPP table we'd like to enable based on cpu we are on */
> + if (cpu_is_omap34xx()) {
> + opp_def = cpu_is_omap3630() ? omap36xx_opp_def_list :
> + omap34xx_opp_def_list;
> + opp_def_size = cpu_is_omap3630() ?
> + ARRAY_SIZE(omap36xx_opp_def_list) :
> + ARRAY_SIZE(omap34xx_opp_def_list);
> + } else {
> + pr_err("%s: called for an unsupported cpu type\n", __func__);
> + return -EINVAL;
> + }
..the above can go into omap3 and omap4 specific init functions so this
function stays generic.
Regards,
Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html