<p>Marc Jones has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/22677">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">soc/amd/stoneyridge: Add XHCI PM register access functions<br><br>Add functions to access the XHCI PM MMIO registers.<br><br>Change-Id: I81b4c0a448eb17c5ee0562a2c3548a074d533a98<br>Signed-off-by: Marc Jones <marcj303@gmail.com><br>---<br>M src/soc/amd/stoneyridge/include/soc/iomap.h<br>M src/soc/amd/stoneyridge/include/soc/southbridge.h<br>M src/soc/amd/stoneyridge/sb_util.c<br>3 files changed, 36 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/22677/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/soc/amd/stoneyridge/include/soc/iomap.h b/src/soc/amd/stoneyridge/include/soc/iomap.h<br>index 53eb712..64a9b30 100644<br>--- a/src/soc/amd/stoneyridge/include/soc/iomap.h<br>+++ b/src/soc/amd/stoneyridge/include/soc/iomap.h<br>@@ -31,6 +31,7 @@<br> #define AMD_SB_ACPI_MMIO_ADDR                0xfed80000<br> #define APU_SMI_BASE                       0xfed80200<br> #define PM_MMIO_BASE                       0xfed80300<br>+#define XHCI_ACPI_PM_MMIO_BASE             0xfed81c00<br> #define APU_UART0_BASE                     0xfedc6000<br> #define APU_UART1_BASE                     0xfedc8000<br> <br>diff --git a/src/soc/amd/stoneyridge/include/soc/southbridge.h b/src/soc/amd/stoneyridge/include/soc/southbridge.h<br>index d911472..f840fd9 100644<br>--- a/src/soc/amd/stoneyridge/include/soc/southbridge.h<br>+++ b/src/soc/amd/stoneyridge/include/soc/southbridge.h<br>@@ -312,6 +312,12 @@<br> void smi_write32(uint8_t offset, uint32_t value);<br> uint16_t pm_acpi_pm_cnt_blk(void);<br> uint16_t pm_acpi_pm_evt_blk(void);<br>+void xhci_pm_write8(uint8_t reg, uint8_t value);<br>+uint8_t xhci_pm_read8(uint8_t reg);<br>+void xhci_pm_write16(uint8_t reg, uint16_t value);<br>+uint16_t xhci_pm_read16(uint8_t reg);<br>+void xhci_pm_write32(uint8_t reg, uint32_t value);<br>+uint32_t xhci_pm_read32(uint8_t reg);<br> int s3_load_nvram_early(int size, u32 *old_dword, int nvram_pos);<br> int s3_save_nvram_early(u32 dword, int size, int  nvram_pos);<br> void bootblock_fch_early_init(void);<br>diff --git a/src/soc/amd/stoneyridge/sb_util.c b/src/soc/amd/stoneyridge/sb_util.c<br>index f7c6b45..053e8dd 100644<br>--- a/src/soc/amd/stoneyridge/sb_util.c<br>+++ b/src/soc/amd/stoneyridge/sb_util.c<br>@@ -84,3 +84,32 @@<br> {<br>     return pm_read16(PM_EVT_BLK);<br> }<br>+<br>+void xhci_pm_write8(uint8_t reg, uint8_t value)<br>+{<br>+   write8((void *)(XHCI_ACPI_PM_MMIO_BASE + reg), value);<br>+}<br>+<br>+uint8_t xhci_pm_read8(uint8_t reg)<br>+{<br>+       return read8((void *)(XHCI_ACPI_PM_MMIO_BASE + reg));<br>+}<br>+void xhci_pm_write16(uint8_t reg, uint16_t value)<br>+{<br>+    write16((void *)(XHCI_ACPI_PM_MMIO_BASE + reg), value);<br>+}<br>+<br>+uint16_t xhci_pm_read16(uint8_t reg)<br>+{<br>+    return read16((void *)(XHCI_ACPI_PM_MMIO_BASE + reg));<br>+}<br>+<br>+void xhci_pm_write32(uint8_t reg, uint32_t value)<br>+{<br>+        write32((void *)(XHCI_ACPI_PM_MMIO_BASE + reg), value);<br>+}<br>+<br>+uint32_t xhci_pm_read32(uint8_t reg)<br>+{<br>+    return read32((void *)(XHCI_ACPI_PM_MMIO_BASE + reg));<br>+}<br></pre><p>To view, visit <a href="https://review.coreboot.org/22677">change 22677</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/22677"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I81b4c0a448eb17c5ee0562a2c3548a074d533a98 </div>
<div style="display:none"> Gerrit-Change-Number: 22677 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Marc Jones <marc@marcjonesconsulting.com> </div>