summaryrefslogtreecommitdiff
path: root/include/p2sb.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-07-08 06:32:19 +0300
committerBin Meng <bmeng.cn@gmail.com>2020-07-17 09:32:24 +0300
commit4916f4586eab7941f38a89e4dacd103af1c4105f (patch)
tree0abebe14dc6594fdeffc71617026250afdc88501 /include/p2sb.h
parent54bcca29737f8de2598b4a3f8f503290bd49eec0 (diff)
downloadu-boot-4916f4586eab7941f38a89e4dacd103af1c4105f.tar.xz
x86: pinctrl: Add a way to get the pinctrl reg address
At present we can query the offset of a pinctrl register within the p2sb. For ACPI we need to get the actual address of the register. Add a function to handle this and rename the old one to more accurately reflect its purpose. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Diffstat (limited to 'include/p2sb.h')
-rw-r--r--include/p2sb.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/p2sb.h b/include/p2sb.h
index 60c7f70773..74eb08b7ff 100644
--- a/include/p2sb.h
+++ b/include/p2sb.h
@@ -132,4 +132,13 @@ int p2sb_set_port_id(struct udevice *dev, int portid);
*/
int p2sb_get_port_id(struct udevice *dev);
+/**
+ * pcr_reg_address() Convert an offset in p2sb space to an absolute address
+ *
+ * @dev: Child device (whose parent is UCLASS_P2SB)
+ * @offset: Offset within that child's address space
+ * @return pointer to that offset within the child's address space
+ */
+void *pcr_reg_address(struct udevice *dev, uint offset);
+
#endif