06 Feb, 2020

2 commits

  • At present dm/device.h includes the linux-compatible features. This
    requires including linux/compat.h which in turn includes a lot of headers.
    One of these is malloc.h which we thus end up including in every file in
    U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
    which needs to use the system malloc() in some files.

    Move the compatibility features into a separate header file.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present devres.h is included in all files that include dm.h but few
    make use of it. Also this pulls in linux/compat which adds several more
    headers. Drop the automatic inclusion and require files to include devres
    themselves. This provides a good indication of which files use devres.

    Signed-off-by: Simon Glass
    Reviewed-by: Anatolij Gustschin

    Simon Glass
     

03 Dec, 2019

1 commit


07 May, 2018

1 commit

  • When U-Boot started using SPDX tags we were among the early adopters and
    there weren't a lot of other examples to borrow from. So we picked the
    area of the file that usually had a full license text and replaced it
    with an appropriate SPDX-License-Identifier: entry. Since then, the
    Linux Kernel has adopted SPDX tags and they place it as the very first
    line in a file (except where shebangs are used, then it's second line)
    and with slightly different comment styles than us.

    In part due to community overlap, in part due to better tag visibility
    and in part for other minor reasons, switch over to that style.

    This commit changes all instances where we have a single declared
    license in the tag as both the before and after are identical in tag
    contents. There's also a few places where I found we did not have a tag
    and have introduced one.

    Signed-off-by: Tom Rini

    Tom Rini
     

10 Mar, 2018

1 commit


04 Dec, 2017

1 commit

  • This header was renamed to rawnand.h in Linux.

    The following is the corresponding commit in Linux.

    commit d4092d76a4a4e57b65910899948a83cc8646c5a5
    Author: Boris Brezillon
    Date: Fri Aug 4 17:29:10 2017 +0200

    mtd: nand: Rename nand.h into rawnand.h

    We are planning to share more code between different NAND based
    devices (SPI NAND, OneNAND and raw NANDs), but before doing that
    we need to move the existing include/linux/mtd/nand.h file into
    include/linux/mtd/rawnand.h so we can later create a nand.h header
    containing all common structure and function prototypes.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

21 Nov, 2017

1 commit


04 Oct, 2017

1 commit

  • U-Boot widely uses error() as a bit noisier variant of printf().

    This macro causes name conflict with the following line in
    include/linux/compiler-gcc.h:

    # define __compiletime_error(message) __attribute__((error(message)))

    This prevents us from using __compiletime_error(), and makes it
    difficult to fully sync BUILD_BUG macros with Linux. (Notice
    Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().)

    Let's convert error() into now treewide-available pr_err().

    Done with the help of Coccinelle, excluing tools/ directory.

    The semantic patch I used is as follows:

    //
    @@@@
    -error
    +pr_err
    (...)
    //

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Simon Glass
    [trini: Re-run Coccinelle]
    Signed-off-by: Tom Rini

    Masahiro Yamada
     

12 Aug, 2017

1 commit


12 Jul, 2017

1 commit


16 Jun, 2017

1 commit


18 Apr, 2017

1 commit


24 Sep, 2016

2 commits


04 Jun, 2016

3 commits


10 Nov, 2015

1 commit

  • After consulting with some of the SPDX team, the conclusion is that
    Makefiles are worth adding SPDX-License-Identifier tags too, and most of
    ours have one. This adds tags to ones that lack them and converts a few
    that had full (or in one case, very partial) license blobs into the
    equivalent tag.

    Cc: Kate Stewart
    Signed-off-by: Tom Rini

    Tom Rini
     

26 Aug, 2014

1 commit

  • - move linux specific defines from usb and video code
    into linux/compat.h
    - move common linux specific defines from include/ubi_uboot.h
    to linux/compat.h
    - add for new mtd/ubi/ubifs sync new needed linux specific
    defines to linux/compat.h

    Signed-off-by: Heiko Schocher
    Cc: Marek Vasut
    Cc: Anatolij Gustschin
    [trini: Add spin_lock_irqsave/spin_unlock_irqrestore dummies from
    usb/lin_gadet_compat.h]
    Signed-off-by: Tom Rini

    Heiko Schocher
     

19 Jul, 2014

2 commits

  • Current code uses the preprocessor to change an else case
    to a statement without any if condition at all. Although
    this works, change the optional code to return early, so
    all optional code is contained within a single #ifdef.

    Signed-off-by: Jeroen Hofstee

    Jeroen Hofstee
     
  • Remove self assignments which is just dead code to prevent
    compiler warnings about non used arguments. For u-boot this
    does not prevent any warning though, on the contrary it actual
    introduces warnings when compiling with clang. Remove them.

    Signed-off-by: Jeroen Hofstee

    Jeroen Hofstee
     

05 Mar, 2014

1 commit

  • U-Boot already has a list implementation, and files which include both
    that and the yaffs implementation will get errors:

    In file included from ydirectenv.h:80:0,
    from yportenv.h:81,
    from yaffs_guts.h:19,
    from yaffs_allocator.h:19,
    from yaffs_allocator.c:14:
    yaffs_list.h:32:8: error: redefinition of ‘struct list_head’
    struct list_head {
    ^

    Remove the yaffs implementation.

    Signed-off-by: Simon Glass

    Simon Glass
     

20 Feb, 2014

1 commit

  • Now we are ready to switch over to real Kbuild.

    This commit disables temporary scripts:
    scripts/{Makefile.build.tmp, Makefile.host.tmp}
    and enables real Kbuild scripts:
    scripts/{Makefile.build,Makefile.host,Makefile.lib}.

    This switch is triggered by the line in scripts/Kbuild.include
    -build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj
    +build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj

    We need to adjust some build scripts for U-Boot.
    But smaller amount of modification is preferable.

    Additionally, we need to fix compiler flags which are
    locally added or removed.

    In Kbuild, it is not allowed to change CFLAGS locally.
    Instead, ccflags-y, asflags-y, cppflags-y,
    CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o
    are prepared for that purpose.

    Signed-off-by: Masahiro Yamada
    Tested-by: Gerhard Sittig

    Masahiro Yamada
     

20 Jan, 2014

1 commit


13 Dec, 2013

1 commit


18 Nov, 2013

1 commit


01 Nov, 2013

1 commit


20 Aug, 2013

1 commit


01 Jun, 2013

1 commit

  • This patch is essentially an update of u-boot MTD subsystem to
    the state of Linux-3.7.1 with exclusion of some bits:

    - the update is concentrated on NAND, no onenand or CFI/NOR/SPI
    flashes interfaces are updated EXCEPT for API changes.

    - new large NAND chips support is there, though some updates
    have got in Linux-3.8.-rc1, (which will follow on top of this patch).

    To produce this update I used tag v3.7.1 of linux-stable repository.

    The update was made using application of relevant patches,
    with changes relevant to U-Boot-only stuff sticked together
    to keep bisectability. Then all changes were grouped together
    to this patch.

    Signed-off-by: Sergey Lapin
    [scottwood@freescale.com: some eccstrength and build fixes]
    Signed-off-by: Scott Wood

    Sergey Lapin
     

05 Nov, 2012

1 commit

  • 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: Kim Phillips
    [trini: Remove '#endif' in include/common.h around setenv portion]
    Signed-off-by: Tom Rini

    Kim Phillips
     

09 Oct, 2012

1 commit

  • Fix:
    yaffs_guts.c: In function 'yaffs_check_chunk_erased':
    yaffs_guts.c:324:6: warning: variable 'result' set but not used
    [-Wunused-but-set-variable]
    yaffs_guts.c: In function 'yaffs_verify_chunk_written':
    yaffs_guts.c:352:6: warning: variable 'result' set but not used
    [-Wunused-but-set-variable]
    yaffs_guts.c: In function 'yaffs_grab_chunk_cache':
    yaffs_guts.c:1488:6: warning: variable 'pushout' set but not used
    [-Wunused-but-set-variable]
    yaffs_guts.c: In function 'yaffs_check_obj_details_loaded':
    yaffs_guts.c:3180:6: warning: variable 'alloc_failed' set but not used
    [-Wunused-but-set-variable]
    yaffs_guts.c:3179:6: warning: variable 'result' set but not used
    [-Wunused-but-set-variable]
    yaffs_guts.c: In function 'yaffs_update_oh':
    yaffs_guts.c:3288:6: warning: variable 'result' set but not used
    [-Wunused-but-set-variable]
    yaffs_guts.c: In function 'yaffs_get_obj_name':
    yaffs_guts.c:4447:7: warning: variable 'result' set but not used
    [-Wunused-but-set-variable]
    yaffs_summary.c: In function 'yaffs_summary_read':
    yaffs_summary.c:194:6: warning: variable 'sum_tags_bytes' set but not
    used [-Wunused-but-set-variable]
    yaffs_verify.c: In function 'yaffs_verify_file':
    yaffs_verify.c:227:6: warning: variable 'actual_depth' set but not used
    [-Wunused-but-set-variable]
    yaffs_yaffs1.c: In function 'yaffs1_scan':
    yaffs_yaffs1.c:26:6: warning: variable 'result' set but not used
    [-Wunused-but-set-variable]
    yaffs_yaffs2.c: In function 'yaffs2_scan_chunk':
    yaffs_yaffs2.c:949:6: warning: variable 'result' set but not used
    [-Wunused-but-set-variable]
    yaffs_yaffs2.c: In function 'yaffs2_scan_backwards':
    yaffs_yaffs2.c:1352:6: warning: variable 'deleted' set but not used
    [-Wunused-but-set-variable]

    Signed-off-by: Anatolij Gustschin
    Cc: Charles Manning
    Tested-by: Albert ARIBAUD

    Anatolij Gustschin
     

02 Sep, 2012

1 commit


10 Aug, 2012

1 commit


11 Dec, 2011

1 commit

  • Fix:
    yaffs_guts.c: In function 'yaffs_GarbageCollectBlock':
    yaffs_guts.c:2761:6: warning: variable 'retVal' set but not used
    [-Wunused-but-set-variable]

    Here GCC actually detected a bug. The code was always returning OK
    instead of the previously set retrun code. Fix that.

    Signed-off-by: Wolfgang Denk
    Cc: William Juul
    Cc: Scott Wood
    Acked-by: William Juul

    Wolfgang Denk
     

17 Nov, 2011

2 commits

  • Sorry if this is already fixed somewhere - I could not find it.

    This fixes the warnings show below.

    yaffs_tagscompat.c: In function 'yaffs_TagsCompatabilityReadChunkWithTagsFromNAND':
    yaffs_tagscompat.c:151: warning: dereferencing pointer 'tu' does break strict-aliasing rules
    yaffs_tagscompat.c:150: warning: dereferencing pointer 'tu' does break strict-aliasing rules
    yaffs_tagscompat.c:149: warning: dereferencing pointer 'tu' does break strict-aliasing rules
    yaffs_tagscompat.c:148: warning: dereferencing pointer 'tu' does break strict-aliasing rules
    yaffs_tagscompat.c:147: warning: dereferencing pointer 'tu' does break strict-aliasing rules
    yaffs_tagscompat.c:146: warning: dereferencing pointer 'tu' does break strict-aliasing rules
    yaffs_tagscompat.c:145: warning: dereferencing pointer 'tu' does break strict-aliasing rules
    yaffs_tagscompat.c:144: warning: dereferencing pointer 'tu' does break strict-aliasing rules
    yaffs_tagscompat.c:141: note: initialized from here

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Fix:
    yaffs_guts.c: In function 'yaffs_CheckChunkErased':
    yaffs_guts.c:854:6: warning: variable 'result' set but not used
    yaffs_guts.c: In function 'yaffs_UpdateObjectHeader':
    yaffs_guts.c:3463:6: warning: variable 'result' set but not used
    yaffs_guts.c: In function 'yaffs_GrabChunkCache':
    yaffs_guts.c:3774:6: warning: variable 'pushout' set but not used
    yaffs_guts.c: In function 'yaffs_Scan':
    yaffs_guts.c:5237:6: warning: variable 'result' set but not used
    yaffs_guts.c: In function 'yaffs_CheckObjectDetailsLoaded':
    yaffs_guts.c:5748:6: warning: variable 'alloc_failed' set but not used
    yaffs_guts.c:5747:6: warning: variable 'result' set but not used
    yaffs_guts.c: In function 'yaffs_ScanBackwards':
    yaffs_guts.c:5808:6: warning: variable 'deleted' set but not used
    yaffs_guts.c:5806:6: warning: variable 'result' set but not used
    yaffs_guts.c: In function 'yaffs_GetObjectName':
    yaffs_guts.c:6657:7: warning: variable 'result' set but not used
    [-Wunused-but-set-variable]

    Signed-off-by: Anatolij Gustschin

    Anatolij Gustschin
     

28 Oct, 2011

2 commits

  • yaffs_guts.c: In function 'yaffs_ReadDataFromFile':
    yaffs_guts.c:4461:8: warning: 'chunk' may be used uninitialized in this function
    yaffs_guts.c:4462:8: warning: 'start' may be used uninitialized in this function
    yaffs_guts.c: In function 'yaffs_WriteDataToFile':
    yaffs_guts.c:4581:8: warning: 'chunk' may be used uninitialized in this function
    yaffs_guts.c:4582:8: warning: 'start' may be used uninitialized in this function
    yaffs_guts.c: In function 'yaffs_ResizeFile':
    yaffs_guts.c:4816:8: warning: 'newSizeOfPartialChunk' may be used uninitialized
    in this function
    yaffs_guts.c:4817:8: warning: 'newFullChunks' may be used uninitialized in this
    function

    Signed-off-by: Marek Vasut
    Cc: Wolfgang Denk
    Cc: Simon Glass
    Cc: Mike Frysinger
    Cc: William Juul

    Marek Vasut
     
  • Drop yaffs_DeleteWorker():
    yaffs_guts.c:1556:12: warning: 'yaffs_DeleteWorker' defined but not used

    Drop yaffs_VerifyTnodeWorker():
    yaffs_guts.c:600:12: warning: 'yaffs_VerifyTnodeWorker' defined but not used

    Signed-off-by: Marek Vasut
    Cc: Wolfgang Denk
    Cc: Simon Glass
    Cc: Mike Frysinger

    Marek Vasut
     

16 Oct, 2011

1 commit

  • The top level Makefile does not do any recursion into subdirs when
    cleaning, so these clean/distclean targets in random arch/board dirs
    never get used. Punt them all.

    MAKEALL didn't report any errors related to this that I could see.

    Signed-off-by: Mike Frysinger

    Mike Frysinger
     

10 Sep, 2011

1 commit

  • Fix these:
    yaffs_guts.c: In function 'yaffs_ReadDataFromFile':
    yaffs_guts.c:4622: warning: pointer targets in passing argument 3 of 'yaffs_AddrToChunk' differ in signedness
    yaffs_guts.c:4622: warning: pointer targets in passing argument 4 of 'yaffs_AddrToChunk' differ in signedness
    yaffs_guts.c: In function 'yaffs_WriteDataToFile':
    yaffs_guts.c:4745: warning: pointer targets in passing argument 3 of 'yaffs_AddrToChunk' differ in signedness
    yaffs_guts.c:4745: warning: pointer targets in passing argument 4 of 'yaffs_AddrToChunk' differ in signedness
    yaffs_guts.c: In function 'yaffs_ResizeFile':
    yaffs_guts.c:4968: warning: pointer targets in passing argument 3 of 'yaffs_AddrToChunk' differ in signedness
    yaffs_guts.c:4968: warning: pointer targets in passing argument 4 of 'yaffs_AddrToChunk' differ in signedness
    yaffs_guts.c: In function 'yaffs_GutsInitialise':
    yaffs_guts.c:7235: warning: assignment from incompatible pointer type
    yaffs_guts.c: In function 'yaffs_CreateNewObject':
    yaffs_guts.c:2143: warning: 'tn' may be used uninitialized in this function
    yaffs_guts.c: In function 'yaffs_MknodObject':
    yaffs_guts.c:2258: warning: 'str' may be used uninitialized in this function

    Signed-off-by: Wolfgang Denk

    Wolfgang Denk