|
@@ -58,7 +58,6 @@ enum tmio_mmc_power {
|
|
|
|
|
|
struct tmio_mmc_host {
|
|
struct tmio_mmc_host {
|
|
void __iomem *ctl;
|
|
void __iomem *ctl;
|
|
- unsigned long bus_shift;
|
|
|
|
struct mmc_command *cmd;
|
|
struct mmc_command *cmd;
|
|
struct mmc_request *mrq;
|
|
struct mmc_request *mrq;
|
|
struct mmc_data *data;
|
|
struct mmc_data *data;
|
|
@@ -176,19 +175,19 @@ int tmio_mmc_host_runtime_resume(struct device *dev);
|
|
|
|
|
|
static inline u16 sd_ctrl_read16(struct tmio_mmc_host *host, int addr)
|
|
static inline u16 sd_ctrl_read16(struct tmio_mmc_host *host, int addr)
|
|
{
|
|
{
|
|
- return readw(host->ctl + (addr << host->bus_shift));
|
|
|
|
|
|
+ return readw(host->ctl + (addr << host->pdata->bus_shift));
|
|
}
|
|
}
|
|
|
|
|
|
static inline void sd_ctrl_read16_rep(struct tmio_mmc_host *host, int addr,
|
|
static inline void sd_ctrl_read16_rep(struct tmio_mmc_host *host, int addr,
|
|
u16 *buf, int count)
|
|
u16 *buf, int count)
|
|
{
|
|
{
|
|
- readsw(host->ctl + (addr << host->bus_shift), buf, count);
|
|
|
|
|
|
+ readsw(host->ctl + (addr << host->pdata->bus_shift), buf, count);
|
|
}
|
|
}
|
|
|
|
|
|
static inline u32 sd_ctrl_read32(struct tmio_mmc_host *host, int addr)
|
|
static inline u32 sd_ctrl_read32(struct tmio_mmc_host *host, int addr)
|
|
{
|
|
{
|
|
- return readw(host->ctl + (addr << host->bus_shift)) |
|
|
|
|
- readw(host->ctl + ((addr + 2) << host->bus_shift)) << 16;
|
|
|
|
|
|
+ return readw(host->ctl + (addr << host->pdata->bus_shift)) |
|
|
|
|
+ readw(host->ctl + ((addr + 2) << host->pdata->bus_shift)) << 16;
|
|
}
|
|
}
|
|
|
|
|
|
static inline void sd_ctrl_write16(struct tmio_mmc_host *host, int addr, u16 val)
|
|
static inline void sd_ctrl_write16(struct tmio_mmc_host *host, int addr, u16 val)
|
|
@@ -198,19 +197,19 @@ static inline void sd_ctrl_write16(struct tmio_mmc_host *host, int addr, u16 val
|
|
*/
|
|
*/
|
|
if (host->pdata->write16_hook && host->pdata->write16_hook(host, addr))
|
|
if (host->pdata->write16_hook && host->pdata->write16_hook(host, addr))
|
|
return;
|
|
return;
|
|
- writew(val, host->ctl + (addr << host->bus_shift));
|
|
|
|
|
|
+ writew(val, host->ctl + (addr << host->pdata->bus_shift));
|
|
}
|
|
}
|
|
|
|
|
|
static inline void sd_ctrl_write16_rep(struct tmio_mmc_host *host, int addr,
|
|
static inline void sd_ctrl_write16_rep(struct tmio_mmc_host *host, int addr,
|
|
u16 *buf, int count)
|
|
u16 *buf, int count)
|
|
{
|
|
{
|
|
- writesw(host->ctl + (addr << host->bus_shift), buf, count);
|
|
|
|
|
|
+ writesw(host->ctl + (addr << host->pdata->bus_shift), buf, count);
|
|
}
|
|
}
|
|
|
|
|
|
static inline void sd_ctrl_write32(struct tmio_mmc_host *host, int addr, u32 val)
|
|
static inline void sd_ctrl_write32(struct tmio_mmc_host *host, int addr, u32 val)
|
|
{
|
|
{
|
|
- writew(val, host->ctl + (addr << host->bus_shift));
|
|
|
|
- writew(val >> 16, host->ctl + ((addr + 2) << host->bus_shift));
|
|
|
|
|
|
+ writew(val, host->ctl + (addr << host->pdata->bus_shift));
|
|
|
|
+ writew(val >> 16, host->ctl + ((addr + 2) << host->pdata->bus_shift));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|