diff options
author | Bartlomiej Sieka <tur@semihalf.com> | 2008-03-26 09:38:06 +0100 |
---|---|---|
committer | Bartlomiej Sieka <tur@semihalf.com> | 2008-03-26 09:38:06 +0100 |
commit | 27f33e9f45ef7f9685cbdc65066a1828e85dde4f (patch) | |
tree | 5828044d71e5caa3bec4d05c6c48793df0cd17a3 /common/lynxkdi.c | |
parent | 18e69a35efbb078403db0c0063986470dad7d082 (diff) | |
parent | 388b82fddc7c05596f3f615f190da0448227dc82 (diff) | |
download | u-boot-imx-27f33e9f45ef7f9685cbdc65066a1828e85dde4f.zip u-boot-imx-27f33e9f45ef7f9685cbdc65066a1828e85dde4f.tar.gz u-boot-imx-27f33e9f45ef7f9685cbdc65066a1828e85dde4f.tar.bz2 |
Merge branch 'new-image' of git://www.denx.de/git/u-boot-testing
Conflicts:
common/cmd_bootm.c
cpu/mpc8xx/cpu.c
Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
Diffstat (limited to 'common/lynxkdi.c')
-rw-r--r-- | common/lynxkdi.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/common/lynxkdi.c b/common/lynxkdi.c index 76a271b..a5dc887 100644 --- a/common/lynxkdi.c +++ b/common/lynxkdi.c @@ -23,45 +23,45 @@ DECLARE_GLOBAL_DATA_PTR; #if defined(CONFIG_MPC8260) || defined(CONFIG_440EP) || defined(CONFIG_440GR) -void lynxkdi_boot ( image_header_t *hdr ) +void lynxkdi_boot (image_header_t *hdr) { - void (*lynxkdi)(void) = (void(*)(void)) ntohl(hdr->ih_ep); + void (*lynxkdi)(void) = (void(*)(void))image_get_ep (hdr); lynxos_bootparms_t *parms = (lynxos_bootparms_t *)0x0020; bd_t *kbd; - u32 *psz = (u32 *)(ntohl(hdr->ih_load) + 0x0204); + u32 *psz = (u32 *)(image_get_load (hdr) + 0x0204); - memset( parms, 0, sizeof(*parms)); + memset (parms, 0, sizeof(*parms)); kbd = gd->bd; parms->clock_ref = kbd->bi_busfreq; parms->dramsz = kbd->bi_memsize; - memcpy(parms->ethaddr, kbd->bi_enetaddr, 6); - mtspr(SPRN_SPRG2, 0x0020); + memcpy (parms->ethaddr, kbd->bi_enetaddr, 6); + mtspr (SPRN_SPRG2, 0x0020); /* Do a simple check for Bluecat so we can pass the * kernel command line parameters. */ - if( le32_to_cpu(*psz) == ntohl(hdr->ih_size) ){ /* FIXME: NOT SURE HERE ! */ - char *args; - char *cmdline = (char *)(ntohl(hdr->ih_load) + 0x020c); - int len; + if (le32_to_cpu (*psz) == image_get_data_size (hdr)) { /* FIXME: NOT SURE HERE ! */ + char *args; + char *cmdline = (char *)(image_get_load (hdr) + 0x020c); + int len; - printf("Booting Bluecat KDI ...\n"); - udelay(200*1000); /* Allow serial port to flush */ - if ((args = getenv("bootargs")) == NULL) - args = ""; - /* Prepend the cmdline */ - len = strlen(args); - if( len && (len + strlen(cmdline) + 2 < (0x0400 - 0x020c))) { - memmove( cmdline + strlen(args) + 1, cmdline, strlen(cmdline) ); - strcpy( cmdline, args ); - cmdline[len] = ' '; - } + printf ("Booting Bluecat KDI ...\n"); + udelay (200*1000); /* Allow serial port to flush */ + if ((args = getenv ("bootargs")) == NULL) + args = ""; + /* Prepend the cmdline */ + len = strlen (args); + if (len && (len + strlen (cmdline) + 2 < (0x0400 - 0x020c))) { + memmove (cmdline + strlen (args) + 1, cmdline, strlen (cmdline)); + strcpy (cmdline, args); + cmdline[len] = ' '; + } } else { - printf("Booting LynxOS KDI ...\n"); + printf ("Booting LynxOS KDI ...\n"); } - lynxkdi(); + lynxkdi (); } #else #error "Lynx KDI support not implemented for configured CPU" |