X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Flynxkdi.c;h=f2b95ac8d37d869f024460659ee390b72bec61de;hb=e9a98ba312a325b6af1a9b75b3ce0ab0232dc614;hp=5f12b0dc176854ba54f144dcd92b2cc14c62d8a7;hpb=d6e9ee92e890f67594ab150689510df361133ead;p=u-boot diff --git a/common/lynxkdi.c b/common/lynxkdi.c index 5f12b0dc17..f2b95ac8d3 100644 --- a/common/lynxkdi.c +++ b/common/lynxkdi.c @@ -16,52 +16,10 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; -#if defined(CONFIG_MPC8260) || defined(CONFIG_440EP) || defined(CONFIG_440GR) -void lynxkdi_boot (image_header_t *hdr) -{ - void (*lynxkdi)(void) = (void(*)(void))image_get_ep (hdr); - lynxos_bootparms_t *parms = (lynxos_bootparms_t *)0x0020; - bd_t *kbd; - u32 *psz = (u32 *)(image_get_load (hdr) + 0x0204); - - 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); - - /* Do a simple check for Bluecat so we can pass the - * kernel command line parameters. - */ - 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] = ' '; - } - } - else { - printf ("Booting LynxOS KDI ...\n"); - } - - lynxkdi (); -} -#else #error "Lynx KDI support not implemented for configured CPU" -#endif