]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Merge branch 'master' of git://www.denx.de/git/u-boot-arm
authorWolfgang Denk <wd@denx.de>
Thu, 1 Nov 2007 21:57:33 +0000 (22:57 +0100)
committerWolfgang Denk <wd@denx.de>
Thu, 1 Nov 2007 21:57:33 +0000 (22:57 +0100)
26 files changed:
board/cds/common/ft_board.c
board/dbau1x00/u-boot.lds
board/gth2/u-boot.lds
board/incaip/u-boot.lds
board/pb1x00/u-boot.lds
board/purple/u-boot.lds
board/tb0229/u-boot.lds
board/tqm5200/cmd_stk52xx.c
board/tqm5200/tqm5200.c
board/tqm8xx/tqm8xx.c
cpu/mips/config.mk
cpu/mips/start.S
cpu/mpc85xx/cpu.c
cpu/mpc85xx/start.S
drivers/tsec.c
examples/mips.lds
include/asm-mips/addrspace.h
include/configs/MPC8266ADS.h
include/configs/MPC8541CDS.h
include/configs/MPC8548CDS.h
include/configs/MPC8555CDS.h
include/configs/MPC8568MDS.h
include/configs/TQM5200.h
include/configs/TQM860M.h
include/configs/TQM866M.h
mips_config.mk

index 9d97905ca9b13b1a6bc2466ac4b075a55cf79e03..3eda1009efd140ec3b88a6d5acb2edb1d677a469 100644 (file)
@@ -37,17 +37,24 @@ static void cds_pci_fixup(void *blob)
 
        map = ft_get_prop(blob, "/" OF_SOC "/pci@8000/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
index 10c99179864c752ad1309610c23eaab28cc03620..9639b81acc62fea49eeab2190ab6141a323f13fa 100644 (file)
@@ -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) }
 
index 8ba0b6d4c12906fe8865f50f6119fc7f6ffab054..90432cb8887519ca0e542987e343bc567396a82d 100644 (file)
@@ -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) }
 
index 10c99179864c752ad1309610c23eaab28cc03620..9639b81acc62fea49eeab2190ab6141a323f13fa 100644 (file)
@@ -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) }
 
index a2d19a84c9eae9195799605bbd7b2f0338555b2f..363d974c48f527f84f96124af7b2175a04046d4c 100644 (file)
@@ -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) }
 
index 1bdac1f4a6faa64c02bdf17d00f973a24675ea8a..e7ec012c3be5eb688dd6e3b47280ff6b3889f233 100644 (file)
@@ -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) }
 
index 30a2bc57eac50d9b3504b211ba2c96f362902e97..b2fa9f22dc9c7df0b46fc02f76ebeac9d4a72ce2 100644 (file)
@@ -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) }
 
index b746679afaa0561729c4fdd56ffff332d2499d9c..27a6c4163deb1e5919722807b054b1a5eb7d9c39 100644 (file)
@@ -561,7 +561,7 @@ void led_init(void)
        gpt->gpt6.emsr |=  0x00000024;
        gpt->gpt7.emsr |=  0x00000024;
 
-
+#ifndef CONFIG_TQM5200S
        /* enable SM501 GPIO control (in both power modes) */
        *(vu_long *) (SM501_MMIO_BASE+SM501_POWER_MODE0_GATE) |=
                POWER_MODE_GATE_GPIO_PWM_I2C;
@@ -574,6 +574,7 @@ void led_init(void)
 
        /* configure SM501 gpio pins 48-51 as output */
        *(vu_long *) (SM501_MMIO_BASE+SM501_GPIO_DATA_DIR_HIGH) |= (0xF << 16);
+#endif /* !CONFIG_TQM5200S */
 }
 
 /*
@@ -650,7 +651,7 @@ int do_led(char *argv[])
                        gpt->gpt7.emsr &=  ~(1 << 4);
                }
                break;
-
+#ifndef CONFIG_TQM5200S
        case 24:
                if (strcmp (argv[3], "on") == 0) {
                        *(vu_long *) (SM501_MMIO_BASE+SM501_GPIO_DATA_LOW) |=
@@ -730,7 +731,7 @@ int do_led(char *argv[])
                                ~(0x1 << 19);
                }
                break;
-
+#endif /* !CONFIG_TQM5200S */
        default:
                printf ("%s: invalid led number %s\n", __FUNCTION__, argv[2]);
                return 1;
@@ -1110,7 +1111,7 @@ int do_rs232(char *argv[])
        return error_status;
 }
 
-#ifndef CONFIG_FO300
+#if !defined(CONFIG_FO300) && !defined(CONFIG_TQM5200S)
 static void sm501_backlight (unsigned int state)
 {
        if (state == BL_ON) {
@@ -1120,7 +1121,7 @@ static void sm501_backlight (unsigned int state)
                *(vu_long *)(SM501_MMIO_BASE+SM501_PANEL_DISPLAY_CONTROL) &=
                        ~((1 << 26) | (1 << 27));
 }
-#endif
+#endif /* !CONFIG_FO300 & !CONFIG_TQM5200S */
 
 int cmd_fkt(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
@@ -1160,7 +1161,7 @@ int cmd_fkt(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        else
                                printf ("Error\n");
                        return rcode;
-#ifndef CONFIG_FO300
+#if !defined(CONFIG_FO300) && !defined(CONFIG_TQM5200S)
                } else if (strncmp (argv[1], "backlight", 4) == 0) {
                        if (strncmp (argv[2], "on", 2) == 0) {
                                sm501_backlight (BL_ON);
@@ -1170,7 +1171,7 @@ int cmd_fkt(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                                sm501_backlight (BL_OFF);
                                return 0;
                        }
-#endif
+#endif /* !CONFIG_FO300 & !CONFIG_TQM5200S */
                }
                break;
 
@@ -1228,8 +1229,10 @@ U_BOOT_CMD(
        "     - loopback plug for X83 required\n"
        "fkt rs232 number\n"
        "     - loopback plug(s) for X2 required\n"
+#ifndef CONFIG_TQM5200S
        "fkt backlight on/off\n"
        "     - switch backlight on or off\n"
+#endif /* !CONFIG_TQM5200S */
 );
 #elif defined(CONFIG_FO300)
 U_BOOT_CMD(
index 29d6f00427fa80957db244a83eed26a4e2b513d2..d10cb5937d66ca21bc526c98253dc4bfe99b3b18 100644 (file)
@@ -543,6 +543,7 @@ int last_stage_init (void)
                __asm__ volatile ("sync");
        }
 
+#ifndef CONFIG_TQM5200S        /* The TQM5200S has no SM501 grafic controller */
        /*
         * Check for Grafic Controller
         */
@@ -586,6 +587,7 @@ int last_stage_init (void)
 #endif
 
        return 0;
+#endif /* !CONFIG_TQM5200S */
 }
 
 #ifdef CONFIG_VIDEO_SM501
index 6b206f8a184d6edcd0126a9fd8f1b4340b971102..cebdcc07649d80164568e92e6e5dde99b7049580 100644 (file)
@@ -354,6 +354,8 @@ long int initdram (int board_type)
        udelay (10000);
 
 #ifdef CONFIG_CAN_DRIVER
+       /* UPM initialization for CAN @ CLKOUT <= 66 MHz */
+
        /* Initialize OR3 / BR3 */
        memctl->memc_or3 = CFG_OR3_CAN;
        memctl->memc_br3 = CFG_BR3_CAN;
@@ -362,7 +364,7 @@ long int initdram (int board_type)
        memctl->memc_mbmr = MBMR_GPL_B4DIS;     /* GPL_B4 ouput line Disable */
 
        /* Initialize UPMB for CAN: single read */
-       memctl->memc_mdr = 0xFFFFC004;
+       memctl->memc_mdr = 0xFFFFCC04;
        memctl->memc_mcr = 0x0100 | UPMB;
 
        memctl->memc_mdr = 0x0FFFD004;
@@ -374,23 +376,23 @@ long int initdram (int board_type)
        memctl->memc_mdr = 0x3FFFC004;
        memctl->memc_mcr = 0x0103 | UPMB;
 
-       memctl->memc_mdr = 0xFFFFDC05;
+       memctl->memc_mdr = 0xFFFFDC07;
        memctl->memc_mcr = 0x0104 | UPMB;
 
        /* Initialize UPMB for CAN: single write */
-       memctl->memc_mdr = 0xFFFCC004;
+       memctl->memc_mdr = 0xFFFCCC04;
        memctl->memc_mcr = 0x0118 | UPMB;
 
-       memctl->memc_mdr = 0xCFFCD004;
+       memctl->memc_mdr = 0xCFFCDC04;
        memctl->memc_mcr = 0x0119 | UPMB;
 
-       memctl->memc_mdr = 0x0FFCC000;
+       memctl->memc_mdr = 0x3FFCC000;
        memctl->memc_mcr = 0x011A | UPMB;
 
-       memctl->memc_mdr = 0x7FFCC004;
+       memctl->memc_mdr = 0xFFFCC004;
        memctl->memc_mcr = 0x011B | UPMB;
 
-       memctl->memc_mdr = 0xFFFDCC05;
+       memctl->memc_mdr = 0xFFFDC405;
        memctl->memc_mcr = 0x011C | UPMB;
 #endif                                                 /* CONFIG_CAN_DRIVER */
 
index b29986e26b7bac08bb20653a0ac7fc8a2a58577f..487c4eb5d64368ee41bbe300b73e1e9529669271 100644 (file)
@@ -35,6 +35,6 @@ else
 ENDIANNESS = -EB
 endif
 
-MIPSFLAGS += $(ENDIANNESS) -mabicalls
+MIPSFLAGS += $(ENDIANNESS)
 
 PLATFORM_CPPFLAGS += $(MIPSFLAGS)
index e91e2137d704f7eb8c0fe7ab6b1907673c1f2716..074d01d2dde203e88f0a07e54040f39b0c2324ba 100644 (file)
@@ -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)
index 08e04685f593efbc4a9ee9abc247356ff3449271..bbc54448daa6951728b02938a22d8195721f1e4d 100644 (file)
@@ -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);
index 2c98c2ad8a0cbfa0d9e473fec8daa73d2b950c67..ada6ea505fbf12f297023bae71772bf448aab0fe 100644 (file)
@@ -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
index 4ff3339c7de40d64955b9937470e923f2f939daa..7ba8f0cace90eeeb61d40eb26f0860bc844cc4f1 100644 (file)
@@ -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);
 }
 
index 9d9849bf5c2deede742a3693ee1ca626415e041c..a7707287a2412f130643aae165dab7fc2a07011b 100644 (file)
@@ -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) }
 
index b8214b1c8595cdf82d862d1e5fd8cb60ca1037c3..0e6abd7d0faa914c495dcc50a354c6ca730515db 100644 (file)
@@ -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__ */
 /*
index 14b041e3aecb0a7e897bfec0e6149c77221ef346..d392b981edd17b68abf084c2fb37a96d27f6e981 100644 (file)
 #undef CONFIG_CMD_MFSL
 #undef CONFIG_CMD_MMC
 #undef CONFIG_CMD_NAND
+#undef CONFIG_CMD_ONENAND
 #undef CONFIG_CMD_PCMCIA
 #undef CONFIG_CMD_REISER
 #undef CONFIG_CMD_SCSI
 #undef CONFIG_CMD_UNIVERSE
 #undef CONFIG_CMD_USB
 #undef CONFIG_CMD_XIMG
+#undef CONFIG_CMD_AT91_SPIMUX
 
 /* Define a command string that is automatically executed when no character
  * is read on the console interface withing "Boot Delay" after reset.
index 4e061bd9ff25147758eee27591ad2b346bf7492b..8dda6651efc2e6c5938eb5c06e49757b10020421 100644 (file)
@@ -316,6 +316,7 @@ extern unsigned long get_clock_freq(void);
 #define OF_SOC                 "soc8541@e0000000"
 #define OF_TBCLK               (bd->bi_busfreq / 8)
 #define OF_STDOUT_PATH         "/soc8541@e0000000/serial@4600"
+#define OF_PCI                 "pci@e0008000"
 
 /*
  * I2C
index 608371518939a81876da9e4696183cf51f468604..4edc7fd2b6a5bdcacf395db9b61324c6000f3ed4 100644 (file)
@@ -340,6 +340,7 @@ extern unsigned long get_clock_freq(void);
 #define OF_SOC                 "soc8548@e0000000"
 #define OF_TBCLK               (bd->bi_busfreq / 8)
 #define OF_STDOUT_PATH         "/soc8548@e0000000/serial@4600"
+#define OF_PCI                 "pci@e0008000"
 
 /*
  * I2C
index 1d1b7c907957c153763c92e02732d0499fc9fc99..c414bf033e48aefa27acbbdf42c023783568cbea 100644 (file)
@@ -316,6 +316,7 @@ extern unsigned long get_clock_freq(void);
 #define OF_SOC                 "soc8555@e0000000"
 #define OF_TBCLK               (bd->bi_busfreq / 8)
 #define OF_STDOUT_PATH         "/soc8555@e0000000/serial@4600"
+#define OF_PCI                 "pci@e0008000"
 
 /*
  * I2C
index ba744e99f8d3d0e6437a100570bef7d763c87df9..548e1582a8f5878e9b28bbc64dc9a988132ad087 100644 (file)
@@ -297,7 +297,7 @@ extern unsigned long get_clock_freq(void);
 #define OF_SOC                 "soc8568@e0000000"
 #define OF_QE                  "qe@e0080000"
 #define OF_TBCLK               (bd->bi_busfreq / 8)
-#define OF_STDOUT_PATH         "/soc8568@e0000000/serial@4600"
+#define OF_STDOUT_PATH         "/soc8568@e0000000/serial@4500"
 
 /*
  * I2C
index d55340404d8ad736a83b2df932c5daa51472f287..c3f16f524ef45eacd5bd08a4d5fad9a9e1c0a9cd 100644 (file)
 #  if defined (CONFIG_TQM5200_REV100)
 #   error TQM5200 REV100 not supported on STK52XX REV200 or above
 #  else/* TQM5200 REV200 and above */
-#   define CFG_GPS_PORT_CONFIG 0x91500004
+#   define CFG_GPS_PORT_CONFIG 0x91500404
 #  endif
 # endif
 #elif defined (CONFIG_FO300)
index 684b86f2efe4119db5e96e4127bc7ba8ed3a1b39..fe3a2f020c0dcc8a2d84b47698c44d4058920b7d 100644 (file)
        "net_nfs=tftp 200000 ${bootfile};run nfsargs addip;bootm\0"     \
        "rootpath=/opt/eldk/ppc_8xx\0"                                  \
        "bootfile=/tftpboot/TQM860M/uImage\0"                           \
-       "fdt_addr=40080000\0"                                           \
-       "kernel_addr=400A0000\0"                                        \
+       "fdt_addr=400C0000\0"                                           \
+       "kernel_addr=40100000\0"                                        \
        "ramdisk_addr=40280000\0"                                       \
+       "load=tftp 200000 ${u-boot}\0"                                  \
+       "update=protect off 40000000 +${filesize};"                     \
+               "erase 40000000 +${filesize};"                          \
+               "cp.b 200000 40000000 ${filesize};"                     \
+               "protect on 40000000 +${filesize}\0"                    \
        ""
 #define CONFIG_BOOTCOMMAND     "run flash_self"
 
 #define CFG_FLASH_BASE         0x40000000
 #define        CFG_MONITOR_LEN         (256 << 10)     /* Reserve 256 kB for Monitor   */
 #define CFG_MONITOR_BASE       CFG_FLASH_BASE
-#define        CFG_MALLOC_LEN          (128 << 10)     /* Reserve 128 kB for malloc()  */
+#define        CFG_MALLOC_LEN          (256 << 10)     /* Reserve 256 kB for malloc()  */
 
 /*
  * For booting Linux, the board info and command line data
 #define        CFG_ENV_IS_IN_FLASH     1
 #define        CFG_ENV_OFFSET          0x40000 /*   Offset   of Environment Sector     */
 #define        CFG_ENV_SIZE            0x08000 /* Total Size of Environment Sector     */
-#define        CFG_ENV_SECT_SIZE       0x20000 /* Total Size of Environment Sector     */
+#define        CFG_ENV_SECT_SIZE       0x40000 /* Total Size of Environment Sector     */
 
 /* Address and size of Redundant Environment Sector    */
 #define CFG_ENV_OFFSET_REDUND  (CFG_ENV_OFFSET+CFG_ENV_SECT_SIZE)
index 0d778919a2b0772aee9f005ac6c5ef1f1de24e15..ca3c166524fcc3ed50458b3df15ed0aacb12f6b1 100644 (file)
        "net_nfs=tftp 200000 ${bootfile};run nfsargs addip;bootm\0"     \
        "rootpath=/opt/eldk/ppc_8xx\0"                                  \
        "bootfile=/tftpboot/TQM866M/uImage\0"                           \
-       "fdt_addr=40080000\0"                                           \
-       "kernel_addr=400A0000\0"                                        \
+       "fdt_addr=400C0000\0"                                           \
+       "kernel_addr=40100000\0"                                        \
        "ramdisk_addr=40280000\0"                                       \
+       "load=tftp 200000 ${u-boot}\0"                                  \
+       "update=protect off 40000000 +${filesize};"                     \
+               "erase 40000000 +${filesize};"                          \
+               "cp.b 200000 40000000 ${filesize};"                     \
+               "protect on 40000000 +${filesize}\0"                    \
        ""
 #define CONFIG_BOOTCOMMAND     "run flash_self"
 
 #define CFG_FLASH_BASE         0x40000000
 #define CFG_MONITOR_LEN                (256 << 10)     /* Reserve 256 kB for Monitor   */
 #define CFG_MONITOR_BASE       CFG_FLASH_BASE
-#define CFG_MALLOC_LEN         (128 << 10)     /* Reserve 128 kB for malloc()  */
+#define CFG_MALLOC_LEN         (256 << 10)     /* Reserve 256 kB for malloc()  */
 
 /*
  * For booting Linux, the board info and command line data
 #define CFG_ENV_IS_IN_FLASH    1
 #define CFG_ENV_OFFSET         0x40000 /*   Offset   of Environment Sector     */
 #define CFG_ENV_SIZE           0x08000 /* Total Size of Environment Sector     */
-#define CFG_ENV_SECT_SIZE      0x20000 /* Total Size of Environment Sector     */
+#define CFG_ENV_SECT_SIZE      0x40000 /* Total Size of Environment Sector     */
 
 /* Address and size of Redundant Environment Sector    */
 #define CFG_ENV_OFFSET_REDUND  (CFG_ENV_OFFSET+CFG_ENV_SECT_SIZE)
 #define CFG_PTA_PER_CLK        ((4096 * 64 * 1000) / (4 * 64))
 
 /*
- * Memory Periodic Timer Prescaler
- * Periodic timer for refresh, start with refresh rate for 40 MHz clock
- * (CFG_8xx_CPUCLK_MIN / CFG_PTA_PER_CLK)
+ * Periodic timer (MAMR[PTx]) for 4 * 7.8 us refresh (= 31.2 us per quad)
+ *
+ *                        CPUclock(MHz) * 31.2
+ * CFG_MAMR_PTA = -----------------------------------     with DFBRG = 0
+ *                2^(2*SCCR[DFBRG]) * MPTPR_PTP_DIV16
+ *
+ * CPU clock =  15 MHz:  CFG_MAMR_PTA =  29   ->  4 * 7.73 us
+ * CPU clock =  50 MHz:  CFG_MAMR_PTA =  97   ->  4 * 7.76 us
+ * CPU clock =  66 MHz:  CFG_MAMR_PTA = 128   ->  4 * 7.75 us
+ * CPU clock = 133 MHz:  CFG_MAMR_PTA = 255   ->  4 * 7.67 us
+ *
+ * Value 97 is for 4 * 7.8 us at 50 MHz. So the refresh cycle requirement will
+ * be met also in the default configuration, i.e. if environment variable
+ * 'cpuclk' is not set.
  */
-#define CFG_MAMR_PTA           39
+#define CFG_MAMR_PTA           97
 
 /*
- * For 16 MBit, refresh rates could be 31.3 us
- * (= 64 ms / 2K = 125 / quad bursts).
- * For a simpler initialization, 15.6 us is used instead.
- *
- * #define CFG_MPTPR_2BK_2K    MPTPR_PTP_DIV32         for 2 banks
- * #define CFG_MPTPR_1BK_2K    MPTPR_PTP_DIV64         for 1 bank
+ * Memory Periodic Timer Prescaler Register (MPTPR) values.
  */
-#define CFG_MPTPR_2BK_4K       MPTPR_PTP_DIV16         /* setting for 2 banks  */
-#define CFG_MPTPR_1BK_4K       MPTPR_PTP_DIV32         /* setting for 1 bank   */
-
-/* refresh rate 7.8 us (= 64 ms / 8K = 31.2 / quad bursts) for 256 MBit                */
-#define CFG_MPTPR_2BK_8K       MPTPR_PTP_DIV8          /* setting for 2 banks  */
-#define CFG_MPTPR_1BK_8K       MPTPR_PTP_DIV16         /* setting for 1 bank   */
+/* 4 * 7.8 us refresh (= 31.2 us per quad) at 50 MHz and PTA = 97 */
+#define CFG_MPTPR_2BK_4K       MPTPR_PTP_DIV16
+/* 4 * 3.9 us refresh (= 15.6 us per quad) at 50 MHz and PTA = 97 */
+#define CFG_MPTPR_2BK_8K       MPTPR_PTP_DIV8
 
 /*
  * MAMR settings for SDRAM
index d8aa5fa777b59ab547f4d24635fbfa5d187b0e54..67fb67d291dd8bbcbc6f82a3e98f9d496223a9c2 100644 (file)
 #
 
 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