aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/mmdc.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@linaro.org>2014-12-15 13:59:43 -0800
committerKevin Hilman <khilman@linaro.org>2014-12-15 13:59:43 -0800
commit1888d2fa314033755026ceddee1fff8f80659fe4 (patch)
treeb0085323f5db6dca5f259b92038e27843c5a43a6 /arch/arm/mach-imx/mmdc.c
parentARM: defconfigs: use CONFIG_CPUFREQ_DT (diff)
parentARM: omap2plus_defconfig: Enable AHCI_PLATFORM driver (diff)
downloadlinux-dev-1888d2fa314033755026ceddee1fff8f80659fe4.tar.xz
linux-dev-1888d2fa314033755026ceddee1fff8f80659fe4.zip
Merge tag 'omap-for-v3.19/fixes-for-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
From: Tony Lindgren <tony@atomide.com> Subject: [GIT PULL] few fixes for the v3.19 merge window Fixes for a few issues found that would be good to get into -rc1: - Update SoC revision detection for am43x es1.2 - Fix regression with GPMC timings on 2430sdp for some versions of u-boot - Fix dra7 watchdog compatible property - Fix am437x-sk-evm LCD timings - Fix dra7 DSS clock muxing - Fix dra7-evm voltages - Remove a unused function prototype for am33xx_clk_init - Enable AHCI in the omap2plus_defconfig * tag 'omap-for-v3.19/fixes-for-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (1601 commits) ARM: omap2plus_defconfig: Enable AHCI_PLATFORM driver ARM: dts: am437x-sk-evm.dts: fix LCD timings ARM: dts: dra7-evm: Update SMPS7 (VDD_CORE) max voltage to match DM ARM: dts: dra7-evm: Fix typo in SMPS6 (VDD_GPU) max voltage ARM: OMAP2+: AM43x: Add ID for ES1.2 ARM: dts: am437x-sk: fix lcd enable pin mux data ARM: dts: Fix gpmc regression for omap 2430sdp smc91x hwmon: (tmp401) Detect TMP435 on all addresses it supports mfd: rtsx: Add func to split u32 into register mmc: sdhci-msm: Convert to mmc_send_tuning() mmc: sdhci-esdhc-imx: Convert to mmc_send_tuning() mmc: core: Let mmc_send_tuning() to take struct mmc_host* as parameter nios2: Make NIOS2_CMDLINE_IGNORE_DTB depend on CMDLINE_BOOL nios2: Add missing NR_CPUS to Kconfig nios2: asm-offsets: Remove unused definition TI_TASK nios2: Remove write-only struct member from nios2_timer nios2: Remove unused extern declaration of shm_align_mask nios2: include linux/type.h in io.h nios2: move include asm-generic/io.h to end of file nios2: remove include asm-generic/iomap.h from io.h ...
Diffstat (limited to 'arch/arm/mach-imx/mmdc.c')
-rw-r--r--arch/arm/mach-imx/mmdc.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c
index 7a9686ad994c..3729d90cfa46 100644
--- a/arch/arm/mach-imx/mmdc.c
+++ b/arch/arm/mach-imx/mmdc.c
@@ -21,6 +21,12 @@
#define BP_MMDC_MAPSR_PSD 0
#define BP_MMDC_MAPSR_PSS 4
+#define MMDC_MDMISC 0x18
+#define BM_MMDC_MDMISC_DDR_TYPE 0x18
+#define BP_MMDC_MDMISC_DDR_TYPE 0x3
+
+static int ddr_type;
+
static int imx_mmdc_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
@@ -31,6 +37,12 @@ static int imx_mmdc_probe(struct platform_device *pdev)
mmdc_base = of_iomap(np, 0);
WARN_ON(!mmdc_base);
+ reg = mmdc_base + MMDC_MDMISC;
+ /* Get ddr type */
+ val = readl_relaxed(reg);
+ ddr_type = (val & BM_MMDC_MDMISC_DDR_TYPE) >>
+ BP_MMDC_MDMISC_DDR_TYPE;
+
reg = mmdc_base + MMDC_MAPSR;
/* Enable automatic power saving */
@@ -51,6 +63,11 @@ static int imx_mmdc_probe(struct platform_device *pdev)
return 0;
}
+int imx_mmdc_get_ddr_type(void)
+{
+ return ddr_type;
+}
+
static struct of_device_id imx_mmdc_dt_ids[] = {
{ .compatible = "fsl,imx6q-mmdc", },
{ /* sentinel */ }