• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <device/device.h>
4 #include <device/pci_def.h>
5 #include <device/pci_ops.h>
6 #include "sandybridge.h"
7 
get_platform_type(void)8 enum platform_type get_platform_type(void)
9 {
10 	switch (pci_s_read_config16(HOST_BRIDGE, PCI_DEVICE_ID) & 0xc) {
11 	case 0x0: /* Desktop */
12 		return PLATFORM_DESKTOP_SERVER;
13 	case 0x4: /* Mobile */
14 		return PLATFORM_MOBILE;
15 	case 0x8: /* Server */
16 	default:
17 		return PLATFORM_DESKTOP_SERVER;
18 	}
19 }
20