[coreboot-gerrit] Change in coreboot[master]: WIP src/soc/intel/common/block/gpio: Add debug prints for gpio driver

Bora Guvendik (Code Review) gerrit at coreboot.org
Wed Jan 10 01:17:46 CET 2018


Bora Guvendik has uploaded this change for review. ( https://review.coreboot.org/23199


Change subject: WIP src/soc/intel/common/block/gpio: Add debug prints for gpio driver
......................................................................

WIP src/soc/intel/common/block/gpio: Add debug prints for gpio driver

Print smi and hostsw_own register offsets and bitmasks

Change-Id: Icee004e720883fb55e7b0e22a2d6bd0e76989073
Signed-off-by: Bora Guvendik <bora.guvendik at intel.com>
---
M src/soc/intel/common/block/gpio/gpio.c
1 file changed, 3 insertions(+), 1 deletion(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/99/23199/1

diff --git a/src/soc/intel/common/block/gpio/gpio.c b/src/soc/intel/common/block/gpio/gpio.c
index 83ed6d8..0b8d295 100644
--- a/src/soc/intel/common/block/gpio/gpio.c
+++ b/src/soc/intel/common/block/gpio/gpio.c
@@ -142,6 +142,7 @@
 	 */
 	hostsw_reg = comm->host_own_reg_0;
 	hostsw_reg += gpio_group_index_scaled(comm, pin, sizeof(uint32_t));
+	printk(BIOS_DEBUG,"gpio configure owner: hostsw_reg: 0x%X bitmask:0x%X \n",hostsw_reg,gpio_bitmask_within_group(comm, pin));
 	pcr_or32(comm->port, hostsw_reg, gpio_bitmask_within_group(comm, pin));
 }
 
@@ -167,6 +168,7 @@
 
 	/* Set enable bits */
 	en_reg = GPI_SMI_EN_OFFSET(comm, group);
+	printk(BIOS_DEBUG,"gpio configure smi: en_reg: 0x%X bitmask:0x%X \n",en_reg,gpio_bitmask_within_group(comm, pin));
 	pcr_or32(comm->port, en_reg, gpio_bitmask_within_group(comm, pin));
 }
 
@@ -260,7 +262,7 @@
 		soc_pad_conf &= mask[i];
 		soc_pad_conf |= pad_conf & ~mask[i];
 
-		if (IS_ENABLED(CONFIG_DEBUG_SOC_COMMON_BLOCK_GPIO))
+//		if (IS_ENABLED(CONFIG_DEBUG_SOC_COMMON_BLOCK_GPIO))
 			printk(BIOS_DEBUG,
 			"gpio_padcfg [0x%02x, %02zd] DW%d [0x%08x : 0x%08x"
 			" : 0x%08x]\n",

-- 
To view, visit https://review.coreboot.org/23199
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icee004e720883fb55e7b0e22a2d6bd0e76989073
Gerrit-Change-Number: 23199
Gerrit-PatchSet: 1
Gerrit-Owner: Bora Guvendik <bora.guvendik at intel.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180110/57e08b1e/attachment.html>


More information about the coreboot-gerrit mailing list