1. 04 Jul, 2010 1 commit
    • Wolfgang Denk's avatar
      Make sure that argv[] argument pointers are not modified. · 54841ab5
      Wolfgang Denk authored
      The hush shell dynamically allocates (and re-allocates) memory for the
      argument strings in the "char *argv[]" argument vector passed to
      commands.  Any code that modifies these pointers will cause serious
      corruption of the malloc data structures and crash U-Boot, so make
      sure the compiler can check that no such modifications are being done
      by changing the code into "char * const argv[]".
      
      This modification is the result of debugging a strange crash caused
      after adding a new command, which used the following argument
      processing code which has been working perfectly fine in all Unix
      systems since version 6 - but not so in U-Boot:
      
      int main (int argc, char **argv)
      {
      	while (--argc > 0 && **++argv == '-') {
      /* ====> */	while (*++*argv) {
      			switch (**argv) {
      			case 'd':
      				debug++;
      				break;
      			...
      			default:
      				usage ();
      			}
      		}
      	}
      	...
      }
      
      The line marked "====>" will corrupt the malloc data structures and
      usually cause U-Boot to crash when the next command gets executed by
      the shell.  With the modification, the compiler will prevent this with
      an
      	error: increment of read-only location '*argv'
      
      N.B.: The code above can be trivially rewritten like this:
      
      	while (--argc > 0 && **++argv == '-') {
      		char *arg = *argv;
      		while (*++arg) {
      			switch (*arg) {
      			...
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      Acked-by: default avatarMike Frysinger <vapier@gentoo.org>
      54841ab5
  2. 01 Jul, 2010 6 commits
  3. 30 Jun, 2010 1 commit
  4. 29 Jun, 2010 5 commits
  5. 28 Jun, 2010 3 commits
  6. 23 Jun, 2010 4 commits
    • Wolfgang Denk's avatar
      Remove AmigaOneG3SE board · 953b7e62
      Wolfgang Denk authored
      The AmigaOneG3SE board has been orphaned or a very long time, and
      broken for more than 12 releases resp. more than 3 years.  As nobody
      seems to be interested any more in this stuff we may as well ged rid
      of it, especially as it clutters many areas of the code so it is a
      continuous pain for all kinds of ongoing work.
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      953b7e62
    • Wolfgang Denk's avatar
      Get rid of bogus CONFIG_SYS_BUS_HZ and CONFIG_SYS_CONFIG_BUS_CLK definitions · ee80fa7b
      Wolfgang Denk authored
      CONFIG_SYS_BUS_HZ has not really been used anywhere except to be
      redined as CONFIG_SYS_BUS_CLK; in addition, the mpc7448hpc2 had the
      bogus CONFIG_SYS_CONFIG_BUS_CLK setting which duplicated the
      funtionality.  Change all this to use CONFIG_SYS_BUS_CLK consistently.
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      Cc: Frank Gottschling <fgottschling@eltec.de>
      Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
      Cc: Eran Man <eran@nbase.co.il>
      Cc: Stefan Roese <sr@denx.de>
      Cc: Nye Liu <nyet@zumanetworks.com>
      Cc: Roy Zang <tie-fei.zang@freescale.com>
      ee80fa7b
    • Wolfgang Denk's avatar
      Prepare v2010.06-rc3 · 482126e2
      Wolfgang Denk authored
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      482126e2
    • Wolfgang Denk's avatar
      MPC5200: workaround data corruption for unaligned local bus accesses · 460c2ce3
      Wolfgang Denk authored
      The MPC5200 has a nasty problem that will cause silent data corruption
      when performing unaligned 16 or 32 byte accesses when reading from the
      local bus - typically this affects reading from flash. The problem can
      be easily shown:
      
      => md fc0c0000 10
      fc0c0000: 323e4337 01626f6f 74636d64 3d72756e    2>C7.bootcmd=run
      fc0c0010: 206e6574 5f6e6673 00626f6f 7464656c     net_nfs.bootdel
      fc0c0020: 61793d35 00626175 64726174 653d3131    ay=5.baudrate=11
      fc0c0030: 35323030 00707265 626f6f74 3d656368    5200.preboot=ech
      => md fc0c0001 10
      fc0c0001: 65636801 00000074 0000003d 00000020    ech....t...=...
      fc0c0011: 0000005f 00000000 00000074 00000061    ..._.......t...a
      fc0c0021: 00000000 00000064 00000065 00000035    .......d...e...5
      fc0c0031: 00000000 00000062 0000003d 0000006f    .......b...=...o
      => md.w fc0c0001 10
      fc0c0001: 0000 3701 0000 6f74 0000 643d 0000 6e20    ..7...ot..d=..n
      fc0c0011: 0000 745f 0000 7300 0000 6f74 0000 6c61    ..t_..s...ot..la
      
      This commit implements a workaround at least for the most blatant
      problem: using memcpy() from NOR flash. We rename the assembler
      routine into __memcpy() and provide a wrapper, which will use a
      byte-wise copy loop for unaligned source or target addresses when
      reading from NOR flash, and branch to the optimized __memcpy()
      in all other cases, thus minimizing the performance impact.
      
      Tested on lite5200b and TQM5200S.
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      Cc: Detlev Zundel <dzu@denx.de>
      460c2ce3
  7. 22 Jun, 2010 6 commits
  8. 18 Jun, 2010 1 commit
    • Wolfgang Denk's avatar
      arch/arm/cpu/arm_cortexa8/omap3/cache.S: make build with older tools · cd040a49
      Wolfgang Denk authored
      The push / pop instructions used in this file are available only with
      more recent tool chains:
      
      cache.S: Assembler messages:
      cache.S:133: Error: bad instruction `push {r0,r1,r2,lr}'
      cache.S:160: Error: bad instruction `pop {r1,r2,r3,pc}'
      cache.S:164: Error: bad instruction `push {r0,r1,r2,lr}'
      cache.S:191: Error: bad instruction `pop {r1,r2,r3,pc}'
      
      Change push/pop into stmfd/ldmfd instructions to support older
      versions of binutils as well.
      
      I verified that the modified source code generates exactly the same
      binary code.
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      Cc: Sandeep Paulraj <s-paulraj@ti.com>
      Cc: Tom Rix <tom@bumblecow.com>
      cd040a49
  9. 17 Jun, 2010 1 commit
  10. 14 Jun, 2010 1 commit
  11. 13 Jun, 2010 3 commits
  12. 10 Jun, 2010 1 commit
  13. 08 Jun, 2010 5 commits
    • Vaibhav Hiremath's avatar
      AM35x: Add support for EMIF4 · 1a5038ca
      Vaibhav Hiremath authored
      This patch adds support for the EMIF4 interface
      available in the AM35x processors.
      Signed-off-by: default avatarVaibhav Hiremath <hvaibhav@ti.com>
      Signed-off-by: default avatarSanjeev Premi <premi@ti.com>
      Signed-off-by: default avatarSandeep Paulraj <s-paulraj@ti.com>
      1a5038ca
    • Vaibhav Hiremath's avatar
      omap3: Consolidate SDRC related operations · cae377b5
      Vaibhav Hiremath authored
      Consolidated SDRC related functions into one file - sdrc.c
      
      And also replaced sdrc_init with generic memory init
      function (mem_init), this generalization of omap memory setup
      is necessary to support the new emif4 interface introduced in AM3517.
      Signed-off-by: default avatarVaibhav Hiremath <hvaibhav@ti.com>
      Signed-off-by: default avatarSandeep Paulraj <s-paulraj@ti.com>
      cae377b5
    • Vaibhav Hiremath's avatar
      omap3: Calculate CS1 size only when SDRC is · d11212e3
      Vaibhav Hiremath authored
      initialized for CS1
      
      From: Vaibhav Hiremath <hvaibhav@ti.com>
      
      The patch makes sure that size for SDRC CS1 gets calculated
      only when the CS1 SDRC is initialized.
      Signed-off-by: default avatarVaibhav Hiremath <hvaibhav@ti.com>
      Signed-off-by: default avatarSandeep Paulraj <s-paulraj@ti.com>
      d11212e3
    • Cyril Chemparathy's avatar
      ARM1176: TI: TNETV107X soc initial support · 3712367c
      Cyril Chemparathy authored
      TNETV107X is a Texas Instruments SoC based on an ARM1176 core, and with a
      bunch on on-chip integrated peripherals.  This is an initial commit with
      basic functionality, more commits with drivers, etc. to follow.
      Signed-off-by: default avatarCyril Chemparathy <cyril@ti.com>
      Signed-off-by: default avatarSandeep Paulraj <s-paulraj@ti.com>
      3712367c
    • Cyril Chemparathy's avatar
      ARM1176: Coexist with other ARM1176 platforms · 678e008c
      Cyril Chemparathy authored
      The current ARM1176 CPU specific code is too specific to the SMDK6400
      architecture.  The following changes were necessary prerequisites for the
      addition of other SoCs based on ARM1176.
      
      Existing board's (SMDK6400) configuration has been modified to keep behavior
      unchanged despite these changes.
      
      1. Peripheral port remap configurability
      The earlier code had hardcoded remap values specific to s3c64xx in start.S.
      This change makes the peripheral port remap addresses and sizes configurable.
      
      2. U-Boot code relocation support
      Most architectures allow u-boot code to run initially at a different
      address (possibly in NOR) and then get relocated to its final resting place
      in RAM.  Added support for this capability in ARM1176 architecture.
      
      3. Disable TCM if necessary
      If a ROM based bootloader happened to have initialized TCM, we disable it here
      to keep things sane.
      
      4. Remove unnecessary SoC specific includes
      ARM1176 code does not really need this SoC specific include.  The presence
      of this include prevents builds on other ARM1176 archs.
      
      5. Modified virt-to-phys conversion during MMU disable
      The original MMU disable code masks out too many bits from the load address
      when it tries to figure out the physical address of the jump target label.
      Consequently, it ends up branching to the wrong address after disabling the
      MMU.
      Signed-off-by: default avatarCyril Chemparathy <cyril@ti.com>
      Signed-off-by: default avatarSandeep Paulraj <s-paulraj@ti.com>
      678e008c
  14. 07 Jun, 2010 2 commits