]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_pci.c
led_display: split led display support into generic and hw-dependent parts
[karo-tx-uboot.git] / common / cmd_pci.c
index 82d97178f5dd24ad1482e6c8450b62ce110a8b84..4bde0599118dd805dcc2cf8c0295f90eebb0847a 100644 (file)
@@ -35,8 +35,6 @@
 #include <asm/io.h>
 #include <pci.h>
 
-extern int cmd_get_data_size(char* arg, int default_size);
-
 unsigned char  ShortPCIListing = 1;
 
 /*
@@ -50,7 +48,7 @@ void pci_header_show_brief(pci_dev_t dev);
  * Subroutine:  pciinfo
  *
  * Description: Show information about devices on PCI bus.
- *                             Depending on the define CFG_SHORT_PCI_LISTING
+ *                             Depending on the define CONFIG_SYS_SHORT_PCI_LISTING
  *                             the output will be more or less exhaustive.
  *
  * Inputs:     bus_no          the number of the bus to be scanned.
@@ -173,7 +171,7 @@ static char *pci_classes_str(u8 class)
  * Subroutine:  pci_header_show_brief
  *
  * Description: Reads and prints the header of the
- *             specified PCI device in short form.
+ *             specified PCI device in short form.
  *
  * Inputs:     dev      Bus+Device+Function number
  *
@@ -473,7 +471,7 @@ pci_cfg_modify (pci_dev_t bdf, ulong addr, ulong size, ulong value, int incrflag
  *      pci modify[.b, .w, .l] bus.device.function [addr]
  *      pci write[.b, .w, .l] bus.device.function addr value
  */
-int do_pci (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_pci (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
        ulong addr = 0, value = 0, size = 0;
        pci_dev_t bdf = 0;
@@ -536,8 +534,7 @@ int do_pci (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
        return 1;
  usage:
-       printf ("Usage:\n%s\n", cmdtp->usage);
-       return 1;
+       return cmd_usage(cmdtp);
 }
 
 /***************************************************/
@@ -545,7 +542,7 @@ int do_pci (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
 U_BOOT_CMD(
        pci,    5,      1,      do_pci,
-       "pci     - list and access PCI Configuration Space\n",
+       "list and access PCI Configuration Space",
        "[bus] [long]\n"
        "    - short or long list of PCI devices on bus 'bus'\n"
        "pci header b.d.f\n"
@@ -557,5 +554,5 @@ U_BOOT_CMD(
        "pci modify[.b, .w, .l] b.d.f address\n"
        "    -  modify, auto increment CFG address\n"
        "pci write[.b, .w, .l] b.d.f address value\n"
-       "    - write to CFG address\n"
+       "    - write to CFG address"
 );