Skip to content
Snippets Groups Projects
  1. Nov 18, 2008
  2. Oct 18, 2008
  3. Sep 12, 2008
  4. Sep 10, 2008
  5. Sep 03, 2008
  6. Jul 02, 2008
  7. 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
  8. Jun 03, 2008
    • Haavard Skinnemoen's avatar
      SPI API improvements · d255bb0e
      Haavard Skinnemoen authored
      
      This patch gets rid of the spi_chipsel table and adds a handful of new
      functions that makes the SPI layer cleaner and more flexible.
      
      Instead of the spi_chipsel table, each board that wants to use SPI
      gets to implement three hooks:
        * spi_cs_activate(): Activates the chipselect for a given slave
        * spi_cs_deactivate(): Deactivates the chipselect for a given slave
        * spi_cs_is_valid(): Determines if the given bus/chipselect
          combination can be activated.
      
      Not all drivers may need those extra functions however. If that's the
      case, the board code may just leave them out (assuming they know what
      the driver needs) or rely on the linker to strip them out (assuming
      --gc-sections is being used.)
      
      To set up communication parameters for a given slave, the driver needs
      to call spi_setup_slave(). This returns a pointer to an opaque
      spi_slave struct which must be passed as a parameter to subsequent SPI
      calls. This struct can be freed by calling spi_free_slave(), but most
      driver probably don't want to do this.
      
      Before starting one or more SPI transfers, the driver must call
      spi_claim_bus() to gain exclusive access to the SPI bus and initialize
      the hardware. When all transfers are done, the driver must call
      spi_release_bus() to make the bus available to others, and possibly
      shut down the SPI controller hardware.
      
      spi_xfer() behaves mostly the same as before, but it now takes a
      spi_slave parameter instead of a spi_chipsel function pointer. It also
      got a new parameter, flags, which is used to specify chip select
      behaviour. This may be extended with other flags in the future.
      
      This patch has been build-tested on all powerpc and arm boards
      involved. I have not tested NIOS since I don't have a toolchain for it
      installed, so I expect some breakage there even though I've tried
      fixing up everything I could find by visual inspection.
      
      I have run-time tested this on AVR32 ATNGW100 using the atmel_spi and
      DataFlash drivers posted as a follow-up. I'd like some help testing
      other boards that use the existing SPI API.
      
      But most of all, I'd like some comments on the new API. Is this stuff
      usable for everyone? If not, why?
      
      Changed in v4:
        - Build fixes for various boards, drivers and commands
        - Provide common struct spi_slave definition that can be extended by
          drivers
        - Pass a struct spi_slave * to spi_cs_activate and spi_cs_deactivate
        - Make default bus and mode build-time configurable
        - Override default SPI bus ID and mode on mx32ads and imx31_litekit.
      
      Changed in v3:
        - Add opaque struct spi_slave for controller-specific data associated
          with a slave.
        - Add spi_claim_bus() and spi_release_bus()
        - Add spi_free_slave()
        - spi_setup() is now called spi_setup_slave() and returns a
          struct spi_slave
        - soft_spi now supports four SPI modes (CPOL|CPHA)
        - Add bus parameter to spi_setup_slave()
        - Convert the new i.MX32 SPI driver
        - Convert the new MC13783 RTC driver
      
      Changed in v2:
        - Convert the mpc8xxx_spi driver and the mpc8349emds board to the
          new API.
      
      Signed-off-by: default avatarHaavard Skinnemoen <hskinnemoen@atmel.com>
      Tested-by: default avatarGuennadi Liakhovetski <lg@denx.de>
      d255bb0e
    • Stefan Roese's avatar
      ppc4xx: Remove implementations of testdram() · 3c1de1a6
      Stefan Roese authored
      
      This patch removes the used testdram() implementations of the board
      that are maintained by myself.
      
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      3c1de1a6
  9. May 20, 2008
    • Wolfgang Denk's avatar
      Big white-space cleanup. · 53677ef1
      Wolfgang Denk authored
      
      This commit gets rid of a huge amount of silly white-space issues.
      Especially, all sequences of SPACEs followed by TAB characters get
      removed (unless they appear in print statements).
      
      Also remove all embedded "vim:" and "vi:" statements which hide
      indentation problems.
      
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      53677ef1
  10. Apr 18, 2008
  11. Mar 07, 2008
  12. Jan 12, 2008
    • Wolfgang Denk's avatar
      Fix linker scripts: add NOLOAD atribute to .bss/.sbss sections · 64134f01
      Wolfgang Denk authored
      
      With recent toolchain versions, some boards would not build because
      or errors like this one (here for ocotea board when building with
      ELDK 4.2 beta):
      ppc_4xx-ld: section .bootpg [fffff000 -> fffff23b] overlaps section .bss [fffee900 -> fffff8ab]
      
      For many boards, the .bss section is big enough that it wraps around
      at the end of the address space (0xFFFFFFFF), so the problem will not
      be visible unless you use a 64 bit tool chain for development. On
      some boards however, changes to the code size (due to different
      optimizations) we bail out with section overlaps like above.
      
      The fix is to add the NOLOAD attribute to the .bss and .sbss
      sections, telling the linker that .bss does not consume any space in
      the image.
      
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      64134f01
  13. Oct 31, 2007
    • Stefan Roese's avatar
      ppc4xx: Rework of 4xx serial driver (2) · 882ae412
      Stefan Roese authored
      
      Change all linker scripts to reference the changed driver name 4xx_uart.o.
      
      Note: In most cased all these explicit referencing of these object files
      in the linker scripts is not neccessary. Only for manually embedded
      environment into the U-Boot image, which is not done is most cases.
      
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      882ae412
  14. Aug 14, 2007
  15. Jul 26, 2007
Loading