diff options
author | Simon Glass <sjg@chromium.org> | 2019-12-07 07:42:15 +0300 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2019-12-15 06:44:16 +0300 |
commit | 592434139bf943cbc6c80f1467221904a3c917ec (patch) | |
tree | bfcb163273623264e2bef33e7ac549aacd66763a /arch/x86/lib | |
parent | 26047f602983dadf833546f8d40b24c7b9beaca3 (diff) | |
download | u-boot-592434139bf943cbc6c80f1467221904a3c917ec.tar.xz |
x86: Allow interrupt to happen once
At present the interrupt table is included in all phases of U-Boot. Allow
it to be omitted, e.g. in TPL, to reduce size.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/lib')
-rw-r--r-- | arch/x86/lib/pirq_routing.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/lib/pirq_routing.c b/arch/x86/lib/pirq_routing.c index e5f0e61424..17bd2fcb9b 100644 --- a/arch/x86/lib/pirq_routing.c +++ b/arch/x86/lib/pirq_routing.c @@ -10,6 +10,8 @@ #include <asm/pci.h> #include <asm/pirq_routing.h> +DECLARE_GLOBAL_DATA_PTR; + static u8 pirq_get_next_free_irq(struct udevice *dev, u8 *pirq, u16 bitmap, bool irq_already_routed[]) { @@ -131,3 +133,11 @@ u32 copy_pirq_routing_table(u32 addr, struct irq_routing_table *rt) return addr + rt->size; } + +ulong write_pirq_routing_table(ulong addr) +{ + if (!gd->arch.pirq_routing_table) + return addr; + + return copy_pirq_routing_table(addr, gd->arch.pirq_routing_table); +} |