Fix IDE commands issued, fix endian issues, fix non MMIO
authorReinoud Zandijk <reinoud@NetBSD.org>
Wed, 24 Feb 2021 16:44:42 +0000 (17:44 +0100)
committerTom Rini <trini@konsulko.com>
Tue, 20 Apr 2021 11:31:12 +0000 (07:31 -0400)
commit0a527fda7821c133ff34132b50e29e2b707db3f0
treeae11525516541be71466e06d800c11ee9486a7b1
parent57c675d699d524985f625bc0d4e72a55a97ebe8e
Fix IDE commands issued, fix endian issues, fix non MMIO

Fixes IDE issues found on the Malta board under Qemu:

1) DMA implied commands were sent to the controller in stead of the PIO
variants. The rest of the code is DMA free and written for PIO operation.

2) direct pointer access was used to read and write the registers instead
of the inb/inw/outb/outw functions/macros. Registers don't have to be
memory mapped and ATA_CURR_BASE() does not have to return an offset from
address zero.

3) Endian isues in ide_ident() and reading/writing data in general. Names
were corrupted and sizes misreported.

Tested malta_defconfig and maltael_defconfig to work again in Qemu.

Signed-off-by: Reinoud Zandijk <reinoud@NetBSD.org>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
drivers/block/ide.c
include/ata.h