* sparse fixes
@ 2010-10-19 12:54 Sascha Hauer
2010-10-19 12:54 ` [PATCH 01/42] glob: " Sascha Hauer
` (41 more replies)
0 siblings, 42 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:54 UTC (permalink / raw)
To: barebox
Hi all,
I recently tried to run make C=1. Here are the results. There are
enough sparse warnings left to fix though.
Sascha
The following changes since commit e9ff34657a9aeb42bd76141e97b0fb047ebfde58:
eukrea_cpuimx35: update board support (2010-10-14 16:03:03 +0200)
are available in the git repository at:
none ..BRANCH.NOT.VERIFIED..
Sascha Hauer (42):
glob: sparse fixes
fnmatch:sparse fixes
readline: sparse fixes
edit: sparse fixes
command.h: sparse fixes
crc32: sparse fixes
copy_file: sparse fixes
commands/mem.c: sparse fixes
dlmalloc: sparse fixes
console: sparse fixes
notifier: sparse fixes
fec_imx: sparse fixes
imx gpio: sparse fixes
imx clocksource: sparse fixes
armlinux: sparse fixes
arch/arm/cpu/cpu.c: sparse fixes
cache-l2x0: sparse fixes
speed-imx35: sparse fixes
imx_dump_clocks: sparse fixes
i.MX serial: sparse fixes
i.MX remove wdog registers from header files
hush: sparse fixes
ramfs: sparse fixes
common/env.c: sparse fixes
version_string: sparse fixes
imx-nand: sparse fixes
ping: make locally used functions static
arm div0: sparse fixes
edit: make locally used variable static
common/environment.c: sparse fixes
commands/mem.c: make locally used function static
bootm: sparse fixes
net: make locally used functions static
lib/driver.c: sparse fixes
remove dead ldiv code
common/memsize.c: add missing include
i.MX speed: add missing include
libbb: sparse fixes
remove strange flush_cache functions
pcm043: ifx compiler warning
arm interrupts.c: sparse fixes
process_escape_sequence: Add missing include
arch/arm/boards/pcm043/pcm043.c | 4 +-
arch/arm/cpu/cache-l2x0.c | 2 +-
arch/arm/cpu/cpu.c | 1 +
arch/arm/cpu/interrupts.c | 10 +++-
arch/arm/lib/Makefile | 1 -
arch/arm/lib/armlinux.c | 3 +-
arch/arm/lib/cache.c | 36 -----------
arch/arm/lib/div0.c | 5 +-
arch/arm/mach-imx/clocksource.c | 25 ++++++--
arch/arm/mach-imx/gpio.c | 15 +++--
arch/arm/mach-imx/include/mach/clock.h | 2 +
arch/arm/mach-imx/include/mach/imx-nand.h | 4 +-
arch/arm/mach-imx/include/mach/imx1-regs.h | 8 ---
arch/arm/mach-imx/include/mach/imx21-regs.h | 8 ---
arch/arm/mach-imx/include/mach/imx27-regs.h | 8 ---
arch/arm/mach-imx/include/mach/imx31-regs.h | 10 ---
arch/arm/mach-imx/include/mach/imx35-regs.h | 10 ---
arch/arm/mach-imx/include/mach/imx51-regs.h | 7 --
arch/arm/mach-imx/speed-imx25.c | 3 +-
arch/arm/mach-imx/speed-imx35.c | 9 ++-
arch/arm/mach-imx/speed.c | 1 +
arch/ppc/lib/Makefile | 1 -
arch/ppc/lib/cache.c | 50 ---------------
arch/sandbox/os/common.c | 5 --
commands/bootm.c | 2 +-
commands/edit.c | 4 +-
commands/loadb.c | 1 -
commands/loads.c | 1 -
commands/mem.c | 2 +-
commands/version.c | 1 -
common/console.c | 8 +-
common/dlmalloc.c | 41 ++++++------
common/env.c | 2 +-
common/environment.c | 2 +-
common/hush.c | 10 ++--
common/memsize.c | 1 +
drivers/net/fec_imx.c | 8 +-
drivers/net/fec_imx.h | 6 +-
drivers/serial/serial_imx.c | 89 ++++++++++++++-------------
fs/ramfs.c | 2 +-
include/cache.h | 1 -
include/command.h | 7 +-
include/common.h | 4 +
include/image.h | 1 +
include/notifier.h | 1 +
lib/Makefile | 1 -
lib/copy_file.c | 2 +
lib/crc32.c | 2 +-
lib/driver.c | 4 +-
lib/fnmatch.c | 5 +-
lib/glob.c | 36 ++++-------
lib/ldiv.c | 55 ----------------
lib/libbb.c | 2 +-
lib/process_escape_sequence.c | 1 +
lib/readline.c | 6 +-
net/net.c | 4 +-
net/ping.c | 4 +-
57 files changed, 186 insertions(+), 358 deletions(-)
delete mode 100644 arch/arm/lib/cache.c
delete mode 100644 arch/ppc/lib/cache.c
delete mode 100644 lib/ldiv.c
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 01/42] glob: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
@ 2010-10-19 12:54 ` Sascha Hauer
2010-10-19 12:54 ` [PATCH 02/42] fnmatch:sparse fixes Sascha Hauer
` (40 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:54 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
lib/glob.c | 36 ++++++++++++------------------------
1 files changed, 12 insertions(+), 24 deletions(-)
diff --git a/lib/glob.c b/lib/glob.c
index a5e3d1d..43d2f67 100644
--- a/lib/glob.c
+++ b/lib/glob.c
@@ -100,11 +100,8 @@ const __ptr_t b;
`glob' returns GLOB_ABEND; if it returns zero, the error is ignored.
If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
Otherwise, `glob' returns zero. */
-int glob(pattern, flags, errfunc, pglob)
-const char *pattern;
-int flags;
-int (*errfunc) __P((const char *, int));
-glob_t *pglob;
+int glob(const char *pattern, int flags,
+ int (*errfunc) __P((const char *, int)), glob_t *pglob)
{
const char *filename;
char *dirname = NULL;
@@ -171,7 +168,7 @@ glob_t *pglob;
For each name we found, call glob_in_dir on it and FILENAME,
appending the results to PGLOB. */
for (i = 0; i < dirs.gl_pathc; ++i) {
- int oldcount;
+ int oldcount1;
#ifdef SHELL
{
@@ -186,7 +183,7 @@ glob_t *pglob;
}
#endif /* SHELL. */
- oldcount = pglob->gl_pathc;
+ oldcount1 = pglob->gl_pathc;
status = glob_in_dir(filename, dirs.gl_pathv[i],
(flags | GLOB_APPEND) &
~GLOB_NOCHECK, errfunc, pglob);
@@ -202,8 +199,8 @@ glob_t *pglob;
/* Stick the directory on the front of each name. */
prefix_array(dirs.gl_pathv[i],
- &pglob->gl_pathv[oldcount],
- pglob->gl_pathc - oldcount,
+ &pglob->gl_pathv[oldcount1],
+ pglob->gl_pathc - oldcount1,
flags & GLOB_MARK);
}
@@ -286,11 +283,8 @@ out:
unless DIRNAME is just "/". Each old element of ARRAY is freed.
If ADD_SLASH is non-zero, allocate one character more than
necessary, so that a slash can be appended later. */
-static int prefix_array(dirname, array, n, add_slash)
-const char *dirname;
-char **array;
-size_t n;
-int add_slash;
+static int prefix_array(const char *dirname, char **array, size_t n,
+ int add_slash)
{
register size_t i;
size_t dirlen = strlen(dirname);
@@ -319,12 +313,8 @@ int add_slash;
and matches are searched for in DIRECTORY.
The GLOB_NOSORT bit in FLAGS is ignored. No sorting is ever done.
The GLOB_APPEND flag is assumed to be set (always appends). */
-static int glob_in_dir(pattern, directory, flags, errfunc, pglob)
-const char *pattern;
-const char *directory;
-int flags;
-int (*errfunc) __P((const char *, int));
-glob_t *pglob;
+static int glob_in_dir(const char *pattern, const char *directory,
+ int flags, int (*errfunc) __P((const char *, int)), glob_t *pglob)
{
__ptr_t stream;
@@ -457,12 +447,10 @@ glob_t *pglob;
#endif /* CONFIG_FAKE_GLOB */
/* Free storage allocated in PGLOB by a previous `glob' call. */
-void globfree(pglob)
-register glob_t *pglob;
+void globfree(glob_t *pglob)
{
if (pglob->gl_pathv != NULL) {
- register int i =
- pglob->gl_flags & GLOB_DOOFFS ? pglob->gl_offs : 0;
+ int i = pglob->gl_flags & GLOB_DOOFFS ? pglob->gl_offs : 0;
for (; i < pglob->gl_pathc; ++i)
if (pglob->gl_pathv[i] != NULL)
free((__ptr_t) pglob->gl_pathv[i]);
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 02/42] fnmatch:sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
2010-10-19 12:54 ` [PATCH 01/42] glob: " Sascha Hauer
@ 2010-10-19 12:54 ` Sascha Hauer
2010-10-19 12:54 ` [PATCH 03/42] readline: sparse fixes Sascha Hauer
` (39 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:54 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
lib/fnmatch.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/lib/fnmatch.c b/lib/fnmatch.c
index 223b9d3..1a5e8d0 100644
--- a/lib/fnmatch.c
+++ b/lib/fnmatch.c
@@ -48,10 +48,7 @@ extern int errno;
/* Match STRING against the filename pattern PATTERN, returning zero if
it matches, nonzero if not. */
-int fnmatch(pattern, string, flags)
-const char *pattern;
-const char *string;
-int flags;
+int fnmatch(const char *pattern, const char *string, int flags)
{
register const char *p = pattern, *n = string;
register char c;
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 03/42] readline: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
2010-10-19 12:54 ` [PATCH 01/42] glob: " Sascha Hauer
2010-10-19 12:54 ` [PATCH 02/42] fnmatch:sparse fixes Sascha Hauer
@ 2010-10-19 12:54 ` Sascha Hauer
2010-10-19 12:54 ` [PATCH 04/42] edit: " Sascha Hauer
` (38 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:54 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
lib/readline.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/readline.c b/lib/readline.c
index b82150e..b90de77 100644
--- a/lib/readline.c
+++ b/lib/readline.c
@@ -120,10 +120,10 @@ static char* hist_next(void)
#define ERASE_TO_EOL() { \
if (num < eol_num) { \
- int tmp; \
- for (tmp = num; tmp < eol_num; tmp++) \
+ int t; \
+ for (t = num; t < eol_num; t++) \
getcmd_putch(' '); \
- while (tmp-- > num) \
+ while (t-- > num) \
getcmd_putch(CTL_BACKSPACE); \
eol_num = num; \
} \
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 04/42] edit: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (2 preceding siblings ...)
2010-10-19 12:54 ` [PATCH 03/42] readline: sparse fixes Sascha Hauer
@ 2010-10-19 12:54 ` Sascha Hauer
2010-10-19 12:54 ` [PATCH 05/42] command.h: " Sascha Hauer
` (37 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:54 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
commands/edit.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/commands/edit.c b/commands/edit.c
index a65b08a..7da6816 100644
--- a/commands/edit.c
+++ b/commands/edit.c
@@ -231,7 +231,7 @@ static int edit_read_file(const char *path)
line->prev = lastline;
if (lastline)
lastline->next = line;
- line->next = 0;
+ line->next = NULL;
lastline = line;
if (!lineend)
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 05/42] command.h: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (3 preceding siblings ...)
2010-10-19 12:54 ` [PATCH 04/42] edit: " Sascha Hauer
@ 2010-10-19 12:54 ` Sascha Hauer
2010-10-19 12:54 ` [PATCH 06/42] crc32: " Sascha Hauer
` (36 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:54 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
include/command.h | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/command.h b/include/command.h
index 4a4d9cf..e235f63 100644
--- a/include/command.h
+++ b/include/command.h
@@ -78,9 +78,10 @@ void barebox_cmd_usage(struct command *cmdtp);
#define Struct_Section __attribute__ ((unused,section (".barebox_cmd")))
-#define BAREBOX_CMD_START(_name) \
-const struct command __barebox_cmd_##_name \
- __attribute__ ((unused,section (".barebox_cmd_" __stringify(_name)))) = { \
+#define BAREBOX_CMD_START(_name) \
+extern const struct command __barebox_cmd_##_name; \
+const struct command __barebox_cmd_##_name \
+ __attribute__ ((unused,section (".barebox_cmd_" __stringify(_name)))) = { \
.name = #_name,
#define BAREBOX_CMD_END \
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 06/42] crc32: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (4 preceding siblings ...)
2010-10-19 12:54 ` [PATCH 05/42] command.h: " Sascha Hauer
@ 2010-10-19 12:54 ` Sascha Hauer
2010-10-19 12:54 ` [PATCH 07/42] copy_file: " Sascha Hauer
` (35 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:54 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
lib/crc32.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/crc32.c b/lib/crc32.c
index 3481782..275edb4 100644
--- a/lib/crc32.c
+++ b/lib/crc32.c
@@ -42,7 +42,7 @@ static void make_crc_table(void);
the information needed to generate CRC's on data a byte at a time for all
combinations of CRC register values and incoming bytes.
*/
-static void make_crc_table()
+static void make_crc_table(void)
{
ulong c;
int n, k;
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 07/42] copy_file: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (5 preceding siblings ...)
2010-10-19 12:54 ` [PATCH 06/42] crc32: " Sascha Hauer
@ 2010-10-19 12:54 ` Sascha Hauer
2010-10-19 12:54 ` [PATCH 08/42] commands/mem.c: " Sascha Hauer
` (34 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:54 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
lib/copy_file.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/copy_file.c b/lib/copy_file.c
index 0ff0435..7083531 100644
--- a/lib/copy_file.c
+++ b/lib/copy_file.c
@@ -3,6 +3,8 @@
#include <fcntl.h>
#include <errno.h>
#include <malloc.h>
+#include <libbb.h>
+
#define RW_BUF_SIZE (ulong)4096
/**
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 08/42] commands/mem.c: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (6 preceding siblings ...)
2010-10-19 12:54 ` [PATCH 07/42] copy_file: " Sascha Hauer
@ 2010-10-19 12:54 ` Sascha Hauer
2010-10-19 12:54 ` [PATCH 09/42] dlmalloc: " Sascha Hauer
` (33 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:54 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
include/common.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/common.h b/include/common.h
index 64f49db..0cf51b3 100644
--- a/include/common.h
+++ b/include/common.h
@@ -216,4 +216,6 @@ int run_shell(void);
#define PAGE_SIZE 4096
+int memory_display(char *addr, ulong offs, ulong nbytes, int size);
+
#endif /* __COMMON_H_ */
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 09/42] dlmalloc: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (7 preceding siblings ...)
2010-10-19 12:54 ` [PATCH 08/42] commands/mem.c: " Sascha Hauer
@ 2010-10-19 12:54 ` Sascha Hauer
2010-10-19 12:54 ` [PATCH 10/42] console: " Sascha Hauer
` (32 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:54 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
common/dlmalloc.c | 41 +++++++++++++++++++++--------------------
1 files changed, 21 insertions(+), 20 deletions(-)
diff --git a/common/dlmalloc.c b/common/dlmalloc.c
index 83b1e18..ff63fbe 100644
--- a/common/dlmalloc.c
+++ b/common/dlmalloc.c
@@ -792,7 +792,7 @@ typedef struct malloc_chunk *mbinptr;
#define IAV(i) bin_at(i), bin_at(i)
static mbinptr av_[NAV * 2 + 2] = {
- 0, 0,
+ NULL, NULL,
IAV (0), IAV (1), IAV (2), IAV (3), IAV (4), IAV (5), IAV (6), IAV (7),
IAV (8), IAV (9), IAV (10), IAV (11), IAV (12), IAV (13), IAV (14),
IAV (15),
@@ -1209,7 +1209,7 @@ void *malloc(size_t bytes)
INTERNAL_SIZE_T nb;
if ((long) bytes < 0)
- return 0;
+ return NULL;
nb = request2size(bytes); /* padded request size; */
@@ -1364,7 +1364,7 @@ void *malloc(size_t bytes)
/* Try to extend */
malloc_extend_top(nb);
if ((remainder_size = chunksize(top) - nb) < (long) MINSIZE)
- return 0; /* propagate failure */
+ return NULL; /* propagate failure */
}
victim = top;
@@ -1405,7 +1405,7 @@ void free(void *mem)
mchunkptr fwd; /* misc temp for linking */
int islr; /* track whether merging with last_remainder */
- if (mem == 0) /* free(0) has no effect */
+ if (!mem) /* free(0) has no effect */
return;
p = mem2chunk(mem);
@@ -1524,15 +1524,15 @@ void *realloc(void *oldmem, size_t bytes)
#ifdef REALLOC_ZERO_BYTES_FREES
if (bytes == 0) {
free(oldmem);
- return 0;
+ return NULL;
}
#endif
if ((long)bytes < 0)
- return 0;
+ return NULL;
/* realloc of null is supposed to be same as malloc */
- if (oldmem == 0)
+ if (!oldmem)
return malloc(bytes);
newp = oldp = mem2chunk(oldmem);
@@ -1570,7 +1570,7 @@ void *realloc(void *oldmem, size_t bytes)
goto split;
}
} else {
- next = 0;
+ next = NULL;
nextsize = 0;
}
@@ -1582,7 +1582,7 @@ void *realloc(void *oldmem, size_t bytes)
/* try forward + backward first to save a later consolidation */
- if (next != 0) {
+ if (next) {
/* into top */
if (next == top) {
if ((long)
@@ -1618,8 +1618,7 @@ void *realloc(void *oldmem, size_t bytes)
}
/* backward only */
- if (prev != 0
- && (long)(prevsize + newsize) >= (long)nb) {
+ if (prev && (long)(prevsize + newsize) >= (long)nb) {
unlink(prev, bck, fwd);
newp = prev;
newsize += prevsize;
@@ -1633,8 +1632,8 @@ void *realloc(void *oldmem, size_t bytes)
newmem = malloc(bytes);
- if (newmem == 0) /* propagate failure */
- return 0;
+ if (!newmem) /* propagate failure */
+ return NULL;
/* Avoid copy if newp is next chunk after oldp. */
/* (This can only happen when new chunk is sbrk'ed.) */
@@ -1697,7 +1696,7 @@ void *memalign(size_t alignment, size_t bytes)
long remainder_size; /* its size */
if ((long) bytes < 0)
- return 0;
+ return NULL;
/* If need less alignment than we give anyway, just relay to malloc */
@@ -1714,8 +1713,8 @@ void *memalign(size_t alignment, size_t bytes)
nb = request2size(bytes);
m = (char*)(malloc (nb + alignment + MINSIZE));
- if (m == 0)
- return 0; /* propagate failure */
+ if (!m)
+ return NULL; /* propagate failure */
p = mem2chunk(m);
@@ -1763,6 +1762,7 @@ void *memalign(size_t alignment, size_t bytes)
return chunk2mem(p);
}
+#if 0
/*
* valloc just invokes memalign with alignment argument equal
* to the page size of the system (or as near to this as can
@@ -1772,6 +1772,7 @@ void *valloc(size_t bytes)
{
return memalign(malloc_getpagesize, bytes);
}
+#endif
/*
* pvalloc just invokes valloc for the nearest pagesize
@@ -1802,10 +1803,10 @@ void *calloc(size_t n, size_t elem_size)
void *mem = malloc(sz);
if ((long)n < 0)
- return 0;
+ return NULL;
- if (mem == 0)
- return 0;
+ if (!mem)
+ return NULL;
else {
p = mem2chunk(mem);
@@ -1915,7 +1916,7 @@ size_t malloc_usable_size(void *mem)
{
mchunkptr p;
- if (mem == 0)
+ if (!mem)
return 0;
else {
p = mem2chunk(mem);
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 10/42] console: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (8 preceding siblings ...)
2010-10-19 12:54 ` [PATCH 09/42] dlmalloc: " Sascha Hauer
@ 2010-10-19 12:54 ` Sascha Hauer
2010-10-19 12:54 ` [PATCH 11/42] notifier: " Sascha Hauer
` (31 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:54 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
common/console.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/common/console.c b/common/console.c
index 204a08c..3a1b451 100644
--- a/common/console.c
+++ b/common/console.c
@@ -120,7 +120,7 @@ static int console_baudrate_set(struct device_d *dev, struct param_d *param,
static struct kfifo *console_input_buffer;
static struct kfifo *console_output_buffer;
-int getc_buffer_flush(void)
+static int getc_buffer_flush(void)
{
console_input_buffer = kfifo_alloc(1024);
console_output_buffer = kfifo_alloc(1024);
@@ -247,7 +247,9 @@ int tstc(void)
}
EXPORT_SYMBOL(tstc);
-void __early_initdata *early_console_base;
+#ifdef CONFIG_HAS_EARLY_INIT
+static void __early_initdata *early_console_base;
+#endif
void console_putc(unsigned int ch, char c)
{
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 11/42] notifier: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (9 preceding siblings ...)
2010-10-19 12:54 ` [PATCH 10/42] console: " Sascha Hauer
@ 2010-10-19 12:54 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 12/42] fec_imx: " Sascha Hauer
` (30 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:54 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
include/notifier.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/notifier.h b/include/notifier.h
index 878b17e..cb2be5f 100644
--- a/include/notifier.h
+++ b/include/notifier.h
@@ -15,6 +15,7 @@ struct notifier_head {
};
int notifier_chain_register(struct notifier_head *nh, struct notifier_block *n);
+int notifier_chain_unregister(struct notifier_head *nh, struct notifier_block *n);
int notifier_call_chain(struct notifier_head *nh, unsigned long val, void *v);
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 12/42] fec_imx: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (10 preceding siblings ...)
2010-10-19 12:54 ` [PATCH 11/42] notifier: " Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 13/42] imx gpio: " Sascha Hauer
` (29 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/net/fec_imx.c | 8 ++++----
drivers/net/fec_imx.h | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/fec_imx.c b/drivers/net/fec_imx.c
index 73b7a54..9c8de77 100644
--- a/drivers/net/fec_imx.c
+++ b/drivers/net/fec_imx.c
@@ -216,7 +216,7 @@ static void fec_tbd_init(struct fec_priv *fec)
* @param[in] last 1 if this is the last buffer descriptor in the chain, else 0
* @param[in] pRbd buffer descriptor to mark free again
*/
-static void fec_rbd_clean(int last, struct buffer_descriptor *pRbd)
+static void fec_rbd_clean(int last, struct buffer_descriptor __iomem *pRbd)
{
/*
* Reset buffer descriptor as empty
@@ -464,7 +464,7 @@ static int fec_send(struct eth_device *dev, void *eth_data, int data_length)
static int fec_recv(struct eth_device *dev)
{
struct fec_priv *fec = (struct fec_priv *)dev->priv;
- struct buffer_descriptor *rbd = &fec->rbd_base[fec->rbd_index];
+ struct buffer_descriptor __iomem *rbd = &fec->rbd_base[fec->rbd_index];
unsigned long ievent;
int frame_length, len = 0;
struct fec_frame *frame;
@@ -568,11 +568,11 @@ static int fec_probe(struct device_d *dev)
sizeof(struct buffer_descriptor) + 2 * DB_ALIGNMENT);
base += (DB_ALIGNMENT - 1);
base &= ~(DB_ALIGNMENT - 1);
- fec->rbd_base = (struct buffer_descriptor *)base;
+ fec->rbd_base = (struct buffer_descriptor __force __iomem *)base;
base += FEC_RBD_NUM * sizeof (struct buffer_descriptor) +
(DB_ALIGNMENT - 1);
base &= ~(DB_ALIGNMENT - 1);
- fec->tbd_base = (struct buffer_descriptor *)base;
+ fec->tbd_base = (struct buffer_descriptor __force __iomem *)base;
writel((uint32_t)virt_to_phys(fec->tbd_base), fec->regs + FEC_ETDSR);
writel((uint32_t)virt_to_phys(fec->rbd_base), fec->regs + FEC_ERDSR);
diff --git a/drivers/net/fec_imx.h b/drivers/net/fec_imx.h
index e1473a4..ce0fd89 100644
--- a/drivers/net/fec_imx.h
+++ b/drivers/net/fec_imx.h
@@ -135,11 +135,11 @@ struct buffer_descriptor {
* @brief i.MX27-FEC private structure
*/
struct fec_priv {
- void *regs;
+ void __iomem *regs;
xceiver_type xcv_type; /* transceiver type */
- struct buffer_descriptor *rbd_base; /* RBD ring */
+ struct buffer_descriptor __iomem *rbd_base; /* RBD ring */
int rbd_index; /* next receive BD to read */
- struct buffer_descriptor *tbd_base; /* TBD ring */
+ struct buffer_descriptor __iomem *tbd_base; /* TBD ring */
int tbd_index; /* next transmit BD to write */
struct mii_device miidev;
};
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 13/42] imx gpio: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (11 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 12/42] fec_imx: " Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 14/42] imx clocksource: " Sascha Hauer
` (28 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-imx/gpio.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-imx/gpio.c b/arch/arm/mach-imx/gpio.c
index c6a59a6..0a3e046 100644
--- a/arch/arm/mach-imx/gpio.c
+++ b/arch/arm/mach-imx/gpio.c
@@ -27,6 +27,7 @@
#include <errno.h>
#include <asm/io.h>
#include <mach/imx-regs.h>
+#include <mach/gpio.h>
#if defined CONFIG_ARCH_IMX1 || defined CONFIG_ARCH_IMX21 || defined CONFIG_ARCH_IMX27
#define GPIO_DR 0x1c
@@ -47,20 +48,20 @@
#define GPIO_ISR 0x18
#endif
-extern void *imx_gpio_base[];
+extern void __iomem *imx_gpio_base[];
extern int imx_gpio_count;
-static void *gpio_get_base(unsigned gpio)
+static void __iomem *gpio_get_base(unsigned gpio)
{
if (gpio >= imx_gpio_count)
- return 0;
+ return NULL;
return imx_gpio_base[gpio / 32];
}
void gpio_set_value(unsigned gpio, int value)
{
- void *base = gpio_get_base(gpio);
+ void __iomem *base = gpio_get_base(gpio);
int shift = gpio % 32;
u32 val;
@@ -79,7 +80,7 @@ void gpio_set_value(unsigned gpio, int value)
int gpio_direction_input(unsigned gpio)
{
- void *base = gpio_get_base(gpio);
+ void __iomem *base = gpio_get_base(gpio);
int shift = gpio % 32;
u32 val;
@@ -96,7 +97,7 @@ int gpio_direction_input(unsigned gpio)
int gpio_direction_output(unsigned gpio, int value)
{
- void *base = gpio_get_base(gpio);
+ void __iomem *base = gpio_get_base(gpio);
int shift = gpio % 32;
u32 val;
@@ -114,7 +115,7 @@ int gpio_direction_output(unsigned gpio, int value)
int gpio_get_value(unsigned gpio)
{
- void *base = gpio_get_base(gpio);
+ void __iomem *base = gpio_get_base(gpio);
int shift = gpio % 32;
u32 val;
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 14/42] imx clocksource: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (12 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 13/42] imx gpio: " Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 15/42] armlinux: " Sascha Hauer
` (27 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-imx/clocksource.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-imx/clocksource.c b/arch/arm/mach-imx/clocksource.c
index b3a74b3..e492890 100644
--- a/arch/arm/mach-imx/clocksource.c
+++ b/arch/arm/mach-imx/clocksource.c
@@ -40,7 +40,7 @@
#define GPT(x) __REG(IMX_TIM1_BASE + (x))
#define timer_base (IMX_TIM1_BASE)
-uint64_t imx_clocksource_read(void)
+static uint64_t imx_clocksource_read(void)
{
return readl(timer_base + GPT_TCN);
}
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 15/42] armlinux: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (13 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 14/42] imx clocksource: " Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 16/42] arch/arm/cpu/cpu.c: " Sascha Hauer
` (26 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/lib/armlinux.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c
index f690fef..a70625c 100644
--- a/arch/arm/lib/armlinux.c
+++ b/arch/arm/lib/armlinux.c
@@ -40,6 +40,7 @@
#include <asm/global_data.h>
#include <asm/setup.h>
#include <asm/barebox-arm.h>
+#include <asm/armlinux.h>
static struct tag *params;
static int armlinux_architecture = 0;
@@ -207,7 +208,7 @@ void armlinux_set_serial(u64 serial)
}
#ifdef CONFIG_CMD_BOOTM
-int do_bootm_linux(struct image_data *data)
+static int do_bootm_linux(struct image_data *data)
{
void (*theKernel)(int zero, int arch, void *params);
image_header_t *os_header = &data->os->header;
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 16/42] arch/arm/cpu/cpu.c: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (14 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 15/42] armlinux: " Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 17/42] cache-l2x0: " Sascha Hauer
` (25 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/cpu/cpu.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/arm/cpu/cpu.c b/arch/arm/cpu/cpu.c
index 133d144..346f8dc 100644
--- a/arch/arm/cpu/cpu.c
+++ b/arch/arm/cpu/cpu.c
@@ -27,6 +27,7 @@
#include <common.h>
#include <command.h>
+#include <cache.h>
#include <asm/mmu.h>
#include <asm/system.h>
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 17/42] cache-l2x0: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (15 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 16/42] arch/arm/cpu/cpu.c: " Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 18/42] speed-imx35: " Sascha Hauer
` (24 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/cpu/cache-l2x0.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/cpu/cache-l2x0.c b/arch/arm/cpu/cache-l2x0.c
index 61569d2..1ea7bab 100644
--- a/arch/arm/cpu/cache-l2x0.c
+++ b/arch/arm/cpu/cache-l2x0.c
@@ -127,7 +127,7 @@ static void l2x0_clean_range(unsigned long start, unsigned long end)
cache_sync();
}
-void l2x0_flush_range(unsigned long start, unsigned long end)
+static void l2x0_flush_range(unsigned long start, unsigned long end)
{
start &= ~(CACHE_LINE_SIZE - 1);
while (start < end) {
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 18/42] speed-imx35: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (16 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 17/42] cache-l2x0: " Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 19/42] imx_dump_clocks: " Sascha Hauer
` (23 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-imx/speed-imx35.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-imx/speed-imx35.c b/arch/arm/mach-imx/speed-imx35.c
index 324cc29..8937ef1 100644
--- a/arch/arm/mach-imx/speed-imx35.c
+++ b/arch/arm/mach-imx/speed-imx35.c
@@ -19,6 +19,7 @@
#include <mach/imx-regs.h>
#include <asm/io.h>
#include <mach/clock.h>
+#include <mach/generic.h>
#include <init.h>
unsigned long imx_get_mpllclk(void)
@@ -27,7 +28,7 @@ unsigned long imx_get_mpllclk(void)
return imx_decode_pll(mpctl, CONFIG_MX35_HCLK_FREQ);
}
-unsigned long imx_get_ppllclk(void)
+static unsigned long imx_get_ppllclk(void)
{
ulong ppctl = readl(IMX_CCM_BASE + CCM_PPCTL);
return imx_decode_pll(ppctl, CONFIG_MX35_HCLK_FREQ);
@@ -56,7 +57,7 @@ static struct arm_ahb_div clk_consumer[] = {
{ .arm = 0, .ahb = 0, .sel = 0},
};
-unsigned long imx_get_armclk(void)
+static unsigned long imx_get_armclk(void)
{
unsigned long pdr0 = readl(IMX_CCM_BASE + CCM_PDR0);
struct arm_ahb_div *aad;
@@ -83,7 +84,7 @@ unsigned long imx_get_ahbclk(void)
return fref / aad->ahb;
}
-unsigned long imx_get_ipgclk(void)
+static unsigned long imx_get_ipgclk(void)
{
ulong clk = imx_get_ahbclk();
@@ -95,7 +96,7 @@ static unsigned long get_3_3_div(unsigned long in)
return (((in >> 3) & 0x7) + 1) * ((in & 0x7) + 1);
}
-unsigned long imx_get_ipg_perclk(void)
+static unsigned long imx_get_ipg_perclk(void)
{
ulong pdr0 = readl(IMX_CCM_BASE + CCM_PDR0);
ulong pdr4 = readl(IMX_CCM_BASE + CCM_PDR4);
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 19/42] imx_dump_clocks: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (17 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 18/42] speed-imx35: " Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 20/42] i.MX serial: " Sascha Hauer
` (22 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-imx/include/mach/clock.h | 2 ++
arch/arm/mach-imx/speed-imx25.c | 3 +--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-imx/include/mach/clock.h b/arch/arm/mach-imx/include/mach/clock.h
index bbe7a60..5b590a2 100644
--- a/arch/arm/mach-imx/include/mach/clock.h
+++ b/arch/arm/mach-imx/include/mach/clock.h
@@ -33,4 +33,6 @@ ulong imx_get_mmcclk(void);
int imx_clko_set_div(int div);
void imx_clko_set_src(int src);
+void imx_dump_clocks(void);
+
#endif /* __ASM_ARCH_CLOCK_H */
diff --git a/arch/arm/mach-imx/speed-imx25.c b/arch/arm/mach-imx/speed-imx25.c
index e8feb6b..cb28e9f 100644
--- a/arch/arm/mach-imx/speed-imx25.c
+++ b/arch/arm/mach-imx/speed-imx25.c
@@ -87,7 +87,7 @@ unsigned long imx_get_mmcclk(void)
return imx_get_perclk(3);
}
-int imx_dump_clocks(void)
+void imx_dump_clocks(void)
{
printf("mpll: %10d Hz\n", imx_get_mpllclk());
printf("upll: %10d Hz\n", imx_get_upllclk());
@@ -99,7 +99,6 @@ int imx_dump_clocks(void)
printf("lcd: %10d Hz\n", imx_get_perclk(7));
printf("i2c: %10d Hz\n", imx_get_perclk(6));
printf("sdhc1: %10d Hz\n", imx_get_perclk(3));
- return 0;
}
/*
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 20/42] i.MX serial: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (18 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 19/42] imx_dump_clocks: " Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 21/42] i.MX remove wdog registers from header files Sascha Hauer
` (21 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/serial/serial_imx.c | 89 ++++++++++++++++++++++--------------------
1 files changed, 47 insertions(+), 42 deletions(-)
diff --git a/drivers/serial/serial_imx.c b/drivers/serial/serial_imx.c
index 25e6a0c..a7562f9 100644
--- a/drivers/serial/serial_imx.c
+++ b/drivers/serial/serial_imx.c
@@ -171,13 +171,14 @@ struct imx_serial_priv {
struct console_device cdev;
int baudrate;
struct notifier_block notify;
+ void __iomem *regs;
};
-static int imx_serial_reffreq(ulong base)
+static int imx_serial_reffreq(void __iomem *regs)
{
ulong rfdiv;
- rfdiv = (readl(base + UFCR) >> 7) & 7;
+ rfdiv = (readl(regs + UFCR) >> 7) & 7;
rfdiv = rfdiv < 6 ? 6 - rfdiv : 7;
return imx_get_uartclk() / rfdiv;
@@ -190,108 +191,111 @@ static int imx_serial_reffreq(ulong base)
*/
static int imx_serial_init_port(struct console_device *cdev)
{
- struct device_d *dev = cdev->dev;
- ulong base = dev->map_base;
+ struct imx_serial_priv *priv = container_of(cdev,
+ struct imx_serial_priv, cdev);
+ void __iomem *regs = priv->regs;
uint32_t val;
- writel(UCR1_VAL, base + UCR1);
- writel(UCR2_WS | UCR2_IRTS, base + UCR2);
- writel(UCR3_VAL, base + UCR3);
- writel(UCR4_VAL, base + UCR4);
- writel(0x0000002B, base + UESC);
- writel(0, base + UTIM);
- writel(0, base + UBIR);
- writel(0, base + UBMR);
- writel(0, base + UTS);
+ writel(UCR1_VAL, regs + UCR1);
+ writel(UCR2_WS | UCR2_IRTS, regs + UCR2);
+ writel(UCR3_VAL, regs + UCR3);
+ writel(UCR4_VAL, regs + UCR4);
+ writel(0x0000002B, regs + UESC);
+ writel(0, regs + UTIM);
+ writel(0, regs + UBIR);
+ writel(0, regs + UBMR);
+ writel(0, regs + UTS);
/* Configure FIFOs */
- writel(0xa81, base + UFCR);
+ writel(0xa81, regs + UFCR);
#ifdef ONEMS
- writel(imx_serial_reffreq(base) / 1000, base + ONEMS);
+ writel(imx_serial_reffreq(regs) / 1000, regs + ONEMS);
#endif
/* Enable FIFOs */
- val = readl(base + UCR2);
+ val = readl(regs + UCR2);
val |= UCR2_SRST | UCR2_RXEN | UCR2_TXEN;
- writel(val, base + UCR2);
+ writel(val, regs + UCR2);
/* Clear status flags */
- val = readl(base + USR2);
+ val = readl(regs + USR2);
val |= USR2_ADET | USR2_DTRF | USR2_IDLE | USR2_IRINT | USR2_WAKE |
USR2_RTSF | USR2_BRCD | USR2_ORE | USR2_RDR;
- writel(val, base + USR2);
+ writel(val, regs + USR2);
/* Clear status flags */
- val = readl(base + USR2);
+ val = readl(regs + USR2);
val |= USR1_PARITYERR | USR1_RTSD | USR1_ESCF | USR1_FRAMERR | USR1_AIRINT |
USR1_AWAKE;
- writel(val, base + USR2);
+ writel(val, regs + USR2);
return 0;
}
static void imx_serial_putc(struct console_device *cdev, char c)
{
- struct device_d *dev = cdev->dev;
+ struct imx_serial_priv *priv = container_of(cdev,
+ struct imx_serial_priv, cdev);
/* Wait for Tx FIFO not full */
- while (readl(dev->map_base + UTS) & UTS_TXFULL);
+ while (readl(priv->regs + UTS) & UTS_TXFULL);
- writel(c, dev->map_base + URTX0);
+ writel(c, priv->regs + URTX0);
}
static int imx_serial_tstc(struct console_device *cdev)
{
- struct device_d *dev = cdev->dev;
+ struct imx_serial_priv *priv = container_of(cdev,
+ struct imx_serial_priv, cdev);
/* If receive fifo is empty, return false */
- if (readl(dev->map_base + UTS) & UTS_RXEMPTY)
+ if (readl(priv->regs + UTS) & UTS_RXEMPTY)
return 0;
return 1;
}
static int imx_serial_getc(struct console_device *cdev)
{
- struct device_d *dev = cdev->dev;
+ struct imx_serial_priv *priv = container_of(cdev,
+ struct imx_serial_priv, cdev);
unsigned char ch;
- while (readl(dev->map_base + UTS) & UTS_RXEMPTY);
+ while (readl(priv->regs + UTS) & UTS_RXEMPTY);
- ch = readl(dev->map_base + URXD0);
+ ch = readl(priv->regs + URXD0);
return ch;
}
static void imx_serial_flush(struct console_device *cdev)
{
- struct device_d *dev = cdev->dev;
+ struct imx_serial_priv *priv = container_of(cdev,
+ struct imx_serial_priv, cdev);
- while (!(readl(dev->map_base + USR2) & USR2_TXDC));
+ while (!(readl(priv->regs + USR2) & USR2_TXDC));
}
static int imx_serial_setbaudrate(struct console_device *cdev, int baudrate)
{
- struct device_d *dev = cdev->dev;
struct imx_serial_priv *priv = container_of(cdev,
struct imx_serial_priv, cdev);
+ void __iomem *regs = priv->regs;
uint32_t val;
-
- ulong base = dev->map_base;
- ulong ucr1 = readl(base + UCR1);
+ uint32_t ucr1 = readl(regs + UCR1);
/* disable UART */
- val = readl(base + UCR1);
+ val = readl(regs + UCR1);
val &= ~UCR1_UARTEN;
- writel(val, base + UCR1);
+ writel(val, regs + UCR1);
/* Set the numerator value minus one of the BRM ratio */
- writel((baudrate / 100) - 1, base + UBIR);
+ writel((baudrate / 100) - 1, regs + UBIR);
/* Set the denominator value minus one of the BRM ratio */
- writel((imx_serial_reffreq(base) / 1600) - 1, base + UBMR);
+ writel((imx_serial_reffreq(regs) / 1600) - 1, regs + UBMR);
- writel(ucr1, base + UCR1);
+ writel(ucr1, regs + UCR1);
priv->baudrate = baudrate;
@@ -318,6 +322,7 @@ static int imx_serial_probe(struct device_d *dev)
priv = malloc(sizeof(*priv));
cdev = &priv->cdev;
+ priv->regs = (void __force __iomem *)dev->map_base;
dev->type_data = cdev;
cdev->dev = dev;
cdev->f_caps = CONSOLE_STDIN | CONSOLE_STDOUT | CONSOLE_STDERR;
@@ -331,9 +336,9 @@ static int imx_serial_probe(struct device_d *dev)
imx_serial_setbaudrate(cdev, 115200);
/* Enable UART */
- val = readl(cdev->dev->map_base + UCR1);
+ val = readl(priv->regs + UCR1);
val |= UCR1_UARTEN;
- writel(val, cdev->dev->map_base + UCR1);
+ writel(val, priv->regs + UCR1);
console_register(cdev);
priv->notify.notifier_call = imx_clocksource_clock_change;
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 21/42] i.MX remove wdog registers from header files
2010-10-19 12:54 sparse fixes Sascha Hauer
` (19 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 20/42] i.MX serial: " Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-20 1:48 ` Jean-Christophe PLAGNIOL-VILLARD
2010-10-19 12:55 ` [PATCH 22/42] hush: sparse fixes Sascha Hauer
` (20 subsequent siblings)
41 siblings, 1 reply; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-imx/clocksource.c | 23 +++++++++++++++++++----
arch/arm/mach-imx/include/mach/imx1-regs.h | 8 --------
arch/arm/mach-imx/include/mach/imx21-regs.h | 8 --------
arch/arm/mach-imx/include/mach/imx27-regs.h | 8 --------
arch/arm/mach-imx/include/mach/imx31-regs.h | 10 ----------
arch/arm/mach-imx/include/mach/imx35-regs.h | 10 ----------
arch/arm/mach-imx/include/mach/imx51-regs.h | 7 -------
7 files changed, 19 insertions(+), 55 deletions(-)
diff --git a/arch/arm/mach-imx/clocksource.c b/arch/arm/mach-imx/clocksource.c
index e492890..4cb923f 100644
--- a/arch/arm/mach-imx/clocksource.c
+++ b/arch/arm/mach-imx/clocksource.c
@@ -101,19 +101,34 @@ static int clocksource_init (void)
core_initcall(clocksource_init);
/*
+ * Watchdog Registers
+ */
+#ifdef CONFIG_ARCH_IMX1
+#define WDOG_WCR 0x00 /* Watchdog Control Register */
+#define WDOG_WSR 0x02 /* Watchdog Service Register */
+#define WDOG_WSTR 0x04 /* Watchdog Status Register */
+#define WDOG_WCR_WDE (1 << 0)
+#else
+#define WDOG_WCR 0x00 /* Watchdog Control Register */
+#define WDOG_WSR 0x02 /* Watchdog Service Register */
+#define WDOG_WSTR 0x04 /* Watchdog Status Register */
+#define WDOG_WCR_WDE (1 << 2)
+#endif
+
+/*
* Reset the cpu by setting up the watchdog timer and let it time out
*/
void __noreturn reset_cpu (unsigned long ignored)
{
/* Disable watchdog and set Time-Out field to 0 */
- WCR = 0x0000;
+ writew(0x0, IMX_WDT_BASE + WDOG_WCR);
/* Write Service Sequence */
- WSR = 0x5555;
- WSR = 0xAAAA;
+ writew(0x5555, IMX_WDT_BASE + WDOG_WSR);
+ writew(0xaaaa, IMX_WDT_BASE + WDOG_WSR);
/* Enable watchdog */
- WCR = WCR_WDE;
+ writew(WDOG_WCR_WDE, IMX_WDT_BASE + WDOG_WCR);
while (1);
/*NOTREACHED*/
diff --git a/arch/arm/mach-imx/include/mach/imx1-regs.h b/arch/arm/mach-imx/include/mach/imx1-regs.h
index 0d6fd92..f940cdb 100644
--- a/arch/arm/mach-imx/include/mach/imx1-regs.h
+++ b/arch/arm/mach-imx/include/mach/imx1-regs.h
@@ -40,14 +40,6 @@
#define IMX_AITC_BASE (0x23000 + IMX_IO_BASE)
#define IMX_CSI_BASE (0x24000 + IMX_IO_BASE)
-/* Watchdog Registers*/
-#define WCR __REG(IMX_WDT_BASE + 0x00) /* Watchdog Control Register */
-#define WSR __REG(IMX_WDT_BASE + 0x04) /* Watchdog Service Register */
-#define WSTR __REG(IMX_WDT_BASE + 0x08) /* Watchdog Status Register */
-
-/* important definition of some bits of WCR */
-#define WCR_WDE 0x01
-
/* SYSCTRL Registers */
#define SIDR __REG(IMX_SYSCTRL_BASE + 0x4) /* Silicon ID Register */
#define FMCR __REG(IMX_SYSCTRL_BASE + 0x8) /* Function Multiplex Control Register */
diff --git a/arch/arm/mach-imx/include/mach/imx21-regs.h b/arch/arm/mach-imx/include/mach/imx21-regs.h
index 6d64b81..a2c4d03 100644
--- a/arch/arm/mach-imx/include/mach/imx21-regs.h
+++ b/arch/arm/mach-imx/include/mach/imx21-regs.h
@@ -72,14 +72,6 @@
#define CS5L __REG(IMX_EIM_BASE + 0x2C) /* Chip Select 5 Lower Register */
#define EIM __REG(IMX_EIM_BASE + 0x30) /* EIM Configuration Register */
-/* Watchdog Registers*/
-#define WCR __REG16(IMX_WDT_BASE + 0x00) /* Watchdog Control Register */
-#define WSR __REG16(IMX_WDT_BASE + 0x02) /* Watchdog Service Register */
-#define WRSR __REG16(IMX_WDT_BASE + 0x04) /* Watchdog Reset Status Register */
-
-/* important definition of some bits of WCR */
-#define WCR_WDE 0x04
-
/* PLL registers */
#define CSCR __REG(IMX_PLL_BASE + 0x00) /* Clock Source Control Register */
#define MPCTL0 __REG(IMX_PLL_BASE + 0x04) /* MCU PLL Control Register 0 */
diff --git a/arch/arm/mach-imx/include/mach/imx27-regs.h b/arch/arm/mach-imx/include/mach/imx27-regs.h
index f4354ba..0fa954d 100644
--- a/arch/arm/mach-imx/include/mach/imx27-regs.h
+++ b/arch/arm/mach-imx/include/mach/imx27-regs.h
@@ -82,14 +82,6 @@
#include "esdctl.h"
-/* Watchdog Registers*/
-#define WCR __REG16(IMX_WDT_BASE + 0x00) /* Watchdog Control Register */
-#define WSR __REG16(IMX_WDT_BASE + 0x02) /* Watchdog Service Register */
-#define WSTR __REG16(IMX_WDT_BASE + 0x04) /* Watchdog Status Register */
-
-/* important definition of some bits of WCR */
-#define WCR_WDE 0x04
-
/* PLL registers */
#define CSCR __REG(IMX_PLL_BASE + 0x00) /* Clock Source Control Register */
#define MPCTL0 __REG(IMX_PLL_BASE + 0x04) /* MCU PLL Control Register 0 */
diff --git a/arch/arm/mach-imx/include/mach/imx31-regs.h b/arch/arm/mach-imx/include/mach/imx31-regs.h
index d2304ec..536bf0d 100644
--- a/arch/arm/mach-imx/include/mach/imx31-regs.h
+++ b/arch/arm/mach-imx/include/mach/imx31-regs.h
@@ -120,16 +120,6 @@
#endif
/*
- * Watchdog Registers
- */
-#define WCR __REG16(IMX_WDT_BASE + 0x00) /* Watchdog Control Register */
-#define WSR __REG16(IMX_WDT_BASE + 0x02) /* Watchdog Service Register */
-#define WSTR __REG16(IMX_WDT_BASE + 0x04) /* Watchdog Status Register */
-
-/* important definition of some bits of WCR */
-#define WCR_WDE 0x04
-
-/*
* Clock Controller Module (CCM)
*/
#define IMX_CCM_BASE 0x53f80000
diff --git a/arch/arm/mach-imx/include/mach/imx35-regs.h b/arch/arm/mach-imx/include/mach/imx35-regs.h
index b2b360a..b0f6b82 100644
--- a/arch/arm/mach-imx/include/mach/imx35-regs.h
+++ b/arch/arm/mach-imx/include/mach/imx35-regs.h
@@ -135,15 +135,5 @@
#define TSTAT_CAPT (1<<1) /* Capture event */
#define TSTAT_COMP (1) /* Compare event */
-/*
- * Watchdog Registers
- */
-#define WCR __REG16(IMX_WDT_BASE + 0x00) /* Watchdog Control Register */
-#define WSR __REG16(IMX_WDT_BASE + 0x02) /* Watchdog Service Register */
-#define WSTR __REG16(IMX_WDT_BASE + 0x04) /* Watchdog Status Register */
-
-/* important definition of some bits of WCR */
-#define WCR_WDE 0x04
-
#endif /* __ASM_ARCH_MX35_REGS_H */
diff --git a/arch/arm/mach-imx/include/mach/imx51-regs.h b/arch/arm/mach-imx/include/mach/imx51-regs.h
index f99285c..1719a78 100644
--- a/arch/arm/mach-imx/include/mach/imx51-regs.h
+++ b/arch/arm/mach-imx/include/mach/imx51-regs.h
@@ -24,13 +24,6 @@
#define TSTAT_CAPT (1<<1) /* Capture event */
#define TSTAT_COMP (1) /* Compare event */
-#define WCR __REG16(IMX_WDT_BASE + 0x00) /* Watchdog Control Register */
-#define WSR __REG16(IMX_WDT_BASE + 0x02) /* Watchdog Service Register */
-#define WSTR __REG16(IMX_WDT_BASE + 0x04) /* Watchdog Status Register */
-
-/* important definition of some bits of WCR */
-#define WCR_WDE 0x04
-
#define MX51_IROM_BASE_ADDR 0x0
/*
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 22/42] hush: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (20 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 21/42] i.MX remove wdog registers from header files Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 23/42] ramfs: " Sascha Hauer
` (19 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
common/hush.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/common/hush.c b/common/hush.c
index 3359f37..77610bb 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -362,7 +362,7 @@ static int b_addqchr(o_string *o, int ch, int quote)
}
/* belongs in utility.c */
-char *simple_itoa(unsigned int i)
+static char *simple_itoa(unsigned int i)
{
/* 21 digits plus null terminator, good for 64-bit or smaller ints */
static char local[22];
@@ -636,10 +636,10 @@ static int run_pipe_real(struct p_context *ctx, struct pipe *pi)
}
if (child->sp) {
char * str = NULL;
- struct p_context ctx;
+ struct p_context ctx1;
str = make_string((child->argv + i));
- parse_string_outer(&ctx, str, FLAG_EXIT_FROM_LOOP | FLAG_REPARSING);
- release_context(&ctx);
+ parse_string_outer(&ctx1, str, FLAG_EXIT_FROM_LOOP | FLAG_REPARSING);
+ release_context(&ctx1);
free(str);
return last_return_code;
}
@@ -948,7 +948,7 @@ static int set_local_var(const char *s, int flg_export)
* NAME=VALUE format. So the first order of business is to
* split 's' on the '=' into 'name' and 'value' */
value = strchr(name, '=');
- if (value==0 && ++value==0) {
+ if (!value) {
free(name);
return -1;
}
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 23/42] ramfs: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (21 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 22/42] hush: sparse fixes Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 24/42] common/env.c: " Sascha Hauer
` (18 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
fs/ramfs.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/ramfs.c b/fs/ramfs.c
index 9ecb824..6222550 100644
--- a/fs/ramfs.c
+++ b/fs/ramfs.c
@@ -420,7 +420,7 @@ static int ramfs_truncate(struct device_d *dev, FILE *f, ulong size)
if (newchunks < oldchunks) {
if (!newchunks)
- node->data = 0;
+ node->data = NULL;
while (newchunks--)
data = data->next;
while (data) {
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 24/42] common/env.c: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (22 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 23/42] ramfs: " Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 25/42] version_string: " Sascha Hauer
` (17 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
common/env.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/common/env.c b/common/env.c
index edaf388..f81bd46 100644
--- a/common/env.c
+++ b/common/env.c
@@ -137,7 +137,7 @@ const char *getenv (const char *name)
const char *val;
if (strchr(name, '.')) {
- const char *ret = 0;
+ const char *ret = NULL;
char *devstr = strdup(name);
char *par = strchr(devstr, '.');
struct device_d *dev;
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 25/42] version_string: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (23 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 24/42] common/env.c: " Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 26/42] imx-nand: " Sascha Hauer
` (16 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
commands/version.c | 1 -
common/console.c | 2 --
include/common.h | 2 ++
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/commands/version.c b/commands/version.c
index 6c683d9..2b3ac05 100644
--- a/commands/version.c
+++ b/commands/version.c
@@ -26,7 +26,6 @@
static int do_version(struct command *cmdtp, int argc, char *argv[])
{
- extern char version_string[];
printf ("\n%s\n", version_string);
return 0;
}
diff --git a/common/console.c b/common/console.c
index 3a1b451..82786f2 100644
--- a/common/console.c
+++ b/common/console.c
@@ -43,8 +43,6 @@ EXPORT_SYMBOL(console_list);
#define CONSOLE_INIT_EARLY 1
#define CONSOLE_INIT_FULL 2
-extern char version_string[];
-
static void display_banner (void)
{
printf (RELOC("\n\n%s\n\n"), RELOC_VAR(version_string));
diff --git a/include/common.h b/include/common.h
index 0cf51b3..394542f 100644
--- a/include/common.h
+++ b/include/common.h
@@ -218,4 +218,6 @@ int run_shell(void);
int memory_display(char *addr, ulong offs, ulong nbytes, int size);
+extern const char version_string[];
+
#endif /* __COMMON_H_ */
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 26/42] imx-nand: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (24 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 25/42] version_string: " Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 27/42] ping: make locally used functions static Sascha Hauer
` (15 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-imx/include/mach/imx-nand.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-imx/include/mach/imx-nand.h b/arch/arm/mach-imx/include/mach/imx-nand.h
index 06acddb..eb583a2 100644
--- a/arch/arm/mach-imx/include/mach/imx-nand.h
+++ b/arch/arm/mach-imx/include/mach/imx-nand.h
@@ -8,8 +8,8 @@ void imx_nand_set_layout(int writesize, int datawidth);
struct imx_nand_platform_data {
int width;
- int hw_ecc:1;
- int flash_bbt:1;
+ unsigned int hw_ecc:1;
+ unsigned int flash_bbt:1;
};
#endif /* __ASM_ARCH_NAND_H */
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 27/42] ping: make locally used functions static
2010-10-19 12:54 sparse fixes Sascha Hauer
` (25 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 26/42] imx-nand: " Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 28/42] arm div0: sparse fixes Sascha Hauer
` (14 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
net/ping.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ping.c b/net/ping.c
index 440e229..d414784 100644
--- a/net/ping.c
+++ b/net/ping.c
@@ -40,7 +40,7 @@ static int ping_send(void)
return net_icmp_send(ping_con, 9);
}
-void ping_handler(char *pkt, unsigned len)
+static void ping_handler(char *pkt, unsigned len)
{
IPaddr_t tmp;
struct iphdr *ip = net_eth_to_iphdr(pkt);
@@ -52,7 +52,7 @@ void ping_handler(char *pkt, unsigned len)
ping_state = PING_STATE_SUCCESS;
}
-int do_ping(struct command *cmdtp, int argc, char *argv[])
+static int do_ping(struct command *cmdtp, int argc, char *argv[])
{
int ret;
uint64_t ping_start = 0;
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 28/42] arm div0: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (26 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 27/42] ping: make locally used functions static Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 29/42] edit: make locally used variable static Sascha Hauer
` (13 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/lib/div0.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/lib/div0.c b/arch/arm/lib/div0.c
index 6267bf1..99d6b85 100644
--- a/arch/arm/lib/div0.c
+++ b/arch/arm/lib/div0.c
@@ -20,11 +20,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
+#include <common.h>
+
+extern void __div0(void);
/* Replacement (=dummy) for GNU/Linux division-by zero handler */
void __div0 (void)
{
- extern void hang (void);
-
hang();
}
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 29/42] edit: make locally used variable static
2010-10-19 12:54 sparse fixes Sascha Hauer
` (27 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 28/42] arm div0: sparse fixes Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 30/42] common/environment.c: sparse fixes Sascha Hauer
` (12 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
commands/edit.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/commands/edit.c b/commands/edit.c
index 7da6816..c2ab877 100644
--- a/commands/edit.c
+++ b/commands/edit.c
@@ -58,7 +58,7 @@ static int textx = 0; /* position in text */
static struct line *curline; /* line where the cursor is */
static struct line *scrline; /* the first line on screen */
-int scrcol = 0; /* the first column on screen */
+static int scrcol = 0; /* the first column on screen */
static void pos(int x, int y)
{
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 30/42] common/environment.c: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (28 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 29/42] edit: make locally used variable static Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 31/42] commands/mem.c: make locally used function static Sascha Hauer
` (11 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
common/environment.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/common/environment.c b/common/environment.c
index 0eb7e6b..e5f24ec 100644
--- a/common/environment.c
+++ b/common/environment.c
@@ -109,7 +109,7 @@ int envfs_save(char *filename, char *dirname)
struct action_data data;
void *buf = NULL;
- data.writep = 0;
+ data.writep = NULL;
data.base = dirname;
/* first pass: calculate size */
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 31/42] commands/mem.c: make locally used function static
2010-10-19 12:54 sparse fixes Sascha Hauer
` (29 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 30/42] common/environment.c: sparse fixes Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 32/42] bootm: sparse fixes Sascha Hauer
` (10 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
commands/mem.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/commands/mem.c b/commands/mem.c
index bc84f6d..73bf915 100644
--- a/commands/mem.c
+++ b/commands/mem.c
@@ -110,7 +110,7 @@ int memory_display(char *addr, ulong offs, ulong nbytes, int size)
return 0;
}
-int open_and_lseek(const char *filename, int mode, off_t pos)
+static int open_and_lseek(const char *filename, int mode, off_t pos)
{
int fd, ret;
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 32/42] bootm: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (30 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 31/42] commands/mem.c: make locally used function static Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 33/42] net: make locally used functions static Sascha Hauer
` (9 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
commands/bootm.c | 2 +-
include/image.h | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/commands/bootm.c b/commands/bootm.c
index 14475c7..0d3649f 100644
--- a/commands/bootm.c
+++ b/commands/bootm.c
@@ -225,7 +225,7 @@ void unmap_image(struct image_handle *handle)
}
EXPORT_SYMBOL(unmap_image);
-LIST_HEAD(handler_list);
+static LIST_HEAD(handler_list);
int register_image_handler(struct image_handler *handler)
{
diff --git a/include/image.h b/include/image.h
index a42d06b..8932947 100644
--- a/include/image.h
+++ b/include/image.h
@@ -336,6 +336,7 @@ void print_image_hdr (image_header_t *hdr);
* image.
*/
struct image_handle *map_image(const char *filename, int verify);
+void unmap_image(struct image_handle *handle);
/*
* Relocate an image to load_address by uncompressing
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 33/42] net: make locally used functions static
2010-10-19 12:54 sparse fixes Sascha Hauer
` (31 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 32/42] bootm: sparse fixes Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 34/42] lib/driver.c: sparse fixes Sascha Hauer
` (8 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
net/net.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/net.c b/net/net.c
index 8d99595..a613d1d 100644
--- a/net/net.c
+++ b/net/net.c
@@ -209,7 +209,7 @@ static void arp_handler(struct arprequest *arp)
}
}
-int arp_request(IPaddr_t dest, unsigned char *ether)
+static int arp_request(IPaddr_t dest, unsigned char *ether)
{
char *pkt;
struct arprequest *arp;
@@ -437,7 +437,7 @@ void net_unregister(struct net_connection *con)
free(con);
}
-int net_ip_send(struct net_connection *con, int len)
+static int net_ip_send(struct net_connection *con, int len)
{
con->ip->tot_len = htons(sizeof(struct iphdr) + len);
con->ip->id = htons(net_ip_id++);;
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 34/42] lib/driver.c: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (32 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 33/42] net: make locally used functions static Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 35/42] remove dead ldiv code Sascha Hauer
` (7 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
lib/driver.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/driver.c b/lib/driver.c
index 66d8fee..edde1dc 100644
--- a/lib/driver.c
+++ b/lib/driver.c
@@ -54,7 +54,7 @@ struct device_d *get_device_by_name(const char *name)
return NULL;
}
-struct device_d *get_device_by_name_id(const char *name, int id)
+static struct device_d *get_device_by_name_id(const char *name, int id)
{
struct device_d *dev;
@@ -315,7 +315,7 @@ static int do_devinfo(struct command *cmdtp, int argc, char *argv[])
for_each_driver(drv)
printf("%10s\n",drv->name);
} else {
- struct device_d *dev = get_device_by_name(argv[1]);
+ dev = get_device_by_name(argv[1]);
if (!dev) {
printf("no such device: %s\n",argv[1]);
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 35/42] remove dead ldiv code
2010-10-19 12:54 sparse fixes Sascha Hauer
` (33 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 34/42] lib/driver.c: sparse fixes Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 36/42] common/memsize.c: add missing include Sascha Hauer
` (6 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
lib/Makefile | 1 -
lib/ldiv.c | 55 -------------------------------------------------------
2 files changed, 0 insertions(+), 56 deletions(-)
delete mode 100644 lib/ldiv.c
diff --git a/lib/Makefile b/lib/Makefile
index 0c62917..8b986d2 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -1,7 +1,6 @@
obj-y += ctype.o
obj-y += rbtree.o
obj-y += display_options.o
-obj-y += ldiv.o
obj-y += string.o
obj-y += vsprintf.o
obj-y += div64.o
diff --git a/lib/ldiv.c b/lib/ldiv.c
deleted file mode 100644
index 5d231a2..0000000
--- a/lib/ldiv.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Copyright (C) 1992, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-typedef struct {
- long quot;
- long rem;
-} ldiv_t;
-/* Return the `ldiv_t' representation of NUMER over DENOM. */
-ldiv_t
-ldiv (long int numer, long int denom)
-{
- ldiv_t result;
-
- result.quot = numer / denom;
- result.rem = numer % denom;
-
- /* The ANSI standard says that |QUOT| <= |NUMER / DENOM|, where
- NUMER / DENOM is to be computed in infinite precision. In
- other words, we should always truncate the quotient towards
- zero, never -infinity. Machine division and remainer may
- work either way when one or both of NUMER or DENOM is
- negative. If only one is negative and QUOT has been
- truncated towards -infinity, REM will have the same sign as
- DENOM and the opposite sign of NUMER; if both are negative
- and QUOT has been truncated towards -infinity, REM will be
- positive (will have the opposite sign of NUMER). These are
- considered `wrong'. If both are NUM and DENOM are positive,
- RESULT will always be positive. This all boils down to: if
- NUMER >= 0, but REM < 0, we got the wrong answer. In that
- case, to get the right answer, add 1 to QUOT and subtract
- DENOM from REM. */
-
- if (numer >= 0 && result.rem < 0)
- {
- ++result.quot;
- result.rem -= denom;
- }
-
- return result;
-}
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 36/42] common/memsize.c: add missing include
2010-10-19 12:54 sparse fixes Sascha Hauer
` (34 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 35/42] remove dead ldiv code Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 37/42] i.MX speed: " Sascha Hauer
` (5 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
common/memsize.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/common/memsize.c b/common/memsize.c
index 505e43f..e3bc56c 100644
--- a/common/memsize.c
+++ b/common/memsize.c
@@ -21,6 +21,7 @@
* MA 02111-1307 USA
*/
+#include <common.h>
#include <config.h>
#if defined (__PPC__) && !defined (__SANDBOX__)
/*
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 37/42] i.MX speed: add missing include
2010-10-19 12:54 sparse fixes Sascha Hauer
` (35 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 36/42] common/memsize.c: add missing include Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 38/42] libbb: sparse fixes Sascha Hauer
` (4 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-imx/speed.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-imx/speed.c b/arch/arm/mach-imx/speed.c
index e024733..750ace0 100644
--- a/arch/arm/mach-imx/speed.c
+++ b/arch/arm/mach-imx/speed.c
@@ -24,6 +24,7 @@
#include <asm-generic/div64.h>
#include <common.h>
#include <command.h>
+#include <mach/clock.h>
/*
* get the system pll clock in Hz
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 38/42] libbb: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (36 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 37/42] i.MX speed: " Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 39/42] remove strange flush_cache functions Sascha Hauer
` (3 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
lib/libbb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/libbb.c b/lib/libbb.c
index ee91fec..4d532f6 100644
--- a/lib/libbb.c
+++ b/lib/libbb.c
@@ -29,7 +29,7 @@ char *concat_path_file(const char *path, const char *filename)
while (*filename == '/')
filename++;
- str = xmalloc(strlen(path) + (lc==0 ? 1 : 0) + strlen(filename) + 1);
+ str = xmalloc(strlen(path) + (lc==NULL ? 1 : 0) + strlen(filename) + 1);
sprintf(str, "%s%s%s", path, (lc==NULL ? "/" : ""), filename);
return str;
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 39/42] remove strange flush_cache functions
2010-10-19 12:54 sparse fixes Sascha Hauer
` (37 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 38/42] libbb: sparse fixes Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 40/42] pcm043: ifx compiler warning Sascha Hauer
` (2 subsequent siblings)
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/lib/Makefile | 1 -
arch/arm/lib/cache.c | 36 ---------------------------------
arch/ppc/lib/Makefile | 1 -
arch/ppc/lib/cache.c | 50 ----------------------------------------------
arch/sandbox/os/common.c | 5 ----
commands/loadb.c | 1 -
commands/loads.c | 1 -
include/cache.h | 1 -
8 files changed, 0 insertions(+), 96 deletions(-)
delete mode 100644 arch/arm/lib/cache.c
delete mode 100644 arch/ppc/lib/cache.c
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
index c1ac1aa..1d7f15a 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -1,7 +1,6 @@
obj-y += armlinux.o
obj-y += _ashldi3.o
obj-y += _ashrdi3.o
-obj-y += cache.o
obj-y += div0.o
obj-y += _divsi3.o
obj-y += _modsi3.o
diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c
deleted file mode 100644
index 61ee9d3..0000000
--- a/arch/arm/lib/cache.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * (C) Copyright 2002
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-/* for now: just dummy functions to satisfy the linker */
-
-#include <common.h>
-
-void flush_cache (unsigned long dummy1, unsigned long dummy2)
-{
-#ifdef CONFIG_OMAP2420
- void arm1136_cache_flush(void);
-
- arm1136_cache_flush();
-#endif
- return;
-}
diff --git a/arch/ppc/lib/Makefile b/arch/ppc/lib/Makefile
index 400b1e1..0844d56 100644
--- a/arch/ppc/lib/Makefile
+++ b/arch/ppc/lib/Makefile
@@ -1,6 +1,5 @@
obj-y += bat_rw.o
obj-y += board.o
-obj-y += cache.o
obj-y += extable.o
obj-$(CONFIG_USE_IRQ) += interrupts.o
obj-y += kgdb.o
diff --git a/arch/ppc/lib/cache.c b/arch/ppc/lib/cache.c
deleted file mode 100644
index 3d863b3..0000000
--- a/arch/ppc/lib/cache.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * (C) Copyright 2002
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <common.h>
-
-
-void flush_cache (ulong start_addr, ulong size)
-{
-#ifndef CONFIG_5xx
- ulong addr, end_addr = start_addr + size;
-
- if (CONFIG_CACHELINE_SIZE) {
- addr = start_addr & (CONFIG_CACHELINE_SIZE - 1);
- for (addr = start_addr;
- addr < end_addr;
- addr += CONFIG_CACHELINE_SIZE) {
- asm ("dcbst 0,%0": :"r" (addr));
- }
- asm ("sync"); /* Wait for all dcbst to complete on bus */
-
- for (addr = start_addr;
- addr < end_addr;
- addr += CONFIG_CACHELINE_SIZE) {
- asm ("icbi 0,%0": :"r" (addr));
- }
- }
- asm ("sync"); /* Always flush prefetch queue in any case */
- asm ("isync");
-#endif
-}
diff --git a/arch/sandbox/os/common.c b/arch/sandbox/os/common.c
index c73aa79..89b2e5c 100644
--- a/arch/sandbox/os/common.c
+++ b/arch/sandbox/os/common.c
@@ -213,11 +213,6 @@ off_t linux_lseek(int fd, off_t offset)
return lseek(fd, offset, SEEK_SET);
}
-void flush_cache(unsigned long dummy1, unsigned long dummy2)
-{
- /* why should we? */
-}
-
extern void start_barebox(void);
extern void mem_malloc_init(void *start, void *end);
diff --git a/commands/loadb.c b/commands/loadb.c
index acfb94f..faf4a97 100644
--- a/commands/loadb.c
+++ b/commands/loadb.c
@@ -636,7 +636,6 @@ static ulong load_serial_ymodem(void)
0) {
size += res;
addr += res;
- flush_cache((ulong) yModemBuf, res);
wr = write(ofd, ymodemBuf, res);
if (res != wr) {
perror("ymodem");
diff --git a/commands/loads.c b/commands/loads.c
index 8269af1..6e0dc7f 100644
--- a/commands/loads.c
+++ b/commands/loads.c
@@ -175,7 +175,6 @@ load_serial (ulong offset)
"## Total Size = 0x%08lX = %ld Bytes\n",
start_addr, end_addr, size, size
);
- flush_cache (start_addr, size);
sprintf(buf, "%lX", size);
setenv("filesize", buf);
return (addr);
diff --git a/include/cache.h b/include/cache.h
index 5968da9..23841dc 100644
--- a/include/cache.h
+++ b/include/cache.h
@@ -1,7 +1,6 @@
#ifndef __CACHE_H
#define __CACHE_H
-void flush_cache (unsigned long, unsigned long);
int icache_status (void);
void icache_enable (void);
void icache_disable(void);
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 40/42] pcm043: ifx compiler warning
2010-10-19 12:54 sparse fixes Sascha Hauer
` (38 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 39/42] remove strange flush_cache functions Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 41/42] arm interrupts.c: sparse fixes Sascha Hauer
2010-10-19 12:55 ` [PATCH 42/42] process_escape_sequence: Add missing include Sascha Hauer
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/pcm043/pcm043.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boards/pcm043/pcm043.c b/arch/arm/boards/pcm043/pcm043.c
index 9f98795..5932f95 100644
--- a/arch/arm/boards/pcm043/pcm043.c
+++ b/arch/arm/boards/pcm043/pcm043.c
@@ -93,7 +93,7 @@ static struct device_d nand_dev = {
};
#ifdef CONFIG_PCM043_DISPLAY_SHARP
-static const struct fb_videomode pcm043_fb_mode = {
+static struct fb_videomode pcm043_fb_mode = {
/* 240x320 @ 60 Hz */
.name = "Sharp-LQ035Q7",
.refresh = 60,
@@ -111,7 +111,7 @@ static const struct fb_videomode pcm043_fb_mode = {
.flag = 0,
};
#else
-static const struct fb_videomode pcm043_fb_mode = {
+static struct fb_videomode pcm043_fb_mode = {
/* 240x320 @ 60 Hz */
.name = "TX090",
.refresh = 60,
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 41/42] arm interrupts.c: sparse fixes
2010-10-19 12:54 sparse fixes Sascha Hauer
` (39 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 40/42] pcm043: ifx compiler warning Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 42/42] process_escape_sequence: Add missing include Sascha Hauer
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/cpu/interrupts.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/arch/arm/cpu/interrupts.c b/arch/arm/cpu/interrupts.c
index 0557172..4a0b3f8 100644
--- a/arch/arm/cpu/interrupts.c
+++ b/arch/arm/cpu/interrupts.c
@@ -28,6 +28,14 @@
#include <common.h>
#include <asm/ptrace.h>
+void do_undefined_instruction (struct pt_regs *pt_regs);
+void do_software_interrupt (struct pt_regs *pt_regs);
+void do_prefetch_abort (struct pt_regs *pt_regs);
+void do_data_abort (struct pt_regs *pt_regs);
+void do_not_used (struct pt_regs *pt_regs);
+void do_fiq (struct pt_regs *pt_regs);
+void do_irq (struct pt_regs *pt_regs);
+
#ifdef CONFIG_USE_IRQ
/* enable IRQ interrupts */
void enable_interrupts (void)
@@ -62,7 +70,7 @@ int disable_interrupts (void)
/**
* FIXME
*/
-void bad_mode (void)
+static void bad_mode (void)
{
panic ("Resetting CPU ...\n");
reset_cpu (0);
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* [PATCH 42/42] process_escape_sequence: Add missing include
2010-10-19 12:54 sparse fixes Sascha Hauer
` (40 preceding siblings ...)
2010-10-19 12:55 ` [PATCH 41/42] arm interrupts.c: sparse fixes Sascha Hauer
@ 2010-10-19 12:55 ` Sascha Hauer
41 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-19 12:55 UTC (permalink / raw)
To: barebox
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
lib/process_escape_sequence.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/process_escape_sequence.c b/lib/process_escape_sequence.c
index 546edaa..e3431d4 100644
--- a/lib/process_escape_sequence.c
+++ b/lib/process_escape_sequence.c
@@ -21,6 +21,7 @@
*/
#include <common.h>
#include <fs.h>
+#include <libbb.h>
int process_escape_sequence(const char *source, char *dest, int destlen)
{
--
1.7.2.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 21/42] i.MX remove wdog registers from header files
2010-10-19 12:55 ` [PATCH 21/42] i.MX remove wdog registers from header files Sascha Hauer
@ 2010-10-20 1:48 ` Jean-Christophe PLAGNIOL-VILLARD
2010-10-20 6:27 ` Sascha Hauer
0 siblings, 1 reply; 45+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-10-20 1:48 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
On 14:55 Tue 19 Oct , Sascha Hauer wrote:
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> arch/arm/mach-imx/clocksource.c | 23 +++++++++++++++++++----
> arch/arm/mach-imx/include/mach/imx1-regs.h | 8 --------
> arch/arm/mach-imx/include/mach/imx21-regs.h | 8 --------
> arch/arm/mach-imx/include/mach/imx27-regs.h | 8 --------
> arch/arm/mach-imx/include/mach/imx31-regs.h | 10 ----------
> arch/arm/mach-imx/include/mach/imx35-regs.h | 10 ----------
> arch/arm/mach-imx/include/mach/imx51-regs.h | 7 -------
> 7 files changed, 19 insertions(+), 55 deletions(-)
>
> diff --git a/arch/arm/mach-imx/clocksource.c b/arch/arm/mach-imx/clocksource.c
> index e492890..4cb923f 100644
> --- a/arch/arm/mach-imx/clocksource.c
> +++ b/arch/arm/mach-imx/clocksource.c
> @@ -101,19 +101,34 @@ static int clocksource_init (void)
> core_initcall(clocksource_init);
>
> /*
> + * Watchdog Registers
> + */
> +#ifdef CONFIG_ARCH_IMX1
> +#define WDOG_WCR 0x00 /* Watchdog Control Register */
> +#define WDOG_WSR 0x02 /* Watchdog Service Register */
> +#define WDOG_WSTR 0x04 /* Watchdog Status Register */
> +#define WDOG_WCR_WDE (1 << 0)
> +#else
> +#define WDOG_WCR 0x00 /* Watchdog Control Register */
> +#define WDOG_WSR 0x02 /* Watchdog Service Register */
> +#define WDOG_WSTR 0x04 /* Watchdog Status Register */
> +#define WDOG_WCR_WDE (1 << 2)
only the WDE seems different
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
* Re: [PATCH 21/42] i.MX remove wdog registers from header files
2010-10-20 1:48 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2010-10-20 6:27 ` Sascha Hauer
0 siblings, 0 replies; 45+ messages in thread
From: Sascha Hauer @ 2010-10-20 6:27 UTC (permalink / raw)
To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox
On Wed, Oct 20, 2010 at 03:48:20AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 14:55 Tue 19 Oct , Sascha Hauer wrote:
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> > arch/arm/mach-imx/clocksource.c | 23 +++++++++++++++++++----
> > arch/arm/mach-imx/include/mach/imx1-regs.h | 8 --------
> > arch/arm/mach-imx/include/mach/imx21-regs.h | 8 --------
> > arch/arm/mach-imx/include/mach/imx27-regs.h | 8 --------
> > arch/arm/mach-imx/include/mach/imx31-regs.h | 10 ----------
> > arch/arm/mach-imx/include/mach/imx35-regs.h | 10 ----------
> > arch/arm/mach-imx/include/mach/imx51-regs.h | 7 -------
> > 7 files changed, 19 insertions(+), 55 deletions(-)
> >
> > diff --git a/arch/arm/mach-imx/clocksource.c b/arch/arm/mach-imx/clocksource.c
> > index e492890..4cb923f 100644
> > --- a/arch/arm/mach-imx/clocksource.c
> > +++ b/arch/arm/mach-imx/clocksource.c
> > @@ -101,19 +101,34 @@ static int clocksource_init (void)
> > core_initcall(clocksource_init);
> >
> > /*
> > + * Watchdog Registers
> > + */
> > +#ifdef CONFIG_ARCH_IMX1
> > +#define WDOG_WCR 0x00 /* Watchdog Control Register */
> > +#define WDOG_WSR 0x02 /* Watchdog Service Register */
> > +#define WDOG_WSTR 0x04 /* Watchdog Status Register */
> > +#define WDOG_WCR_WDE (1 << 0)
> > +#else
> > +#define WDOG_WCR 0x00 /* Watchdog Control Register */
> > +#define WDOG_WSR 0x02 /* Watchdog Service Register */
> > +#define WDOG_WSTR 0x04 /* Watchdog Status Register */
> > +#define WDOG_WCR_WDE (1 << 2)
> only the WDE seems different
oops, bug. on i.MX1 WSR should be 0x4 and SWTR should be 0x8. Will fix
this.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 45+ messages in thread
end of thread, other threads:[~2010-10-20 6:27 UTC | newest]
Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-19 12:54 sparse fixes Sascha Hauer
2010-10-19 12:54 ` [PATCH 01/42] glob: " Sascha Hauer
2010-10-19 12:54 ` [PATCH 02/42] fnmatch:sparse fixes Sascha Hauer
2010-10-19 12:54 ` [PATCH 03/42] readline: sparse fixes Sascha Hauer
2010-10-19 12:54 ` [PATCH 04/42] edit: " Sascha Hauer
2010-10-19 12:54 ` [PATCH 05/42] command.h: " Sascha Hauer
2010-10-19 12:54 ` [PATCH 06/42] crc32: " Sascha Hauer
2010-10-19 12:54 ` [PATCH 07/42] copy_file: " Sascha Hauer
2010-10-19 12:54 ` [PATCH 08/42] commands/mem.c: " Sascha Hauer
2010-10-19 12:54 ` [PATCH 09/42] dlmalloc: " Sascha Hauer
2010-10-19 12:54 ` [PATCH 10/42] console: " Sascha Hauer
2010-10-19 12:54 ` [PATCH 11/42] notifier: " Sascha Hauer
2010-10-19 12:55 ` [PATCH 12/42] fec_imx: " Sascha Hauer
2010-10-19 12:55 ` [PATCH 13/42] imx gpio: " Sascha Hauer
2010-10-19 12:55 ` [PATCH 14/42] imx clocksource: " Sascha Hauer
2010-10-19 12:55 ` [PATCH 15/42] armlinux: " Sascha Hauer
2010-10-19 12:55 ` [PATCH 16/42] arch/arm/cpu/cpu.c: " Sascha Hauer
2010-10-19 12:55 ` [PATCH 17/42] cache-l2x0: " Sascha Hauer
2010-10-19 12:55 ` [PATCH 18/42] speed-imx35: " Sascha Hauer
2010-10-19 12:55 ` [PATCH 19/42] imx_dump_clocks: " Sascha Hauer
2010-10-19 12:55 ` [PATCH 20/42] i.MX serial: " Sascha Hauer
2010-10-19 12:55 ` [PATCH 21/42] i.MX remove wdog registers from header files Sascha Hauer
2010-10-20 1:48 ` Jean-Christophe PLAGNIOL-VILLARD
2010-10-20 6:27 ` Sascha Hauer
2010-10-19 12:55 ` [PATCH 22/42] hush: sparse fixes Sascha Hauer
2010-10-19 12:55 ` [PATCH 23/42] ramfs: " Sascha Hauer
2010-10-19 12:55 ` [PATCH 24/42] common/env.c: " Sascha Hauer
2010-10-19 12:55 ` [PATCH 25/42] version_string: " Sascha Hauer
2010-10-19 12:55 ` [PATCH 26/42] imx-nand: " Sascha Hauer
2010-10-19 12:55 ` [PATCH 27/42] ping: make locally used functions static Sascha Hauer
2010-10-19 12:55 ` [PATCH 28/42] arm div0: sparse fixes Sascha Hauer
2010-10-19 12:55 ` [PATCH 29/42] edit: make locally used variable static Sascha Hauer
2010-10-19 12:55 ` [PATCH 30/42] common/environment.c: sparse fixes Sascha Hauer
2010-10-19 12:55 ` [PATCH 31/42] commands/mem.c: make locally used function static Sascha Hauer
2010-10-19 12:55 ` [PATCH 32/42] bootm: sparse fixes Sascha Hauer
2010-10-19 12:55 ` [PATCH 33/42] net: make locally used functions static Sascha Hauer
2010-10-19 12:55 ` [PATCH 34/42] lib/driver.c: sparse fixes Sascha Hauer
2010-10-19 12:55 ` [PATCH 35/42] remove dead ldiv code Sascha Hauer
2010-10-19 12:55 ` [PATCH 36/42] common/memsize.c: add missing include Sascha Hauer
2010-10-19 12:55 ` [PATCH 37/42] i.MX speed: " Sascha Hauer
2010-10-19 12:55 ` [PATCH 38/42] libbb: sparse fixes Sascha Hauer
2010-10-19 12:55 ` [PATCH 39/42] remove strange flush_cache functions Sascha Hauer
2010-10-19 12:55 ` [PATCH 40/42] pcm043: ifx compiler warning Sascha Hauer
2010-10-19 12:55 ` [PATCH 41/42] arm interrupts.c: sparse fixes Sascha Hauer
2010-10-19 12:55 ` [PATCH 42/42] process_escape_sequence: Add missing include Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox