08 Feb, 2018

12 commits


07 Feb, 2018

2 commits


06 Feb, 2018

14 commits

  • On detach UBI attempts to update fastmap after closing user interfaces
    but at this point UBI volumes have already been free()'ed and fastmap
    can no longer access these data structures.

    Signed-off-by: Martin Townsend
    Cc: hs@denx.de
    Cc: kmpark@infradead.org
    Cc: richard@sigma-star.at

    Martin Townsend
     
  • For '#ifndef CONFIG_DM_I2C' twsi_i2c_init() passes NULL as
    4th parameter to __twsi_i2c_init().

    Identified with cppcheck.

    Signed-off-by: Heinrich Schuchardt

    Heinrich Schuchardt
     
  • Simplify the driver logic by extracting a common send_buffer method.

    Signed-off-by: Mario Six

    Mario Six
     
  • Make the ihs_i2c driver DM-compatible; for legacy boards, the old functions are
    retained within #ifdefs.

    No board uses the new DM driver yet; this patch only lays the foundation for
    future support.

    Signed-off-by: Mario Six

    Mario Six
     
  • Prepare the function interface of the ihs_i2c driver for DM conversion
    in a future patch.

    While we're at it, fix some style violations, and make the code more readable.

    Signed-off-by: Mario Six

    Mario Six
     
  • Make the fsl_i2c driver compatible with a live device tree.

    Reviewed-by: Heiko Schocher
    Signed-off-by: Mario Six

    Mario Six
     
  • Some functions in the fsl_i2c driver are declared as inline, even though
    they are quite large, which needlessly increases the size of the
    resulting binary.

    This patch removes the inline declarations.

    Reviewed-by: Heiko Schocher
    Signed-off-by: Mario Six

    Mario Six
     
  • Fix some style violations in the fsl_i2c I2C driver, and use shorter
    type names for variables in some cases.

    Reviewed-by: Heiko Schocher
    Signed-off-by: Mario Six

    Mario Six
     
  • 'default' on a choice refers to the symbol selected by default, not to
    the choice mode, so 'default n' is meaningless.

    No functional changes. Optional choices implicitly default to n mode
    (and there is no way to make them default to another mode).

    Discovered in Kconfiglib (https://github.com/ulfalizer/Kconfiglib),
    which prints the following warning:

    warning: the default selection n (undefined) of (defined at drivers/usb/ulpi/Kconfig:3) is not contained in the choice

    I've added a corresponding warning to the C tools too, which is
    currently in linux-next: https://patchwork.kernel.org/patch/9983667/

    Signed-off-by: Ulf Magnusson

    Ulf Magnusson
     
  • There is no EMMC symbol in the "enable different boot versions for the
    shc board" choice. SHC_EMMC was probably intended.

    No functional changes. Kconfig choices fall back on using the first
    (visible) symbol in the choice as the default if the default symbol is
    not visible.

    Discovered in Kconfiglib (https://github.com/ulfalizer/Kconfiglib),
    which prints the following warning:

    warning: the default selection EMMC (undefined) of (defined at board/bosch/shc/Kconfig:15) is not contained in the choice

    I've added a corresponding warning to the C tools too, which is
    currently in linux-next: https://patchwork.kernel.org/patch/9983667/

    Signed-off-by: Ulf Magnusson

    Ulf Magnusson
     
  • FreeBSD, like OpenBSD, uses BIG_ENDIAN, LITTLE_ENDIAN, and BYTE_ORDER,
    whereas Linux and compatibles use __-prefixed names. Define the names
    the same as the OpenBSD block below it.

    Justin Hibbits
     
  • cmd/Makefile has:

    ifdef CONFIG_FPGA
    obj-$(CONFIG_CMD_FPGA) += fpga.o
    endif

    which means that if CONFIG_FPGA is not set, CONFIG_CMD_FPGA silently
    does nothing. Let's remove that Makefile conditional and instead express
    this equivalent dependency in Kconfig, so a lot of redundant

    # CONFIG_CMD_FPGA is not set

    can be removed from board defconfigs that don't actually have an FPGA.

    Signed-off-by: Tuomas Tynkkynen

    Tuomas Tynkkynen
     
  • These are declared in Kconfig, but some #defines have crept in.

    CONFIG_FPGA
    CONFIG_FPGA_ALTERA
    CONFIG_FPGA_CYCLON2
    CONFIG_FPGA_SOCFPGA
    CONFIG_FPGA_XILINX
    CONFIG_FPGA_ZYNQMPPL

    Signed-off-by: Tuomas Tynkkynen

    Tuomas Tynkkynen
     
  • In most places in the code we cast this to an unsigned long, but in one
    place we cast to an unsigned int. For consistency and to fix a warning
    on 64bit targets, always cast this to unsigned long. For the long term
    we should however change the declaration of dma_buf.

    Cc: Philipp Tomsich
    Acked-by: Lukasz Majewski
    Acked-by: Marek Vasut
    Signed-off-by: Tom Rini

    Tom Rini
     

05 Feb, 2018

6 commits


04 Feb, 2018

6 commits

  • Tom Rini
     
  • Tom Rini
     
  • This patch adds a sec_init call into arch_misc_init(). Doing so in
    conjunction with the patch "drivers/crypto/fsl: assign job-rings to
    non-TrustZone" enables use of the CAAM in Linux when OPTEE/TrustZone is
    active.

    u-boot will initialise the RNG and assign ownership of the job-ring
    registers to a non-TrustZone context. With recent changes by Lukas Auer to
    fully initialize the RNG in sec_init() this means that u-boot will hand-off
    the CAAM in a state that Linux then can use the CAAM without touching the
    reserved DECO registers.

    This change is safe both for the OPTEE/TrustZone boot path and the regular
    non-OPTEE/TrustZone boot path.

    Signed-off-by: Bryan O'Donoghue
    Cc: Fabio Estevam
    Cc: Peng Fan
    Cc: Marco Franchi
    Cc: Vanessa Maegima
    Cc: Stefano Babic
    Cc: Lukas Auer
    Tested-by: Lukas Auer
    Reviewed-by: Fabio Estevam

    Bryan O'Donoghue
     
  • After enabling TrustZone various parts of the CAAM silicon become
    inaccessible to non TrustZone contexts. The job-ring registers are designed
    to allow non TrustZone contexts like Linux to still submit jobs to CAAM
    even after TrustZone has been enabled.

    The default job-ring permissions after the BootROM look like this for
    job-ring zero.

    ms=0x00008001 ls=0x00008001

    The MS field is JRaMIDR_MS (job ring MID most significant).

    Referring to "Security Reference Manual for i.MX 7Dual and 7Solo
    Applications Processors, Rev. 0, 03/2017" section 8.10.4 we see that
    JROWN_NS controls whether or not a job-ring is accessible from non
    TrustZone.

    Bit 15 (TrustZone) is the logical inverse of bit 3 hence the above value of
    0x8001 shows that JROWN_NS=0 and TrustZone=1.

    Clearly then as soon as TrustZone becomes active the job-ring registers are
    no longer accessible from Linux, which is not what we want.

    This patch explicitly sets all job-ring registers to JROWN_NS=1 (non
    TrustZone) by default and to the Non-Secure MID 001. Both settings are
    required to successfully assign a job-ring to non-secure mode. If a piece
    of TrustZone firmware requires ownership of job-ring registers it can unset
    the JROWN_NS bit itself.

    This patch in conjunction with a modification of the Linux kernel to skip
    HWRNG initialisation makes CAAM usable to Linux with TrustZone enabled.

    Signed-off-by: Bryan O'Donoghue
    Cc: Fabio Estevam
    Cc: Peng Fan
    Cc: Alex Porosanu
    Cc: Ruchika Gupta
    Cc: Aneesh Bansal
    Link: https://github.com/OP-TEE/optee_os/issues/1408
    Link: https://tinyurl.com/yam5gv9a
    Tested-by: Lukas Auer

    Bryan O'Donoghue
     
  • We should take the MX6DP and MX6QP options in consideration
    in the I2C_PADS_INFO macro.

    Based on a patch by Pierluigi Passaro

    Signed-off-by: Eran Matityahu
    Reviewed-by: Fabio Estevam

    Eran Matityahu
     
  • We should take the MX6DP and MX6QP options in consideration
    when defining imx_iomux_v3_setup_pad().

    Based on a patch by Pierluigi Passaro

    Signed-off-by: Eran Matityahu
    Reviewed-by: Fabio Estevam

    Eran Matityahu