Skip to content
Snippets Groups Projects
  1. Dec 20, 2015
    • Marek Vasut's avatar
      arm: socfpga: Allow DWC2 UDC probing from OF · ef4b01b2
      Marek Vasut authored
      
      The USB gadget framework does not support DM yet, so add this bit
      to let DWC2 UDC probe from OF on platforms which support it.
      
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Chin Liang See <clsee@altera.com>
      Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
      Cc: Lukasz Majewski <l.majewski@majess.pl>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      ef4b01b2
  2. Dec 14, 2015
  3. Dec 01, 2015
  4. Nov 23, 2015
    • Stefan Roese's avatar
      lib/tiny-printf.c: Support numbers bigger than 0xffff and misc updates · a5ecdd08
      Stefan Roese authored and Tom Rini's avatar Tom Rini committed
      
      With this patch now, the tiny printf() function also supports numbers
      bigger than 0xffff. Additionally the code is simplified a bit and
      some static variables are moved to function parameters. Also the
      upper case hex variable output support is removed, as its not really
      needed in this simple printf version. And removing it reduces the
      complexity and the code size again a bit.
      
      Here the new numbers, again on the db-mv784mp-gp (Armada XP):
      
      Without this patch:
        56542   18536    1956   77034   12cea ./spl/u-boot-spl
      
      With this patch:
        56446   18536    1936   76918   12c76 ./spl/u-boot-spl
      
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      a5ecdd08
    • Stefan Roese's avatar
      lib/tiny-printf.c: Add tiny printf function for space limited environments · 7d9cde10
      Stefan Roese authored and Tom Rini's avatar Tom Rini committed
      This patch adds a small printf() version that supports all basic formats.
      Its intented to be used in U-Boot SPL versions on platforms with very
      limited internal RAM sizes.
      
      To enable it, just define CONFIG_USE_TINY_PRINTF in your defconfig. This
      will result in the SPL using this tiny function and the main U-Boot
      still using the full-blown printf() function.
      
      This code was copied from:
      http://www.sparetimelabs.com/printfrevisited
      
      
      With mostly only coding style related changes so that its checkpatch
      clean.
      
      The size reduction is about 2.5KiB. Here a comparison for the db-mv784mp-gp
      (Marvell AXP) SPL:
      
      Without this patch:
        58963   18536    1928   79427   13643 ./spl/u-boot-spl
      
      With this patch:
        56542   18536    1956   77034   12cea ./spl/u-boot-spl
      
      Note:
      To make it possible to compile tiny-printf.c instead of vsprintf.c when
      CONFIG_USE_TINY_PRINTF is defined, the functions printf() and vprintf() are
      moved from common/console.c into vsprintf.c in this patch.
      
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      7d9cde10
  5. Nov 20, 2015
  6. Nov 18, 2015
  7. Nov 12, 2015
    • Patrick Delaunay's avatar
      uuid: add selection by string for known partition type GUID · bcb41dca
      Patrick Delaunay authored and Tom Rini's avatar Tom Rini committed
      
      short strings can be used in type parameter of gpt command
      to replace the guid string for the types known by u-boot
      
            partitions = name=boot,size=0x6bc00,type=data; \
                         name=root,size=0x7538ba00,type=linux;
            gpt write mmc 0 $partitions
      
      and they are also used to display the type of partition
      in "part list" command
      
        Partition Map for MMC device 0  --   Partition Type: EFI
      
        Part	Start LBA	End LBA		Name
      	Attributes
      	Type GUID
      	Partition GUID
          1	0x00000022	0x0000037f	"boot"
      	attrs:	0x0000000000000000
      	type:	ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
      	type:	data
      	guid:	d117f98e-6f2c-d04b-a5b2-331a19f91cb2
          2	0x00000380	0x003a9fdc	"root"
      	attrs:	0x0000000000000000
      	type:	0fc63daf-8483-4772-8e79-3d69d8477de4
      	type:	linux
      	guid:	25718777-d0ad-7443-9e60-02cb591c9737
      
      Signed-off-by: default avatarPatrick Delaunay <patrick.delaunay73@gmail.com>
      bcb41dca
    • Stephen Warren's avatar
      pci: tegra: add/enable support for Tegra210 · d9eda6c4
      Stephen Warren authored and Tom Warren's avatar Tom Warren committed
      
      This needs a separate compatible value from Tegra124 since the new HW
      version has bugs that would prevent a driver for previous HW versions
      from operating at all.
      
      Signed-off-by: Stephen Warren's avatarStephen Warren <swarren@nvidia.com>
      Signed-off-by: default avatarTom Warren <twarren@nvidia.com>
      d9eda6c4
  8. Nov 10, 2015
    • Tom Rini's avatar
      Various Makefiles: Add SPDX-License-Identifier tags · da58dec8
      Tom Rini authored
      
      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 <kstewart@linuxfoundation.org>
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      da58dec8
  9. Nov 05, 2015
    • Chin Liang See's avatar
      lib, fdt: Adding fdtdec_get_uint function · bfa3e55b
      Chin Liang See authored and Marek Vasut's avatar Marek Vasut committed
      
      Adding fdtdec_get_uint function which is the
      unsigned version for fdtdec_get_int
      
      Signed-off-by: default avatarChin Liang See <clsee@altera.com>
      Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
      Cc: Dinh Nguyen <dinh.linux@gmail.com>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Stefan Roese <sr@denx.de>
      Cc: Vikas Manocha <vikas.manocha@st.com>
      Cc: Jagannadh Teki <jteki@openedev.com>
      Cc: Pavel Machek <pavel@denx.de>
      Cc: Heiko Schocher <hs@denx.de>
      bfa3e55b
  10. Nov 04, 2015
  11. Oct 23, 2015
  12. Oct 22, 2015
  13. Oct 21, 2015
  14. Oct 11, 2015
    • Julius Werner's avatar
      Add support for LZ4 decompression algorithm · 027b728d
      Julius Werner authored and Tom Rini's avatar Tom Rini committed
      
      This patch adds support for LZ4-compressed FIT image contents. This
      algorithm has a slightly worse compression ration than LZO while being
      nearly twice as fast to decompress. When loading images from a fast
      storage medium this usually results in a boot time win.
      
      Sandbox-tested only since I don't have a U-Boot development system set
      up right now. The code was imported unchanged from coreboot where it's
      proven to work, though. I'm mostly interested in getting this recognized
      by mkImage for use in a downstream project.
      
      Signed-off-by: default avatarJulius Werner <jwerner@chromium.org>
      Acked-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      027b728d
  15. Oct 03, 2015
    • Przemyslaw Marczak's avatar
      fdtdec: fix parsing 'reg' property with zero value in '#size-cells' · ff0a6358
      Przemyslaw Marczak authored and Simon Glass's avatar Simon Glass committed
      
      After rework of lib/fdtdec.c by:
      
      commit: 02464e38 fdt: add new fdt address parsing functions
      
      the function fdtdec_get_addr() doesn't work as previous,
      because the implementation assumes that properties '#address-cells'
      and '#size-cells' are equal to 1, which can be not true sometimes.
      
      The new API introduced fdtdec_get_addr_size_auto_parent() for the 'reg'
      property parsing, but the implementation assumes, that #size-cells
      can't be less than 1.
      
      This causes that the following children's 'reg' property can't be reached:
      
      parent@0x0 {
           #address-cells = <1>;
           #size-cells = <0>;
           children@0x100 {
               reg = < 0x100 >;
           };
      };
      
      Change the condition value from '1' to '0', which allows parsing property
      with at least zero #size-cells, fixes the issue.
      
      Now, fdtdec_get_addr_size_auto_parent() works properly.
      
      Tested on: Odroid U3/X2, Trats, Trats2, Odroid XU3, Snow (by Simon).
      
      Signed-off-by: default avatarPrzemyslaw Marczak <p.marczak@samsung.com>
      Acked-by: Stephen Warren's avatarStephen Warren <swarren@nvidia.com>
      Acked-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Tested-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      ff0a6358
    • Stephen Warren's avatar
      fdt: fix fdtdec_get_addr_size not to require any size cells · d93b9a07
      Stephen Warren authored and Simon Glass's avatar Simon Glass committed
      
      fdtdec_get_addr_size() may be used in two cases:
      a) With sizep supplied, in which case both an address and a size are
      parsed from DT. In this case, the DT property must be large enough to
      contain both values.
      b) With sizep NULL, in which case only an address is parsed from DT.
      In this case, the DT property only need be large enough to contain this
      address value. Commit 02464e38 "fdt: add new fdt address parsing
      functions" broke this relaxed checking, and required the DT property to
      contain both an address and a size value in all cases.
      
      Fix fdtdec_get_addr_size() to vary ns based on whether the size value
      is being parsed from the DT or not. This is safe since the function only
      parses the first entry in the property, so the overall value of (na + ns)
      need not be accurate, since it is never used to step through the property
      data to find other entries. Besides, this fixed behaviour essentially
      matches the original behaviour before the patch this patch fixes. (The
      original code validated that the property was exactly the length of
      either na or (na + ns), whereas the current code only validates that the
      property is at least that long. For non-failure cases, the two behaviours
      are identical).
      
      Cc: Przemyslaw Marczak <p.marczak@samsung.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Thierry Reding <treding@nvidia.com>
      Cc: Bin Meng <bmeng.cn@gmail.com>
      Cc: Michal Suchanek <hramrach@gmail.com>
      Fixes: 02464e38 ("fdt: add new fdt address parsing functions")
      Reported-by: default avatarPrzemyslaw Marczak <p.marczak@samsung.com>
      Signed-off-by: Stephen Warren's avatarStephen Warren <swarren@nvidia.com>
      Tested-by: default avatarPrzemyslaw Marczak <p.marczak@samsung.com>
      Acked-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      d93b9a07
  16. Sep 15, 2015
    • Lukasz Majewski's avatar
      env: import: hashtable: Free memory allocated before exiting from himport_r() · 0226d878
      Lukasz Majewski authored and Tom Rini's avatar Tom Rini committed
      
      ithout this patch memory is not released on early exit.
      
      Signed-off-by: default avatarLukasz Majewski <l.majewski@majess.pl>
      0226d878
    • Lukasz Majewski's avatar
      env: import: hashtable: Prevent buffer overrun when importing environment from file · 817e48d8
      Lukasz Majewski authored and Tom Rini's avatar Tom Rini committed
      
      Lets consider following scenario:
      - One uses echo -n "key=value" to define environment variable in a file (single variable)
      - The file content is "key=value" without any terminating byte (e.g. 0x0a or
      0x0d).
      - The file is loaded to u-boot non zero'ed RAM buffer (with load command).
      - Then "env import -t -r $loadaddr $filesize" is executed.
      - Due to lack of proper termination byte we have classical example of buffer
        overrun.
      
      This patch prevents from this by allocating one extra byte than size and
      explicitly null terminate it.
      
      There should be no change for normal env import operation after applying
      this patch.
      
      Signed-off-by: default avatarLukasz Majewski <l.majewski@majess.pl>
      817e48d8
    • Stephen Warren's avatar
      fdt: add new fdt address parsing functions · 02464e38
      Stephen Warren authored and Simon Glass's avatar Simon Glass committed
      
      fdtdec_get_addr_size() hard-codes the number of cells used to represent
      an address or size in DT. This is incorrect in many cases depending on
      the DT binding for a particular node or property (e.g. it is incorrect
      for the "reg" property). In most cases, DT parsing code must use the
      properties #address-cells and #size-cells to parse addres properties.
      
      This change splits up the implementation of fdtdec_get_addr_size() so
      that the core logic can be used for both hard-coded and non-hard-coded
      cases. Various wrapper functions are implemented that support cases
      where hard-coded cell counts should or should not be used, and where
      the client does and doesn't know the parent node ID that contains the
      properties #address-cells and #size-cells.
      
      dev_get_addr() is updated to use the new functions.
      
      Core functionality in fdtdec_get_addr_size_fixed() is widely tested via
      fdtdec_get_addr_size(). I tested fdtdec_get_addr_size_auto_noparent() and
      dev_get_addr() by manually modifying the Tegra I2C driver to invoke them.
      
      Much of the core implementation of fdtdec_get_addr_size_fixed(),
      fdtdec_get_addr_size_auto_parent(), and
      fdtdec_get_addr_size_auto_noparent() comes from Thierry Reding's
      previous commit "fdt: Fix fdtdec_get_addr_size() for 64-bit".
      
      Based-on-work-by: default avatarThierry Reding <treding@nvidia.com>
      Cc: Thierry Reding <treding@nvidia.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Michal Suchanek <hramrach@gmail.com>
      Signed-off-by: Stephen Warren's avatarStephen Warren <swarren@nvidia.com>
      Acked-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Dropped #define DEBUG at the top of fdtdec.c:
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      02464e38
  17. Sep 11, 2015
    • Simon Glass's avatar
      Move malloc_cache_aligned() to its own header · 6e295186
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      At present malloc.h is included everywhere since it recently was added to
      common.h in this commit:
      
         4519668b mtd/nand/ubi: assortment of alignment fixes
      
      This seems wasteful and unnecessary. We have been trying to trim down
      common.h and put separate functions into separate header files and that
      change goes in the opposite direction.
      
      Move malloc_cache_aligned() to a new header so that this can be avoided.
      The header would perhaps be better named as alignmem.h but it needs to be
      included after common.h and people might be confused by this. With the name
      memalign.h it fits nicely after malloc() in most cases.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Acked-by: default avatarMarcel Ziswiler <marcel.ziswiler@toradex.com>
      6e295186
  18. Sep 04, 2015
    • Marek Vasut's avatar
      mmc: dw_mmc: Probe the MMC from OF · 129adf5b
      Marek Vasut authored
      
      Rework the driver to probe the MMC controller from Device Tree
      and make it mandatory. There is no longer support for probing
      from the ancient qts-generated header files.
      
      This patch now also removes previous temporary workaround.
      
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
      Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
      Cc: Tom Rini <trini@konsulko.com>
      129adf5b
  19. Aug 31, 2015
  20. Aug 28, 2015
  21. Aug 26, 2015
Loading