snprintf(name, sizeof(name), "clkin%d", i);
host->mux_parent[i] = devm_clk_get(host->dev, name);
if (IS_ERR(host->mux_parent[i])) {
- ret = PTR_ERR(host->mux_parent[i]);
if (PTR_ERR(host->mux_parent[i]) != -EPROBE_DEFER)
dev_err(host->dev, "Missing clock %s\n", name);
host->mux_parent[i] = NULL;
+ ret = PTR_ERR(host->mux_parent[i]);
return ret;
}
host->mux_parent_rate[i] = clk_get_rate(host->mux_parent[i]);
struct mmc_data *data = NULL;
u8 direction = 0, data_rw = 0, block_mode, data_num = 0;
u32 data_size, data_len, ret = 0;
- u32 desc_cnt = 0;
u32 bl_len;
struct sd_emmc_desc_info *desc_cur = NULL;
struct cmd_cfg *des_cmd_cur = NULL;
desc_cur = desc;
des_cmd_cur = (struct cmd_cfg *)&(desc_cur->cmd_info);
- if (desc_cnt != 0) { /* for first desc, */
- des_cmd_cur->no_resp = 1;
- des_cmd_cur->no_cmd = 1;
- }
des_cmd_cur->data_io = 1;
des_cmd_cur->owner = 1;
des_cmd_cur->timeout = 0xc;
host->xfer_step = XFER_IRQ_TASKLET_BUSY;
else
host->xfer_step = XFER_IRQ_OCCUR;
+ } else {
+ spin_unlock_irqrestore(&host->mrq_lock, flags);
+ return IRQ_NONE;
}
-
/* ack all (enabled) interrupts */
writel(0x7fff, host->base + SD_EMMC_STATUS);
spin_unlock_irqrestore(&host->mrq_lock, flags);
if (!mrq) {
pr_err("%s: !mrq xfer_step %d\n",
- mmc_hostname(host->mmc), xfer_step);
- if (xfer_step == XFER_FINISHED ||
- xfer_step == XFER_TIMER_TIMEOUT){
- spin_unlock_irqrestore(&host->mrq_lock, flags);
- return IRQ_HANDLED;
- }
+ mmc_hostname(host->mmc), xfer_step);
+ spin_unlock_irqrestore(&host->mrq_lock, flags);
+ return IRQ_HANDLED;
/* aml_sd_emmc_print_err(host);*/
}
host = kzalloc(sizeof(struct amlsd_host), GFP_KERNEL);
if (!host)
- ret = -ENODEV;
-
+ return -ENODEV;
host->pdev = pdev;
host->dev = &pdev->dev;
dev_set_drvdata(&pdev->dev, host);
of_device_get_match_data(&pdev->dev);
if (!host->data) {
ret = -EINVAL;
+ pr_err("%s() fail!\n", __func__);
goto fail_init_host;
}
if (host->data->chip_type >= MMC_CHIP_TXLX)
pr_info("timestamp are not same %d:%d\n",
info->stamp[0], info->stamp[1]);
dtb->timestamp = 1 +
- stamp_after(info->stamp[1], info->stamp[0]) ?
- info->stamp[1]:info->stamp[0];
+ (stamp_after(info->stamp[1], info->stamp[0]) ?
+ info->stamp[1]:info->stamp[0]);
} else
dtb->timestamp = 1 + info->stamp[0];
}
memset(buf, 0x0, len);
start_blk = MMC_DTB_PART_OFFSET;
- if (start_blk < 0) {
- ret = -EINVAL;
- return ret;
- }
pgcnt = PAGE_ALIGN(CONFIG_DTB_SIZE) >> PAGE_SHIFT;
pr_info("[%s] %s: partition exceeds device capacity:\n",
__func__, disk->disk_name);
- pr_info("\%20s offset 0x%012llx, size 0x%012llx\n",
+ pr_info("%20s offset 0x%012llx, size 0x%012llx\n",
pp->name, offset<<9, size<<9);
break;
if (ret == 0) /* ok */
ret = emmc_key_init(card);
-
+ if (ret) {
+ kfree(pt_fmt);
+ goto out;
+ }
amlmmc_dtb_init(card);
aml_store_class = class_create(THIS_MODULE, "aml_store");