]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
arm: omap3: Enable clocks for peripherals only if they are used
authorMichael Trimarchi <michael@amarulasolutions.com>
Sat, 30 Nov 2013 06:59:58 +0000 (07:59 +0100)
committerTom Rini <trini@ti.com>
Fri, 6 Dec 2013 12:02:32 +0000 (07:02 -0500)
This patch change the per_clocks_enable() function used in OMAP3
code to enable peripherals clocks. Only required clock should be
activated. So if the board use the uart(x) as a console we need
to activate it. The Board's config should include define to enable
every subsystem that the board use. For a complete list
of affected peripherals, registers CM_FCLKEN_PER and CM_ICLKEN_PER
should be checked.
Right now the bootloader can enable and disable clocks for:
uart(x) using CONFIG_SYS_NS16550
gpio bank (x) using CONFIG_OMAP3_GPIO_X with X = { 2, 3, 4, 5, 6 }
i2c bus using CONFIG_DRIVER_OMAP34XX_I2C.

Not required gptimer(x) and mcbsp(x) for booting are disabled by default and
are not supported by any define.
Their activation need to included in the per_clocks_enable if the
peripheral is included. Not booting board should enable the peripheral
clock connected to their driver

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Tom Rini <trini@ti.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
arch/arm/cpu/armv7/omap3/clock.c
arch/arm/include/asm/arch-omap3/clock.h

index 9f989ff860e7f6e63acf9236fce81a7174c7bfcc..ae9c4c318f677a366a7fb564a41c5a26fe92928d 100644 (file)
@@ -730,8 +730,6 @@ void per_clocks_enable(void)
                sr32(&prcm_base->fclken_cam, 0, 32, FCK_CAM_ON);
                sr32(&prcm_base->iclken_cam, 0, 32, ICK_CAM_ON);
        }
-       sr32(&prcm_base->fclken_per, 0, 32, FCK_PER_ON);
-       sr32(&prcm_base->iclken_per, 0, 32, ICK_PER_ON);
 
        sdelay(1000);
 }
index be669c156f51b7c80085489e3dbd783243403fc7..1912cc9a676fe6a1d33c3e835a9346640b959db5 100644 (file)
@@ -27,8 +27,6 @@
 #define ICK_DSS_ON     0x00000001
 #define FCK_CAM_ON     0x00000001
 #define ICK_CAM_ON     0x00000001
-#define FCK_PER_ON     0x0003ffff
-#define ICK_PER_ON     0x0003ffff
 
 /* Used to index into DPLL parameter tables */
 typedef struct {