Skip to content
Snippets Groups Projects
Commit f82a7840 authored by Bin Meng's avatar Bin Meng Committed by Simon Glass
Browse files

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.

Signed-off-by: default avatarBin Meng <bmeng.cn@gmail.com>
Acked-by: default avatarSimon Glass <sjg@chromium.org>
parent 283a08e5
No related branches found
No related tags found
No related merge requests found
...@@ -72,6 +72,15 @@ static void quark_setup_bars(void) ...@@ -72,6 +72,15 @@ static void quark_setup_bars(void)
CONFIG_PCIE_ECAM_BASE | MEM_BAR_EN); 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) int arch_cpu_init(void)
{ {
struct pci_controller *hose; struct pci_controller *hose;
...@@ -96,6 +105,9 @@ int arch_cpu_init(void) ...@@ -96,6 +105,9 @@ int arch_cpu_init(void)
*/ */
quark_setup_bars(); quark_setup_bars();
/* Turn on legacy segments (A/B/E/F) decode to system RAM */
quark_enable_legacy_seg();
unprotect_spi_flash(); unprotect_spi_flash();
return 0; return 0;
......
...@@ -21,6 +21,13 @@ ...@@ -21,6 +21,13 @@
/* Port 0x03: Host Bridge Message Port Registers */ /* 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 */ /* Host Memory I/O Boundary */
#define HM_BOUND 0x08 #define HM_BOUND 0x08
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment