Преглед изворни кода

[phantom] Temporary workaround for bug in prototype (P3 B1) silicon

tags/v0.9.4
Michael Brown пре 15 година
родитељ
комит
f58cc3fca8
2 измењених фајлова са 14 додато и 1 уклоњено
  1. 13
    1
      src/drivers/net/phantom/phantom.c
  2. 1
    0
      src/drivers/net/phantom/phantom.h

+ 13
- 1
src/drivers/net/phantom/phantom.c Прегледај датотеку

1711
 			 UNM_NIC_REG_DUMMY_BUF );
1711
 			 UNM_NIC_REG_DUMMY_BUF );
1712
 
1712
 
1713
 	/* Tell the hardware that tuning is complete */
1713
 	/* Tell the hardware that tuning is complete */
1714
-	phantom_writel ( phantom, 1, UNM_ROMUSB_GLB_PEGTUNE_DONE );
1714
+	phantom_writel ( phantom, UNM_ROMUSB_GLB_PEGTUNE_DONE_MAGIC,
1715
+			 UNM_ROMUSB_GLB_PEGTUNE_DONE );
1715
 
1716
 
1716
 	/* Wait for command PEG to finish initialising */
1717
 	/* Wait for command PEG to finish initialising */
1717
 	DBGC ( phantom, "Phantom %p initialising command PEG (will take up to "
1718
 	DBGC ( phantom, "Phantom %p initialising command PEG (will take up to "
1859
 		phantom_port->port = i;
1860
 		phantom_port->port = i;
1860
 	}
1861
 	}
1861
 
1862
 
1863
+	/* BUG5945 - need to hack PCI config space on P3 B1 silicon.
1864
+	 * B2 will have this fixed; remove this hack when B1 is no
1865
+	 * longer in use.
1866
+	 */
1867
+	{
1868
+		uint32_t temp;
1869
+		pci_read_config_dword ( pci, 0xc8, &temp );
1870
+		pci_read_config_dword ( pci, 0xc8, &temp );
1871
+		pci_write_config_dword ( pci, 0xc8, 0xf1000 );
1872
+	}
1873
+
1862
 	/* Allocate dummy DMA buffer and perform initial hardware handshake */
1874
 	/* Allocate dummy DMA buffer and perform initial hardware handshake */
1863
 	phantom->dma_buf = malloc_dma ( sizeof ( *(phantom->dma_buf) ),
1875
 	phantom->dma_buf = malloc_dma ( sizeof ( *(phantom->dma_buf) ),
1864
 					UNM_DMA_BUFFER_ALIGN );
1876
 					UNM_DMA_BUFFER_ALIGN );

+ 1
- 0
src/drivers/net/phantom/phantom.h Прегледај датотеку

139
 #define UNM_ROMUSB_GLB_SW_RESET		( UNM_ROMUSB_GLB + 0x00008 )
139
 #define UNM_ROMUSB_GLB_SW_RESET		( UNM_ROMUSB_GLB + 0x00008 )
140
 #define UNM_ROMUSB_GLB_SW_RESET_MAGIC		0x0080000fUL
140
 #define UNM_ROMUSB_GLB_SW_RESET_MAGIC		0x0080000fUL
141
 #define UNM_ROMUSB_GLB_PEGTUNE_DONE	( UNM_ROMUSB_GLB + 0x0005c )
141
 #define UNM_ROMUSB_GLB_PEGTUNE_DONE	( UNM_ROMUSB_GLB + 0x0005c )
142
+#define UNM_ROMUSB_GLB_PEGTUNE_DONE_MAGIC	0x31
142
 
143
 
143
 #define UNM_ROMUSB_ROM			( UNM_CRB_ROMUSB + 0x10000 )
144
 #define UNM_ROMUSB_ROM			( UNM_CRB_ROMUSB + 0x10000 )
144
 #define UNM_ROMUSB_ROM_INSTR_OPCODE	( UNM_ROMUSB_ROM + 0x00004 )
145
 #define UNM_ROMUSB_ROM_INSTR_OPCODE	( UNM_ROMUSB_ROM + 0x00004 )

Loading…
Откажи
Сачувај