X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=common%2Flynxkdi.c;h=1c8e122c3290b095bf06a8a32edb315804e77131;hb=3988be5fd4369402c410336553bc0ca1920dbe6f;hp=797d8cc880d35594213ed55a8147eaee410e0c4d;hpb=05b47540aae996908e48e10a5ff8b69862aadef3;p=oweals%2Fu-boot.git diff --git a/common/lynxkdi.c b/common/lynxkdi.c index 797d8cc880..1c8e122c32 100644 --- a/common/lynxkdi.c +++ b/common/lynxkdi.c @@ -16,54 +16,8 @@ #include #include #include +#include -#if defined(CONFIG_LYNXKDI) #include -#if defined(CONFIG_MPC8260) || defined(CONFIG_440EP) || defined(CONFIG_440GR) -void lynxkdi_boot ( image_header_t *hdr ) -{ - void (*lynxkdi)(void) = (void(*)(void))hdr->ih_ep; - lynxos_bootparms_t *parms = (lynxos_bootparms_t *)0x0020; - bd_t *kbd; - DECLARE_GLOBAL_DATA_PTR; - u32 *psz = (u32 *)(hdr->ih_load + 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) == hdr->ih_size ){ - char *args; - char *cmdline = (char *)(hdr->ih_load + 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 - -#endif /* CONFIG_LYNXKDI */