summaryrefslogtreecommitdiff
path: root/src/northbridge/intel/sandybridge/common.c
blob: 0ee7e1d59bc23e510f3c3b38f3bf7c65de1fa779 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* SPDX-License-Identifier: GPL-2.0-only */

#include <device/device.h>
#include <device/pci_def.h>
#include <device/pci_ops.h>
#include "sandybridge.h"

enum platform_type get_platform_type(void)
{
	switch (pci_s_read_config16(HOST_BRIDGE, PCI_DEVICE_ID) & 0xc) {
	case 0x0: /* Desktop */
		return PLATFORM_DESKTOP_SERVER;
	case 0x4: /* Mobile */
		return PLATFORM_MOBILE;
	case 0x8: /* Server */
	default:
		return PLATFORM_DESKTOP_SERVER;
	}
}