summaryrefslogtreecommitdiff
path: root/arch/nds32/cpu/n1213
diff options
context:
space:
mode:
authorMacpaul Lin <macpaul@andestech.com>2011-11-23 13:56:50 +0800
committerMacpaul Lin <macpaul@andestech.com>2011-11-23 14:05:51 +0800
commit39c87743bb23ea0d102b1386f6fd0d120438a9c6 (patch)
treedc2cd335ba07138f07c4bfeaa0384cc45b1ba2d1 /arch/nds32/cpu/n1213
parentdca61f0128a15bfc4fdefbbdb4a5f6c10b0c8f0b (diff)
downloadu-boot-imx-39c87743bb23ea0d102b1386f6fd0d120438a9c6.zip
u-boot-imx-39c87743bb23ea0d102b1386f6fd0d120438a9c6.tar.gz
u-boot-imx-39c87743bb23ea0d102b1386f6fd0d120438a9c6.tar.bz2
nds32/ag101: clean up for SoC related code
Remove unneccessary codes. 1. Clean up for cpu related code. 2. Clean up for timer related code. Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Diffstat (limited to 'arch/nds32/cpu/n1213')
-rw-r--r--arch/nds32/cpu/n1213/ag101/cpu.c8
-rw-r--r--arch/nds32/cpu/n1213/ag101/timer.c8
2 files changed, 6 insertions, 10 deletions
diff --git a/arch/nds32/cpu/n1213/ag101/cpu.c b/arch/nds32/cpu/n1213/ag101/cpu.c
index 0ab666e..c2636b1 100644
--- a/arch/nds32/cpu/n1213/ag101/cpu.c
+++ b/arch/nds32/cpu/n1213/ag101/cpu.c
@@ -45,10 +45,6 @@
*/
int cleanup_before_linux(void)
{
-#ifdef CONFIG_MMU
- unsigned long i;
-#endif
-
disable_interrupts();
#ifdef CONFIG_MMU
@@ -123,8 +119,8 @@ void icache_inval_range(unsigned long start, unsigned long end)
void flush_cache(unsigned long addr, unsigned long size)
{
- dcache_flush_range(addr , addr + size);
- icache_inval_range(addr , addr + size);
+ dcache_flush_range(addr, addr + size);
+ icache_inval_range(addr, addr + size);
}
void icache_enable(void)
diff --git a/arch/nds32/cpu/n1213/ag101/timer.c b/arch/nds32/cpu/n1213/ag101/timer.c
index c099c33..caa36b8 100644
--- a/arch/nds32/cpu/n1213/ag101/timer.c
+++ b/arch/nds32/cpu/n1213/ag101/timer.c
@@ -33,7 +33,7 @@ static ulong lastdec;
int timer_init(void)
{
- static struct fttmr010 *tmr = (struct fttmr010 *)CONFIG_FTTMR010_BASE;
+ struct fttmr010 *tmr = (struct fttmr010 *)CONFIG_FTTMR010_BASE;
unsigned int cr;
debug("%s()\n", __func__);
@@ -80,7 +80,7 @@ int timer_init(void)
*/
void reset_timer_masked(void)
{
- static struct fttmr010 *tmr = (struct fttmr010 *)CONFIG_FTTMR010_BASE;
+ struct fttmr010 *tmr = (struct fttmr010 *)CONFIG_FTTMR010_BASE;
/* capure current decrementer value time */
#ifdef CONFIG_FTTMR010_EXT_CLK
@@ -104,7 +104,7 @@ void reset_timer(void)
*/
ulong get_timer_masked(void)
{
- static struct fttmr010 *tmr = (struct fttmr010 *)CONFIG_FTTMR010_BASE;
+ struct fttmr010 *tmr = (struct fttmr010 *)CONFIG_FTTMR010_BASE;
/* current tick value */
#ifdef CONFIG_FTTMR010_EXT_CLK
@@ -160,7 +160,7 @@ void set_timer(ulong t)
/* delay x useconds AND preserve advance timestamp value */
void __udelay(unsigned long usec)
{
- static struct fttmr010 *tmr = (struct fttmr010 *)CONFIG_FTTMR010_BASE;
+ struct fttmr010 *tmr = (struct fttmr010 *)CONFIG_FTTMR010_BASE;
#ifdef CONFIG_FTTMR010_EXT_CLK
long tmo = usec * (TIMER_CLOCK / 1000) / 1000;