Skip to content
Snippets Groups Projects
  1. Oct 04, 2017
    • Masahiro Yamada's avatar
      printk: collect printk stuff into <linux/printk.h> with loglevel support · b44b3026
      Masahiro Yamada authored
      
      When we import code from Linux, with regular re-sync planned, we want
      to use printk() and pr_*().  U-Boot does not support them in a clean
      way.  So, people end up with local macros, or compat headers here and
      there, then we occasionally see build errors of definition conflicts.
      
      We have include/linux/compat.h, but putting all sorts of unrelated
      things into a single header is just a temporal workaround.  Hence this
      patch, to find the best home for all printk variants.  If you want to
      use printk() and friends, please include <linux/printk.h>.  This header
      is self-contained, and pulls in only a few headers.
      
      When I was testing this clean-up, I noticed the image size exceeded
      its platform limit on some boards.  This is because all pr_*() that
      were previously defined as no-op in include/linux/mtd/mtd.h (unless
      CONFIG_MTD_DEBUG is set), are now enabled.
      
      To make such boards happy, this commit also implements CONFIG_LOGLEVEL.
      The concept is similar to the kernel parameter "loglevel".  (Actually,
      the Kconfig help message was taken from kernel-paremeter.txt of Linux)
      Messages with a loglevel smaller than console loglevel will be printed.
      
      The difference is the loglevel is build-time determined.  To save the
      image size, lower priority pr_*() are compiled out.  I set the default
      of CONFIG_LOGLEVEL to 6, i.e. pr_notice and higher priority messages
      are compiled in.
      
      I adjusted CONFIG_LOGLEVEL to avoid build error for some boards.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      [trini: Add in SPL_LOGLEVEL that is the same as LOGLEVEL]
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      b44b3026
    • Masahiro Yamada's avatar
      stdio.h: move printf() stuff from <common.h> to <stdio.h> · 7fea7b1a
      Masahiro Yamada authored
      
      <common.h> pulls in a lot of headers.  Including it from every .c
      file is a bad idea.  We need to remove contents until it contains
      nothing.
      
      Move printf() and friends to <stdio.h>.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      7fea7b1a
  2. Oct 03, 2017
    • Tom Rini's avatar
      sandbox: Enable btrfs support · 39dd65a0
      Tom Rini authored
      
      For better test coverage, enable btrfs.
      
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      39dd65a0
    • Tom Rini's avatar
      fs/btrfs: Fix warning in btrfs_check_super() · 6b7fd350
      Tom Rini authored
      
      We specifically say that the last arg is u32, so use %lu.
      
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      6b7fd350
    • Paul Burton's avatar
      sandbox: Use asm-generic/io.h · f7ae1ca3
      Paul Burton authored
      
      Convert the sandbox architecture to make use of the new asm-generic/io.h
      to provide address mapping functions. As sandbox actually performs
      non-identity mapping between physical & virtual addresses we can't
      simply make use of the generic mapping functions, but are able to
      implement phys_to_virt() & make use of it from map_physmem().
      
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: Simon Glass <sjg@chromium.org>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      f7ae1ca3
    • Paul Burton's avatar
      powerpc: Use asm-generic/io.h · ae07d609
      Paul Burton authored
      
      Convert the powerpc architecture to make use of the new asm-generic/io.h
      to provide address mapping functions. As powerpc can actually perform
      non-identity mapping between physical & virtual addresses we can't
      simply make use of the generic phys_to_virt() & virt_to_phys()
      functions. However since map_physmem() already effectively implemented
      the same thing as virt_to_phys() we can simply implement virt_to_phys()
      instead of map_physmem() & use the generic map_physmem(). We also drop
      the no-op unmap_physmem().
      
      This has only been build-tested, feedback from architecture maintainers
      is welcome.
      
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: Wolfgang Denk <wd@denx.de>
      ae07d609
    • Paul Burton's avatar
      nios2: Use asm-generic/io.h · e16986c4
      Paul Burton authored
      
      Convert the nios2 architecture to make use of the new asm-generic/io.h to
      provide address mapping functions. As nios2 actually performs
      non-identity mapping between physical & virtual addresses we can't
      simply make use of the generic functions, with the exception of being
      able to drop our no-op unmap_physmem() and definitions of unused map
      flags.
      
      Feedback from architecture maintainers is welcome.
      
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: Thomas Chou <thomas@wytron.com.tw>
      e16986c4
    • Paul Burton's avatar
      mips: Use asm-generic/io.h · d1cbeafd
      Paul Burton authored
      
      Convert the mips architecture to make use of the new asm-generic/io.h to
      provide address mapping functions. As mips actually performs
      non-identity mapping between physical & virtual addresses we can't
      simply make use of the generic functions, with the exception of being
      able to drop our no-op unmap_physmem() and definitions of unused map
      flags.
      
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
      Reviewed-by: default avatarDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
      Acked-by: default avatarDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
      d1cbeafd
    • Paul Burton's avatar
      xtensa: Use asm-generic/io.h · e8645527
      Paul Burton authored
      
      Convert the xtensa architecture to make use of the new asm-generic/io.h
      to provide address mapping functions. As the generic implementations are
      suitable for xtensa this is primarily a matter of moving code.
      
      This has only been build-tested, feedback from architecture maintainers
      is welcome.
      
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Acked-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      e8645527
    • Paul Burton's avatar
      x86: Use asm-generic/io.h · 6f01316f
      Paul Burton authored
      
      Convert the x86 architecture to make use of the new asm-generic/io.h to
      provide address mapping functions. As the generic implementations are
      suitable for x86 this is primarily a matter of moving code.
      
      This has only been build-tested, feedback from architecture maintainers
      is welcome.
      
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: Simon Glass <sjg@chromium.org>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      6f01316f
    • Paul Burton's avatar
      sh: Use asm-generic/io.h · 505fe9cd
      Paul Burton authored
      
      Convert the sh architecture to make use of the new asm-generic/io.h to
      provide address mapping functions. As the generic implementations are
      suitable for sh this is primarily a matter of moving code.
      
      Feedback from architecture maintainers is welcome.
      
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
      505fe9cd
    • Paul Burton's avatar
      nds32: Use asm-generic/io.h · b3666a69
      Paul Burton authored
      
      Convert the nds32 architecture to make use of the new asm-generic/io.h
      to provide address mapping functions. As the generic implementations are
      suitable for nds32 this is primarily a matter of removing code.
      
      Feedback from architecture maintainers is welcome.
      
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: Macpaul Lin <macpaul@andestech.com>
      b3666a69
    • Paul Burton's avatar
      microblaze: Use asm-generic/io.h · dbee7152
      Paul Burton authored
      
      Convert the microblaze architecture to make use of the new
      asm-generic/io.h to provide address mapping functions. As the generic
      implementations are suitable for microblaze this is primarily a matter
      of removing code.
      
      Feedback from architecture maintainers is welcome.
      
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: Michal Simek <monstr@monstr.eu>
      dbee7152
    • Paul Burton's avatar
      m68k: Use asm-generic/io.h · 0884077b
      Paul Burton authored
      
      Convert the m68k architecture to make use of the new asm-generic/io.h to
      provide address mapping functions. As the generic implementations are
      suitable for m68k this is primarily a matter of emoving code.
      
      Feedback from architecture maintainers is welcome.
      
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: Huan Wang <alison.wang@freescale.com>
      Cc: Angelo Dureghello <angelo@sysam.it>
      Acked-by: default avatarAngelo Dureghello <angelo@sysam.it>
      Tested-by: default avatarAngelo Dureghello <angelo@sysam.it>
      0884077b
    • Paul Burton's avatar
      arm: Use asm-generic/io.h · 8f8e6304
      Paul Burton authored
      
      Convert the arm architecture to make use of the new asm-generic/io.h to
      provide address mapping functions. As the generic implementations are
      suitable for arm this is primarily a matter of removing code.
      
      This has only been build-tested, feedback from architecture maintainers
      is welcome.
      
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      8f8e6304
    • Paul Burton's avatar
      arc: Use asm-generic/io.h · 593477c6
      Paul Burton authored
      
      Convert the arc architecture to make use of the new asm-generic/io.h to
      provide address mapping functions. As the generic implementations are
      suitable for arc this is primarily a matter of removing code.
      
      Feedback from architecture maintainers is welcome.
      
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: Alexey Brodkin <alexey.brodkin@synopsys.com>
      Acked-by: default avatarAlexey Brodkin <abrodkin@synopsys.com>
      593477c6
    • Paul Burton's avatar
      Provide a generic io.h & address mapping functions · d4150ca6
      Paul Burton authored
      
      Most architectures currently supported by U-Boot use trivial
      implementations of map_to_physmem & virt_to_phys which simply cast a
      physical address to a pointer for use a virtual address & vice-versa.
      This results in a lot of duplicate implementations of these mapping
      functions.
      
      The set of functions provided by different architectures also differs,
      with some having implementations of phys_to_virt & others not. A later
      patch will make use of phys_to_virt in architecture-neutral code, and so
      requires that it be provided for all architectures.
      
      This patch introduces an asm-generic/io.h which provides generic
      implementations of address mapping functions, allowing the duplication
      of them between architectures to be removed. Once architectures are
      converted to make use of this generic header it will also ensure that
      all of phys_to_virt, virt_to_phys, map_physmem & unmap_physmem are
      provided. The 2 families of functions differ in that map_physmem may
      create dynamic mappings whilst phys_to_virt may not & therefore is more
      limited in scope but doesn't require information such as a length &
      flags.
      
      This patch doesn't convert any architectures to make use of this generic
      header - later patches in the series will do so.
      
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Alexey Brodkin <alexey.brodkin@synopsys.com>
      Cc: Angelo Dureghello <angelo@sysam.it>
      Cc: Bin Meng <bmeng.cn@gmail.com>
      Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
      Cc: Macpaul Lin <macpaul@andestech.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
      Cc: Thomas Chou <thomas@wytron.com.tw>
      Cc: Wolfgang Denk <wd@denx.de>
      Acked-by: default avatarAngelo Dureghello <angelo@sysam.it>
      Tested-by: default avatarAngelo Dureghello <angelo@sysam.it>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
      d4150ca6
    • Marek Behún's avatar
    • Marek Behún's avatar
      cmd: Add the 'btrsubvol' command to list BTRFS subvolumes · 9d845509
      Marek Behún authored
      
      Signed-off-by: default avatarMarek Behun <marek.behun@nic.cz>
      
       create mode 100644 cmd/btrfs.c
      9d845509
    • Marek Behún's avatar
      fs: btrfs: Add U-Boot fs handlers. · 0c936ee3
      Marek Behún authored
      
      Signed-off-by: default avatarMarek Behun <marek.behun@nic.cz>
      
       create mode 100644 fs/btrfs/Kconfig
       create mode 100644 fs/btrfs/Makefile
       create mode 100644 fs/btrfs/btrfs.c
       create mode 100644 include/btrfs.h
      0c936ee3
    • Marek Behún's avatar
      fs: btrfs: Add single-device read-only BTRFS implementation · 21a14fac
      Marek Behún authored
      
      This adds the proper implementation for the BTRFS filesystem.
      The implementation currently supports only read-only mode and
      the filesystem can be only on a single device.
      
      Checksums of data chunks is unimplemented.
      
      Compression is implemented (ZLIB + LZO).
      
      Signed-off-by: default avatarMarek Behun <marek.behun@nic.cz>
      
       create mode 100644 fs/btrfs/btrfs.h
       create mode 100644 fs/btrfs/chunk-map.c
       create mode 100644 fs/btrfs/compression.c
       create mode 100644 fs/btrfs/ctree.c
       create mode 100644 fs/btrfs/dev.c
       create mode 100644 fs/btrfs/dir-item.c
       create mode 100644 fs/btrfs/extent-io.c
       create mode 100644 fs/btrfs/hash.c
       create mode 100644 fs/btrfs/inode.c
       create mode 100644 fs/btrfs/root.c
       create mode 100644 fs/btrfs/subvolume.c
       create mode 100644 fs/btrfs/super.c
      21a14fac
    • Marek Behún's avatar
      fs: btrfs: Add disk-to-cpu and cpu-to-disk conversion functions · 597b4aff
      Marek Behún authored
      
      BTRFS on disk structures are stored in Little Endian. Add functions
      to convert this structures to cpu and to disk format.
      
      On Little Endian hosts, these functions do nothing.
      
      On Big Endian the CALL_MACRO_FROM_EACH from variadic-macro.h is used
      to define all the members for each structure on which cpu_to_le* or
      le*_to_cpu is to be called.
      
      Signed-off-by: default avatarMarek Behun <marek.behun@nic.cz>
      
       create mode 100644 fs/btrfs/conv-funcs.h
      597b4aff
    • Marek Behún's avatar
      fs: btrfs: Add btrfs_tree.h and ctree.h from Linux (and modified) · d4a704af
      Marek Behún authored
      
      Add btrfs_tree.h and ctree.h from Linux which contains constants
      and structures for the BTRFS filesystem.
      
      Signed-off-by: default avatarMarek Behun <marek.behun@nic.cz>
      
       create mode 100644 fs/btrfs/btrfs_tree.h
       create mode 100644 fs/btrfs/ctree.h
      d4a704af
    • Marek Behún's avatar
      include: Add a variadic macro to call a callback for all arguments · 59981e6a
      Marek Behún authored
      
      Add a header variadic-macro.h which defines the CALL_MACRO_FOR_EACH marco.
      
      This macro can be used as follows:
        #define TEST(x)
        CALL_MACRO_FOR_EACH(TEST, a, b, c, d)
      
      This will expand to
        TEST(a) TEST(b) TEST(c) TEST(d)
      
      The nice thing is that CALL_MACRO_FOR_EACH is a variadic macro, thus the
      number of arguments can vary (although it has an upper limit - in this
      implementation 32 arguments).
      
      Signed-off-by: default avatarMarek Behun <marek.behun@nic.cz>
      
       create mode 100644 include/u-boot/variadic-macro.h
      59981e6a
    • Marek Behún's avatar
      fs: Create a common fs_devread for ext4/reiserfs/zfs · 5994e8b6
      Marek Behún authored
      
      The ext4, reiserfs and zfs filesystems all have their own implementation
      of the same function, *_devread. Generalize this function into fs_devread
      and put the code into fs/fs_internal.c.
      
      Signed-off-by: default avatarMarek Behun <marek.behun@nic.cz>
      [trini: Move fs/fs_internal.o hunk to the end of fs/Makefile as all
      cases need it]
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      5994e8b6
    • Marek Behún's avatar
      lib: Add CRC32-C · 85d8bf57
      Marek Behún authored
      
      This is needed for BTRFS.
      
      Signed-off-by: default avatarMarek Behun <marek.behun@nic.cz>
      
       create mode 100644 lib/crc32c.c
      85d8bf57
    • Tom Rini's avatar
      Prepare v2017.11-rc1 · 43dd6dac
      Tom Rini authored
      
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      43dd6dac
  3. Oct 02, 2017
  4. Oct 01, 2017
Loading