soc/intel/dnv: Don't clobber SATA_MAP while trying to set mode
SATA Mode Select is bit 16 of the SATA General Configuration register. This code currently incorrectly pokes at the Port Clock Disable bits in the Port Mapping Register, and without clock the affected ports can't link. Change-Id: I37104f520a869bd45a32cfd271d0b893aec3c8ed Signed-off-by: Stephen Douthit <stephend@silicom-usa.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34663 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Vanessa Eusebio <vanessa.f.eusebio@intel.com> Reviewed-by: David Guckian Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
54e9894353
commit
2c18ba5bd7
|
@ -23,9 +23,8 @@
|
||||||
#define PCH_SATA0_DEV PCI_DEV(0, SATA_DEV, SATA_FUNC)
|
#define PCH_SATA0_DEV PCI_DEV(0, SATA_DEV, SATA_FUNC)
|
||||||
#define PCH_SATA1_DEV PCI_DEV(0, SATA2_DEV, SATA2_FUNC)
|
#define PCH_SATA1_DEV PCI_DEV(0, SATA2_DEV, SATA2_FUNC)
|
||||||
|
|
||||||
#define SATA_MAP 0x90
|
#define SATAGC 0x9c
|
||||||
#define SATA_MAP_AHCI (0 << 6)
|
#define SATAGC_AHCI (0 << 16)
|
||||||
#define SATA_MAP_RAID (1 << 6)
|
#define SATAGC_RAID (1 << 16)
|
||||||
#define SATA_PSC 0x92
|
|
||||||
|
|
||||||
#endif //_DENVERTON_NS_SATA_H
|
#endif //_DENVERTON_NS_SATA_H
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
static void sata_init(struct device *dev)
|
static void sata_init(struct device *dev)
|
||||||
{
|
{
|
||||||
u32 reg32;
|
u32 reg32;
|
||||||
u16 reg16;
|
|
||||||
u32 abar;
|
u32 abar;
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "SATA: Initializing...\n");
|
printk(BIOS_DEBUG, "SATA: Initializing...\n");
|
||||||
|
@ -46,10 +45,9 @@ static void sata_init(struct device *dev)
|
||||||
printk(BIOS_DEBUG, "SATA: Controller in AHCI mode.\n");
|
printk(BIOS_DEBUG, "SATA: Controller in AHCI mode.\n");
|
||||||
|
|
||||||
/* Set the controller mode */
|
/* Set the controller mode */
|
||||||
reg16 = pci_read_config16(dev, SATA_MAP);
|
reg32 = pci_read_config32(dev, SATAGC);
|
||||||
reg16 &= ~(3 << 6);
|
reg32 &= ~SATAGC_AHCI;
|
||||||
reg16 |= SATA_MAP_AHCI;
|
pci_write_config32(dev, SATAGC, reg32);
|
||||||
pci_write_config16(dev, SATA_MAP, reg16);
|
|
||||||
|
|
||||||
/* Initialize AHCI memory-mapped space */
|
/* Initialize AHCI memory-mapped space */
|
||||||
abar = pci_read_config32(dev, PCI_BASE_ADDRESS_5);
|
abar = pci_read_config32(dev, PCI_BASE_ADDRESS_5);
|
||||||
|
|
Loading…
Reference in New Issue