summaryrefslogtreecommitdiffstats
path: root/cpu
diff options
context:
space:
mode:
authorSandeep Paulraj <s-paulraj@ti.com>2009-09-09 11:50:40 -0400
committerTom Rix <Tom.Rix@windriver.com>2009-10-18 16:52:52 -0500
commit9c44ddccb6602f620fc037974f3e4468ad8a7c0c (patch)
treeb7b2b21f9291dd4551050638e5ae692423a7ebfd /cpu
parent13d2cb988ff07addce6e10ab2cb8965a9dd23c63 (diff)
downloadblackbird-obmc-uboot-9c44ddccb6602f620fc037974f3e4468ad8a7c0c.tar.gz
blackbird-obmc-uboot-9c44ddccb6602f620fc037974f3e4468ad8a7c0c.zip
TI: OMAP3: Remove SZ_xx references
This patch removes dependency on the sizes.h header file and removes all references to SZ_xx. Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Diffstat (limited to 'cpu')
-rw-r--r--cpu/arm_cortexa8/omap3/mem.c6
-rw-r--r--cpu/arm_cortexa8/omap3/sys_info.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/cpu/arm_cortexa8/omap3/mem.c b/cpu/arm_cortexa8/omap3/mem.c
index 079c848701..b4dec39881 100644
--- a/cpu/arm_cortexa8/omap3/mem.c
+++ b/cpu/arm_cortexa8/omap3/mem.c
@@ -92,7 +92,7 @@ void make_cs1_contiguous(void)
u32 size, a_add_low, a_add_high;
size = get_sdr_cs_size(CS0);
- size /= SZ_32M; /* find size to offset CS1 */
+ size >>= 25; /* divide by 32 MiB to find size to offset CS1 */
a_add_high = (size & 3) << 8; /* set up low field */
a_add_low = (size & 0x3C) >> 2; /* set up high field */
writel((a_add_high | a_add_low), &sdrc_base->cs_cfg);
@@ -249,7 +249,7 @@ void gpmc_init(void)
enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[0], base, size);
#if defined(CONFIG_ENV_IS_IN_NAND)
f_off = SMNAND_ENV_OFFSET;
- f_sec = SZ_128K;
+ f_sec = (128 << 10); /* 128 KiB */
/* env setup */
boot_flash_base = base;
boot_flash_off = f_off;
@@ -265,7 +265,7 @@ void gpmc_init(void)
enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[0], base, size);
#if defined(CONFIG_ENV_IS_IN_ONENAND)
f_off = ONENAND_ENV_OFFSET;
- f_sec = SZ_128K;
+ f_sec = (128 << 10); /* 128 KiB */
/* env setup */
boot_flash_base = base;
boot_flash_off = f_off;
diff --git a/cpu/arm_cortexa8/omap3/sys_info.c b/cpu/arm_cortexa8/omap3/sys_info.c
index 765aaf2b37..31b20033cc 100644
--- a/cpu/arm_cortexa8/omap3/sys_info.c
+++ b/cpu/arm_cortexa8/omap3/sys_info.c
@@ -124,7 +124,7 @@ u32 get_sdr_cs_size(u32 cs)
/* get ram size field */
size = readl(&sdrc_base->cs[cs].mcfg) >> 8;
size &= 0x3FF; /* remove unwanted bits */
- size *= SZ_2M; /* find size in MB */
+ size <<= 21; /* multiply by 2 MiB to find size in MB */
return size;
}
OpenPOWER on IntegriCloud