diff options
author | Tom Rini <trini@ti.com> | 2014-06-05 17:38:30 -0400 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-06-05 17:38:30 -0400 |
commit | 3e1fa221f94b7ae3389d166882b77f1da5895f22 (patch) | |
tree | 6edd72d4ea079605c4624999424b3577dbeb4d8b /arch/powerpc/cpu/mpc85xx/cpu_init.c | |
parent | 31e997f9212be04e7bbe9c05785d72c4931dcfd4 (diff) | |
parent | 353527d527b78297571c05b8a1687c92d42f6d20 (diff) | |
download | u-boot-imx-3e1fa221f94b7ae3389d166882b77f1da5895f22.zip u-boot-imx-3e1fa221f94b7ae3389d166882b77f1da5895f22.tar.gz u-boot-imx-3e1fa221f94b7ae3389d166882b77f1da5895f22.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Diffstat (limited to 'arch/powerpc/cpu/mpc85xx/cpu_init.c')
-rw-r--r-- | arch/powerpc/cpu/mpc85xx/cpu_init.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c index d6cf885..78316a6 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c @@ -225,6 +225,32 @@ static void disable_cpc_sram(void) } #endif +#if defined(T1040_TDM_QUIRK_CCSR_BASE) +#ifdef CONFIG_POST +#error POST memory test cannot be enabled with TDM +#endif +static void enable_tdm_law(void) +{ + int ret; + char buffer[HWCONFIG_BUFFER_SIZE] = {0}; + int tdm_hwconfig_enabled = 0; + + /* + * Extract hwconfig from environment since environment + * is not setup properly yet. Search for tdm entry in + * hwconfig. + */ + ret = getenv_f("hwconfig", buffer, sizeof(buffer)); + if (ret > 0) { + tdm_hwconfig_enabled = hwconfig_f("tdm", buffer); + /* If tdm is defined in hwconfig, set law for tdm workaround */ + if (tdm_hwconfig_enabled) + set_next_law(T1040_TDM_QUIRK_CCSR_BASE, LAW_SIZE_16M, + LAW_TRGT_IF_CCSR); + } +} +#endif + static void enable_cpc(void) { int i; @@ -729,6 +755,9 @@ skip_l2: disable_cpc_sram(); #endif enable_cpc(); +#if defined(T1040_TDM_QUIRK_CCSR_BASE) + enable_tdm_law(); +#endif #ifndef CONFIG_SYS_FSL_NO_SERDES /* needs to be in ram since code uses global static vars */ |