summaryrefslogtreecommitdiff
path: root/src/mainboard/prodrive/atlas/bootblock.c
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2023-03-21 16:13:36 +0100
committerLean Sheng Tan <sheng.tan@9elements.com>2023-03-24 16:36:42 +0000
commit964079f77cced3aedc468a888b6b6f32cfbec7c9 (patch)
treea582aa14ad438130326129ec0495a35a7086c8dd /src/mainboard/prodrive/atlas/bootblock.c
parent3ba1621dab403625cb0852d5dad6285e0ab6744d (diff)
mb/prodrive/atlas: Add support to read from EC EMI
Implement initial support for EMI (Embedded Memory Interface), which Microchip describes as "a standard run-time mechanism for the system host to communicate with the Embedded Controller (EC) and other logical components". EMI allows the host to access regions of EC memory without requiring any assistance from the EC. For now, Atlas only uses EMI 0. This change enables EMI 0, subsequent commits will read data from it. Change-Id: Ia899ae71e97f9fc259397dfb5fb84ca06545f5d8 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/73936 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Diffstat (limited to 'src/mainboard/prodrive/atlas/bootblock.c')
-rw-r--r--src/mainboard/prodrive/atlas/bootblock.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mainboard/prodrive/atlas/bootblock.c b/src/mainboard/prodrive/atlas/bootblock.c
index 5b1643b742..07f3bb2bde 100644
--- a/src/mainboard/prodrive/atlas/bootblock.c
+++ b/src/mainboard/prodrive/atlas/bootblock.c
@@ -1,10 +1,16 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <bootblock_common.h>
+#include <types.h>
+#include "ec.h"
#include "gpio.h"
+#include "mainboard.h"
void bootblock_mainboard_early_init(void)
{
configure_early_gpio_pads();
+
+ /* Enable EMI (Embedded Memory Interface) 0 on the EC */
+ ec_espi_io_program_iobase(EC_IDX_PORT, EMI_0_IOBASE_INDEX, EMI_0_IO_BASE_ADDR);
}