Skip to content

Commit 74e32d1

Browse files
lostdistanceSamuel Ortiz
authored andcommitted
mfd: Fix ASIC3 SD Host Controller Configuration size
The size of the TC6380AF SD Host Controller Configuration area is 0x200 bytes (assuming registers are aligned on 32-bit boundaries), not 0x400 bytes. Source: Toshiba TC6380AF Specification sections 4.2 and 4.3.1 Signed-off-by: Paul Parsons <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
1 parent d910774 commit 74e32d1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

drivers/mfd/asic3.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,8 @@ static int __init asic3_mfd_probe(struct platform_device *pdev,
856856

857857
/* MMC */
858858
asic->tmio_cnf = ioremap((ASIC3_SD_CONFIG_BASE >> asic->bus_shift) +
859-
mem_sdio->start, 0x400 >> asic->bus_shift);
859+
mem_sdio->start,
860+
ASIC3_SD_CONFIG_SIZE >> asic->bus_shift);
860861
if (!asic->tmio_cnf) {
861862
ret = -ENOMEM;
862863
dev_dbg(asic->dev, "Couldn't ioremap SD_CONFIG\n");

include/linux/mfd/asic3.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ struct asic3_platform_data {
297297
*
298298
*****************************************************************************/
299299
#define ASIC3_SD_CONFIG_BASE 0x0400 /* Assumes 32 bit addressing */
300+
#define ASIC3_SD_CONFIG_SIZE 0x0200 /* Assumes 32 bit addressing */
300301
#define ASIC3_SD_CTRL_BASE 0x1000
301302
#define ASIC3_SDIO_CTRL_BASE 0x1200
302303

0 commit comments

Comments
 (0)