summaryrefslogtreecommitdiff
path: root/arch/sandbox
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sandbox')
-rw-r--r--arch/sandbox/cpu/os.c9
-rw-r--r--arch/sandbox/dts/sandbox.dts24
-rw-r--r--arch/sandbox/dts/sandbox.dtsi2
-rw-r--r--arch/sandbox/dts/sandbox64.dts25
-rw-r--r--arch/sandbox/dts/test.dts15
5 files changed, 65 insertions, 10 deletions
diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c
index f7c73e3a0b..e7ec892bdf 100644
--- a/arch/sandbox/cpu/os.c
+++ b/arch/sandbox/cpu/os.c
@@ -8,6 +8,7 @@
#include <fcntl.h>
#include <getopt.h>
#include <setjmp.h>
+#include <signal.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
@@ -175,6 +176,13 @@ void os_fd_restore(void)
}
}
+static void os_sigint_handler(int sig)
+{
+ os_fd_restore();
+ signal(SIGINT, SIG_DFL);
+ raise(SIGINT);
+}
+
/* Put tty into raw mode so <tab> and <ctrl+c> work */
void os_tty_raw(int fd, bool allow_sigs)
{
@@ -205,6 +213,7 @@ void os_tty_raw(int fd, bool allow_sigs)
term_setup = true;
atexit(os_fd_restore);
+ signal(SIGINT, os_sigint_handler);
}
void *os_malloc(size_t length)
diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts
index 4dd82f6a32..20f6893829 100644
--- a/arch/sandbox/dts/sandbox.dts
+++ b/arch/sandbox/dts/sandbox.dts
@@ -10,7 +10,7 @@
aliases {
i2c0 = &i2c_0;
- pci0 = &pci;
+ pci0 = &pcic;
rtc0 = &rtc_0;
axi0 = &axi;
spi0 = &spi;
@@ -20,6 +20,25 @@
reg = <0 CONFIG_SYS_SDRAM_SIZE>;
};
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ reservation_test0 {
+ size = <0x4000>;
+ alignment = <0x2000>;
+ };
+
+ reservation_test1: restest@a000 {
+ reg = <0x00d0a000 0x2000>;
+ };
+
+ reservation_test2: restest@7000 {
+ reg = <0x00d07000 0x1000>;
+ };
+ };
+
cros_ec: cros-ec {
reg = <0 0>;
u-boot,dm-pre-reloc;
@@ -52,9 +71,10 @@
pinctrl-0 = <&pinctrl_i2c0>;
};
- pci: pci-controller {
+ pcic: pci@0 {
compatible = "sandbox,pci";
device_type = "pci";
+ bus-range = <0x00 0xff>;
#address-cells = <3>;
#size-cells = <2>;
ranges = <0x02000000 0 0x10000000 0x10000000 0 0x2000
diff --git a/arch/sandbox/dts/sandbox.dtsi b/arch/sandbox/dts/sandbox.dtsi
index 7cd56c14f2..e1f68cd552 100644
--- a/arch/sandbox/dts/sandbox.dtsi
+++ b/arch/sandbox/dts/sandbox.dtsi
@@ -100,7 +100,7 @@
};
};
- pci-controller {
+ pci@0 {
pci@1e,0 {
compatible = "sandbox,pmc";
reg = <0xf000 0 0 0 0>;
diff --git a/arch/sandbox/dts/sandbox64.dts b/arch/sandbox/dts/sandbox64.dts
index 5c95cee9d7..a39f94feec 100644
--- a/arch/sandbox/dts/sandbox64.dts
+++ b/arch/sandbox/dts/sandbox64.dts
@@ -10,7 +10,7 @@
aliases {
i2c0 = &i2c_0;
- pci0 = &pci;
+ pci0 = &pcic;
rtc0 = &rtc_0;
axi0 = &axi;
spi0 = &spi;
@@ -20,6 +20,26 @@
reg = /bits/ 64 <0 CONFIG_SYS_SDRAM_SIZE>;
};
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ reservation_test_size {
+ size = <0 0x4000>;
+ alignment = <0 0x2000>;
+ };
+
+ reservation_test@a000 {
+ reg = <0 0x00d0a000 0 0x2000>;
+ };
+
+ reservation_test@7000 {
+ reg = <0 0x00d07000 0 0x1000>;
+ };
+ };
+
+ /* ... */
cros_ec: cros-ec {
reg = <0 0 0 0>;
u-boot,dm-pre-reloc;
@@ -47,9 +67,10 @@
pinctrl-0 = <&pinctrl_i2c0>;
};
- pci: pci-controller {
+ pcic: pci@0 {
compatible = "sandbox,pci";
device_type = "pci";
+ bus-range = <0x00 0xff>;
#address-cells = <3>;
#size-cells = <2>;
ranges = <0x02000000 0 0x10000000 0 0x10000000 0 0x2000
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index 4a277934a7..2f336b47c3 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -19,8 +19,8 @@
pci0 = &pci0;
pci1 = &pci1;
pci2 = &pci2;
- remoteproc1 = &rproc_1;
- remoteproc2 = &rproc_2;
+ remoteproc0 = &rproc_1;
+ remoteproc1 = &rproc_2;
rtc0 = &rtc_0;
rtc1 = &rtc_1;
spi0 = "/spi@0";
@@ -93,6 +93,8 @@
<&gpio_b 9 0xc 3 2 1>;
int-value = <1234>;
uint-value = <(-1234)>;
+ int64-value = /bits/ 64 <0x1111222233334444>;
+ int-array = <5678 9123 4567>;
interrupts-extended = <&irq 3 0>;
};
@@ -463,9 +465,10 @@
compatible = "sandbox,pch";
};
- pci0: pci-controller0 {
+ pci0: pci@0 {
compatible = "sandbox,pci";
device_type = "pci";
+ bus-range = <0x00 0xff>;
#address-cells = <3>;
#size-cells = <2>;
ranges = <0x02000000 0 0x10000000 0x10000000 0 0x2000000
@@ -531,9 +534,10 @@
};
};
- pci1: pci-controller1 {
+ pci1: pci@1 {
compatible = "sandbox,pci";
device_type = "pci";
+ bus-range = <0x00 0xff>;
#address-cells = <3>;
#size-cells = <2>;
ranges = <0x02000000 0 0x30000000 0x30000000 0 0x2000
@@ -546,9 +550,10 @@
};
};
- pci2: pci-controller2 {
+ pci2: pci@2 {
compatible = "sandbox,pci";
device_type = "pci";
+ bus-range = <0x00 0xff>;
#address-cells = <3>;
#size-cells = <2>;
ranges = <0x02000000 0 0x50000000 0x50000000 0 0x2000