[U-Boot] [PATCH 1/4] arm: iproc: Initial commit of iproc architecture code
Wolfgang Denk
wd at denx.de
Sun Jul 20 09:46:48 CEST 2014
Dear Steve Rae,
In message <1405733854-20194-2-git-send-email-srae at broadcom.com> you wrote:
> From: Scott Branden <sbranden at broadcom.com>
>
> The iproc architecture code is present in several Broadcom
> chip architectures, including Cygnus and NSP.
...
> + writel(IPROC_CLKCT_HDELAY_SW_EN, IHOST_PROC_CLK_CORE0_CLKGATE);
> + writel(IPROC_CLKCT_HDELAY_SW_EN, IHOST_PROC_CLK_CORE1_CLKGATE);
> + writel(IPROC_CLKCT_HDELAY_SW_EN, IHOST_PROC_CLK_ARM_SWITCH_CLKGATE);
> + writel(IPROC_CLKCT_HDELAY_SW_EN, IHOST_PROC_CLK_ARM_PERIPH_CLKGATE);
> + writel(IPROC_CLKCT_HDELAY_SW_EN, IHOST_PROC_CLK_APB0_CLKGATE);
Instead of using #defines for IHOST_PROC_CLK_CORE0_CLKGATE etc. it
would be better to use a C struct to describe the register map.
> + count_h = readl(IPROC_PERIPH_GLB_TIM_REG_BASE +
> + TIMER_GLB_HI_OFFSET);
> + count_l = readl(IPROC_PERIPH_GLB_TIM_REG_BASE +
> + TIMER_GLB_LOW_OFFSET);
> + cur_tick = readl(IPROC_PERIPH_GLB_TIM_REG_BASE +
> + TIMER_GLB_HI_OFFSET);
NAK. We do not support accessing device registers through a "base
address + offset" notation. Please use a C struct instead.
Please fix globally.
...
> +#define IHOST_PROC_CLK_WR_ACCESS 0X19000000
> +#define IHOST_PROC_CLK_POLICY_FREQ 0X19000008
...
> +#define IHOST_PROC_CLK_POLICY_CTL 0X1900000C
...
Make C struct?
> +/* ARM A9 Private Timer */
> +#define TIMER_PVT_LOAD_OFFSET 0x00000000
> +#define TIMER_PVT_COUNTER_OFFSET 0x00000004
> +#define TIMER_PVT_CTRL_OFFSET 0x00000008
> +#define TIMER_PVT_STATUS_OFFSET 0x0000000C
...
> +#define TIMER_GLB_LOW_OFFSET 0x00000000
> +#define TIMER_GLB_HI_OFFSET 0x00000004
> +#define TIMER_GLB_CTRL_OFFSET 0x00000008
Please make C struct !!!
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Too bad that all the people who know how to run the country are busy
driving taxicabs and cutting hair. - George Burns
More information about the U-Boot
mailing list