summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2008-08-26 00:25:33 +0200
committerMichael Brown2008-08-26 00:25:33 +0200
commitf58cc3fca8967b68d108e787239557a81ca852a2 (patch)
tree9b36a3b630382838a65bea3db4291b6d0a37bb40
parent[romprefix] Fix regression in UNDI loader (diff)
downloadipxe-f58cc3fca8967b68d108e787239557a81ca852a2.tar.gz
ipxe-f58cc3fca8967b68d108e787239557a81ca852a2.tar.xz
ipxe-f58cc3fca8967b68d108e787239557a81ca852a2.zip
[phantom] Temporary workaround for bug in prototype (P3 B1) silicon
-rw-r--r--src/drivers/net/phantom/phantom.c14
-rw-r--r--src/drivers/net/phantom/phantom.h1
2 files changed, 14 insertions, 1 deletions
diff --git a/src/drivers/net/phantom/phantom.c b/src/drivers/net/phantom/phantom.c
index 509a7096..8f0453cc 100644
--- a/src/drivers/net/phantom/phantom.c
+++ b/src/drivers/net/phantom/phantom.c
@@ -1711,7 +1711,8 @@ static int phantom_init_cmdpeg ( struct phantom_nic *phantom ) {
UNM_NIC_REG_DUMMY_BUF );
/* Tell the hardware that tuning is complete */
- phantom_writel ( phantom, 1, UNM_ROMUSB_GLB_PEGTUNE_DONE );
+ phantom_writel ( phantom, UNM_ROMUSB_GLB_PEGTUNE_DONE_MAGIC,
+ UNM_ROMUSB_GLB_PEGTUNE_DONE );
/* Wait for command PEG to finish initialising */
DBGC ( phantom, "Phantom %p initialising command PEG (will take up to "
@@ -1859,6 +1860,17 @@ static int phantom_probe ( struct pci_device *pci,
phantom_port->port = i;
}
+ /* BUG5945 - need to hack PCI config space on P3 B1 silicon.
+ * B2 will have this fixed; remove this hack when B1 is no
+ * longer in use.
+ */
+ {
+ uint32_t temp;
+ pci_read_config_dword ( pci, 0xc8, &temp );
+ pci_read_config_dword ( pci, 0xc8, &temp );
+ pci_write_config_dword ( pci, 0xc8, 0xf1000 );
+ }
+
/* Allocate dummy DMA buffer and perform initial hardware handshake */
phantom->dma_buf = malloc_dma ( sizeof ( *(phantom->dma_buf) ),
UNM_DMA_BUFFER_ALIGN );
diff --git a/src/drivers/net/phantom/phantom.h b/src/drivers/net/phantom/phantom.h
index 3c759989..110c1226 100644
--- a/src/drivers/net/phantom/phantom.h
+++ b/src/drivers/net/phantom/phantom.h
@@ -139,6 +139,7 @@ enum unm_reg_blocks {
#define UNM_ROMUSB_GLB_SW_RESET ( UNM_ROMUSB_GLB + 0x00008 )
#define UNM_ROMUSB_GLB_SW_RESET_MAGIC 0x0080000fUL
#define UNM_ROMUSB_GLB_PEGTUNE_DONE ( UNM_ROMUSB_GLB + 0x0005c )
+#define UNM_ROMUSB_GLB_PEGTUNE_DONE_MAGIC 0x31
#define UNM_ROMUSB_ROM ( UNM_CRB_ROMUSB + 0x10000 )
#define UNM_ROMUSB_ROM_INSTR_OPCODE ( UNM_ROMUSB_ROM + 0x00004 )