diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2015-05-25 22:35:06 +0800 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-06-04 02:39:39 -0600 |
commit | 05b98ec3468547057666dd685b2a1615298c24cc (patch) | |
tree | f6b4914a6cc6423e573dbf059ce8b8ae057f1659 /arch/x86/cpu/quark | |
parent | 5910955f3cf685c1ca4e4abd1546fc59da55239a (diff) | |
download | u-boot-imx-05b98ec3468547057666dd685b2a1615298c24cc.zip u-boot-imx-05b98ec3468547057666dd685b2a1615298c24cc.tar.gz u-boot-imx-05b98ec3468547057666dd685b2a1615298c24cc.tar.bz2 |
x86: quark: Implement PIRQ routing
Intel Quark SoC has the same interrupt routing mechanism as the
Queensbay platform, only the difference is that PCI devices'
INTA/B/C/D are harcoded and cannot be changed freely.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/cpu/quark')
-rw-r--r-- | arch/x86/cpu/quark/quark.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/x86/cpu/quark/quark.c b/arch/x86/cpu/quark/quark.c index e78a271..20cc09e 100644 --- a/arch/x86/cpu/quark/quark.c +++ b/arch/x86/cpu/quark/quark.c @@ -9,6 +9,7 @@ #include <netdev.h> #include <phy.h> #include <asm/io.h> +#include <asm/irq.h> #include <asm/pci.h> #include <asm/post.h> #include <asm/processor.h> @@ -147,3 +148,33 @@ int cpu_eth_init(bd_t *bis) else return 0; } + +void cpu_irq_init(void) +{ + struct quark_rcba *rcba; + u32 base; + + base = x86_pci_read_config32(QUARK_LEGACY_BRIDGE, LB_RCBA); + base &= ~MEM_BAR_EN; + rcba = (struct quark_rcba *)base; + + /* + * Route Quark PCI device interrupt pin to PIRQ + * + * Route device#23's INTA/B/C/D to PIRQA/B/C/D + * Route device#20,21's INTA/B/C/D to PIRQE/F/G/H + */ + writew(PIRQC, &rcba->rmu_ir); + writew(PIRQA | (PIRQB << 4) | (PIRQC << 8) | (PIRQD << 12), + &rcba->d23_ir); + writew(PIRQD, &rcba->core_ir); + writew(PIRQE | (PIRQF << 4) | (PIRQG << 8) | (PIRQH << 12), + &rcba->d20d21_ir); +} + +int arch_misc_init(void) +{ + pirq_init(); + + return 0; +} |