Re: [U-Boot] [PATCH 3/8] Fix compile problem for some boards in the clock code.
Dear Alex Waterman, > Some boards use AT91_SLOW_CLOCK and other use > CONFIG_SYS_AT91_SLOW_CLOCK. This patch makes it so the arm926ejs > clock code will return which ever is set. > > Signed-off-by: Alex Waterman > --- > arch/arm/cpu/arm926ejs/at91/clock.c |4 > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/arch/arm/cpu/arm926ejs/at91/clock.c > b/arch/arm/cpu/arm926ejs/at91/clock.c > index 608af2c..0083bd2 100644 > --- a/arch/arm/cpu/arm926ejs/at91/clock.c > +++ b/arch/arm/cpu/arm926ejs/at91/clock.c > @@ -57,7 +57,11 @@ static unsigned long at91_css_to_rate(unsigned long css) > { > switch (css) { > case AT91_PMC_MCKR_CSS_SLOW: > +#ifdef AT91_SLOW_CLOCK > + return AT91_SLOW_CLOCK; > +#else > return CONFIG_SYS_AT91_SLOW_CLOCK; > +#endif > case AT91_PMC_MCKR_CSS_MAIN: > return gd->main_clk_rate_hz; > case AT91_PMC_MCKR_CSS_PLLA: NAK. "Compile problems" for some boards shall not be fixed by hacks into common source. Fix the board's definition file instead. Best Regards, Reinhard ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/8] Fix compile problem for some boards in the clock code.
From: Alex Waterman Some boards use AT91_SLOW_CLOCK and other use CONFIG_SYS_AT91_SLOW_CLOCK. This patch makes it so the arm926ejs clock code will return which ever is set. Signed-off-by: Alex Waterman --- arch/arm/cpu/arm926ejs/at91/clock.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/at91/clock.c b/arch/arm/cpu/arm926ejs/at91/clock.c index 608af2c..0083bd2 100644 --- a/arch/arm/cpu/arm926ejs/at91/clock.c +++ b/arch/arm/cpu/arm926ejs/at91/clock.c @@ -57,7 +57,11 @@ static unsigned long at91_css_to_rate(unsigned long css) { switch (css) { case AT91_PMC_MCKR_CSS_SLOW: +#ifdef AT91_SLOW_CLOCK + return AT91_SLOW_CLOCK; +#else return CONFIG_SYS_AT91_SLOW_CLOCK; +#endif case AT91_PMC_MCKR_CSS_MAIN: return gd->main_clk_rate_hz; case AT91_PMC_MCKR_CSS_PLLA: -- 1.7.4.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/8] Fix compile problem for some boards in the clock code.
Some boards use AT91_SLOW_CLOCK and other use CONFIG_SYS_AT91_SLOW_CLOCK. This patch makes it so the arm926ejs clock code will return which ever is set. Signed-off-by: Alex Waterman --- arch/arm/cpu/arm926ejs/at91/clock.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/at91/clock.c b/arch/arm/cpu/arm926ejs/at91/clock.c index 608af2c..0083bd2 100644 --- a/arch/arm/cpu/arm926ejs/at91/clock.c +++ b/arch/arm/cpu/arm926ejs/at91/clock.c @@ -57,7 +57,11 @@ static unsigned long at91_css_to_rate(unsigned long css) { switch (css) { case AT91_PMC_MCKR_CSS_SLOW: +#ifdef AT91_SLOW_CLOCK + return AT91_SLOW_CLOCK; +#else return CONFIG_SYS_AT91_SLOW_CLOCK; +#endif case AT91_PMC_MCKR_CSS_MAIN: return gd->main_clk_rate_hz; case AT91_PMC_MCKR_CSS_PLLA: -- 1.7.4.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot