From patchwork Sat Nov 12 10:36:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Hui X-Patchwork-Id: 5085 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 1944D23E0C for ; Sat, 12 Nov 2011 10:37:47 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id 0E9E6A18B0D for ; Sat, 12 Nov 2011 10:37:47 +0000 (UTC) Received: by mail-fx0-f52.google.com with SMTP id n26so6568949faa.11 for ; Sat, 12 Nov 2011 02:37:47 -0800 (PST) Received: by 10.152.134.116 with SMTP id pj20mr9044144lab.5.1321094266891; Sat, 12 Nov 2011 02:37:46 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.40.7 with SMTP id t7cs81358lak; Sat, 12 Nov 2011 02:37:46 -0800 (PST) Received: by 10.231.63.9 with SMTP id z9mr3625957ibh.17.1321094264352; Sat, 12 Nov 2011 02:37:44 -0800 (PST) Received: from mail-iy0-f178.google.com (mail-iy0-f178.google.com [209.85.210.178]) by mx.google.com with ESMTPS id t11si3338500iba.69.2011.11.12.02.37.43 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Nov 2011 02:37:44 -0800 (PST) Received-SPF: neutral (google.com: 209.85.210.178 is neither permitted nor denied by best guess record for domain of jason.hui@linaro.org) client-ip=209.85.210.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.178 is neither permitted nor denied by best guess record for domain of jason.hui@linaro.org) smtp.mail=jason.hui@linaro.org Received: by mail-iy0-f178.google.com with SMTP id j38so6138337iad.37 for ; Sat, 12 Nov 2011 02:37:43 -0800 (PST) Received: by 10.43.52.136 with SMTP id vm8mr15951623icb.26.1321094263739; Sat, 12 Nov 2011 02:37:43 -0800 (PST) Received: from localhost.localdomain ([116.226.224.96]) by mx.google.com with ESMTPS id n30sm20139112ibl.4.2011.11.12.02.37.36 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Nov 2011 02:37:43 -0800 (PST) From: Jason Liu To: u-boot@lists.denx.de Cc: sbabic@denx.de Subject: [U-Boot][PATCH 5/6] i.mx: fsl_esdhc: add the i.mx6q support Date: Sat, 12 Nov 2011 18:36:29 +0800 Message-Id: <1321094190-8108-6-git-send-email-jason.hui@linaro.org> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1321094190-8108-1-git-send-email-jason.hui@linaro.org> References: <1321094190-8108-1-git-send-email-jason.hui@linaro.org> The mmc host controller on the i.mx6q is called usdhc which is redesigned based on the freescale esdhc controller. The usdhc controller is almost compatible with esdhc except it adds one misc control register from user using experience. Signed-off-by: Jason Liu --- drivers/mmc/fsl_esdhc.c | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index ec953f0..cd17ef2 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -58,7 +58,12 @@ struct fsl_esdhc { uint autoc12err; uint hostcapblt; uint wml; - char reserved1[8]; +#if defined(CONFIG_FSL_USDHC) + uint mixctrl; + char reserved1[4]; +#else + char reserved1[8]; +#endif uint fevt; char reserved2[168]; uint hostver; @@ -298,6 +303,9 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data) /* Send the command */ esdhc_write32(®s->cmdarg, cmd->cmdarg); +#if defined(CONFIG_FSL_USDHC) + esdhc_write32(®s->mixctrl, xfertyp & 0xFFFF); +#endif esdhc_write32(®s->xfertyp, xfertyp); /* Wait for the command to complete */ @@ -482,7 +490,11 @@ int fsl_esdhc_initialize(bd_t *bis, struct fsl_esdhc_cfg *cfg) mmc = malloc(sizeof(struct mmc)); +#if defined(CONFIG_FSL_USDHC) + sprintf(mmc->name, "FSL_USDHC"); +#else sprintf(mmc->name, "FSL_ESDHC"); +#endif regs = (struct fsl_esdhc *)cfg->esdhc_base; /* First reset the eSDHC controller */