Nico Huber submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved Angel Pons: Looks good to me, but someone else must approve
hwaccess.c: move function declarations from programmer.h to hwaccess.h

Move declarations for functions implemented in hwaccess.c from
programmer.h to hwaccess.h.

Change-Id: I075fd86211c766ae3d5f29c76adbd7c5b9bdbd80
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/58865
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
---
M dmi.c
M hwaccess.h
M ich_descriptors.c
M programmer.h
4 files changed, 34 insertions(+), 33 deletions(-)

diff --git a/dmi.c b/dmi.c
index 5d709f1..d2e149d 100644
--- a/dmi.c
+++ b/dmi.c
@@ -31,6 +31,7 @@
#include <stdlib.h>

#include "flash.h"
+#include "hwaccess.h"
#include "programmer.h"

/* Enable SMBIOS decoding. Currently legacy DMI decoding is enough. */
diff --git a/hwaccess.h b/hwaccess.h
index 56c2d1e..46335f3 100644
--- a/hwaccess.h
+++ b/hwaccess.h
@@ -37,6 +37,38 @@
#undef index
#endif /* NEED_PCI == 1 */

+void mmio_writeb(uint8_t val, void *addr);
+void mmio_writew(uint16_t val, void *addr);
+void mmio_writel(uint32_t val, void *addr);
+uint8_t mmio_readb(const void *addr);
+uint16_t mmio_readw(const void *addr);
+uint32_t mmio_readl(const void *addr);
+void mmio_readn(const void *addr, uint8_t *buf, size_t len);
+void mmio_le_writeb(uint8_t val, void *addr);
+void mmio_le_writew(uint16_t val, void *addr);
+void mmio_le_writel(uint32_t val, void *addr);
+uint8_t mmio_le_readb(const void *addr);
+uint16_t mmio_le_readw(const void *addr);
+uint32_t mmio_le_readl(const void *addr);
+#define pci_mmio_writeb mmio_le_writeb
+#define pci_mmio_writew mmio_le_writew
+#define pci_mmio_writel mmio_le_writel
+#define pci_mmio_readb mmio_le_readb
+#define pci_mmio_readw mmio_le_readw
+#define pci_mmio_readl mmio_le_readl
+void rmmio_writeb(uint8_t val, void *addr);
+void rmmio_writew(uint16_t val, void *addr);
+void rmmio_writel(uint32_t val, void *addr);
+void rmmio_le_writeb(uint8_t val, void *addr);
+void rmmio_le_writew(uint16_t val, void *addr);
+void rmmio_le_writel(uint32_t val, void *addr);
+#define pci_rmmio_writeb rmmio_le_writeb
+#define pci_rmmio_writew rmmio_le_writew
+#define pci_rmmio_writel rmmio_le_writel
+void rmmio_valb(void *addr);
+void rmmio_valw(void *addr);
+void rmmio_vall(void *addr);
+
#define ___constant_swab8(x) ((uint8_t) ( \
(((uint8_t)(x) & (uint8_t)0xffU))))

diff --git a/ich_descriptors.c b/ich_descriptors.c
index 7927493..5edaaf4 100644
--- a/ich_descriptors.c
+++ b/ich_descriptors.c
@@ -16,6 +16,7 @@
*/

#include "ich_descriptors.h"
+#include "hwaccess.h"

#ifdef ICH_DESCRIPTORS_FROM_DUMP_ONLY
#include <stdio.h>
diff --git a/programmer.h b/programmer.h
index 81086a8..ec9503c 100644
--- a/programmer.h
+++ b/programmer.h
@@ -282,39 +282,6 @@
extern enum chipbustype internal_buses_supported;
#endif

-/* hwaccess.c */
-void mmio_writeb(uint8_t val, void *addr);
-void mmio_writew(uint16_t val, void *addr);
-void mmio_writel(uint32_t val, void *addr);
-uint8_t mmio_readb(const void *addr);
-uint16_t mmio_readw(const void *addr);
-uint32_t mmio_readl(const void *addr);
-void mmio_readn(const void *addr, uint8_t *buf, size_t len);
-void mmio_le_writeb(uint8_t val, void *addr);
-void mmio_le_writew(uint16_t val, void *addr);
-void mmio_le_writel(uint32_t val, void *addr);
-uint8_t mmio_le_readb(const void *addr);
-uint16_t mmio_le_readw(const void *addr);
-uint32_t mmio_le_readl(const void *addr);
-#define pci_mmio_writeb mmio_le_writeb
-#define pci_mmio_writew mmio_le_writew
-#define pci_mmio_writel mmio_le_writel
-#define pci_mmio_readb mmio_le_readb
-#define pci_mmio_readw mmio_le_readw
-#define pci_mmio_readl mmio_le_readl
-void rmmio_writeb(uint8_t val, void *addr);
-void rmmio_writew(uint16_t val, void *addr);
-void rmmio_writel(uint32_t val, void *addr);
-void rmmio_le_writeb(uint8_t val, void *addr);
-void rmmio_le_writew(uint16_t val, void *addr);
-void rmmio_le_writel(uint32_t val, void *addr);
-#define pci_rmmio_writeb rmmio_le_writeb
-#define pci_rmmio_writew rmmio_le_writew
-#define pci_rmmio_writel rmmio_le_writel
-void rmmio_valb(void *addr);
-void rmmio_valw(void *addr);
-void rmmio_vall(void *addr);
-
/* bitbang_spi.c */
int register_spi_bitbang_master(const struct bitbang_spi_master *master, void *spi_data);


To view, visit change 58865. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I075fd86211c766ae3d5f29c76adbd7c5b9bdbd80
Gerrit-Change-Number: 58865
Gerrit-PatchSet: 3
Gerrit-Owner: Thomas Heijligen <src@posteo.de>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged