summaryrefslogtreecommitdiff
path: root/arch/sandbox
diff options
context:
space:
mode:
authorStefano Babic <sbabic@denx.de>2014-07-16 08:51:30 +0200
committerStefano Babic <sbabic@denx.de>2014-07-16 08:51:30 +0200
commitdab5e3469d294a4e1ffed8407d296a78e02cc01f (patch)
treec6378034591210b3142ca3add806d52c6ea22b3b /arch/sandbox
parent14a1613140519a8d0a88e6054c302a8cb3e067a5 (diff)
parent524123a70761110c5cf3ccc5f52f6d4da071b959 (diff)
downloadu-boot-imx-dab5e3469d294a4e1ffed8407d296a78e02cc01f.zip
u-boot-imx-dab5e3469d294a4e1ffed8407d296a78e02cc01f.tar.gz
u-boot-imx-dab5e3469d294a4e1ffed8407d296a78e02cc01f.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot
Signed-off-by: Stefano Babic <sbabic@denx.de> Conflicts: boards.cfg
Diffstat (limited to 'arch/sandbox')
-rw-r--r--arch/sandbox/cpu/os.c1
l---------arch/sandbox/dts/include/dt-bindings1
-rw-r--r--arch/sandbox/include/asm/bitops.h5
-rw-r--r--arch/sandbox/include/asm/gpio.h8
-rw-r--r--arch/sandbox/include/asm/io.h10
-rw-r--r--arch/sandbox/include/asm/sound.h (renamed from arch/sandbox/include/asm/arch-sandbox/sound.h)0
-rw-r--r--arch/sandbox/include/asm/system.h5
7 files changed, 20 insertions, 10 deletions
diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c
index 57d04a4..1c4aa3f 100644
--- a/arch/sandbox/cpu/os.c
+++ b/arch/sandbox/cpu/os.c
@@ -341,6 +341,7 @@ int os_dirent_ls(const char *dirname, struct os_dirent_node **headp)
ret = -ENOMEM;
goto done;
}
+ next->next = NULL;
strcpy(next->name, entry.d_name);
switch (entry.d_type) {
case DT_REG:
diff --git a/arch/sandbox/dts/include/dt-bindings b/arch/sandbox/dts/include/dt-bindings
new file mode 120000
index 0000000..0cecb3d
--- /dev/null
+++ b/arch/sandbox/dts/include/dt-bindings
@@ -0,0 +1 @@
+../../../../include/dt-bindings \ No newline at end of file
diff --git a/arch/sandbox/include/asm/bitops.h b/arch/sandbox/include/asm/bitops.h
index 74219c5..e807c4e 100644
--- a/arch/sandbox/include/asm/bitops.h
+++ b/arch/sandbox/include/asm/bitops.h
@@ -17,6 +17,7 @@
#ifndef __ASM_SANDBOX_BITOPS_H
#define __ASM_SANDBOX_BITOPS_H
+#include <linux/compiler.h>
#include <asm/system.h>
#ifdef __KERNEL__
@@ -53,7 +54,7 @@ static inline int __test_and_set_bit(int nr, void *addr)
static inline int test_and_set_bit(int nr, void *addr)
{
- unsigned long flags;
+ unsigned long __always_unused flags;
int out;
local_irq_save(flags);
@@ -75,7 +76,7 @@ static inline int __test_and_clear_bit(int nr, void *addr)
static inline int test_and_clear_bit(int nr, void *addr)
{
- unsigned long flags;
+ unsigned long __always_unused flags;
int out;
local_irq_save(flags);
diff --git a/arch/sandbox/include/asm/gpio.h b/arch/sandbox/include/asm/gpio.h
index 95b59da..8317db1 100644
--- a/arch/sandbox/include/asm/gpio.h
+++ b/arch/sandbox/include/asm/gpio.h
@@ -29,7 +29,7 @@
* @param gp GPIO number
* @return -1 on error, 0 if GPIO is low, >0 if high
*/
-int sandbox_gpio_get_value(struct device *dev, unsigned int offset);
+int sandbox_gpio_get_value(struct udevice *dev, unsigned int offset);
/**
* Set the simulated value of a GPIO (used only in sandbox test code)
@@ -38,7 +38,7 @@ int sandbox_gpio_get_value(struct device *dev, unsigned int offset);
* @param value value to set (0 for low, non-zero for high)
* @return -1 on error, 0 if ok
*/
-int sandbox_gpio_set_value(struct device *dev, unsigned int offset, int value);
+int sandbox_gpio_set_value(struct udevice *dev, unsigned int offset, int value);
/**
* Return the simulated direction of a GPIO (used only in sandbox test code)
@@ -46,7 +46,7 @@ int sandbox_gpio_set_value(struct device *dev, unsigned int offset, int value);
* @param gp GPIO number
* @return -1 on error, 0 if GPIO is input, >0 if output
*/
-int sandbox_gpio_get_direction(struct device *dev, unsigned int offset);
+int sandbox_gpio_get_direction(struct udevice *dev, unsigned int offset);
/**
* Set the simulated direction of a GPIO (used only in sandbox test code)
@@ -55,7 +55,7 @@ int sandbox_gpio_get_direction(struct device *dev, unsigned int offset);
* @param output 0 to set as input, 1 to set as output
* @return -1 on error, 0 if ok
*/
-int sandbox_gpio_set_direction(struct device *dev, unsigned int offset,
+int sandbox_gpio_set_direction(struct udevice *dev, unsigned int offset,
int output);
#endif
diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h
index 7956041..895fcb8 100644
--- a/arch/sandbox/include/asm/io.h
+++ b/arch/sandbox/include/asm/io.h
@@ -40,4 +40,14 @@ static inline void unmap_sysmem(const void *vaddr)
/* Map from a pointer to our RAM buffer */
phys_addr_t map_to_sysmem(const void *ptr);
+/* Define nops for sandbox I/O access */
+#define readb(addr) 0
+#define readw(addr) 0
+#define readl(addr) 0
+#define writeb(v, addr)
+#define writew(v, addr)
+#define writel(v, addr)
+
+#include <iotrace.h>
+
#endif
diff --git a/arch/sandbox/include/asm/arch-sandbox/sound.h b/arch/sandbox/include/asm/sound.h
index a32e8c8..a32e8c8 100644
--- a/arch/sandbox/include/asm/arch-sandbox/sound.h
+++ b/arch/sandbox/include/asm/sound.h
diff --git a/arch/sandbox/include/asm/system.h b/arch/sandbox/include/asm/system.h
index 066acc5..02beed3 100644
--- a/arch/sandbox/include/asm/system.h
+++ b/arch/sandbox/include/asm/system.h
@@ -8,10 +8,7 @@
#define __ASM_SANDBOX_SYSTEM_H
/* Define this as nops for sandbox architecture */
-static inline void local_irq_save(unsigned flags __attribute__((unused)))
-{
-}
-
+#define local_irq_save(x)
#define local_irq_enable()
#define local_irq_disable()
#define local_save_flags(x)