|
@@ -2669,7 +2669,7 @@ static void dw_mci_init_dma(struct dw_mci *host)
|
|
* Check ADDR_CONFIG bit in HCON to find
|
|
* Check ADDR_CONFIG bit in HCON to find
|
|
* IDMAC address bus width
|
|
* IDMAC address bus width
|
|
*/
|
|
*/
|
|
- addr_config = (mci_readl(host, HCON) >> 27) & 0x01;
|
|
|
|
|
|
+ addr_config = SDMMC_GET_ADDR_CONFIG(mci_readl(host, HCON));
|
|
|
|
|
|
if (addr_config == 1) {
|
|
if (addr_config == 1) {
|
|
/* host supports IDMAC in 64-bit address mode */
|
|
/* host supports IDMAC in 64-bit address mode */
|
|
@@ -3046,7 +3046,7 @@ int dw_mci_probe(struct dw_mci *host)
|
|
* Get the host data width - this assumes that HCON has been set with
|
|
* Get the host data width - this assumes that HCON has been set with
|
|
* the correct values.
|
|
* the correct values.
|
|
*/
|
|
*/
|
|
- i = (mci_readl(host, HCON) >> 7) & 0x7;
|
|
|
|
|
|
+ i = SDMMC_GET_HDATA_WIDTH(mci_readl(host, HCON));
|
|
if (!i) {
|
|
if (!i) {
|
|
host->push_data = dw_mci_push_data16;
|
|
host->push_data = dw_mci_push_data16;
|
|
host->pull_data = dw_mci_pull_data16;
|
|
host->pull_data = dw_mci_pull_data16;
|
|
@@ -3128,7 +3128,7 @@ int dw_mci_probe(struct dw_mci *host)
|
|
if (host->pdata->num_slots)
|
|
if (host->pdata->num_slots)
|
|
host->num_slots = host->pdata->num_slots;
|
|
host->num_slots = host->pdata->num_slots;
|
|
else
|
|
else
|
|
- host->num_slots = ((mci_readl(host, HCON) >> 1) & 0x1F) + 1;
|
|
|
|
|
|
+ host->num_slots = SDMMC_GET_SLOT_NUM(mci_readl(host, HCON));
|
|
|
|
|
|
/*
|
|
/*
|
|
* Enable interrupts for command done, data over, data empty,
|
|
* Enable interrupts for command done, data over, data empty,
|