Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3471
-gerrit
commit 8eec290f7beb6b0150855e8316ab5cd856ba2d4b
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Sat Jun 15 12:29:23 2013 +0300
bd82x6x: Fix early EHCI BAR programming
Change EHCI #2 to different BAR from EHCI #1.
Even if the ECHI controllers are not to be addressed, it is bad idea
to set two different devices to claim the same PCI memory cycles.
Change-Id: Ib6f7cfac5acf3f8170508547d1584af90273e8c1
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/southbridge/intel/bd82x6x/early_usb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/southbridge/intel/bd82x6x/early_usb.c b/src/southbridge/intel/bd82x6x/early_usb.c
index f4e526d..baf8c4f 100644
--- a/src/southbridge/intel/bd82x6x/early_usb.c
+++ b/src/southbridge/intel/bd82x6x/early_usb.c
@@ -49,9 +49,9 @@ void enable_usb_bar(void)
cmd |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
pci_write_config32(usb0, PCI_COMMAND, cmd);
- /* USB Controller 1 */
+ /* USB Controller 2 */
pci_write_config32(usb1, PCI_BASE_ADDRESS_0,
- PCH_EHCI1_TEMP_BAR0);
+ PCH_EHCI2_TEMP_BAR0);
cmd = pci_read_config32(usb1, PCI_COMMAND);
cmd |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
pci_write_config32(usb1, PCI_COMMAND, cmd);
Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3472
-gerrit
commit 16172a53014b1566a109033b26a03cfec399bdb6
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Sat Jun 15 12:30:13 2013 +0300
lynxpoint: Fix early EHCI BAR programming
LynxPoint LP has only EHCI controller #1.
Change EHCI #2 to different BAR from EHCI #1.
Even if the ECHI controllers are not to be addressed, it is bad idea
to set two different devices to claim the same PCI memory cycles.
Change-Id: I95c59fb9d5f09afd152872e9bc0418dc67e4aeb2
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/southbridge/intel/lynxpoint/early_usb.c | 26 +++++++++++---------------
1 file changed, 11 insertions(+), 15 deletions(-)
diff --git a/src/southbridge/intel/lynxpoint/early_usb.c b/src/southbridge/intel/lynxpoint/early_usb.c
index ebd5c2c..d71467e 100644
--- a/src/southbridge/intel/lynxpoint/early_usb.c
+++ b/src/southbridge/intel/lynxpoint/early_usb.c
@@ -34,23 +34,19 @@
* The BAR will be re-assigned during device
* enumeration so these are only temporary.
*/
-void enable_usb_bar(void)
+static void enable_usb_bar_on_device(device_t dev, u32 bar)
{
- device_t usb0 = PCH_EHCI1_DEV;
- device_t usb1 = PCH_EHCI2_DEV;
u32 cmd;
-
- /* USB Controller 1 */
- pci_write_config32(usb0, PCI_BASE_ADDRESS_0,
- PCH_EHCI1_TEMP_BAR0);
- cmd = pci_read_config32(usb0, PCI_COMMAND);
+ pci_write_config32(dev, PCI_BASE_ADDRESS_0, bar);
+ cmd = pci_read_config32(dev, PCI_COMMAND);
cmd |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
- pci_write_config32(usb0, PCI_COMMAND, cmd);
+ pci_write_config32(dev, PCI_COMMAND, cmd);
+}
- /* USB Controller 1 */
- pci_write_config32(usb1, PCI_BASE_ADDRESS_0,
- PCH_EHCI1_TEMP_BAR0);
- cmd = pci_read_config32(usb1, PCI_COMMAND);
- cmd |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
- pci_write_config32(usb1, PCI_COMMAND, cmd);
+void enable_usb_bar(void)
+{
+ enable_usb_bar_on_device(PCH_EHCI1_DEV, PCH_EHCI1_TEMP_BAR0);
+#if !CONFIG_INTEL_LYNXPOINT_LP
+ enable_usb_bar_on_device(PCH_EHCI2_DEV, PCH_EHCI2_TEMP_BAR0);
+#endif
}
Nico Huber (nico.huber(a)secunet.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3391
-gerrit
commit 2544f76f71f28b274768a5e385cd940230bb822b
Author: Nico Huber <nico.huber(a)secunet.com>
Date: Tue May 14 15:25:26 2013 +0200
winbond/w83627dhg: Correct resource setting for SPI (LDN6)
The SPI logical device on the W83627DHG uses the second i/o port
register pair but not the first one. So we have to also set `io1`
(the second io_info struct) and not `io0` in the pnp_info structure.
Setting the PNP_IO1 flag without a mask in `io1` caused coreboot to
hang in pnp_enable_devices() until commit aeead274 which added a
check for an unset mask.
Change-Id: I027d279b4641fecd88afb14d40fbe1c0bfbf81bb
Signed-off-by: Nico Huber <nico.huber(a)secunet.com>
---
src/superio/winbond/w83627dhg/superio.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/superio/winbond/w83627dhg/superio.c b/src/superio/winbond/w83627dhg/superio.c
index bbde26a..510a6f3 100644
--- a/src/superio/winbond/w83627dhg/superio.c
+++ b/src/superio/winbond/w83627dhg/superio.c
@@ -101,8 +101,7 @@ static struct pnp_info pnp_dev_info[] = {
{ &ops, W83627DHG_SP1, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
{ &ops, W83627DHG_SP2, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
{ &ops, W83627DHG_KBC, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_IRQ1, {0x07ff, 0}, {0x07ff, 4}, },
- /* the next line makes coreboot hang in pnp_enable_devices() */
- /* { &ops, W83627DHG_SPI, PNP_IO1, { 0x7f8, 0 }, }, */
+ { &ops, W83627DHG_SPI, PNP_IO1, {}, { 0x7f8, 0 }, },
{ &ops, W83627DHG_GPIO6, },
{ &ops, W83627DHG_WDTO_PLED, },
{ &ops, W83627DHG_GPIO2, },
Nico Huber (nico.huber(a)secunet.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3493
-gerrit
commit fe4b23b4727d41d5cacb4bb6b2af7d5ffe1cb9c2
Author: Nico Huber <nico.huber(a)secunet.com>
Date: Mon Jun 17 17:42:35 2013 +0200
libpayload: ahci: Increase timeout for signature reading
We can't read the drives signature before it's ready, i.e. spun up.
So set the timeout to the standard 30s. Also put a notice on the
console, so the user knows why the signature reading failed.
Change-Id: I2148258f9b0eb950b71544dafd95776ae70afac8
Signed-off-by: Nico Huber <nico.huber(a)secunet.com>
---
payloads/libpayload/drivers/storage/ahci.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/payloads/libpayload/drivers/storage/ahci.c b/payloads/libpayload/drivers/storage/ahci.c
index 2b33b59..ec4db4c 100644
--- a/payloads/libpayload/drivers/storage/ahci.c
+++ b/payloads/libpayload/drivers/storage/ahci.c
@@ -406,11 +406,19 @@ static int ahci_dev_init(hba_ctrl_t *const ctrl,
dev->cmdtable = cmdtable;
dev->rcvd_fis = rcvd_fis;
- /* Wait for D2H Register FIS with device' signature. */
- int timeout = 200; /* Time out after 200 * 10ms == 2s. */
+ /*
+ * Wait for D2H Register FIS with device' signature.
+ * The drive has to spin up here, so wait up to 30s.
+ */
+ const int timeout_s = 30; /* Time out after 30s. */
+ int timeout = timeout_s * 100;
while ((port->taskfile_data & HBA_PxTFD_BSY) && timeout--)
mdelay(10);
+ if (port->taskfile_data & HBA_PxTFD_BSY)
+ printf("ahci: Timed out after %d seconds "
+ "of waiting for device to spin up.\n", timeout_s);
+
/* Initialize device or fall through to clean up. */
switch (port->signature) {
case HBA_PxSIG_ATA:
Nico Huber (nico.huber(a)secunet.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3493
-gerrit
commit 2e71337345893e1b4214110a071f0fe9b2ffa10c
Author: Nico Huber <nico.huber(a)secunet.com>
Date: Mon Jun 17 17:42:35 2013 +0200
libpayload: ahci: Increase timeout for signature reading
We can't read the drives signature before it's ready, i.e. spun up.
So set the timeout to the standard 30s. Also put a notice on the
console, so the user knows why the signature reading failed.
Change-Id: I2148258f9b0eb950b71544dafd95776ae70afac8
Signed-off-by: Nico Huber <nico.huber(a)secunet.com>
---
payloads/libpayload/drivers/storage/ahci.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/payloads/libpayload/drivers/storage/ahci.c b/payloads/libpayload/drivers/storage/ahci.c
index 2b33b59..f1fe729 100644
--- a/payloads/libpayload/drivers/storage/ahci.c
+++ b/payloads/libpayload/drivers/storage/ahci.c
@@ -406,11 +406,17 @@ static int ahci_dev_init(hba_ctrl_t *const ctrl,
dev->cmdtable = cmdtable;
dev->rcvd_fis = rcvd_fis;
- /* Wait for D2H Register FIS with device' signature. */
- int timeout = 200; /* Time out after 200 * 10ms == 2s. */
+ /*
+ * Wait for D2H Register FIS with device' signature.
+ * The drive has to spin up here, so wait up to 30s.
+ */
+ int timeout = 3 * 1000; /* Time out after 3,000 * 10ms == 30s. */
while ((port->taskfile_data & HBA_PxTFD_BSY) && timeout--)
mdelay(10);
+ if (port->taskfile_data & HBA_PxTFD_BSY)
+ printf("ahci: Timed out waiting for device to spin up.\n");
+
/* Initialize device or fall through to clean up. */
switch (port->signature) {
case HBA_PxSIG_ATA: