|
|
Re: [PATCH v4 3/4] OMAP2+: use control module mfd driver in omap_type |
Hello. On 25-07-2012 15:05, Konstantin Baydarov wrote:
OMAP system control module can be probed early, then omap_type is safe to use its APIs.
TODO: add support for other omap versions
Signed-off-by: Eduardo Valentin <eduardo.valentin@xxxxxx> Signed-off-by: Konstantin Baydarov <kbaidarov@xxxxxxxxxxxxx> --- arch/arm/mach-omap2/id.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 40373db..8018cad 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c
[...]
@@ -43,15 +44,15 @@ int omap_type(void)
u32 val = 0;
if (cpu_is_omap24xx()) {
- val = omap_ctrl_readl(OMAP24XX_CONTROL_STATUS);
+ val = omap_control_status_read();
} else if (soc_is_am33xx()) {
- val = omap_ctrl_readl(AM33XX_CONTROL_STATUS);
+ val = omap_control_status_read();
} else if (cpu_is_omap34xx()) {
- val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS);
+ val = omap_control_status_read();
} else if (cpu_is_omap44xx()) {
- val = omap_ctrl_readl(OMAP4_CTRL_MODULE_CORE_STATUS);
+ val = omap_control_status_read();
Isn't it better to merge now identical code into one *if*? WBR, Sergei _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
[Linux ARM (vger)] [Linux ARM MSM] [Linux Omap] [Linux Arm] [Linux Tegra] [Fedora ARM] [eCos] [Linux Fastboot] [Gcc Help] [Git] [DCCP] [IETF Announce] [Security] [PDAs] [Linux] [Linux MIPS] [Yosemite Campsites] [Photos]
![]() |
![]() |