mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-12 14:47:22 +03:00
Compare commits
113 Commits
v2010.12-r
...
v2010.12
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
250ef02984 | ||
|
|
2956532625 | ||
|
|
71aab09b2c | ||
|
|
b606ef41f6 | ||
|
|
030955c2ca | ||
|
|
63786d299d | ||
|
|
4a6ee172c3 | ||
|
|
d42f60ffca | ||
|
|
9a4d50e34d | ||
|
|
94c08a20fc | ||
|
|
73c65e0e77 | ||
|
|
2a9a2339a4 | ||
|
|
85579906cb | ||
|
|
3ac45988ab | ||
|
|
d177e444a6 | ||
|
|
fc1ff1971a | ||
|
|
8a16f9c674 | ||
|
|
11e238d6e6 | ||
|
|
ebc3c6cfe6 | ||
|
|
f74e142eaa | ||
|
|
39041a40a6 | ||
|
|
a138d96aa8 | ||
|
|
f805548b28 | ||
|
|
b06b1633f5 | ||
|
|
b5d58d8500 | ||
|
|
6741b5310f | ||
|
|
4f81bf4368 | ||
|
|
6e110d295f | ||
|
|
9a2a05a4a3 | ||
|
|
37ee3ccce7 | ||
|
|
510f794c89 | ||
|
|
767589a7b2 | ||
|
|
37805cf1db | ||
|
|
f8689b9eb3 | ||
|
|
63440c4a80 | ||
|
|
3600945b5a | ||
|
|
054289f752 | ||
|
|
fdb9482b42 | ||
|
|
2c1764efc2 | ||
|
|
9fd84915a9 | ||
|
|
72c96a6802 | ||
|
|
ee3894c681 | ||
|
|
b03c8403cd | ||
|
|
aac0b4b6c1 | ||
|
|
e465cf2377 | ||
|
|
ac8983bcba | ||
|
|
7ea23555f5 | ||
|
|
f9de0997d7 | ||
|
|
b9c5081d7d | ||
|
|
1f52d89f2b | ||
|
|
a1a47d3c57 | ||
|
|
a78fb68f71 | ||
|
|
bb141079d3 | ||
|
|
296cae732b | ||
|
|
44b0a386bc | ||
|
|
9d37cf310a | ||
|
|
7d38f87474 | ||
|
|
b097b9282c | ||
|
|
a430b137eb | ||
|
|
a429db7e3c | ||
|
|
305bf489d1 | ||
|
|
0a41edaabb | ||
|
|
3a4ff8b3cd | ||
|
|
066df1a5d6 | ||
|
|
d55c5c3f81 | ||
|
|
accef43145 | ||
|
|
2aed9d14cc | ||
|
|
59bbb3a8ce | ||
|
|
2111cb44a7 | ||
|
|
068a208b4a | ||
|
|
f12af1f38d | ||
|
|
f61f59da0f | ||
|
|
64b6817848 | ||
|
|
2f15cfd187 | ||
|
|
b1a14f8a1c | ||
|
|
9a2ea578bc | ||
|
|
cb9c09d487 | ||
|
|
f550c521e1 | ||
|
|
14f88c43fc | ||
|
|
888279b5ed | ||
|
|
558710b98b | ||
|
|
9de0aa7447 | ||
|
|
49733aa0b9 | ||
|
|
f8264e015e | ||
|
|
b194577b29 | ||
|
|
a55bb8340b | ||
|
|
52eb2c7911 | ||
|
|
83b622aa88 | ||
|
|
3410a994e5 | ||
|
|
a7bf3ecc71 | ||
|
|
e45c98ad35 | ||
|
|
0b72585796 | ||
|
|
998f4caf6f | ||
|
|
25435c6cce | ||
|
|
5ec789f6cb | ||
|
|
e2b5afc1bf | ||
|
|
2024b968ee | ||
|
|
d3b0d628b0 | ||
|
|
177feff303 | ||
|
|
98877c3c0e | ||
|
|
279c8283db | ||
|
|
aa82d5f2a6 | ||
|
|
13acfc6f7f | ||
|
|
f899198a7f | ||
|
|
84c611d33b | ||
|
|
35cf884de2 | ||
|
|
bb7fc5744d | ||
|
|
de9b5b12a7 | ||
|
|
565e39c577 | ||
|
|
a676cca41d | ||
|
|
464ce9489b | ||
|
|
1032d97496 | ||
|
|
37a3bda0c9 |
@@ -310,10 +310,11 @@ Tirumala Marri <tmarri@apm.com>
|
||||
|
||||
bluestone APM821XX
|
||||
|
||||
Reinhard Meyer <r.meyer@emk-elektronik.de>
|
||||
Reinhard Meyer <reinhard.meyer@emk-elektronik.de>
|
||||
|
||||
TOP860 MPC860T
|
||||
TOP5200 MPC5200
|
||||
TOP9000 ARM926EJS (AT91SAM9xxx SoC)
|
||||
|
||||
Tolunay Orkun <torkun@nextio.com>
|
||||
|
||||
|
||||
18
MAKEALL
18
MAKEALL
@@ -187,6 +187,7 @@ boards_by_field()
|
||||
}
|
||||
boards_by_arch() { boards_by_field 2 "$@" ; }
|
||||
boards_by_cpu() { boards_by_field 3 "$@" ; }
|
||||
boards_by_soc() { boards_by_field 6 "$@" ; }
|
||||
|
||||
#########################################################################
|
||||
## MPC5xx Systems
|
||||
@@ -439,11 +440,8 @@ LIST_ARMV7=" \
|
||||
## AT91 Systems
|
||||
#########################################################################
|
||||
|
||||
LIST_at91=" \
|
||||
afeb9260 \
|
||||
at91cap9adk \
|
||||
at91rm9200dk \
|
||||
at91rm9200ek \
|
||||
LIST_at91="$(boards_by_soc at91)\
|
||||
$(boards_by_soc at91rm9200)\
|
||||
at91sam9260ek \
|
||||
at91sam9261ek \
|
||||
at91sam9263ek \
|
||||
@@ -451,19 +449,9 @@ LIST_at91=" \
|
||||
at91sam9g20ek \
|
||||
at91sam9m10g45ek \
|
||||
at91sam9rlek \
|
||||
cmc_pu2 \
|
||||
CPUAT91 \
|
||||
CPU9260 \
|
||||
CPU9G20 \
|
||||
csb637 \
|
||||
eb_cpux9k2 \
|
||||
kb9202 \
|
||||
meesc \
|
||||
mp2usb \
|
||||
m501sk \
|
||||
otc570 \
|
||||
pm9261 \
|
||||
pm9263 \
|
||||
pm9g45 \
|
||||
SBC35_A9G20 \
|
||||
TNY_A9260 \
|
||||
|
||||
5
Makefile
5
Makefile
@@ -24,7 +24,7 @@
|
||||
VERSION = 2010
|
||||
PATCHLEVEL = 12
|
||||
SUBLEVEL =
|
||||
EXTRAVERSION = -rc2
|
||||
EXTRAVERSION =
|
||||
ifneq "$(SUBLEVEL)" ""
|
||||
U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
|
||||
else
|
||||
@@ -185,9 +185,6 @@ LIBS += lib/lzma/liblzma.o
|
||||
LIBS += lib/lzo/liblzo.o
|
||||
LIBS += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \
|
||||
"board/$(VENDOR)/common/lib$(VENDOR).o"; fi)
|
||||
ifdef CONFIG_FSL_DIU_FB
|
||||
LIBS += board/freescale/common/libfreescale.o
|
||||
endif
|
||||
LIBS += $(CPUDIR)/lib$(CPU).o
|
||||
ifdef SOC
|
||||
LIBS += $(CPUDIR)/$(SOC)/lib$(SOC).o
|
||||
|
||||
@@ -160,6 +160,7 @@ next:
|
||||
/* Set stackpointer in internal RAM to call board_init_f */
|
||||
call_board_init_f:
|
||||
ldr sp, =(CONFIG_SYS_INIT_SP_ADDR)
|
||||
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
|
||||
ldr r0,=0x00000000
|
||||
|
||||
#ifdef CONFIG_NAND_SPL
|
||||
@@ -186,22 +187,22 @@ relocate_code:
|
||||
mov r4, r0 /* save addr_sp */
|
||||
mov r5, r1 /* save addr of gd */
|
||||
mov r6, r2 /* save addr of destination */
|
||||
mov r7, r2 /* save addr of destination */
|
||||
|
||||
/* Set up the stack */
|
||||
stack_setup:
|
||||
mov sp, r4
|
||||
|
||||
adr r0, _start
|
||||
cmp r0, r6
|
||||
beq clear_bss /* skip relocation */
|
||||
mov r1, r6 /* r1 <- scratch for copy_loop */
|
||||
ldr r2, _TEXT_BASE
|
||||
ldr r3, _bss_start_ofs
|
||||
add r2, r0, r3 /* r2 <- source end address */
|
||||
cmp r0, r6
|
||||
beq clear_bss
|
||||
|
||||
copy_loop:
|
||||
ldmia r0!, {r9-r10} /* copy from source address [r0] */
|
||||
stmia r6!, {r9-r10} /* copy to target address [r1] */
|
||||
stmia r1!, {r9-r10} /* copy to target address [r1] */
|
||||
cmp r0, r2 /* until source end address [r2] */
|
||||
blo copy_loop
|
||||
|
||||
@@ -210,7 +211,7 @@ copy_loop:
|
||||
* fix .rel.dyn relocations
|
||||
*/
|
||||
ldr r0, _TEXT_BASE /* r0 <- Text base */
|
||||
sub r9, r7, r0 /* r9 <- relocation offset */
|
||||
sub r9, r6, r0 /* r9 <- relocation offset */
|
||||
ldr r10, _dynsym_start_ofs /* r10 <- sym table ofs */
|
||||
add r10, r10, r0 /* r10 <- sym table in FLASH */
|
||||
ldr r2, _rel_dyn_start_ofs /* r2 <- rel dyn start ofs */
|
||||
@@ -221,10 +222,10 @@ fixloop:
|
||||
ldr r0, [r2] /* r0 <- location to fix up, IN FLASH! */
|
||||
add r0, r0, r9 /* r0 <- location to fix up in RAM */
|
||||
ldr r1, [r2, #4]
|
||||
and r8, r1, #0xff
|
||||
cmp r8, #23 /* relative fixup? */
|
||||
and r7, r1, #0xff
|
||||
cmp r7, #23 /* relative fixup? */
|
||||
beq fixrel
|
||||
cmp r8, #2 /* absolute fixup? */
|
||||
cmp r7, #2 /* absolute fixup? */
|
||||
beq fixabs
|
||||
/* ignore unknown type of fixup */
|
||||
b fixnext
|
||||
@@ -233,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 */
|
||||
@@ -251,7 +252,7 @@ clear_bss:
|
||||
ldr r0, _bss_start_ofs
|
||||
ldr r1, _bss_end_ofs
|
||||
ldr r3, _TEXT_BASE /* Text base */
|
||||
mov r4, r7 /* reloc addr */
|
||||
mov r4, r6 /* reloc addr */
|
||||
add r0, r0, r4
|
||||
add r1, r1, r4
|
||||
mov r2, #0x00000000 /* clear */
|
||||
@@ -280,7 +281,7 @@ jump_2_ram:
|
||||
add lr, lr, r9
|
||||
/* setup parameters for board_init_r */
|
||||
mov r0, r5 /* gd_t */
|
||||
mov r1, r7 /* dest_addr */
|
||||
mov r1, r6 /* dest_addr */
|
||||
/* jump to it ... */
|
||||
mov pc, lr
|
||||
|
||||
|
||||
@@ -223,6 +223,7 @@ skip_tcmdisable:
|
||||
/* Set stackpointer in internal RAM to call board_init_f */
|
||||
call_board_init_f:
|
||||
ldr sp, =(CONFIG_SYS_INIT_SP_ADDR)
|
||||
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
|
||||
ldr r0,=0x00000000
|
||||
bl board_init_f
|
||||
|
||||
@@ -240,22 +241,22 @@ relocate_code:
|
||||
mov r4, r0 /* save addr_sp */
|
||||
mov r5, r1 /* save addr of gd */
|
||||
mov r6, r2 /* save addr of destination */
|
||||
mov r7, r2 /* save addr of destination */
|
||||
|
||||
/* Set up the stack */
|
||||
stack_setup:
|
||||
mov sp, r4
|
||||
|
||||
adr r0, _start
|
||||
cmp r0, r6
|
||||
beq clear_bss /* skip relocation */
|
||||
mov r1, r6 /* r1 <- scratch for copy_loop */
|
||||
ldr r2, _TEXT_BASE
|
||||
ldr r3, _bss_start_ofs
|
||||
add r2, r0, r3 /* r2 <- source end address */
|
||||
cmp r0, r6
|
||||
beq clear_bss
|
||||
|
||||
copy_loop:
|
||||
ldmia r0!, {r9-r10} /* copy from source address [r0] */
|
||||
stmia r6!, {r9-r10} /* copy to target address [r1] */
|
||||
stmia r1!, {r9-r10} /* copy to target address [r1] */
|
||||
cmp r0, r2 /* until source end address [r2] */
|
||||
blo copy_loop
|
||||
|
||||
@@ -264,7 +265,7 @@ copy_loop:
|
||||
* fix .rel.dyn relocations
|
||||
*/
|
||||
ldr r0, _TEXT_BASE /* r0 <- Text base */
|
||||
sub r9, r7, r0 /* r9 <- relocation offset */
|
||||
sub r9, r6, r0 /* r9 <- relocation offset */
|
||||
ldr r10, _dynsym_start_ofs /* r10 <- sym table ofs */
|
||||
add r10, r10, r0 /* r10 <- sym table in FLASH */
|
||||
ldr r2, _rel_dyn_start_ofs /* r2 <- rel dyn start ofs */
|
||||
@@ -275,10 +276,10 @@ fixloop:
|
||||
ldr r0, [r2] /* r0 <- location to fix up, IN FLASH! */
|
||||
add r0, r0, r9 /* r0 <- location to fix up in RAM */
|
||||
ldr r1, [r2, #4]
|
||||
and r8, r1, #0xff
|
||||
cmp r8, #23 /* relative fixup? */
|
||||
and r7, r1, #0xff
|
||||
cmp r7, #23 /* relative fixup? */
|
||||
beq fixrel
|
||||
cmp r8, #2 /* absolute fixup? */
|
||||
cmp r7, #2 /* absolute fixup? */
|
||||
beq fixabs
|
||||
/* ignore unknown type of fixup */
|
||||
b fixnext
|
||||
@@ -287,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 */
|
||||
@@ -343,7 +344,7 @@ clear_bss:
|
||||
ldr r0, _bss_start_ofs
|
||||
ldr r1, _bss_end_ofs
|
||||
ldr r3, _TEXT_BASE /* Text base */
|
||||
mov r4, r7 /* reloc addr */
|
||||
mov r4, r6 /* reloc addr */
|
||||
add r0, r0, r4
|
||||
add r1, r1, r4
|
||||
mov r2, #0x00000000 /* clear */
|
||||
@@ -372,7 +373,7 @@ _nand_boot: .word nand_boot
|
||||
add lr, lr, r9
|
||||
/* setup parameters for board_init_r */
|
||||
mov r0, r5 /* gd_t */
|
||||
mov r1, r7 /* dest_addr */
|
||||
mov r1, r6 /* dest_addr */
|
||||
/* jump to it ... */
|
||||
mov pc, lr
|
||||
|
||||
|
||||
@@ -138,6 +138,7 @@ reset:
|
||||
/* Set stackpointer in internal RAM to call board_init_f */
|
||||
call_board_init_f:
|
||||
ldr sp, =(CONFIG_SYS_INIT_SP_ADDR)
|
||||
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
|
||||
ldr r0,=0x00000000
|
||||
bl board_init_f
|
||||
|
||||
@@ -155,22 +156,22 @@ relocate_code:
|
||||
mov r4, r0 /* save addr_sp */
|
||||
mov r5, r1 /* save addr of gd */
|
||||
mov r6, r2 /* save addr of destination */
|
||||
mov r7, r2 /* save addr of destination */
|
||||
|
||||
/* Set up the stack */
|
||||
stack_setup:
|
||||
mov sp, r4
|
||||
|
||||
adr r0, _start
|
||||
cmp r0, r6
|
||||
beq clear_bss /* skip relocation */
|
||||
mov r1, r6 /* r1 <- scratch for copy_loop */
|
||||
ldr r2, _TEXT_BASE
|
||||
ldr r3, _bss_start_ofs
|
||||
add r2, r0, r3 /* r2 <- source end address */
|
||||
cmp r0, r6
|
||||
beq clear_bss
|
||||
|
||||
copy_loop:
|
||||
ldmia r0!, {r9-r10} /* copy from source address [r0] */
|
||||
stmia r6!, {r9-r10} /* copy to target address [r1] */
|
||||
stmia r1!, {r9-r10} /* copy to target address [r1] */
|
||||
cmp r0, r2 /* until source end address [r2] */
|
||||
blo copy_loop
|
||||
|
||||
@@ -179,7 +180,7 @@ copy_loop:
|
||||
* fix .rel.dyn relocations
|
||||
*/
|
||||
ldr r0, _TEXT_BASE /* r0 <- Text base */
|
||||
sub r9, r7, r0 /* r9 <- relocation offset */
|
||||
sub r9, r6, r0 /* r9 <- relocation offset */
|
||||
ldr r10, _dynsym_start_ofs /* r10 <- sym table ofs */
|
||||
add r10, r10, r0 /* r10 <- sym table in FLASH */
|
||||
ldr r2, _rel_dyn_start_ofs /* r2 <- rel dyn start ofs */
|
||||
@@ -190,10 +191,10 @@ fixloop:
|
||||
ldr r0, [r2] /* r0 <- location to fix up, IN FLASH! */
|
||||
add r0, r0, r9 /* r0 <- location to fix up in RAM */
|
||||
ldr r1, [r2, #4]
|
||||
and r8, r1, #0xff
|
||||
cmp r8, #23 /* relative fixup? */
|
||||
and r7, r1, #0xff
|
||||
cmp r7, #23 /* relative fixup? */
|
||||
beq fixrel
|
||||
cmp r8, #2 /* absolute fixup? */
|
||||
cmp r7, #2 /* absolute fixup? */
|
||||
beq fixabs
|
||||
/* ignore unknown type of fixup */
|
||||
b fixnext
|
||||
@@ -202,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 */
|
||||
@@ -220,7 +221,7 @@ clear_bss:
|
||||
ldr r0, _bss_start_ofs
|
||||
ldr r1, _bss_end_ofs
|
||||
ldr r3, _TEXT_BASE /* Text base */
|
||||
mov r4, r7 /* reloc addr */
|
||||
mov r4, r6 /* reloc addr */
|
||||
add r0, r0, r4
|
||||
add r1, r1, r4
|
||||
mov r2, #0x00000000 /* clear */
|
||||
@@ -244,7 +245,7 @@ clbss_l:str r2, [r0] /* clear loop... */
|
||||
add lr, lr, r9
|
||||
/* setup parameters for board_init_r */
|
||||
mov r0, r5 /* gd_t */
|
||||
mov r1, r7 /* dest_addr */
|
||||
mov r1, r6 /* dest_addr */
|
||||
/* jump to it ... */
|
||||
mov pc, lr
|
||||
|
||||
|
||||
@@ -35,7 +35,10 @@
|
||||
#include <asm/arch/hardware.h>
|
||||
#include <asm/arch/at91_st.h>
|
||||
|
||||
void board_reset(void) __attribute__((__weak__));
|
||||
void __attribute__((weak)) board_reset(void)
|
||||
{
|
||||
/* true empty function for defining weak symbol */
|
||||
}
|
||||
|
||||
void reset_cpu(ulong ignored)
|
||||
{
|
||||
@@ -45,8 +48,7 @@ void reset_cpu(ulong ignored)
|
||||
serial_exit();
|
||||
#endif
|
||||
|
||||
if (board_reset)
|
||||
board_reset();
|
||||
board_reset();
|
||||
|
||||
/* Reset the cpu by setting up the watchdog timer */
|
||||
writel(AT91_ST_WDMR_RSTEN | AT91_ST_WDMR_EXTEN | AT91_ST_WDMR_WDV(2),
|
||||
|
||||
@@ -32,17 +32,16 @@
|
||||
|
||||
#include <common.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/arch/io.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
#include <asm/arch/at91_tc.h>
|
||||
#include <asm/arch/at91_pmc.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
/* the number of clocks per CONFIG_SYS_HZ */
|
||||
#define TIMER_LOAD_VAL (CONFIG_SYS_HZ_CLOCK/CONFIG_SYS_HZ)
|
||||
|
||||
static u32 timestamp;
|
||||
static u32 lastinc;
|
||||
|
||||
int timer_init(void)
|
||||
{
|
||||
at91_tc_t *tc = (at91_tc_t *) AT91_TC_BASE;
|
||||
@@ -64,8 +63,8 @@ int timer_init(void)
|
||||
writel(TIMER_LOAD_VAL, &tc->tc[0].rc);
|
||||
|
||||
writel(AT91_TC_CCR_SWTRG | AT91_TC_CCR_CLKEN, &tc->tc[0].ccr);
|
||||
lastinc = 0;
|
||||
timestamp = 0;
|
||||
gd->lastinc = 0;
|
||||
gd->tbl = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -86,7 +85,7 @@ ulong get_timer(ulong base)
|
||||
|
||||
void set_timer(ulong t)
|
||||
{
|
||||
timestamp = t;
|
||||
gd->tbl = t;
|
||||
}
|
||||
|
||||
void __udelay(unsigned long usec)
|
||||
@@ -98,8 +97,8 @@ void reset_timer_masked(void)
|
||||
{
|
||||
/* reset time */
|
||||
at91_tc_t *tc = (at91_tc_t *) AT91_TC_BASE;
|
||||
lastinc = readl(&tc->tc[0].cv) & 0x0000ffff;
|
||||
timestamp = 0;
|
||||
gd->lastinc = readl(&tc->tc[0].cv) & 0x0000ffff;
|
||||
gd->tbl = 0;
|
||||
}
|
||||
|
||||
ulong get_timer_raw(void)
|
||||
@@ -109,16 +108,16 @@ ulong get_timer_raw(void)
|
||||
|
||||
now = readl(&tc->tc[0].cv) & 0x0000ffff;
|
||||
|
||||
if (now >= lastinc) {
|
||||
if (now >= gd->lastinc) {
|
||||
/* normal mode */
|
||||
timestamp += now - lastinc;
|
||||
gd->tbl += now - gd->lastinc;
|
||||
} else {
|
||||
/* we have an overflow ... */
|
||||
timestamp += now + TIMER_LOAD_VAL - lastinc;
|
||||
gd->tbl += now + TIMER_LOAD_VAL - gd->lastinc;
|
||||
}
|
||||
lastinc = now;
|
||||
gd->lastinc = now;
|
||||
|
||||
return timestamp;
|
||||
return gd->tbl;
|
||||
}
|
||||
|
||||
ulong get_timer_masked(void)
|
||||
|
||||
@@ -184,6 +184,7 @@ copyex:
|
||||
/* Set stackpointer in internal RAM to call board_init_f */
|
||||
call_board_init_f:
|
||||
ldr sp, =(CONFIG_SYS_INIT_SP_ADDR)
|
||||
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
|
||||
ldr r0,=0x00000000
|
||||
bl board_init_f
|
||||
|
||||
@@ -201,22 +202,22 @@ relocate_code:
|
||||
mov r4, r0 /* save addr_sp */
|
||||
mov r5, r1 /* save addr of gd */
|
||||
mov r6, r2 /* save addr of destination */
|
||||
mov r7, r2 /* save addr of destination */
|
||||
|
||||
/* Set up the stack */
|
||||
stack_setup:
|
||||
mov sp, r4
|
||||
|
||||
adr r0, _start
|
||||
cmp r0, r6
|
||||
beq clear_bss /* skip relocation */
|
||||
mov r1, r6 /* r1 <- scratch for copy_loop */
|
||||
ldr r2, _TEXT_BASE
|
||||
ldr r3, _bss_start_ofs
|
||||
add r2, r0, r3 /* r2 <- source end address */
|
||||
cmp r0, r6
|
||||
beq clear_bss
|
||||
|
||||
copy_loop:
|
||||
ldmia r0!, {r9-r10} /* copy from source address [r0] */
|
||||
stmia r6!, {r9-r10} /* copy to target address [r1] */
|
||||
stmia r1!, {r9-r10} /* copy to target address [r1] */
|
||||
cmp r0, r2 /* until source end address [r2] */
|
||||
blo copy_loop
|
||||
|
||||
@@ -225,7 +226,7 @@ copy_loop:
|
||||
* fix .rel.dyn relocations
|
||||
*/
|
||||
ldr r0, _TEXT_BASE /* r0 <- Text base */
|
||||
sub r9, r7, r0 /* r9 <- relocation offset */
|
||||
sub r9, r6, r0 /* r9 <- relocation offset */
|
||||
ldr r10, _dynsym_start_ofs /* r10 <- sym table ofs */
|
||||
add r10, r10, r0 /* r10 <- sym table in FLASH */
|
||||
ldr r2, _rel_dyn_start_ofs /* r2 <- rel dyn start ofs */
|
||||
@@ -236,10 +237,10 @@ fixloop:
|
||||
ldr r0, [r2] /* r0 <- location to fix up, IN FLASH! */
|
||||
add r0, r0, r9 /* r0 <- location to fix up in RAM */
|
||||
ldr r1, [r2, #4]
|
||||
and r8, r1, #0xff
|
||||
cmp r8, #23 /* relative fixup? */
|
||||
and r7, r1, #0xff
|
||||
cmp r7, #23 /* relative fixup? */
|
||||
beq fixrel
|
||||
cmp r8, #2 /* absolute fixup? */
|
||||
cmp r7, #2 /* absolute fixup? */
|
||||
beq fixabs
|
||||
/* ignore unknown type of fixup */
|
||||
b fixnext
|
||||
@@ -248,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 */
|
||||
@@ -266,7 +267,7 @@ clear_bss:
|
||||
ldr r0, _bss_start_ofs
|
||||
ldr r1, _bss_end_ofs
|
||||
ldr r3, _TEXT_BASE /* Text base */
|
||||
mov r4, r7 /* reloc addr */
|
||||
mov r4, r6 /* reloc addr */
|
||||
add r0, r0, r4
|
||||
add r1, r1, r4
|
||||
mov r2, #0x00000000 /* clear */
|
||||
@@ -297,7 +298,7 @@ _nand_boot_ofs:
|
||||
add lr, lr, r9
|
||||
/* setup parameters for board_init_r */
|
||||
mov r0, r5 /* gd_t */
|
||||
mov r1, r7 /* dest_addr */
|
||||
mov r1, r6 /* dest_addr */
|
||||
/* jump to it ... */
|
||||
mov pc, lr
|
||||
|
||||
|
||||
@@ -175,6 +175,7 @@ poll1:
|
||||
/* Set stackpointer in internal RAM to call board_init_f */
|
||||
call_board_init_f:
|
||||
ldr sp, =(CONFIG_SYS_INIT_SP_ADDR)
|
||||
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
|
||||
ldr r0,=0x00000000
|
||||
bl board_init_f
|
||||
|
||||
@@ -192,22 +193,22 @@ relocate_code:
|
||||
mov r4, r0 /* save addr_sp */
|
||||
mov r5, r1 /* save addr of gd */
|
||||
mov r6, r2 /* save addr of destination */
|
||||
mov r7, r2 /* save addr of destination */
|
||||
|
||||
/* Set up the stack */
|
||||
stack_setup:
|
||||
mov sp, r4
|
||||
|
||||
adr r0, _start
|
||||
cmp r0, r6
|
||||
beq clear_bss /* skip relocation */
|
||||
mov r1, r6 /* r1 <- scratch for copy_loop */
|
||||
ldr r2, _TEXT_BASE
|
||||
ldr r3, _bss_start_ofs
|
||||
add r2, r0, r3 /* r2 <- source end address */
|
||||
cmp r0, r6
|
||||
beq clear_bss
|
||||
|
||||
copy_loop:
|
||||
ldmia r0!, {r9-r10} /* copy from source address [r0] */
|
||||
stmia r6!, {r9-r10} /* copy to target address [r1] */
|
||||
stmia r1!, {r9-r10} /* copy to target address [r1] */
|
||||
cmp r0, r2 /* until source end address [r2] */
|
||||
blo copy_loop
|
||||
|
||||
@@ -216,7 +217,7 @@ copy_loop:
|
||||
* fix .rel.dyn relocations
|
||||
*/
|
||||
ldr r0, _TEXT_BASE /* r0 <- Text base */
|
||||
sub r9, r7, r0 /* r9 <- relocation offset */
|
||||
sub r9, r6, r0 /* r9 <- relocation offset */
|
||||
ldr r10, _dynsym_start_ofs /* r10 <- sym table ofs */
|
||||
add r10, r10, r0 /* r10 <- sym table in FLASH */
|
||||
ldr r2, _rel_dyn_start_ofs /* r2 <- rel dyn start ofs */
|
||||
@@ -227,10 +228,10 @@ fixloop:
|
||||
ldr r0, [r2] /* r0 <- location to fix up, IN FLASH! */
|
||||
add r0, r0, r9 /* r0 <- location to fix up in RAM */
|
||||
ldr r1, [r2, #4]
|
||||
and r8, r1, #0xff
|
||||
cmp r8, #23 /* relative fixup? */
|
||||
and r7, r1, #0xff
|
||||
cmp r7, #23 /* relative fixup? */
|
||||
beq fixrel
|
||||
cmp r8, #2 /* absolute fixup? */
|
||||
cmp r7, #2 /* absolute fixup? */
|
||||
beq fixabs
|
||||
/* ignore unknown type of fixup */
|
||||
b fixnext
|
||||
@@ -239,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 */
|
||||
@@ -257,7 +258,7 @@ clear_bss:
|
||||
ldr r0, _bss_start_ofs
|
||||
ldr r1, _bss_end_ofs
|
||||
ldr r3, _TEXT_BASE /* Text base */
|
||||
mov r4, r7 /* reloc addr */
|
||||
mov r4, r6 /* reloc addr */
|
||||
add r0, r0, r4
|
||||
add r1, r1, r4
|
||||
mov r2, #0x00000000 /* clear */
|
||||
@@ -288,7 +289,7 @@ _nand_boot_ofs:
|
||||
add lr, lr, r9
|
||||
/* setup parameters for board_init_r */
|
||||
mov r0, r5 /* gd_t */
|
||||
mov r1, r7 /* dest_addr */
|
||||
mov r1, r6 /* dest_addr */
|
||||
/* jump to it ... */
|
||||
mov pc, lr
|
||||
|
||||
|
||||
@@ -204,6 +204,11 @@ void at91_macb_hw_init(void)
|
||||
#else
|
||||
at91_set_b_periph(AT91_PIO_PORTA, 23, 0); /* ETX2 */
|
||||
at91_set_b_periph(AT91_PIO_PORTA, 24, 0); /* ETX3 */
|
||||
#if defined(CONFIG_AT91SAM9G20)
|
||||
/* 9G20 BOOT ROM initializes those pins to multi-drive, undo that */
|
||||
at91_set_pio_multi_drive(AT91_PIO_PORTA, 23, 0);
|
||||
at91_set_pio_multi_drive(AT91_PIO_PORTA, 24, 0);
|
||||
#endif
|
||||
#endif
|
||||
at91_set_b_periph(AT91_PIO_PORTA, 22, 0); /* ETXER */
|
||||
#endif
|
||||
|
||||
@@ -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)
|
||||
;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -260,4 +260,16 @@ void mx25_fec_init_pins (void)
|
||||
writel (outpadctl, &padctl->pad_fec_tdata1);
|
||||
|
||||
}
|
||||
|
||||
void imx_get_mac_from_fuse(unsigned char *mac)
|
||||
{
|
||||
int i;
|
||||
struct iim_regs *iim = (struct iim_regs *)IMX_IIM_BASE;
|
||||
struct fuse_bank *bank = &iim->bank[0];
|
||||
struct fuse_bank0_regs *fuse =
|
||||
(struct fuse_bank0_regs *)bank->fuse_regs;
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
mac[i] = readl(&fuse->mac_addr[i]) & 0xff;
|
||||
}
|
||||
#endif /* CONFIG_FEC_MXC */
|
||||
|
||||
@@ -313,6 +313,18 @@ void mx27_fec_init_pins(void)
|
||||
for (i = 0; i < ARRAY_SIZE(mode); i++)
|
||||
imx_gpio_mode(mode[i]);
|
||||
}
|
||||
|
||||
void imx_get_mac_from_fuse(unsigned char *mac)
|
||||
{
|
||||
int i;
|
||||
struct iim_regs *iim = (struct iim_regs *)IMX_IIM_BASE;
|
||||
struct fuse_bank *bank = &iim->bank[0];
|
||||
struct fuse_bank0_regs *fuse =
|
||||
(struct fuse_bank0_regs *)bank->fuse_regs;
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
mac[6 - 1 - i] = readl(&fuse->mac_addr[i]) & 0xff;
|
||||
}
|
||||
#endif /* CONFIG_FEC_MXC */
|
||||
|
||||
#ifdef CONFIG_MXC_MMC
|
||||
|
||||
@@ -174,6 +174,7 @@ reset:
|
||||
/* Set stackpointer in internal RAM to call board_init_f */
|
||||
call_board_init_f:
|
||||
ldr sp, =(CONFIG_SYS_INIT_SP_ADDR)
|
||||
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
|
||||
ldr r0,=0x00000000
|
||||
bl board_init_f
|
||||
|
||||
@@ -191,22 +192,22 @@ relocate_code:
|
||||
mov r4, r0 /* save addr_sp */
|
||||
mov r5, r1 /* save addr of gd */
|
||||
mov r6, r2 /* save addr of destination */
|
||||
mov r7, r2 /* save addr of destination */
|
||||
|
||||
/* Set up the stack */
|
||||
stack_setup:
|
||||
mov sp, r4
|
||||
|
||||
adr r0, _start
|
||||
cmp r0, r6
|
||||
beq clear_bss /* skip relocation */
|
||||
mov r1, r6 /* r1 <- scratch for copy loop */
|
||||
ldr r2, _TEXT_BASE
|
||||
ldr r3, _bss_start_ofs
|
||||
add r2, r0, r3 /* r2 <- source end address */
|
||||
cmp r0, r6
|
||||
beq clear_bss
|
||||
|
||||
copy_loop:
|
||||
ldmia r0!, {r9-r10} /* copy from source address [r0] */
|
||||
stmia r6!, {r9-r10} /* copy to target address [r1] */
|
||||
stmia r1!, {r9-r10} /* copy to target address [r1] */
|
||||
cmp r0, r2 /* until source end address [r2] */
|
||||
blo copy_loop
|
||||
|
||||
@@ -215,7 +216,7 @@ copy_loop:
|
||||
* fix .rel.dyn relocations
|
||||
*/
|
||||
ldr r0, _TEXT_BASE /* r0 <- Text base */
|
||||
sub r9, r7, r0 /* r9 <- relocation offset */
|
||||
sub r9, r6, r0 /* r9 <- relocation offset */
|
||||
ldr r10, _dynsym_start_ofs /* r10 <- sym table ofs */
|
||||
add r10, r10, r0 /* r10 <- sym table in FLASH */
|
||||
ldr r2, _rel_dyn_start_ofs /* r2 <- rel dyn start ofs */
|
||||
@@ -226,10 +227,10 @@ fixloop:
|
||||
ldr r0, [r2] /* r0 <- location to fix up, IN FLASH! */
|
||||
add r0, r0, r9 /* r0 <- location to fix up in RAM */
|
||||
ldr r1, [r2, #4]
|
||||
and r8, r1, #0xff
|
||||
cmp r8, #23 /* relative fixup? */
|
||||
and r7, r1, #0xff
|
||||
cmp r7, #23 /* relative fixup? */
|
||||
beq fixrel
|
||||
cmp r8, #2 /* absolute fixup? */
|
||||
cmp r7, #2 /* absolute fixup? */
|
||||
beq fixabs
|
||||
/* ignore unknown type of fixup */
|
||||
b fixnext
|
||||
@@ -238,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 */
|
||||
@@ -256,7 +257,7 @@ clear_bss:
|
||||
ldr r0, _bss_start_ofs
|
||||
ldr r1, _bss_end_ofs
|
||||
ldr r3, _TEXT_BASE /* Text base */
|
||||
mov r4, r7 /* reloc addr */
|
||||
mov r4, r6 /* reloc addr */
|
||||
add r0, r0, r4
|
||||
add r1, r1, r4
|
||||
mov r2, #0x00000000 /* clear */
|
||||
@@ -287,7 +288,7 @@ _nand_boot_ofs:
|
||||
add lr, lr, r9
|
||||
/* setup parameters for board_init_r */
|
||||
mov r0, r5 /* gd_t */
|
||||
mov r1, r7 /* dest_addr */
|
||||
mov r1, r6 /* dest_addr */
|
||||
/* jump to it ... */
|
||||
mov pc, lr
|
||||
|
||||
|
||||
@@ -146,6 +146,7 @@ reset:
|
||||
/* Set stackpointer in internal RAM to call board_init_f */
|
||||
call_board_init_f:
|
||||
ldr sp, =(CONFIG_SYS_INIT_SP_ADDR)
|
||||
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
|
||||
ldr r0,=0x00000000
|
||||
bl board_init_f
|
||||
|
||||
@@ -163,22 +164,22 @@ relocate_code:
|
||||
mov r4, r0 /* save addr_sp */
|
||||
mov r5, r1 /* save addr of gd */
|
||||
mov r6, r2 /* save addr of destination */
|
||||
mov r7, r2 /* save addr of destination */
|
||||
|
||||
/* Set up the stack */
|
||||
stack_setup:
|
||||
mov sp, r4
|
||||
|
||||
adr r0, _start
|
||||
cmp r0, r6
|
||||
beq clear_bss /* skip relocation */
|
||||
mov r1, r6 /* r1 <- scratch for copy_loop */
|
||||
ldr r2, _TEXT_BASE
|
||||
ldr r3, _bss_start_ofs
|
||||
add r2, r0, r3 /* r2 <- source end address */
|
||||
cmp r0, r6
|
||||
beq clear_bss
|
||||
|
||||
copy_loop:
|
||||
ldmia r0!, {r9-r10} /* copy from source address [r0] */
|
||||
stmia r6!, {r9-r10} /* copy to target address [r1] */
|
||||
stmia r1!, {r9-r10} /* copy to target address [r1] */
|
||||
cmp r0, r2 /* until source end address [r2] */
|
||||
blo copy_loop
|
||||
|
||||
@@ -187,7 +188,7 @@ copy_loop:
|
||||
* fix .rel.dyn relocations
|
||||
*/
|
||||
ldr r0, _TEXT_BASE /* r0 <- Text base */
|
||||
sub r9, r7, r0 /* r9 <- relocation offset */
|
||||
sub r9, r6, r0 /* r9 <- relocation offset */
|
||||
ldr r10, _dynsym_start_ofs /* r10 <- sym table ofs */
|
||||
add r10, r10, r0 /* r10 <- sym table in FLASH */
|
||||
ldr r2, _rel_dyn_start_ofs /* r2 <- rel dyn start ofs */
|
||||
@@ -198,10 +199,10 @@ fixloop:
|
||||
ldr r0, [r2] /* r0 <- location to fix up, IN FLASH! */
|
||||
add r0, r0, r9 /* r0 <- location to fix up in RAM */
|
||||
ldr r1, [r2, #4]
|
||||
and r8, r1, #0xff
|
||||
cmp r8, #23 /* relative fixup? */
|
||||
and r7, r1, #0xff
|
||||
cmp r7, #23 /* relative fixup? */
|
||||
beq fixrel
|
||||
cmp r8, #2 /* absolute fixup? */
|
||||
cmp r7, #2 /* absolute fixup? */
|
||||
beq fixabs
|
||||
/* ignore unknown type of fixup */
|
||||
b fixnext
|
||||
@@ -210,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 */
|
||||
@@ -228,7 +229,7 @@ clear_bss:
|
||||
ldr r0, _bss_start_ofs
|
||||
ldr r1, _bss_end_ofs
|
||||
ldr r3, _TEXT_BASE /* Text base */
|
||||
mov r4, r7 /* reloc addr */
|
||||
mov r4, r6 /* reloc addr */
|
||||
add r0, r0, r4
|
||||
add r1, r1, r4
|
||||
mov r2, #0x00000000 /* clear */
|
||||
@@ -254,7 +255,7 @@ _nand_boot: .word nand_boot
|
||||
add lr, lr, r9
|
||||
/* setup parameters for board_init_r */
|
||||
mov r0, r5 /* gd_t */
|
||||
mov r1, r7 /* dest_addr */
|
||||
mov r1, r6 /* dest_addr */
|
||||
/* jump to it ... */
|
||||
mov pc, lr
|
||||
|
||||
|
||||
@@ -142,6 +142,7 @@ reset:
|
||||
/* Set stackpointer in internal RAM to call board_init_f */
|
||||
call_board_init_f:
|
||||
ldr sp, =(CONFIG_SYS_INIT_SP_ADDR)
|
||||
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
|
||||
ldr r0,=0x00000000
|
||||
bl board_init_f
|
||||
|
||||
@@ -159,22 +160,22 @@ relocate_code:
|
||||
mov r4, r0 /* save addr_sp */
|
||||
mov r5, r1 /* save addr of gd */
|
||||
mov r6, r2 /* save addr of destination */
|
||||
mov r7, r2 /* save addr of destination */
|
||||
|
||||
/* Set up the stack */
|
||||
stack_setup:
|
||||
mov sp, r4
|
||||
|
||||
adr r0, _start
|
||||
cmp r0, r6
|
||||
beq clear_bss /* skip relocation */
|
||||
mov r1, r6 /* r1 <- scratch for copy_loop */
|
||||
ldr r2, _TEXT_BASE
|
||||
ldr r3, _bss_start_ofs
|
||||
add r2, r0, r3 /* r2 <- source end address */
|
||||
cmp r0, r6
|
||||
beq clear_bss
|
||||
|
||||
copy_loop:
|
||||
ldmia r0!, {r9-r10} /* copy from source address [r0] */
|
||||
stmia r6!, {r9-r10} /* copy to target address [r1] */
|
||||
stmia r1!, {r9-r10} /* copy to target address [r1] */
|
||||
cmp r0, r2 /* until source end address [r2] */
|
||||
blo copy_loop
|
||||
|
||||
@@ -183,7 +184,7 @@ copy_loop:
|
||||
* fix .rel.dyn relocations
|
||||
*/
|
||||
ldr r0, _TEXT_BASE /* r0 <- Text base */
|
||||
sub r9, r7, r0 /* r9 <- relocation offset */
|
||||
sub r9, r6, r0 /* r9 <- relocation offset */
|
||||
ldr r10, _dynsym_start_ofs /* r10 <- sym table ofs */
|
||||
add r10, r10, r0 /* r10 <- sym table in FLASH */
|
||||
ldr r2, _rel_dyn_start_ofs /* r2 <- rel dyn start ofs */
|
||||
@@ -194,10 +195,10 @@ fixloop:
|
||||
ldr r0, [r2] /* r0 <- location to fix up, IN FLASH! */
|
||||
add r0, r0, r9 /* r0 <- location to fix up in RAM */
|
||||
ldr r1, [r2, #4]
|
||||
and r8, r1, #0xff
|
||||
cmp r8, #23 /* relative fixup? */
|
||||
and r7, r1, #0xff
|
||||
cmp r7, #23 /* relative fixup? */
|
||||
beq fixrel
|
||||
cmp r8, #2 /* absolute fixup? */
|
||||
cmp r7, #2 /* absolute fixup? */
|
||||
beq fixabs
|
||||
/* ignore unknown type of fixup */
|
||||
b fixnext
|
||||
@@ -206,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 */
|
||||
@@ -224,7 +225,7 @@ clear_bss:
|
||||
ldr r0, _bss_start_ofs
|
||||
ldr r1, _bss_end_ofs
|
||||
ldr r3, _TEXT_BASE /* Text base */
|
||||
mov r4, r7 /* reloc addr */
|
||||
mov r4, r6 /* reloc addr */
|
||||
add r0, r0, r4
|
||||
add r1, r1, r4
|
||||
mov r2, #0x00000000 /* clear */
|
||||
@@ -255,7 +256,7 @@ _nand_boot_ofs:
|
||||
add lr, lr, r9
|
||||
/* setup parameters for board_init_r */
|
||||
mov r0, r5 /* gd_t */
|
||||
mov r1, r7 /* dest_addr */
|
||||
mov r1, r6 /* dest_addr */
|
||||
/* jump to it ... */
|
||||
mov pc, lr
|
||||
|
||||
|
||||
@@ -100,6 +100,20 @@ int cpu_eth_init(bd_t *bis)
|
||||
return rc;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_FEC_MXC)
|
||||
void imx_get_mac_from_fuse(unsigned char *mac)
|
||||
{
|
||||
int i;
|
||||
struct iim_regs *iim = (struct iim_regs *)IMX_IIM_BASE;
|
||||
struct fuse_bank *bank = &iim->bank[1];
|
||||
struct fuse_bank1_regs *fuse =
|
||||
(struct fuse_bank1_regs *)bank->fuse_regs;
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
mac[i] = readl(&fuse->mac_addr[i]) & 0xff;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Initializes on-chip MMC controllers.
|
||||
* to override, implement board_mmc_init()
|
||||
|
||||
@@ -28,10 +28,12 @@
|
||||
#include <asm/arch/imx-regs.h>
|
||||
#include <asm/arch/clock.h>
|
||||
|
||||
#ifdef CONFIG_FSL_ESDHC
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
#endif
|
||||
|
||||
int get_clocks(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#ifdef CONFIG_FSL_ESDHC
|
||||
gd->sdhc_clk = mxc_get_clock(MXC_IPG_PERCLK);
|
||||
#endif
|
||||
|
||||
@@ -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;
|
||||
@@ -48,10 +49,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;
|
||||
}
|
||||
@@ -138,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);
|
||||
@@ -156,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);
|
||||
|
||||
@@ -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 = 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 / 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
|
||||
|
||||
@@ -142,6 +142,7 @@ next:
|
||||
/* Set stackpointer in internal RAM to call board_init_f */
|
||||
call_board_init_f:
|
||||
ldr sp, =(CONFIG_SYS_INIT_SP_ADDR)
|
||||
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
|
||||
ldr r0,=0x00000000
|
||||
bl board_init_f
|
||||
|
||||
@@ -159,24 +160,24 @@ relocate_code:
|
||||
mov r4, r0 /* save addr_sp */
|
||||
mov r5, r1 /* save addr of gd */
|
||||
mov r6, r2 /* save addr of destination */
|
||||
mov r7, r2 /* save addr of destination */
|
||||
|
||||
/* Set up the stack */
|
||||
stack_setup:
|
||||
mov sp, r4
|
||||
|
||||
adr r0, _start
|
||||
#ifndef CONFIG_PRELOADER
|
||||
cmp r0, r6
|
||||
beq clear_bss /* skip relocation */
|
||||
#endif
|
||||
mov r1, r6 /* r1 <- scratch for copy_loop */
|
||||
ldr r2, _TEXT_BASE
|
||||
ldr r3, _bss_start_ofs
|
||||
add r2, r0, r3 /* r2 <- source end address */
|
||||
cmp r0, r6
|
||||
#ifndef CONFIG_PRELOADER
|
||||
beq jump_2_ram
|
||||
#endif
|
||||
|
||||
copy_loop:
|
||||
ldmia r0!, {r9-r10} /* copy from source address [r0] */
|
||||
stmia r6!, {r9-r10} /* copy to target address [r1] */
|
||||
stmia r1!, {r9-r10} /* copy to target address [r1] */
|
||||
cmp r0, r2 /* until source end address [r2] */
|
||||
blo copy_loop
|
||||
|
||||
@@ -185,7 +186,7 @@ copy_loop:
|
||||
* fix .rel.dyn relocations
|
||||
*/
|
||||
ldr r0, _TEXT_BASE /* r0 <- Text base */
|
||||
sub r9, r7, r0 /* r9 <- relocation offset */
|
||||
sub r9, r6, r0 /* r9 <- relocation offset */
|
||||
ldr r10, _dynsym_start_ofs /* r10 <- sym table ofs */
|
||||
add r10, r10, r0 /* r10 <- sym table in FLASH */
|
||||
ldr r2, _rel_dyn_start_ofs /* r2 <- rel dyn start ofs */
|
||||
@@ -196,10 +197,10 @@ fixloop:
|
||||
ldr r0, [r2] /* r0 <- location to fix up, IN FLASH! */
|
||||
add r0, r0, r9 /* r0 <- location to fix up in RAM */
|
||||
ldr r1, [r2, #4]
|
||||
and r8, r1, #0xff
|
||||
cmp r8, #23 /* relative fixup? */
|
||||
and r7, r1, #0xff
|
||||
cmp r7, #23 /* relative fixup? */
|
||||
beq fixrel
|
||||
cmp r8, #2 /* absolute fixup? */
|
||||
cmp r7, #2 /* absolute fixup? */
|
||||
beq fixabs
|
||||
/* ignore unknown type of fixup */
|
||||
b fixnext
|
||||
@@ -208,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 */
|
||||
@@ -224,7 +225,7 @@ clear_bss:
|
||||
ldr r0, _bss_start_ofs
|
||||
ldr r1, _bss_end_ofs
|
||||
ldr r3, _TEXT_BASE /* Text base */
|
||||
mov r4, r7 /* reloc addr */
|
||||
mov r4, r6 /* reloc addr */
|
||||
add r0, r0, r4
|
||||
add r1, r1, r4
|
||||
mov r2, #0x00000000 /* clear */
|
||||
@@ -246,7 +247,7 @@ jump_2_ram:
|
||||
add lr, lr, r9
|
||||
/* setup parameters for board_init_r */
|
||||
mov r0, r5 /* gd_t */
|
||||
mov r1, r7 /* dest_addr */
|
||||
mov r1, r6 /* dest_addr */
|
||||
/* jump to it ... */
|
||||
mov pc, lr
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/sys_proto.h>
|
||||
|
||||
/************************************************************
|
||||
* sdelay() - simple spin loop. Will be constant time as
|
||||
|
||||
@@ -268,6 +268,7 @@ reset:
|
||||
/* Set stackpointer in internal RAM to call board_init_f */
|
||||
call_board_init_f:
|
||||
ldr sp, =(CONFIG_SYS_INIT_SP_ADDR)
|
||||
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
|
||||
ldr r0,=0x00000000
|
||||
bl board_init_f
|
||||
|
||||
@@ -285,22 +286,22 @@ relocate_code:
|
||||
mov r4, r0 /* save addr_sp */
|
||||
mov r5, r1 /* save addr of gd */
|
||||
mov r6, r2 /* save addr of destination */
|
||||
mov r7, r2 /* save addr of destination */
|
||||
|
||||
/* Set up the stack */
|
||||
stack_setup:
|
||||
mov sp, r4
|
||||
|
||||
adr r0, _start
|
||||
cmp r0, r6
|
||||
beq clear_bss /* skip relocation */
|
||||
mov r1, r6 /* r1 <- scratch for copy_loop */
|
||||
ldr r2, _TEXT_BASE
|
||||
ldr r3, _bss_start_ofs
|
||||
add r2, r0, r3 /* r2 <- source end address */
|
||||
cmp r0, r6
|
||||
beq clear_bss
|
||||
|
||||
copy_loop:
|
||||
ldmia r0!, {r9-r10} /* copy from source address [r0] */
|
||||
stmia r6!, {r9-r10} /* copy to target address [r1] */
|
||||
stmia r1!, {r9-r10} /* copy to target address [r1] */
|
||||
cmp r0, r2 /* until source end address [r2] */
|
||||
blo copy_loop
|
||||
|
||||
@@ -309,7 +310,7 @@ copy_loop:
|
||||
* fix .rel.dyn relocations
|
||||
*/
|
||||
ldr r0, _TEXT_BASE /* r0 <- Text base */
|
||||
sub r9, r7, r0 /* r9 <- relocation offset */
|
||||
sub r9, r6, r0 /* r9 <- relocation offset */
|
||||
ldr r10, _dynsym_start_ofs /* r10 <- sym table ofs */
|
||||
add r10, r10, r0 /* r10 <- sym table in FLASH */
|
||||
ldr r2, _rel_dyn_start_ofs /* r2 <- rel dyn start ofs */
|
||||
@@ -320,10 +321,10 @@ fixloop:
|
||||
ldr r0, [r2] /* r0 <- location to fix up, IN FLASH! */
|
||||
add r0, r0, r9 /* r0 <- location to fix up in RAM */
|
||||
ldr r1, [r2, #4]
|
||||
and r8, r1, #0xff
|
||||
cmp r8, #23 /* relative fixup? */
|
||||
and r7, r1, #0xff
|
||||
cmp r7, #23 /* relative fixup? */
|
||||
beq fixrel
|
||||
cmp r8, #2 /* absolute fixup? */
|
||||
cmp r7, #2 /* absolute fixup? */
|
||||
beq fixabs
|
||||
/* ignore unknown type of fixup */
|
||||
b fixnext
|
||||
@@ -332,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 */
|
||||
@@ -350,7 +351,7 @@ clear_bss:
|
||||
ldr r0, _bss_start_ofs
|
||||
ldr r1, _bss_end_ofs
|
||||
ldr r3, _TEXT_BASE /* Text base */
|
||||
mov r4, r7 /* reloc addr */
|
||||
mov r4, r6 /* reloc addr */
|
||||
add r0, r0, r4
|
||||
add r1, r1, r4
|
||||
mov r2, #0x00000000 /* clear */
|
||||
@@ -374,7 +375,7 @@ clbss_l:str r2, [r0] /* clear loop... */
|
||||
add lr, lr, r9
|
||||
/* setup parameters for board_init_r */
|
||||
mov r0, r5 /* gd_t */
|
||||
mov r1, r7 /* dest_addr */
|
||||
mov r1, r6 /* dest_addr */
|
||||
/* jump to it ... */
|
||||
mov pc, lr
|
||||
|
||||
|
||||
@@ -155,6 +155,7 @@ reset:
|
||||
/* Set stackpointer in internal RAM to call board_init_f */
|
||||
call_board_init_f:
|
||||
ldr sp, =(CONFIG_SYS_INIT_SP_ADDR)
|
||||
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
|
||||
ldr r0,=0x00000000
|
||||
bl board_init_f
|
||||
|
||||
@@ -172,22 +173,22 @@ relocate_code:
|
||||
mov r4, r0 /* save addr_sp */
|
||||
mov r5, r1 /* save addr of gd */
|
||||
mov r6, r2 /* save addr of destination */
|
||||
mov r7, r2 /* save addr of destination */
|
||||
|
||||
/* Set up the stack */
|
||||
stack_setup:
|
||||
mov sp, r4
|
||||
|
||||
adr r0, _start
|
||||
cmp r0, r6
|
||||
beq clear_bss /* skip relocation */
|
||||
mov r1, r6 /* r1 <- scratch for copy_loop */
|
||||
ldr r2, _TEXT_BASE
|
||||
ldr r3, _bss_start_ofs
|
||||
add r2, r0, r3 /* r2 <- source end address */
|
||||
cmp r0, r6
|
||||
beq clear_bss
|
||||
|
||||
copy_loop:
|
||||
ldmia r0!, {r9-r10} /* copy from source address [r0] */
|
||||
stmia r6!, {r9-r10} /* copy to target address [r1] */
|
||||
stmia r1!, {r9-r10} /* copy to target address [r1] */
|
||||
cmp r0, r2 /* until source end address [r2] */
|
||||
blo copy_loop
|
||||
|
||||
@@ -196,7 +197,7 @@ copy_loop:
|
||||
* fix .rel.dyn relocations
|
||||
*/
|
||||
ldr r0, _TEXT_BASE /* r0 <- Text base */
|
||||
sub r9, r7, r0 /* r9 <- relocation offset */
|
||||
sub r9, r6, r0 /* r9 <- relocation offset */
|
||||
ldr r10, _dynsym_start_ofs /* r10 <- sym table ofs */
|
||||
add r10, r10, r0 /* r10 <- sym table in FLASH */
|
||||
ldr r2, _rel_dyn_start_ofs /* r2 <- rel dyn start ofs */
|
||||
@@ -207,10 +208,10 @@ fixloop:
|
||||
ldr r0, [r2] /* r0 <- location to fix up, IN FLASH! */
|
||||
add r0, r0, r9 /* r0 <- location to fix up in RAM */
|
||||
ldr r1, [r2, #4]
|
||||
and r8, r1, #0xff
|
||||
cmp r8, #23 /* relative fixup? */
|
||||
and r7, r1, #0xff
|
||||
cmp r7, #23 /* relative fixup? */
|
||||
beq fixrel
|
||||
cmp r8, #2 /* absolute fixup? */
|
||||
cmp r7, #2 /* absolute fixup? */
|
||||
beq fixabs
|
||||
/* ignore unknown type of fixup */
|
||||
b fixnext
|
||||
@@ -219,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 */
|
||||
@@ -237,7 +238,7 @@ clear_bss:
|
||||
ldr r0, _bss_start_ofs
|
||||
ldr r1, _bss_end_ofs
|
||||
ldr r3, _TEXT_BASE /* Text base */
|
||||
mov r4, r7 /* reloc addr */
|
||||
mov r4, r6 /* reloc addr */
|
||||
add r0, r0, r4
|
||||
add r1, r1, r4
|
||||
mov r2, #0x00000000 /* clear */
|
||||
@@ -258,7 +259,7 @@ clbss_l:str r2, [r0] /* clear loop... */
|
||||
add lr, lr, r9
|
||||
/* setup parameters for board_init_r */
|
||||
mov r0, r5 /* gd_t */
|
||||
mov r1, r7 /* dest_addr */
|
||||
mov r1, r6 /* dest_addr */
|
||||
/* jump to it ... */
|
||||
mov pc, lr
|
||||
|
||||
|
||||
@@ -220,6 +220,7 @@ zerojmp:
|
||||
/* Set stackpointer in internal RAM to call board_init_f */
|
||||
call_board_init_f:
|
||||
ldr sp, =(CONFIG_SYS_INIT_SP_ADDR)
|
||||
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
|
||||
ldr r0,=0x00000000
|
||||
bl board_init_f
|
||||
|
||||
@@ -237,23 +238,23 @@ relocate_code:
|
||||
mov r4, r0 /* save addr_sp */
|
||||
mov r5, r1 /* save addr of gd */
|
||||
mov r6, r2 /* save addr of destination */
|
||||
mov r7, r2 /* save addr of destination */
|
||||
|
||||
/* Set up the stack */
|
||||
stack_setup:
|
||||
mov sp, r4
|
||||
|
||||
adr r0, _start
|
||||
cmp r0, r6
|
||||
beq clear_bss /* skip relocation */
|
||||
mov r1, r6 /* r1 <- scratch for copy_loop */
|
||||
ldr r2, _TEXT_BASE
|
||||
ldr r3, _bss_start_ofs
|
||||
add r2, r0, r3 /* r2 <- source end address */
|
||||
cmp r0, r6
|
||||
beq clear_bss
|
||||
|
||||
stmfd sp!, {r0-r12}
|
||||
copy_loop:
|
||||
ldmia r0!, {r3-r5, r7-r11} /* copy from source address [r0] */
|
||||
stmia r6!, {r3-r5, r7-r11} /* copy to target address [r1] */
|
||||
stmia r1!, {r3-r5, r7-r11} /* copy to target address [r1] */
|
||||
cmp r0, r2 /* until source end address [r2] */
|
||||
blo copy_loop
|
||||
ldmfd sp!, {r0-r12}
|
||||
@@ -263,7 +264,7 @@ copy_loop:
|
||||
* fix .rel.dyn relocations
|
||||
*/
|
||||
ldr r0, _TEXT_BASE /* r0 <- Text base */
|
||||
sub r9, r7, r0 /* r9 <- relocation offset */
|
||||
sub r9, r6, r0 /* r9 <- relocation offset */
|
||||
ldr r10, _dynsym_start_ofs /* r10 <- sym table ofs */
|
||||
add r10, r10, r0 /* r10 <- sym table in FLASH */
|
||||
ldr r2, _rel_dyn_start_ofs /* r2 <- rel dyn start ofs */
|
||||
@@ -274,10 +275,10 @@ fixloop:
|
||||
ldr r0, [r2] /* r0 <- location to fix up, IN FLASH! */
|
||||
add r0, r9 /* r0 <- location to fix up in RAM */
|
||||
ldr r1, [r2, #4]
|
||||
and r8, r1, #0xff
|
||||
cmp r8, #23 /* relative fixup? */
|
||||
and r7, r1, #0xff
|
||||
cmp r7, #23 /* relative fixup? */
|
||||
beq fixrel
|
||||
cmp r8, #2 /* absolute fixup? */
|
||||
cmp r7, #2 /* absolute fixup? */
|
||||
beq fixabs
|
||||
/* ignore unknown type of fixup */
|
||||
b fixnext
|
||||
@@ -286,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 */
|
||||
@@ -304,7 +305,7 @@ clear_bss:
|
||||
ldr r0, _bss_start_ofs
|
||||
ldr r1, _bss_end_ofs
|
||||
ldr r3, _TEXT_BASE /* Text base */
|
||||
mov r4, r7 /* reloc addr */
|
||||
mov r4, r6 /* reloc addr */
|
||||
add r0, r0, r4
|
||||
add r1, r1, r4
|
||||
mov r2, #0x00000000 /* clear */
|
||||
@@ -332,7 +333,7 @@ _start_oneboot_ofs
|
||||
add lr, lr, r9
|
||||
/* setup parameters for board_init_r */
|
||||
mov r0, r5 /* gd_t */
|
||||
mov r1, r7 /* dest_addr */
|
||||
mov r1, r6 /* dest_addr */
|
||||
/* jump to it ... */
|
||||
mov pc, lr
|
||||
|
||||
|
||||
@@ -127,6 +127,7 @@ reset:
|
||||
/* Set stackpointer in internal RAM to call board_init_f */
|
||||
call_board_init_f:
|
||||
ldr sp, =(CONFIG_SYS_INIT_SP_ADDR)
|
||||
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
|
||||
ldr r0,=0x00000000
|
||||
bl board_init_f
|
||||
|
||||
@@ -144,22 +145,22 @@ relocate_code:
|
||||
mov r4, r0 /* save addr_sp */
|
||||
mov r5, r1 /* save addr of gd */
|
||||
mov r6, r2 /* save addr of destination */
|
||||
mov r7, r2 /* save addr of destination */
|
||||
|
||||
/* Set up the stack */
|
||||
stack_setup:
|
||||
mov sp, r4
|
||||
|
||||
adr r0, _start
|
||||
cmp r0, r6
|
||||
beq clear_bss /* skip relocation */
|
||||
mov r1, r6 /* r1 <- scratch for copy_loop */
|
||||
ldr r2, _TEXT_BASE
|
||||
ldr r3, _bss_start_ofs
|
||||
add r2, r0, r3 /* r2 <- source end address */
|
||||
cmp r0, r6
|
||||
beq clear_bss
|
||||
|
||||
copy_loop:
|
||||
ldmia r0!, {r9-r10} /* copy from source address [r0] */
|
||||
stmia r6!, {r9-r10} /* copy to target address [r1] */
|
||||
stmia r1!, {r9-r10} /* copy to target address [r1] */
|
||||
cmp r0, r2 /* until source end address [r2] */
|
||||
blo copy_loop
|
||||
|
||||
@@ -168,7 +169,7 @@ copy_loop:
|
||||
* fix .rel.dyn relocations
|
||||
*/
|
||||
ldr r0, _TEXT_BASE /* r0 <- Text base */
|
||||
sub r9, r7, r0 /* r9 <- relocation offset */
|
||||
sub r9, r6, r0 /* r9 <- relocation offset */
|
||||
ldr r10, _dynsym_start_ofs /* r10 <- sym table ofs */
|
||||
add r10, r10, r0 /* r10 <- sym table in FLASH */
|
||||
ldr r2, _rel_dyn_start_ofs /* r2 <- rel dyn start ofs */
|
||||
@@ -179,10 +180,10 @@ fixloop:
|
||||
ldr r0, [r2] /* r0 <- location to fix up, IN FLASH! */
|
||||
add r0, r0, r9 /* r0 <- location to fix up in RAM */
|
||||
ldr r1, [r2, #4]
|
||||
and r8, r1, #0xff
|
||||
cmp r8, #23 /* relative fixup? */
|
||||
and r7, r1, #0xff
|
||||
cmp r7, #23 /* relative fixup? */
|
||||
beq fixrel
|
||||
cmp r8, #2 /* absolute fixup? */
|
||||
cmp r7, #2 /* absolute fixup? */
|
||||
beq fixabs
|
||||
/* ignore unknown type of fixup */
|
||||
b fixnext
|
||||
@@ -191,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 */
|
||||
@@ -209,7 +210,7 @@ clear_bss:
|
||||
ldr r0, _bss_start_ofs
|
||||
ldr r1, _bss_end_ofs
|
||||
ldr r3, _TEXT_BASE /* Text base */
|
||||
mov r4, r7 /* reloc addr */
|
||||
mov r4, r6 /* reloc addr */
|
||||
add r0, r0, r4
|
||||
add r1, r1, r4
|
||||
mov r2, #0x00000000 /* clear */
|
||||
@@ -233,7 +234,7 @@ clbss_l:str r2, [r0] /* clear loop... */
|
||||
add lr, lr, r9
|
||||
/* setup parameters for board_init_r */
|
||||
mov r0, r5 /* gd_t */
|
||||
mov r1, r7 /* dest_addr */
|
||||
mov r1, r6 /* dest_addr */
|
||||
/* jump to it ... */
|
||||
mov pc, lr
|
||||
|
||||
|
||||
@@ -131,6 +131,7 @@ reset:
|
||||
/* Set stackpointer in internal RAM to call board_init_f */
|
||||
call_board_init_f:
|
||||
ldr sp, =(CONFIG_SYS_INIT_SP_ADDR)
|
||||
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
|
||||
ldr r0,=0x00000000
|
||||
bl board_init_f
|
||||
|
||||
@@ -148,22 +149,22 @@ relocate_code:
|
||||
mov r4, r0 /* save addr_sp */
|
||||
mov r5, r1 /* save addr of gd */
|
||||
mov r6, r2 /* save addr of destination */
|
||||
mov r7, r2 /* save addr of destination */
|
||||
|
||||
/* Set up the stack */
|
||||
stack_setup:
|
||||
mov sp, r4
|
||||
|
||||
adr r0, _start
|
||||
cmp r0, r6
|
||||
beq clear_bss /* skip relocation */
|
||||
mov r1, r6 /* r1 <- scratch for copy_loop */
|
||||
ldr r2, _TEXT_BASE
|
||||
ldr r3, _bss_start_ofs
|
||||
add r2, r0, r3 /* r2 <- source end address */
|
||||
cmp r0, r6
|
||||
beq clear_bss
|
||||
|
||||
copy_loop:
|
||||
ldmia r0!, {r9-r10} /* copy from source address [r0] */
|
||||
stmia r6!, {r9-r10} /* copy to target address [r1] */
|
||||
stmia r1!, {r9-r10} /* copy to target address [r1] */
|
||||
cmp r0, r2 /* until source end address [r2] */
|
||||
blo copy_loop
|
||||
|
||||
@@ -172,7 +173,7 @@ copy_loop:
|
||||
* fix .rel.dyn relocations
|
||||
*/
|
||||
ldr r0, _TEXT_BASE /* r0 <- Text base */
|
||||
sub r9, r7, r0 /* r9 <- relocation offset */
|
||||
sub r9, r6, r0 /* r9 <- relocation offset */
|
||||
ldr r10, _dynsym_start_ofs /* r10 <- sym table ofs */
|
||||
add r10, r10, r0 /* r10 <- sym table in FLASH */
|
||||
ldr r2, _rel_dyn_start_ofs /* r2 <- rel dyn start ofs */
|
||||
@@ -183,10 +184,10 @@ fixloop:
|
||||
ldr r0, [r2] /* r0 <- location to fix up, IN FLASH! */
|
||||
add r0, r0, r9 /* r0 <- location to fix up in RAM */
|
||||
ldr r1, [r2, #4]
|
||||
and r8, r1, #0xff
|
||||
cmp r8, #23 /* relative fixup? */
|
||||
and r7, r1, #0xff
|
||||
cmp r7, #23 /* relative fixup? */
|
||||
beq fixrel
|
||||
cmp r8, #2 /* absolute fixup? */
|
||||
cmp r7, #2 /* absolute fixup? */
|
||||
beq fixabs
|
||||
/* ignore unknown type of fixup */
|
||||
b fixnext
|
||||
@@ -195,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 */
|
||||
@@ -213,7 +214,7 @@ clear_bss:
|
||||
ldr r0, _bss_start_ofs
|
||||
ldr r1, _bss_end_ofs
|
||||
ldr r3, _TEXT_BASE /* Text base */
|
||||
mov r4, r7 /* reloc addr */
|
||||
mov r4, r6 /* reloc addr */
|
||||
add r0, r0, r4
|
||||
add r1, r1, r4
|
||||
mov r2, #0x00000000 /* clear */
|
||||
@@ -234,7 +235,7 @@ clbss_l:str r2, [r0] /* clear loop... */
|
||||
add lr, lr, r9
|
||||
/* setup parameters for board_init_r */
|
||||
mov r0, r5 /* gd_t */
|
||||
mov r1, r7 /* dest_addr */
|
||||
mov r1, r6 /* dest_addr */
|
||||
/* jump to it ... */
|
||||
mov pc, lr
|
||||
|
||||
|
||||
@@ -91,10 +91,18 @@ typedef struct at91_pmc {
|
||||
#define AT91_PMC_MCKR_PRES_64 0x00000018
|
||||
#define AT91_PMC_MCKR_PRES_MASK 0x0000001C
|
||||
|
||||
#ifdef CONFIG_AT91RM9200
|
||||
#define AT91_PMC_MCKR_MDIV_1 0x00000000
|
||||
#define AT91_PMC_MCKR_MDIV_2 0x00000100
|
||||
#define AT91_PMC_MCKR_MDIV_3 0x00000200
|
||||
#define AT91_PMC_MCKR_MDIV_4 0x00000300
|
||||
#define AT91_PMC_MCKR_MDIV_MASK 0x00000300
|
||||
#else
|
||||
#define AT91_PMC_MCKR_MDIV_1 0x00000000
|
||||
#define AT91_PMC_MCKR_MDIV_2 0x00000100
|
||||
#define AT91_PMC_MCKR_MDIV_4 0x00000200
|
||||
#define AT91_PMC_MCKR_MDIV_MASK 0x00000300
|
||||
#endif
|
||||
|
||||
#define AT91_PMC_MCKR_PLLADIV_1 0x00001000
|
||||
#define AT91_PMC_MCKR_PLLADIV_2 0x00002000
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifdef CONFIG_FEC_MXC
|
||||
extern void mx25_fec_init_pins(void);
|
||||
extern void imx_get_mac_from_fuse(unsigned char *mac);
|
||||
#endif
|
||||
|
||||
/* Clock Control Module (CCM) registers */
|
||||
@@ -129,12 +130,17 @@ struct iim_regs {
|
||||
u32 iim_srev;
|
||||
u32 iim_prog_p;
|
||||
u32 res1[0x1f5];
|
||||
u32 iim_bank_area0[0x20];
|
||||
u32 res2[0xe0];
|
||||
u32 iim_bank_area1[0x20];
|
||||
u32 res3[0xe0];
|
||||
u32 iim_bank_area2[0x20];
|
||||
struct fuse_bank {
|
||||
u32 fuse_regs[0x20];
|
||||
u32 fuse_rsvd[0xe0];
|
||||
} bank[3];
|
||||
};
|
||||
|
||||
struct fuse_bank0_regs {
|
||||
u32 fuse0_25[0x1a];
|
||||
u32 mac_addr[6];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/* AIPS 1 */
|
||||
@@ -312,7 +318,4 @@ struct iim_regs {
|
||||
#define WSR_UNLOCK1 0x5555
|
||||
#define WSR_UNLOCK2 0xAAAA
|
||||
|
||||
/* FUSE bank offsets */
|
||||
#define IIM0_MAC 0x1a
|
||||
|
||||
#endif /* _IMX_REGS_H */
|
||||
|
||||
@@ -34,6 +34,7 @@ extern void mx27_uart_init_pins(void);
|
||||
|
||||
#ifdef CONFIG_FEC_MXC
|
||||
extern void mx27_fec_init_pins(void);
|
||||
extern void imx_get_mac_from_fuse(unsigned char *mac);
|
||||
#endif /* CONFIG_FEC_MXC */
|
||||
|
||||
#ifdef CONFIG_MXC_MMC
|
||||
@@ -202,9 +203,19 @@ struct iim_regs {
|
||||
u32 iim_scs1;
|
||||
u32 iim_scs2;
|
||||
u32 iim_scs3;
|
||||
u32 res[0x1F0];
|
||||
u32 iim_bank_area0[0x100];
|
||||
u32 res[0x1f1];
|
||||
struct fuse_bank {
|
||||
u32 fuse_regs[0x20];
|
||||
u32 fuse_rsvd[0xe0];
|
||||
} bank[1];
|
||||
};
|
||||
|
||||
struct fuse_bank0_regs {
|
||||
u32 fuse0_3[5];
|
||||
u32 mac_addr[6];
|
||||
u32 fuse10_31[0x16];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#define IMX_IO_BASE 0x10000000
|
||||
@@ -512,9 +523,4 @@ struct iim_regs {
|
||||
#define IIM_ERR_SNSE (1 << 2)
|
||||
#define IIM_ERR_PARITYE (1 << 1)
|
||||
|
||||
/* Definitions for i.MX27 TO2 */
|
||||
#define IIM0_MAC 5
|
||||
#define IIM0_SCC_KEY 11
|
||||
#define IIM1_SUID 1
|
||||
|
||||
#endif /* _IMX_REGS_H */
|
||||
|
||||
@@ -205,9 +205,13 @@
|
||||
#define BOARD_REV_1_0 0x0
|
||||
#define BOARD_REV_2_0 0x1
|
||||
|
||||
#define IMX_IIM_BASE (IIM_BASE_ADDR)
|
||||
|
||||
#if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
|
||||
#include <asm/types.h>
|
||||
|
||||
extern void imx_get_mac_from_fuse(unsigned char *mac);
|
||||
|
||||
#define __REG(x) (*((volatile u32 *)(x)))
|
||||
#define __REG16(x) (*((volatile u16 *)(x)))
|
||||
#define __REG8(x) (*((volatile u8 *)(x)))
|
||||
@@ -275,6 +279,36 @@ struct src {
|
||||
u32 sisr;
|
||||
u32 simr;
|
||||
};
|
||||
|
||||
struct iim_regs {
|
||||
u32 stat;
|
||||
u32 statm;
|
||||
u32 err;
|
||||
u32 emask;
|
||||
u32 fctl;
|
||||
u32 ua;
|
||||
u32 la;
|
||||
u32 sdat;
|
||||
u32 prev;
|
||||
u32 srev;
|
||||
u32 preg_p;
|
||||
u32 scs0;
|
||||
u32 scs1;
|
||||
u32 scs2;
|
||||
u32 scs3;
|
||||
u32 res0[0x1f1];
|
||||
struct fuse_bank {
|
||||
u32 fuse_regs[0x20];
|
||||
u32 fuse_rsvd[0xe0];
|
||||
} bank[4];
|
||||
};
|
||||
|
||||
struct fuse_bank1_regs {
|
||||
u32 fuse0_8[9];
|
||||
u32 mac_addr[6];
|
||||
u32 fuse15_31[0x11];
|
||||
};
|
||||
|
||||
#endif /* __ASSEMBLER__*/
|
||||
|
||||
#endif /* __ASM_ARCH_MXC_MX51_H__ */
|
||||
|
||||
@@ -55,11 +55,14 @@ typedef struct global_data {
|
||||
unsigned long plla_rate_hz;
|
||||
unsigned long pllb_rate_hz;
|
||||
unsigned long at91_pllb_usb_init;
|
||||
/* "static data" needed by at91's timer.c */
|
||||
#endif
|
||||
#ifdef CONFIG_ARM
|
||||
/* "static data" needed by most of timer.c on ARM platforms */
|
||||
unsigned long timer_rate_hz;
|
||||
unsigned long tbl;
|
||||
unsigned long tbu;
|
||||
unsigned long long timer_reset_value;
|
||||
unsigned long lastinc;
|
||||
#endif
|
||||
unsigned long relocaddr; /* Start address of U-Boot in RAM */
|
||||
phys_size_t ram_size; /* RAM size */
|
||||
|
||||
@@ -276,7 +276,7 @@ void board_init_f (ulong bootflag)
|
||||
ulong addr, addr_sp;
|
||||
|
||||
/* Pointer is writable since we allocated a register for it */
|
||||
gd = (gd_t *) (CONFIG_SYS_INIT_SP_ADDR);
|
||||
gd = (gd_t *) ((CONFIG_SYS_INIT_SP_ADDR) & ~0x07);
|
||||
/* compiler optimization barrier needed for GCC >= 3.4 */
|
||||
__asm__ __volatile__("": : :"memory");
|
||||
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
#include <asm/blackfin.h>
|
||||
#include <asm/mach-common/bits/uart.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#ifdef CONFIG_UART_CONSOLE
|
||||
|
||||
#include "serial.h"
|
||||
@@ -95,7 +97,6 @@ void serial_set_baud(uint32_t baud)
|
||||
*/
|
||||
void serial_setbrg(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
serial_set_baud(gd->baudrate);
|
||||
}
|
||||
|
||||
|
||||
@@ -74,8 +74,7 @@ int watchdog_disable(void)
|
||||
{
|
||||
volatile wdog_t *wdt = (volatile wdog_t *)(MMAP_WDOG);
|
||||
|
||||
wdt->sr = 0x5555; /* reset watchdog counteDECLARE_GLOBAL_DATA_PTR;
|
||||
r */
|
||||
wdt->sr = 0x5555; /* reset watchdog counter */
|
||||
wdt->sr = 0xAAAA;
|
||||
wdt->cr = 0; /* disable watchdog timer */
|
||||
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
|
||||
#include <asm/immap.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
/*
|
||||
* get_clocks() fills in gd->cpu_clock and gd->bus_clk
|
||||
*/
|
||||
int get_clocks(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
gd->bus_clk = CONFIG_SYS_CLK;
|
||||
gd->cpu_clk = (gd->bus_clk * 2);
|
||||
|
||||
|
||||
@@ -201,18 +201,18 @@ static void mpc83xx_pcie_init_bus(int bus, struct pci_region *reg)
|
||||
out_le32(&out_win->tarl, 0);
|
||||
out_le32(&out_win->tarh, 0);
|
||||
|
||||
for (i = 0; i < 2; i++, reg++) {
|
||||
for (i = 0; i < 2; i++) {
|
||||
u32 ar;
|
||||
|
||||
if (reg->size == 0)
|
||||
if (reg[i].size == 0)
|
||||
break;
|
||||
|
||||
out_win = &pex->bridge.pex_outbound_win[i + 1];
|
||||
out_le32(&out_win->bar, reg->phys_start);
|
||||
out_le32(&out_win->tarl, reg->bus_start);
|
||||
out_le32(&out_win->bar, reg[i].phys_start);
|
||||
out_le32(&out_win->tarl, reg[i].bus_start);
|
||||
out_le32(&out_win->tarh, 0);
|
||||
ar = PEX_OWAR_EN | (reg->size & PEX_OWAR_SIZE);
|
||||
if (reg->flags & PCI_REGION_IO)
|
||||
ar = PEX_OWAR_EN | (reg[i].size & PEX_OWAR_SIZE);
|
||||
if (reg[i].flags & PCI_REGION_IO)
|
||||
ar |= PEX_OWAR_TYPE_IO;
|
||||
else
|
||||
ar |= PEX_OWAR_TYPE_MEM;
|
||||
|
||||
@@ -1158,6 +1158,10 @@ map_flash_by_law1:
|
||||
bne 1b
|
||||
|
||||
stw r4, LBLAWAR1(r3) /* LBLAWAR1 <= 8MB Flash Size */
|
||||
/* Wait for HW to catch up */
|
||||
lwz r4, LBLAWAR1(r3)
|
||||
twi 0,r4,0
|
||||
isync
|
||||
blr
|
||||
|
||||
/* Though all the LBIU Local Access Windows and LBC Banks will be
|
||||
@@ -1196,5 +1200,9 @@ remap_flash_by_law0:
|
||||
xor r4, r4, r4
|
||||
stw r4, LBLAWBAR1(r3)
|
||||
stw r4, LBLAWAR1(r3) /* Off LBIU LAW1 */
|
||||
/* Wait for HW to catch up */
|
||||
lwz r4, LBLAWAR1(r3)
|
||||
twi 0,r4,0
|
||||
isync
|
||||
blr
|
||||
#endif /* CONFIG_SYS_FLASHBOOT */
|
||||
|
||||
@@ -327,7 +327,7 @@ int cpu_init_r(void)
|
||||
if (l2cache->l2ctl & MPC85xx_L2CTL_L2E) {
|
||||
puts("already enabled");
|
||||
l2srbar = l2cache->l2srbar0;
|
||||
#ifdef CONFIG_SYS_INIT_L2_ADDR
|
||||
#if defined(CONFIG_SYS_INIT_L2_ADDR) && defined(CONFIG_SYS_FLASH_BASE)
|
||||
if (l2cache->l2ctl & MPC85xx_L2CTL_L2SRAM_ENTIRE
|
||||
&& l2srbar >= CONFIG_SYS_FLASH_BASE) {
|
||||
l2srbar = CONFIG_SYS_INIT_L2_ADDR;
|
||||
|
||||
@@ -645,6 +645,17 @@ void board_init_r (gd_t *id, ulong dest_addr)
|
||||
gd->cpu += dest_addr - CONFIG_SYS_MONITOR_BASE;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_EXTRA_ENV_RELOC
|
||||
/*
|
||||
* Some systems need to relocate the env_addr pointer early because the
|
||||
* location it points to will get invalidated before env_relocate is
|
||||
* called. One example is on systems that might use a L2 or L3 cache
|
||||
* in SRAM mode and initialize that cache from SRAM mode back to being
|
||||
* a cache in cpu_init_r.
|
||||
*/
|
||||
gd->env_addr += dest_addr - CONFIG_SYS_MONITOR_BASE;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SERIAL_MULTI
|
||||
serial_initialize();
|
||||
#endif
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
.align 2
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
_sh_start:
|
||||
.long 0x00000010 /* Ppower ON reset PC*/
|
||||
.long 0x00000000
|
||||
.long 0x00000010 /* Manual reset PC */
|
||||
@@ -39,7 +39,7 @@ _init:
|
||||
nop
|
||||
1: sts pr, r5
|
||||
mov.l ._reloc_dst, r4
|
||||
add #(_start-1b), r5
|
||||
add #(_sh_start-1b), r5
|
||||
mov.l ._reloc_dst_end, r6
|
||||
|
||||
2: mov.l @r5+, r1
|
||||
@@ -74,6 +74,6 @@ loop:
|
||||
._reloc_dst_end: .long reloc_dst_end
|
||||
._bss_start: .long bss_start
|
||||
._bss_end: .long bss_end
|
||||
._gd_init: .long (_start - GENERATED_GBL_DATA_SIZE)
|
||||
._stack_init: .long (_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16)
|
||||
._gd_init: .long (_sh_start - GENERATED_GBL_DATA_SIZE)
|
||||
._stack_init: .long (_sh_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16)
|
||||
._sh_generic_init: .long sh_generic_init
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
.align 2
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
_sh_start:
|
||||
mov.l ._lowlevel_init, r0
|
||||
100: bsrf r0
|
||||
nop
|
||||
@@ -38,7 +38,7 @@ _start:
|
||||
nop
|
||||
1: sts pr, r5
|
||||
mov.l ._reloc_dst, r4
|
||||
add #(_start-1b), r5
|
||||
add #(_sh_start-1b), r5
|
||||
mov.l ._reloc_dst_end, r6
|
||||
|
||||
2: mov.l @r5+, r1
|
||||
@@ -73,6 +73,6 @@ loop:
|
||||
._reloc_dst_end: .long reloc_dst_end
|
||||
._bss_start: .long bss_start
|
||||
._bss_end: .long bss_end
|
||||
._gd_init: .long (_start - GENERATED_GBL_DATA_SIZE)
|
||||
._stack_init: .long (_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16)
|
||||
._gd_init: .long (_sh_start - GENERATED_GBL_DATA_SIZE)
|
||||
._stack_init: .long (_sh_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16)
|
||||
._sh_generic_init: .long sh_generic_init
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (C) Copyright 2007
|
||||
* (C) Copyright 2007, 2010
|
||||
* Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -26,7 +26,7 @@
|
||||
.align 2
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
_sh_start:
|
||||
mov.l ._lowlevel_init, r0
|
||||
100: bsrf r0
|
||||
nop
|
||||
@@ -35,7 +35,7 @@ _start:
|
||||
nop
|
||||
1: sts pr, r5
|
||||
mov.l ._reloc_dst, r4
|
||||
add #(_start-1b), r5
|
||||
add #(_sh_start-1b), r5
|
||||
mov.l ._reloc_dst_end, r6
|
||||
|
||||
2: mov.l @r5+, r1
|
||||
@@ -70,6 +70,6 @@ loop:
|
||||
._reloc_dst_end: .long reloc_dst_end
|
||||
._bss_start: .long bss_start
|
||||
._bss_end: .long bss_end
|
||||
._gd_init: .long (_start - GENERATED_GBL_DATA_SIZE)
|
||||
._stack_init: .long (_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16)
|
||||
._gd_init: .long (_sh_start - GENERATED_GBL_DATA_SIZE)
|
||||
._stack_init: .long (_sh_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16)
|
||||
._sh_generic_init: .long sh_generic_init
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
#include <miiphy.h>
|
||||
#endif
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
extern int cpu_init(void);
|
||||
extern int board_init(void);
|
||||
extern int dram_init(void);
|
||||
@@ -43,8 +45,6 @@ unsigned long monitor_flash_len = CONFIG_SYS_MONITOR_LEN;
|
||||
|
||||
static int sh_flash_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
gd->bd->bi_flashsize = flash_init();
|
||||
printf("FLASH: %ldMB\n", gd->bd->bi_flashsize / (1024*1024));
|
||||
|
||||
@@ -99,7 +99,6 @@ static int sh_mem_env_init(void)
|
||||
#if defined(CONFIG_CMD_NET)
|
||||
static int sh_net_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
gd->bd->bi_ip_addr = getenv_IPaddr("ipaddr");
|
||||
return 0;
|
||||
}
|
||||
@@ -139,8 +138,6 @@ init_fnc_t *init_sequence[] =
|
||||
|
||||
void sh_generic_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
bd_t *bd;
|
||||
init_fnc_t **init_fnc_ptr;
|
||||
|
||||
|
||||
@@ -26,34 +26,12 @@ SECTIONS
|
||||
{
|
||||
/* Read-only sections, merged into text segment: */
|
||||
. = + SIZEOF_HEADERS;
|
||||
.interp : { *(.interp) }
|
||||
.hash : { *(.hash) }
|
||||
.dynsym : { *(.dynsym) }
|
||||
.dynstr : { *(.dynstr) }
|
||||
.rel.text : { *(.rel.text) }
|
||||
.rela.text : { *(.rela.text) }
|
||||
.rel.data : { *(.rel.data) }
|
||||
.rela.data : { *(.rela.data) }
|
||||
.rel.rodata : { *(.rel.rodata) }
|
||||
.rela.rodata : { *(.rela.rodata) }
|
||||
.rel.got : { *(.rel.got) }
|
||||
.rela.got : { *(.rela.got) }
|
||||
.rel.ctors : { *(.rel.ctors) }
|
||||
.rela.ctors : { *(.rela.ctors) }
|
||||
.rel.dtors : { *(.rel.dtors) }
|
||||
.rela.dtors : { *(.rela.dtors) }
|
||||
.rel.bss : { *(.rel.bss) }
|
||||
.rela.bss : { *(.rela.bss) }
|
||||
.rel.plt : { *(.rel.plt) }
|
||||
.rela.plt : { *(.rela.plt) }
|
||||
.init : { *(.init) }
|
||||
.plt : { *(.plt) }
|
||||
.text :
|
||||
{
|
||||
/* WARNING - the following is hand-optimized to fit within */
|
||||
/* the sector layout of our flash chips! XXX FIXME XXX */
|
||||
|
||||
arch/powerpc/cpu/ppc4xx/start.o (.text)
|
||||
arch/powerpc/cpu/ppc4xx/start.o (.text*)
|
||||
|
||||
/* Align to next NAND block */
|
||||
. = ALIGN(0x4000);
|
||||
@@ -61,8 +39,7 @@ SECTIONS
|
||||
/* Keep some space here for redundant env and potential bad env blocks */
|
||||
. = ALIGN(0x10000);
|
||||
|
||||
*(.text)
|
||||
*(.got1)
|
||||
*(.text*)
|
||||
}
|
||||
_etext = .;
|
||||
PROVIDE (etext = .);
|
||||
@@ -70,9 +47,6 @@ SECTIONS
|
||||
{
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
.dtors : { *(.dtors) }
|
||||
|
||||
/* Read-write section, merged into data segment: */
|
||||
. = (. + 0x00FF) & 0xFFFFFF00;
|
||||
@@ -80,23 +54,19 @@ SECTIONS
|
||||
PROVIDE (erotext = .);
|
||||
.reloc :
|
||||
{
|
||||
*(.got)
|
||||
KEEP(*(.got))
|
||||
_GOT2_TABLE_ = .;
|
||||
*(.got2)
|
||||
KEEP(*(.got2))
|
||||
_FIXUP_TABLE_ = .;
|
||||
*(.fixup)
|
||||
KEEP(*(.fixup))
|
||||
}
|
||||
__got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
|
||||
__fixup_entries = (. - _FIXUP_TABLE_)>>2;
|
||||
|
||||
.data :
|
||||
{
|
||||
*(.data)
|
||||
*(.data1)
|
||||
*(.sdata)
|
||||
*(.sdata2)
|
||||
*(.dynamic)
|
||||
CONSTRUCTORS
|
||||
*(.data*)
|
||||
*(.sdata*)
|
||||
}
|
||||
_edata = .;
|
||||
PROVIDE (edata = .);
|
||||
@@ -122,9 +92,8 @@ SECTIONS
|
||||
__bss_start = .;
|
||||
.bss (NOLOAD) :
|
||||
{
|
||||
*(.sbss) *(.scommon)
|
||||
*(.dynbss)
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
*(.sbss*)
|
||||
*(COMMON)
|
||||
. = ALIGN(4);
|
||||
}
|
||||
|
||||
@@ -26,34 +26,12 @@ SECTIONS
|
||||
{
|
||||
/* Read-only sections, merged into text segment: */
|
||||
. = + SIZEOF_HEADERS;
|
||||
.interp : { *(.interp) }
|
||||
.hash : { *(.hash) }
|
||||
.dynsym : { *(.dynsym) }
|
||||
.dynstr : { *(.dynstr) }
|
||||
.rel.text : { *(.rel.text) }
|
||||
.rela.text : { *(.rela.text) }
|
||||
.rel.data : { *(.rel.data) }
|
||||
.rela.data : { *(.rela.data) }
|
||||
.rel.rodata : { *(.rel.rodata) }
|
||||
.rela.rodata : { *(.rela.rodata) }
|
||||
.rel.got : { *(.rel.got) }
|
||||
.rela.got : { *(.rela.got) }
|
||||
.rel.ctors : { *(.rel.ctors) }
|
||||
.rela.ctors : { *(.rela.ctors) }
|
||||
.rel.dtors : { *(.rel.dtors) }
|
||||
.rela.dtors : { *(.rela.dtors) }
|
||||
.rel.bss : { *(.rel.bss) }
|
||||
.rela.bss : { *(.rela.bss) }
|
||||
.rel.plt : { *(.rel.plt) }
|
||||
.rela.plt : { *(.rela.plt) }
|
||||
.init : { *(.init) }
|
||||
.plt : { *(.plt) }
|
||||
.text :
|
||||
{
|
||||
/* WARNING - the following is hand-optimized to fit within */
|
||||
/* the sector layout of our flash chips! XXX FIXME XXX */
|
||||
|
||||
arch/powerpc/cpu/ppc4xx/start.o (.text)
|
||||
arch/powerpc/cpu/ppc4xx/start.o (.text*)
|
||||
|
||||
/* Align to next NAND block */
|
||||
. = ALIGN(0x4000);
|
||||
@@ -61,8 +39,7 @@ SECTIONS
|
||||
/* Keep some space here for redundant env and potential bad env blocks */
|
||||
. = ALIGN(0x10000);
|
||||
|
||||
*(.text)
|
||||
*(.got1)
|
||||
*(.text*)
|
||||
}
|
||||
_etext = .;
|
||||
PROVIDE (etext = .);
|
||||
@@ -70,9 +47,6 @@ SECTIONS
|
||||
{
|
||||
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
.dtors : { *(.dtors) }
|
||||
|
||||
/* Read-write section, merged into data segment: */
|
||||
. = (. + 0x00FF) & 0xFFFFFF00;
|
||||
@@ -80,23 +54,19 @@ SECTIONS
|
||||
PROVIDE (erotext = .);
|
||||
.reloc :
|
||||
{
|
||||
*(.got)
|
||||
KEEP(*(.got))
|
||||
_GOT2_TABLE_ = .;
|
||||
*(.got2)
|
||||
KEEP(*(.got2))
|
||||
_FIXUP_TABLE_ = .;
|
||||
*(.fixup)
|
||||
KEEP(*(.fixup))
|
||||
}
|
||||
__got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
|
||||
__fixup_entries = (. - _FIXUP_TABLE_)>>2;
|
||||
|
||||
.data :
|
||||
{
|
||||
*(.data)
|
||||
*(.data1)
|
||||
*(.sdata)
|
||||
*(.sdata2)
|
||||
*(.dynamic)
|
||||
CONSTRUCTORS
|
||||
*(.data*)
|
||||
*(.sdata*)
|
||||
}
|
||||
_edata = .;
|
||||
PROVIDE (edata = .);
|
||||
@@ -122,9 +92,8 @@ SECTIONS
|
||||
__bss_start = .;
|
||||
.bss (NOLOAD) :
|
||||
{
|
||||
*(.sbss) *(.scommon)
|
||||
*(.dynbss)
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
*(.sbss*)
|
||||
*(COMMON)
|
||||
. = ALIGN(4);
|
||||
}
|
||||
|
||||
@@ -95,16 +95,19 @@ static void flash__init(void)
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->ram_size = get_ram_size(CONFIG_SYS_SDRAM_BASE, PHYS_SDRAM_1_SIZE);
|
||||
gd->ram_size =
|
||||
get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, PHYS_SDRAM_1_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void dram_init_banksize(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = get_ram_size(PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE);
|
||||
gd->bd->bi_dram[0].size =
|
||||
get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE);
|
||||
gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
|
||||
gd->bd->bi_dram[1].size = get_ram_size(PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE);
|
||||
gd->bd->bi_dram[1].size =
|
||||
get_ram_size((long *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE);
|
||||
}
|
||||
|
||||
int timer_init(void)
|
||||
@@ -154,7 +157,7 @@ void reset_cpu(ulong addr)
|
||||
* Delay x useconds AND perserve advance timstamp value
|
||||
* assumes timer is ticking at 1 msec
|
||||
*/
|
||||
void udelay(ulong usec)
|
||||
void __udelay(ulong usec)
|
||||
{
|
||||
ulong tmo, tmp;
|
||||
|
||||
|
||||
@@ -19,5 +19,4 @@
|
||||
#
|
||||
# Linux-Kernel is expected to be at 0x60008000
|
||||
#
|
||||
TEXT_BASE = 0x60800000
|
||||
LDSCRIPT := $(SRCTREE)/board/armltd/vexpress/u-boot.lds
|
||||
CONFIG_SYS_TEXT_BASE = 0x60800000
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
/*
|
||||
* (C) Copyright 2002
|
||||
* Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
|
||||
OUTPUT_ARCH(arm)
|
||||
ENTRY(_start)
|
||||
SECTIONS
|
||||
{
|
||||
. = 0x00000000;
|
||||
. = ALIGN(4);
|
||||
.text :
|
||||
{
|
||||
arch/arm/cpu/armv7/start.o (.text)
|
||||
*(.text)
|
||||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata))) }
|
||||
|
||||
. = ALIGN(4);
|
||||
.data : { *(.data)
|
||||
__datarel_start = .;
|
||||
*(.data.rel)
|
||||
__datarelrolocal_start = .;
|
||||
*(.data.rel.ro.local)
|
||||
__datarellocal_start = .;
|
||||
*(.data.rel.local)
|
||||
__datarelro_start = .;
|
||||
*(.data.rel.ro)
|
||||
}
|
||||
|
||||
__got_start = .;
|
||||
. = ALIGN(4);
|
||||
.got : { *(.got) }
|
||||
__got_end = .;
|
||||
|
||||
. = .;
|
||||
__u_boot_cmd_start = .;
|
||||
.u_boot_cmd : { *(.u_boot_cmd) }
|
||||
__u_boot_cmd_end = .;
|
||||
|
||||
. = ALIGN(4);
|
||||
__bss_start = .;
|
||||
.bss : { *(.bss) }
|
||||
_end = .;
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
# currently only NOR flash booting is supported
|
||||
CONFIG_SYS_TEXT_BASE = 0x10000000
|
||||
54
board/emk/top9000/Makefile
Normal file
54
board/emk/top9000/Makefile
Normal file
@@ -0,0 +1,54 @@
|
||||
#
|
||||
# (C) Copyright 2003-2008
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# (C) Copyright 2010
|
||||
# Reinhard Meyer, EMK Elektronik, reinhard.meyer@emk-elektronik.de
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
# project.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
|
||||
include $(TOPDIR)/config.mk
|
||||
|
||||
LIB = $(obj)lib$(BOARD).o
|
||||
|
||||
COBJS-y += $(BOARD).o
|
||||
COBJS-$(CONFIG_ATMEL_SPI) += spi.o
|
||||
|
||||
SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
|
||||
OBJS := $(addprefix $(obj),$(COBJS-y))
|
||||
SOBJS := $(addprefix $(obj),$(SOBJS))
|
||||
|
||||
$(LIB): $(obj).depend $(OBJS) $(SOBJS)
|
||||
$(call cmd_link_o_target, $(OBJS) $(SOBJS))
|
||||
|
||||
clean:
|
||||
rm -f $(SOBJS) $(OBJS)
|
||||
|
||||
distclean: clean
|
||||
rm -f $(LIB) core *.bak $(obj).depend
|
||||
|
||||
#########################################################################
|
||||
|
||||
# defines $(obj).depend target
|
||||
include $(SRCTREE)/rules.mk
|
||||
|
||||
sinclude $(obj).depend
|
||||
|
||||
#########################################################################
|
||||
60
board/emk/top9000/spi.c
Normal file
60
board/emk/top9000/spi.c
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright (C) 2010
|
||||
* Reinhard Meyer, EMK Elektronik, reinhard.meyer@emk-elektronik.de
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
#include <asm/arch/at91_spi.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
#include <spi.h>
|
||||
|
||||
static const struct {
|
||||
u32 port;
|
||||
u32 bit;
|
||||
} cs_to_portbit[2][4] = {
|
||||
{{AT91_PIO_PORTA, 3}, {AT91_PIO_PORTC, 11},
|
||||
{AT91_PIO_PORTC, 16}, {AT91_PIO_PORTC, 17} },
|
||||
{{AT91_PIO_PORTB, 3}, {AT91_PIO_PORTC, 5},
|
||||
{AT91_PIO_PORTC, 4}, {AT91_PIO_PORTC, 3} }
|
||||
};
|
||||
|
||||
int spi_cs_is_valid(unsigned int bus, unsigned int cs)
|
||||
{
|
||||
debug("spi_cs_is_valid: bus=%u cs=%u\n", bus, cs);
|
||||
if (bus < 2 && cs < 4)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void spi_cs_activate(struct spi_slave *slave)
|
||||
{
|
||||
debug("spi_cs_activate: bus=%u cs=%u\n", slave->bus, slave->cs);
|
||||
at91_set_pio_output(cs_to_portbit[slave->bus][slave->cs].port,
|
||||
cs_to_portbit[slave->bus][slave->cs].bit, 0);
|
||||
}
|
||||
|
||||
void spi_cs_deactivate(struct spi_slave *slave)
|
||||
{
|
||||
debug("spi_cs_deactivate: bus=%u cs=%u\n", slave->bus, slave->cs);
|
||||
at91_set_pio_output(cs_to_portbit[slave->bus][slave->cs].port,
|
||||
cs_to_portbit[slave->bus][slave->cs].bit, 1);
|
||||
}
|
||||
290
board/emk/top9000/top9000.c
Normal file
290
board/emk/top9000/top9000.c
Normal file
@@ -0,0 +1,290 @@
|
||||
/*
|
||||
* (C) Copyright 2007-2008
|
||||
* Stelian Pop <stelian.pop@leadtechdesign.com>
|
||||
* Lead Tech Design <www.leadtechdesign.com>
|
||||
*
|
||||
* (C) Copyright 2010
|
||||
* Reinhard Meyer, EMK Elektronik, reinhard.meyer@emk-elektronik.de
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <net.h>
|
||||
#include <netdev.h>
|
||||
#include <mmc.h>
|
||||
#include <i2c.h>
|
||||
#include <spi.h>
|
||||
#include <asm/arch/at91sam9260.h>
|
||||
#include <asm/arch/at91sam9260_matrix.h>
|
||||
#include <asm/arch/at91sam9_smc.h>
|
||||
#include <asm/arch/at91_common.h>
|
||||
#include <asm/arch/at91_pmc.h>
|
||||
#include <asm/arch/at91_rstc.h>
|
||||
#include <asm/arch/at91_shdwn.h>
|
||||
#include <asm/arch/gpio.h>
|
||||
#include <asm/arch/io.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#ifdef CONFIG_CMD_NAND
|
||||
static void nand_hw_init(void)
|
||||
{
|
||||
unsigned long csa;
|
||||
|
||||
/* Enable CS3 */
|
||||
csa = at91_sys_read(AT91_MATRIX_EBICSA);
|
||||
at91_sys_write(AT91_MATRIX_EBICSA,
|
||||
csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA);
|
||||
|
||||
/* Configure SMC CS3 for NAND/SmartMedia */
|
||||
at91_sys_write(AT91_SMC_SETUP(3),
|
||||
AT91_SMC_NWESETUP_(1) | AT91_SMC_NCS_WRSETUP_(0) |
|
||||
AT91_SMC_NRDSETUP_(1) | AT91_SMC_NCS_RDSETUP_(0));
|
||||
at91_sys_write(AT91_SMC_PULSE(3),
|
||||
AT91_SMC_NWEPULSE_(3) | AT91_SMC_NCS_WRPULSE_(3) |
|
||||
AT91_SMC_NRDPULSE_(3) | AT91_SMC_NCS_RDPULSE_(3));
|
||||
at91_sys_write(AT91_SMC_CYCLE(3),
|
||||
AT91_SMC_NWECYCLE_(5) | AT91_SMC_NRDCYCLE_(5));
|
||||
at91_sys_write(AT91_SMC_MODE(3),
|
||||
AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
|
||||
AT91_SMC_EXNWMODE_DISABLE |
|
||||
AT91_SMC_DBW_8 |
|
||||
AT91_SMC_TDF_(2));
|
||||
|
||||
/* Configure RDY/BSY */
|
||||
at91_set_gpio_input(CONFIG_SYS_NAND_READY_PIN, 1);
|
||||
|
||||
/* Enable NandFlash */
|
||||
at91_set_gpio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MACB
|
||||
static void macb_hw_init(void)
|
||||
{
|
||||
/* Enable EMAC clock */
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_EMAC);
|
||||
|
||||
/* Initialize EMAC=MACB hardware */
|
||||
at91_macb_hw_init();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GENERIC_ATMEL_MCI
|
||||
/* this is a weak define that we are overriding */
|
||||
int board_mmc_init(bd_t *bd)
|
||||
{
|
||||
/* Enable MCI clock */
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_MCI);
|
||||
|
||||
/* Initialize MCI hardware */
|
||||
at91_mci_hw_init();
|
||||
|
||||
/* This calls the atmel_mmc_init in gen_atmel_mci.c */
|
||||
return atmel_mci_init((void *)AT91_BASE_MCI);
|
||||
}
|
||||
|
||||
/* this is a weak define that we are overriding */
|
||||
int board_mmc_getcd(u8 *cd, struct mmc *mmc)
|
||||
{
|
||||
/*
|
||||
* the only currently existing use of this function
|
||||
* (fsl_esdhc.c) suggests this function must return
|
||||
* *cs = TRUE if a card is NOT detected -> in most
|
||||
* cases the value of the pin when the detect switch
|
||||
* closes to GND
|
||||
*/
|
||||
*cd = at91_get_gpio_value(CONFIG_SYS_MMC_CD_PIN) ? 1 : 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
struct at91_shdwn *shdwn = (struct at91_shdwn *)AT91_SHDWN_BASE;
|
||||
|
||||
/*
|
||||
* make sure the board can be powered on by
|
||||
* any transition on WKUP
|
||||
*/
|
||||
writel(AT91_SHDW_MR_WKMODE0H2L | AT91_SHDW_MR_WKMODE0L2H,
|
||||
&shdwn->mr);
|
||||
|
||||
/* Enable clocks for all PIOs */
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_PIOA);
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_PIOB);
|
||||
at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_PIOC);
|
||||
|
||||
/* set SCL0 and SDA0 to open drain */
|
||||
at91_set_pio_output(I2C0_PORT, SCL0_PIN, 1);
|
||||
at91_set_pio_multi_drive(I2C0_PORT, SCL0_PIN, 1);
|
||||
at91_set_pio_pullup(I2C0_PORT, SCL0_PIN, 1);
|
||||
at91_set_pio_output(I2C0_PORT, SDA0_PIN, 1);
|
||||
at91_set_pio_multi_drive(I2C0_PORT, SDA0_PIN, 1);
|
||||
at91_set_pio_pullup(I2C0_PORT, SDA0_PIN, 1);
|
||||
|
||||
/* set SCL1 and SDA1 to open drain */
|
||||
at91_set_pio_output(I2C1_PORT, SCL1_PIN, 1);
|
||||
at91_set_pio_multi_drive(I2C1_PORT, SCL1_PIN, 1);
|
||||
at91_set_pio_pullup(I2C1_PORT, SCL1_PIN, 1);
|
||||
at91_set_pio_output(I2C1_PORT, SDA1_PIN, 1);
|
||||
at91_set_pio_multi_drive(I2C1_PORT, SDA1_PIN, 1);
|
||||
at91_set_pio_pullup(I2C1_PORT, SDA1_PIN, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
/* arch number of TOP9000 Board */
|
||||
gd->bd->bi_arch_number = MACH_TYPE_TOP9000;
|
||||
/* adress of boot parameters */
|
||||
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
|
||||
|
||||
at91_serial_hw_init();
|
||||
#ifdef CONFIG_CMD_NAND
|
||||
nand_hw_init();
|
||||
#endif
|
||||
#ifdef CONFIG_MACB
|
||||
macb_hw_init();
|
||||
#endif
|
||||
#ifdef CONFIG_ATMEL_SPI0
|
||||
/* (n+4) denotes to use nSPISEL(0) in GPIO mode! */
|
||||
at91_spi0_hw_init(1 << (FRAM_CS_NUM + 4));
|
||||
#endif
|
||||
#ifdef CONFIG_ATMEL_SPI1
|
||||
at91_spi1_hw_init(1 << (ENC_CS_NUM + 4));
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MISC_INIT_R
|
||||
int misc_init_r(void)
|
||||
{
|
||||
/* read 'factory' part of EEPROM */
|
||||
read_factory_r();
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->ram_size = get_ram_size(
|
||||
(void *)CONFIG_SYS_SDRAM_BASE,
|
||||
CONFIG_SYS_SDRAM_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_RESET_PHY_R
|
||||
void reset_phy(void)
|
||||
{
|
||||
/*
|
||||
* Initialize ethernet HW addresses prior to starting Linux,
|
||||
* needed for nfsroot.
|
||||
* TODO: We need to investigate if that is really necessary.
|
||||
*/
|
||||
eth_init(gd->bd);
|
||||
}
|
||||
#endif
|
||||
|
||||
int board_eth_init(bd_t *bis)
|
||||
{
|
||||
int rc = 0;
|
||||
int num = 0;
|
||||
#ifdef CONFIG_MACB
|
||||
rc = macb_eth_initialize(0,
|
||||
(void *)AT91_EMAC_BASE,
|
||||
CONFIG_SYS_PHY_ID);
|
||||
if (!rc)
|
||||
num++;
|
||||
#endif
|
||||
#ifdef CONFIG_ENC28J60
|
||||
rc = enc28j60_initialize(ENC_SPI_BUS, ENC_CS_NUM,
|
||||
ENC_SPI_CLOCK, SPI_MODE_0);
|
||||
if (!rc)
|
||||
num++;
|
||||
# ifdef CONFIG_ENC28J60_2
|
||||
rc = enc28j60_initialize(ENC_SPI_BUS, ENC_CS_NUM+1,
|
||||
ENC_SPI_CLOCK, SPI_MODE_0);
|
||||
if (!rc)
|
||||
num++;
|
||||
# ifdef CONFIG_ENC28J60_3
|
||||
rc = enc28j60_initialize(ENC_SPI_BUS, ENC_CS_NUM+2,
|
||||
ENC_SPI_CLOCK, SPI_MODE_0);
|
||||
if (!rc)
|
||||
num++;
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
return num;
|
||||
}
|
||||
|
||||
/*
|
||||
* I2C access functions
|
||||
*
|
||||
* Note:
|
||||
* We need to access Bus 0 before relocation to access the
|
||||
* environment settings.
|
||||
* However i2c_get_bus_num() cannot be called before
|
||||
* relocation.
|
||||
*/
|
||||
#ifdef CONFIG_SOFT_I2C
|
||||
void iic_init(void)
|
||||
{
|
||||
/* ports are now initialized in board_early_init_f() */
|
||||
}
|
||||
|
||||
int iic_read(void)
|
||||
{
|
||||
switch ((gd->flags & GD_FLG_RELOC) ? i2c_get_bus_num() : 0) {
|
||||
case 0:
|
||||
return at91_get_pio_value(I2C0_PORT, SDA0_PIN);
|
||||
case 1:
|
||||
return at91_get_pio_value(I2C1_PORT, SDA1_PIN);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
void iic_sda(int bit)
|
||||
{
|
||||
switch ((gd->flags & GD_FLG_RELOC) ? i2c_get_bus_num() : 0) {
|
||||
case 0:
|
||||
at91_set_pio_value(I2C0_PORT, SDA0_PIN, bit);
|
||||
break;
|
||||
case 1:
|
||||
at91_set_pio_value(I2C1_PORT, SDA1_PIN, bit);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void iic_scl(int bit)
|
||||
{
|
||||
switch ((gd->flags & GD_FLG_RELOC) ? i2c_get_bus_num() : 0) {
|
||||
case 0:
|
||||
at91_set_pio_value(I2C0_PORT, SCL0_PIN, bit);
|
||||
break;
|
||||
case 1:
|
||||
at91_set_pio_value(I2C1_PORT, SCL1_PIN, bit);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -24,6 +24,8 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/processor.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int checkboard(void)
|
||||
{
|
||||
puts("BOARD: ESPT-GIGA\n");
|
||||
@@ -37,8 +39,6 @@ int board_init(void)
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
|
||||
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
|
||||
printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
|
||||
|
||||
@@ -31,7 +31,6 @@ LIB = $(obj)libfreescale.o
|
||||
|
||||
COBJS-$(CONFIG_FSL_CADMUS) += cadmus.o
|
||||
COBJS-$(CONFIG_FSL_VIA) += cds_via.o
|
||||
COBJS-$(CONFIG_FSL_DIU_FB) += fsl_diu_fb.o
|
||||
COBJS-$(CONFIG_FSL_PIXIS) += pixis.o
|
||||
COBJS-$(CONFIG_FSL_NGPIXIS) += ngpixis.o
|
||||
COBJS-$(CONFIG_PQ_MDS_PIB) += pq-mds-pib.o
|
||||
|
||||
@@ -60,9 +60,6 @@ int checkboard(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char *board_hwconfig = "foo:bar=baz";
|
||||
const char *cpu_hwconfig = "foo:bar=baz";
|
||||
|
||||
phys_size_t
|
||||
initdram(int board_type)
|
||||
{
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#define PMUXCR_ELBCDIU_MASK 0xc0000000
|
||||
#define PMUXCR_ELBCDIU_NOR16 0x80000000
|
||||
#define PMUXCR_ELBCDIU_DIU 0x40000000
|
||||
|
||||
/*
|
||||
* DIU Area Descriptor
|
||||
@@ -131,9 +132,8 @@ int platform_diu_init(unsigned int *xres, unsigned int *yres)
|
||||
px_brdcfg0 = in_8(lbc_lcs1_ba);
|
||||
out_8(lbc_lcs1_ba, px_brdcfg0 | PX_BRDCFG0_ELBC_DIU);
|
||||
|
||||
/* Setting PMUXCR to switch to DVI from ELBC */
|
||||
clrsetbits_be32(&gur->pmuxcr,
|
||||
PMUXCR_ELBCDIU_MASK, PMUXCR_ELBCDIU_NOR16);
|
||||
/* Set PMUXCR to switch the muxed pins from the LBC to the DIU */
|
||||
clrsetbits_be32(&gur->pmuxcr, PMUXCR_ELBCDIU_MASK, PMUXCR_ELBCDIU_DIU);
|
||||
pmuxcr = in_be32(&gur->pmuxcr);
|
||||
|
||||
return fsl_diu_init(*xres, pixel_format, 0);
|
||||
@@ -161,7 +161,7 @@ static int set_mux_to_lbc(void)
|
||||
ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR;
|
||||
|
||||
/* Switch the muxes only if they're currently set to DIU mode */
|
||||
if ((in_be32(&gur->pmuxcr) & PMUXCR_ELBCDIU_MASK) ==
|
||||
if ((in_be32(&gur->pmuxcr) & PMUXCR_ELBCDIU_MASK) !=
|
||||
PMUXCR_ELBCDIU_NOR16) {
|
||||
/*
|
||||
* In DIU mode, the PIXIS can only be accessed indirectly
|
||||
@@ -216,8 +216,17 @@ void flash_write8(u8 value, void *addr)
|
||||
int sw = set_mux_to_lbc();
|
||||
|
||||
__raw_writeb(value, addr);
|
||||
if (sw)
|
||||
if (sw) {
|
||||
/*
|
||||
* To ensure the post-write is completed to eLBC, software must
|
||||
* perform a dummy read from one valid address from eLBC space
|
||||
* before changing the eLBC_DIU from NOR mode to DIU mode.
|
||||
* set_mux_to_diu() includes a sync that will ensure the
|
||||
* __raw_readb() completes before it switches the mux.
|
||||
*/
|
||||
__raw_readb(addr);
|
||||
set_mux_to_diu();
|
||||
}
|
||||
}
|
||||
|
||||
void flash_write16(u16 value, void *addr)
|
||||
@@ -225,8 +234,17 @@ void flash_write16(u16 value, void *addr)
|
||||
int sw = set_mux_to_lbc();
|
||||
|
||||
__raw_writew(value, addr);
|
||||
if (sw)
|
||||
if (sw) {
|
||||
/*
|
||||
* To ensure the post-write is completed to eLBC, software must
|
||||
* perform a dummy read from one valid address from eLBC space
|
||||
* before changing the eLBC_DIU from NOR mode to DIU mode.
|
||||
* set_mux_to_diu() includes a sync that will ensure the
|
||||
* __raw_readb() completes before it switches the mux.
|
||||
*/
|
||||
__raw_readb(addr);
|
||||
set_mux_to_diu();
|
||||
}
|
||||
}
|
||||
|
||||
void flash_write32(u32 value, void *addr)
|
||||
@@ -234,18 +252,47 @@ void flash_write32(u32 value, void *addr)
|
||||
int sw = set_mux_to_lbc();
|
||||
|
||||
__raw_writel(value, addr);
|
||||
if (sw)
|
||||
if (sw) {
|
||||
/*
|
||||
* To ensure the post-write is completed to eLBC, software must
|
||||
* perform a dummy read from one valid address from eLBC space
|
||||
* before changing the eLBC_DIU from NOR mode to DIU mode.
|
||||
* set_mux_to_diu() includes a sync that will ensure the
|
||||
* __raw_readb() completes before it switches the mux.
|
||||
*/
|
||||
__raw_readb(addr);
|
||||
set_mux_to_diu();
|
||||
}
|
||||
}
|
||||
|
||||
void flash_write64(u64 value, void *addr)
|
||||
{
|
||||
int sw = set_mux_to_lbc();
|
||||
uint32_t *p = addr;
|
||||
|
||||
/* There is no __raw_writeq(), so do the write manually */
|
||||
*(volatile u64 *)addr = value;
|
||||
if (sw)
|
||||
/*
|
||||
* There is no __raw_writeq(), so do the write manually. We don't trust
|
||||
* the compiler, so we use inline assembly.
|
||||
*/
|
||||
__asm__ __volatile__(
|
||||
"stw%U0%X0 %2,%0;\n"
|
||||
"stw%U1%X1 %3,%1;\n"
|
||||
: "=m" (*p), "=m" (*(p + 1))
|
||||
: "r" ((uint32_t) (value >> 32)), "r" ((uint32_t) (value)));
|
||||
|
||||
if (sw) {
|
||||
/*
|
||||
* To ensure the post-write is completed to eLBC, software must
|
||||
* perform a dummy read from one valid address from eLBC space
|
||||
* before changing the eLBC_DIU from NOR mode to DIU mode. We
|
||||
* read addr+4 because we just wrote to addr+4, so that's how we
|
||||
* maintain execution order. set_mux_to_diu() includes a sync
|
||||
* that will ensure the __raw_readb() completes before it
|
||||
* switches the mux.
|
||||
*/
|
||||
__raw_readb(addr + 4);
|
||||
set_mux_to_diu();
|
||||
}
|
||||
}
|
||||
|
||||
u8 flash_read8(void *addr)
|
||||
|
||||
@@ -69,9 +69,6 @@ int checkboard(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char *board_hwconfig = "foo:bar=baz";
|
||||
const char *cpu_hwconfig = "foo:bar=baz";
|
||||
|
||||
phys_size_t initdram(int board_type)
|
||||
{
|
||||
phys_size_t dram_size = 0;
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
#include <asm/mach-types.h>
|
||||
#include "igep0020.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
/* GPMC definitions for LAN9221 chips */
|
||||
static const u32 gpmc_lan_config[] = {
|
||||
NET_LAN9221_GPMC_CONFIG1,
|
||||
@@ -48,8 +50,6 @@ static const u32 gpmc_lan_config[] = {
|
||||
*/
|
||||
int board_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
|
||||
/* board id for Linux */
|
||||
gd->bd->bi_arch_number = MACH_TYPE_IGEP0020;
|
||||
|
||||
@@ -31,4 +31,3 @@
|
||||
|
||||
# For use with external or internal boots.
|
||||
CONFIG_SYS_TEXT_BASE = 0x80008000
|
||||
|
||||
|
||||
@@ -30,14 +30,14 @@
|
||||
#include <asm/mach-types.h>
|
||||
#include "igep0030.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
/*
|
||||
* Routine: board_init
|
||||
* Description: Early hardware init.
|
||||
*/
|
||||
int board_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
|
||||
/* board id for Linux */
|
||||
gd->bd->bi_arch_number = MACH_TYPE_IGEP0030;
|
||||
|
||||
@@ -32,11 +32,12 @@
|
||||
#include <pci.h>
|
||||
#endif
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
extern void init_AVR_DUART(void);
|
||||
|
||||
int checkboard (void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
char *p;
|
||||
bd_t *bd = gd->bd;
|
||||
|
||||
|
||||
@@ -27,4 +27,4 @@
|
||||
# (mem base + reserved)
|
||||
|
||||
# For use with external or internal boots.
|
||||
CONFIG_SYS_TEXT_BASE = 0x80e80000
|
||||
CONFIG_SYS_TEXT_BASE = 0x80008000
|
||||
|
||||
@@ -30,4 +30,4 @@
|
||||
# (mem base + reserved)
|
||||
|
||||
# For use with external or internal boots.
|
||||
CONFIG_SYS_TEXT_BASE = 0x80e80000
|
||||
CONFIG_SYS_TEXT_BASE = 0x80008000
|
||||
|
||||
@@ -39,14 +39,14 @@
|
||||
#include <asm/mach-types.h>
|
||||
#include "zoom1.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
/*
|
||||
* Routine: board_init
|
||||
* Description: Early hardware init.
|
||||
*/
|
||||
int board_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
|
||||
/* board id for Linux */
|
||||
gd->bd->bi_arch_number = MACH_TYPE_OMAP_LDP;
|
||||
|
||||
@@ -30,4 +30,4 @@
|
||||
# (mem base + reserved)
|
||||
|
||||
# For use with external or internal boots.
|
||||
CONFIG_SYS_TEXT_BASE = 0x80e80000
|
||||
CONFIG_SYS_TEXT_BASE = 0x80008000
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
#include "zoom2.h"
|
||||
#include "zoom2_serial.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
/*
|
||||
* This the the zoom2, board specific, gpmc configuration for the
|
||||
* quad uart on the debug board. The more general gpmc configurations
|
||||
@@ -120,7 +122,6 @@ void zoom2_identify(void)
|
||||
*/
|
||||
int board_init (void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
u32 *gpmc_config;
|
||||
|
||||
gpmc_init (); /* in SRAM or SDRAM, finish GPMC */
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/processor.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int checkboard(void)
|
||||
{
|
||||
puts("BOARD: MPR2\n");
|
||||
@@ -152,8 +154,6 @@ int board_init(void)
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
|
||||
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
|
||||
printf("SDRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/processor.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#define LED_BASE 0xB0800000
|
||||
|
||||
int checkboard(void)
|
||||
@@ -45,8 +47,6 @@ int board_init(void)
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
|
||||
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
|
||||
printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/processor.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#define LED_BASE 0xB0800000
|
||||
|
||||
int checkboard(void)
|
||||
@@ -46,8 +48,6 @@ int board_init(void)
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
|
||||
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
|
||||
printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#include <common.h>
|
||||
#include <asm/processor.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int checkboard(void)
|
||||
{
|
||||
puts("BOARD: SH7750/SH7750S/SH7750R Solution Engine\n");
|
||||
@@ -37,8 +39,6 @@ int board_init(void)
|
||||
|
||||
int dram_init (void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
|
||||
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
|
||||
printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
#include <asm/mach-types.h>
|
||||
#include "overo.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#define TWL4030_I2C_BUS 0
|
||||
#define EXPANSION_EEPROM_I2C_BUS 2
|
||||
#define EXPANSION_EEPROM_I2C_ADDRESS 0x51
|
||||
@@ -87,8 +89,6 @@ static const u32 gpmc_lan_config[] = {
|
||||
*/
|
||||
int board_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
|
||||
/* board id for Linux */
|
||||
gd->bd->bi_arch_number = MACH_TYPE_OVERO;
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
#include <asm/mach-types.h>
|
||||
#include "pandora.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#define TWL4030_BB_CFG_BBCHEN (1 << 4)
|
||||
#define TWL4030_BB_CFG_BBSEL_3200MV (3 << 2)
|
||||
#define TWL4030_BB_CFG_BBISEL_500UA 2
|
||||
@@ -47,8 +49,6 @@
|
||||
*/
|
||||
int board_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
|
||||
/* board id for Linux */
|
||||
gd->bd->bi_arch_number = MACH_TYPE_OMAP3_PANDORA;
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/processor.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int checkboard(void)
|
||||
{
|
||||
puts("BOARD: Renesas MigoR\n");
|
||||
@@ -41,8 +43,6 @@ int board_init(void)
|
||||
|
||||
int dram_init (void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
|
||||
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
|
||||
printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/processor.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
/* PRI control register */
|
||||
#define PRPRICR5 0xFF800048 /* LMB */
|
||||
#define PRPRICR5_D 0x2a
|
||||
@@ -143,8 +145,6 @@ int board_init(void)
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
|
||||
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
|
||||
printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/pci.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int checkboard(void)
|
||||
{
|
||||
puts("BOARD: Renesas Solutions R2D Plus\n");
|
||||
@@ -41,8 +43,6 @@ int board_init(void)
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
|
||||
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
|
||||
printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#include <netdev.h>
|
||||
#include "r7780mp.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int checkboard(void)
|
||||
{
|
||||
#if defined(CONFIG_R7780MP)
|
||||
@@ -46,8 +48,6 @@ int board_init(void)
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
|
||||
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
|
||||
printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/processor.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int checkboard(void)
|
||||
{
|
||||
puts("BOARD: Renesas Technology RSK7203\n");
|
||||
@@ -39,8 +41,6 @@ int board_init(void)
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
|
||||
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
|
||||
printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/processor.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#define CPU_CMDREG 0xB1000006
|
||||
#define PDCR 0xffef0006
|
||||
#define PECR 0xffef0008
|
||||
@@ -64,8 +66,6 @@ int board_init(void)
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
|
||||
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
|
||||
printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#include <asm/pci.h>
|
||||
#include <netdev.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int checkboard(void)
|
||||
{
|
||||
puts("BOARD: Renesas Technology Corp. R0P7785LC0011RL\n");
|
||||
@@ -36,8 +38,6 @@ int board_init(void)
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
|
||||
gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
|
||||
printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
CONFIG_SYS_TEXT_BASE = 0x23f00000
|
||||
@@ -280,10 +280,17 @@ int board_eth_init(bd_t *bis)
|
||||
#endif
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
/* dram_init must store complete ramsize in gd->ram_size */
|
||||
gd->ram_size = get_ram_size((volatile void *)PHYS_SDRAM,
|
||||
PHYS_SDRAM_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void dram_init_banksize(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_RESET_PHY_R
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
CONFIG_SYS_TEXT_BASE = 0x23f00000
|
||||
@@ -377,10 +377,17 @@ int board_init(void)
|
||||
}
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
/* dram_init must store complete ramsize in gd->ram_size */
|
||||
gd->ram_size = get_ram_size((volatile void *)PHYS_SDRAM,
|
||||
PHYS_SDRAM_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void dram_init_banksize(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_RESET_PHY_R
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
CONFIG_SYS_TEXT_BASE = 0x73f00000
|
||||
@@ -158,10 +158,17 @@ int board_init(void)
|
||||
}
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
/* dram_init must store complete ramsize in gd->ram_size */
|
||||
gd->ram_size = get_ram_size((volatile void *)PHYS_SDRAM,
|
||||
PHYS_SDRAM_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void dram_init_banksize(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_RESET_PHY_R
|
||||
|
||||
@@ -42,6 +42,14 @@ int board_init(void)
|
||||
}
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->ram_size = PHYS_SDRAM_1_SIZE + PHYS_SDRAM_2_SIZE +
|
||||
PHYS_SDRAM_3_SIZE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void dram_init_banksize(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
||||
@@ -49,8 +57,6 @@ int dram_init(void)
|
||||
gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
|
||||
gd->bd->bi_dram[2].start = PHYS_SDRAM_3;
|
||||
gd->bd->bi_dram[2].size = PHYS_SDRAM_3_SIZE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DISPLAY_BOARDINFO
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
#include <netdev.h>
|
||||
#include <asm/arch/s3c6400.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
#define CS8900_Tacs 0x0 /* 0clk address set-up */
|
||||
#define CS8900_Tcos 0x4 /* 4clk chip selection set-up */
|
||||
@@ -63,8 +65,6 @@ static void cs8900_pre_init(void)
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
cs8900_pre_init();
|
||||
|
||||
/* NOR-flash in SROM0 */
|
||||
@@ -80,8 +80,6 @@ int board_init(void)
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
||||
|
||||
|
||||
@@ -65,13 +65,17 @@ int board_init(void)
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = get_ram_size((long *)PHYS_SDRAM_1,
|
||||
PHYS_SDRAM_1_SIZE);
|
||||
gd->ram_size = get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void dram_init_banksize(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DISPLAY_BOARDINFO
|
||||
int checkboard(void)
|
||||
{
|
||||
|
||||
@@ -51,6 +51,8 @@
|
||||
|
||||
#define BEAGLE_NO_EEPROM 0xffffffff
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
static struct {
|
||||
unsigned int device_vendor;
|
||||
unsigned char revision;
|
||||
@@ -66,8 +68,6 @@ static struct {
|
||||
*/
|
||||
int board_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
|
||||
/* board id for Linux */
|
||||
gd->bd->bi_arch_number = MACH_TYPE_OMAP3_BEAGLE;
|
||||
|
||||
@@ -37,9 +37,11 @@
|
||||
#include <asm/mach-types.h>
|
||||
#include "evm.h"
|
||||
|
||||
static u8 omap3_evm_version;
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
u8 get_omap3_evm_rev(void)
|
||||
static u32 omap3_evm_version;
|
||||
|
||||
u32 get_omap3_evm_rev(void)
|
||||
{
|
||||
return omap3_evm_version;
|
||||
}
|
||||
@@ -103,8 +105,6 @@ u8 omap3_evm_need_extvbus(void)
|
||||
*/
|
||||
int board_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
|
||||
/* board id for Linux */
|
||||
gd->bd->bi_arch_number = MACH_TYPE_OMAP3EVM;
|
||||
|
||||
@@ -45,7 +45,7 @@ enum {
|
||||
OMAP3EVM_BOARD_GEN_2, /* EVM Rev >= Rev E */
|
||||
};
|
||||
|
||||
u8 get_omap3_evm_rev(void);
|
||||
u32 get_omap3_evm_rev(void);
|
||||
|
||||
#if defined(CONFIG_CMD_NET)
|
||||
static void setup_net_chip(void);
|
||||
|
||||
@@ -30,4 +30,4 @@
|
||||
# (mem base + reserved)
|
||||
|
||||
# For use with external or internal boots.
|
||||
CONFIG_SYS_TEXT_BASE = 0x80e80000
|
||||
CONFIG_SYS_TEXT_BASE = 0x80008000
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
#include <asm/mach-types.h>
|
||||
#include "sdp.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
const omap3_sysinfo sysinfo = {
|
||||
DDR_DISCRETE,
|
||||
"OMAP3 SDP3430 board",
|
||||
@@ -101,8 +103,6 @@ extern struct gpmc *gpmc_cfg;
|
||||
*/
|
||||
int board_init(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
|
||||
/* TODO: Dynamically pop out CS mapping and program accordingly */
|
||||
/* Configure devices for default ON ON ON settings */
|
||||
|
||||
11
boards.cfg
11
boards.cfg
@@ -48,7 +48,8 @@ lpc2292sodimm arm arm720t - -
|
||||
SMN42 arm arm720t - siemens lpc2292
|
||||
evb4510 arm arm720t - - s3c4510b
|
||||
a320evb arm arm920t - faraday a320
|
||||
at91rm9200ek arm arm920t - atmel at91
|
||||
at91rm9200ek arm arm920t at91rm9200ek atmel at91 at91rm9200ek
|
||||
at91rm9200ek_ram arm arm920t at91rm9200ek atmel at91 at91rm9200ek:RAMBOOT
|
||||
eb_cpux9k2 arm arm920t - BuS at91
|
||||
cmc_pu2 arm arm920t - - at91rm9200
|
||||
csb637 arm arm920t - - at91rm9200
|
||||
@@ -70,6 +71,8 @@ voiceblue arm arm925t
|
||||
omap1510inn arm arm925t - ti
|
||||
afeb9260 arm arm926ejs - - at91
|
||||
at91cap9adk arm arm926ejs - atmel at91
|
||||
top9000eval_xe arm arm926ejs top9000 emk at91 top9000:EVAL9000
|
||||
top9000su_xe arm arm926ejs top9000 emk at91 top9000:SU9000
|
||||
meesc arm arm926ejs - esd at91
|
||||
otc570 arm arm926ejs - esd at91
|
||||
pm9261 arm arm926ejs - ronetix at91
|
||||
@@ -402,10 +405,10 @@ vme8349 powerpc mpc83xx vme8349 esd
|
||||
MPC8308RDB powerpc mpc83xx mpc8308rdb freescale
|
||||
MPC8313ERDB_33 powerpc mpc83xx mpc8313erdb freescale - MPC8313ERDB:SYS_33MHZ
|
||||
MPC8313ERDB_66 powerpc mpc83xx mpc8313erdb freescale - MPC8313ERDB:SYS_66MHZ
|
||||
MPC8313ERDB_NAND_33 powerpc mpc83xx mpc8313erdb freescale - MPC8313ERDB:SYS_33MHZ,NAND_U_BOOT,SYS_TEXT_BASE=0x00100000
|
||||
MPC8313ERDB_NAND_66 powerpc mpc83xx mpc8313erdb freescale - MPC8313ERDB:SYS_66MHZ,NAND_U_BOOT,SYS_TEXT_BASE=0x00100000
|
||||
MPC8313ERDB_NAND_33 powerpc mpc83xx mpc8313erdb freescale - MPC8313ERDB:SYS_33MHZ,NAND_U_BOOT
|
||||
MPC8313ERDB_NAND_66 powerpc mpc83xx mpc8313erdb freescale - MPC8313ERDB:SYS_66MHZ,NAND_U_BOOT
|
||||
MPC8315ERDB powerpc mpc83xx mpc8315erdb freescale - MPC8315ERDB
|
||||
MPC8315ERDB_NAND powerpc mpc83xx mpc8315erdb freescale - MPC8315ERDB:NAND
|
||||
MPC8315ERDB_NAND powerpc mpc83xx mpc8315erdb freescale - MPC8315ERDB:NAND_U_BOOT
|
||||
MPC8323ERDB powerpc mpc83xx mpc8323erdb freescale
|
||||
MPC832XEMDS powerpc mpc83xx mpc832xemds freescale - MPC832XEMDS:
|
||||
MPC832XEMDS_ATM powerpc mpc83xx mpc832xemds freescale - MPC832XEMDS:PQ_MDS_PIB=1,PQ_MDS_PIB_ATM=1
|
||||
|
||||
@@ -293,7 +293,7 @@ static int onenand_dump(struct mtd_info *mtd, ulong off, int only_oob)
|
||||
addr = (loff_t) off;
|
||||
memset(&ops, 0, sizeof(ops));
|
||||
ops.datbuf = datbuf;
|
||||
ops.oobbuf = oobbuf; /* must exist, but oob data will be appended to ops.datbuf */
|
||||
ops.oobbuf = oobbuf;
|
||||
ops.len = mtd->writesize;
|
||||
ops.ooblen = mtd->oobsize;
|
||||
ops.retlen = 0;
|
||||
@@ -319,6 +319,8 @@ static int onenand_dump(struct mtd_info *mtd, ulong off, int only_oob)
|
||||
}
|
||||
puts("OOB:\n");
|
||||
i = mtd->oobsize >> 3;
|
||||
p = oobbuf;
|
||||
|
||||
while (i--) {
|
||||
printf("\t%02x %02x %02x %02x %02x %02x %02x %02x\n",
|
||||
p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7]);
|
||||
|
||||
@@ -42,6 +42,11 @@ struct selected_dev {
|
||||
|
||||
static struct selected_dev ubi_dev;
|
||||
|
||||
#ifdef CONFIG_CMD_UBIFS
|
||||
int ubifs_is_mounted(void);
|
||||
void cmd_ubifs_umount(void);
|
||||
#endif
|
||||
|
||||
static void ubi_dump_vol_info(const struct ubi_volume *vol)
|
||||
{
|
||||
ubi_msg("volume information dump:");
|
||||
@@ -472,6 +477,16 @@ static int do_ubi(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
|
||||
if (argc < 3)
|
||||
return cmd_usage(cmdtp);
|
||||
|
||||
#ifdef CONFIG_CMD_UBIFS
|
||||
/*
|
||||
* Automatically unmount UBIFS partition when user
|
||||
* changes the UBI device. Otherwise the following
|
||||
* UBIFS commands will crash.
|
||||
*/
|
||||
if (ubifs_is_mounted())
|
||||
cmd_ubifs_umount();
|
||||
#endif
|
||||
|
||||
/* todo: get dev number for NAND... */
|
||||
ubi_dev.nr = 0;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user