From 990f569c4fa6b9e76b31d0a5229981c092b02dcf Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sat, 6 Jun 2009 10:30:58 +0000 Subject: avr32/hsdramc: Move conditional compilation to Makefile Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD jcrosoft.com> Cc: Haavard Skinnemoen atmel.com> --- cpu/at32ap/Makefile | 2 +- cpu/at32ap/hsdramc.c | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'cpu/at32ap') diff --git a/cpu/at32ap/Makefile b/cpu/at32ap/Makefile index e08f273..60899c7 100644 --- a/cpu/at32ap/Makefile +++ b/cpu/at32ap/Makefile @@ -30,7 +30,7 @@ LIB := $(obj)lib$(CPU).a START-y += start.o COBJS-y += cpu.o -COBJS-y += hsdramc.o +COBJS-$(CONFIG_SYS_HSDRAMC) += hsdramc.o COBJS-y += exception.o COBJS-y += cache.o COBJS-y += interrupts.o diff --git a/cpu/at32ap/hsdramc.c b/cpu/at32ap/hsdramc.c index f74121c..b6eae66 100644 --- a/cpu/at32ap/hsdramc.c +++ b/cpu/at32ap/hsdramc.c @@ -21,7 +21,6 @@ */ #include -#ifdef CONFIG_SYS_HSDRAMC #include #include @@ -116,5 +115,3 @@ unsigned long sdram_init(void *sdram_base, const struct sdram_config *config) return sdram_size; } - -#endif /* CONFIG_SYS_HSDRAMC */ -- cgit v1.1 From 3eb90bad651fab39cffba750ec4421a9c01d60e7 Mon Sep 17 00:00:00 2001 From: Ingo van Lil Date: Tue, 24 Nov 2009 14:09:21 +0100 Subject: Generic udelay() with watchdog support According to the PPC reference implementation the udelay() function is responsible for resetting the watchdog timer as frequently as needed. Most other architectures do not meet that requirement, so long-running operations might result in a watchdog reset. This patch adds a generic udelay() function which takes care of resetting the watchdog before calling an architecture-specific __udelay(). Signed-off-by: Ingo van Lil --- cpu/at32ap/interrupts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cpu/at32ap') diff --git a/cpu/at32ap/interrupts.c b/cpu/at32ap/interrupts.c index 75cc39e..c6d8d16 100644 --- a/cpu/at32ap/interrupts.c +++ b/cpu/at32ap/interrupts.c @@ -96,7 +96,7 @@ void set_timer(unsigned long t) /* * For short delays only. It will overflow after a few seconds. */ -void udelay(unsigned long usec) +void __udelay(unsigned long usec) { unsigned long cycles; unsigned long base; -- cgit v1.1