summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--board/atc/atc.c1
-rw-r--r--board/cpu86/cpu86.c1
-rw-r--r--board/cpu87/cpu87.c1
-rw-r--r--board/gen860t/gen860t.c2
-rw-r--r--board/integratorcp/integratorcp.c7
-rw-r--r--board/mcc200/mcc200.c1
-rw-r--r--board/mpl/common/common_util.c1
-rw-r--r--board/pm520/pm520.c1
-rw-r--r--board/pm826/pm826.c1
-rw-r--r--board/pm828/pm828.c1
-rw-r--r--board/svm_sc8xx/svm_sc8xx.c1
-rw-r--r--board/trab/tsc2000.c10
-rw-r--r--common/cmd_bootm.c4
-rw-r--r--cpu/arm1176/s3c64xx/interrupts.c5
-rw-r--r--cpu/arm946es/config.mk7
-rw-r--r--cpu/arm_intcm/config.mk7
-rw-r--r--drivers/rtc/mk48t59.c2
-rw-r--r--drivers/rtc/rs5c372.c3
-rw-r--r--include/common.h3
-rw-r--r--include/onenand_uboot.h1
-rw-r--r--lib_arm/bootm.c3
22 files changed, 43 insertions, 26 deletions
diff --git a/Makefile b/Makefile
index ae3db0a6442..a342a88083d 100644
--- a/Makefile
+++ b/Makefile
@@ -1360,13 +1360,15 @@ ml300_config: unconfig
ml507_flash_config: unconfig
@mkdir -p $(obj)include $(obj)board/xilinx/ml507
- @echo "LDSCRIPT := $(obj)board/xilinx/ppc440-generic/u-boot-rom.lds" > $(obj)board/xilinx/ml507/config.mk
+ @echo "LDSCRIPT := $(obj)board/xilinx/ppc440-generic/u-boot-rom.lds" \
+ > $(obj)board/xilinx/ml507/config.mk
@echo "TEXT_BASE := 0xFE360000" >> $(obj)board/xilinx/ml507/config.mk
@$(MKCONFIG) ml507 ppc ppc4xx ml507 xilinx
ml507_config: unconfig
@mkdir -p $(obj)include $(obj)board/xilinx/ml507
- @echo "LDSCRIPT := $(obj)board/xilinx/ppc440-generic/u-boot-ram.lds" > $(obj)board/xilinx/ml507/config.mk
+ @echo "LDSCRIPT := $(obj)board/xilinx/ppc440-generic/u-boot-ram.lds" \
+ > $(obj)board/xilinx/ml507/config.mk
@echo "TEXT_BASE := 0x04000000" >> $(obj)board/xilinx/ml507/config.mk
@$(MKCONFIG) ml507 ppc ppc4xx ml507 xilinx
diff --git a/board/atc/atc.c b/board/atc/atc.c
index 79527f43842..b627c1c6bc6 100644
--- a/board/atc/atc.c
+++ b/board/atc/atc.c
@@ -380,7 +380,6 @@ phys_size_t initdram (int board_type)
}
#if defined(CONFIG_CMD_DOC)
-extern void doc_probe (ulong physadr);
void doc_init (void)
{
doc_probe (CFG_DOC_BASE);
diff --git a/board/cpu86/cpu86.c b/board/cpu86/cpu86.c
index 9e76c72d3e3..23ec283d4ff 100644
--- a/board/cpu86/cpu86.c
+++ b/board/cpu86/cpu86.c
@@ -313,7 +313,6 @@ phys_size_t initdram (int board_type)
}
#if defined(CONFIG_CMD_DOC)
-extern void doc_probe (ulong physadr);
void doc_init (void)
{
doc_probe (CFG_DOC_BASE);
diff --git a/board/cpu87/cpu87.c b/board/cpu87/cpu87.c
index 454987cff29..c7a96f9131b 100644
--- a/board/cpu87/cpu87.c
+++ b/board/cpu87/cpu87.c
@@ -323,7 +323,6 @@ phys_size_t initdram (int board_type)
}
#if defined(CONFIG_CMD_DOC)
-extern void doc_probe (ulong physadr);
void doc_init (void)
{
doc_probe (CFG_DOC_BASE);
diff --git a/board/gen860t/gen860t.c b/board/gen860t/gen860t.c
index e3d0e435d46..5c497b62a34 100644
--- a/board/gen860t/gen860t.c
+++ b/board/gen860t/gen860t.c
@@ -223,8 +223,6 @@ phys_size_t initdram (int board_type)
* The DOC lives in the CS2* space
*/
#if defined(CONFIG_CMD_DOC)
-extern void doc_probe (ulong physadr);
-
void doc_init (void)
{
printf ("Probing at 0x%.8x: ", DOC_BASE);
diff --git a/board/integratorcp/integratorcp.c b/board/integratorcp/integratorcp.c
index d6d6e13d5a4..220513f3294 100644
--- a/board/integratorcp/integratorcp.c
+++ b/board/integratorcp/integratorcp.c
@@ -34,6 +34,7 @@
*/
#include <common.h>
+#include <div64.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -244,7 +245,11 @@ ulong get_timer_masked (void)
total_count += lastdec - now;
}
lastdec = now;
- timestamp = (ulong)(total_count/div_timer);
+
+ /* Reuse "now" */
+ now = total_count;
+ do_div(now, div_timer);
+ timestamp = now;
return timestamp;
}
diff --git a/board/mcc200/mcc200.c b/board/mcc200/mcc200.c
index 77ee3d7ed72..44446501f94 100644
--- a/board/mcc200/mcc200.c
+++ b/board/mcc200/mcc200.c
@@ -323,7 +323,6 @@ void ide_set_reset (int idereset)
#endif
#if defined(CONFIG_CMD_DOC)
-extern void doc_probe (ulong physadr);
void doc_init (void)
{
doc_probe (CFG_DOC_BASE);
diff --git a/board/mpl/common/common_util.c b/board/mpl/common/common_util.c
index 24ce8078574..1f9a7726f16 100644
--- a/board/mpl/common/common_util.c
+++ b/board/mpl/common/common_util.c
@@ -565,7 +565,6 @@ int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
#if defined(CONFIG_CMD_DOC)
-extern void doc_probe(ulong physadr);
void doc_init (void)
{
doc_probe(MULTI_PURPOSE_SOCKET_ADDR);
diff --git a/board/pm520/pm520.c b/board/pm520/pm520.c
index a9d63cc35ad..6db93fbb4f3 100644
--- a/board/pm520/pm520.c
+++ b/board/pm520/pm520.c
@@ -316,7 +316,6 @@ void ide_set_reset (int idereset)
#endif
#if defined(CONFIG_CMD_DOC)
-extern void doc_probe (ulong physadr);
void doc_init (void)
{
doc_probe (CFG_DOC_BASE);
diff --git a/board/pm826/pm826.c b/board/pm826/pm826.c
index d8b0929cf48..2304420a886 100644
--- a/board/pm826/pm826.c
+++ b/board/pm826/pm826.c
@@ -312,7 +312,6 @@ phys_size_t initdram (int board_type)
}
#if defined(CONFIG_CMD_DOC)
-extern void doc_probe (ulong physadr);
void doc_init (void)
{
doc_probe (CFG_DOC_BASE);
diff --git a/board/pm828/pm828.c b/board/pm828/pm828.c
index b163d5b35d3..296a199336d 100644
--- a/board/pm828/pm828.c
+++ b/board/pm828/pm828.c
@@ -345,7 +345,6 @@ phys_size_t initdram (int board_type)
}
#if defined(CONFIG_CMD_DOC)
-extern void doc_probe (ulong physadr);
void doc_init (void)
{
doc_probe (CFG_DOC_BASE);
diff --git a/board/svm_sc8xx/svm_sc8xx.c b/board/svm_sc8xx/svm_sc8xx.c
index 06fb18b344c..48e05b83f76 100644
--- a/board/svm_sc8xx/svm_sc8xx.c
+++ b/board/svm_sc8xx/svm_sc8xx.c
@@ -154,7 +154,6 @@ phys_size_t initdram (int board_type)
}
#if defined(CONFIG_CMD_DOC)
-extern void doc_probe (ulong physadr);
void doc_init (void)
{
doc_probe (CFG_DOC_BASE);
diff --git a/board/trab/tsc2000.c b/board/trab/tsc2000.c
index 382a85b3593..f13a5a9dc02 100644
--- a/board/trab/tsc2000.c
+++ b/board/trab/tsc2000.c
@@ -27,6 +27,7 @@
#include <common.h>
#include <s3c2400.h>
+#include <div64.h>
#include "tsc2000.h"
#include "Pt1000_temp_data.h"
@@ -332,6 +333,7 @@ void tsc2000_reg_init (void)
int tsc2000_interpolate(long value, long data[][2], long *result)
{
int i;
+ unsigned long long val;
/* the data is sorted and the first element is upper
* limit so we can easily check for out-of-band values
@@ -347,10 +349,10 @@ int tsc2000_interpolate(long value, long data[][2], long *result)
result in 'long long'.
*/
- *result = data[i-1][1] +
- ((unsigned long long)(data[i][1] - data[i-1][1])
- * (unsigned long long)(value - data[i-1][0]))
- / (data[i][0] - data[i-1][0]);
+ val = ((unsigned long long)(data[i][1] - data[i-1][1])
+ * (unsigned long long)(value - data[i-1][0]));
+ do_div(val, (data[i][0] - data[i-1][0]));
+ *result = data[i-1][1] + val;
return 0;
}
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 751f5b99d43..8dbab02b87e 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -337,13 +337,13 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)
return BOOTM_ERR_UNIMPLEMENTED;
}
puts ("OK\n");
- debug (" kernel loaded at 0x%08lx, end = 0x%08lx\n", load, load_end);
+ debug (" kernel loaded at 0x%08lx, end = 0x%8p\n", load, load_end);
if (boot_progress)
show_boot_progress (7);
if ((load < blob_end) && (*load_end > blob_start)) {
debug ("images.os.start = 0x%lX, images.os.end = 0x%lx\n", blob_start, blob_end);
- debug ("images.os.load = 0x%lx, load_end = 0x%lx\n", load, load_end);
+ debug ("images.os.load = 0x%lx, load_end = 0x%p\n", load, load_end);
return BOOTM_ERR_OVERLAP;
}
diff --git a/cpu/arm1176/s3c64xx/interrupts.c b/cpu/arm1176/s3c64xx/interrupts.c
index 8356ae49e43..e34369f8909 100644
--- a/cpu/arm1176/s3c64xx/interrupts.c
+++ b/cpu/arm1176/s3c64xx/interrupts.c
@@ -41,6 +41,7 @@
#include <common.h>
#include <asm/proc-armv/ptrace.h>
#include <s3c6400.h>
+#include <div64.h>
static ulong timer_load_val;
@@ -148,7 +149,9 @@ void reset_timer(void)
ulong get_timer_masked(void)
{
- return get_ticks() / (timer_load_val / (100 * CFG_HZ));
+ unsigned long long res = get_ticks();
+ do_div (res, (timer_load_val / (100 * CFG_HZ)));
+ return res;
}
ulong get_timer(ulong base)
diff --git a/cpu/arm946es/config.mk b/cpu/arm946es/config.mk
index 81ca2885e22..f774c7e8276 100644
--- a/cpu/arm946es/config.mk
+++ b/cpu/arm946es/config.mk
@@ -25,3 +25,10 @@ PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \
-msoft-float
PLATFORM_CPPFLAGS += -march=armv4
+# =========================================================================
+#
+# Supply options according to compiler version
+#
+# =========================================================================
+PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)
+PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))
diff --git a/cpu/arm_intcm/config.mk b/cpu/arm_intcm/config.mk
index 81ca2885e22..f774c7e8276 100644
--- a/cpu/arm_intcm/config.mk
+++ b/cpu/arm_intcm/config.mk
@@ -25,3 +25,10 @@ PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \
-msoft-float
PLATFORM_CPPFLAGS += -march=armv4
+# =========================================================================
+#
+# Supply options according to compiler version
+#
+# =========================================================================
+PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)
+PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))
diff --git a/drivers/rtc/mk48t59.c b/drivers/rtc/mk48t59.c
index b6c234e69ff..dabf3222b84 100644
--- a/drivers/rtc/mk48t59.c
+++ b/drivers/rtc/mk48t59.c
@@ -227,7 +227,7 @@ void rtc_reset (void)
rtc_write(RTC_CONTROLB, control_b);
}
-int rtc_set_watchdog(short multi, short res)
+void rtc_set_watchdog(short multi, short res)
{
uchar wd_value;
diff --git a/drivers/rtc/rs5c372.c b/drivers/rtc/rs5c372.c
index 34514d037d6..82dd9694e6f 100644
--- a/drivers/rtc/rs5c372.c
+++ b/drivers/rtc/rs5c372.c
@@ -195,8 +195,7 @@ rtc_get (struct rtc_time *tmp)
/*
* Set the RTC
*/
-void
-rtc_set (struct rtc_time *tmp)
+int rtc_set (struct rtc_time *tmp)
{
unsigned char buf[8], reg15;
int ret;
diff --git a/include/common.h b/include/common.h
index a394988b5ce..33c6e1087d1 100644
--- a/include/common.h
+++ b/include/common.h
@@ -236,6 +236,9 @@ int autoscript (ulong addr, const char *fit_uname);
extern ulong load_addr; /* Default Load Address */
+/* common/cmd_doc.c */
+void doc_probe(unsigned long physadr);
+
/* common/cmd_nvedit.c */
int env_init (void);
void env_relocate (void);
diff --git a/include/onenand_uboot.h b/include/onenand_uboot.h
index 6605e4f218d..e9602574b78 100644
--- a/include/onenand_uboot.h
+++ b/include/onenand_uboot.h
@@ -15,6 +15,7 @@
#define __UBOOT_ONENAND_H
#include <linux/types.h>
+#include <linux/mtd/mtd.h>
struct mtd_info;
struct erase_info;
diff --git a/lib_arm/bootm.c b/lib_arm/bootm.c
index 6c2f37e9815..772fa7f516a 100644
--- a/lib_arm/bootm.c
+++ b/lib_arm/bootm.c
@@ -62,7 +62,6 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
char *s;
int machid = bd->bi_arch_number;
void (*theKernel)(int zero, int arch, uint params);
- int ret;
#ifdef CONFIG_CMDLINE_TAG
char *commandline = getenv ("bootargs");
@@ -125,7 +124,7 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
theKernel (0, machid, bd->bi_boot_params);
/* does not return */
-error:
+
return 1;
}