Skip to content

Commit

Permalink
[phantom] Temporary workaround for bug in prototype (P3 B1) silicon
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Brown committed Aug 25, 2008
1 parent d5e07df commit f58cc3f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/drivers/net/phantom/phantom.c
Expand Up @@ -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 "
Expand Down Expand Up @@ -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 );
Expand Down
1 change: 1 addition & 0 deletions src/drivers/net/phantom/phantom.h
Expand Up @@ -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 )
Expand Down

0 comments on commit f58cc3f

Please sign in to comment.