diff options
Diffstat (limited to 'drivers/mmc/host/tmio_mmc.h')
-rw-r--r-- | drivers/mmc/host/tmio_mmc.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h index 86fd21e00099..aaa9c7e9e730 100644 --- a/drivers/mmc/host/tmio_mmc.h +++ b/drivers/mmc/host/tmio_mmc.h | |||
@@ -58,7 +58,6 @@ enum tmio_mmc_power { | |||
58 | 58 | ||
59 | struct tmio_mmc_host { | 59 | struct tmio_mmc_host { |
60 | void __iomem *ctl; | 60 | void __iomem *ctl; |
61 | unsigned long bus_shift; | ||
62 | struct mmc_command *cmd; | 61 | struct mmc_command *cmd; |
63 | struct mmc_request *mrq; | 62 | struct mmc_request *mrq; |
64 | struct mmc_data *data; | 63 | struct mmc_data *data; |
@@ -176,19 +175,19 @@ int tmio_mmc_host_runtime_resume(struct device *dev); | |||
176 | 175 | ||
177 | static inline u16 sd_ctrl_read16(struct tmio_mmc_host *host, int addr) | 176 | static inline u16 sd_ctrl_read16(struct tmio_mmc_host *host, int addr) |
178 | { | 177 | { |
179 | return readw(host->ctl + (addr << host->bus_shift)); | 178 | return readw(host->ctl + (addr << host->pdata->bus_shift)); |
180 | } | 179 | } |
181 | 180 | ||
182 | static inline void sd_ctrl_read16_rep(struct tmio_mmc_host *host, int addr, | 181 | static inline void sd_ctrl_read16_rep(struct tmio_mmc_host *host, int addr, |
183 | u16 *buf, int count) | 182 | u16 *buf, int count) |
184 | { | 183 | { |
185 | readsw(host->ctl + (addr << host->bus_shift), buf, count); | 184 | readsw(host->ctl + (addr << host->pdata->bus_shift), buf, count); |
186 | } | 185 | } |
187 | 186 | ||
188 | static inline u32 sd_ctrl_read32(struct tmio_mmc_host *host, int addr) | 187 | static inline u32 sd_ctrl_read32(struct tmio_mmc_host *host, int addr) |
189 | { | 188 | { |
190 | return readw(host->ctl + (addr << host->bus_shift)) | | 189 | return readw(host->ctl + (addr << host->pdata->bus_shift)) | |
191 | readw(host->ctl + ((addr + 2) << host->bus_shift)) << 16; | 190 | readw(host->ctl + ((addr + 2) << host->pdata->bus_shift)) << 16; |
192 | } | 191 | } |
193 | 192 | ||
194 | static inline void sd_ctrl_write16(struct tmio_mmc_host *host, int addr, u16 val) | 193 | 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 | |||
198 | */ | 197 | */ |
199 | if (host->pdata->write16_hook && host->pdata->write16_hook(host, addr)) | 198 | if (host->pdata->write16_hook && host->pdata->write16_hook(host, addr)) |
200 | return; | 199 | return; |
201 | writew(val, host->ctl + (addr << host->bus_shift)); | 200 | writew(val, host->ctl + (addr << host->pdata->bus_shift)); |
202 | } | 201 | } |
203 | 202 | ||
204 | static inline void sd_ctrl_write16_rep(struct tmio_mmc_host *host, int addr, | 203 | static inline void sd_ctrl_write16_rep(struct tmio_mmc_host *host, int addr, |
205 | u16 *buf, int count) | 204 | u16 *buf, int count) |
206 | { | 205 | { |
207 | writesw(host->ctl + (addr << host->bus_shift), buf, count); | 206 | writesw(host->ctl + (addr << host->pdata->bus_shift), buf, count); |
208 | } | 207 | } |
209 | 208 | ||
210 | static inline void sd_ctrl_write32(struct tmio_mmc_host *host, int addr, u32 val) | 209 | static inline void sd_ctrl_write32(struct tmio_mmc_host *host, int addr, u32 val) |
211 | { | 210 | { |
212 | writew(val, host->ctl + (addr << host->bus_shift)); | 211 | writew(val, host->ctl + (addr << host->pdata->bus_shift)); |
213 | writew(val >> 16, host->ctl + ((addr + 2) << host->bus_shift)); | 212 | writew(val >> 16, host->ctl + ((addr + 2) << host->pdata->bus_shift)); |
214 | } | 213 | } |
215 | 214 | ||
216 | 215 | ||