diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_pci.c | 66 | ||||
-rw-r--r-- | common/env_mmc.c | 1 | ||||
-rw-r--r-- | common/env_sf.c | 3 |
3 files changed, 4 insertions, 66 deletions
diff --git a/common/cmd_pci.c b/common/cmd_pci.c index ccf5adaaad6..92631ea2dd7 100644 --- a/common/cmd_pci.c +++ b/common/cmd_pci.c @@ -104,68 +104,6 @@ void pciinfo(int BusNum, int ShortPCIListing) } } -static char *pci_classes_str(u8 class) -{ - switch (class) { - case PCI_CLASS_NOT_DEFINED: - return "Build before PCI Rev2.0"; - break; - case PCI_BASE_CLASS_STORAGE: - return "Mass storage controller"; - break; - case PCI_BASE_CLASS_NETWORK: - return "Network controller"; - break; - case PCI_BASE_CLASS_DISPLAY: - return "Display controller"; - break; - case PCI_BASE_CLASS_MULTIMEDIA: - return "Multimedia device"; - break; - case PCI_BASE_CLASS_MEMORY: - return "Memory controller"; - break; - case PCI_BASE_CLASS_BRIDGE: - return "Bridge device"; - break; - case PCI_BASE_CLASS_COMMUNICATION: - return "Simple comm. controller"; - break; - case PCI_BASE_CLASS_SYSTEM: - return "Base system peripheral"; - break; - case PCI_BASE_CLASS_INPUT: - return "Input device"; - break; - case PCI_BASE_CLASS_DOCKING: - return "Docking station"; - break; - case PCI_BASE_CLASS_PROCESSOR: - return "Processor"; - break; - case PCI_BASE_CLASS_SERIAL: - return "Serial bus controller"; - break; - case PCI_BASE_CLASS_INTELLIGENT: - return "Intelligent controller"; - break; - case PCI_BASE_CLASS_SATELLITE: - return "Satellite controller"; - break; - case PCI_BASE_CLASS_CRYPT: - return "Cryptographic device"; - break; - case PCI_BASE_CLASS_SIGNAL_PROCESSING: - return "DSP"; - break; - case PCI_CLASS_OTHERS: - return "Does not fit any class"; - break; - default: - return "???"; - break; - }; -} /* * Subroutine: pci_header_show_brief @@ -190,7 +128,7 @@ void pci_header_show_brief(pci_dev_t dev) printf("0x%.4x 0x%.4x %-23s 0x%.2x\n", vendor, device, - pci_classes_str(class), subclass); + pci_class_str(class), subclass); } /* @@ -225,7 +163,7 @@ void pci_header_show(pci_dev_t dev) PRINT (" status register = 0x%.4x\n", word, PCI_STATUS); PRINT (" revision ID = 0x%.2x\n", byte, PCI_REVISION_ID); PRINT2(" class code = 0x%.2x (%s)\n", byte, PCI_CLASS_CODE, - pci_classes_str); + pci_class_str); PRINT (" sub class code = 0x%.2x\n", byte, PCI_CLASS_SUB_CODE); PRINT (" programming interface = 0x%.2x\n", byte, PCI_CLASS_PROG); PRINT (" cache line = 0x%.2x\n", byte, PCI_CACHE_LINE_SIZE); diff --git a/common/env_mmc.c b/common/env_mmc.c index 3d7fceb099d..7c9392c86fb 100644 --- a/common/env_mmc.c +++ b/common/env_mmc.c @@ -29,6 +29,7 @@ #include <linux/stddef.h> #include <malloc.h> #include <mmc.h> +#include <search.h> #include <errno.h> /* references to names in env_common.c */ diff --git a/common/env_sf.c b/common/env_sf.c index a597b24dcb3..47c6a706654 100644 --- a/common/env_sf.c +++ b/common/env_sf.c @@ -272,7 +272,7 @@ int saveenv(void) u32 saved_size, saved_offset; char *saved_buffer = NULL; u32 sector = 1; - int ret; + int ret = 1; env_t env_new; char *res; ssize_t len; @@ -293,7 +293,6 @@ int saveenv(void) saved_offset = CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE; saved_buffer = malloc(saved_size); if (!saved_buffer) { - ret = 1; goto done; } ret = spi_flash_read(env_flash, saved_offset, |