Skip to content
Snippets Groups Projects
  1. Sep 30, 2009
    • Mingkai Hu's avatar
      NAND boot: MPC8536DS support · 9a1a0aed
      Mingkai Hu authored
      
      MPC8536E can support booting from NAND flash which uses the
      image u-boot-nand.bin. This image contains two parts: a 4K
      NAND loader and a main U-Boot image. The former is appended
      to the latter to produce u-boot-nand.bin. The 4K NAND loader
      includes the corresponding nand_spl directory, along with the
      code twisted by CONFIG_NAND_SPL. The main U-Boot image just
      like a general U-Boot image except the parts that included by
      CONFIG_SYS_RAMBOOT.
      
      When power on, eLBC will automatically load from bank 0 the
      4K NAND loader into the FCM buffer RAM where CPU can execute
      the boot code directly. In the first stage, the NAND loader
      copies itself to RAM or L2SRAM to free up the FCM buffer RAM,
      then loads the main image from NAND flash to RAM or L2SRAM
      and boot from it.
      
      This patch implements the NAND loader to load the main image
      into L2SRAM, so the main image can configure the RAM by using
      SPD EEPROM. In the first stage, the NAND loader copies itself
      to the second to last 4K address space, and uses the last 4K
      address space as the initial RAM for stack.
      
      Obviously, the size of L2SRAM shouldn't be less than the size
      of the image used. If so, the workaround is to generate another
      image that includes the code to configure the RAM by SPD and
      load it to L2SRAM first, then relocate the main image to RAM
      to boot up.
      
      Signed-off-by: default avatarMingkai Hu <Mingkai.hu@freescale.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      9a1a0aed
  2. Sep 28, 2009
  3. Sep 11, 2009
    • Stefan Roese's avatar
      ppc4xx: Big cleanup of PPC4xx defines · d1c3b275
      Stefan Roese authored
      
      This patch cleans up multiple issues of the 4xx register (mostly
      DCR, SDR, CPR, etc) definitions:
      
      - Change lower case defines to upper case (plb4_acr -> PLB4_ACR)
      - Change the defines to better match the names from the
        user's manuals (e.g. cprpllc -> CPR0_PLLC)
      - Removal of some unused defines
      
      Please test this patch intensive on your PPC4xx platform. Even though
      I tried not to break anything and tested successfully on multiple
      4xx AMCC platforms, testing on custom platforms is recommended.
      
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      d1c3b275
  4. Aug 21, 2009
    • Wolfgang Denk's avatar
      Fix all linker scripts for older binutils versions (pre-2.16) · 1aada9cd
      Wolfgang Denk authored
      
      Commit f62fb999 fixed handling of all rodata sections by using a
      wildcard combined with calls to ld's builtin functions SORT_BY_ALIGNMENT()
      and SORT_BY_NAME().  Unfortunately these functions were only
      introduced with biunutils version 2.16, so the modification broke
      building with all tool chains using older binutils.
      
      This patch makes it work again.  This is done by omitting the use of
      these functions for such old tool chains.  This will result in
      slightly larger target binaries, as the rodata sections are no longer
      in optimal order alignment-wise which reauls in unused gaps, but the
      effect was found to be insignificant - especially compared to the fact
      that you cannot build U-Boot at all in the current state.
      
      As ld seems to have no support for conditionals we run the linker
      script through the C preprocessor which can be easily used to remove
      the unwanted function calls.
      
      Note that the C preprocessor must be run with the "-ansi" (or a
      "-std=") option to make sure all the system-specific predefined
      macros outside the reserved namespace are suppressed. Otherise, cpp
      might for example substitute "powerpc" to "1", thus corrupting for
      example "OUTPUT_ARCH(powerpc)" etc.
      
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      Cc: Mike Frysinger <vapier@gentoo.org>
      1aada9cd
    • Mingkai Hu's avatar
      NAND boot: fix nand_load overlap issue · 269610f6
      Mingkai Hu authored
      
      The code copy data from NAND flash block by block, so when
      the data length isn't a whole-number multiple of the block
      size, it will overlap the rest space.
      
      Signed-off-by: default avatarMingkai Hu <Mingkai.hu@freescale.com>
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      269610f6
  5. Jul 30, 2009
    • Stefan Roese's avatar
      ppc4xx: Canyonlands-NAND-boot: Support 2 Crucial 512MByte SODIMM's · 82a7edc7
      Stefan Roese authored
      
      Some Canyonlands boards are equipped with different SODIMM's. This is no
      problem with the "normal" NOR booting Canyonlands U-Boot, since it
      automatically detects the SODIMM's via SPD data and correctly configures
      them. But the NAND booting version is different. Here we only have 4k
      of image size to completely setup the hardware, including DDR2 setup.
      So we need to use a fixed DDR2 setup here. This doesn't work for different
      SODIMM's right now.
      
      Currently only this Crucial SODIMM is support:
      CT6464AC667.8FB (dual ranked)
      
      Now some boards are shipped with this SODIMM:
      CT6464AC667.4FE (single ranked)
      
      This patch now supports both SODIMM's by configuring first for the dual
      ranked DIMM. A quick shows, if this module is really installed. If this test
      fails, the DDR2 controller is re-configured for the single
      ranked SODIMM.
      
      Tested with those SODIMM's:
      
      CT6464AC667.8FB (dual ranked)
      CT6464AC667.4FE (single ranked)
      
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      82a7edc7
  6. Jul 16, 2009
  7. Jul 07, 2009
    • Scott Wood's avatar
      nand_spl: Fix cmd_ctrl usage in nand_boot.c. · 1dac3a51
      Scott Wood authored
      
      When adding large page NAND support to this file, I had a misunderstanding
      about the exact semantics of NAND_CTRL_CHANGE (which isn't documented
      anywhere I can find) -- it is apparently just a hint to drivers,
      which aren't required to preserve the old value for subsequent
      non-"change" invocations.
      
      This change makes nand_boot.c no longer assume this.  Note that this
      happened to work by chance with some NAND drivers, which don't preserve
      the value, but treat 0 equivalently to NAND_CTRL_ALE.
      
      I don't have hardware to test this, so any testing is appreciated.
      
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      1dac3a51
    • Guennadi Liakhovetski's avatar
      nand_spl: read environment early, when booting from NAND using nand_spl · b74ab737
      Guennadi Liakhovetski authored
      
      Currently, when booting from NAND using nand_spl, in the beginning the default
      environment is used until later in boot process the dynamic environment is read
      out. This way environment variables that must be interpreted early, like the
      baudrate or "silent", cannot be modified dynamically and remain at their
      default values. Fix this problem by reading out main and redundand (if used)
      copies of the environment in the nand_spl code.
      
      Signed-off-by: default avatarGuennadi Liakhovetski <lg@denx.de>
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      b74ab737
  8. Jul 06, 2009
  9. Jun 21, 2009
    • Magnus Lilja's avatar
      MX31: Add NAND SPL for i.MX31. · 40c642bc
      Magnus Lilja authored
      
      This patch adds the NAND SPL framework needed to boot i.MX31 boards
      from NAND.
      
      It has been tested on a i.MX31 PDK board with large page NAND. Small
      page NANDs should work as well, but this has not been tested.
      
      Note: The i.MX31 NFC uses a non-standard layout for large page NANDs,
      whether this is compatible with a particular setup depends on how
      the NAND device is programmed by the flash programmer (e.g. JTAG
      debugger).
      
      The patch is based on the work by Maxim Artamonov.
      
      Signed-off-by: default avatarMaxim Artamonov <scn1874@yandex.ru>
      Signed-off-by: default avatarMagnus Lilja <lilja.magnus@gmail.com>
      40c642bc
  10. May 15, 2009
  11. Mar 20, 2009
    • Trent Piepho's avatar
      Fix all linker script to handle all rodata sections · f62fb999
      Trent Piepho authored
      
      A recent gcc added a new unaligned rodata section called '.rodata.str1.1',
      which needs to be added the the linker script.  Instead of just adding this
      one section, we use a wildcard ".rodata*" to get all rodata linker section
      gcc has now and might add in the future.
      
      However, '*(.rodata*)' by itself will result in sub-optimal section
      ordering.  The sections will be sorted by object file, which causes extra
      padding between the unaligned rodata.str.1.1 of one object file and the
      aligned rodata of the next object file.  This is easy to fix by using the
      SORT_BY_ALIGNMENT command.
      
      This patch has not be tested one most of the boards modified.  Some boards
      have a linker script that looks something like this:
      
      *(.text)
      . = ALIGN(16);
      *(.rodata)
      *(.rodata.str1.4)
      *(.eh_frame)
      
      I change this to:
      
      *(.text)
      . = ALIGN(16);
      *(.eh_frame)
      *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
      
      This means the start of rodata will no longer be 16 bytes aligned.
      However, the boundary between text and rodata/eh_frame is still aligned to
      16 bytes, which is what I think the real purpose of the ALIGN call is.
      
      Signed-off-by: default avatarTrent Piepho <xyzzy@speakeasy.org>
      f62fb999
  12. Mar 09, 2009
  13. Jan 28, 2009
  14. Jan 26, 2009
  15. Jan 23, 2009
    • Ron Madrid's avatar
      mpc83xx: New board support for SIMPC8313 · 5bb907a4
      Ron Madrid authored
      
      This patch will create a new board, SIMPC8313, from Sheldon Instruments.  This
      board boots from NAND devices and is configureable for either large or small
      page devices.  The board supports non-soldered DDR2, one ethernet port, a
      Marvell 88E1118 PHY, and PCI host support.  The board also has a FPGA connected
      to the eLBC providing glue logic to a TMS320C67xx DSP.
      
      Signed-off-by: default avatarRon Madrid <ron_madrid@sbcglobal.net>
      Signed-off-by: default avatarKim Phillips <kim.phillips@freescale.com>
      5bb907a4
    • Dave Liu's avatar
      NAND: Fix cache and memory inconsistency issue · c70564e6
      Dave Liu authored
      
      We load the secondary stage u-boot image from NAND to
      system memory by nand_load, but we did not flush d-cache
      to memory, nor invalidate i-cache before we jump to RAM.
      When the system has cache enabled and the TLB/page attribute
      of system memory is cacheable, it will cause issues.
      
      - 83xx family is using the d-cache lock, so all of d-cache
        access is cache-inhibited. so you can't see the issue.
      - 85xx family is using d-cache, i-cache enable, partial
        cache lock. you will see the issue.
      
      This patch fixes the cache issue.
      
      Signed-off-by: default avatarDave Liu <daveliu@freescale.com>
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      c70564e6
  16. Nov 18, 2008
  17. Oct 29, 2008
  18. Oct 18, 2008
  19. Aug 30, 2008
  20. Aug 21, 2008
  21. Aug 14, 2008
  22. Aug 12, 2008
  23. Aug 06, 2008
  24. Jul 29, 2008
  25. Jun 12, 2008
    • Becky Bruce's avatar
      Change initdram() return type to phys_size_t · 9973e3c6
      Becky Bruce authored
      
      This patch changes the return type of initdram() from long int to phys_size_t.
      This is required for a couple of reasons: long int limits the amount of dram
      to 2GB, and u-boot in general is moving over to phys_size_t to represent the
      size of physical memory.  phys_size_t is defined as an unsigned long on almost
      all current platforms.
      
      This patch *only* changes the return type of the initdram function (in
      include/common.h, as well as in each board's implementation of initdram).  It
      does not actually modify the code inside the function on any of the platforms;
      platforms which wish to support more than 2GB of DRAM will need to modify
      their initdram() function code.
      
      Build tested with MAKEALL for ppc, arm, mips, mips-el. Booted on powerpc
      MPC8641HPCN.
      
      Signed-off-by: default avatarBecky Bruce <becky.bruce@freescale.com>
      9973e3c6
  26. Jun 04, 2008
  27. Jun 03, 2008
    • Kenneth Johansson's avatar
      Remove shell variable UNDEF_SYM. · 2918eb9d
      Kenneth Johansson authored
      
      UNDEF_SYM is a shell variable in the main Makefile used to force the
      linker to add all u-boot commands to the final image. It has no use here.
      
      Signed-off-by: default avatarKenneth Johansson <kenneth@southpole.se>
      2918eb9d
    • Stefan Roese's avatar
      ppc4xx: Change Kilauea to use the common DDR2 init function · ec724f88
      Stefan Roese authored
      
      This patch changes the kilauea and kilauea_nand (for NAND booting)
      board port to not use a board specific DDR2 init routine anymore. Now
      the common code from cpu/ppc4xx is used.
      
      Thanks to Grant Erickson for all his basic work on this 405EX early
      bootup.
      
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      ec724f88
    • Stefan Roese's avatar
      ppc4xx/NAND_SPL: Consolidate 405 and 440 NAND booting code in start.S · 64852d09
      Stefan Roese authored
      
      This patch consolidates the 405 and 440 parts of the NAND booting code
      selected via CONFIG_NAND_SPL. Now common code is used to initialize the
      SDRAM by calling initdram() and to "copy/relocate" to SDRAM/OCM/etc.
      Only *after* running from this location, nand_boot() is called.
      
      Please note that the initsdram() call is now moved from nand_boot.c
      to start.S. I experienced problems with some boards like Kilauea
      (405EX), which don't have internal SRAM (OCM) and relocation needs to
      be done to SDRAM before the NAND controller can get accessed. When
      initdram() is called later on in nand_boot(), this can lead to problems
      with variables in the bss sections like nand_ecc_pos[].
      
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Acked-by: default avatarScott Wood <scottwood@freescale.com>
      64852d09
  28. May 14, 2008
  29. Apr 30, 2008
  30. Apr 18, 2008
Loading