On Wed, Nov 23, 2011 at 11:22:42AM +0100, Jean Pihet wrote: > Hi Felipe, > > On Wed, Nov 23, 2011 at 10:51 AM, Felipe Balbi <balbi@xxxxxx> wrote: > > On Tue, Nov 22, 2011 at 04:06:09PM +0100, jean.pihet@xxxxxxxxxxxxxx wrote: > >> +config POWER_AVS_OMAP_V1 > >> + tristate "AVS support for the OMAP IP version 1" > >> + depends on ARCH_OMAP3 && PM > >> + help > >> + Say Y to enable AVS support on OMAP containing the version 1 of > >> + the SmartReflex IP. > >> + V1 is the 65nm version used in OMAP3430. > >> + > >> + Please note, that by default SmartReflex is only > >> + initialized. To enable the automatic voltage > >> + compensation for vdd mpu and vdd core from user space, > >> + user must write 1 to > >> + /debug/voltage/vdd_<X>/smartreflex/autocomp, > >> + where X is mpu or core for OMAP3. > >> + Optionally autocompensation can be enabled in the kernel > >> + by default during system init via the enable_on_init flag > >> + which an be passed as platform data to the smartreflex driver. > >> + > >> +config POWER_AVS_OMAP_V2 > >> + tristate "AVS support for the OMAP IP version 2" > >> + depends on (ARCH_OMAP3 || ARCH_OMAP4) && PM > >> + help > >> + Say Y to enable AVS support on OMAP containing the version 2 of > >> + the SmartReflex IP. > >> + V2 is the update for the 45nm version of the IP used in OMAP3630 > >> + and OMAP4430 > > > > can't you read the revision register and decide this in runtime ? > Those Kconfig options are used to compile the v1 and/or v2 drivers. > The init of v1 or v2 is decided at runtime, cf. the sr_init functions > where the cpu revision is checked. Is this the correct check? if you already decide in runtime the correct initialization to call, why do you add ifdefs ? It's not like you're adding that huge amount of code for v1 and v2, right ? -- balbi
Attachment:
signature.asc
Description: Digital signature