Re: [PATCH 25/26] OMAP: PM: convert the SmartReflex code into the AVS driver framework

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

 



Felipe,

On Wed, Nov 23, 2011 at 12:04 PM, Felipe Balbi <balbi@xxxxxx> wrote:
> 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 ?
There is no #ifdef with CONFIG_POWER_AVS_OMAP_V[12], those options are
used to compile or not the respective modules, cf.
driver/power/avs/Makefile.

> It's not like you're adding that huge amount of code
> for v1 and v2, right ?
That is correct, so both modules could be always compiled and init'ed
at runtime depending on the chip revision.

I am OK to change the code, please let me know what you think.

>
> --
> balbi
>

Thanks,
Jean
--
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