diff options
author | Tom Rini <trini@konsulko.com> | 2019-01-15 22:05:34 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-01-15 22:05:34 -0500 |
commit | aac0c29d4b8418c5c78b552070ffeda022b16949 (patch) | |
tree | 1f539113f2121d84b6f62421a066505d753a2fdc /arch | |
parent | f4cfd73943032729c9ad6ddd054bcf2ff8205b6d (diff) | |
parent | f51f6715a5013f37620c38f0430e21d4736e235a (diff) |
Merge tag 'dm-pull-15jan19' of git://git.denx.de/u-boot-dm
Fix recent changes to serial API for driver model
Buildman clang support and a few fixes
Small fixes to 'dm tree' and regmap test
Improve sandbox build compatibility
A few other minor fixes
Diffstat (limited to 'arch')
-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/include/asm/io.h | 12 | ||||
-rw-r--r-- | arch/x86/lib/acpi_table.c | 12 |
6 files changed, 29 insertions, 15 deletions
diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk index 7226b7be428..31a12db103d 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 f668f5379a4..080c7c8d74d 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 ae3189ec8cf..a41b5f052d7 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 d30fd62a2a4..a3c95f2cdb2 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/include/asm/io.h b/arch/sandbox/include/asm/io.h index 81b77506286..2a350a826c4 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) diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c index 79bc2000bda..04058a60d75 100644 --- a/arch/x86/lib/acpi_table.c +++ b/arch/x86/lib/acpi_table.c @@ -342,6 +342,7 @@ static void acpi_create_spcr(struct acpi_spcr *spcr) struct acpi_table_header *header = &(spcr->header); struct serial_device_info serial_info = {0}; ulong serial_address, serial_offset; + struct udevice *dev; uint serial_config; uint serial_width; int access_size; @@ -353,7 +354,10 @@ static void acpi_create_spcr(struct acpi_spcr *spcr) header->length = sizeof(struct acpi_spcr); header->revision = 2; - ret = serial_getinfo(&serial_info); + /* Read the device once, here. It is reused below */ + ret = uclass_first_device_err(UCLASS_SERIAL, &dev); + if (!ret) + ret = serial_getinfo(dev, &serial_info); if (ret) serial_info.type = SERIAL_CHIP_UNKNOWN; @@ -431,9 +435,9 @@ static void acpi_create_spcr(struct acpi_spcr *spcr) break; } - ret = serial_getconfig(&serial_config); - if (ret) - serial_config = SERIAL_DEFAULT_CONFIG; + serial_config = SERIAL_DEFAULT_CONFIG; + if (dev) + ret = serial_getconfig(dev, &serial_config); spcr->parity = SERIAL_GET_PARITY(serial_config); spcr->stop_bits = SERIAL_GET_STOP(serial_config); |