aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/ocp/monolake/mainboard.c
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2019-06-15 11:01:16 +0200
committerPatrick Rudolph <siro@das-labor.org>2019-09-02 05:30:59 +0000
commiteb50d9a4fed0acaff3e76f143607f50e4c818093 (patch)
tree423185211554906bc878505b563f7117f7a0a049 /src/mainboard/ocp/monolake/mainboard.c
parenta96c4a1340ea0c48f0f2bf318a06176562799efa (diff)
mb/*: Use common IPMI KCS driver
Remove duplicated code and instead use the IPMI KCS driver, which provides the same functionality. Change-Id: I419713c9bef02084cca1ff4cf11c33c2e3e8d3c1 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33490 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Andrey Petrov <anpetrov@fb.com>
Diffstat (limited to 'src/mainboard/ocp/monolake/mainboard.c')
-rw-r--r--src/mainboard/ocp/monolake/mainboard.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/mainboard/ocp/monolake/mainboard.c b/src/mainboard/ocp/monolake/mainboard.c
index 56aef6b36e..9755b06983 100644
--- a/src/mainboard/ocp/monolake/mainboard.c
+++ b/src/mainboard/ocp/monolake/mainboard.c
@@ -15,55 +15,17 @@
*/
#include <device/device.h>
-#include <smbios.h>
-#if CONFIG(VGA_ROM_RUN)
-#include <x86emu/x86emu.h>
-#endif
#include <pc80/mc146818rtc.h>
#include <cf9_reset.h>
#include "ipmi.h"
-#define BMC_KCS_BASE 0xca2
-#define INTERFACE_IS_IO 0x1
-
-#if CONFIG(GENERATE_SMBIOS_TABLES)
-static int mainboard_smbios_data(struct device *dev, int *handle,
- unsigned long *current)
-{
- int len = 0;
-
- // add IPMI Device Information
- len += smbios_write_type38(
- current, handle,
- SMBIOS_BMC_INTERFACE_KCS,
- 0x20, // IPMI Version
- 0x20, // I2C address
- 0xff, // no NV storage
- BMC_KCS_BASE | INTERFACE_IS_IO, // IO port interface address
- 0x40,
- 0); // no IRQ
-
- return len;
-}
-#endif
-
/*
* mainboard_enable is executed as first thing after enumerate_buses().
* This is the earliest point to add customization.
*/
static void mainboard_enable(struct device *dev)
{
-#if CONFIG(GENERATE_SMBIOS_TABLES)
- dev->ops->get_smbios_data = mainboard_smbios_data;
-#endif
-
- /* Enable access to the BMC IPMI via KCS */
- struct device *lpc_sio_dev = dev_find_slot_pnp(BMC_KCS_BASE, 0);
- struct resource *res = new_resource(lpc_sio_dev, BMC_KCS_BASE);
ipmi_oem_rsp_t rsp;
- res->base = BMC_KCS_BASE;
- res->size = 1;
- res->flags = IORESOURCE_IO | IORESOURCE_ASSIGNED | IORESOURCE_FIXED;
if (is_ipmi_clear_cmos_set(&rsp)) {
/* TODO: Should also try to restore CMOS to cmos.default