summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-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
12 files changed, 12 insertions, 16 deletions
diff --git a/board/atc/atc.c b/board/atc/atc.c
index 79527f4..b627c1c 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 9e76c72..23ec283 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 454987c..c7a96f9 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 e3d0e43..5c497b6 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 d6d6e13..220513f 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 77ee3d7..4444650 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 24ce807..1f9a772 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 a9d63cc..6db93fb 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 d8b0929..2304420 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 b163d5b..296a199 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 06fb18b..48e05b8 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 382a85b..f13a5a9 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;
}