[U-Boot] [PATCH 1/4] ARM: AM33xx: Cleanup dplls data
Heiko Schocher
hs at denx.de
Mon Jun 24 21:12:47 CEST 2013
Hello Lokesh,
Am 24.06.2013 15:15, schrieb Lokesh Vutla:
> Locking sequence for all the dplls is same.
> In the current code same sequence is done repeatedly
> for each dpll. Instead have a generic function
> for locking dplls and pass dpll data to that function.
>
> This is derived from OMAP4 boards.
>
> Signed-off-by: Lokesh Vutla <lokeshvutla at ti.com>
> ---
> arch/arm/cpu/armv7/am33xx/Makefile | 1 +
> arch/arm/cpu/armv7/am33xx/clock.c | 116 ++++++++++++++
> arch/arm/cpu/armv7/am33xx/clock_am33xx.c | 222 +++++---------------------
> arch/arm/cpu/armv7/am33xx/emif4.c | 4 +
> arch/arm/include/asm/arch-am33xx/clock.h | 68 ++++++++
> arch/arm/include/asm/arch-am33xx/ddr_defs.h | 2 +
> arch/arm/include/asm/arch-am33xx/sys_proto.h | 1 +
> 7 files changed, 232 insertions(+), 182 deletions(-)
> create mode 100644 arch/arm/cpu/armv7/am33xx/clock.c
>
[...]
> diff --git a/arch/arm/cpu/armv7/am33xx/clock.c b/arch/arm/cpu/armv7/am33xx/clock.c
> new file mode 100644
> index 0000000..a7f1d83
> --- /dev/null
> +++ b/arch/arm/cpu/armv7/am33xx/clock.c
> @@ -0,0 +1,116 @@
[...]
> +static void do_setup_dpll(const struct dpll_regs *dpll_regs,
> + const struct dpll_params *params)
> +{
Could we have this function not only static? I posted a patch:
[U-Boot] arm, am335x: make mpu pll config configurable
http://patchwork.ozlabs.org/patch/248509/
which uses mpu_pll_config() for switching mpu pll clock
from board code ... you delete this function later in this patch,
so I think, I can switch to do_setup_pll() ... if this is not
static code ...
[...]
> diff --git a/arch/arm/cpu/armv7/am33xx/clock_am33xx.c b/arch/arm/cpu/armv7/am33xx/clock_am33xx.c
> index 9c4d0b4..e878b25 100644
> --- a/arch/arm/cpu/armv7/am33xx/clock_am33xx.c
> +++ b/arch/arm/cpu/armv7/am33xx/clock_am33xx.c
> @@ -26,56 +26,53 @@
> #define PRCM_FORCE_WAKEUP 0x2
> #define PRCM_FUNCTL 0x0
>
> -#define PRCM_EMIF_CLK_ACTIVITY BIT(2)
> -#define PRCM_L3_GCLK_ACTIVITY BIT(4)
> -
> -#define PLL_BYPASS_MODE 0x4
> -#define ST_MN_BYPASS 0x00000100
> -#define ST_DPLL_CLK 0x00000001
> -#define CLK_SEL_MASK 0x7ffff
> -#define CLK_DIV_MASK 0x1f
> -#define CLK_DIV2_MASK 0x7f
> -#define CLK_SEL_SHIFT 0x8
> -#define CLK_MODE_SEL 0x7
> -#define CLK_MODE_MASK 0xfffffff8
> -#define CLK_DIV_SEL 0xFFFFFFE0
> #define CPGMAC0_IDLE 0x30000
> -#define DPLL_CLKDCOLDO_GATE_CTRL 0x300
> -
> #define OSC (V_OSCK/1000000)
and could we move this define then to
arch/arm/include/asm/arch-am33xx/clock.h
too?
Thnaks!
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
More information about the U-Boot
mailing list