Commit 935871e4 authored by Randy Vinson's avatar Randy Vinson Committed by Matt Porter

PPC32: Explicitly control store-gathering on MPC10x host bridges.

This change alters the behavior of the "MCP10x Store Gathering
Enable" option.  Previously, selecting this option would enable
store gathering, while not selecting the option would leave the
firmware-provided state. In short, there was no way to disable
store gathering if the firmware had left it enabled. This caused
problems with the Adaptec 2940U2W when run in 8240 and 8245
Sandpoint systems. The new code will disable store gathering unless
the user requests it.
parent ad2a676c
......@@ -243,6 +243,8 @@ mpc10x_bridge_init(struct pci_controller *hose,
#ifdef CONFIG_MPC10X_STORE_GATHERING
mpc10x_enable_store_gathering(hose);
#else
mpc10x_disable_store_gathering(hose);
#endif
if (ppc_md.progress) ppc_md.progress("mpc10x:exit", 0x100);
......@@ -376,3 +378,25 @@ mpc10x_enable_store_gathering(struct pci_controller *hose)
return 0;
}
int __init
mpc10x_disable_store_gathering(struct pci_controller *hose)
{
uint picr1;
early_read_config_dword(hose,
0,
PCI_DEVFN(0,0),
MPC10X_CFG_PICR1_REG,
&picr1);
picr1 &= ~MPC10X_CFG_PICR1_ST_GATH_EN;
early_write_config_dword(hose,
0,
PCI_DEVFN(0,0),
MPC10X_CFG_PICR1_REG,
picr1);
return 0;
}
......@@ -164,5 +164,6 @@ int mpc10x_bridge_init(struct pci_controller *hose,
uint phys_eumb_base);
unsigned long mpc10x_get_mem_size(uint mem_map);
int mpc10x_enable_store_gathering(struct pci_controller *hose);
int mpc10x_disable_store_gathering(struct pci_controller *hose);
#endif /* __PPC_KERNEL_MPC10X_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment