diff options
Diffstat (limited to 'arch/sandbox')
-rw-r--r-- | arch/sandbox/config.mk | 2 | ||||
-rw-r--r-- | arch/sandbox/cpu/sdl.c | 2 | ||||
-rw-r--r-- | arch/sandbox/dts/sandbox.dts | 10 | ||||
-rw-r--r-- | arch/sandbox/dts/sandbox64.dts | 6 | ||||
-rw-r--r-- | arch/sandbox/dts/test.dts | 6 | ||||
-rw-r--r-- | arch/sandbox/include/asm/io.h | 12 |
6 files changed, 27 insertions, 11 deletions
diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk index 7226b7be42..31a12db103 100644 --- a/arch/sandbox/config.mk +++ b/arch/sandbox/config.mk @@ -11,11 +11,9 @@ PLATFORM_LIBS += -lrt ifneq ($(NO_SDL),) PLATFORM_CPPFLAGS += -DSANDBOX_NO_SDL else -ifdef CONFIG_SANDBOX_SDL PLATFORM_LIBS += $(shell sdl-config --libs) PLATFORM_CPPFLAGS += $(shell sdl-config --cflags) endif -endif cmd_u-boot__ = $(CC) -o $@ -Wl,-T u-boot.lds $(u-boot-init) \ -Wl,--start-group $(u-boot-main) -Wl,--end-group \ diff --git a/arch/sandbox/cpu/sdl.c b/arch/sandbox/cpu/sdl.c index f668f5379a..080c7c8d74 100644 --- a/arch/sandbox/cpu/sdl.c +++ b/arch/sandbox/cpu/sdl.c @@ -6,7 +6,7 @@ #include <errno.h> #include <unistd.h> #include <linux/input.h> -#include <SDL/SDL.h> +#include <SDL.h> #include <asm/state.h> /** diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts index ae3189ec8c..a41b5f052d 100644 --- a/arch/sandbox/dts/sandbox.dts +++ b/arch/sandbox/dts/sandbox.dts @@ -100,11 +100,13 @@ eeprom@2c { reg = <0x2c>; compatible = "i2c-eeprom"; + sandbox,emul = <&emul_eeprom>; }; rtc_0: rtc@43 { reg = <0x43>; compatible = "sandbox-rtc"; + sandbox,emul = <&emul0>; }; sandbox_pmic: sandbox_pmic { reg = <0x40>; @@ -115,18 +117,14 @@ }; i2c_emul: emul { - #address-cells = <1>; - #size-cells = <0>; reg = <0xff>; compatible = "sandbox,i2c-emul-parent"; - emul-eeprom { - reg = <0x2c>; + emul_eeprom: emul-eeprom { compatible = "sandbox,i2c-eeprom"; sandbox,filename = "i2c.bin"; sandbox,size = <256>; }; - emul0 { - reg = <0x43>; + emul0: emul0 { compatible = "sandbox,i2c-rtc"; }; }; diff --git a/arch/sandbox/dts/sandbox64.dts b/arch/sandbox/dts/sandbox64.dts index d30fd62a2a..a3c95f2cdb 100644 --- a/arch/sandbox/dts/sandbox64.dts +++ b/arch/sandbox/dts/sandbox64.dts @@ -90,11 +90,13 @@ eeprom@2c { reg = <0x2c>; compatible = "i2c-eeprom"; + sandbox,emul = <&emul_eeprom>; }; rtc_0: rtc@43 { reg = <0x43>; compatible = "sandbox-rtc"; + sandbox,emul = <&emul0>; }; sandbox_pmic: sandbox_pmic { reg = <0x40>; @@ -107,12 +109,12 @@ i2c_emul: emul { reg = <0xff>; compatible = "sandbox,i2c-emul-parent"; - emul-eeprom { + emul_eeprom: emul-eeprom { compatible = "sandbox,i2c-eeprom"; sandbox,filename = "i2c.bin"; sandbox,size = <256>; }; - emul0 { + emul0: emul0 { compatible = "sandbox,i2c-rtc"; }; }; diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index 3790b4c520..1d011ded7c 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -315,6 +315,12 @@ }; }; + bootcount@0 { + compatible = "u-boot,bootcount-rtc"; + rtc = <&rtc_1>; + offset = <0x13>; + }; + adc@0 { compatible = "sandbox,adc"; vdd-supply = <&buck2>; diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h index 81b7750628..2a350a826c 100644 --- a/arch/sandbox/include/asm/io.h +++ b/arch/sandbox/include/asm/io.h @@ -173,6 +173,18 @@ static inline void _outsw(volatile u16 *port, const void *buf, int ns) { } +static inline void memset_io(volatile void *addr, unsigned char val, int count) +{ +} + +static inline void memcpy_fromio(void *dst, const volatile void *src, int count) +{ +} + +static inline void memcpy_toio(volatile void *dst, const void *src, int count) +{ +} + #define insw(port, buf, ns) _insw((u16 *)port, buf, ns) #define outsw(port, buf, ns) _outsw((u16 *)port, buf, ns) |