summaryrefslogtreecommitdiff
path: root/cpu/at32ap
diff options
context:
space:
mode:
authorHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2008-12-17 16:53:07 +0100
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2008-12-17 16:53:07 +0100
commitcb5473205206c7f14cbb1e747f28ec75b48826e2 (patch)
tree8f4808d60917100b18a10b05230f7638a0a9bbcc /cpu/at32ap
parentbaf449fc5ff96f071bb0e3789fd3265f6d4fd9a0 (diff)
parent92c78a3bbcb2ce508b4bf1c4a1e0940406a024bb (diff)
downloadu-boot-imx-cb5473205206c7f14cbb1e747f28ec75b48826e2.zip
u-boot-imx-cb5473205206c7f14cbb1e747f28ec75b48826e2.tar.gz
u-boot-imx-cb5473205206c7f14cbb1e747f28ec75b48826e2.tar.bz2
Merge branch 'fixes' into cleanups
Conflicts: board/atmel/atngw100/atngw100.c board/atmel/atstk1000/atstk1000.c cpu/at32ap/at32ap700x/gpio.c include/asm-avr32/arch-at32ap700x/clk.h include/configs/atngw100.h include/configs/atstk1002.h include/configs/atstk1003.h include/configs/atstk1004.h include/configs/atstk1006.h include/configs/favr-32-ezkit.h include/configs/hammerhead.h include/configs/mimc200.h
Diffstat (limited to 'cpu/at32ap')
-rw-r--r--cpu/at32ap/at32ap700x/clk.c24
-rw-r--r--cpu/at32ap/cache.c8
-rw-r--r--cpu/at32ap/cpu.c10
-rw-r--r--cpu/at32ap/hsdramc.c4
-rw-r--r--cpu/at32ap/interrupts.c4
-rw-r--r--cpu/at32ap/start.S2
6 files changed, 26 insertions, 26 deletions
diff --git a/cpu/at32ap/at32ap700x/clk.c b/cpu/at32ap/at32ap700x/clk.c
index a6a6c88..2c2e19c 100644
--- a/cpu/at32ap/at32ap700x/clk.c
+++ b/cpu/at32ap/at32ap700x/clk.c
@@ -39,10 +39,10 @@ void clk_init(void)
#ifdef CONFIG_PLL
/* Initialize the PLL */
- sm_writel(PM_PLL0, (SM_BF(PLLCOUNT, CFG_PLL0_SUPPRESS_CYCLES)
- | SM_BF(PLLMUL, CFG_PLL0_MUL - 1)
- | SM_BF(PLLDIV, CFG_PLL0_DIV - 1)
- | SM_BF(PLLOPT, CFG_PLL0_OPT)
+ sm_writel(PM_PLL0, (SM_BF(PLLCOUNT, CONFIG_SYS_PLL0_SUPPRESS_CYCLES)
+ | SM_BF(PLLMUL, CONFIG_SYS_PLL0_MUL - 1)
+ | SM_BF(PLLDIV, CONFIG_SYS_PLL0_DIV - 1)
+ | SM_BF(PLLOPT, CONFIG_SYS_PLL0_OPT)
| SM_BF(PLLOSC, 0)
| SM_BIT(PLLEN)));
@@ -52,14 +52,14 @@ void clk_init(void)
/* Set up clocks for the CPU and all peripheral buses */
cksel = 0;
- if (CFG_CLKDIV_CPU)
- cksel |= SM_BIT(CPUDIV) | SM_BF(CPUSEL, CFG_CLKDIV_CPU - 1);
- if (CFG_CLKDIV_HSB)
- cksel |= SM_BIT(HSBDIV) | SM_BF(HSBSEL, CFG_CLKDIV_HSB - 1);
- if (CFG_CLKDIV_PBA)
- cksel |= SM_BIT(PBADIV) | SM_BF(PBASEL, CFG_CLKDIV_PBA - 1);
- if (CFG_CLKDIV_PBB)
- cksel |= SM_BIT(PBBDIV) | SM_BF(PBBSEL, CFG_CLKDIV_PBB - 1);
+ if (CONFIG_SYS_CLKDIV_CPU)
+ cksel |= SM_BIT(CPUDIV) | SM_BF(CPUSEL, CONFIG_SYS_CLKDIV_CPU - 1);
+ if (CONFIG_SYS_CLKDIV_HSB)
+ cksel |= SM_BIT(HSBDIV) | SM_BF(HSBSEL, CONFIG_SYS_CLKDIV_HSB - 1);
+ if (CONFIG_SYS_CLKDIV_PBA)
+ cksel |= SM_BIT(PBADIV) | SM_BF(PBASEL, CONFIG_SYS_CLKDIV_PBA - 1);
+ if (CONFIG_SYS_CLKDIV_PBB)
+ cksel |= SM_BIT(PBBDIV) | SM_BF(PBBSEL, CONFIG_SYS_CLKDIV_PBB - 1);
sm_writel(PM_CKSEL, cksel);
#ifdef CONFIG_PLL
diff --git a/cpu/at32ap/cache.c b/cpu/at32ap/cache.c
index 41fb5aa..16a0565 100644
--- a/cpu/at32ap/cache.c
+++ b/cpu/at32ap/cache.c
@@ -28,7 +28,7 @@ void dcache_clean_range(volatile void *start, size_t size)
{
unsigned long v, begin, end, linesz;
- linesz = CFG_DCACHE_LINESZ;
+ linesz = CONFIG_SYS_DCACHE_LINESZ;
/* You asked for it, you got it */
begin = (unsigned long)start & ~(linesz - 1);
@@ -44,7 +44,7 @@ void dcache_invalidate_range(volatile void *start, size_t size)
{
unsigned long v, begin, end, linesz;
- linesz = CFG_DCACHE_LINESZ;
+ linesz = CONFIG_SYS_DCACHE_LINESZ;
/* You asked for it, you got it */
begin = (unsigned long)start & ~(linesz - 1);
@@ -58,7 +58,7 @@ void dcache_flush_range(volatile void *start, size_t size)
{
unsigned long v, begin, end, linesz;
- linesz = CFG_DCACHE_LINESZ;
+ linesz = CONFIG_SYS_DCACHE_LINESZ;
/* You asked for it, you got it */
begin = (unsigned long)start & ~(linesz - 1);
@@ -74,7 +74,7 @@ void icache_invalidate_range(volatile void *start, size_t size)
{
unsigned long v, begin, end, linesz;
- linesz = CFG_ICACHE_LINESZ;
+ linesz = CONFIG_SYS_ICACHE_LINESZ;
/* You asked for it, you got it */
begin = (unsigned long)start & ~(linesz - 1);
diff --git a/cpu/at32ap/cpu.c b/cpu/at32ap/cpu.c
index 0ba8361..904bfb2 100644
--- a/cpu/at32ap/cpu.c
+++ b/cpu/at32ap/cpu.c
@@ -32,12 +32,12 @@
#include "hsmc3.h"
/* Sanity checks */
-#if (CFG_CLKDIV_CPU > CFG_CLKDIV_HSB) \
- || (CFG_CLKDIV_HSB > CFG_CLKDIV_PBA) \
- || (CFG_CLKDIV_HSB > CFG_CLKDIV_PBB)
+#if (CONFIG_SYS_CLKDIV_CPU > CONFIG_SYS_CLKDIV_HSB) \
+ || (CONFIG_SYS_CLKDIV_HSB > CONFIG_SYS_CLKDIV_PBA) \
+ || (CONFIG_SYS_CLKDIV_HSB > CONFIG_SYS_CLKDIV_PBB)
# error Constraint fCPU >= fHSB >= fPB{A,B} violated
#endif
-#if defined(CONFIG_PLL) && ((CFG_PLL0_MUL < 1) || (CFG_PLL0_DIV < 1))
+#if defined(CONFIG_PLL) && ((CONFIG_SYS_PLL0_MUL < 1) || (CONFIG_SYS_PLL0_DIV < 1))
# error Invalid PLL multiplier and/or divider
#endif
@@ -47,7 +47,7 @@ int cpu_init(void)
{
extern void _evba(void);
- gd->cpu_hz = CFG_OSC0_HZ;
+ gd->cpu_hz = CONFIG_SYS_OSC0_HZ;
/* TODO: Move somewhere else, but needs to be run before we
* increase the clock frequency. */
diff --git a/cpu/at32ap/hsdramc.c b/cpu/at32ap/hsdramc.c
index 992612b..f74121c 100644
--- a/cpu/at32ap/hsdramc.c
+++ b/cpu/at32ap/hsdramc.c
@@ -21,7 +21,7 @@
*/
#include <common.h>
-#ifdef CFG_HSDRAMC
+#ifdef CONFIG_SYS_HSDRAMC
#include <asm/io.h>
#include <asm/sdram.h>
@@ -117,4 +117,4 @@ unsigned long sdram_init(void *sdram_base, const struct sdram_config *config)
return sdram_size;
}
-#endif /* CFG_HSDRAMC */
+#endif /* CONFIG_SYS_HSDRAMC */
diff --git a/cpu/at32ap/interrupts.c b/cpu/at32ap/interrupts.c
index 160838e..75cc39e 100644
--- a/cpu/at32ap/interrupts.c
+++ b/cpu/at32ap/interrupts.c
@@ -82,7 +82,7 @@ void set_timer(unsigned long t)
unsigned long long ticks = t;
unsigned long lo, hi, hi_new;
- ticks = (ticks * get_tbclk()) / CFG_HZ;
+ ticks = (ticks * get_tbclk()) / CONFIG_SYS_HZ;
hi = ticks >> 32;
lo = ticks & 0xffffffffUL;
@@ -137,7 +137,7 @@ void timer_init(void)
sysreg_write(COUNT, 0);
- tmp = (u64)CFG_HZ << 32;
+ tmp = (u64)CONFIG_SYS_HZ << 32;
tmp += gd->cpu_hz / 2;
do_div(tmp, gd->cpu_hz);
tb_factor = (u32)tmp;
diff --git a/cpu/at32ap/start.S b/cpu/at32ap/start.S
index 907e9b1..d37a46e 100644
--- a/cpu/at32ap/start.S
+++ b/cpu/at32ap/start.S
@@ -188,7 +188,7 @@ at32ap_low_level_init:
.align 2
.type sp_init,@object
sp_init:
- .long CFG_INIT_SP_ADDR
+ .long CONFIG_SYS_INIT_SP_ADDR
got_init:
.long 3b - _GLOBAL_OFFSET_TABLE_