From 6051fff9698c55e62e40189f04a4b9d914cd9cfb Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Mon, 23 May 2016 14:04:58 -0700 Subject: [PATCH] UPSTREAM: soc/apollolake/memmap: Switch to SIMPLE_DEVICE API memmap.c functionality is designed to be used in more than ramstage. Therefore, it cannot use ramstage-specific APIs. In this case, the SIMPLE_DEVICE API offers a more consistent behavior across stages. BUG=None BRANCH=None TEST=None Change-Id: Ic381fe1eb773fb0a5fb5887eb67d2228d2f0817d Original-Signed-off-by: Alexandru Gagniuc Original-Reviewed-on: https://review.coreboot.org/14953 Original-Tested-by: build bot (Jenkins) Original-Reviewed-by: Aaron Durbin Signed-off-by: Aaron Durbin Reviewed-on: https://chromium-review.googlesource.com/347586 Commit-Ready: Furquan Shaikh Tested-by: Furquan Shaikh Reviewed-by: Furquan Shaikh --- src/soc/intel/apollolake/memmap.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/soc/intel/apollolake/memmap.c b/src/soc/intel/apollolake/memmap.c index e57ed53d74..ea6f447d43 100644 --- a/src/soc/intel/apollolake/memmap.c +++ b/src/soc/intel/apollolake/memmap.c @@ -15,6 +15,14 @@ * GNU General Public License for more details. */ +/* + * The device_t returned by dev_find_slot() is different than the device_t + * passed to pci_write_config32(). If one needs to get access to the config.h + * of a device and perform i/o things are incorrect. One is a pointer while + * the other is a 32-bit integer. + */ +#define __SIMPLE_DEVICE__ + #include #include #include