diff options
author | Simon Glass <sjg@chromium.org> | 2021-08-07 07:24:11 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-09-25 09:46:15 -0600 |
commit | 3e57ad907caa55bab8ba52ef87ddbc5130aede2c (patch) | |
tree | e06d04c0dbb964ec388ca885aa4544da2398963d /drivers/misc/irq_sandbox.c | |
parent | f521be6083db98e8e17b5b05626bfa6a0d5acf9b (diff) |
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 'drivers/misc/irq_sandbox.c')
-rw-r--r-- | drivers/misc/irq_sandbox.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/misc/irq_sandbox.c b/drivers/misc/irq_sandbox.c index 1f7e62e661..8b5573fcad 100644 --- a/drivers/misc/irq_sandbox.c +++ b/drivers/misc/irq_sandbox.c @@ -9,19 +9,9 @@ #include <dm.h> #include <irq.h> #include <acpi/acpi_device.h> +#include <asm/irq.h> #include <asm/test.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; -}; - static int sandbox_set_polarity(struct udevice *dev, uint irq, bool active_low) { if (irq > 10) @@ -103,10 +93,11 @@ static const struct udevice_id sandbox_irq_ids[] = { { } }; -U_BOOT_DRIVER(sandbox_irq_drv) = { +U_BOOT_DRIVER(sandbox_irq) = { .name = "sandbox_irq", .id = UCLASS_IRQ, .of_match = sandbox_irq_ids, .ops = &sandbox_irq_ops, .priv_auto = sizeof(struct sandbox_irq_priv), + DM_HEADER(<asm/irq.h>) }; |