summaryrefslogtreecommitdiffstats
path: root/src/southbridge/intel/i82801gx/i82801gx_usb_ehci.c
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2010-01-16 17:53:38 +0000
committerStefan Reinauer <stepan@openbios.org>2010-01-16 17:53:38 +0000
commit9fe4d797a37671a65053add3f7cca27397db0b9b (patch)
tree5cabbdc8b6e7eb970891b55d1ea3727a4a71aca2 /src/southbridge/intel/i82801gx/i82801gx_usb_ehci.c
parent984e0f3a0c3a82339ef8afcf7f315f377e0c81fc (diff)
downloadcoreboot-staging-9fe4d797a37671a65053add3f7cca27397db0b9b.zip
coreboot-staging-9fe4d797a37671a65053add3f7cca27397db0b9b.tar.gz
coreboot used to have two different "APIs" for memory accesses:
read32(unsigned long addr) vs readl(void *addr) and write32(unsigned long addr, uint32_t value) vs writel(uint32_t value, void *addr) read32 was only available in __PRE_RAM__ stage, while readl was used in stage2. Some unclean implementations then made readl available to __PRE_RAM__ too which results in really messy includes and code. This patch fixes all code to use the read32/write32 variant, so that we can remove readl/writel in another patch. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5022 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/southbridge/intel/i82801gx/i82801gx_usb_ehci.c')
-rw-r--r--src/southbridge/intel/i82801gx/i82801gx_usb_ehci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/southbridge/intel/i82801gx/i82801gx_usb_ehci.c b/src/southbridge/intel/i82801gx/i82801gx_usb_ehci.c
index 90ef28a..9edee4f 100644
--- a/src/southbridge/intel/i82801gx/i82801gx_usb_ehci.c
+++ b/src/southbridge/intel/i82801gx/i82801gx_usb_ehci.c
@@ -53,8 +53,8 @@ static void usb_ehci_init(struct device *dev)
/* Clear any pending port changes */
res = find_resource(dev, 0x10);
base = res->base;
- reg32 = readl((u8 *)base + 0x24) | (1 << 2);
- writel(reg32, (u8 *)base + 0x24);
+ reg32 = read32((u8 *)base + 0x24) | (1 << 2);
+ write32((u8 *)base + 0x24, reg32);
/* workaround */
reg8 = pci_read_config8(dev, 0x84);
OpenPOWER on IntegriCloud