summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-4.10-ti-sci-base' of https://github.com/t-kristo/linux-pm ↵Arnd Bergmann2016-11-307-0/+2839
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into next/drivers Merge "ARM: keystone: add TI SCI protocol support for v4.10" from Tero Kristo: [description taken from http://processors.wiki.ti.com/index.php/TISCI Texas Instruments' Keystone generation System on Chips (SoC) starting with 66AK2G02, now include a dedicated SoC System Control entity called PMMC(Power Management Micro Controller) in line with ARM architecture recommendations. The function of this module is to integrate all system operations in a centralized location. Communication with the SoC System Control entity from various processing units like ARM/DSP occurs over Message Manager hardware block. ... Texas Instruments' System Control Interface defines the communication protocol between various processing entities to the System Control Entity on TI SoCs. This is a set of message formats and sequence of operations required to communicate and get system services processed from System Control entity in the SoC.] * 'for-4.10-ti-sci-base' of https://github.com/t-kristo/linux-pm: firmware: ti_sci: Add support for reboot core service firmware: ti_sci: Add support for Clock control firmware: ti_sci: Add support for Device control firmware: Add basic support for TI System Control Interface (TI-SCI) protocol Documentation: Add support for TI System Control Interface (TI-SCI) protocol
| * firmware: ti_sci: Add support for reboot core serviceNishanth Menon2016-10-273-0/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since system controller now has control over SoC power management, it needs to be explicitly requested to reboot the SoC. Add support for it. In some systems however, SoC needs to toggle a GPIO or send event to an external entity (like a PMIC) for a system reboot to take place. To facilitate that, we allow for a DT property to determine if the reboot handler will be registered and further, the service is also made available to other drivers (such as PMIC driver) to sequence the additional operation and trigger the SoC reboot as the last step. Tested-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Tero Kristo <t-kristo@ti.com>
| * firmware: ti_sci: Add support for Clock controlNishanth Menon2016-10-273-0/+1052
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Texas Instrument's System Control Interface (TI-SCI) Message Protocol is used in Texas Instrument's System on Chip (SoC) such as those in keystone family K2G SoC to communicate between various compute processors with a central system controller entity. TI-SCI message protocol provides support for management of various hardware entities within the SoC. Add support driver to allow communication with system controller entity within the SoC using the mailbox client. In general, we expect to function at a device level of abstraction, however, for proper operation of hardware blocks, many clocks directly supplying the hardware block needs to be queried or configured. Introduce support for the set of SCI message protocol support that provide us with this capability. Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Tero Kristo <t-kristo@ti.com>
| * firmware: ti_sci: Add support for Device controlNishanth Menon2016-10-273-0/+622
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Texas Instrument's System Control Interface (TI-SCI) Message Protocol is used in Texas Instrument's System on Chip (SoC) such as those in keystone family K2G SoC to communicate between various compute processors with a central system controller entity. TI-SCI message protocol provides support for management of various hardware entitites within the SoC. Add support driver to allow communication with system controller entity within the SoC using the mailbox client. We introduce the fundamental device management capability support to the driver protocol as part of this change. [d-gerlach@ti.com: Contributed device reset handling] Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Tero Kristo <t-kristo@ti.com>
| * firmware: Add basic support for TI System Control Interface (TI-SCI) protocolNishanth Menon2016-10-276-0/+970
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Texas Instrument's System Control Interface (TI-SCI) Message Protocol is used in Texas Instrument's System on Chip (SoC) such as those in keystone family K2G SoC to communicate between various compute processors with a central system controller entity. TI-SCI message protocol provides support for management of various hardware entities within the SoC. Add support driver to allow communication with system controller entity within the SoC using the mailbox client. We introduce the basic registration and query capability for the driver protocol as part of this change. Subsequent patches add in functionality specific to the TI-SCI features. Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Tero Kristo <t-kristo@ti.com>
| * Documentation: Add support for TI System Control Interface (TI-SCI) protocolNishanth Menon2016-10-272-0/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Texas Instrument's System Control Interface (TI-SCI) Message Protocol is used in Texas Instrument's System on Chip (SoC) such as those in newer SoCs in the keystone processor family starting with K2G. This message protocol is used to communicate between various compute or processing entities (such as ARM, DSP etc.) with a central system controller entity. TI-SCI message protocol provides support for management of various hardware entities within the SoC. The message protocol can be found here: http://processors.wiki.ti.com/index.php/TISCI Signed-off-by: Nishanth Menon <nm@ti.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Tero Kristo <t-kristo@ti.com>
* | Merge tag 'scpi-updates-4.10' of ↵Arnd Bergmann2016-11-304-46/+301
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/drivers Pull "SCPI updates for v4.10" from Sudeep Holla: 1. Adds support for pre-v1.0 SCPI protocol versions 2. Adds support for SCPI used on Amlogic GXBB SoC platforms using the newly added pre-v1.0 SCPI protocol 3. Decouples some platform specific details from generic SCPI binding * tag 'scpi-updates-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scpi: add support for pre-v1.0 SCPI compatible Documentation: bindings: Add support for Amlogic GXBB SCPI protocol Documentation: bindings: add compatible specific to pre v1.0 SCPI protocols Documentation: bindings: decouple juno specific details from generic binding firmware: arm_scpi: allow firmware with get_capabilities not implemented firmware: arm_scpi: add alternative legacy structures, functions and macros firmware: arm_scpi: increase MAX_DVFS_OPPS to 16 entries firmware: arm_scpi: add command indirection to support legacy commands
| * | firmware: arm_scpi: add support for pre-v1.0 SCPI compatibleSudeep Holla2016-11-171-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds new DT match table to setup the support for SCPI protocol versions prior to v1.0 releases. It also adds "arm,scpi-pre-1.0" to the SCPI match entry. Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
| * | Documentation: bindings: Add support for Amlogic GXBB SCPI protocolNeil Armstrong2016-11-171-0/+20
| | | | | | | | | | | | | | | | | | | | | Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> (decoupled from the generic scpi binding) Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
| * | Documentation: bindings: add compatible specific to pre v1.0 SCPI protocolsSudeep Holla2016-11-171-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds specific compatible to support all the unversioned SCPI protocols prior to v1.0 release. This will be applicable for all the implementations using draft versions or modified versions of those draft vesrions of SCPI protocol. Cc: Rob Herring <robh+dt@kernel.org> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
| * | Documentation: bindings: decouple juno specific details from generic bindingSudeep Holla2016-11-172-13/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since SCPI is a generic protocol and the bindings are intended to be generic, we need to decouple all the platform specific binding details out of the generic bindings. This patch moves are the Juno platform specific details into a separate binding document. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
| * | firmware: arm_scpi: allow firmware with get_capabilities not implementedNeil Armstrong2016-11-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | On Amlogic SCPI legacy implementation, the GET_CAPABILITIES command is not supported, failover by using 0.0.0 version. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> [sudeep.holla@arm.com: changed the subject] Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
| * | firmware: arm_scpi: add alternative legacy structures, functions and macrosNeil Armstrong2016-11-011-18/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the Legacy SCPI protocol that is available in very early JUNO versions and shipped Amlogic ARMv8 based SoCs. Some Rockchip SoC are also known to use this version of protocol with extended vendor commands. In order to support the legacy SCPI protocol variant, we need to add the structures and macros definitions that varies against the final SCPI v1.0 specification. We add the indirection table for legacy commands set so that it can co-exist with the standard v1.0 command set. It also adds bitmap field for channel selection since the legacy protocol mandates to send only selected subset of the commands on the high priority channel. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> [sudeep.holla@arm.com: Updated the changelog] Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
| * | firmware: arm_scpi: increase MAX_DVFS_OPPS to 16 entriesNeil Armstrong2016-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Amlogic SoCs supports more than 8 OPPs per domains, we need increase the OPP structure size. This patch increases the MAX_DVFS_OPPS to 16. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
| * | firmware: arm_scpi: add command indirection to support legacy commandsSudeep Holla2016-10-171-14/+57
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Since the legacy SCPI and the SCPI v1.0 differ in the command values, it's better to create some sort of command indirection in the driver to avoid repeated version check at multiple places. This patch adds the indirection command table to allow different values of the command across SCPI versions. [narmstrong@baylibre.com: added cmd check in scpi_send_message] Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
* | Merge tag 'renesas-soc-match-for-v4.10' of ↵Arnd Bergmann2016-11-305-0/+279
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers Merge "Renesas ARM Based SoC Match Updates for v4.10" from Simon Horman: * Identify SoC and register with the SoC bus * tag 'renesas-soc-match-for-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: soc: renesas: Identify SoC and register with the SoC bus ARM: shmobile: Document DT bindings for Product Register Signed-off-by: Arnd Bergmann <arnd@arndb.de>
| * | soc: renesas: Identify SoC and register with the SoC busGeert Uytterhoeven2016-11-234-0/+261
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Identify the SoC type and revision, and register this information with the SoC bus, so it is available under /sys/devices/soc0/, and can be checked where needed using soc_device_match(). Identification is done using the Product Register or Common Chip Code Register, as declared in DT (PRR only for now), or using a hardcoded fallback if missing. Example: Detected Renesas R-Car Gen2 r8a7791 ES1.0 ... # cat /sys/devices/soc0/{machine,family,soc_id,revision} Koelsch R-Car Gen2 r8a7791 ES1.0 Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
| * | ARM: shmobile: Document DT bindings for Product RegisterGeert Uytterhoeven2016-11-231-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add device tree binding documentation for the Product Register (PRR), which provides product and revision information on most Renesas ARM SoCs. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
* | | Merge tag 'soc-device-match-tag1' of ↵Arnd Bergmann2016-11-303-0/+89
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into next/drivers Pull "soc_device_match() interface for matching against soc_bus attributes" from Geert Uytterhoeven: This provides core infrastructure as a dependency for several users (Freescale/NXP, Samsung, Renesas). Its core parts have been acked by Greg, and the fixes by Arnd and/or Greg (the last fix only received an informal ack, that's why I hadn't added the ack). This has already been pulled by Ulf, and is present in mmc/next, as a dependency for a Freescale/NXP driver update. * tag 'soc-device-match-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: base: soc: Provide a dummy implementation of soc_device_match() base: soc: Check for NULL SoC device attributes base: soc: Introduce soc_device_match() interface base: soc: Early register bus when needed
| * | base: soc: Provide a dummy implementation of soc_device_match()Geert Uytterhoeven2016-11-101-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Provide a dummy implementation of soc_device_match(), to allow compiling drivers that may be used on SoCs both with and without CONFIG_SOC_BUS, and for compile testing. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
| * | base: soc: Check for NULL SoC device attributesGeert Uytterhoeven2016-11-101-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If soc_device_match() is used to check the value of a specific attribute that is not present for the current SoC, the kernel crashes with a NULL pointer dereference. Fix this by explicitly checking for the absence of a needed property, and considering this a non-match. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | base: soc: Introduce soc_device_match() interfaceArnd Bergmann2016-11-103-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We keep running into cases where device drivers want to know the exact version of the a SoC they are currently running on. In the past, this has usually been done through a vendor specific API that can be called by a driver, or by directly accessing some kind of version register that is not part of the device itself but that belongs to a global register area of the chip. Common reasons for doing this include: - A machine is not using devicetree or similar for passing data about on-chip devices, but just announces their presence using boot-time platform devices, and the machine code itself does not care about the revision. - There is existing firmware or boot loaders with existing DT binaries with generic compatible strings that do not identify the particular revision of each device, but the driver knows which SoC revisions include which part. - A prerelease version of a chip has some quirks and we are using the same version of the bootloader and the DT blob on both the prerelease and the final version. An update of the DT binding seems inappropriate because that would involve maintaining multiple copies of the dts and/or bootloader. This patch introduces the soc_device_match() interface that is meant to work like of_match_node() but instead of identifying the version of a device, it identifies the SoC itself using a vendor-agnostic interface. Unlike of_match_node(), we do not do an exact string compare but instead use glob_match() to allow wildcards in strings. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | base: soc: Early register bus when neededGeert Uytterhoeven2016-11-101-0/+9
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If soc_device_register() is called before soc_bus_register(), it crashes with a NULL pointer dereference. soc_bus_register() is already a core_initcall(), but drivers/base/ is entered later than e.g. drivers/pinctrl/ and drivers/soc/. Hence there are several subsystems that may need to know SoC revision information, while it's not so easy to initialize the SoC bus even earlier using an initcall. To fix this, let soc_device_register() register the bus early if that hasn't happened yet. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Arnd Bergmann <arnd@arndb.de>
* | Merge tag 'renesas-r8a7745-sysc-for-v4.10' of ↵Arnd Bergmann2016-11-306-0/+63
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers Pull "Renesas ARM Based SoC r8a7745 SYSC Driver Updates for v4.10" from Simon Horman: * Add support for the r8a7745 SoC to rcar-sysc * tag 'renesas-r8a7745-sysc-for-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: soc: renesas: rcar-sysc: add R8A7745 support ARM: shmobile: r8a7745: add power domain index macros Signed-off-by: Arnd Bergmann <arnd@arndb.de>
| * | soc: renesas: rcar-sysc: add R8A7745 supportSergei Shtylyov2016-11-235-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for RZ/G1E (R8A7745) SoC power areas to the R-Car SYSC driver. Based on the original (and large) patch by Dmitry Shifrin <dmitry.shifrin@cogentembedded.com>. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
| * | ARM: shmobile: r8a7745: add power domain index macrosSergei Shtylyov2016-11-231-0/+25
| |/ | | | | | | | | | | | | | | | | | | | | | | Add macros usable by the device tree sources to reference R8A7745 SYSC power domains by index. Based on the original (and large) patch by Dmitry Shifrin <dmitry.shifrin@cogentembedded.com>. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
* | misc: sram: remove useless #ifdefArnd Bergmann2016-11-301-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A recent patch added a new function that is now unused whenever CONFIG_OF is disabled: drivers/misc/sram.c:342:12: error: 'atmel_securam_wait' defined but not used [-Werror=unused-function] There is actually no reason for the #ifdef, because the driver currently cannot be used in a meaningful way without CONFIG_OF, and there is no compile-time dependency. Removing that #ifdef and the respective of_match_ptr() avoids the warning and simplifies the driver slightly. Fixes: 2ae2e28852f2 ("misc: sram: add Atmel securam support") Reviewed-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
* | Merge tag 'davinci-for-v4.10/drivers-2' of ↵Arnd Bergmann2016-11-302-6/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/drivers Pull "DaVinci driver updates for v4.10 (part 2)" from Sekhar Nori: Fixes for drivers already queued to prevent section mismatch warnings introduced by them. * tag 'davinci-for-v4.10/drivers-2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: memory: da8xx-ddrctl: drop the call to of_flat_dt_get_machine_name() bus: da8xx-mstpri: drop the call to of_flat_dt_get_machine_name()
| * | memory: da8xx-ddrctl: drop the call to of_flat_dt_get_machine_name()Bartosz Golaszewski2016-11-231-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | In order to avoid a section mismatch drop the call to of_flat_dt_get_machine_name() when printing the error message. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
| * | bus: da8xx-mstpri: drop the call to of_flat_dt_get_machine_name()Bartosz Golaszewski2016-11-231-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to avoid a section mismatch drop the call to of_flat_dt_get_machine_name() when printing the error message. While we're at it: fix a typo. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
* | | drivers: psci: Allow PSCI node to be disabledThierry Reding2016-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow disabling PSCI support (mostly for testing purposes) by setting the status property to "disabled". This makes the node behave in much the same way as proper device nodes. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
* | | drivers: psci: PSCI checker moduleKevin Brodsky2016-11-253-0/+502
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On arm and arm64, PSCI is one of the possible firmware interfaces used for power management. This includes both turning CPUs on and off, and suspending them (entering idle states). This patch adds a PSCI checker module that enables basic testing of PSCI operations during startup. There are two main tests: CPU hotplugging and suspending. In the hotplug tests, the hotplug API is used to turn off and on again all CPUs in the system, and then all CPUs in each cluster, checking the consistency of the return codes. In the suspend tests, a high-priority thread is created on each core and uses low-level cpuidle functionalities to enter suspend, in all the possible states and multiple times. This should allow a maximum number of CPUs to enter the same sleep state at the same or slightly different time. In essence, the suspend tests use a principle similar to that of the intel_powerclamp driver (drivers/thermal/intel_powerclamp.c), but the threads are only kept for the duration of the test (they are already gone when userspace is started) and it does not require to stop/start the tick. While in theory power management PSCI functions (CPU_{ON,OFF,SUSPEND}) could be directly called, this proved too difficult as it would imply the duplication of all the logic used by the kernel to allow for a clean shutdown/bringup/suspend of the CPU (the deepest sleep states implying potentially the shutdown of the CPU). Note that this file cannot be compiled as a loadable module, since it uses a number of non-exported identifiers (essentially for PSCI-specific checks and direct use of cpuidle) and relies on the absence of userspace to avoid races when calling hotplug and cpuidle functions. For now at least, CONFIG_PSCI_CHECKER is mutually exclusive with CONFIG_TORTURE_TEST, because torture tests may also use hotplug and cause false positives in the hotplug tests. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kevin Hilman <khilman@kernel.org> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: Peter Zijlstra <peterz@infradead.org> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Cc: James Morse <james.morse@arm.com> Cc: Sudeep Holla <sudeep.holla@arm.com> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Acked-by: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> [torture test config] Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com> [lpieralisi: added cpuidle locking, reworded commit log/kconfig entry] Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
* | | Merge tag 'tegra-for-4.10-soc' of ↵Olof Johansson2016-11-182-124/+400
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers soc: tegra: Core SoC changes for v4.10-rc1 This contains mostly cleanup and new feature work on the power management controller as well as the addition of a Kconfig symbol for the new Tegra186 (Parker) SoC generation. * tag 'tegra-for-4.10-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: pmc: Use consistent naming for PM domains soc/tegra: pmc: Remove genpd when adding provider fails soc/tegra: pmc: Check return code for pm_genpd_init() soc/tegra: pmc: Clean-up I/O rail error messages soc/tegra: pmc: Simplify IO rail bit handling soc/tegra: pmc: Guard against uninitialised PMC clock soc/tegra: pmc: Add I/O pad voltage support soc/tegra: pmc: Use consistent ordering of bit definitions soc/tegra: pmc: Correct type of variable for tegra_pmc_readl() soc/tegra: pmc: Use BIT macro for register field definition Signed-off-by: Olof Johansson <olof@lixom.net>
| * | | soc/tegra: pmc: Use consistent naming for PM domainsThierry Reding2016-11-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The various error messages refer to the PM domains as "power domain", "genpd" and "PM domain". That's confusing, so convert all error messages to use the most prominent: "PM domain". Acked-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | | soc/tegra: pmc: Remove genpd when adding provider failsJon Hunter2016-11-151-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 3fe577107ccf ("PM / Domains: Add support for removing PM domains") add support for removing PM domains. Update the Tegra PMC driver to remove PM domains if we fail to add a provider for the PM domain. Please note that the code under 'power_on_cleanup' label does not really belong in the clean-up error path for tegra_powergate_add(). To keep the error path simple, remove this label and move the associated code to where it needs to be invoked. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | | soc/tegra: pmc: Check return code for pm_genpd_init()Jon Hunter2016-11-151-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 7eb231c337e0 ("PM / Domains: Convert pm_genpd_init() to return an error code") updated pm_genpd_init() to return an error code. Update the Tegra PMC driver to check the return value from pm_genpd_init() and handle any errors returned. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> [treding@nvidia.com: use pr_err() instead of dev_err()] Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | | soc/tegra: pmc: Clean-up I/O rail error messagesThierry Reding2016-11-151-23/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use pr_err() instead of dev_err() when the pmc->dev field has not been initialized yet and add a few missing error messages as well as remove duplicate ones. Based on work by Jon Hunter <jonathanh@nvidia.com>. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | | soc/tegra: pmc: Simplify IO rail bit handlingJon Hunter2016-11-151-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function tegra_io_rail_prepare() converts the IO rail ID into a bit position that is used to check the status and control the IO rail in the PMC registers. However, rather than converting to a bit position it is more useful to convert to a bit-mask because this is what is actually used. By doing so the BIT() marco only needs to be used once and we can use the IO_DPD_REQ_CODE_MASK when checking for erroneous rail IDs. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> [treding@nvidia.com: rebase and rename bit -> mask] Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | | soc/tegra: pmc: Guard against uninitialised PMC clockJon Hunter2016-11-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is possible for the public functions, tegra_io_rail_power_on/off() to be called before the PMC device has been probed. If this happens then the pmc->clk member will not be initialised and the call to clk_get_rate() in tegra_io_rail_prepare() will return zero and lead to a divide-by-zero exception. The function clk_get_rate() will return zero if a NULl clk pointer is passed. Therefore, rather that checking if pmc->clk is initialised, fix this by checking the return value for clk_get_rate() to make sure it is not zero. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | | soc/tegra: pmc: Add I/O pad voltage supportLaxman Dewangan2016-11-152-67/+332
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I/O pins on Tegra SoCs are grouped into so-called I/O pads. Each such pad can be used to control the common voltage signal level and power state of the pins in the given pad. I/O pads can be powered down even if the system is active, which can save power from that I/O interface. For SoC generations prior to Tegra124 the I/O pad voltage is automatically detected and hence the system software doesn't need to configure it. However, starting with Tegra210 the detection logic has been removed, so explicit control of the I/O pad voltage by system software is required. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | | soc/tegra: pmc: Use consistent ordering of bit definitionsThierry Reding2016-11-151-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bit definitions are sorted in decreasing order by offset. Apply the same ordering to all definitions. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | | soc/tegra: pmc: Correct type of variable for tegra_pmc_readl()Laxman Dewangan2016-11-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function tegra_pmc_readl() returns the u32 type data and hence change the data type of variable where this data is stored to u32 type. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | | soc/tegra: pmc: Use BIT macro for register field definitionLaxman Dewangan2016-11-151-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use BIT macro for register field definition and make constant as U when using in shift operator like (3 << 30) to (3U << 30) Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
* | | | Merge tag 'tegra-for-4.10-bus' of ↵Olof Johansson2016-11-184-0/+424
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers bus: Add Tegra GMI support This provides a driver to enable the use of the Generic Memory Interface found on Tegra SoCs that can host various types of high-speed devices. * tag 'tegra-for-4.10-bus' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: bus: Add support for Tegra Generic Memory Interface dt/bindings: Add bindings for Tegra GMI controller Signed-off-by: Olof Johansson <olof@lixom.net>
| * | | | bus: Add support for Tegra Generic Memory InterfaceMirza Krak2016-11-153-0/+292
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Generic Memory Interface bus can be used to connect high-speed devices such as NOR flash, FPGAs, DSPs... Signed-off-by: Mirza Krak <mirza.krak@gmail.com> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Colibri T20/T30 on EvalBoard V3.x and GMI-Memory Board Acked-by: Jon Hunter <jonathanh@nvidia.com> [treding@nvidia.com: symmetry and coding style OCD] Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | | | dt/bindings: Add bindings for Tegra GMI controllerMirza Krak2016-11-151-0/+132
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Document the devicetree bindings for the Generic Memory Interface (GMI) bus driver found on Tegra SOCs. Signed-off-by: Mirza Krak <mirza.krak@gmail.com> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Colibri T20/T30 on EvalBoard V3.x and GMI-Memory Board Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
* | | | Merge tag 'tegra-for-4.10-reset' of ↵Olof Johansson2016-11-185-0/+76
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers reset: Add Tegra BPMP reset driver This contains a patch which implements a reset driver using the services provided by the BPMP firmware (via the MRQ_RESET request). * tag 'tegra-for-4.10-reset' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: reset: Add Tegra BPMP reset driver Signed-off-by: Olof Johansson <olof@lixom.net>
| * | | | reset: Add Tegra BPMP reset driverThierry Reding2016-11-185-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver uses the services provided by the BPMP firmware driver to implement a reset driver based on the MRQ_RESET request. Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | | | Merge branch 'for-4.10/firmware' into for-4.10/resetThierry Reding2016-11-1819-0/+5327
| |\ \ \ \ | | |/ / / | |/| | |
* | | | | Merge tag 'tegra-for-4.10-firmware' of ↵Olof Johansson2016-11-1813-0/+4747
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers firmware: Add Tegra IVC and BPMP support IVC is an inter-processor communication protocol that uses shared memory to exchange data between processors. The BPMP driver makes use of this to communicate with the Boot and Power Management Processor (BPMP) and uses an additional hardware synchronization primitive from the HSP block to signal availability of new data (doorbell). Firmware running on the BPMP implements a number of services such as the control of clocks and resets within the system, or the ability to ungate or gate power partitions. * tag 'tegra-for-4.10-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: dt-bindings: firmware: Allow child nodes inside the Tegra BPMP dt-bindings: Add power domains to Tegra BPMP firmware firmware: tegra: Add BPMP support firmware: tegra: Add IVC library dt-bindings: firmware: Add bindings for Tegra BPMP Signed-off-by: Olof Johansson <olof@lixom.net>