Lines Matching refs:dw_params
139 static dw_mmc_params_t dw_params; variable
145 mmio_write_32(dw_params.reg_base + DWMMC_CMD, in dw_update_clk()
149 data = mmio_read_32(dw_params.reg_base + DWMMC_CMD); in dw_update_clk()
152 data = mmio_read_32(dw_params.reg_base + DWMMC_RINTSTS); in dw_update_clk()
165 if ((dw_params.clk_rate / (2 * div)) <= clk) { in dw_set_clk()
173 data = mmio_read_32(dw_params.reg_base + DWMMC_STATUS); in dw_set_clk()
177 mmio_write_32(dw_params.reg_base + DWMMC_CLKENA, 0); in dw_set_clk()
180 mmio_write_32(dw_params.reg_base + DWMMC_CLKDIV, div); in dw_set_clk()
184 mmio_write_32(dw_params.reg_base + DWMMC_CLKENA, 1); in dw_set_clk()
185 mmio_write_32(dw_params.reg_base + DWMMC_CLKSRC, 0); in dw_set_clk()
194 assert((dw_params.reg_base & MMC_BLOCK_MASK) == 0); in dw_init()
196 base = dw_params.reg_base; in dw_init()
234 base = dw_params.reg_base; in dw_send_cmd()
247 if (dw_params.mmc_dev_type == MMC_IS_EMMC) in dw_send_cmd()
326 mmio_write_32(dw_params.reg_base + DWMMC_CTYPE, CTYPE_1BIT); in dw_set_ios()
329 mmio_write_32(dw_params.reg_base + DWMMC_CTYPE, CTYPE_4BIT); in dw_set_ios()
332 mmio_write_32(dw_params.reg_base + DWMMC_CTYPE, CTYPE_8BIT); in dw_set_ios()
349 (dw_params.desc_size > 0) && in dw_prepare()
350 ((dw_params.reg_base & MMC_BLOCK_MASK) == 0) && in dw_prepare()
351 ((dw_params.desc_base & MMC_BLOCK_MASK) == 0) && in dw_prepare()
352 ((dw_params.desc_size & MMC_BLOCK_MASK) == 0)); in dw_prepare()
358 assert(desc_cnt * sizeof(struct dw_idmac_desc) < dw_params.desc_size); in dw_prepare()
360 base = dw_params.reg_base; in dw_prepare()
361 desc = (struct dw_idmac_desc *)dw_params.desc_base; in dw_prepare()
374 desc[i].des3 = dw_params.desc_base + in dw_prepare()
388 mmio_write_32(base + DWMMC_DBADDR, dw_params.desc_base); in dw_prepare()
389 flush_dcache_range(dw_params.desc_base, in dw_prepare()
402 data = mmio_read_32(dw_params.reg_base + DWMMC_RINTSTS); in dw_read()
428 memcpy(&dw_params, params, sizeof(dw_mmc_params_t)); in dw_mmc_init()
429 dw_params.mmc_dev_type = info->mmc_dev_type; in dw_mmc_init()