diff options
author | Rosen Penev <rosenp@gmail.com> | 2019-07-02 00:14:01 -0700 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2019-12-14 15:29:21 +0000 |
commit | 34d07f00b2990bec4a2ce12852acd42c08ddf217 (patch) | |
tree | 17ca5823749ac67144dc8e50c3f4c9b2f982522a | |
parent | 4139438943010c7aec6549d8b18865da5b70e978 (diff) | |
download | flashrom-34d07f00b2990bec4a2ce12852acd42c08ddf217.tar.gz flashrom-34d07f00b2990bec4a2ce12852acd42c08ddf217.tar.bz2 flashrom-34d07f00b2990bec4a2ce12852acd42c08ddf217.zip |
flashrom: Add support for ARC platform
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Change-Id: I88cbe74b716d5fab16133fbf2ce9c35b74c25f32
Reviewed-on: https://review.coreboot.org/c/flashrom/+/35831
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | hwaccess.h | 4 | ||||
-rw-r--r-- | platform.h | 12 |
3 files changed, 16 insertions, 2 deletions
@@ -466,7 +466,7 @@ endif # Disable all drivers needing raw access (memory, PCI, port I/O) on # architectures with unknown raw access properties. # Right now those architectures are alpha hppa m68k sh s390 -ifneq ($(ARCH),$(filter $(ARCH),x86 mips ppc arm sparc)) +ifneq ($(ARCH),$(filter $(ARCH),x86 mips ppc arm sparc arc)) ifeq ($(CONFIG_RAYER_SPI), yes) UNSUPPORTED_FEATURES += CONFIG_RAYER_SPI=yes else @@ -291,6 +291,10 @@ int libpayload_wrmsr(int addr, msr_t msr); /* Non memory mapped I/O is not supported on ARM. */ +#elif IS_ARC + +/* Non memory mapped I/O is not supported on ARC. */ + #else #error Unknown architecture, please check if it supports PCI port IO. @@ -74,9 +74,12 @@ #elif defined(__s390__) || defined(__s390x__) || defined(__zarch__) #define __FLASHROM_ARCH__ "s390" #define IS_S390 1 +#elif defined(__arc__) + #define __FLASHROM_ARCH__ "arc" + #define IS_ARC 1 #endif -#if !(IS_X86 || IS_MIPS || IS_PPC || IS_ARM || IS_SPARC || IS_ALPHA || IS_HPPA || IS_M68K || IS_RISCV || IS_SH || IS_S390) +#if !(IS_X86 || IS_MIPS || IS_PPC || IS_ARM || IS_SPARC || IS_ALPHA || IS_HPPA || IS_M68K || IS_RISCV || IS_SH || IS_S390 || IS_ARC) #error Unknown architecture #endif @@ -123,6 +126,13 @@ /* SPARC is big endian in general (but allows to access data in little endian too). */ #define __FLASHROM_BIG_ENDIAN__ 1 +#elif IS_ARC +#if defined(__BIG_ENDIAN__) +#define __FLASHROM_BIG_ENDIAN__ 1 +#else +#define __FLASHROM_LITTLE_ENDIAN__ 1 +#endif + #endif /* IS_? */ #if !defined (__FLASHROM_BIG_ENDIAN__) && !defined (__FLASHROM_LITTLE_ENDIAN__) |