[MIPS] Alchemy: SMBus resource fix
authorSergei Shtylyov <sshtylyov@ru.mvista.com>
Sat, 5 Apr 2008 18:16:21 +0000 (22:16 +0400)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 12 May 2008 15:46:50 +0000 (16:46 +0100)
The Alchemy platform code registers the SMBus device using the virtual
address of its registers instead of the physical one -- fix this, taking
into account that actually the whole megabyte is decoded by any of the
programmable serial controllers (one of which is SMBus), and that all the
Alchemy peripherals are directly mappable into KSEG1 kernel space and
therefore ioremap() call would just boil down to CKSEG1ADDR() invocation.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/au1000/common/platform.c
drivers/i2c/busses/i2c-au1550.c

index 31d2a2270878832354a02e4cd7f6b4b6eaf03516..dbefa9ef63b5bc2e27ffd1d1e3b7417544d38a4b 100644 (file)
@@ -269,8 +269,8 @@ static struct platform_device au1x00_pcmcia_device = {
 #ifdef SMBUS_PSC_BASE
 static struct resource pbdb_smbus_resources[] = {
        {
-               .start  = SMBUS_PSC_BASE,
-               .end    = SMBUS_PSC_BASE + 0x24 - 1,
+               .start  = CPHYSADDR(SMBUS_PSC_BASE),
+               .end    = CPHYSADDR(SMBUS_PSC_BASE + 0xfffff),
                .flags  = IORESOURCE_MEM,
        },
 };
index 491718fe46b78a00ac959885fe00745cb682c18a..cae9dc89d88cc0737379cf38f1ce55116f1abbac 100644 (file)
@@ -335,7 +335,7 @@ i2c_au1550_probe(struct platform_device *pdev)
                goto out_mem;
        }
 
-       priv->psc_base = r->start;
+       priv->psc_base = CKSEG1ADDR(r->start);
        priv->xfer_timeout = 200;
        priv->ack_timeout = 200;