diff options
author | Dinh Nguyen <Dinh.Nguyen@freescale.com> | 2011-02-23 14:53:25 -0600 |
---|---|---|
committer | Andy Voltz <andy.voltz@timesys.com> | 2011-06-01 13:20:59 -0400 |
commit | 8bfdb6831215156b8c02276c760f60cc5a47be81 (patch) | |
tree | 0296e34f4da75951f78a1ebc1afa5d4103d17964 | |
parent | 3a72d2241ff5607d706ecb5b115bd6be17089427 (diff) |
ENGR00139672-3 Make use of the new mx5x_revision call
For better alignment with the upstream i.MX kernel, switch from
cpu_is_mx5x_rev() to mx5x_revision().
This is the drivers/ part of the patch.
Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>
-rw-r--r-- | drivers/media/video/mxc/output/mxc_v4l2_output.c | 3 | ||||
-rw-r--r-- | drivers/mmc/host/mx_sdhci.c | 25 | ||||
-rw-r--r-- | drivers/mtd/nand/mxc_nd2.h | 5 | ||||
-rw-r--r-- | drivers/mxc/security/scc2_driver.c | 3 | ||||
-rw-r--r-- | drivers/regulator/ltc3589-regulator.c | 5 |
5 files changed, 20 insertions, 21 deletions
diff --git a/drivers/media/video/mxc/output/mxc_v4l2_output.c b/drivers/media/video/mxc/output/mxc_v4l2_output.c index 86cd795d6bd6..438e36814f50 100644 --- a/drivers/media/video/mxc/output/mxc_v4l2_output.c +++ b/drivers/media/video/mxc/output/mxc_v4l2_output.c @@ -37,8 +37,7 @@ #include "mxc_v4l2_output.h" -#define INTERLACED_CONTENT(vout) (((cpu_is_mx51_rev(CHIP_REV_2_0) >= 1) || \ - cpu_is_mx53()) && \ +#define INTERLACED_CONTENT(vout) ((cpu_is_mx51() || cpu_is_mx53()) && \ (((vout)->field_fmt == V4L2_FIELD_INTERLACED_TB) || \ ((vout)->field_fmt == V4L2_FIELD_INTERLACED_BT))) #define LOAD_3FIELDS(vout) ((INTERLACED_CONTENT(vout)) && \ diff --git a/drivers/mmc/host/mx_sdhci.c b/drivers/mmc/host/mx_sdhci.c index 1d932b3bb078..92e59e49562b 100644 --- a/drivers/mmc/host/mx_sdhci.c +++ b/drivers/mmc/host/mx_sdhci.c @@ -46,6 +46,7 @@ #include <asm/mach-types.h> #include <mach/dma.h> #include <mach/mmc.h> +#include <mach/common.h> #include "mx_sdhci.h" @@ -241,8 +242,8 @@ static void sdhci_init(struct sdhci_host *host) SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | SDHCI_INT_DMA_END | SDHCI_INT_DATA_END | SDHCI_INT_RESPONSE; - if (cpu_is_mx50_rev(CHIP_REV_1_1) < 0 - || cpu_is_mx53_rev(CHIP_REV_2_0) < 0) + if ((mx50_revision() == IMX_CHIP_REVISION_1_0) + || (mx53_revision() < IMX_CHIP_REVISION_2_0)) intmask |= SDHCI_INT_ACMD12ERR; if (host->flags & SDHCI_USE_DMA) @@ -652,8 +653,8 @@ static void sdhci_finish_data(struct sdhci_host *host) blocks = (data->error == 0) ? 0 : 1; else { blocks = readl(host->ioaddr + SDHCI_BLOCK_COUNT) >> 16; - if (cpu_is_mx50_rev(CHIP_REV_1_1) >= 1 - || cpu_is_mx53_rev(CHIP_REV_2_0) >= 1) { + if ((mx50_revision() >= IMX_CHIP_REVISION_1_1) + || (mx53_revision() >= IMX_CHIP_REVISION_2_0)) { if (readl(host->ioaddr + SDHCI_VENDOR_SPEC) & 0x2) writel(readl(host->ioaddr + SDHCI_VENDOR_SPEC) & ~0x2, @@ -662,8 +663,8 @@ static void sdhci_finish_data(struct sdhci_host *host) } data->bytes_xfered = data->blksz * data->blocks; - if ((data->stop) && !(cpu_is_mx50_rev(CHIP_REV_1_1) < 0 - || cpu_is_mx53_rev(CHIP_REV_2_0) < 0)) { + if ((data->stop) && ((mx50_revision() >= IMX_CHIP_REVISION_1_1) + || (mx53_revision() >= IMX_CHIP_REVISION_2_0))) { /* * The controller needs a reset of internal state machines * upon error conditions. @@ -725,8 +726,8 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) mode = SDHCI_TRNS_BLK_CNT_EN | SDHCI_TRNS_DPSEL; if (cmd->data->blocks > 1) { mode |= SDHCI_TRNS_MULTI; - if (cpu_is_mx50_rev(CHIP_REV_1_1) < 0 - || cpu_is_mx53_rev(CHIP_REV_2_0) < 0) { + if (mx50_revision() == IMX_CHIP_REVISION_1_0 + || mx53_revision() == IMX_CHIP_REVISION_1_0) { /* Fix multi-blk operations no INT bug * by SW workaround. */ @@ -744,8 +745,8 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) writel(tmp, host->ioaddr + SDHCI_INT_ENABLE); } - } else if (cpu_is_mx50_rev(CHIP_REV_1_1) >= 1 - || cpu_is_mx53_rev(CHIP_REV_2_0) >= 1) { + } else if (mx50_revision() >= IMX_CHIP_REVISION_1_1 + || mx53_revision() >= IMX_CHIP_REVISION_2_0) { /* Fix SDIO read no INT bug * set bit1 of Vendor Spec Registor */ @@ -1389,8 +1390,8 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask) SDHCI_INT_INDEX)) host->cmd->error = -EILSEQ; - if (cpu_is_mx50_rev(CHIP_REV_1_1) < 0 - || cpu_is_mx53_rev(CHIP_REV_2_0) < 0) { + if (mx50_revision() == IMX_CHIP_REVISION_1_0 + || mx53_revision() == IMX_CHIP_REVISION_1_0) { if (intmask & SDHCI_INT_ACMD12ERR) { int tmp = 0; tmp = readl(host->ioaddr + SDHCI_ACMD12_ERR); diff --git a/drivers/mtd/nand/mxc_nd2.h b/drivers/mtd/nand/mxc_nd2.h index 4120c2aa1722..9f33c9652bfb 100644 --- a/drivers/mtd/nand/mxc_nd2.h +++ b/drivers/mtd/nand/mxc_nd2.h @@ -1,5 +1,5 @@ /* - * Copyright 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright 2004-2011 Freescale Semiconductor, Inc. All Rights Reserved. */ /* @@ -24,6 +24,7 @@ #define __MXC_ND2_H__ #include <mach/hardware.h> +#include <mach/common.h> #define IS_2K_PAGE_NAND ((mtd->writesize / num_of_interleave) \ == NAND_PAGESIZE_2KB) @@ -143,7 +144,7 @@ do { \ raw_write(((raw_read(NFC_CONFIG2) & \ ~(3 << 6)) | \ NFC_ECC_MODE_4), NFC_CONFIG2); \ - } else if (cpu_is_mx51_rev(CHIP_REV_2_0) > 0) { \ + } else if (cpu_is_mx51()) { \ if ((v) == NFC_SPAS_218 || (v) == NFC_SPAS_112) \ raw_write(((raw_read(NFC_CONFIG2) & \ ~(1 << 6)) | \ diff --git a/drivers/mxc/security/scc2_driver.c b/drivers/mxc/security/scc2_driver.c index e0cbb28a0ad0..358d516676f7 100644 --- a/drivers/mxc/security/scc2_driver.c +++ b/drivers/mxc/security/scc2_driver.c @@ -571,9 +571,6 @@ static int scc_init(void) goto out; } - if (cpu_is_mx51_rev(CHIP_REV_2_0) < 0) - scm_ram_phys_base += 0x8000; - scm_ram_base = (void *)ioremap_nocache(scm_ram_phys_base, scc_configuration. partition_count * diff --git a/drivers/regulator/ltc3589-regulator.c b/drivers/regulator/ltc3589-regulator.c index b81552e94316..b7269c9825ae 100644 --- a/drivers/regulator/ltc3589-regulator.c +++ b/drivers/regulator/ltc3589-regulator.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright (C) 2010-2011 Freescale Semiconductor, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -36,6 +36,7 @@ #include <linux/delay.h> #include <linux/mfd/ltc3589/core.h> #include <mach/hardware.h> +#include <mach/common.h> /* Register definitions */ #define LTC3589_REG_IRSTAT 0x02 @@ -960,7 +961,7 @@ static int ltc3589_regulator_probe(struct platform_device *pdev) if (pdev->id < LTC3589_DCDC_1 || pdev->id > LTC3589_LDO4) return -ENODEV; - if (cpu_is_mx53_rev(CHIP_REV_2_0) >= 1) { + if (mx53_revision() >= IMX_CHIP_REVISION_2_0) { ltc3589_ldo2_r2 = LTC3589_LDO2_R2_TO2; ltc3589_sw2_r2 = LTC3589_SW2_R2_TO2; } else { |