Merge branch 'master' of git://git.denx.de/u-boot-arm
This commit is contained in:
commit
63440c4a80
19 changed files with 65 additions and 85 deletions
|
@ -234,7 +234,7 @@ fixabs:
|
|||
mov r1, r1, LSR #4 /* r1 <- symbol index in .dynsym */
|
||||
add r1, r10, r1 /* r1 <- address of symbol in table */
|
||||
ldr r1, [r1, #4] /* r1 <- symbol value */
|
||||
add r1, r9 /* r1 <- relocated sym addr */
|
||||
add r1, r1, r9 /* r1 <- relocated sym addr */
|
||||
b fixnext
|
||||
fixrel:
|
||||
/* relative fix: increase location by offset */
|
||||
|
|
|
@ -288,7 +288,7 @@ fixabs:
|
|||
mov r1, r1, LSR #4 /* r1 <- symbol index in .dynsym */
|
||||
add r1, r10, r1 /* r1 <- address of symbol in table */
|
||||
ldr r1, [r1, #4] /* r1 <- symbol value */
|
||||
add r1, r9 /* r1 <- relocated sym addr */
|
||||
add r1, r1, r9 /* r1 <- relocated sym addr */
|
||||
b fixnext
|
||||
fixrel:
|
||||
/* relative fix: increase location by offset */
|
||||
|
|
|
@ -203,7 +203,7 @@ fixabs:
|
|||
mov r1, r1, LSR #4 /* r1 <- symbol index in .dynsym */
|
||||
add r1, r10, r1 /* r1 <- address of symbol in table */
|
||||
ldr r1, [r1, #4] /* r1 <- symbol value */
|
||||
add r1, r9 /* r1 <- relocated sym addr */
|
||||
add r1, r1, r9 /* r1 <- relocated sym addr */
|
||||
b fixnext
|
||||
fixrel:
|
||||
/* relative fix: increase location by offset */
|
||||
|
|
|
@ -249,7 +249,7 @@ fixabs:
|
|||
mov r1, r1, LSR #4 /* r1 <- symbol index in .dynsym */
|
||||
add r1, r10, r1 /* r1 <- address of symbol in table */
|
||||
ldr r1, [r1, #4] /* r1 <- symbol value */
|
||||
add r1, r9 /* r1 <- relocated sym addr */
|
||||
add r1, r1, r9 /* r1 <- relocated sym addr */
|
||||
b fixnext
|
||||
fixrel:
|
||||
/* relative fix: increase location by offset */
|
||||
|
|
|
@ -240,7 +240,7 @@ fixabs:
|
|||
mov r1, r1, LSR #4 /* r1 <- symbol index in .dynsym */
|
||||
add r1, r10, r1 /* r1 <- address of symbol in table */
|
||||
ldr r1, [r1, #4] /* r1 <- symbol value */
|
||||
add r1, r9 /* r1 <- relocated sym addr */
|
||||
add r1, r1, r9 /* r1 <- relocated sym addr */
|
||||
b fixnext
|
||||
fixrel:
|
||||
/* relative fix: increase location by offset */
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
#include <common.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
struct davinci_timer {
|
||||
u_int32_t pid12;
|
||||
u_int32_t emumgt;
|
||||
|
@ -57,11 +59,9 @@ struct davinci_timer {
|
|||
static struct davinci_timer * const timer =
|
||||
(struct davinci_timer *)CONFIG_SYS_TIMERBASE;
|
||||
|
||||
#define TIMER_LOAD_VAL (CONFIG_SYS_HZ_CLOCK / CONFIG_SYS_HZ)
|
||||
#define TIM_CLK_DIV 16
|
||||
#define TIMER_LOAD_VAL 0xffffffff
|
||||
|
||||
static ulong timestamp;
|
||||
static ulong lastinc;
|
||||
#define TIM_CLK_DIV 16
|
||||
|
||||
int timer_init(void)
|
||||
{
|
||||
|
@ -71,72 +71,51 @@ int timer_init(void)
|
|||
writel(0x06 | ((TIM_CLK_DIV - 1) << 8), &timer->tgcr);
|
||||
writel(0x0, &timer->tim34);
|
||||
writel(TIMER_LOAD_VAL, &timer->prd34);
|
||||
lastinc = 0;
|
||||
timestamp = 0;
|
||||
writel(2 << 22, &timer->tcr);
|
||||
gd->timer_rate_hz = CONFIG_SYS_HZ_CLOCK / TIM_CLK_DIV;
|
||||
gd->timer_reset_value = 0;
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
void reset_timer(void)
|
||||
{
|
||||
writel(0x0, &timer->tcr);
|
||||
writel(0x0, &timer->tim34);
|
||||
lastinc = 0;
|
||||
timestamp = 0;
|
||||
writel(2 << 22, &timer->tcr);
|
||||
gd->timer_reset_value = get_ticks();
|
||||
}
|
||||
|
||||
static ulong get_timer_raw(void)
|
||||
/*
|
||||
* Get the current 64 bit timer tick count
|
||||
*/
|
||||
unsigned long long get_ticks(void)
|
||||
{
|
||||
ulong now = readl(&timer->tim34);
|
||||
unsigned long now = readl(&timer->tim34);
|
||||
|
||||
if (now >= lastinc) {
|
||||
/* normal mode */
|
||||
timestamp += now - lastinc;
|
||||
} else {
|
||||
/* overflow ... */
|
||||
timestamp += now + TIMER_LOAD_VAL - lastinc;
|
||||
}
|
||||
lastinc = now;
|
||||
return timestamp;
|
||||
/* increment tbu if tbl has rolled over */
|
||||
if (now < gd->tbl)
|
||||
gd->tbu++;
|
||||
gd->tbl = now;
|
||||
|
||||
return (((unsigned long long)gd->tbu) << 32) | gd->tbl;
|
||||
}
|
||||
|
||||
ulong get_timer(ulong base)
|
||||
{
|
||||
return((get_timer_raw() / (TIMER_LOAD_VAL / TIM_CLK_DIV)) - base);
|
||||
}
|
||||
unsigned long long timer_diff;
|
||||
|
||||
void set_timer(ulong t)
|
||||
{
|
||||
timestamp = t;
|
||||
timer_diff = get_ticks() - gd->timer_reset_value;
|
||||
|
||||
return (timer_diff / (gd->timer_rate_hz / CONFIG_SYS_HZ)) - base;
|
||||
}
|
||||
|
||||
void __udelay(unsigned long usec)
|
||||
{
|
||||
ulong tmo;
|
||||
ulong endtime;
|
||||
signed long diff;
|
||||
unsigned long long endtime;
|
||||
|
||||
tmo = CONFIG_SYS_HZ_CLOCK / 1000;
|
||||
tmo *= usec;
|
||||
tmo /= (1000 * TIM_CLK_DIV);
|
||||
endtime = ((unsigned long long)usec * gd->timer_rate_hz) / 1000000UL;
|
||||
endtime += get_ticks();
|
||||
|
||||
endtime = get_timer_raw() + tmo;
|
||||
|
||||
do {
|
||||
ulong now = get_timer_raw();
|
||||
diff = endtime - now;
|
||||
} while (diff >= 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is derived from PowerPC code (read timebase as long long).
|
||||
* On ARM it just returns the timer value.
|
||||
*/
|
||||
unsigned long long get_ticks(void)
|
||||
{
|
||||
return(get_timer(0));
|
||||
while (get_ticks() < endtime)
|
||||
;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -239,7 +239,7 @@ fixabs:
|
|||
mov r1, r1, LSR #4 /* r1 <- symbol index in .dynsym */
|
||||
add r1, r10, r1 /* r1 <- address of symbol in table */
|
||||
ldr r1, [r1, #4] /* r1 <- symbol value */
|
||||
add r1, r9 /* r1 <- relocated sym addr */
|
||||
add r1, r1, r9 /* r1 <- relocated sym addr */
|
||||
b fixnext
|
||||
fixrel:
|
||||
/* relative fix: increase location by offset */
|
||||
|
|
|
@ -211,7 +211,7 @@ fixabs:
|
|||
mov r1, r1, LSR #4 /* r1 <- symbol index in .dynsym */
|
||||
add r1, r10, r1 /* r1 <- address of symbol in table */
|
||||
ldr r1, [r1, #4] /* r1 <- symbol value */
|
||||
add r1, r9 /* r1 <- relocated sym addr */
|
||||
add r1, r1, r9 /* r1 <- relocated sym addr */
|
||||
b fixnext
|
||||
fixrel:
|
||||
/* relative fix: increase location by offset */
|
||||
|
|
|
@ -207,7 +207,7 @@ fixabs:
|
|||
mov r1, r1, LSR #4 /* r1 <- symbol index in .dynsym */
|
||||
add r1, r10, r1 /* r1 <- address of symbol in table */
|
||||
ldr r1, [r1, #4] /* r1 <- symbol value */
|
||||
add r1, r9 /* r1 <- relocated sym addr */
|
||||
add r1, r1, r9 /* r1 <- relocated sym addr */
|
||||
b fixnext
|
||||
fixrel:
|
||||
/* relative fix: increase location by offset */
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
#include <common.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
static ulong timestamp;
|
||||
static ulong lastinc;
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
static struct gptimer *timer_base = (struct gptimer *)CONFIG_SYS_TIMERBASE;
|
||||
|
||||
/*
|
||||
|
@ -74,7 +74,7 @@ ulong get_timer(ulong base)
|
|||
|
||||
void set_timer(ulong t)
|
||||
{
|
||||
timestamp = t;
|
||||
gd->tbl = t;
|
||||
}
|
||||
|
||||
/* delay x useconds */
|
||||
|
@ -96,8 +96,8 @@ void __udelay(unsigned long usec)
|
|||
void reset_timer_masked(void)
|
||||
{
|
||||
/* reset time, capture current incrementer value time */
|
||||
lastinc = readl(&timer_base->tcrr) / (TIMER_CLOCK / CONFIG_SYS_HZ);
|
||||
timestamp = 0; /* start "advancing" time stamp from 0 */
|
||||
gd->lastinc = readl(&timer_base->tcrr) / (TIMER_CLOCK / CONFIG_SYS_HZ);
|
||||
gd->tbl = 0; /* start "advancing" time stamp from 0 */
|
||||
}
|
||||
|
||||
ulong get_timer_masked(void)
|
||||
|
@ -105,14 +105,14 @@ ulong get_timer_masked(void)
|
|||
/* current tick value */
|
||||
ulong now = readl(&timer_base->tcrr) / (TIMER_CLOCK / CONFIG_SYS_HZ);
|
||||
|
||||
if (now >= lastinc) /* normal mode (non roll) */
|
||||
if (now >= gd->lastinc) /* normal mode (non roll) */
|
||||
/* move stamp fordward with absoulte diff ticks */
|
||||
timestamp += (now - lastinc);
|
||||
gd->tbl += (now - gd->lastinc);
|
||||
else /* we have rollover of incrementer */
|
||||
timestamp += ((TIMER_LOAD_VAL / (TIMER_CLOCK / CONFIG_SYS_HZ))
|
||||
- lastinc) + now;
|
||||
lastinc = now;
|
||||
return timestamp;
|
||||
gd->tbl += ((TIMER_LOAD_VAL / (TIMER_CLOCK / CONFIG_SYS_HZ))
|
||||
- gd->lastinc) + now;
|
||||
gd->lastinc = now;
|
||||
return gd->tbl;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <asm/arch/sys_proto.h>
|
||||
#include <asm/arch/emif4.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
extern omap3_sysinfo sysinfo;
|
||||
|
||||
static emif4_t *emif4_base = (emif4_t *)OMAP34XX_SDRC_BASE;
|
||||
|
@ -139,7 +140,6 @@ void do_emif4_init(void)
|
|||
*/
|
||||
int dram_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
unsigned int size0 = 0, size1 = 0;
|
||||
|
||||
size0 = get_sdr_cs_size(CS0);
|
||||
|
@ -157,7 +157,6 @@ int dram_init(void)
|
|||
|
||||
void dram_init_banksize (void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
unsigned int size0 = 0, size1 = 0;
|
||||
|
||||
size0 = get_sdr_cs_size(CS0);
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include <asm/arch/mem.h>
|
||||
#include <asm/arch/sys_proto.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
extern omap3_sysinfo sysinfo;
|
||||
|
||||
static struct sdrc *sdrc_base = (struct sdrc *)OMAP34XX_SDRC_BASE;
|
||||
|
@ -172,7 +173,6 @@ void do_sdrc_init(u32 cs, u32 early)
|
|||
*/
|
||||
int dram_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
unsigned int size0 = 0, size1 = 0;
|
||||
|
||||
size0 = get_sdr_cs_size(CS0);
|
||||
|
@ -194,7 +194,6 @@ int dram_init(void)
|
|||
|
||||
void dram_init_banksize (void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
unsigned int size0 = 0, size1 = 0;
|
||||
|
||||
size0 = get_sdr_cs_size(CS0);
|
||||
|
|
|
@ -209,7 +209,7 @@ fixabs:
|
|||
mov r1, r1, LSR #4 /* r1 <- symbol index in .dynsym */
|
||||
add r1, r10, r1 /* r1 <- address of symbol in table */
|
||||
ldr r1, [r1, #4] /* r1 <- symbol value */
|
||||
add r1, r9 /* r1 <- relocated sym addr */
|
||||
add r1, r1, r9 /* r1 <- relocated sym addr */
|
||||
b fixnext
|
||||
fixrel:
|
||||
/* relative fix: increase location by offset */
|
||||
|
|
|
@ -333,7 +333,7 @@ fixabs:
|
|||
mov r1, r1, LSR #4 /* r1 <- symbol index in .dynsym */
|
||||
add r1, r10, r1 /* r1 <- address of symbol in table */
|
||||
ldr r1, [r1, #4] /* r1 <- symbol value */
|
||||
add r1, r9 /* r1 <- relocated sym addr */
|
||||
add r1, r1, r9 /* r1 <- relocated sym addr */
|
||||
b fixnext
|
||||
fixrel:
|
||||
/* relative fix: increase location by offset */
|
||||
|
|
|
@ -220,7 +220,7 @@ fixabs:
|
|||
mov r1, r1, LSR #4 /* r1 <- symbol index in .dynsym */
|
||||
add r1, r10, r1 /* r1 <- address of symbol in table */
|
||||
ldr r1, [r1, #4] /* r1 <- symbol value */
|
||||
add r1, r9 /* r1 <- relocated sym addr */
|
||||
add r1, r1, r9 /* r1 <- relocated sym addr */
|
||||
b fixnext
|
||||
fixrel:
|
||||
/* relative fix: increase location by offset */
|
||||
|
|
|
@ -287,7 +287,7 @@ fixabs:
|
|||
mov r1, r1, LSR #4 /* r1 <- symbol index in .dynsym */
|
||||
add r1, r10, r1 /* r1 <- address of symbol in table */
|
||||
ldr r1, [r1, #4] /* r1 <- symbol value */
|
||||
add r1, r9 /* r1 <- relocated sym addr */
|
||||
add r1, r1, r9 /* r1 <- relocated sym addr */
|
||||
b fixnext
|
||||
fixrel:
|
||||
/* relative fix: increase location by offset */
|
||||
|
|
|
@ -192,7 +192,7 @@ fixabs:
|
|||
mov r1, r1, LSR #4 /* r1 <- symbol index in .dynsym */
|
||||
add r1, r10, r1 /* r1 <- address of symbol in table */
|
||||
ldr r1, [r1, #4] /* r1 <- symbol value */
|
||||
add r1, r9 /* r1 <- relocated sym addr */
|
||||
add r1, r1, r9 /* r1 <- relocated sym addr */
|
||||
b fixnext
|
||||
fixrel:
|
||||
/* relative fix: increase location by offset */
|
||||
|
|
|
@ -196,7 +196,7 @@ fixabs:
|
|||
mov r1, r1, LSR #4 /* r1 <- symbol index in .dynsym */
|
||||
add r1, r10, r1 /* r1 <- address of symbol in table */
|
||||
ldr r1, [r1, #4] /* r1 <- symbol value */
|
||||
add r1, r9 /* r1 <- relocated sym addr */
|
||||
add r1, r1, r9 /* r1 <- relocated sym addr */
|
||||
b fixnext
|
||||
fixrel:
|
||||
/* relative fix: increase location by offset */
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
/*=======*/
|
||||
#define DV_EVM
|
||||
#define CONFIG_SYS_NAND_SMALLPAGE
|
||||
#define CONFIG_SYS_USE_NOR
|
||||
#define CONFIG_SYS_USE_NAND
|
||||
#define CONFIG_DISPLAY_CPUINFO
|
||||
/*===================*/
|
||||
/* SoC Configuration */
|
||||
|
@ -78,6 +78,7 @@
|
|||
#define CONFIG_STACKSIZE (256*1024) /* regular stack */
|
||||
#define PHYS_SDRAM_1 0x80000000 /* DDR Start */
|
||||
#define PHYS_SDRAM_1_SIZE 0x10000000 /* DDR size 256MB */
|
||||
|
||||
#define DDR_8BANKS /* 8-bank DDR2 (256MB) */
|
||||
/*====================*/
|
||||
/* Serial Driver info */
|
||||
|
@ -228,11 +229,13 @@
|
|||
#define CONFIG_PREBOOT "usb start"
|
||||
#endif
|
||||
#endif
|
||||
/*=======================*/
|
||||
/* KGDB support (if any) */
|
||||
/*=======================*/
|
||||
#ifdef CONFIG_CMD_KGDB
|
||||
#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */
|
||||
#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */
|
||||
#endif
|
||||
|
||||
#define CONFIG_MAX_RAM_BANK_SIZE (256 << 20) /* 256 MB */
|
||||
|
||||
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
|
||||
#define CONFIG_SYS_INIT_RAM_SIZE 0x1000
|
||||
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + \
|
||||
CONFIG_SYS_INIT_RAM_SIZE - \
|
||||
GENERATED_GBL_DATA_SIZE)
|
||||
|
||||
#endif /* __CONFIG_H */
|
||||
|
|
Loading…
Reference in a new issue