summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/smbios.c70
1 files changed, 35 insertions, 35 deletions
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c
index ee8014943f..0af149e6aa 100644
--- a/src/arch/x86/smbios.c
+++ b/src/arch/x86/smbios.c
@@ -37,41 +37,6 @@ static u8 smbios_checksum(u8 *p, u32 length)
return -ret;
}
-/* Get the device type 41 from the dev struct */
-static u8 smbios_get_device_type_from_dev(struct device *dev)
-{
- u16 pci_basesubclass = (dev->class >> 8) & 0xFFFF;
-
- switch (pci_basesubclass) {
- case PCI_CLASS_NOT_DEFINED:
- return SMBIOS_DEVICE_TYPE_OTHER;
- case PCI_CLASS_DISPLAY_VGA:
- case PCI_CLASS_DISPLAY_XGA:
- case PCI_CLASS_DISPLAY_3D:
- case PCI_CLASS_DISPLAY_OTHER:
- return SMBIOS_DEVICE_TYPE_VIDEO;
- case PCI_CLASS_STORAGE_SCSI:
- return SMBIOS_DEVICE_TYPE_SCSI;
- case PCI_CLASS_NETWORK_ETHERNET:
- return SMBIOS_DEVICE_TYPE_ETHERNET;
- case PCI_CLASS_NETWORK_TOKEN_RING:
- return SMBIOS_DEVICE_TYPE_TOKEN_RING;
- case PCI_CLASS_MULTIMEDIA_VIDEO:
- case PCI_CLASS_MULTIMEDIA_AUDIO:
- case PCI_CLASS_MULTIMEDIA_PHONE:
- case PCI_CLASS_MULTIMEDIA_OTHER:
- return SMBIOS_DEVICE_TYPE_SOUND;
- case PCI_CLASS_STORAGE_ATA:
- return SMBIOS_DEVICE_TYPE_PATA;
- case PCI_CLASS_STORAGE_SATA:
- return SMBIOS_DEVICE_TYPE_SATA;
- case PCI_CLASS_STORAGE_SAS:
- return SMBIOS_DEVICE_TYPE_SAS;
- default:
- return SMBIOS_DEVICE_TYPE_UNKNOWN;
- }
-}
-
int smbios_add_string(u8 *start, const char *str)
{
int i = 1;
@@ -1130,6 +1095,41 @@ static int smbios_write_type127(unsigned long *current, int handle)
return len;
}
+/* Get the device type 41 from the dev struct */
+static u8 smbios_get_device_type_from_dev(struct device *dev)
+{
+ u16 pci_basesubclass = (dev->class >> 8) & 0xFFFF;
+
+ switch (pci_basesubclass) {
+ case PCI_CLASS_NOT_DEFINED:
+ return SMBIOS_DEVICE_TYPE_OTHER;
+ case PCI_CLASS_DISPLAY_VGA:
+ case PCI_CLASS_DISPLAY_XGA:
+ case PCI_CLASS_DISPLAY_3D:
+ case PCI_CLASS_DISPLAY_OTHER:
+ return SMBIOS_DEVICE_TYPE_VIDEO;
+ case PCI_CLASS_STORAGE_SCSI:
+ return SMBIOS_DEVICE_TYPE_SCSI;
+ case PCI_CLASS_NETWORK_ETHERNET:
+ return SMBIOS_DEVICE_TYPE_ETHERNET;
+ case PCI_CLASS_NETWORK_TOKEN_RING:
+ return SMBIOS_DEVICE_TYPE_TOKEN_RING;
+ case PCI_CLASS_MULTIMEDIA_VIDEO:
+ case PCI_CLASS_MULTIMEDIA_AUDIO:
+ case PCI_CLASS_MULTIMEDIA_PHONE:
+ case PCI_CLASS_MULTIMEDIA_OTHER:
+ return SMBIOS_DEVICE_TYPE_SOUND;
+ case PCI_CLASS_STORAGE_ATA:
+ return SMBIOS_DEVICE_TYPE_PATA;
+ case PCI_CLASS_STORAGE_SATA:
+ return SMBIOS_DEVICE_TYPE_SATA;
+ case PCI_CLASS_STORAGE_SAS:
+ return SMBIOS_DEVICE_TYPE_SAS;
+ default:
+ return SMBIOS_DEVICE_TYPE_UNKNOWN;
+ }
+}
+
/* Generate Type41 entries from devicetree */
static int smbios_walk_device_tree_type41(struct device *dev, int *handle,
unsigned long *current)