summaryrefslogtreecommitdiff
path: root/drivers/memory
AgeCommit message (Collapse)Author
2020-08-03Merge tag 'pm-5.9-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "The most significant change here is the extension of the Energy Model to cover non-CPU devices (as well as CPUs) from Lukasz Luba. There is also some new hardware support (Ice Lake server idle states table for intel_idle, Sapphire Rapids and Power Limit 4 support in the RAPL driver), some new functionality in the existing drivers (eg. a new switch to disable/enable CPU energy-efficiency optimizations in intel_pstate, delayed timers in devfreq), some assorted fixes (cpufreq core, intel_pstate, intel_idle) and cleanups (eg. cpuidle-psci, devfreq), including the elimination of W=1 build warnings from cpufreq done by Lee Jones. Specifics: - Make the Energy Model cover non-CPU devices (Lukasz Luba). - Add Ice Lake server idle states table to the intel_idle driver and eliminate a redundant static variable from it (Chen Yu, Rafael Wysocki). - Eliminate all W=1 build warnings from cpufreq (Lee Jones). - Add support for Sapphire Rapids and for Power Limit 4 to the Intel RAPL power capping driver (Sumeet Pawnikar, Zhang Rui). - Fix function name in kerneldoc comments in the idle_inject power capping driver (Yangtao Li). - Fix locking issues with cpufreq governors and drop a redundant "weak" function definition from cpufreq (Viresh Kumar). - Rearrange cpufreq to register non-modular governors at the core_initcall level and allow the default cpufreq governor to be specified in the kernel command line (Quentin Perret). - Extend, fix and clean up the intel_pstate driver (Srinivas Pandruvada, Rafael Wysocki): * Add a new sysfs attribute for disabling/enabling CPU energy-efficiency optimizations in the processor. * Make the driver avoid enabling HWP if EPP is not supported. * Allow the driver to handle numeric EPP values in the sysfs interface and fix the setting of EPP via sysfs in the active mode. * Eliminate a static checker warning and clean up a kerneldoc comment. - Clean up some variable declarations in the powernv cpufreq driver (Wei Yongjun). - Fix up the ->enter_s2idle callback definition to cover the case when it points to the same function as ->idle correctly (Neal Liu). - Rearrange and clean up the PSCI cpuidle driver (Ulf Hansson). - Make the PM core emit "changed" uevent when adding/removing the "wakeup" sysfs attribute of devices (Abhishek Pandit-Subedi). - Add a helper macro for declaring PM callbacks and use it in the MMC jz4740 driver (Paul Cercueil). - Fix white space in some places in the hibernate code and make the system-wide PM code use "const char *" where appropriate (Xiang Chen, Alexey Dobriyan). - Add one more "unsafe" helper macro to the freezer to cover the NFS use case (He Zhe). - Change the language in the generic PM domains framework to use parent/child terminology and clean up a typo and some comment fromatting in that code (Kees Cook, Geert Uytterhoeven). - Update the operating performance points OPP framework (Lukasz Luba, Andrew-sh.Cheng, Valdis Kletnieks): * Refactor dev_pm_opp_of_register_em() and update related drivers. * Add a missing function export. * Allow disabled OPPs in dev_pm_opp_get_freq(). - Update devfreq core and drivers (Chanwoo Choi, Lukasz Luba, Enric Balletbo i Serra, Dmitry Osipenko, Kieran Bingham, Marc Zyngier): * Add support for delayed timers to the devfreq core and make the Samsung exynos5422-dmc driver use it. * Unify sysfs interface to use "df-" as a prefix in instance names consistently. * Fix devfreq_summary debugfs node indentation. * Add the rockchip,pmu phandle to the rk3399_dmc driver DT bindings. * List Dmitry Osipenko as the Tegra devfreq driver maintainer. * Fix typos in the core devfreq code. - Update the pm-graph utility to version 5.7 including a number of fixes related to suspend-to-idle (Todd Brandt). - Fix coccicheck errors and warnings in the cpupower utility (Shuah Khan). - Replace HTTP links with HTTPs ones in multiple places (Alexander A. Klimov)" * tag 'pm-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (71 commits) cpuidle: ACPI: fix 'return' with no value build warning cpufreq: intel_pstate: Fix EPP setting via sysfs in active mode cpufreq: intel_pstate: Rearrange the storing of new EPP values intel_idle: Customize IceLake server support PM / devfreq: Fix the wrong end with semicolon PM / devfreq: Fix indentaion of devfreq_summary debugfs node PM / devfreq: Clean up the devfreq instance name in sysfs attr memory: samsung: exynos5422-dmc: Add module param to control IRQ mode memory: samsung: exynos5422-dmc: Adjust polling interval and uptreshold memory: samsung: exynos5422-dmc: Use delayed timer as default PM / devfreq: Add support delayed timer for polling mode dt-bindings: devfreq: rk3399_dmc: Add rockchip,pmu phandle PM / devfreq: tegra: Add Dmitry as a maintainer PM / devfreq: event: Fix trivial spelling PM / devfreq: rk3399_dmc: Fix kernel oops when rockchip,pmu is absent cpuidle: change enter_s2idle() prototype cpuidle: psci: Prevent domain idlestates until consumers are ready cpuidle: psci: Convert PM domain to platform driver cpuidle: psci: Fix error path via converting to a platform driver cpuidle: psci: Fail cpuidle registration if set OSI mode failed ...
2020-08-03Merge tag 'spi-v5.9' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "A fairly quiet release for SPI, nothing really going on in the core although there's been quite a bit of driver related activity. This includes the addition of some shared code in drivers/memory for the Renesas RPC-IF which is used by a newly added SPI driver, the memory subsystem doesn't seem to have a fixed maintainer at the minute and this seemed like the most sensible way to get that hardware supported. - Quite a few cleanups and optimizations for the Altera, Qualcomm GENI, sun6i and lantiq drivers. - Several more GPIO descriptor conversions. - Move the Cadence QuadSPI driver from drivers/mtd to drivers/spi. - New support for Mediatek MT8192 and Renesas RPC-IF, R8A7742 and R8A774e1" * tag 'spi-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (119 commits) dt-bindings: lpspi: New property in document DT bindings for LPSPI spi: lpspi: fix using CS discontinuously on i.MX8DXLEVK spi: lpspi: remove unused fsl_lpspi->chipselect spi: lpspi: Fix kernel warning dump when probe fail after calling spi_register spi: rockchip: Fix error in SPI slave pio read spi: rockchip: Support 64-location deep FIFOs spi: rockchip: Config spi rx dma burst size depend on xfer length spi: spi-topcliff-pch: drop call to wakeup-disable spi: spidev: Align buffers for DMA spi: correct kernel-doc inconsistency spi: sun4i: update max transfer size reported spi: imx: enable runtime pm support spi: update bindings for MT8192 SoC spi: mediatek: add spi support for mt8192 IC spi: Add bindings for Lightning Mountain SoC spi: lantiq: Add support to Lightning Mountain SoC spi: lantiq: Move interrupt configuration to SoC specific data structure spi: lantiq: Add fifo size bit mask in SoC specific data structure spi: lantiq: Add support to acknowledge interrupt spi: lantiq: Move interrupt control register offesets to SoC specific data structure ...
2020-07-31Merge tag 'memory-controller-drv-5.9-2' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers Memory controller drivers for v5.9, part 2 1. Minor cleanups and fixes of multiple memory controller drivers, mostly around code quality and readability, 2. Add Git repository to drivers/memory entry in MAINTAINERS, 3. Allow MIPS jz4780 FUSE driver to probe by removing conflicting memory region with jz4780_nemc. * tag 'memory-controller-drv-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: jz4780_nemc: Only request IO memory the driver will use MAINTAINERS: Add Git repository for memory controller drivers memory: brcmstb_dpfe: Fix language typo memory: samsung: exynos5422-dmc: Correct white space issues memory: samsung: exynos-srom: Correct alignment memory: pl172: Enclose macro argument usage in parenthesis memory: of: Correct kerneldoc memory: omap-gpmc: Fix language typo memory: omap-gpmc: Correct white space issues memory: omap-gpmc: Use 'unsigned int' for consistency memory: omap-gpmc: Enclose macro argument usage in parenthesis memory: omap-gpmc: Correct kerneldoc memory: mvebu-devbus: Align with open parenthesis memory: mvebu-devbus: Add missing braces to all arms of if statement memory: bt1-l2-ctl: Add blank lines after declarations Link: https://lore.kernel.org/r/20200729163008.5820-1-krzk@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-07-30memory: samsung: exynos5422-dmc: Add module param to control IRQ modeLukasz Luba
The driver can operate in two modes relaying on devfreq monitoring mechanism which periodically checks the device status or it can use interrupts when they are provided by loaded Device Tree. The newly introduced module parameter can be used to choose between devfreq monitoring and internal interrupts without modifying the Device Tree. It also sets devfreq monitoring as default when the parameter is not set (also the case for default when the driver is not built as a module). Reported-by: Willy Wolff <willy.mh.wolff.ml@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2020-07-30memory: samsung: exynos5422-dmc: Adjust polling interval and uptresholdLukasz Luba
In order to react faster and make better decisions under some workloads, benchmarking the memory subsystem behavior, adjust the polling interval and upthreshold value used by the simple_ondemand governor. Reported-by: Willy Wolff <willy.mh.wolff.ml@gmail.com> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2020-07-30memory: samsung: exynos5422-dmc: Use delayed timer as defaultChanwoo Choi
Use delayed timer as default instead of deferrable timer in order to monitor the DMC status regardless of CPU idle. Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2020-07-28memory: jz4780_nemc: Only request IO memory the driver will usePaul Cercueil
The driver only uses the registers up to offset 0x54. Since the EFUSE registers are in the middle of the NEMC registers, we only request the registers we will use for now - that way the EFUSE driver can probe too. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Tested-by: H. Nikolaus Schaller <hns@goldelico.com> Link: https://lore.kernel.org/r/20200728152629.28878-1-paul@crapouillou.net Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-27memory: brcmstb_dpfe: Fix language typoKrzysztof Kozlowski
Fix firwmare -> firmware. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
2020-07-27memory: samsung: exynos5422-dmc: Correct white space issuesKrzysztof Kozlowski
Remove unneeded blank line and align indentation with open parenthesis. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-27memory: samsung: exynos-srom: Correct alignmentKrzysztof Kozlowski
Align indentation with open parenthesis (or fix existing alignment). Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-27memory: pl172: Enclose macro argument usage in parenthesisKrzysztof Kozlowski
Macros arguments should be enclosed by parenthesis for safety. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-27memory: of: Correct kerneldocKrzysztof Kozlowski
Use proper kerneldoc to fix GCC warnings like: drivers/memory/of_memory.c:30: warning: Function parameter or member 'dev' not described in 'of_get_min_tck' Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-27memory: omap-gpmc: Fix language typoKrzysztof Kozlowski
Fix arbitary -> arbitrary. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-27memory: omap-gpmc: Correct white space issuesKrzysztof Kozlowski
Remove some unneeded blank lines, align indentation with open parenthesis (or fix existing alignment). Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-27memory: omap-gpmc: Use 'unsigned int' for consistencyKrzysztof Kozlowski
Driver uses 'unsigned int' in other places instead of 'unsigned'. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-27memory: omap-gpmc: Enclose macro argument usage in parenthesisKrzysztof Kozlowski
Macros arguments should be enclosed by parenthesis for safety. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-27memory: omap-gpmc: Correct kerneldocKrzysztof Kozlowski
Use proper kerneldoc to fix GCC warnings like: drivers/memory/omap-gpmc.c:299: warning: Function parameter or member 'cs' not described in 'gpmc_get_clk_period' drivers/memory/omap-gpmc.c:432: warning: Excess function parameter 'ma' description in 'get_gpmc_timing_reg' Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-27memory: mvebu-devbus: Align with open parenthesisKrzysztof Kozlowski
The line continuation contained spaces but still failed to properly align with open parenthesis. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-27memory: mvebu-devbus: Add missing braces to all arms of if statementKrzysztof Kozlowski
Add missing braces to all arms of if statement to align with coding convention. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-27memory: bt1-l2-ctl: Add blank lines after declarationsKrzysztof Kozlowski
Add blank lines to improve code readability. No functional change. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-24Merge tag 'memory-controller-drv-5.9' of ↵Arnd Bergmann
git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/drivers Memory controller drivers for v5.9 The drivers/memory directory with memory controller drivers, over the last days grew in numbers but lacked any coordinated care. The generic part (device tree helpers) were pulled in through various trees, depending on driver needs. The patchset is a first try to improve code quality of memory controller drivers. Mostly these are non-intrusive fixes for GCC, checkpatch or sparse warnings. This also fixes missing SPDX tags or improves generic code quality (whitespace, const correctness). Last commit appoints also Krzysztof Kozlowski as a maintainer. * tag 'memory-controller-drv-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: (22 commits) MAINTAINERS: Add Krzysztof Kozlowski as maintainer of memory controllers memory: samsung: exynos-srom: Describe the Kconfig entry memory: Describe the MEMORY Kconfig entry memory: da8xx-ddrctl: Remove unused 'node' variable memory: fsl_ifc: Fix whitespace issues memory: pl172: Add GPLv2 SPDX license header memory: omap-gpmc: Fix whitespace issue memory: omap-gpmc: Include <linux/sizes.h> for SZ_16M memory: mtk-smi: Add argument to function pointer definition memory: brcmstb_dpfe: Remove unneeded braces memory: brcmstb_dpfe: Constify the contents of string memory: ti-emif-pm: Fix cast to iomem pointer memory: ti-aemif: Rename SS to SSTROBE to avoid name conflicts memory: emif: Silence platform_get_irq() error in driver memory: emif: Fix whitespace coding style violations memory: emif: Put constant in comparison on the right side memory: emif-asm-offsets: Add GPLv2 SPDX license header memory: of: Remove unneeded extern from function declarations memory: of: Correct indentation memory: of: Remove __func__ in device related messages ... Link: https://lore.kernel.org/r/20200724160314.8543-1-krzk@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2020-07-24memory: samsung: exynos-srom: Describe the Kconfig entryKrzysztof Kozlowski
Write short description about the Exynos SROM controller driver. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-24memory: Describe the MEMORY Kconfig entryKrzysztof Kozlowski
Write short description about the entire memory controllers section. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-24memory: da8xx-ddrctl: Remove unused 'node' variableKrzysztof Kozlowski
The variable 'node' is not used. Remove it to silence compile warning: drivers/memory/da8xx-ddrctl.c: In function 'da8xx_ddrctl_probe': drivers/memory/da8xx-ddrctl.c:105:22: warning: variable 'node' set but not used [-Wunused-but-set-variable] Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-24memory: fsl_ifc: Fix whitespace issuesKrzysztof Kozlowski
Fix minor whitespace and comment issues. Do not break message strings. No functional changes. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-24memory: pl172: Add GPLv2 SPDX license headerKrzysztof Kozlowski
Add GPLv2 license header and remove GPL boiler plate text. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-24memory: omap-gpmc: Fix whitespace issueKrzysztof Kozlowski
Fix minor whitespace and comment issues. No functional changes. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-24memory: omap-gpmc: Include <linux/sizes.h> for SZ_16MKrzysztof Kozlowski
The driver uses SZ_16M which is defined in include/linux/sizes.h. On ARM it was pulled by other headers but its inclusion is necessary for compile testing on other architectures. This fixes build error when compile testing on i386 architecture: drivers/memory/omap-gpmc.c: In function ‘gpmc_cs_remap’: drivers/memory/omap-gpmc.c:961:12: error: ‘SZ_16M’ undeclared (first use in this function) Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-24memory: mtk-smi: Add argument to function pointer definitionKrzysztof Kozlowski
Fix checkpatch warning: WARNING: function definition argument 'struct device *' should also have an identifier name Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-24memory: brcmstb_dpfe: Remove unneeded bracesKrzysztof Kozlowski
Single statement blocks don't need braces. Fixes checkpatch warning: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Markus Mayer <mmayer@broadcom.com>
2020-07-24memory: brcmstb_dpfe: Constify the contents of stringKrzysztof Kozlowski
The string itself can be made const for safety. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Markus Mayer <mmayer@broadcom.com>
2020-07-24memory: ti-emif-pm: Fix cast to iomem pointerKrzysztof Kozlowski
Cast pointer to iomem memory properly to fix sparse warning: drivers/memory/ti-emif-pm.c:251:38: warning: incorrect type in argument 1 (different address spaces) drivers/memory/ti-emif-pm.c:251:38: expected void const volatile [noderef] __iomem *addr drivers/memory/ti-emif-pm.c:251:38: got void * Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-24memory: ti-aemif: Rename SS to SSTROBE to avoid name conflictsKrzysztof Kozlowski
SS conflicts with compile test build on i386: drivers/memory/ti-aemif.c:40:0: warning: "SS" redefined In file included from arch/x86/include/uapi/asm/ptrace.h:6:0, from arch/x86/include/asm/ptrace.h:7, from arch/x86/include/asm/math_emu.h:5, from arch/x86/include/asm/processor.h:13, from include/linux/mutex.h:19, from include/linux/notifier.h:14, from include/linux/clk.h:14, from drivers/memory/ti-aemif.c:12: arch/x86/include/uapi/asm/ptrace-abi.h:23:0: note: this is the location of the previous definition #define SS 16 Use more descriptive name (SSTROBE) to avoid the conflict. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-24memory: emif: Silence platform_get_irq() error in driverKrzysztof Kozlowski
The platform_get_irq() already prints error message so there is no need to do it again in the driver. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-24memory: emif: Fix whitespace coding style violationsKrzysztof Kozlowski
Make the code and printed messages slightly more readable. Fixes checkpatch warnings: WARNING: quoted string split across lines ERROR: space prohibited before that ',' (ctx:WxW) Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-24memory: emif: Put constant in comparison on the right sideKrzysztof Kozlowski
Fixes checkpatch warning: WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-24memory: emif-asm-offsets: Add GPLv2 SPDX license headerKrzysztof Kozlowski
Add GPLv2 license header and remove GPL boiler plate text. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-24memory: of: Remove unneeded extern from function declarationsKrzysztof Kozlowski
Function declarations in headers do not need to come with extern keyword. Remove them to make the declaration slightly shorter. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-24memory: of: Correct indentationKrzysztof Kozlowski
Correct indentation to match open parenthesis. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-24memory: of: Remove __func__ in device related messagesKrzysztof Kozlowski
Messages printed by generic of_memory code will still be using device context so their location/meaning will be known. Printing __func__ is not needed. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-24memory: of: Remove unused headersKrzysztof Kozlowski
The of_memory.c does not use platform_device nor linked list. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-24memory: samsung: exynos5422-dmc: Do not ignore return code of regmap_read()Krzysztof Kozlowski
Check for regmap_read() return code before using the read value in following write in exynos5_switch_timing_regs(). Pass reading error code to the callers. This does not introduce proper error handling for such failed reads (and obviously regmap_write() error is still ignored) because the driver ignored this in all places. Therefor it only fixes reported issue while matching current driver coding style: drivers/memory/samsung/exynos5422-dmc.c: In function 'exynos5_switch_timing_regs': >> drivers/memory/samsung/exynos5422-dmc.c:216:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-07-15memory: tegra: Add Tegra132 compatible string matchThierry Reding
Ensure that the driver will bind against the Tegra132 instantiation of the external memory controller. While the two are roughly the same from a capability perspective, they do require some incompatible changes to the programming sequences and therefore need separate compatible strings. Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-07-14memory: tegra: Fix KCONFIG variables for Tegra186 and Tegra194Jon Hunter
Commit a127e690b051 ("memory: tegra: Add support for the Tegra194 memory controller") and commit 4e04b88633ae ("memory: tegra: Only include support for enabled SoCs") incorrectly added the KCONFIG variables CONFIG_ARCH_TEGRA186_SOC and CONFIG_ARCH_TEGRA194_SOC to the Tegra EMC driver. These KCONFIG variables do not exist and prevent the EMC driver from being probed on Tegra186 and Tegra194. These KCONFIG variable names are simply missing one underscore and so fix this by adding the necessary underscore to the variable names. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-07-01memory: add Renesas RPC-IF driverSergei Shtylyov
Add the memory driver for Renesas RPC-IF which registers either SPI or HyperFLash device depending on the contents of the device tree subnode. It also provides the absract "back end" device APIs that can be used by the "front end" SPI/MTD drivers to talk to the real hardware. Based on the original patch by Mason Yang <masonccyang@mxic.com.tw>. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Link: https://lore.kernel.org/r/9a3606ec-d4d0-c63a-4fb6-631ab38e621c@cogentembedded.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-06-22memory: tegra: Delete some dead codeDan Carpenter
The debugfs_create_dir() function never returns NULL and anyway the correct behavior is to ignore errors in this situation. The debugfs_create_file() will become a no-op if "emc->debugfs.root" is an error pointer. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-06-22memory: tegra: Avoid unused function warningsArnd Bergmann
The suspend/resume functions have no callers depending on configuration, so they must be marked __maybe_unused to avoid these harmless warnings: drivers/memory/tegra/tegra186.c:1578:12: error: 'tegra186_mc_resume' defined but not used [-Werror=unused-function] 1578 | static int tegra186_mc_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra186.c:1573:12: error: 'tegra186_mc_suspend' defined but not used [-Werror=unused-function] 1573 | static int tegra186_mc_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~~ Fixes: 177602b00641 ("memory: tegra: Add system sleep support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-06-22memory: tegra: Drop <linux/clk-provider.h>Geert Uytterhoeven
The Tegra EMC scaling support code is not a clock provider, but merely a clock consumer, and thus does not need to include <linux/clk-provider.h>. Fixes: 0bf368c5b2cf ("memory: tegra: Add EMC scaling support code for Tegra210") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-06-22memory: tegra: Fix an error handling path in tegra186_emc_probe()Christophe JAILLET
The call to tegra_bpmp_get() must be balanced by a call to tegra_bpmp_put() in case of error, as already done in the remove function. Add an error handling path and corresponding goto. Fixes: 52d15dd23f0b ("memory: tegra: Support DVFS on Tegra186 and later") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Thierry Reding <treding@nvidia.com>
2020-06-22memory: tegra30-emc: Poll EMC-CaR handshake instead of waiting for interruptDmitry Osipenko
The memory clock-rate change could be running on a non-boot CPU, while the boot CPU handles the EMC interrupt. This introduces an unnecessary latency since boot CPU should handle the interrupt and then notify the sibling CPU about clock-rate change completion. In some rare cases boot CPU could be in uninterruptible state for a significant time (like in a case of KASAN + NFS root), it could get to the point that completion timeouts before boot CPU gets a chance to handle interrupt. The solution is to get rid of the completion and replace it with interrupt-status polling. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>