diff options
author | Wolfgang Denk <wd@denx.de> | 2010-11-30 22:13:32 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-11-30 22:13:32 +0100 |
commit | 49733aa0b9d29803384ad4bce74985f4bbe7e9aa (patch) | |
tree | e01f89a2704e848d67e322e76734875a44dbf865 /arch | |
parent | b194577b2995eacbd2a3769269f0af1bc5e22530 (diff) | |
parent | f8264e015e93e27bb52bd047b58e5a130161764b (diff) | |
download | u-boot-imx-49733aa0b9d29803384ad4bce74985f4bbe7e9aa.zip u-boot-imx-49733aa0b9d29803384ad4bce74985f4bbe7e9aa.tar.gz u-boot-imx-49733aa0b9d29803384ad4bce74985f4bbe7e9aa.tar.bz2 |
Merge branch 'master' of /home/wd/git/u-boot/custodians
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/cpu/armv7/omap3/emif4.c | 5 | ||||
-rw-r--r-- | arch/arm/cpu/armv7/s5p-common/timer.c | 18 |
2 files changed, 12 insertions, 11 deletions
diff --git a/arch/arm/cpu/armv7/omap3/emif4.c b/arch/arm/cpu/armv7/omap3/emif4.c index 0870857..2227576 100644 --- a/arch/arm/cpu/armv7/omap3/emif4.c +++ b/arch/arm/cpu/armv7/omap3/emif4.c @@ -48,10 +48,11 @@ u32 is_mem_sdr(void) */ u32 get_sdr_cs_size(u32 cs) { - u32 size; + u32 size = 0; /* TODO: Calculate the size based on EMIF4 configuration */ - size = CONFIG_SYS_CS0_SIZE; + if (cs == CS0) + size = CONFIG_SYS_CS0_SIZE; return size; } diff --git a/arch/arm/cpu/armv7/s5p-common/timer.c b/arch/arm/cpu/armv7/s5p-common/timer.c index 0490650..651fd5d 100644 --- a/arch/arm/cpu/armv7/s5p-common/timer.c +++ b/arch/arm/cpu/armv7/s5p-common/timer.c @@ -65,15 +65,12 @@ int timer_init(void) writel((PRESCALER_1 & 0xff) << 8, &timer->tcfg0); writel((MUX_DIV_2 & 0xf) << MUX4_DIV_SHIFT, &timer->tcfg1); - if (count_value == 0) { - /* reset initial value */ - /* count_value = 2085937.5(HZ) (per 1 sec)*/ - count_value = get_pwm_clk() / ((PRESCALER_1 + 1) * - (MUX_DIV_2 + 1)); - - /* count_value / 100 = 20859.375(HZ) (per 10 msec) */ - count_value = count_value / 100; - } + /* count_value = 2085937.5(HZ) (per 1 sec)*/ + count_value = get_pwm_clk() / ((PRESCALER_1 + 1) * + (MUX_DIV_2 + 1)); + + /* count_value / 100 = 20859.375(HZ) (per 10 msec) */ + count_value = count_value / 100; /* set count value */ writel(count_value, &timer->tcntb4); @@ -114,8 +111,11 @@ void set_timer(unsigned long t) /* delay x useconds */ void __udelay(unsigned long usec) { + struct s5p_timer *const timer = s5p_get_base_timer(); unsigned long tmo, tmp; + count_value = readl(&timer->tcntb4); + if (usec >= 1000) { /* * if "big" number, spread normalization |