mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 22:51:37 +00:00
m68k: Fix warnings with gcc 4.6
Most of the warnings seem to be related to using 'int' for size_t. Change this and fix up the remaining warnings and problems. For bootm, the warning was masked by others, and there is an actual bug in the code. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
34e4a2ec0a
commit
ddc94378db
7 changed files with 12 additions and 15 deletions
|
@ -208,10 +208,10 @@ void cpu_init_f(void)
|
||||||
scm2_t *scm2 = (scm2_t *) MMAP_SCM2;
|
scm2_t *scm2 = (scm2_t *) MMAP_SCM2;
|
||||||
gpio_t *gpio = (gpio_t *) MMAP_GPIO;
|
gpio_t *gpio = (gpio_t *) MMAP_GPIO;
|
||||||
fbcs_t *fbcs = (fbcs_t *) MMAP_FBCS;
|
fbcs_t *fbcs = (fbcs_t *) MMAP_FBCS;
|
||||||
|
#ifndef CONFIG_WATCHDOG
|
||||||
wdog_t *wdog = (wdog_t *) MMAP_WDOG;
|
wdog_t *wdog = (wdog_t *) MMAP_WDOG;
|
||||||
|
|
||||||
/* watchdog is enabled by default - disable the watchdog */
|
/* watchdog is enabled by default - disable the watchdog */
|
||||||
#ifndef CONFIG_WATCHDOG
|
|
||||||
out_be16(&wdog->cr, 0);
|
out_be16(&wdog->cr, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ typedef long __kernel_off_t;
|
||||||
typedef int __kernel_pid_t;
|
typedef int __kernel_pid_t;
|
||||||
typedef unsigned int __kernel_uid_t;
|
typedef unsigned int __kernel_uid_t;
|
||||||
typedef unsigned int __kernel_gid_t;
|
typedef unsigned int __kernel_gid_t;
|
||||||
typedef unsigned int __kernel_size_t;
|
typedef unsigned long __kernel_size_t;
|
||||||
typedef int __kernel_ssize_t;
|
typedef int __kernel_ssize_t;
|
||||||
typedef long __kernel_ptrdiff_t;
|
typedef long __kernel_ptrdiff_t;
|
||||||
typedef long __kernel_time_t;
|
typedef long __kernel_time_t;
|
||||||
|
|
|
@ -50,11 +50,7 @@ void arch_lmb_reserve(struct lmb *lmb)
|
||||||
|
|
||||||
int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images)
|
int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images)
|
||||||
{
|
{
|
||||||
ulong rd_len;
|
|
||||||
ulong initrd_start, initrd_end;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ulong cmd_start, cmd_end;
|
|
||||||
bd_t *kbd;
|
bd_t *kbd;
|
||||||
void (*kernel) (bd_t *, ulong, ulong, ulong, ulong);
|
void (*kernel) (bd_t *, ulong, ulong, ulong, ulong);
|
||||||
struct lmb *lmb = &images->lmb;
|
struct lmb *lmb = &images->lmb;
|
||||||
|
@ -96,7 +92,8 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima
|
||||||
* sp+16: Start of command line string
|
* sp+16: Start of command line string
|
||||||
* sp+20: End of command line string
|
* sp+20: End of command line string
|
||||||
*/
|
*/
|
||||||
(*kernel) (kbd, initrd_start, initrd_end, cmd_start, cmd_end);
|
(*kernel)(kbd, images->initrd_start, images->initrd_end,
|
||||||
|
images->cmdline_start, images->cmdline_end);
|
||||||
/* does not return */
|
/* does not return */
|
||||||
error:
|
error:
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -100,7 +100,7 @@ int altera_done_fn(int cookie)
|
||||||
* writing the complete buffer in one function is much faster,
|
* writing the complete buffer in one function is much faster,
|
||||||
* then calling it for every bit
|
* then calling it for every bit
|
||||||
*/
|
*/
|
||||||
int altera_write_fn(void *buf, size_t len, int flush, int cookie)
|
int altera_write_fn(const void *buf, size_t len, int flush, int cookie)
|
||||||
{
|
{
|
||||||
size_t bytecount = 0;
|
size_t bytecount = 0;
|
||||||
gpio_t *gpiop = (gpio_t *)MMAP_GPIO;
|
gpio_t *gpiop = (gpio_t *)MMAP_GPIO;
|
||||||
|
|
|
@ -79,7 +79,7 @@ phys_size_t initdram(int board_type)
|
||||||
* (Do not rely on the SDCS register(s) being set to 0x00000000
|
* (Do not rely on the SDCS register(s) being set to 0x00000000
|
||||||
* during reset as stated in the data sheet.)
|
* during reset as stated in the data sheet.)
|
||||||
*/
|
*/
|
||||||
return get_ram_size((unsigned long *)CONFIG_SYS_SDRAM_BASE,
|
return get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
|
||||||
0x80000000 - CONFIG_SYS_SDRAM_BASE);
|
0x80000000 - CONFIG_SYS_SDRAM_BASE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -153,9 +153,9 @@ int altera_info( Altera_desc *desc )
|
||||||
printf ("Unsupported interface type, %d\n", desc->iface);
|
printf ("Unsupported interface type, %d\n", desc->iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf ("Device Size: \t%d bytes\n"
|
printf("Device Size: \t%zd bytes\n"
|
||||||
"Cookie: \t0x%x (%d)\n",
|
"Cookie: \t0x%x (%d)\n",
|
||||||
desc->size, desc->cookie, desc->cookie);
|
desc->size, desc->cookie, desc->cookie);
|
||||||
|
|
||||||
if (desc->iface_fns) {
|
if (desc->iface_fns) {
|
||||||
printf ("Device Function Table @ 0x%p\n", desc->iface_fns);
|
printf ("Device Function Table @ 0x%p\n", desc->iface_fns);
|
||||||
|
|
|
@ -220,9 +220,9 @@ int xilinx_info(xilinx_desc *desc)
|
||||||
printf ("Unsupported interface type, %d\n", desc->iface);
|
printf ("Unsupported interface type, %d\n", desc->iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf ("Device Size: \t%d bytes\n"
|
printf("Device Size: \t%zd bytes\n"
|
||||||
"Cookie: \t0x%x (%d)\n",
|
"Cookie: \t0x%x (%d)\n",
|
||||||
desc->size, desc->cookie, desc->cookie);
|
desc->size, desc->cookie, desc->cookie);
|
||||||
if (desc->name)
|
if (desc->name)
|
||||||
printf("Device name: \t%s\n", desc->name);
|
printf("Device name: \t%s\n", desc->name);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue