diff options
author | Tom Rini <trini@ti.com> | 2013-03-04 11:14:27 -0500 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-03-04 11:14:27 -0500 |
commit | 1c9f47ab2a2e9b62d08d39bfb9c4adc8f8edc5da (patch) | |
tree | fa4ee32d67f02d1c8fa80a55b9d85982cedac062 /arch | |
parent | c259188b203d95e4a854e7e29b9e4472cc982f65 (diff) | |
parent | 218da0f35f4b5e5bf13d3dba6d975d4d5d65516f (diff) | |
download | u-boot-imx-1c9f47ab2a2e9b62d08d39bfb9c4adc8f8edc5da.zip u-boot-imx-1c9f47ab2a2e9b62d08d39bfb9c4adc8f8edc5da.tar.gz u-boot-imx-1c9f47ab2a2e9b62d08d39bfb9c4adc8f8edc5da.tar.bz2 |
Merge branch 'mem' of git://git.denx.de/u-boot-x86
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sandbox/config.mk | 1 | ||||
-rw-r--r-- | arch/sandbox/cpu/os.c | 8 | ||||
-rw-r--r-- | arch/sandbox/cpu/start.c | 3 | ||||
-rw-r--r-- | arch/sandbox/include/asm/io.h | 10 |
4 files changed, 22 insertions, 0 deletions
diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk index 02ce4a4..4fd0d4e 100644 --- a/arch/sandbox/config.mk +++ b/arch/sandbox/config.mk @@ -18,4 +18,5 @@ # MA 02111-1307 USA PLATFORM_CPPFLAGS += -DCONFIG_SANDBOX -D__SANDBOX__ -U_FORTIFY_SOURCE +PLATFORM_CPPFLAGS += -DCONFIG_ARCH_MAP_SYSMEM PLATFORM_LIBS += -lrt diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c index 36637af..3e37c93 100644 --- a/arch/sandbox/cpu/os.c +++ b/arch/sandbox/cpu/os.c @@ -44,6 +44,14 @@ ssize_t os_read(int fd, void *buf, size_t count) return read(fd, buf, count); } +ssize_t os_read_no_block(int fd, void *buf, size_t count) +{ + const int flags = fcntl(fd, F_GETFL, 0); + + fcntl(fd, F_SETFL, flags | O_NONBLOCK); + return os_read(fd, buf, count); +} + ssize_t os_write(int fd, const void *buf, size_t count) { return write(fd, buf, count); diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c index 7603bf9..5287fd5 100644 --- a/arch/sandbox/cpu/start.c +++ b/arch/sandbox/cpu/start.c @@ -122,4 +122,7 @@ int main(int argc, char *argv[]) * never return. */ board_init_f(0); + + /* NOTREACHED - board_init_f() does not return */ + return 0; } diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h index 0392d21..d8c0236 100644 --- a/arch/sandbox/include/asm/io.h +++ b/arch/sandbox/include/asm/io.h @@ -39,3 +39,13 @@ static inline void unmap_physmem(void *vaddr, unsigned long flags) { } + +/* For sandbox, we want addresses to point into our RAM buffer */ +static inline void *map_sysmem(phys_addr_t paddr, unsigned long len) +{ + return map_physmem(paddr, len, MAP_WRBACK); +} + +static inline void unmap_sysmem(const void *vaddr) +{ +} |