From 9c4c5ae3e10e4f2ca799aacbb74e1f5adb86e0b5 Mon Sep 17 00:00:00 2001 From: Jon Loeliger Date: Sat, 23 Jul 2005 10:37:35 -0500 Subject: * Patch by Jon Loeliger, Kumar Gala 2005-02-08 - Convert the CPM2 based functionality to use new CONFIG_CPM2 option rather than a myriad of CONFIG_MPC8560-like variants. Applies to MPC85xx and MPC8260 boards, includes stxgp3 and sbc8560. Eliminates the CONFIG_MPC8560 option entirely. Distributes the new CONFIG_CPM2 option to each 8260 board. --- common/cmd_bdinfo.c | 4 ++-- common/cmd_bootm.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'common') diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index ca83473..c118f06 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -68,13 +68,13 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) print_str ("pci_busfreq", strmhz(buf, bd->bi_pci_busfreq)); #endif #else /* ! CONFIG_405GP, CONFIG_405CR, CONFIG_405EP, CONFIG_XILINX_ML300 */ -#if defined(CONFIG_8260) || defined(CONFIG_MPC8560) +#if defined(CONFIG_CPM2) print_str ("vco", strmhz(buf, bd->bi_vco)); print_str ("sccfreq", strmhz(buf, bd->bi_sccfreq)); print_str ("brgfreq", strmhz(buf, bd->bi_brgfreq)); #endif print_str ("intfreq", strmhz(buf, bd->bi_intfreq)); -#if defined(CONFIG_8260) || defined(CONFIG_MPC8560) +#if defined(CONFIG_CPM2) print_str ("cpmfreq", strmhz(buf, bd->bi_cpmfreq)); #endif print_str ("busfreq", strmhz(buf, bd->bi_busfreq)); diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index a90735f..c200fd8 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -580,12 +580,12 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag, kbd->bi_flbfreq /= 1000000L; kbd->bi_vcofreq /= 1000000L; #endif -#if defined(CONFIG_8260) || defined(CONFIG_MPC8560) +#if defined(CONFIG_CPM2) kbd->bi_cpmfreq /= 1000000L; kbd->bi_brgfreq /= 1000000L; kbd->bi_sccfreq /= 1000000L; kbd->bi_vco /= 1000000L; -#endif /* CONFIG_8260 */ +#endif #if defined(CONFIG_MPC5xxx) kbd->bi_ipbfreq /= 1000000L; kbd->bi_pcifreq /= 1000000L; -- cgit v1.1 From de1d0a69956a63cea6a62043ae5d5afb584efe93 Mon Sep 17 00:00:00 2001 From: Jon Loeliger Date: Mon, 1 Aug 2005 13:20:47 -0500 Subject: Fix style issues primarily in 85xx and 83xx boards. - C++ comments - Trailing white space - Indentation not by TAB - Excessive amount of empty lines - Trailing empty lines --- common/cmd_flash.c | 2 +- common/cmd_usb.c | 3 +-- common/usb.c | 15 ++++++--------- common/usb_storage.c | 10 +++++----- 4 files changed, 13 insertions(+), 17 deletions(-) (limited to 'common') diff --git a/common/cmd_flash.c b/common/cmd_flash.c index a0ccdb6..162d1ff 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 3af8619..0738f55 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 1738d95..811ed24 100644 --- a/common/usb.c +++ b/common/usb.c @@ -47,7 +47,7 @@ #endif -#undef USB_DEBUG +#undef USB_DEBUG #ifdef USB_DEBUG #define USB_PRINTF(fmt,args...) printf (fmt ,##args) @@ -342,7 +342,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 +517,12 @@ 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,9 @@ 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 +956,6 @@ 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 5397bb2..6cf62e4 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.1