x86: quark: Turn on legacy segments decode
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/3 x86: quark: Turn on legacy segments decode
By default the legacy segments (A0000h-B0000h, E0000h-F0000h) do not decode to system RAM. Turn on the decode so that we can write configuration tables in the F segment.
---
arch/x86/cpu/quark/quark.c | 12 ++++++++++++ arch/x86/include/asm/arch-quark/quark.h | 7 +++++++ 2 files changed, 19 insertions(+)
arch/x86/cpu/quark/quark.c +12 -0
@@ -72,6 +72,15 @@ static void quark_setup_bars(void) CONFIG_PCIE_ECAM_BASE | MEM_BAR_EN); } +static void quark_enable_legacy_seg (void ) +{ +u32 hmisc2; + + hmisc2 =msg_port_read (MSG_PORT_HOST_BRIDGE ,HMISC2 ); + hmisc2 |= (HMISC2_SEGE |HMISC2_SEGF |HMISC2_SEGAB ); +msg_port_write (MSG_PORT_HOST_BRIDGE ,HMISC2 , hmisc2); +} +int arch_cpu_init (void ) {struct pci_controller *hose;
@@ -96,6 +105,9 @@ int arch_cpu_init(void)*/ quark_setup_bars (); +/* Turn on legacy segments (A/B/E/F) decode to system RAM */ +quark_enable_legacy_seg (); +unprotect_spi_flash ();return 0 ;
arch/x86/include/asm/arch-quark/quark.h +7 -0
@@ -21,6 +21,13 @@/* Port 0x03: Host Bridge Message Port Registers */ +/* Host Miscellaneous Controls 2 */ +#define HMISC2 0x03 + +#define HMISC2_SEGE 0x00000002 +#define HMISC2_SEGF 0x00000004 +#define HMISC2_SEGAB 0x00000010 +/* Host Memory I/O Boundary */ #define HM_BOUND 0x08
Signature · 1 line
1.8.2.1
PATCH 2/3 x86: quark: Turn on legacy segments decode
Quoted 10 lines · Bin Meng
By default the legacy segments (A0000h-B0000h, E0000h-F0000h) do not decode to system RAM. Turn on the decode so that we can write configuration tables in the F segment.
Signed-off-by Bin Meng <[email protected]>---
arch/x86/cpu/quark/quark.c | 12 ++++++++++++ arch/x86/include/asm/arch-quark/quark.h | 7 +++++++ 2 files changed, 19 insertions(+)
PATCH 2/3 x86: quark: Turn on legacy segments decode
Quoted 5 lines · Simon Glass
Quoted 4 lines · Bin Meng
By default the legacy segments (A0000h-B0000h, E0000h-F0000h) do not decode to system RAM. Turn on the decode so that we can write configuration tables in the F segment.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Bin Meng <[email protected]>---
arch/x86/cpu/quark/quark.c | 12 ++++++++++++ arch/x86/include/asm/arch-quark/quark.h | 7 +++++++ 2 files changed, 19 insertions(+)Acked-by Simon Glass <[email protected]>
Applied to u-boot-x86, thanks!
PATCH 3/3 x86: quark: Implement PIRQ routing
In reply to a message not in the archiveIntel 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.
---
arch/x86/cpu/quark/Makefile | 2 +- arch/x86/cpu/quark/irq.c | 173 +++++++++++++++++++++++++++++++ arch/x86/cpu/quark/quark.c | 8 ++ arch/x86/include/asm/arch-quark/device.h | 70 ++++++++++--- arch/x86/include/asm/arch-quark/irq.h | 55 ++++++++++ arch/x86/include/asm/arch-quark/quark.h | 15 +++ configs/galileo_defconfig | 1 + include/configs/galileo.h | 1 + 8 files changed, 309 insertions(+), 16 deletions(-) create mode 100644 arch/x86/cpu/quark/irq.c create mode 100644 arch/x86/include/asm/arch-quark/irq.h
arch/x86/cpu/quark/Makefile +1 -1
@@ -4,6 +4,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-y += car.o dram.o msg_port.o quark.o +obj-y += car.o dram.o irq.o msg_port.o quark.o obj-y += mrc.o mrc_util.o hte.o smc.o obj-$(CONFIG_PCI) += pci.o
arch/x86/cpu/quark/irq.c new file +173 -0
173 lines not on this page · raw message
arch/x86/cpu/quark/quark.c +8 -0
@@ -13,6 +13,7 @@#include <asm/post.h> #include <asm/processor.h> #include <asm/arch/device.h> +#include <asm/arch/irq.h> #include <asm/arch/msg_port.h> #include <asm/arch/quark.h>
@@ -147,3 +148,10 @@ int cpu_eth_init(bd_t *bis)else return 0 ; } + +int arch_misc_init (void ) +{ +pirq_init (); + +return 0 ; +}
arch/x86/include/asm/arch-quark/device.h +55 -15
75 lines not on this page · raw message
arch/x86/include/asm/arch-quark/irq.h new file +55 -0
55 lines not on this page · raw message
arch/x86/include/asm/arch-quark/quark.h +15 -0
@@ -76,4 +76,19 @@#define LB_BC 0xd8#define LB_RCBA 0xf0 +#ifndef __ASSEMBLY__ + +/* Root Complex Register Block */ +struct quark_rcba { +u32 rctl; +u32 esd; +u32 rsvd1[3150 ]; +u16 rmu_ir; +u16 d23_ir; +u16 core_ir; +u16 d20d21_ir; +}; + +#endif /* __ASSEMBLY__ */ +#endif /* _QUARK_H_ */
configs/galileo_defconfig +1 -0
@@ -7,3 +7,4 @@ CONFIG_DEFAULT_DEVICE_TREE="galileo" CONFIG_ETH_DESIGNWARE=y CONFIG_NETDEVICES=y CONFIG_NET=y +CONFIG_GENERATE_PIRQ_TABLE=y
include/configs/galileo.h +1 -0
@@ -15,6 +15,7 @@#define CONFIG_SYS_MONITOR_LEN (1 << 20)#define CONFIG_BOARD_EARLY_INIT_F +#define CONFIG_ARCH_MISC_INIT #define CONFIG_NR_DRAM_BANKS 1
Signature · 1 line
1.8.2.1
PATCH 3/3 x86: quark: Implement PIRQ routing
Hi Bin,
Quoted 8 lines · Bin Meng
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 <[email protected]>---
Quoted 11 lines
arch/x86/cpu/quark/Makefile | 2 +- arch/x86/cpu/quark/irq.c | 173 +++++++++++++++++++++++++++++++ arch/x86/cpu/quark/quark.c | 8 ++ arch/x86/include/asm/arch-quark/device.h | 70 ++++++++++--- arch/x86/include/asm/arch-quark/irq.h | 55 ++++++++++ arch/x86/include/asm/arch-quark/quark.h | 15 +++ configs/galileo_defconfig | 1 + include/configs/galileo.h | 1 + 8 files changed, 309 insertions(+), 16 deletions(-) create mode 100644 arch/x86/cpu/quark/irq.c create mode 100644 arch/x86/include/asm/arch-quark/irq.h
Before going too far down this path I'd like to see if we can put the IRQ data in the device tree. What do you think?
Regards,
Simon
PATCH 3/3 x86: quark: Implement PIRQ routing
Hi Simon,
Quoted 23 lines · Simon Glass
Hi Bin,
Quoted 8 lines · Bin Meng
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 <[email protected]>---
Quoted 11 lines
arch/x86/cpu/quark/Makefile | 2 +- arch/x86/cpu/quark/irq.c | 173 +++++++++++++++++++++++++++++++ arch/x86/cpu/quark/quark.c | 8 ++ arch/x86/include/asm/arch-quark/device.h | 70 ++++++++++--- arch/x86/include/asm/arch-quark/irq.h | 55 ++++++++++ arch/x86/include/asm/arch-quark/quark.h | 15 +++ configs/galileo_defconfig | 1 + include/configs/galileo.h | 1 + 8 files changed, 309 insertions(+), 16 deletions(-) create mode 100644 arch/x86/cpu/quark/irq.c create mode 100644 arch/x86/include/asm/arch-quark/irq.h
Quoted 3 lines
Before going too far down this path I'd like to see if we can put the IRQ data in the device tree. What do you think?
Device tree might work, and we might come up with a standard intel irq router driver to configure this based on device tree input. But I will need study more chipset datasheet to do that.
Regards,
Bin
PATCH 3/3 x86: quark: Implement PIRQ routing
Hi Bin,
Quoted 27 lines · Bin Meng
Hi Simon,
Quoted 23 lines · Simon Glass
Hi Bin,
Quoted 19 lines · Bin Meng
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 <[email protected]>---
arch/x86/cpu/quark/Makefile | 2 +- arch/x86/cpu/quark/irq.c | 173 +++++++++++++++++++++++++++++++ arch/x86/cpu/quark/quark.c | 8 ++ arch/x86/include/asm/arch-quark/device.h | 70 ++++++++++--- arch/x86/include/asm/arch-quark/irq.h | 55 ++++++++++ arch/x86/include/asm/arch-quark/quark.h | 15 +++ configs/galileo_defconfig | 1 + include/configs/galileo.h | 1 + 8 files changed, 309 insertions(+), 16 deletions(-) create mode 100644 arch/x86/cpu/quark/irq.c create mode 100644 arch/x86/include/asm/arch-quark/irq.h
Quoted 7 lines
Quoted 3 lines
Before going too far down this path I'd like to see if we can put the IRQ data in the device tree. What do you think?
Device tree might work, and we might come up with a standard intel irq router driver to configure this based on device tree input. But I will need study more chipset datasheet to do that.
OK let's wait for that. It does seem like a job for device tree. Even if we can get a binding that works for modern chips that would be a win. Let me know what you find.
Regards,
Simon
PATCH 3/3 x86: quark: Implement PIRQ routing
Hi Simon,
Quoted 34 lines · Simon Glass
Hi Bin,
Quoted 31 lines · Bin Meng
Hi Simon,
Quoted 26 lines · Simon Glass
Hi Bin,
Quoted 8 lines · Bin Meng
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 <[email protected]>---
Quoted 11 lines
arch/x86/cpu/quark/Makefile | 2 +- arch/x86/cpu/quark/irq.c | 173 +++++++++++++++++++++++++++++++ arch/x86/cpu/quark/quark.c | 8 ++ arch/x86/include/asm/arch-quark/device.h | 70 ++++++++++--- arch/x86/include/asm/arch-quark/irq.h | 55 ++++++++++ arch/x86/include/asm/arch-quark/quark.h | 15 +++ configs/galileo_defconfig | 1 + include/configs/galileo.h | 1 + 8 files changed, 309 insertions(+), 16 deletions(-) create mode 100644 arch/x86/cpu/quark/irq.c create mode 100644 arch/x86/include/asm/arch-quark/irq.hBefore going too far down this path I'd like to see if we can put the IRQ data in the device tree. What do you think?
Quoted 8 lines
Quoted 3 lines
Device tree might work, and we might come up with a standard intel irq router driver to configure this based on device tree input. But I will need study more chipset datasheet to do that.
OK let's wait for that. It does seem like a job for device tree. Even if we can get a binding that works for modern chips that would be a win. Let me know what you find.
I've refactored current PIRQ support using device tree on queensbay. Next is on quark and qemu. A patch will be sent out soon.
Regards,
Bin