intel/sandybridge: Don't hardcode platform type
[coreboot.git] / src / northbridge / intel / sandybridge / common.c
blob72b5603d0c3e73bd5f1cb7f6ed8612074775c2c0
1 /*
2 * This file is part of the coreboot project.
4 * Copyright (C) 2007-2009 coresystems GmbH
5 * Copyright (C) 2012 The Chromium OS Authors
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; version 2 of
10 * the License.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
18 #include <types.h>
19 #include <console/console.h>
20 #include <device/device.h>
21 #include <device/pci.h>
22 #include <device/pci_ids.h>
23 #include "sandybridge.h"
25 enum platform_type get_platform_type(void)
27 const int id = get_platform_id();
28 if (id != 1 && id != 4)
29 printk(BIOS_WARNING, "WARN: Unknown platform id 0x%x\n", id);
31 return (id == 4) ? PLATFORM_MOBILE : PLATFORM_DESKTOP_SERVER;