Patchwork fix UDMA settings in SB700

login
register
about
Submitter Rudolf Marek
Date 2010-10-06 22:39:12
Message ID <4CACFA90.7010801@assembler.cz>
Download mbox | patch
Permalink /patch/2060/
State New
Headers show

Comments

Rudolf Marek - 2010-10-06 22:39:12
Hello,

Following patch enables UDMA on ALL IDE devices. The current code enables it 
only for primary master, which causes my DVD drive to fail under windows install
and even after hard reset in linux (DMA seems lockup).

The fix should not have any influence for Linux because the IDE driver will
correctly reprogram this bit.

This brings some attention to IDE code, to what PIO/(U)DMA  should we setup? Is 
there a sane way to assume that all IDE devices are capable of PIO0 and UDMA0?

Maybe Seabios should do some basic setup because it can talk to discs...

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>

Thanks,
Rudolf
Uwe Hermann - 2010-10-10 19:06:59
On Thu, Oct 07, 2010 at 12:39:12AM +0200, Rudolf Marek wrote:
> Hello,
> 
> Following patch enables UDMA on ALL IDE devices. The current code
> enables it only for primary master, which causes my DVD drive to
> fail under windows install
> and even after hard reset in linux (DMA seems lockup).
> 
> The fix should not have any influence for Linux because the IDE driver will
> correctly reprogram this bit.
> 
> This brings some attention to IDE code, to what PIO/(U)DMA  should
> we setup? Is there a sane way to assume that all IDE devices are
> capable of PIO0 and UDMA0?
> 
> Maybe Seabios should do some basic setup because it can talk to discs...
> 
> Signed-off-by: Rudolf Marek <r.marek@assembler.cz>

Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


Uwe.
Patrick Georgi - 2010-10-10 19:14:29
Am 10.10.2010 21:06, schrieb Uwe Hermann:
>> 
>> This brings some attention to IDE code, to what PIO/(U)DMA  should
>> we setup? Is there a sane way to assume that all IDE devices are
>> capable of PIO0 and UDMA0?
>> 
>> Maybe Seabios should do some basic setup because it can talk to discs...
There's some chipset specific code necessary on i945 (which doesn't do
it completely correct at this time yet), so coreboot would be the right
place, not seabios.

This involves a couple of ATA roundtrips, but well, that's life. The ATA
code probably belongs in src/lib, for the benefit of all chipsets,
should they want to fully evaluate the ATA configuration.


Patrick

Patch

Index: sb700_ide.c
===================================================================
--- sb700_ide.c	(revision 5917)
+++ sb700_ide.c	(working copy)
@@ -39,10 +39,9 @@ 
 	dword &= ~(1 << 16);
 	pci_write_config32(dev, 0x70, dword);
 
-	/* Ultra DMA mode */
-	/* enable UDMA */
+	/* Enable UDMA on all devices, it will become UDMA0 (default PIO is PIO0) */
 	byte = pci_read_config8(dev, 0x54);
-	byte |= 1 << 0;
+	byte |= 0xf;
 	pci_write_config8(dev, 0x54, byte);
 
 	/* Enable I/O Access&& Bus Master */