diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2012-08-22 16:16:26 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2012-08-22 16:16:26 +0200 |
commit | 2a1325206da5381292c2b268e248702c523cc927 (patch) | |
tree | 45d684a865eab51b0711d07782b1d8e8ae9d9932 /arch/arm/cpu/armv7/tegra-common/board.c | |
parent | 2f2f858faddd3cce54f7c64bc8fc8b596c1ddfaf (diff) |
Initial Toradex Colibri T20 L4T R15 support.T20_LinuxImageV2.0Alpha1_20120808
Diffstat (limited to 'arch/arm/cpu/armv7/tegra-common/board.c')
-rw-r--r-- | arch/arm/cpu/armv7/tegra-common/board.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/tegra-common/board.c b/arch/arm/cpu/armv7/tegra-common/board.c index 5a57298db7e..5f772b55b66 100644 --- a/arch/arm/cpu/armv7/tegra-common/board.c +++ b/arch/arm/cpu/armv7/tegra-common/board.c @@ -1,6 +1,8 @@ /* * (C) Copyright 2010,2011 * NVIDIA Corporation <www.nvidia.com> + * (C) Copyright 2012 + * Toradex, Inc. * * See file CREDITS for list of people who contributed to this * project. @@ -37,6 +39,7 @@ DECLARE_GLOBAL_DATA_PTR; unsigned int board_query_sdram_size(void) { +#ifndef CONFIG_COLIBRI_T20 struct pmc_ctlr *const pmc = (struct pmc_ctlr *)NV_PA_PMC_BASE; u32 reg; @@ -60,6 +63,15 @@ unsigned int board_query_sdram_size(void) default: return 0x40000000; /* 1GB */ } +#else /* CONFIG_COLIBRI_T20 */ + /* Colibri T20 does not use OdmData */ + u32 *pa_emc_adr_cfg = (void *)NV_PA_EMC_ADR_CFG_BASE; + + u32 reg = readl(pa_emc_adr_cfg); + + /* 4 MB shifted by EMEM_DEVSIZE */ + return (4 << 20) << ((reg & EMEM_DEVSIZE_MASK) >> EMEM_DEVSIZE_SHIFT); +#endif /* CONFIG_COLIBRI_T20 */ } #if defined(CONFIG_DISPLAY_BOARDINFO) || defined(CONFIG_DISPLAY_BOARDINFO_LATE) |