sata_mv: increate the IORDY timeout for the soc controllers
PATCH 1/1 sata_mv: increate the IORDY timeout for the soc controllers
From: Saeed Bishara <[email protected]>
The old value (in clock cycles) is not suitable for soc devices that have internal clock more that 150MHz.
drivers/ata/sata_mv.c +1 -1
@@ -3330,7 +3330,7 @@ static void mv_soc_reset_hc_port(struct mv_host_priv *hpriv,ZERO (0x024 );/* respq outp */ ZERO (0x020 );/* respq inp */ ZERO (0x02c );/* test control */ -writel (0xbc , port_mmio +EDMA_IORDY_TMOUT ); +writel (0x800 , port_mmio +EDMA_IORDY_TMOUT ); }#undef ZERO
Signature · 2 lines
Martin Michlmayr http://www.cyrius.com/
Quoted 13 lines · Martin Michlmayr
From: Saeed Bishara <[email protected]>
The old value (in clock cycles) is not suitable for soc devices that have internal clock more that 150MHz.
Signed-off-by Saeed Bishara <[email protected]>Signed-off-by Martin Michlmayr <[email protected]>drivers/ata/sata_mv.c +0
-0
drivers/ata/sata_mv.c static void mv_soc_reset_hc_port(struct mv_host_priv *hpriv, · line 3336
Quoted 8 lines
drivers/ata/sata_mv.c +1
-1@@ -3330,7 +3330,7 @@ static void mv_soc_reset_hc_port(struct mv_host_priv *hpriv,ZERO (0x024 );/* respq outp */ ZERO (0x020 );/* respq inp */ ZERO (0x02c );/* test control */ -writel (0xbc , port_mmio +EDMA_IORDY_TMOUT ); +writel (0x800 , port_mmio +EDMA_IORDY_TMOUT ); }#undef ZERO
..
I want to see somebody actually test/verify that this works with PIO/MWDMA2 devices (eg. CF cards) first.
Test results?
Quoted 9 lines · Mark Lord
Quoted 2 lines · Martin Michlmayr
From: Saeed Bishara <[email protected]>
I want to see somebody actually test/verify that this works with PIO/MWDMA2 devices (eg. CF cards) first.
Test results?
PIO mode is always used, at least for the identify command. the patch works and needed for the Kirkwood SoC which runs at 200KHz.
saeed
Quoted 10 lines · saeed bishara
Quoted 7 lines · Mark Lord
Quoted 1 line · Martin Michlmayr
From: Saeed Bishara <[email protected]>
I want to see somebody actually test/verify that this works with PIO/MWDMA2 devices (eg. CF cards) first.
Test results?
PIO mode is always used, at least for the identify command. the patch works and needed for the Kirkwood SoC which runs at 200KHz.
..
Errr.. IDENTIFY is often a "special case" command, and rarely, if ever, uses IORDY.
How about some other result?
The past couple of patches from you before these *broke* the driver, which is why I'd like to see this and future patches verified first.
Thanks.
Quoted 8 lines
Quoted 3 lines
PIO mode is always used, at least for the identify command. the patch works and needed for the Kirkwood SoC which runs at 200KHz.
..
Errr.. IDENTIFY is often a "special case" command, and rarely, if ever, uses IORDY.
I think you misunderstand the EDMA IORDY timer, The EDMA IORDY register defines the timeout when doing PIO data transfers and the data is not ready, for example, when doing PIO read, the CPU will access the data register to fetch the data from internal fifo, in case that fifo is emptied for too long time (the data stopped to come), the HW will release the CPU to prevent hanging the system.
saeed
Quoted 7 lines · saeed bishara
Quoted 6 lines
Quoted 2 lines
PIO mode is always used, at least for the identify command. the patch works and needed for the Kirkwood SoC which runs at 200KHz.
..
Errr.. IDENTIFY is often a "special case" command, and rarely, if ever, uses IORDY.
I think you misunderstand the EDMA IORDY timer
..
Actually, I've been quite familiar with IORDY since 1992 or so. It generally is only asserted when the drive is managing some form of elastic buffer between the media and the ATA interface.
In the case of IDENTIFY, many drives will not need to access the media (though some do), and as a result IORDY won't be used to stretch the access cycles.
A far better test for your IORDY patch would be to actually use PIO read/write commands to verify that it works correctly.
Cheers