[PATCH 3/3] OMAP4460: clock init
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Fri Jul 27 10:18:30 EDT 2012
On 15:40 Fri 27 Jul , Jan Weitzel wrote:
> Change clock init to allow early gpio access. Add support for 4460 clocks.
>
> Signed-off-by: Jan Weitzel <j.weitzel at phytec.de>
> ---
> arch/arm/boards/panda/lowlevel.c | 4 ++-
> arch/arm/boards/panda/mux.c | 8 +++++
> arch/arm/boards/pcm049/lowlevel.c | 15 +++++++--
> arch/arm/boards/pcm049/mux.c | 8 +++++
> arch/arm/boards/phycard-a-xl2/lowlevel.c | 9 ++++-
> arch/arm/boards/phycard-a-xl2/mux.c | 8 +++++
> arch/arm/mach-omap/include/mach/omap4-clock.h | 4 ++
> arch/arm/mach-omap/omap4_clock.c | 39 +++++++++++++++++-------
> 8 files changed, 76 insertions(+), 19 deletions(-)
>
> diff --git a/arch/arm/boards/panda/lowlevel.c b/arch/arm/boards/panda/lowlevel.c
> index 8591fff..0b4b199 100644
> --- a/arch/arm/boards/panda/lowlevel.c
> +++ b/arch/arm/boards/panda/lowlevel.c
> @@ -28,6 +28,8 @@
> #include <mach/syslib.h>
> #include <asm/barebox-arm.h>
>
> +#define TPS62361_VSEL0_GPIO 7
> +
> void set_muxconf_regs(void);
>
> static const struct ddr_regs ddr_regs_400_mhz_2cs = {
> @@ -70,7 +72,7 @@ static void noinline panda_init_lowlevel(void)
> omap4_ddr_init(&ddr_regs_400_mhz_2cs, &core);
>
> /* Set VCORE1 = 1.3 V, VCORE2 = VCORE3 = 1.21V */
> - omap4_scale_vcores();
> + omap4_scale_vcores(TPS62361_VSEL0_GPIO);
>
> board_init_lowlevel_return();
> }
> diff --git a/arch/arm/boards/panda/mux.c b/arch/arm/boards/panda/mux.c
> index 310e433..3783006 100644
> --- a/arch/arm/boards/panda/mux.c
> +++ b/arch/arm/boards/panda/mux.c
> @@ -3,6 +3,7 @@
> #include <io.h>
> #include <mach/omap4-silicon.h>
> #include <mach/omap4-mux.h>
> +#include <mach/omap4-clock.h>
>
> static const struct pad_conf_entry core_padconf_array[] = {
> { GPMC_AD0, PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M1 /* sdmmc2_dat0 */ },
> @@ -245,4 +246,11 @@ void set_muxconf_regs(void)
>
> omap4_do_set_mux(OMAP44XX_CONTROL_PADCONF_WKUP, wkup_padconf_array,
> ARRAY_SIZE(wkup_padconf_array));
> +
> + /* gpio_wk7 is used for controlling TPS on 4460 */
> + if (omap4_revision() >= OMAP4460_ES1_0) {
> + writew(M3, OMAP44XX_CONTROL_PADCONF_WKUP + PAD1_FREF_CLK4_REQ);
> + /* Enable GPIO-1 clocks before TPS initialization */
> + omap4_enable_gpio1_wup_clocks();
> + }
can we factorize this?
Best Regards,
J.
More information about the barebox
mailing list