diff options
author | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2012-12-07 16:55:12 -0800 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2012-12-08 06:46:14 +0100 |
commit | 91f1423cac0460ab79492a9c167765359b9dd3e2 (patch) | |
tree | 08d04c715a1d53563138eed391f022eeaa1b4323 /src/device/oprom/yabel/device.h | |
parent | 4c4dd93be7fc7d7ae0d5802fe15f8e5e533a6872 (diff) |
Fix Yabel compilation on non-x86 platforms
Mostly preventing inb/outb being used on non-x86
Change-Id: I0434df4ce477c262337672867dc6ce398ff95279
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/2002
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/device/oprom/yabel/device.h')
-rw-r--r-- | src/device/oprom/yabel/device.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/device/oprom/yabel/device.h b/src/device/oprom/yabel/device.h index edee44d20e..017aab9384 100644 --- a/src/device/oprom/yabel/device.h +++ b/src/device/oprom/yabel/device.h @@ -128,7 +128,7 @@ u8 biosemu_dev_translate_address(int type, unsigned long * addr); static inline void out32le(void *addr, u32 val) { -#ifdef __i386 +#if CONFIG_ARCH_X86 || CONFIG_ARCH_ARMV7 *((u32*) addr) = cpu_to_le32(val); #else asm volatile ("stwbrx %0, 0, %1"::"r" (val), "r"(addr)); @@ -139,7 +139,7 @@ static inline u32 in32le(void *addr) { u32 val; -#ifdef __i386 +#if CONFIG_ARCH_X86 || CONFIG_ARCH_ARMV7 val = cpu_to_le32(*((u32 *) addr)); #else asm volatile ("lwbrx %0, 0, %1":"=r" (val):"r"(addr)); @@ -150,7 +150,7 @@ in32le(void *addr) static inline void out16le(void *addr, u16 val) { -#ifdef __i386 +#if CONFIG_ARCH_X86 || CONFIG_ARCH_ARMV7 *((u16*) addr) = cpu_to_le16(val); #else asm volatile ("sthbrx %0, 0, %1"::"r" (val), "r"(addr)); @@ -161,7 +161,7 @@ static inline u16 in16le(void *addr) { u16 val; -#ifdef __i386 +#if CONFIG_ARCH_X86 || CONFIG_ARCH_ARMV7 val = cpu_to_le16(*((u16*) addr)); #else asm volatile ("lhbrx %0, 0, %1":"=r" (val):"r"(addr)); |