Skip to content
Snippets Groups Projects
  1. Jul 02, 2015
  2. Nov 08, 2013
  3. Jun 08, 2013
    • Gabor Juhos's avatar
      MIPS: fix __raw_* IO accessors · f0550f87
      Gabor Juhos authored
      
      The purpose of the __raw* IO accessors is to provide
      IO access in native-endian order. However in the current
      MIPS implementation, the 16 and 32 bit variants of the
      __raw accessors are swapping the values on big-endian
      systems if the CONFIG_SWAP_IO_SPACE option is enabled.
      
      The patch changes the IO accessor macros to fix this
      broken behaviour.
      
      Signed-off-by: default avatarGabor Juhos <juhosg@openwrt.org>
      Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
      f0550f87
  4. Jan 22, 2013
    • Gabor Juhos's avatar
      MIPS: convert IO port accessor functions to 'static inline' · 0ef48d4c
      Gabor Juhos authored
      
      The currently used 'extern inline' directive causes
      the following compiler warnings if CONFIG_SWAP_IO_SPACE
      is defined:
      
        <...>/include/asm/io.h:345:1: warning: '__fswab32' is static but used in inline function '__outlc_p' which is not static [enabled by default]
        <...>/include/asm/io.h:345:1: warning: '__fswab32' is static but used in inline function '__outl_p' which is not static [enabled by default]
        <...>/include/asm/io.h:345:1: warning: '__fswab32' is static but used in inline function '__outlc' which is not static [enabled by default]
        <...>/include/asm/io.h:345:1: warning: '__fswab32' is static but used in inline function '__outl' which is not static [enabled by default]
        <...>/include/asm/io.h:344:1: warning: '__fswab16' is static but used in inline function '__outwc_p' which is not static [enabled by default]
        <...>/include/asm/io.h:344:1: warning: '__fswab16' is static but used in inline function '__outw_p' which is not static [enabled by default]
        <...>/include/asm/io.h:344:1: warning: '__fswab16' is static but used in inline function '__outwc' which is not static [enabled by default]
        <...>/include/asm/io.h:344:1: warning: '__fswab16' is static but used in inline function '__outw' which is not static [enabled by default]
        <...>/include/asm/io.h:341:1: warning: '__fswab32' is static but used in inline function '__inlc_p' which is not static [enabled by default]
        <...>/include/asm/io.h:341:1: warning: '__fswab32' is static but used in inline function '__inl_p' which is not static [enabled by default]
        <...>/include/asm/io.h:341:1: warning: '__fswab32' is static but used in inline function '__inlc' which is not static [enabled by default]
        <...>/include/asm/io.h:341:1: warning: '__fswab32' is static but used in inline function '__inl' which is not static [enabled by default]
        <...>/include/asm/io.h:340:1: warning: '__fswab16' is static but used in inline function '__inwc_p' which is not static [enabled by default]
        <...>/include/asm/io.h:340:1: warning: '__fswab16' is static but used in inline function '__inw_p' which is not static [enabled by default]
        <...>/include/asm/io.h:340:1: warning: '__fswab16' is static but used in inline function '__inwc' which is not static [enabled by default]
        <...>/include/asm/io.h:340:1: warning: '__fswab16' is static but used in inline function '__inw' which is not static [enabled by default]
      
      Signed-off-by: default avatarGabor Juhos <juhosg@openwrt.org>
      Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
      0ef48d4c
    • Gabor Juhos's avatar
      MIPS: use inline directive for __in*s functions · be002d00
      Gabor Juhos authored
      
      All other IO accessor functions are using the
      'inline' directive. Use that also for the __in*s
      to make it consistent with the other variants.
      
      Signed-off-by: default avatarGabor Juhos <juhosg@openwrt.org>
      Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
      be002d00
  5. Oct 16, 2012
  6. Apr 13, 2010
  7. Feb 22, 2009
    • Shinya Kuribayashi's avatar
      MIPS: Fix GCC-4.2 'discards qualifiers from pointer target type' warnings · 14209ac1
      Shinya Kuribayashi authored
      
      Compiling dbau1x00 and gth2 boards with GCC-4.2, you would see new warnings
      like this:
      
      skuribay@ubuntu:u-boot.git$ ./MAKEALL dbau1000
      Configuring for dbau1x00 board...
      au1x00_eth.c: In function 'au1x00_send':
      au1x00_eth.c:158: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type
      au1x00_eth.c: In function 'au1x00_recv':
      au1x00_eth.c:211: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type
      au1x00_eth.c: In function 'au1x00_init':
      au1x00_eth.c:252: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type
      au1x00_eth.c: In function 'au1x00_recv':
      au1x00_eth.c:211: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type
      au1x00_eth.c: In function 'au1x00_init':
      au1x00_eth.c:252: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type
      au1x00_eth.c: In function 'au1x00_send':
      au1x00_eth.c:158: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type
      
      We're passing a volatile pointer to a function which is expecting a non-
      volatile pointer.  That's potentially dangerous, so gcc warns about it.
      Confirmed with ELDK 4.2 (GCC 4.2.2) and Sourcey G++ 4.2 (GCC 4.2.3).
      
      To fix this, we add a volatile attribute to the argument in question.
      The virt_to_phys function in Linux kernel also does the same thing.
      
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Signed-off-by: default avatarShinya Kuribayashi <skuribay@ruby.dti.ne.jp>
      14209ac1
  8. Dec 15, 2008
    • Kumar Gala's avatar
      Introduce virt_to_phys() · 65e43a10
      Kumar Gala authored
      
      virt_to_phys() returns the physical address given a virtual. In most
      cases this will be just the input value as the vast majority of
      systems run in a 1:1 mode.
      
      However in systems that are not running this way it should report the
      physical address or ~0 if no mapping exists for the given virtual
      address.
      
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      65e43a10
  9. Jun 05, 2008
  10. Apr 14, 2008
  11. Dec 13, 2007
    • Haavard Skinnemoen's avatar
      Introduce map_physmem() and unmap_physmem() · 4d7d6936
      Haavard Skinnemoen authored
      
      map_physmem() returns a virtual address which can be used to access a
      given physical address without involving the cache. unmap_physmem()
      should be called when the virtual address returned by map_physmem() is
      no longer needed.
      
      This patch adds a stub implementation which simply returns the
      physical address cast to a uchar * for all architectures except AVR32,
      which converts the physical address to an uncached virtual mapping.
      unmap_physmem() is a no-op on all architectures, but if any
      architecture needs to do such mappings through the TLB, this is the
      hook where those TLB entries can be invalidated.
      
      Signed-off-by: default avatarHaavard Skinnemoen <hskinnemoen@atmel.com>
      4d7d6936
  12. Nov 17, 2007
    • Jean-Christophe PLAGNIOL-VILLARD's avatar
      Fixed mips_io_port_base build errors. · 5c15010e
      Jean-Christophe PLAGNIOL-VILLARD authored
      
      This patch has been sent on:
      - 29 Sep 2007
      
      Although mips_io_port_base is currently a part of IDE command, it is quite
      fundamental for MIPS I/O port access such as in[bwl] and out[bwl]. So move
      it to MIPS general part, and introduce `set_io_port_base()' from Linux.
      
      This patch is triggered by multiple definition of `mips_io_port_base' build
      error on gth2 (and tb0229 also needs this fix.)
      
      board/gth2/libgth2.a(gth2.o): In function `log_serial_char':
      /home/skuribay/devel/u-boot.git/board/gth2/gth2.c:47: multiple definition of `mips_io_port_base'
      common/libcommon.a(cmd_ide.o):/home/skuribay/devel/u-boot.git/common/cmd_ide.c:712: first defined here
      make: *** [u-boot] Error 1
      
      Signed-off-by: default avatarShinya Kuribayashi <skuribay@ruby.dti.ne.jp>
      Signed-off-by: default avatarJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
      5c15010e
  13. Feb 21, 2007
  14. Jun 27, 2003
  15. Feb 28, 2003
Loading