diff options
author | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2014-06-25 10:39:58 +0200 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2014-06-25 10:39:58 +0200 |
commit | ed1d98d801dfb6384d0f2fff45ce1ebf884944ca (patch) | |
tree | 5a9487c67b75606d3a723b7acb9eda8da200c871 /arch/sandbox/include/asm | |
parent | 754466ac95e92ebf40e25c6af6f13ab9b4d7c87b (diff) | |
parent | ba9b42c81b0734d53edfbb1fe4a6ded7de78c5ab (diff) | |
download | talos-obmc-uboot-ed1d98d801dfb6384d0f2fff45ce1ebf884944ca.tar.gz talos-obmc-uboot-ed1d98d801dfb6384d0f2fff45ce1ebf884944ca.zip |
Merge branch 'u-boot/master' into 'u-boot-arm/master'
Diffstat (limited to 'arch/sandbox/include/asm')
-rw-r--r-- | arch/sandbox/include/asm/bitops.h | 5 | ||||
-rw-r--r-- | arch/sandbox/include/asm/gpio.h | 8 | ||||
-rw-r--r-- | arch/sandbox/include/asm/io.h | 10 | ||||
-rw-r--r-- | arch/sandbox/include/asm/system.h | 5 |
4 files changed, 18 insertions, 10 deletions
diff --git a/arch/sandbox/include/asm/bitops.h b/arch/sandbox/include/asm/bitops.h index 74219c56a7..e807c4ef34 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 95b59da6b4..8317db1ad3 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 7956041171..895fcb872f 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/system.h b/arch/sandbox/include/asm/system.h index 066acc53fd..02beed35a7 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) |