mfd: Fix ASIC3 SD Host Controller Configuration size
authorPaul Parsons <lost.distance@yahoo.com>
Sun, 15 May 2011 14:13:11 +0000 (14:13 +0000)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 26 May 2011 17:45:51 +0000 (19:45 +0200)
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 <lost.distance@yahoo.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/asic3.c
include/linux/mfd/asic3.h

index 52e56ea43a8538464b082a70e3ed3c78cb155d4b..c27fd1fc3b86789a73cf725ce57a5863e5175d6f 100644 (file)
@@ -856,7 +856,8 @@ static int __init asic3_mfd_probe(struct platform_device *pdev,
 
        /* MMC */
        asic->tmio_cnf = ioremap((ASIC3_SD_CONFIG_BASE >> asic->bus_shift) +
-                                mem_sdio->start, 0x400 >> asic->bus_shift);
+                                mem_sdio->start,
+                                ASIC3_SD_CONFIG_SIZE >> asic->bus_shift);
        if (!asic->tmio_cnf) {
                ret = -ENOMEM;
                dev_dbg(asic->dev, "Couldn't ioremap SD_CONFIG\n");
index d0dd3ebd848866d470112aae886d91d6945b8c6b..ed793b77a1c5e2a77301964fc8822f18c4239e1c 100644 (file)
@@ -297,6 +297,7 @@ struct asic3_platform_data {
  *
  *****************************************************************************/
 #define ASIC3_SD_CONFIG_BASE   0x0400 /* Assumes 32 bit addressing */
+#define ASIC3_SD_CONFIG_SIZE   0x0200 /* Assumes 32 bit addressing */
 #define ASIC3_SD_CTRL_BASE     0x1000
 #define ASIC3_SDIO_CTRL_BASE   0x1200