From c157d8e219694f5c3dea1ed3826668bdc67ca093 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Mon, 1 Aug 2005 16:41:48 +0200 Subject: Add support for AMCC PPC440EP/GR eval boards Yosemite and Yellowstone. Patch by Steven Blakeslee, 27 Jul 2005 --- common/cmd_bdinfo.c | 10 ++++++---- common/cmd_elf.c | 4 ++-- common/lynxkdi.c | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) (limited to 'common') diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index ca834732b82..6f29e2f58ed 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -61,13 +61,15 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #endif print_num ("bootflags", bd->bi_bootflags ); #if defined(CONFIG_405GP) || defined(CONFIG_405CR) || \ - defined(CONFIG_405EP) || defined(CONFIG_XILINX_ML300) + defined(CONFIG_405EP) || defined(CONFIG_XILINX_ML300) || \ + defined(CONFIG_440_EP) || defined(CONFIG_440_GR) print_str ("procfreq", strmhz(buf, bd->bi_procfreq)); print_str ("plb_busfreq", strmhz(buf, bd->bi_plb_busfreq)); -#if defined(CONFIG_405GP) || defined(CONFIG_405EP) || defined(CONFIG_XILINX_ML300) +#if defined(CONFIG_405GP) || defined(CONFIG_405EP) || defined(CONFIG_XILINX_ML300) || \ + defined(CONFIG_440_EP) || defined(CONFIG_440_GR) print_str ("pci_busfreq", strmhz(buf, bd->bi_pci_busfreq)); #endif -#else /* ! CONFIG_405GP, CONFIG_405CR, CONFIG_405EP, CONFIG_XILINX_ML300 */ +#else /* ! CONFIG_405GP, CONFIG_405CR, CONFIG_405EP, CONFIG_XILINX_ML300, CONFIG_440_EP CONFIG_440_GR */ #if defined(CONFIG_8260) || defined(CONFIG_MPC8560) print_str ("vco", strmhz(buf, bd->bi_vco)); print_str ("sccfreq", strmhz(buf, bd->bi_sccfreq)); @@ -78,7 +80,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) print_str ("cpmfreq", strmhz(buf, bd->bi_cpmfreq)); #endif print_str ("busfreq", strmhz(buf, bd->bi_busfreq)); -#endif /* CONFIG_405GP, CONFIG_405CR, CONFIG_405EP, CONFIG_XILINX_ML300 */ +#endif /* CONFIG_405GP, CONFIG_405CR, CONFIG_405EP, CONFIG_XILINX_ML300, CONFIG_440_EP CONFIG_440_GR */ #if defined(CONFIG_MPC8220) print_str ("inpfreq", strmhz(buf, bd->bi_inpfreq)); print_str ("flbfreq", strmhz(buf, bd->bi_flbfreq)); diff --git a/common/cmd_elf.c b/common/cmd_elf.c index 37286e86a8a..eccf2e9e7b1 100644 --- a/common/cmd_elf.c +++ b/common/cmd_elf.c @@ -78,7 +78,7 @@ int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) * ====================================================================== */ int do_bootvx ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { -#if defined(CONFIG_WALNUT405) || \ +#if defined(CONFIG_WALNUT) || \ defined(CFG_VXWORKS_MAC_PTR) DECLARE_GLOBAL_DATA_PTR; #endif @@ -121,7 +121,7 @@ int do_bootvx ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) * This will vary from board to board */ -#if defined(CONFIG_WALNUT405) +#if defined(CONFIG_WALNUT) tmp = (char *) CFG_NVRAM_BASE_ADDR + 0x500; memcpy ((char *) tmp, (char *) &gd->bd->bi_enetaddr[3], 3); #elif defined(CFG_VXWORKS_MAC_PTR) diff --git a/common/lynxkdi.c b/common/lynxkdi.c index 14aa175b189..19f0620c938 100644 --- a/common/lynxkdi.c +++ b/common/lynxkdi.c @@ -20,7 +20,7 @@ #if defined(CONFIG_LYNXKDI) #include -#if defined(CONFIG_MPC8260) +#if defined(CONFIG_MPC8260) || defined(CONFIG_440_EP) || defined(CONFIG_440_GR) void lynxkdi_boot ( image_header_t *hdr ) { void (*lynxkdi)(void) = (void(*)(void))hdr->ih_ep; -- cgit v1.2.3 From 095b8a3798f1c6cd618092899e783dc2ee0d23f5 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Tue, 2 Aug 2005 17:06:17 +0200 Subject: Coding style cleanup --- common/cmd_flash.c | 2 +- common/cmd_usb.c | 3 +-- common/usb.c | 19 +++++++++---------- common/usb_storage.c | 10 +++++----- 4 files changed, 16 insertions(+), 18 deletions(-) (limited to 'common') diff --git a/common/cmd_flash.c b/common/cmd_flash.c index a0ccdb6328f..162d1ff6570 100644 --- a/common/cmd_flash.c +++ b/common/cmd_flash.c @@ -101,7 +101,7 @@ abbrev_spec (char *str, flash_info_t ** pinfo, int *psf, int *psl) * erase and protect commands. The range of the addresses on which * either of the commands is to operate can be given in two forms: * 1. start end - operate on <'start', 'end') - * 2. start +length - operate on <'start', start + length) + * 2. start +length - operate on <'start', start + length) * If the second form is used and the end address doesn't fall on the * sector boundary, than it will be adjusted to the next sector boundary. * If it isn't in the flash, the function will fail (return -1). diff --git a/common/cmd_usb.c b/common/cmd_usb.c index 3af86194286..0738f553033 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -455,9 +455,8 @@ int do_usb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) i = usb_init(); #ifdef CONFIG_USB_STORAGE /* try to recognize storage devices immediately */ - if (i >= 0) + if (i >= 0) usb_stor_curr_dev = usb_stor_scan(1); - #endif return 0; } diff --git a/common/usb.c b/common/usb.c index 1738d950614..03eccf8b3dd 100644 --- a/common/usb.c +++ b/common/usb.c @@ -46,8 +46,7 @@ #include <405gp_pci.h> #endif - -#undef USB_DEBUG +#undef USB_DEBUG #ifdef USB_DEBUG #define USB_PRINTF(fmt,args...) printf (fmt ,##args) @@ -342,7 +341,7 @@ int usb_clear_halt(struct usb_device *dev, int pipe) if (result < 0) return result; - /* + /* * NOTE: we do not get status and verify reset was successful * as some devices are reported to lock up upon this check.. */ @@ -517,13 +516,13 @@ int usb_get_string(struct usb_device *dev, unsigned short langid, unsigned char /* some devices are flaky */ result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), USB_REQ_GET_DESCRIPTOR, USB_DIR_IN, - (USB_DT_STRING << 8) + index, langid, buf, size, + (USB_DT_STRING << 8) + index, langid, buf, size, USB_CNTL_TIMEOUT); if (result > 0) break; - } - + } + return result; } @@ -572,7 +571,7 @@ static int usb_string_sub(struct usb_device *dev, unsigned int langid, } if (rc < 2) - rc = -1; + rc = -1; return rc; } @@ -721,10 +720,10 @@ int usb_new_device(struct usb_device *dev) } } dev->descriptor.bMaxPacketSize0 = desc->bMaxPacketSize0; - + /* find the port number we're at */ if (parent) { - + for (j = 0; j < parent->maxchild; j++) { if (parent->children[j] == dev) { port = j; @@ -958,7 +957,7 @@ static int hub_port_reset(struct usb_device *dev, int port, return -1; if (portstatus & USB_PORT_STAT_ENABLE) { - + break; } diff --git a/common/usb_storage.c b/common/usb_storage.c index 5397bb2bb49..6cf62e40dd6 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -229,7 +229,7 @@ int usb_stor_scan(int mode) } if(usb_storage_probe(dev,0,&usb_stor[usb_max_devs])) { /* ok, it is a storage devices */ /* get info and fill it in */ - if(usb_stor_get_info(dev, &usb_stor[usb_max_devs], &usb_dev_desc[usb_max_devs])) + if(usb_stor_get_info(dev, &usb_stor[usb_max_devs], &usb_dev_desc[usb_max_devs])) usb_max_devs++; } /* if storage device */ if(usb_max_devs==USB_MAX_STOR_DEV) { @@ -237,7 +237,7 @@ int usb_stor_scan(int mode) break; } } /* for */ - + usb_disable_asynch(0); /* asynch transfer allowed */ printf("%d Storage Device(s) found\n", usb_max_devs); if(usb_max_devs>0) @@ -656,7 +656,7 @@ int usb_stor_BBB_transport(ccb *srb, struct us_data *us) retry = 0; again: USB_STOR_PRINTF("STATUS phase\n"); - result = usb_bulk_msg(us->pusb_dev, pipein, &csw, UMASS_BBB_CSW_SIZE, + result = usb_bulk_msg(us->pusb_dev, pipein, &csw, UMASS_BBB_CSW_SIZE, &actlen, USB_CNTL_TIMEOUT*5); /* special handling of STALL in STATUS phase */ @@ -1134,7 +1134,7 @@ int usb_stor_get_info(struct usb_device *dev,struct us_data *ss,block_dev_desc_t dev->descriptor.idProduct == 0x2010) ) USB_STOR_PRINTF("usb_stor_get_info: skipping RESET..\n"); - else + else ss->transport_reset(ss); pccb->pdata = usb_stor_buf; @@ -1145,7 +1145,7 @@ int usb_stor_get_info(struct usb_device *dev,struct us_data *ss,block_dev_desc_t if(usb_inquiry(pccb,ss)) return -1; - + perq = usb_stor_buf[0]; modi = usb_stor_buf[1]; if((perq & 0x1f) == 0x1f) { -- cgit v1.2.3