diff options
author | Reinoud Zandijk <reinoud@NetBSD.org> | 2021-02-24 17:44:42 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-04-20 07:31:12 -0400 |
commit | 0a527fda7821c133ff34132b50e29e2b707db3f0 (patch) | |
tree | ae11525516541be71466e06d800c11ee9486a7b1 /include | |
parent | 57c675d699d524985f625bc0d4e72a55a97ebe8e (diff) | |
download | u-boot-0a527fda7821c133ff34132b50e29e2b707db3f0.tar.gz u-boot-0a527fda7821c133ff34132b50e29e2b707db3f0.tar.xz u-boot-0a527fda7821c133ff34132b50e29e2b707db3f0.zip |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/ata.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ata.h b/include/ata.h index 3d870c973f..32ad5f6427 100644 --- a/include/ata.h +++ b/include/ata.h @@ -134,7 +134,7 @@ typedef struct hd_driveid { unsigned short cur_capacity1; /* (2 words, misaligned int) */ unsigned char multsect; /* current multiple sector count */ unsigned char multsect_valid; /* when (bit0==1) multsect is ok */ - unsigned int lba_capacity; /* total number of sectors */ + unsigned short lba_capacity[2];/* two words containing total number of sectors */ unsigned short dma_1word; /* single-word dma info */ unsigned short dma_mword; /* multiple-word dma info */ unsigned short eide_pio_modes; /* bits 0:mode3 1:mode4 */ |