1. 05 11月, 2012 10 次提交
    • K
      arch/powerpc/lib/extable.c: sparse fix · fe44f452
      Kim Phillips 提交于
      extable.c:66:9: warning: symbol 'ex_tab_message' was not declared. Should it be static?
      
      making it static can produce a new build warning on some boards:
      
      extable.c:66:12: warning: 'ex_tab_message' defined but not used [-Wunused-variable]
      
      but ex_tab_message doesn't do much even when used, so just remove it.
      Signed-off-by: NKim Phillips <kim.phillips@freescale.com>
      fe44f452
    • K
      arch/powerpc/include/asm/io.h: fix warning: preprocessor token __iomem redefined · cdfdb8d7
      Kim Phillips 提交于
      a fixup __iomem definition in arch code appears to be placed there as a cover
      up from a code import from linux when u-boot didn't yet have a compiler.h,
      introduced by commit 812711ce "Implement
      __raw_{read,write}[bwl] on all architectures".
      
      git show 812711ce:include/linux/compiler.h
      fatal: Path 'include/linux/compiler.h' exists on disk, but not in '812711ce'.
      Signed-off-by: NKim Phillips <kim.phillips@freescale.com>
      cdfdb8d7
    • K
      include/linux/stddef.h: avoid 'warning: preprocessor token offsetof redefined' · aa9e891c
      Kim Phillips 提交于
      hack to avoid:
      
      /opt/gcc-4.6.3-nolibc/powerpc-linux/bin/../lib/gcc/powerpc-linux/4.6.3/include/stddef.h:413:9: warning: preprocessor token offsetof redefined
      u-boot/include/linux/stddef.h:20:9: this was the original definition
      
      tried protecting with __KERNEL__, and #including compiler.h first.
      
      Even tried include dir reordering to no avail:
      
       +++ b/config.mk
       @@ -194,7 +194,11 @@ OBJCFLAGS += --gap-fill=0xff
       gccincdir := $(shell $(CC) -print-file-name=include)
      
       CPPFLAGS := $(DBGFLAGS) $(OPTFLAGS) $(RELFLAGS)                \
       -       -D__KERNEL__
       +       -D__KERNEL__  \
       +       -I $(gccincdir) \
       +       -nostdinc
       +
       +#      -isystem $(gccincdir) \
      
       # Enable garbage collection of un-used sections for SPL
       ifeq ($(CONFIG_SPL_BUILD),y)
       @@ -227,8 +231,7 @@ CPPFLAGS += -I$(OBJTREE)/include2 -I$(OBJTREE)/include
       endif
      
       CPPFLAGS += -I$(TOPDIR)/include
       -CPPFLAGS += -fno-builtin -ffreestanding -nostdinc      \
       -       -isystem $(gccincdir) -pipe $(PLATFORM_CPPFLAGS)
       +CPPFLAGS += -fno-builtin -ffreestanding -pipe $(PLATFORM_CPPFLAGS)
      Signed-off-by: NKim Phillips <kim.phillips@freescale.com>
      aa9e891c
    • K
      include/linux/unaligned/generic.h: fix warning: preprocessor token __force redefined · 25b26ec6
      Kim Phillips 提交于
      include/linux/unaligned/generic.h:5:9: warning: preprocessor token __force redefined
      include/linux/compiler.h:10:10: this was the original definition
      
      fixup __force definitions in compat.h code appears to be placed
      there as a cover up from a code import from linux when u-boot didn't yet
      have a compiler.h, introduced by commit
      b1b4e89a "Add LZO decompressor support".
      Signed-off-by: NKim Phillips <kim.phillips@freescale.com>
      25b26ec6
    • K
      include/linux/compat.h: fix warning: preprocessor token {__iomem, __user} redefined · 0d4c1c91
      Kim Phillips 提交于
      include/linux/compat.h:4:9: warning: preprocessor token __user redefined
      include/linux/compiler.h:7:10: this was the original definition
      include/linux/compat.h:5:9: warning: preprocessor token __iomem redefined
      include/linux/compiler.h:12:10: this was the original definition
      
      fixup __iomem, __user definitions in compat.h code appears to be placed
      there as a cover up from a code import from linux when u-boot didn't yet
      have a compiler.h, introduced by commit
      932394ac "Rewrite of NAND code based on
      what is in 2.6.12 Linux kernel".
      Signed-off-by: NKim Phillips <kim.phillips@freescale.com>
      0d4c1c91
    • 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
    • S
      fs: rename fsload command to load · f9b55e22
      Stephen Warren 提交于
      When the generic filesystem load command "fsload" was written, I felt
      that "load" was too generic of a name for it, since many other similar
      commands already existed. However, it turns out that there is already
      an "fsload" command, so that name cannot be used. Rename the new
      "fsload" to plain "load" to avoid the conflict. At least anyone who's
      used a Basic interpreter should feel familiar with the name!
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      f9b55e22
    • S
      fs: fix number base behaviour change in fatload/ext*load · 3f83c87e
      Stephen Warren 提交于
      Commit 045fa1e1 "fs: add filesystem switch libary, implement ls and
      fsload commands" unified the implementation of fatload and ext*load
      with the new command fsload. However, this altered the interpretation
      of command-line numbers from always being base-16, to requiring a "0x"
      prefix for base-16 numbers. Enhance do_fsload() to allow commands to
      specify which base to use.
      
      Use base 0, thus requiring a "0x" prefix for the new fsload command.
      This feels much cleaner than assuming base 16.
      
      Use base 16 for the pre-existing fatload and ext*load to prevent a
      change in behaviour.
      
      Use base 16 exclusively for the loadaddr environment variable, since
      that variable is interpreted in multiple places, so we don't want the
      behaviour to change.
      
      Update command help text to make it clear where numbers are assumed to
      be hex, and where an explicit "0x" prefix is required.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Reviewed-by: NBenoît Thébaudeau <benoit.thebaudeau@advansee.com>
      3f83c87e
    • S
      cmd_ext4: remove TABs from command help text · b6a30444
      Stephen Warren 提交于
      TABs in the help text won't line up in the same place on the console as
      in a source editor. Replace them with spaces to make ensuring correct
      alignment easier.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Reviewed-by: NBenoît Thébaudeau <benoit.thebaudeau@advansee.com>
      b6a30444
    • S
      fs: fix do_fsload() handling of optional arguments · e9b0f99e
      Stephen Warren 提交于
      Most arguments to the shell command do_fsload() implements are optional.
      Fix the minimum argc check to respect that. Cater for the situation
      where argv[2] is not provided.
      
      Enhance both do_fsload() and do_ls() to check the maximum number of
      arguments too. While this check would typically be implemented via
      U_BOOT_CMD()'s max_args parameter, if these functions are called
      directly, then that check won't exist.
      
      Finally, alter do_ls() to check (argc >= 4) rather than (argc == 4) so
      that if the function is enhanced to allow extra arguments in the future,
      this test won't need to be changed at that time.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Reviewed-by: NBenoît Thébaudeau <benoit.thebaudeau@advansee.com>
      e9b0f99e
  2. 03 11月, 2012 30 次提交