Re: [RFC PATCH] arm:omap: cleanup & split omap2/3/4_check_revision function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Hiremath, Vaibhav <hvaibhav@xxxxxx> [111208 05:08]:
> > From: Tony Lindgren [mailto:tony@xxxxxxxxxxx]
> > 
> > Maybe just call ti816x_check_features separately?
> > 
> > 	omap3xxx_check_revision();
> > 	omap3xxx_check_features();
> > and
> > 	omap3xxx_check_revision();
> > 	ti816x_check_features();
> > 
> The reason why I did not do this is,
> 
> In case of omap3_check_revision, 
> 
> Void __init omap3xxx_check_revision()
> {
> 	const char *cpu_rev;
> 
> 	omap3_check_revision(&cpu_rev);
> 	omap3_check_features();
> 	omap3_cpuinfo(cpu_rev);
> }
> 
> 
> If I separate, omap3_check_revision() and omap3_check_features(), then I 
> have to maintain cpu_rev in the parent function. Also, I can not break the 
> sequence due to this dependency on cpu_rev. and I wanted to retain the void
> function calls in omap3_init_early().
> So I came up with this optimized and clean way of using "has_feature_reg" 
> Flag, and set to default features for AM family of devices.
> 
> OR
> As you suggested, I have to maintain cpu_rev into function 
> omap3_init_early() and call the above 3 function in the sequence
> (alone for omap3).

Let's still plan on separating check_revision and check_features
so we can simplify things. How about something like this:

static const char *cpu_rev;

void __init omap3xxx_check_revision(void)
{
	...
}

static void __init omap3_cpuinfo()
{
	...
}

void __init omap3xxx_check_features(void)
{
	...
	omap3_cpuinfo();
}

void __init ti816x_check_features(void)
{
	...
	omap3_cpuinfo();
}

Then we can easily add whatever combinations are needed
and hopefully can move check_features to happen later on
eventually.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux