From 634db63cb48a8dd237dd361906fc454be8262849 Mon Sep 17 00:00:00 2001 From: Jason Liu Date: Tue, 7 Feb 2012 14:30:42 +0800 Subject: ENGR00173869-9: i.mx6dl: add the misc drivers support This patch change is very trivial and simply just add cpu_is_mx6dl() or using cpu_is_mx6 to replace cpu_is_mx6q each driver owner will check it and adjust it accordingly later, such as sdhc etc. Signed-off-by: Jason Liu --- drivers/mmc/host/sdhci-esdhc-imx.c | 16 ++++++++-------- drivers/mmc/host/sdhci-esdhc.h | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'drivers/mmc') diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 3b180a035d41..914a2cc7b602 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -102,7 +102,7 @@ static u32 esdhc_readl_le(struct sdhci_host *host, int reg) val |= SDHCI_CARD_PRESENT; } - if (reg == SDHCI_INT_STATUS && cpu_is_mx6q() + if (reg == SDHCI_INT_STATUS && cpu_is_mx6() && mx6q_revision() == IMX_CHIP_REVISION_1_0) { /* * on mx6q TO1.0, there is low possibility that @@ -114,13 +114,13 @@ static u32 esdhc_readl_le(struct sdhci_host *host, int reg) if ((val & SDHCI_INT_DATA_END) && \ !(val & SDHCI_INT_DMA_END)) val = readl(host->ioaddr + reg); - } else if (reg == SDHCI_CAPABILITIES_1 && cpu_is_mx6q()) { + } else if (reg == SDHCI_CAPABILITIES_1 && cpu_is_mx6()) { /* * on mx6q, no cap_1 available, fake one. */ val = SDHCI_SUPPORT_DDR50 | SDHCI_SUPPORT_SDR104 | \ SDHCI_SUPPORT_SDR50; - } else if (reg == SDHCI_MAX_CURRENT && cpu_is_mx6q()) { + } else if (reg == SDHCI_MAX_CURRENT && cpu_is_mx6()) { /* * on mx6q, no max current available, fake one. */ @@ -130,7 +130,7 @@ static u32 esdhc_readl_le(struct sdhci_host *host, int reg) val |= 0xFF << SDHCI_MAX_CURRENT_180_SHIFT; } - if (reg == SDHCI_PRESENT_STATE && cpu_is_mx6q()) { + if (reg == SDHCI_PRESENT_STATE && cpu_is_mx6()) { u32 fsl_prss = readl(host->ioaddr + SDHCI_PRESENT_STATE); /* save the least 20 bits */ val = fsl_prss & 0x000FFFFF; @@ -158,7 +158,7 @@ static void esdhc_writel_le(struct sdhci_host *host, u32 val, int reg) val &= ~(SDHCI_INT_CARD_REMOVE | \ SDHCI_INT_CARD_INSERT); - if (!(val & SDHCI_INT_CARD_INT) && cpu_is_mx6q() + if (!(val & SDHCI_INT_CARD_INT) && cpu_is_mx6() && mx6q_revision() == IMX_CHIP_REVISION_1_0) /* * write 1 to clear card interrupt status bit @@ -172,7 +172,7 @@ static void esdhc_writel_le(struct sdhci_host *host, u32 val, int reg) writel(SDHCI_INT_CARD_INT, \ host->ioaddr + SDHCI_INT_STATUS); - if (val & SDHCI_INT_CARD_INT && (!cpu_is_mx6q())) { + if (val & SDHCI_INT_CARD_INT && !cpu_is_mx6()) { /* * clear D3CD bit and set D3CD bit to avoid * losing card interrupt @@ -320,7 +320,7 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg) val |= SDHCI_CMD_ABORTCMD; writel(0x08800880, host->ioaddr + SDHCI_CAPABILITIES_1); - if (cpu_is_mx6q()) { + if (cpu_is_mx6()) { imx_data->scratchpad |= \ (readl(host->ioaddr + SDHCI_MIX_CTRL) & (0xf << 22)); @@ -471,7 +471,7 @@ static int esdhc_pltfm_init(struct sdhci_host *host, struct sdhci_pltfm_data *pd /* write_protect can't be routed to controller, use gpio */ sdhci_esdhc_ops.get_ro = esdhc_pltfm_get_ro; - if (!(cpu_is_mx25() || cpu_is_mx35() || cpu_is_mx51() || cpu_is_mx6q())) + if (!(cpu_is_mx25() || cpu_is_mx35() || cpu_is_mx51() || cpu_is_mx6())) imx_data->flags |= ESDHC_FLAG_MULTIBLK_NO_INT; if (boarddata) { diff --git a/drivers/mmc/host/sdhci-esdhc.h b/drivers/mmc/host/sdhci-esdhc.h index 8ee1d622c56d..c64cdcdca4ba 100644 --- a/drivers/mmc/host/sdhci-esdhc.h +++ b/drivers/mmc/host/sdhci-esdhc.h @@ -1,7 +1,7 @@ /* * Freescale eSDHC controller driver generics for OF and pltfm. * - * Copyright (C) 2007, 2011 Freescale Semiconductor, Inc. + * Copyright (C) 2007, 2011, 2012 Freescale Semiconductor, Inc. * Copyright (c) 2009 MontaVista Software, Inc. * Copyright (c) 2010 Pengutronix e.K. * Author: Wolfram Sang @@ -54,7 +54,7 @@ static inline void esdhc_set_clock(struct sdhci_host *host, unsigned int clock) int ddr_mode = 0; boarddata = host->mmc->parent->platform_data; - if (cpu_is_mx6q()) { + if (cpu_is_mx6q() || cpu_is_mx6dl()) { pre_div = 1; if (readl(host->ioaddr + SDHCI_MIX_CTRL) & SDHCI_MIX_CTRL_DDREN) { -- cgit v1.2.3