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

#include <console/console.h>
#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;
	}
}