14 May, 2020

4 commits

  • Enable building vexpress-config driver as a module.

    Cc: Lorenzo Pieralisi
    Cc: Linus Walleij
    Cc: Greg Kroah-Hartman
    Reviewed-by: Sudeep Holla
    Acked-by: Liviu Dudau
    Signed-off-by: Rob Herring

    Rob Herring
     
  • There's only a single caller of vexpress_config_set_master() from
    vexpress-sysreg.c. Let's just make the registers needed available to
    vexpress-config and move all the code there. The registers needed aren't
    used anywhere else either. With this, we can get rid of the private API
    between these 2 drivers.

    Cc: Lorenzo Pieralisi
    Cc: Linus Walleij
    Cc: Greg Kroah-Hartman
    Acked-by: Liviu Dudau
    Acked-by: Sudeep Holla
    Acked-by: Lee Jones
    Signed-off-by: Rob Herring

    Rob Herring
     
  • The vexpress-config initialization is dependent on the vexpress-syscfg
    driver probing. As vexpress-config was not a driver, deferred probe
    could not be used and instead initcall ordering was relied upon. This is
    fragile and doesn't work for modules.

    Let's move the config bus init into the vexpress-syscfg probe. This
    eliminates the initcall ordering requirement and the need to create a
    struct device and the "vexpress-config" class.

    Cc: Lorenzo Pieralisi
    Cc: Linus Walleij
    Cc: Arnd Bergmann
    Cc: Greg Kroah-Hartman
    Reviewed-by: Sudeep Holla
    Acked-by: Liviu Dudau
    Signed-off-by: Rob Herring

    Rob Herring
     
  • The only thing that vexpress-syscfg does is provide a regmap to
    vexpress-config bus child devices. There's little reason to have 2
    components for this. The current structure with initcall ordering
    requirements makes turning these components into modules more difficult.

    So let's start to simplify things and merge vexpress-syscfg into
    vexpress-config. There's no functional change in this commit and it's
    still separate components until subsequent commits.

    Cc: Lorenzo Pieralisi
    Cc: Linus Walleij
    Cc: Arnd Bergmann
    Reviewed-by: Sudeep Holla
    Acked-by: Greg Kroah-Hartman
    Acked-by: Liviu Dudau
    Signed-off-by: Rob Herring

    Rob Herring
     

31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation this program is
    distributed in the hope that it will be useful but without any
    warranty without even the implied warranty of merchantability or
    fitness for a particular purpose see the gnu general public license
    for more details

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 655 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Kate Stewart
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070034.575739538@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

01 Dec, 2016

1 commit


08 Aug, 2016

1 commit


01 Feb, 2016

1 commit

  • for_each_compatible_node performs an of_node_get on each iteration, so
    to break out of the loop an of_node_put is required.

    Found using Coccinelle. The semantic patch used for this is as follows:

    //
    @@
    expression e;
    local idexpression n;
    @@

    for_each_compatible_node(n, ...) {
    ... when != of_node_put(n)
    when != e = n
    (
    return n;
    + of_node_put(n);
    ? return ...;
    )
    ...
    }
    //

    Acked-by: Liviu Dudau
    Signed-off-by: Amitoj Kaur Chawla
    Signed-off-by: Sudeep Holla

    Amitoj Kaur Chawla
     

07 Aug, 2015

1 commit


27 May, 2014

1 commit

  • The versatile express changes for 3.16 introduced a number of
    build regressions for randconfig kernels by not tracking dependencies
    between the components right.

    This patch tries to rectify that:

    * the mach-vexpress code cannot link without the syscfg driver,
    which in turn needs MFD_VEXPRESS_SYSREG
    * various drivers call devm_regmap_init_vexpress_config(), which
    has to be exported so it can be used by loadable modules
    * the configuration bus uses OF DT helper functions that are not
    available to platforms disable CONFIG_OF
    * The sysreg driver exports GPIOs through gpiolib, which can
    be disabled on some platforms.
    * The clocksource code cannot be built on platforms that don't
    use modern timekeeping but rely on gettimeoffset.

    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     

16 May, 2014

1 commit

  • Components of the Versatile Express platform (configuration
    microcontrollers on motherboard and daughterboards in particular)
    talk to each other over a custom configuration bus. They
    provide miscellaneous functions (from clock generator control
    to energy sensors) which are represented as platform devices
    (and Device Tree nodes). The transactions on the bus can
    be generated by different "bridges" in the system, some
    of which are universal for the whole platform (for the price
    of high transfer latencies), others restricted to a subsystem
    (but much faster).

    Until now drivers for such functions were using custom "func"
    API, which is being replaced in this patch by regmap calls.
    This required:

    * a rework (and move to drivers/bus directory, as suggested
    by Samuel and Arnd) of the config bus core, which is much
    simpler now and uses device model infrastructure (class)
    to keep track of the bridges; non-DT case (soon to be
    retired anyway) is simply covered by a special device
    registration function

    * the new config-bus driver also takes over device population,
    so there is no need for special matching table for
    of_platform_populate nor "simple-bus" hack in the arm64
    model dtsi file (relevant bindings documentation has
    been updated); this allows all the vexpress devices
    fit into normal device model, making it possible
    to remove plenty of early inits and other hacks in
    the near future

    * adaptation of the syscfg bridge implementation in the
    sysreg driver, again making it much simpler; there is
    a special case of the "energy" function spanning two
    registers, where they should be both defined in the tree
    now, but backward compatibility is maintained in the code

    * modification of the relevant drivers:

    * hwmon - just a straight-forward API change
    * power/reset driver - API change
    * regulator - API change plus error handling
    simplification
    * osc clock driver - this one required larger rework
    in order to turn in into a standard platform driver

    Signed-off-by: Pawel Moll
    Acked-by: Mark Brown
    Acked-by: Lee Jones
    Acked-by: Guenter Roeck
    Acked-by: Mike Turquette

    Pawel Moll