07 Oct, 2017

4 commits


06 Oct, 2017

8 commits


05 Oct, 2017

8 commits


04 Oct, 2017

10 commits

  • 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 . 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: Masahiro Yamada
    [trini: Add in SPL_LOGLEVEL that is the same as LOGLEVEL]
    Signed-off-by: Tom Rini

    Masahiro Yamada
     
  • 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 .

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • The current code, if there's both an eMMC and an MMC slot available on the
    board, will swap the MMC indices based on whether we booted from the eMMC
    or the MMC. This way, the MMC we're supposed to boot on will always have
    the index 0.

    However, this causes various issues, for example when using other
    components that base their behaviour on the MMC index, such as fastboot.

    Let's remove that hack, and take the opposite approach. The MMC will always
    have the same index, but the bootcmd will pick the same device than the one
    we booted from. This is done through the introduction of the mmc_bootdev
    environment variable that will be filled by the board code based on the
    boot device informations we can get from the SoC.

    In order to not introduce regressions, we also need to adjust the fastboot
    MMC device and the environment device in order to set it to the eMMC, over
    the MMC, like it used to be the case.

    Tested-by: Chen-Yu Tsai
    Signed-off-by: Maxime Ripard

    Maxime Ripard
     
  • CONFIG_RANDOM_UUID is used by the GPT command to generate random UUID when
    none are provided.

    Move that option to Kconfig.

    Reviewed-by: Tom Rini
    Reviewed-by: Jagan Teki
    Signed-off-by: Maxime Ripard

    Maxime Ripard
     
  • The kernel DT of the SinA33 has evolved quite a bit. Make sure we sync it
    and its upstream DTSI to be able to use the OTG. The DTs were taken from
    the 4.13 kernel release.

    Reviewed-by: Łukasz Majewski
    Reviewed-by: Simon Glass
    Signed-off-by: Maxime Ripard

    Maxime Ripard
     
  • The usb_ether gadget duplicates the USB settings for the manufacturer,
    product ID and vendor ID.

    Make sure we use the common option so that we can expect a single VID/PID
    couple for a single device.

    Reviewed-by: Simon Glass
    Reviewed-by: Lukasz Majewski
    Signed-off-by: Maxime Ripard

    Maxime Ripard
     
  • The g_dnl USB settings for the vendor ID, product ID and manufacturer are
    actually common settings that can and should be shared by all the gadgets.

    Make them common by renaming them, and convert all the users.

    Reviewed-by: Simon Glass
    Reviewed-by: Lukasz Majewski
    Signed-off-by: Maxime Ripard

    Maxime Ripard
     
  • We need to select an interface for the usb_ether gadget, and they haven't
    been converted to Kconfig yet. Add a choice to make sure we have an option
    selected, and convert all the users.

    Reviewed-by: Łukasz Majewski
    Reviewed-by: Simon Glass
    Signed-off-by: Maxime Ripard

    Maxime Ripard
     
  • The USB Ethernet gadget option has not yet been moved to Kconfig, let's
    deal with that.

    Reviewed-by: Łukasz Majewski
    Reviewed-by: Simon Glass
    Signed-off-by: Maxime Ripard

    Maxime Ripard
     
  • While the USB Ethernet device address is already defined in Kconfig, the
    host address isn't. Convert it.

    Reviewed-by: Łukasz Majewski
    Reviewed-by: Simon Glass
    Signed-off-by: Maxime Ripard

    Maxime Ripard
     

03 Oct, 2017

5 commits

  • 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: Paul Burton
    Cc: Albert Aribaud
    Cc: Alexey Brodkin
    Cc: Angelo Dureghello
    Cc: Bin Meng
    Cc: Daniel Schwierzeck
    Cc: Macpaul Lin
    Cc: Michal Simek
    Cc: Nobuhiro Iwamatsu
    Cc: Thomas Chou
    Cc: Wolfgang Denk
    Acked-by: Angelo Dureghello
    Tested-by: Angelo Dureghello
    Reviewed-by: Simon Glass
    Reviewed-by: Daniel Schwierzeck

    Paul Burton
     
  • Signed-off-by: Marek Behun

    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

    Marek Behún
     
  • 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: Marek Behun

    create mode 100644 include/u-boot/variadic-macro.h

    Marek Behún
     
  • 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: Marek Behun
    [trini: Move fs/fs_internal.o hunk to the end of fs/Makefile as all
    cases need it]
    Signed-off-by: Tom Rini

    Marek Behún
     
  • This is needed for BTRFS.

    Signed-off-by: Marek Behun

    create mode 100644 lib/crc32c.c

    Marek Behún
     

02 Oct, 2017

2 commits


01 Oct, 2017

3 commits

  • USB endpoint reports the period between consecutive requests to send
    or receive data as bInverval in its endpoint descriptor. So far this
    is ignored by xHCI driver and the 'Interval' field in xHC's endpoint
    context is always programmed to zero which means 1ms for low speed
    or full speed , or 125us for high speed or super speed. We should
    honor the interval by getting it from endpoint descriptor.

    Signed-off-by: Bin Meng

    Bin Meng
     
  • With the root hub unbinding in usb_stop(), there is no need to do
    a Sandbox-specific reset operation. usb_emul_reset() is no longer
    used anywhere, drop it.

    Signed-off-by: Bin Meng

    Bin Meng
     
  • This can be useful outside of the sandbox usb emulation uclass
    driver. Expose it as a public API with a proper prefix (usb_emul_).

    Signed-off-by: Bin Meng

    Bin Meng