Skip to content
Snippets Groups Projects
  1. Nov 27, 2014
  2. Nov 25, 2014
  3. Nov 23, 2014
  4. Nov 22, 2014
  5. Nov 21, 2014
  6. Nov 20, 2014
    • Masahiro Yamada's avatar
      include: move various macros to include/linux/kernel.h · cba1da49
      Masahiro Yamada authored and Tom Rini's avatar Tom Rini committed
      
      U-Boot has imported various utility macros from Linux
      scattering them to various places without consistency.
      
      In include/common.h are min, max, min3, max3, ARRAY_SIZE, ALIGN,
      container_of, DIV_ROUND_UP, etc.
      In include/linux/compat.h are min_t, max_t, round_up, round_down,
      etc.
      We also have duplicated defines of min_t in some *.c files.
      
      Moreover, we are suffering from too cluttered include/common.h.
      
      This commit moves various macros that originate in
      include/linux/kernel.h of Linux to their original position.
      
      Note:
      This commit simply moves the macros; the macros roundup,
      min, max, min2, max3, ARRAY_SIZE are different
      from those of Linux at this point.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      cba1da49
    • Masahiro Yamada's avatar
      replace DIV_ROUND with DIV_ROUND_CLOSEST · 4515992f
      Masahiro Yamada authored and Tom Rini's avatar Tom Rini committed
      
      The Linux-compatible macro DIV_ROUND_CLOSEST is a bit more flexible
      and safer than DIV_ROUND.
      
      For example,
        foo = DIV_ROUND_CLOSEST(x, y++)
      works expectedly, but
        foo = DIV_ROUND(x, y++)
      does not. (y is incremented twice.)
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      4515992f
  7. Oct 27, 2014
  8. Oct 25, 2014
  9. Oct 23, 2014
  10. Oct 22, 2014
  11. Sep 24, 2014
  12. Sep 16, 2014
  13. Sep 10, 2014
  14. Sep 05, 2014
  15. Aug 25, 2014
    • Heiko Schocher's avatar
      lib, linux: move linux specific defines to linux/compat.h · 0c06db59
      Heiko Schocher authored
      
      - 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: default avatarHeiko Schocher <hs@denx.de>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Anatolij Gustschin <agust@denx.de>
      [trini: Add spin_lock_irqsave/spin_unlock_irqrestore dummies from
      usb/lin_gadet_compat.h]
      Signed-off-by: default avatarTom Rini <trini@ti.com>
      0c06db59
    • Heiko Schocher's avatar
      lib, list_sort: add list_sort from linux 3.14 · c068d44a
      Heiko Schocher authored
      
      from linux 3.14:
      
      commit 455c6fdbd219161bd09b1165f11699d6d73de11c
      Author: Linus Torvalds <torvalds@linux-foundation.org>
      Date:   Sun Mar 30 20:40:15 2014 -0700
      
          Linux 3.14
      
      Needed for the MTD/UBI/UBIFS resync
      
      Just copied the files from Linux, and added in the c-file
      the "#define __UBOOT__" for adding U-Boot special code. In
      this case we use this just for adding including U-Boot
      headers.
      
      Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Sergey Lapin <slapin@ossfans.org>
      Cc: Scott Wood <scottwood@freescale.com>
      Cc: Tom Rini <trini@ti.com>
      c068d44a
    • Heiko Schocher's avatar
      lib, rbtree: resync with Linux-3.14 · 9dd228b5
      Heiko Schocher authored
      
      resync with linux:
      
      commit 455c6fdbd219161bd09b1165f11699d6d73de11c
      Author: Linus Torvalds <torvalds@linux-foundation.org>
      Date:   Sun Mar 30 20:40:15 2014 -0700
      
          Linux 3.14
      
      Needed for the MTD/UBI/UBIFS resync
      
      Just copied the files from Linux, changed the license file header,
      and add in the c-file:
      
      +#define __UBOOT__
       #include <linux/rbtree_augmented.h>
      +#ifndef __UBOOT__
       #include <linux/export.h>
      +#else
      +#include <ubi_uboot.h>
      +#endif
      
      so, it compiles for U-Boot.
      
      Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Sergey Lapin <slapin@ossfans.org>
      Cc: Scott Wood <scottwood@freescale.com>
      Cc: Tom Rini <trini@ti.com>
      9dd228b5
  16. Aug 09, 2014
    • Stephen Warren's avatar
      lib: lmb: fix overflow in __lmb_alloc_base w/ large RAM · ad3fda52
      Stephen Warren authored
      
      If a 32-bit system has 2GB of RAM, and the base address of that RAM is
      2GB, then start+size will overflow a 32-bit value (to a value of 0).
      
      __lmb_alloc_base is affected by this; it calculates the minimum of
      (start+size of RAM) and max_addr. However, when start+size is 0, it
      is always less than max_addr, which causes the value of max_addr not
      to be taken into account when restricting the allocation's location.
      
      Fix this by calculating start+size separately, and if that calculation
      underflows, using -1 (interpreted as the max unsigned value) as the
      value instead, and then taking the min of that and max_addr. Now that
      start+size doesn't overflow, it's typically large, and max_addr
      dominates the min() call, and is taken into account.
      
      The user-visible symptom of this bug is that CONFIG_BOOTMAP_SZ is ignored
      on Tegra124 systems with 2GB of RAM, which in turn causes the DT to be
      relocated at the very end of RAM, which the ARM Linux kernel doesn't map
      during early boot, and which causes boot failures. With this fix,
      CONFIG_BOOTMAP_SZ correctly restricts the relocated DT to a much lower
      address, and everything works.
      
      Signed-off-by: Stephen Warren's avatarStephen Warren <swarren@nvidia.com>
      ad3fda52
    • Simon Glass's avatar
      rsa: Fix two errors in the implementation · 54267162
      Simon Glass authored
      
      1. Failure to set the return code correctly
      2. Failure to detect the loop end condition when the value is equal to
      the modulus.
      
      Reported-by: default avatarJeroen Hofstee <jeroen@myspectrum.nl>
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      54267162
    • Simon Glass's avatar
      fdt: Sync up with libfdt · 0596d35d
      Simon Glass authored
      
      This brings in changes up to commit f9e91a48 in the libfdt repo.
      Mostly this is whitespace/minor changes. But there are a few new
      features:
      
      - fdt_size_cells() and fdt_address_cells()
      - fdt_resize()
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      0596d35d
Loading