- 21 Oct, 2021 2 commits
-
-
Tony Lindgren authored
Commit f433e8aa ("mmc: sdhci-omap: Implement PM runtime functions") combined the use of runtime PM and system suspend functions but left the ifdef CONFIG_PM_SLEEP in place causing undeclared identifier error for sdhci_omap_runtime_suspend if CONFIG_PM_SLEEP is not enabled. Let's fix the error by removing ifdef CONFIG_PM_SLEEP and tagging the reset of the PM related functions with __maybe_unused. Let's also remove the forward declaration for sdhci_omap_context_save(), that was accidentally left from an earlier version and is no longer used. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Tony Lindgren <tony@atomide.com> [Ulf: Rebased and fixed build error] Link: https://lore.kernel.org/r/20211021134352.10135-1-tony@atomide.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Geert Uytterhoeven authored
If CONFIG_PM_SLEEP=n: drivers/mmc/host/sdhci-omap.c:1213:13: error: ‘sdhci_omap_context_save’ declared ‘static’ but never defined [-Werror=unused-function] 1213 | static void sdhci_omap_context_save(struct sdhci_omap_host *omap_host); | ^~~~~~~~~~~~~~~~~~~~~~~ The referenced commit added an unrelated forward declaration of sdhci_omap_context_save(), which is unneeded in general, and unused when CONFIG_PM_SLEEP=n. Fixes: f433e8aa ("mmc: sdhci-omap: Implement PM runtime functions") Reported-by: noreply@ellerman.id.au Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Link: https://lore.kernel.org/r/20211020083902.3669769-1-geert@linux-m68k.orgSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
- 19 Oct, 2021 16 commits
-
-
Zheyu Ma authored
In r592_remove(), the driver will free dma after freeing the host, which may cause a UAF bug. The following log reveals it: [ 45.361796 ] BUG: KASAN: use-after-free in r592_remove+0x269/0x350 [r592] [ 45.364286 ] Call Trace: [ 45.364472 ] dump_stack_lvl+0xa8/0xd1 [ 45.364751 ] print_address_description+0x87/0x3b0 [ 45.365137 ] kasan_report+0x172/0x1c0 [ 45.365415 ] ? r592_remove+0x269/0x350 [r592] [ 45.365834 ] ? r592_remove+0x269/0x350 [r592] [ 45.366168 ] __asan_report_load8_noabort+0x14/0x20 [ 45.366531 ] r592_remove+0x269/0x350 [r592] [ 45.378785 ] [ 45.378903 ] Allocated by task 4674: [ 45.379162 ] ____kasan_kmalloc+0xb5/0xe0 [ 45.379455 ] __kasan_kmalloc+0x9/0x10 [ 45.379730 ] __kmalloc+0x150/0x280 [ 45.379984 ] memstick_alloc_host+0x2a/0x190 [ 45.380664 ] [ 45.380781 ] Freed by task 5509: [ 45.381014 ] kasan_set_track+0x3d/0x70 [ 45.381293 ] kasan_set_free_info+0x23/0x40 [ 45.381635 ] ____kasan_slab_free+0x10b/0x140 [ 45.381950 ] __kasan_slab_free+0x11/0x20 [ 45.382241 ] slab_free_freelist_hook+0x81/0x150 [ 45.382575 ] kfree+0x13e/0x290 [ 45.382805 ] memstick_free+0x1c/0x20 [ 45.383070 ] device_release+0x9c/0x1d0 [ 45.383349 ] kobject_put+0x2ef/0x4c0 [ 45.383616 ] put_device+0x1f/0x30 [ 45.383865 ] memstick_free_host+0x24/0x30 [ 45.384162 ] r592_remove+0x242/0x350 [r592] [ 45.384473 ] pci_device_remove+0xa9/0x250 Signed-off-by: Zheyu Ma <zheyuma97@gmail.com> Link: https://lore.kernel.org/r/1634383581-11055-1-git-send-email-zheyuma97@gmail.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Christophe JAILLET authored
The 'reg_vmmc' regulator is enabled in the probe. It is never disabled. Neither in the error handling path of the probe nor in the remove function. Register a devm_action to disable it when needed. Fixes: 4dc5a79f ("mmc: mxs-mmc: enable regulator for mmc slot") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/4aadb3c97835f7b80f00819c3d549e6130384e67.1634365151.git.christophe.jaillet@wanadoo.frSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Tony Lindgren authored
Configure optional wakeirq. This may be optionally configured for SDIO dat1 pin for wake-up events for SoCs that support deeper idle states. Signed-off-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20211015104720.52240-7-tony@atomide.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Tony Lindgren authored
Allow powering off SDIO cards and enable runtime PM for eMMC/SD card devices. Without this, SDIO WLAN devices will not idle. Signed-off-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20211015104720.52240-6-tony@atomide.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Tony Lindgren authored
Implement PM runtime functions and enable autosuspend. Note that we save context in probe to avoid restoring invalid context on the first resume. For system suspend, we have the new PM runtime functions do most of the work. Signed-off-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20211015104720.52240-5-tony@atomide.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Tony Lindgren authored
The omap specific registers are at offset 0x100 from base for omap4 and later, and for omap3 and earlier they are at offset 0. Let's handle also the earlier SoCs by adding omap_offset. Note that eventually we should just move to using standard sdhci register access for the sdhci range with new offsets starting at 0x100. Signed-off-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20211015104720.52240-4-tony@atomide.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Tony Lindgren authored
In order to start deprecating the custom omap_hsmmc.c in favor of the generic sdhci-omap driver, we need to add support for voltages for earlier SoCs. The PBIAS regulator on omap4 and earlier only supports nominal values of 1.8V and 3.0V, while omap5 and later support nominal values of 1.8V and 3.3V IO voltage. This gets omap4/5 working with sdhci-omap driver. Signed-off-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20211015104720.52240-3-tony@atomide.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Tony Lindgren authored
Let's add compatible values for the legacy SoCs so we can continue deprecating omap_hsmmc in favor of sdhci-omap driver. For omap5, we want to have a separate compatible from omap4 for the additional features available on omap5. AFAIK ti81 can just use the omap4 compatible. Cc: devicetree@vger.kernel.org Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20211015104720.52240-2-tony@atomide.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Ulf Hansson authored
-
Randy Dunlap authored
The Winbond MMC driver fails to build on ARCH=m68k so prevent that build config. Silences these build errors: ../drivers/mmc/host/wbsd.c: In function 'wbsd_request_end': ../drivers/mmc/host/wbsd.c:212:28: error: implicit declaration of function 'claim_dma_lock' [-Werror=implicit-function-declaration] 212 | dmaflags = claim_dma_lock(); ../drivers/mmc/host/wbsd.c:215:17: error: implicit declaration of function 'release_dma_lock'; did you mean 'release_task'? [-Werror=implicit-function-declaration] 215 | release_dma_lock(dmaflags); Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Pierre Ossman <pierre@ossman.eu> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20211017175949.23838-1-rdunlap@infradead.orgSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Haibo Chen authored
To reset standard tuning circuit completely, after clear ESDHC_MIX_CTRL_EXE_TUNE, also need to clear bit buffer_read_ready, this operation will finally clear the USDHC IP internal logic flag execute_tuning_with_clr_buf, make sure the following normal data transfer will not be impacted by standard tuning logic used before. Find this issue when do quick SD card insert/remove stress test. During standard tuning prodedure, if remove SD card, USDHC standard tuning logic can't clear the internal flag execute_tuning_with_clr_buf. Next time when insert SD card, all data related commands can't get any data related interrupts, include data transfer complete interrupt, data timeout interrupt, data CRC interrupt, data end bit interrupt. Always trigger software timeout issue. Even reset the USDHC through bits in register SYS_CTRL (0x2C, bit28 reset tuning, bit26 reset data, bit 25 reset command, bit 24 reset all) can't recover this. From the user's point of view, USDHC stuck, SD can't be recognized any more. Fixes: d9370424 ("mmc: sdhci-esdhc-imx: reset tuning circuit when power on mmc card") Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1634263236-6111-1-git-send-email-haibo.chen@nxp.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Andy Shevchenko authored
There is no user of this member. Remove the dead code for good. The removal is dependent on the previous removal of the struct sdhci_pci_data. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20211014132613.27861-6-andriy.shevchenko@linux.intel.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Andy Shevchenko authored
The last user of this struct gone couple of releases ago. Remove the dead code for good and encourage people to use MMC core functionality for that. The removal is dependent on the previous removal of the struct sdhci_pci_data. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20211014132613.27861-5-andriy.shevchenko@linux.intel.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Andy Shevchenko authored
The last user of this struct gone a couple of releases ago. Besides that there were not so many users of this API for more than 10 years: 1/ The one is Intel Merrifield, that had been added 2016-08-31 by the commit 3976b038 ("x86/platform/intel-mid: Enable SD card detection on Merrifield") and removed 2021-02-11 by the commit 4590d98f ("sfi: Remove framework for deprecated firmware"). 2/ The other is Intel Sunrisepoint related, that had been added 2015-02-06 by the commit e1bfad6d ("mmc: sdhci-pci: Add support for drive strength selection for SPT") and removed 2017-03-20 by the commit 51ced59c ("mmc: sdhci-pci: Use ACPI DSM to get driver strength for some Intel devices"). Effectively this is a revert of the commit 52c506f0 ("mmc: sdhci-pci: add platform data"). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20211014132613.27861-4-andriy.shevchenko@linux.intel.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Andy Shevchenko authored
sdhci_card_detect() is not defined anywhere. Remove it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20211014132613.27861-3-andriy.shevchenko@linux.intel.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Andy Shevchenko authored
The analogue of the sdhci_get_cd_nogpio() is used in the sdhci-pci-core and sdhci-acpi modules. Deduplicate it by moving to sdhci and exporting. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20211014132613.27861-2-andriy.shevchenko@linux.intel.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
- 14 Oct, 2021 3 commits
-
-
Colin Ian King authored
There are several error return paths that dereference the null pointer host because the pointer has not yet been set to a valid value. Fix this by adding a new out_mmc label and exiting via this label to avoid the host clean up and hence the null pointer dereference. Addresses-Coverity: ("Explicit null dereference") Fixes: 8105c2ab ("mmc: moxart: Fix reference count leaks in moxart_probe") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20211013100052.125461-1-colin.king@canonical.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Ulf Hansson authored
-
Andy Shevchenko authored
Intel Merrifield platform had been converted to use ACPI enumeration. However, the driver missed an update to retrieve card detect GPIO. Fix it here. Unfortunately we can't rely on CD GPIO state because there are two different PCB designs in the wild that are using the opposite card detection sense and there is no way to distinguish those platforms, that's why ignore CD GPIO completely and use it only as an event. Fixes: 4590d98f ("sfi: Remove framework for deprecated firmware") BugLink: https://github.com/edison-fw/meta-intel-edison/issues/135Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20211013201723.52212-2-andriy.shevchenko@linux.intel.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
- 12 Oct, 2021 19 commits
-
-
Dan Carpenter authored
The "msh" pointer is device managed, meaning that memstick_alloc_host() calls device_initialize() on it. That means that it can't be free using kfree() but must instead be freed with memstick_free_host(). Otherwise it leads to a tiny memory leak of device resources. Fixes: 60fdd931 ("memstick: add support for JMicron jmb38x MemoryStick host controller") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20211011123912.GD15188@kiliSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Xin Xiong authored
The issue happens in several error handling paths on two refcounted object related to the object "host" (dma_chan_rx, dma_chan_tx). In these paths, the function forgets to decrement one or both objects' reference count increased earlier by dma_request_chan(), causing reference count leaks. Fix it by balancing the refcounts of both objects in some error handling paths. In correspondence with the changes in moxart_probe(), IS_ERR() is replaced with IS_ERR_OR_NULL() in moxart_remove() as well. Signed-off-by: Xin Xiong <xiongx18@fudan.edu.cn> Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn> Signed-off-by: Xin Tan <tanxin.ctf@gmail.com> Link: https://lore.kernel.org/r/20211009041918.28419-1-xiongx18@fudan.edu.cnSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Ulf Hansson authored
-
Andy Shevchenko authored
Currently default label of GPIO is assigned to the device name, when no con_id provided. Instead, let's update it to reflect what it's about (use already prepared template). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210929111757.52625-2-andriy.shevchenko@linux.intel.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Andy Shevchenko authored
Refactor mmc_gpio_alloc() to drop unneeded indentation level and double condition. This increases readability of the code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210929111757.52625-1-andriy.shevchenko@linux.intel.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Krzysztof Kozlowski authored
The schema defines dependency only of clock-output-names on #clock-cells. The dependency in opposite direction - requirement of clock-output-names if #clock-cells is defined - should be explicitly included in the bindings. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20211004151646.73599-1-krzysztof.kozlowski@canonical.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Krzysztof Kozlowski authored
The Microchip PolarFire SoC FPGA DTSI uses Cadence SD/SDIO/eMMC Host Controller without any additional vendor compatible: arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dt.yaml: mmc@20008000: compatible:0: 'cdns,sd4hc' is not one of ['socionext,uniphier-sd4hc'] arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dt.yaml: mmc@20008000: compatible: ['cdns,sd4hc'] is too short Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20210927125044.20046-1-krzysztof.kozlowski@canonical.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Arnd Bergmann authored
clang-14 complains about a sanity check that always passes when the page size is 64KB or larger: drivers/memstick/core/ms_block.c:1739:21: error: result of comparison of constant 65536 with expression of type 'unsigned short' is always false [-Werror,-Wtautological-constant-out-of-range-compare] if (msb->page_size > PAGE_SIZE) { ~~~~~~~~~~~~~~ ^ ~~~~~~~~~ This is fine, it will still work on all architectures, so just shut up that warning with a cast. Fixes: 0ab30494 ("memstick: add support for legacy memorysticks") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20210927094520.696665-1-arnd@kernel.orgSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Zhenxiong Lai authored
According to the specification, DLL status has to be locked before using it. Signed-off-by: Zhenxiong Lai <zhenxiong.lai@unisoc.com> Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20210926092835.146449-1-zhang.lyra@gmail.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Colin Ian King authored
There is a spelling mistake in a pr_info message. Fix it. Also put msi in capital letters. Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20210924225111.143112-1-colin.king@canonical.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Krzysztof Kozlowski authored
Describe better which driver applies to which SoC, to make configuring kernel for Samsung SoC easier. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Link: https://lore.kernel.org/r/20210924133257.112017-1-krzysztof.kozlowski@canonical.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Tony Lindgren authored
Nowadays the standard non-removable property should be used, but we still need to parse the ti,non-removable too. Let's document it as a deprecated property. Cc: Rob Herring <robh+dt@kernel.org> Cc: devicetree@vger.kernel.org Suggested-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20210924073441.7835-1-tony@atomide.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Bean Huo authored
Clean up sdhci_calc_timeout() a bit, and let it set too_big to be true only when the timeout value required by the eMMC device exceeds the capability of the host hardware timer. Signed-off-by: Bean Huo <beanhuo@micron.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20210917172727.26834-2-huobean@gmail.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Linus Walleij authored
Put a small comment before assigning IRQ_WAKE_THREAD telling us what is going on. Cc: Russell King <linux@armlinux.org.uk> Cc: Yann Gautier <yann.gautier@foss.st.com> Cc: Ludovic Barre <ludovic.barre@st.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20210921143359.1738149-1-linus.walleij@linaro.orgSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Tony Lindgren authored
ADMA is only available on controller instances that are connected to the L3 interconnect and are bus mastering capable. As the MMCHS_HL_HWINFO is in the module registers before omap registers and sdhci registers, and the omap registers and sdhci registers can be at different offsets depending on the SoC, let's read MMCHS_HL_HWINFO directly. Let's also switch to using device_property_present() while at it. Signed-off-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20210921110029.21944-6-tony@atomide.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Tony Lindgren authored
We need to support the legacy ti,non-removable property too. Let's warn about the legacy property and mark the device as non-removable. Naturally all the mainline kernel devicetree files will get updated to use the standard non-removable property with the sdhci-omap conversion. But we also have folks updating their kernels with custom devicetree files that we need to consider. Signed-off-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20210921110029.21944-5-tony@atomide.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Tony Lindgren authored
The sysconfig register is managed in a generic way by PM runtime for us by the interconnect target module layer code. SDHCI_RESET_ALL also resets the target module configuration, so we need to restore sysconfig after reset. Note that there is no need to save and restore sysconfig during PM runtime, the PM runtime layer will do that for us. Not sure if this issue is a problem with the current configurations, I noticed the issue while adding support for older TI SoCs and testing with wlcore SDIO wlan device. Signed-off-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20210921110029.21944-4-tony@atomide.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Tony Lindgren authored
We need to restore context in a specified order with HCTL set in two phases. This is similar to what omap_hsmmc_context_restore() is doing. Otherwise SDIO can stop working on resume. And for PM runtime and SDIO cards, we need to also save SYSCTL, IE and ISE. This should not be a problem currently, and these patches can be applied whenever suitable. Fixes: ee0f3092 ("mmc: sdhci-omap: Add Support for Suspend/Resume") Signed-off-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20210921110029.21944-3-tony@atomide.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Tony Lindgren authored
If sdhci-omap is configured for an unused device instance and the device is not set as disabled, we can get a NULL pointer dereference: Unable to handle kernel NULL pointer dereference at virtual address 00000045 ... (regulator_set_voltage) from [<c07d7008>] (mmc_regulator_set_ocr+0x44/0xd0) (mmc_regulator_set_ocr) from [<c07e2d80>] (sdhci_set_ios+0xa4/0x490) (sdhci_set_ios) from [<c07ea690>] (sdhci_omap_set_ios+0x124/0x160) (sdhci_omap_set_ios) from [<c07c8e94>] (mmc_power_up.part.0+0x3c/0x154) (mmc_power_up.part.0) from [<c07c9d20>] (mmc_start_host+0x88/0x9c) (mmc_start_host) from [<c07cad34>] (mmc_add_host+0x58/0x7c) (mmc_add_host) from [<c07e2574>] (__sdhci_add_host+0xf0/0x22c) (__sdhci_add_host) from [<c07eaf68>] (sdhci_omap_probe+0x318/0x72c) (sdhci_omap_probe) from [<c06a39d8>] (platform_probe+0x58/0xb8) AFAIK we are not seeing this with the devices configured in the mainline kernel but this can cause issues for folks bringing up their boards. Fixes: 7d326930 ("mmc: sdhci-omap: Add OMAP SDHCI driver") Signed-off-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20210921110029.21944-2-tony@atomide.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-