1. 03 5月, 2013 1 次提交
  2. 01 5月, 2013 2 次提交
    • S
      Add getenv_hex() to return an environment variable as hex · 76b8f79c
      Simon Glass 提交于
      This conversion is required in a number of places in U-Boot. Add a
      standard function to provide this feature, so we avoid all the different
      variations in the way it is coded.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      76b8f79c
    • S
      sandbox: Provide a way to map from host RAM to U-Boot RAM · 781adb57
      Simon Glass 提交于
      In many cases, pointers to memory are passed around, and these pointers
      refer to U-Boot memory, not host memory. This in itself is not a
      problem.
      
      However, in a few places, we cast that pointer back to a ulong (being
      a U-Boot memory address). It is possible to convert many of these cases
      to avoid this. However there are data structures (e.g. struct
      bootm_headers) which use pointers. We could with a lot of effort adjust
      the structs and all code that uses them to use ulong instead of pointers.
      
      This seems like an unacceptable cost, since our objective with sandbox
      is to minimise the impact on U-Boot code while maximising the features
      available to sandbox.
      
      Therefore, create a map_to_sysmem() function which converts from a
      pointer to a U-Boot address. This can be used sparingly when needed.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      781adb57
  3. 12 4月, 2013 3 次提交
  4. 16 3月, 2013 2 次提交
  5. 01 3月, 2013 3 次提交
    • S
      Update set_working_fdt_addr() to use setenv_addr() · bfc59966
      Simon Glass 提交于
      We might as well use this common function instead of repeating the same
      code.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      bfc59966
    • S
      sandbox: Add un/map_sysmen() to deal with sandbox's ram_buf · 4213fc29
      Simon Glass 提交于
      Sandbox doesn't actually provide U-Boot access to the machine's physical
      memory. Instead it provides a RAM buffer of configurable size, and all
      memory accesses are within that buffer. Sandbox memory starts at 0 and
      is CONFIG_DRAM_SIZE bytes in size. Allowing access outside this buffer
      might produce unpredictable results in the event of an error, and would
      expose the host machine's memory architecture to the sandbox U-Boot.
      
      Most U-Boot functions assume that they can just access memory at given
      address. For sandbox this is not true.
      
      Add a map_sysmem() call which converts a U-Boot address to a system
      address. In most cases this is a NOP, but for sandbox it returns a
      pointer to that memory inside the RAM buffer.
      
      To get a U-Boot feature to work correctly within sandbox, you should call
      map_sysmem() to get a pointer to the address, and then use that address for
      any U-Boot memory accesses.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      4213fc29
    • S
      Update print_buffer() to use const · bda32ffc
      Simon Glass 提交于
      The buffer cannot be changed by this function, so change the buffer
      pointer to a const. This allows callers with const pointer to use the
      function without a cast.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      bda32ffc
  6. 11 1月, 2013 1 次提交
    • S
      Add option to display customised memory information · 15a33e49
      Simon Glass 提交于
      Some boards want to report more than just memory size. For example, it
      might be useful to display the memory type (DDR2, DDR3) or manufacturer.
      
      Add a weak function to support this requirement, accessed through a new
      'meminfo' command.
      
      Any example of the DRAM: output is below, just for illustration:
      
      SMDK5250 # meminfo
      DRAM:  2 GiB Elpida DDR3 @ 800MHz
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      15a33e49
  7. 09 1月, 2013 1 次提交
    • A
      arm: move C runtime setup code in crt0.S · e05e5de7
      Albert ARIBAUD 提交于
      Move all the C runtime setup code from every start.S
      in arch/arm into arch/arm/lib/crt0.S. This covers
      the code sequence from setting up the initial stack
      to calling into board_init_r().
      
      Also, rewrite the C runtime setup and make functions
      board_init_*() and relocate_code() behave according to
      normal C semantics (no jumping across the C stack any
      more, etc).
      
      Some SPL targets had to be touched because they use
      start.S explicitly or for some reason; the relevant
      maintainers and custodians are cc:ed.
      Signed-off-by: NAlbert ARIBAUD <albert.u.boot@aribaud.net>
      e05e5de7
  8. 14 12月, 2012 1 次提交
  9. 05 11月, 2012 1 次提交
    • K
      include/linux/byteorder: import latest endian definitions from linux · eef1cf2d
      Kim Phillips 提交于
      u-boot's byteorder headers did not contain endianness attributions
      for use with sparse, causing a lot of false positives.  Import the
      kernel's latest definitions, and enable them by including compiler.h
      and types.h.  They come with 'const' added for some swab functions, so
      fix those up, too:
      
      include/linux/byteorder/big_endian.h:46:2: warning: passing argument 1 of '__swab64p' discards 'const' qualifier from pointer target type [enabled by default]
      
      Also, note: u-boot's historic __BYTE_ORDER definition has been
      preserved (for the time being at least).
      
      We also remove ad-hoc barrier() definitions, since we're including
      compiler.h in files that hadn't in the past:
      
      macb.c:54:0: warning: "barrier" redefined [enabled by default]
      
      In addition, including compiler.h in byteorder changes the 'noinline'
      definition to expand to __attribute__((noinline)).  This fixes
      arch/powerpc/lib/bootm.c:
      
      bootm.c:329:16: error: attribute '__attribute__': unknown attribute
      bootm.c:329:16: error: expected ')' before '__attribute__'
      bootm.c:329:25: error: expected identifier or '(' before ')' token
      
      powerpc sparse builds yield:
      
      include/common.h:356:22: error: marked inline, but without a definition
      
      the unknown-reason inlining without a definition is considered obsolete
      given it was part of the 2002 initial commit, and no arm version was
      'fixed.'
      
      also fixed:
      ydirectenv.h:60:0: warning: "inline" redefined [enabled by default]
      
      and:
      
      Configuring for devconcenter - Board: intip, Options: DEVCONCENTER
      make[1]: *** [4xx_ibm_ddr2_autocalib.o] Error 1
      make: *** [arch/powerpc/cpu/ppc4xx/libppc4xx.o] Error 2
      powerpc-fsl-linux-size: './u-boot': No such file
      4xx_ibm_ddr2_autocalib.c: In function 'DQS_autocalibration':
      include/asm/ppc4xx-sdram.h:1407:13: sorry, unimplemented: inlining failed in call to 'ppc4xx_ibm_ddr2_register_dump': function body not available
      4xx_ibm_ddr2_autocalib.c:1243:32: sorry, unimplemented: called from here
      
      and:
      
      In file included from crc32.c:50:0:
      crc32table.h:4:1: warning: implicit declaration of function '___constant_swab32' [-Wimplicit-function-declaration]
      crc32table.h:4:1: error: initializer element is not constant
      crc32table.h:4:1: error: (near initialization for 'crc32table_le[0]')
      Signed-off-by: NKim Phillips <kim.phillips@freescale.com>
      [trini: Remove '#endif' in include/common.h around setenv portion]
      Signed-off-by: NTom Rini <trini@ti.com>
      eef1cf2d
  10. 03 11月, 2012 1 次提交
  11. 16 10月, 2012 4 次提交
  12. 29 9月, 2012 1 次提交
  13. 10 8月, 2012 1 次提交
  14. 21 7月, 2012 1 次提交
    • M
      common.h: Remove include compiler.h · 546910f8
      Marek Vasut 提交于
      Remove this as including it on global scale breaks a lot of things.
      This was reported by:
      Matthew McClintock <B29882@freescale.com>
      
      Fix found by:
      Tom Rini <trini@ti.com>
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Wolfgang Denk <wd@denx.de>
      Cc: Tom Rini <trini@ti.com>
      546910f8
  15. 18 7月, 2012 1 次提交
  16. 07 7月, 2012 2 次提交
  17. 22 6月, 2012 1 次提交
  18. 04 6月, 2012 1 次提交
  19. 24 5月, 2012 1 次提交
  20. 16 5月, 2012 1 次提交
  21. 15 5月, 2012 1 次提交
  22. 11 4月, 2012 1 次提交
  23. 24 3月, 2012 1 次提交
  24. 19 3月, 2012 2 次提交
    • S
      bootstage: Define an optional microsecond timer · 5ff55390
      Simon Glass 提交于
      Define timer_get_boot_us() which returns the number of microseconds
      since boot. If undefined then we use get_timer() * 1000.
      
      We can fit this in a 32-bit register which keeps everyone happy on
      the efficiency side. It will wrap around after about an hour. If we
      are still looking at it after an hour then we had better not be
      timing the boot.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      5ff55390
    • S
      bootstage: Create an initial header for boot progress integers · 097e1783
      Simon Glass 提交于
      At present boot_stage_progress() is called with various magic numbers. The
      new bootstage.h header will be used to turn these into symbolic names
      throughout the code.
      
      The intent is not that these numbers are passed to Linux. In fact by using
      an enum to track them we should eventually be able to remove the explict
      numbers and just have the stages count up from 0.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      097e1783
  25. 07 3月, 2012 4 次提交
  26. 12 2月, 2012 1 次提交