aboutsummaryrefslogtreecommitdiff
path: root/arch/sandbox
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-08-07 07:24:11 -0600
committerSimon Glass <sjg@chromium.org>2021-09-25 09:46:15 -0600
commit3e57ad907caa55bab8ba52ef87ddbc5130aede2c (patch)
treee06d04c0dbb964ec388ca885aa4544da2398963d /arch/sandbox
parentf521be6083db98e8e17b5b05626bfa6a0d5acf9b (diff)
downloadu-boot-3e57ad907caa55bab8ba52ef87ddbc5130aede2c.zip
u-boot-3e57ad907caa55bab8ba52ef87ddbc5130aede2c.tar.gz
u-boot-3e57ad907caa55bab8ba52ef87ddbc5130aede2c.tar.bz2
irq: Tidy up of-platdata irq support
This function is available but not exported. More generally it does not really work as intended. Reimplement it and add a sandbox test too. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox')
-rw-r--r--arch/sandbox/dts/sandbox.dtsi13
-rw-r--r--arch/sandbox/include/asm/irq.h20
2 files changed, 33 insertions, 0 deletions
diff --git a/arch/sandbox/dts/sandbox.dtsi b/arch/sandbox/dts/sandbox.dtsi
index 6cf5f14..1fc9c9b 100644
--- a/arch/sandbox/dts/sandbox.dtsi
+++ b/arch/sandbox/dts/sandbox.dtsi
@@ -124,6 +124,19 @@
#sound-dai-cells = <1>;
};
+ irq_sandbox: irq-sbox {
+ u-boot,dm-spl;
+ compatible = "sandbox,irq";
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ };
+
+ irq-test {
+ u-boot,dm-spl;
+ compatible = "sandbox,irq-test";
+ interrupts-extended = <&irq_sandbox 3 0>;
+ };
+
lcd {
u-boot,dm-pre-proper;
compatible = "sandbox,lcd-sdl";
diff --git a/arch/sandbox/include/asm/irq.h b/arch/sandbox/include/asm/irq.h
new file mode 100644
index 0000000..f73fec7
--- /dev/null
+++ b/arch/sandbox/include/asm/irq.h
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright 2021 Google LLC
+ */
+
+#ifndef __SANDBOX_IRQ_H
+#define __SANDBOX_IRQ_H
+
+/**
+ * struct sandbox_irq_priv - private data for this driver
+ *
+ * @count: Counts the number calls to the read_and_clear() method
+ * @pending: true if an interrupt is pending, else false
+ */
+struct sandbox_irq_priv {
+ int count;
+ bool pending;
+};
+
+#endif /* __SANDBOX_IRQ_H */