From c1bc8171e65bb9100c4e9cb0efe8e5aa9771d4d3 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Mon, 31 Aug 2015 17:10:35 +0530 Subject: Skylake: Print GPIO MMIO base and pad config using gpio_debug token This will help development activity. Default GPIO print settings is disable, need to set gpio_debug = 1 to get GPIO MMIO dump. BUG=None BRANCH=None TEST=build coreboot and boot on Kunimitsu. Change-Id: I70c0a7bee1593cbc8e9fe1599f45bb50e3fc0f42 Signed-off-by: Patrick Georgi Original-Commit-Id: 19102612ea40184307ecb0ce8b165b5b989f6911 Original-Change-Id: I4ea6349866c108382de9787bb9ed09fc78d9c770 Original-Signed-off-by: Subrata Banik Original-Reviewed-on: https://chromium-review.googlesource.com/296280 Original-Reviewed-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/11552 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/soc/intel/skylake/gpio.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/soc/intel/skylake') diff --git a/src/soc/intel/skylake/gpio.c b/src/soc/intel/skylake/gpio.c index 3610a6cf16..64b3dda334 100644 --- a/src/soc/intel/skylake/gpio.c +++ b/src/soc/intel/skylake/gpio.c @@ -25,6 +25,7 @@ #include #include +static const int gpio_debug = 0; /* There are 4 communities with 8 GPIO groups (GPP_[A:G] and GPD) */ struct gpio_community { @@ -323,6 +324,11 @@ static void gpio_configure_pad(const struct pad_config *cfg) if ((dw0 & PAD_FIELD(GPIROUTSMI, MASK)) == PAD_FIELD(GPIROUTSMI, YES)) gpi_enable_smi(cfg->pad); + + if(gpio_debug) + printk(BIOS_DEBUG, + "Write Pad: Base(%p) - conf0 = %x conf1= %x pad # = %d\n", + &dw_regs[0], dw0, reg, cfg->pad); } void gpio_configure_pads(const struct pad_config *cfgs, size_t num) -- cgit v1.2.3