summaryrefslogtreecommitdiff
path: root/arch/sandbox
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sandbox')
-rw-r--r--arch/sandbox/cpu/cache.c8
-rw-r--r--arch/sandbox/dts/other.dts31
-rw-r--r--arch/sandbox/dts/test.dts16
3 files changed, 48 insertions, 7 deletions
diff --git a/arch/sandbox/cpu/cache.c b/arch/sandbox/cpu/cache.c
index c8a5e64214b..96b3da47e8e 100644
--- a/arch/sandbox/cpu/cache.c
+++ b/arch/sandbox/cpu/cache.c
@@ -4,12 +4,18 @@
*/
#include <cpu_func.h>
+#include <mapmem.h>
#include <asm/state.h>
void flush_cache(unsigned long addr, unsigned long size)
{
+ void *ptr;
+
+ ptr = map_sysmem(addr, size);
+
/* Clang uses (char *) parameters, GCC (void *) */
- __builtin___clear_cache((void *)addr, (void *)(addr + size));
+ __builtin___clear_cache(map_sysmem(addr, size), ptr + size);
+ unmap_sysmem(ptr);
}
void invalidate_icache_all(void)
diff --git a/arch/sandbox/dts/other.dts b/arch/sandbox/dts/other.dts
index 395a7923228..515d6348b3f 100644
--- a/arch/sandbox/dts/other.dts
+++ b/arch/sandbox/dts/other.dts
@@ -8,13 +8,15 @@
/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
+
/ {
compatible = "sandbox-other";
#address-cells = <1>;
#size-cells = <1>;
node {
- target = <&target 3 4>;
+ other-phandle = <&target>;
subnode {
compatible = "sandbox-other2";
@@ -25,9 +27,34 @@
};
};
+ other-a-test {
+ other-test-gpios = <&other_gpio_a 1>, <&other_gpio_a 4>,
+ <&other_gpio_b 5 GPIO_ACTIVE_HIGH 3 2 1>,
+ <0>, <&other_gpio_a 12>;
+ other-phandle-value = <&other_gpio_c 10>, <0xFFFFFFFF 20>, <&other_gpio_a 30>;
+ other-phandle-nodes = <&other_phandle_node_1>, <&other_phandle_node_2>;
+ };
+
+ other_gpio_a: other-gpio-a {
+ #gpio-cells = <1>;
+ };
+
+ other_gpio_b: other-gpio-b {
+ #gpio-cells = <5>;
+ };
+
+ other_gpio_c: other-gpio-c {
+ #gpio-cells = <2>;
+ };
+
+ other_phandle_node_1: other-phandle-node-1 {
+ };
+
+ other_phandle_node_2: other-phandle-node-2 {
+ };
+
target: target {
compatible = "sandbox-other2";
- #gpio-cells = <2>;
str-prop = "other";
reg = <0x8000 0x100>;
status = "disabled";
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index 36cfbf213e4..ae52b375ccb 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -102,11 +102,12 @@
bootscr-ram-offset = /bits/ 64 <0x12345678>;
bootscr-flash-offset = /bits/ 64 <0>;
bootscr-flash-size = /bits/ 64 <0x2000>;
- boot-led = "sandbox:green";
- activity-led = "sandbox:red";
+ boot-led = <&sandbox_led_green>;
+ activity-led = <&sandbox_led_red>;
testing-bool;
testing-int = <123>;
testing-str = "testing";
+ testing-phandle = <&phandle_node_1>;
};
};
@@ -297,6 +298,12 @@
compatible = "sandbox,dsi-host";
};
+ phandle_node_1: phandle-node-1 {
+ };
+
+ phandle_node_2: phandle-node-2 {
+ };
+
a-test {
reg = <0 1>;
compatible = "denx,u-boot-fdt-test";
@@ -335,6 +342,7 @@
interrupts-extended = <&irq 3 0>;
acpi,name = "GHIJ";
phandle-value = <&gpio_c 10>, <0xFFFFFFFF 20>, <&gpio_a 30>;
+ phandle-nodes = <&phandle_node_1>, <&phandle_node_2>;
mux-controls = <&muxcontroller0 0>, <&muxcontroller0 1>,
<&muxcontroller0 2>, <&muxcontroller0 3>,
@@ -981,12 +989,12 @@
leds {
compatible = "gpio-leds";
- iracibble {
+ sandbox_led_red: iracibble {
gpios = <&gpio_a 1 0>;
label = "sandbox:red";
};
- martinet {
+ sandbox_led_green: martinet {
gpios = <&gpio_a 2 0>;
label = "sandbox:green";
};