lkml.org 
[lkml]   [2009]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [PATCH 2/5] mmc: tmio_mmc: add bus_shift support
From
On Mon, May 25, 2009 at 9:27 PM, Philipp Zabel <philipp.zabel@gmail.com> wrote:
> Some ASIC3 devices in the wild are connected with the address bus shifted
> by one line, so that its 16-bit registers appear 32-bit aligned in host
> memory space.

This patch has to be amended:

diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
index 245de05..8223977 100644
--- a/drivers/mmc/host/tmio_mmc.c
+++ b/drivers/mmc/host/tmio_mmc.c
@@ -495,7 +495,8 @@ static int tmio_mmc_resume(struct platform_device *dev)

/* Enable the MMC/SD Control registers */
sd_config_write16(host, CNF_CMD, SDCREN);
- sd_config_write32(host, CNF_CTL_BASE, dev->resource[0].start & 0xfffe);
+ sd_config_write32(host, CNF_CTL_BASE,
+ (dev->resource[0].start >> host->bus_shift) & 0xfffe);

/* Tell the MFD core we are ready to be enabled */
if (cell->enable) {
@@ -566,7 +567,8 @@ static int __devinit tmio_mmc_probe(struct
platform_device *dev)

/* Enable the MMC/SD Control registers */
sd_config_write16(host, CNF_CMD, SDCREN);
- sd_config_write32(host, CNF_CTL_BASE, dev->resource[0].start & 0xfffe);
+ sd_config_write32(host, CNF_CTL_BASE,
+ (dev->resource[0].start >> host->bus_shift) & 0xfffe);

/* Tell the MFD core we are ready to be enabled */
if (cell->enable) {
The resources have to be shifted back when configuring the SD control
register space.

regards
Philipp


\
 
 \ /
  Last update: 2009-05-26 22:19    [from the cache]
©2003-2011 Jasper Spaans