aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/common/block/include/intelblocks/gpio.h
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2017-07-14 17:29:29 -0600
committerAaron Durbin <adurbin@chromium.org>2017-07-17 15:00:30 +0000
commitb5a5aa645068414b769e7304d46270f85d974616 (patch)
tree33fb6b9bab8badede0664bf9ae9b20522995c637 /src/soc/intel/common/block/include/intelblocks/gpio.h
parentaa2504a10e1106368cf5ec2e54e0083ee62057fb (diff)
soc/intel/common/gpio: clean up logical to chipset mapping
1. Explicitly add LOGICAL to the reset macro name to make it explicit that the values are logical. 2. Reword some of the comments and combine them into single comment instead of scattering the comments throughout. 3. Use c99 struct initializers for the reset mapping array. 4. For the chipset specific values use literals that match the hardware. 5. Use 'U' suffixes on the literals so we don't trip up compiler being over zealous on undefined behavior. 6. Use unsigned and fixed-width types for the reset mapping structure since the code is reliant on matching up with a register definition. 7. Fix formatting that can fit < 80 cols. Change-Id: Iaa23a319832c05b8a023f6e45c4ee5ac06dd7066 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/20589 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subrata.banik@intel.com> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/soc/intel/common/block/include/intelblocks/gpio.h')
-rw-r--r--src/soc/intel/common/block/include/intelblocks/gpio.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/soc/intel/common/block/include/intelblocks/gpio.h b/src/soc/intel/common/block/include/intelblocks/gpio.h
index c1542be6e7..879d30b469 100644
--- a/src/soc/intel/common/block/include/intelblocks/gpio.h
+++ b/src/soc/intel/common/block/include/intelblocks/gpio.h
@@ -45,12 +45,14 @@ struct pad_config {
};
/*
- * Structure provides the logical to actual value for PADRSTCFG in DW0
+ * Structure provides the logical to actual value for PADRSTCFG in DW0. Note
+ * that the values are expected to be within the field placement of the register
+ * itself. i.e. if the reset field is at 31:30 then the values within logical
+ * and chipset should occupy 31:30.
*/
struct reset_mapping {
- int logical;/* logical value defined in
- include/intelblocks/gpio_defs.h - PAD_CFG0_RESET_xxx */
- int chipset;/* translation of logical to SOC PADRSTCFG */
+ uint32_t logical;
+ uint32_t chipset;
};
/* This structure will be used to describe a community or each group within a