Commit 5b746c3e authored by Wolfgang Denk's avatar Wolfgang Denk

Merge branch 'master' of /home/wd/git/u-boot/custodians

parents b31f6434 2fa0dd15
......@@ -37,17 +37,24 @@ static void cds_pci_fixup(void *blob)
map = ft_get_prop(blob, "/" OF_SOC "/[email protected]/interrupt-map", &len);
len /= sizeof(u32);
if (!map)
map = ft_get_prop(blob, "/" OF_PCI "/interrupt-map", &len);
slot = get_pci_slot();
if (map) {
len /= sizeof(u32);
for (i=0;i<len;i+=7) {
/* We rotate the interrupt pins so that the mapping
* changes depending on the slot the carrier card is in.
*/
map[3] = ((map[3] + slot - 2) % 4) + 1;
slot = get_pci_slot();
map+=7;
for (i=0;i<len;i+=7) {
/* We rotate the interrupt pins so that the mapping
* changes depending on the slot the carrier card is in.
*/
map[3] = ((map[3] + slot - 2) % 4) + 1;
map+=7;
}
} else {
printf("*** Warning - No PCI node found\n");
}
}
#endif
......
......@@ -43,14 +43,14 @@ SECTIONS
. = ALIGN(4);
.data : { *(.data) }
. = ALIGN(4);
.sdata : { *(.sdata) }
_gp = ALIGN(16);
. = .;
_gp = ALIGN(16) + 0x7ff0;
__got_start = .;
.got : { *(.got) }
__got_end = .;
.got : {
__got_start = .;
*(.got)
__got_end = .;
}
.sdata : { *(.sdata) }
......
......@@ -43,14 +43,14 @@ SECTIONS
. = ALIGN(4);
.data : { *(.data) }
. = ALIGN(4);
.sdata : { *(.sdata) }
. = .;
_gp = ALIGN(16) + 0x7ff0;
_gp = ALIGN(16);
__got_start = .;
.got : { *(.got) }
__got_end = .;
.got : {
__got_start = .;
*(.got)
__got_end = .;
}
.sdata : { *(.sdata) }
......
......@@ -43,14 +43,14 @@ SECTIONS
. = ALIGN(4);
.data : { *(.data) }
. = ALIGN(4);
.sdata : { *(.sdata) }
_gp = ALIGN(16);
. = .;
_gp = ALIGN(16) + 0x7ff0;
__got_start = .;
.got : { *(.got) }
__got_end = .;
.got : {
__got_start = .;
*(.got)
__got_end = .;
}
.sdata : { *(.sdata) }
......
......@@ -43,14 +43,14 @@ SECTIONS
. = ALIGN(4);
.data : { *(.data) }
. = ALIGN(4);
.sdata : { *(.sdata) }
. = .;
_gp = ALIGN(16) + 0x7ff0;
_gp = ALIGN(16);
__got_start = .;
.got : { *(.got) }
__got_end = .;
.got : {
__got_start = .;
*(.got)
__got_end = .;
}
.sdata : { *(.sdata) }
......
......@@ -53,14 +53,14 @@ SECTIONS
. = ALIGN(4);
.data : { *(.data) }
. = ALIGN(4);
.sdata : { *(.sdata) }
_gp = ALIGN(16);
. = .;
_gp = ALIGN(16) + 0x7ff0;
__got_start = .;
.got : { *(.got) }
__got_end = .;
.got : {
__got_start = .;
*(.got)
__got_end = .;
}
.sdata : { *(.sdata) }
......
......@@ -43,14 +43,14 @@ SECTIONS
. = ALIGN(4);
.data : { *(.data) }
. = ALIGN(4);
.sdata : { *(.sdata) }
_gp = ALIGN(16);
. = .;
_gp = ALIGN(16) + 0x7ff0;
__got_start = .;
.got : { *(.got) }
__got_end = .;
.got : {
__got_start = .;
*(.got)
__got_end = .;
}
.sdata : { *(.sdata) }
......
......@@ -35,6 +35,6 @@ else
ENDIANNESS = -EB
endif
MIPSFLAGS += $(ENDIANNESS) -mabicalls
MIPSFLAGS += $(ENDIANNESS)
PLATFORM_CPPFLAGS += $(MIPSFLAGS)
......@@ -234,11 +234,11 @@ reset:
li t0, CONF_CM_UNCACHED
mtc0 t0, CP0_CONFIG
/* Initialize GOT pointer.
/* Initialize $gp.
*/
bal 1f
nop
.word _GLOBAL_OFFSET_TABLE_
.word _gp
1:
move gp, ra
lw t1, 0(ra)
......@@ -306,9 +306,9 @@ relocate_code:
move t1, a2
/*
* Fix GOT pointer:
* Fix $gp:
*
* New GOT-PTR = (old GOT-PTR - CFG_MONITOR_BASE) + Destination Address
* New $gp = (Old $gp - CFG_MONITOR_BASE) + Destination Address
*/
move t6, gp
sub gp, CFG_MONITOR_BASE
......@@ -341,15 +341,22 @@ relocate_code:
j t0
nop
.gpword _GLOBAL_OFFSET_TABLE_ /* _GLOBAL_OFFSET_TABLE_ - _gp */
.word uboot_end_data
.word uboot_end
.word num_got_entries
in_ram:
/* Now we want to update GOT.
/*
* Now we want to update GOT.
*
* GOT[0] is reserved. GOT[1] is also reserved for the dynamic object
* generated by GNU ld. Skip these reserved entries from relocation.
*/
lw t3, -4(t0) /* t3 <-- num_got_entries */
addi t4, gp, 8 /* Skipping first two entries. */
lw t4, -16(t0) /* t4 <-- (_GLOBAL_OFFSET_TABLE_ - _gp) */
add t4, t4, gp /* t4 now holds _GLOBAL_OFFSET_TABLE_ */
addi t4, t4, 8 /* Skipping first two entries. */
li t2, 2
1:
lw t1, 0(t4)
......
......@@ -163,7 +163,12 @@ int do_reset (cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[])
* Initiate hard reset in debug control register DBCR0
* Make sure MSR[DE] = 1
*/
unsigned long val;
unsigned long val, msr;
msr = mfmsr ();
msr |= MSR_DE;
mtmsr (msr);
val = mfspr(DBCR0);
val |= 0x70000000;
mtspr(DBCR0,val);
......
......@@ -218,6 +218,8 @@ _start_e500:
bdnz 0b
/* Clear and set up some registers. */
li r0,0
mtmsr r0
li r0,0x0000
lis r1,0xffff
mtspr DEC,r0 /* prevent dec exceptions */
......@@ -266,18 +268,17 @@ _start_e500:
*/
lis r3,CFG_INIT_RAM_ADDR@h
ori r3,r3,CFG_INIT_RAM_ADDR@l
li r2,512 /* 512*32=16K */
li r2,(CFG_DCACHE_SIZE / (2 * CFG_CACHELINE_SIZE))
mtctr r2
li r0,0
1:
dcbz r0,r3
dcbtls 0,r0,r3
addi r3,r3,32
addi r3,r3,CFG_CACHELINE_SIZE
bdnz 1b
/* Jump out the last 4K page and continue to 'normal' start */
#ifdef CFG_RAMBOOT
bl 3f
b _start_cont
#else
/* Calculate absolute address in FLASH and jump there */
......@@ -286,15 +287,9 @@ _start_e500:
ori r3,r3,CFG_MONITOR_BASE@l
addi r3,r3,_start_cont - _start + _START_OFFSET
mtlr r3
blr
#endif
3: li r0,0
mtspr SRR1,r0 /* Keep things disabled for now */
mflr r1
mtspr SRR0,r1
rfi
isync
.text
.globl _start
_start:
......@@ -701,6 +696,7 @@ in8:
.globl out8
out8:
stb r4,0x0000(r3)
sync
blr
/*------------------------------------------------------------------------------- */
......@@ -710,6 +706,7 @@ out8:
.globl out16
out16:
sth r4,0x0000(r3)
sync
blr
/*------------------------------------------------------------------------------- */
......@@ -719,6 +716,7 @@ out16:
.globl out16r
out16r:
sthbrx r4,r0,r3
sync
blr
/*------------------------------------------------------------------------------- */
......@@ -728,6 +726,7 @@ out16r:
.globl out32
out32:
stw r4,0x0000(r3)
sync
blr
/*------------------------------------------------------------------------------- */
......@@ -737,6 +736,7 @@ out32:
.globl out32r
out32r:
stwbrx r4,r0,r3
sync
blr
/*------------------------------------------------------------------------------- */
......@@ -1061,11 +1061,11 @@ unlock_ram_in_cache:
/* invalidate the INIT_RAM section */
lis r3,(CFG_INIT_RAM_ADDR & ~31)@h
ori r3,r3,(CFG_INIT_RAM_ADDR & ~31)@l
li r4,512
li r4,(CFG_DCACHE_SIZE / (2 * CFG_CACHELINE_SIZE))
mtctr r4
1: icbi r0,r3
dcbi r0,r3
addi r3,r3,32
addi r3,r3,CFG_CACHELINE_SIZE
bdnz 1b
sync /* Wait for all icbi to complete on bus */
isync
......
......@@ -803,6 +803,7 @@ static void startup_tsec(struct eth_device *dev)
/* Tell the DMA it is clear to go */
regs->dmactrl |= DMACTRL_INIT_SETTINGS;
regs->tstat = TSTAT_CLEAR_THALT;
regs->rstat = RSTAT_CLEAR_RHALT;
regs->dmactrl &= ~(DMACTRL_GRS | DMACTRL_GTS);
}
......
......@@ -39,14 +39,14 @@ SECTIONS
. = ALIGN(4);
.data : { *(.data) }
. = ALIGN(4);
.sdata : { *(.sdata) }
. = .;
_gp = ALIGN(16) + 0x7ff0;
_gp = ALIGN(16);
__got_start = .;
.got : { *(.got) }
__got_end = .;
.got : {
__got_start = .;
*(.got)
__got_end = .;
}
.sdata : { *(.sdata) }
......
......@@ -49,7 +49,7 @@
cannot access physical memory directly from core */
#define UNCACHED_SDRAM(a) (((unsigned long)(a)) | 0x20000000)
#else /* !CONFIG_AU1X00 */
#define UNCACHED_SDRAM(a) PHYSADDR(a)
#define UNCACHED_SDRAM(a) KSEG1ADDR(a)
#endif /* CONFIG_AU1X00 */
#endif /* __ASSEMBLY__ */
/*
......
......@@ -316,6 +316,7 @@ extern unsigned long get_clock_freq(void);
#define OF_SOC "[email protected]"
#define OF_TBCLK (bd->bi_busfreq / 8)
#define OF_STDOUT_PATH "/[email protected]/[email protected]"
#define OF_PCI "[email protected]"
/*
* I2C
......
......@@ -340,6 +340,7 @@ extern unsigned long get_clock_freq(void);
#define OF_SOC "[email protected]"
#define OF_TBCLK (bd->bi_busfreq / 8)
#define OF_STDOUT_PATH "/[email protected]/[email protected]"
#define OF_PCI "[email protected]"
/*
* I2C
......
......@@ -316,6 +316,7 @@ extern unsigned long get_clock_freq(void);
#define OF_SOC "[email protected]"
#define OF_TBCLK (bd->bi_busfreq / 8)
#define OF_STDOUT_PATH "/[email protected]/[email protected]"
#define OF_PCI "[email protected]"
/*
* I2C
......
......@@ -297,7 +297,7 @@ extern unsigned long get_clock_freq(void);
#define OF_SOC "[email protected]"
#define OF_QE "[email protected]"
#define OF_TBCLK (bd->bi_busfreq / 8)
#define OF_STDOUT_PATH "/[email protected]/[email protected]600"
#define OF_STDOUT_PATH "/[email protected]/[email protected]500"
/*
* I2C
......
......@@ -22,3 +22,28 @@
#
PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__
#
# From Linux arch/mips/Makefile
#
# GCC uses -G 0 -mabicalls -fpic as default. We don't want PIC in the kernel
# code since it only slows down the whole thing. At some point we might make
# use of global pointer optimizations but their use of $28 conflicts with
# the current pointer optimization.
#
# The DECStation requires an ECOFF kernel for remote booting, other MIPS
# machines may also. Since BFD is incredibly buggy with respect to
# crossformat linking we rely on the elf2ecoff tool for format conversion.
#
# cflags-y += -G 0 -mno-abicalls -fno-pic -pipe
# cflags-y += -msoft-float
# LDFLAGS_vmlinux += -G 0 -static -n -nostdlib
# MODFLAGS += -mlong-calls
#
#
# Meanwhile, U-Boot rely on PIC. We add proper switches explicitly.
#
PLATFORM_CPPFLAGS += -G 0 -mabicalls -fpic -pipe
PLATFORM_CPPFLAGS += -msoft-float
PLATFORM_LDFLAGS += -G 0 -static -n -nostdlib
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment