diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2015-11-17 14:54:11 -0500 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2016-01-15 10:49:03 +0100 |
commit | fe8d98613c134ac62b38a82b3f9504605ec52910 (patch) | |
tree | 7c52f8ef3940cf1767ad10f40d0e4495cadb7c4a | |
parent | 0240428c77498363f7e9fe648522ea54e032774b (diff) | |
download | seabios-hppa-fe8d98613c134ac62b38a82b3f9504605ec52910.zip seabios-hppa-fe8d98613c134ac62b38a82b3f9504605ec52910.tar.gz seabios-hppa-fe8d98613c134ac62b38a82b3f9504605ec52910.tar.bz2 |
sdcard: fix typo causing 32bit write to 16bit block_size field
The block_size field is 16bits and only 16bit writes should be used
with it.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
(cherry picked from commit 8f7dc5ab820beac980f0d40f3934a5ae04771349)
-rw-r--r-- | src/hw/sdcard.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hw/sdcard.c b/src/hw/sdcard.c index 0617d24..e01e1bb 100644 --- a/src/hw/sdcard.c +++ b/src/hw/sdcard.c @@ -224,7 +224,7 @@ sdcard_pio_transfer(struct sddrive_s *drive, int cmd, u32 addr , void *data, int count) { // Send command - writel(&drive->regs->block_size, DISK_SECTOR_SIZE); + writew(&drive->regs->block_size, DISK_SECTOR_SIZE); writew(&drive->regs->block_count, count); int isread = cmd != SC_WRITE_SINGLE && cmd != SC_WRITE_MULTIPLE; u16 tmode = ((count > 1 ? ST_MULTIPLE|ST_AUTO_CMD12|ST_BLOCKCOUNT : 0) |