diff options
author | Jeff Li <lijinfeng01@inspur.com> | 2021-12-17 17:19:07 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-12-13 17:42:03 +0000 |
commit | 3de39fa36fb90624deef854760e64567a9d42747 (patch) | |
tree | 749dbc87b24ce963e1d8c862a091e4b0f379db44 /src/soc/intel/common | |
parent | 2557d02eee4e57399da6015bc4990e76041cf18d (diff) |
soc/intel/common/block: add definition of GPIO configuration
Add two macros:
- PAD_CFG_NF_OWNERSHIP()
- PAD_CFG_GPIO_OWNERSHIP()
to support setting the Host Software Ownership (own) fields.
Signed-off-by: lichenchen.carl <lichenchen.carl@bytedance.com>
Change-Id: Ia3f2ad8658b751156456b69366fa4b1badb8b595
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70421
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
Diffstat (limited to 'src/soc/intel/common')
-rw-r--r-- | src/soc/intel/common/block/include/intelblocks/gpio_defs.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/include/intelblocks/gpio_defs.h b/src/soc/intel/common/block/include/intelblocks/gpio_defs.h index 3790ba41d8..654d6f2d98 100644 --- a/src/soc/intel/common/block/include/intelblocks/gpio_defs.h +++ b/src/soc/intel/common/block/include/intelblocks/gpio_defs.h @@ -524,4 +524,16 @@ #endif /* CONFIG_SOC_INTEL_COMMON_BLOCK_GPIO_DUAL_ROUTE_SUPPORT */ +/* Native function configuration */ +#define PAD_CFG_NF_OWNERSHIP(pad, pull, rst, func, own) \ + _PAD_CFG_STRUCT(pad, \ + PAD_RESET(rst) | PAD_FUNC(func) | PAD_TRIG(OFF), \ + PAD_PULL(pull) | PAD_IOSSTATE(TxLASTRxE) | \ + PAD_CFG_OWN_GPIO(own)) + +#define PAD_CFG_GPIO_OWNERSHIP(pad, pull, rst, own) \ + _PAD_CFG_STRUCT(pad, \ + PAD_FUNC(GPIO) | PAD_RESET(rst) | PAD_TRIG(OFF), \ + PAD_PULL(pull) | PAD_CFG_OWN_GPIO(own)) + #endif /* _SOC_BLOCK_GPIO_DEFS_H_ */ |