06 Feb, 2020

1 commit

  • 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
     

29 Jun, 2019

1 commit


15 Nov, 2018

1 commit

  • When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be
    bound before relocation. However due to a bug in the DM core,
    the flag only takes effect when devices are statically declared
    via U_BOOT_DEVICE(). This bug has been fixed recently by commit
    "dm: core: Respect drivers with the DM_FLAG_PRE_RELOC flag in
    lists_bind_fdt()", but with the fix, it has a side effect that
    all existing drivers that declared DM_FLAG_PRE_RELOC flag will
    be bound before relocation now. This may expose potential boot
    failure on some boards due to insufficient memory during the
    pre-relocation stage.

    To mitigate this potential impact, the following changes are
    implemented:

    - Remove DM_FLAG_PRE_RELOC flag in the driver, if the driver
    only supports configuration from device tree (OF_CONTROL)
    - Keep DM_FLAG_PRE_RELOC flag in the driver only if the device
    is statically declared via U_BOOT_DEVICE()
    - Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check, for
    drivers that support both statically declared devices and
    configuration from device tree

    Signed-off-by: Bin Meng
    Reviewed-by: Simon Glass

    Bin Meng
     

08 May, 2018

6 commits


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
     

15 Oct, 2017

2 commits


20 Aug, 2017

1 commit


26 Jul, 2017

1 commit

  • It has been a while since ARM Trusted Firmware supported UniPhier SoC
    family. U-Boot SPL was intended as a temporary loader that runs in
    secure world. It is a maintenance headache to support two different
    boot mechanisms. Secure firmware is realm of ARM Trusted Firmware
    and now U-Boot only serves as a non-secure boot loader for UniPhier
    ARMv8 SoCs.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

01 Jun, 2017

3 commits

  • It is good practice to include common.h as the first header. This ensures
    that required features like the DECLARE_GLOBAL_DATA_PTR macro,
    configuration options and common types are available.

    Fix up some files which currently don't do this. This is necessary because
    driver model will soon start using global data and configuration in the
    dm/read.h header file, included via dm.h. The gd->fdt_blob value will be
    used to access the device tree and CONFIG options will be used to
    determine whether to support inline functions in the header file.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • These support the flat device tree. We want to use the dev_read_..()
    prefix for functions that support both flat tree and live tree. So rename
    the existing functions to avoid confusion.

    In the end we will have:

    1. dev_read_addr...() - works on devices, supports flat/live tree
    2. devfdt_get_addr...() - current functions, flat tree only
    3. of_get_address() etc. - new functions, live tree only

    All drivers will be written to use 1. That function will in turn call
    either 2 or 3 depending on whether the flat or live tree is in use.

    Note this involves changing some dead code - the imx_lpi2c.c file.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • This header includes things that are needed to make driver build. Adjust
    existing users to include that always, even if other dm/ includes are
    present

    Signed-off-by: Simon Glass

    Simon Glass
     

23 Feb, 2017

1 commit

  • Support the following DT properties:
    "bias-disable"
    "bias-pull-up"
    "bias-pull-down"
    "bias-pull-pin-default"
    "input-enable"
    "input-disable"

    My main motivation is to support pull up/down biasing. For Pro5 and
    later SoCs, the pupdctrl register number is the same as the pinmux
    number, so this feature can be supported without having big pin
    tables.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

22 Jan, 2017

1 commit


18 Jan, 2017

1 commit


18 Oct, 2016

1 commit

  • Marek reports warnings in UniPhier pinctrl drivers when compiled by
    GCC 6.x, like:

    drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c:58:18: warning:
    'usb3_muxvals' defined but not used [-Wunused-const-variable=]
    static const int usb3_muxvals[] = {0, 0};
    ^~~~~~~~~~~~

    My intention here is to compile minimum set of pin data for SPL to
    save memory footprint, but GCC these days is clever enough to notice
    unused data arrays.

    We can fix it by sprinkling around __maybe_unused on those arrays,
    but I did not do that because they are counterparts of the pinctrl
    drivers in Linux. All the pin data were just copy-pasted from Linux
    and are kept in sync for maintainability.

    I chose a bit tricky way to fix the issue; calculate ARRAY_SIZE of
    *_pins and *_muxvals and set their sum to an unused struct member.
    This trick will satisfy GCC because the data arrays are used anyway,
    but such data arrays will be dropped from the final binary because
    the pointers to them are not used.

    Signed-off-by: Masahiro Yamada
    Reported-by: Marek Vasut

    Masahiro Yamada
     

18 Sep, 2016

2 commits


14 Sep, 2016

2 commits


23 Jul, 2016

1 commit


02 Jul, 2016

5 commits


30 Jun, 2016

3 commits


24 Apr, 2016

2 commits


31 Mar, 2016

4 commits

  • The pinmux of PH1-LD11 is almost a subset of that of PH1-LD20
    (as far as used in boot-loader), so this commit makes the driver
    shared between the two SoCs.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • Add pin configuration and pinmux support for UniPhier PH1-LD20 SoC.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • Upcoming new pinctrl drivers for PH1-LD11 and PH-LD20 support input
    signal gating for each pin. (While, existing ones only support it
    per pin-group.) This commit prepares the core part for that.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • The core part of the UniPhier pinctrl driver needs to support a new
    capability for upcoming UniPhier ARMv8 SoCs. This sometimes happens
    because pinctrl drivers include really SoC-specific stuff.

    This commit intends to tidy up SoC-specific parameters of the existing
    drivers before adding new ones. Having flags would be better than
    adding new members every time a new SoC-specific capability comes up.

    At this time, there is one flag, UNIPHIER_PINCTRL_CAPS_DBGMUX_SEPARATE.
    This capability (I'd say rather quirk) was added for PH1-Pro4 and
    PH1-Pro5 as requirement from our customer. For those SoCs, one pin-mux
    setting is controlled by the combination of two separate registers; the
    LSB bits at register offset (8 * N) and the MSB bits at (8 * N + 4).
    Because it is impossible to update two separate registers atomically,
    the LOAD_PINCTRL register should be set in order to make the pin-mux
    settings really effective.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada