summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/sdhci-bcm-kona.c
AgeCommit message (Collapse)AuthorFilesLines
2023-08-15mmc: sdhci-bcm-kona: Use sdhci_pltfm_remove()Adrian Hunter1-1/+11
Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() because sdhci_pltfm_unregister() is going to be removed. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230811130351.7038-3-adrian.hunter@intel.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2023-08-15mmc: Convert to platform remove callback returning voidYangtao Li1-1/+1
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Yangtao Li <frank.li@vivo.com> Acked-by: Florian Fainelli <florian.fainelli@broadcom.com> # Broadcom Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20230727070051.17778-57-frank.li@vivo.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2023-08-09mmc: Explicitly include correct DT includesRob Herring1-1/+0
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20230718143054.1065288-1-robh@kernel.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2022-12-07mmc: Remove duplicate words in commentsAdrian Hunter1-1/+1
Remove duplicate words in comments found using the following commands: pcregrep --color=always -n \ '([^a-zA-Z_])([a-zA-Z_]+)[[:space:]]+\2[^a-zA-Z_]' \ drivers/mmc/host/*.[ch] drivers/mmc/core/*.[ch] \ include/linux/mmc/*.h \ include/uapi/linux/mmc/*.h | \ grep -v 'long long' pcregrep --color=always -n -M \ '([^a-zA-Z_])([a-zA-Z_]+)[ \t]*\n[[:space:]*]+\2[^a-zA-Z_]' \ drivers/mmc/host/*.[ch] \ drivers/mmc/core/*.[ch] \ include/linux/mmc/*.h \ include/uapi/linux/mmc/*.h Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20221102120105.5747-1-adrian.hunter@intel.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2022-06-10treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE ↵Thomas Gleixner1-12/+2
(part 2) Based on the normalized pattern: this program is free software you can redistribute it and/or modify it under the terms of the gnu general public license as published by the free software foundation version 2 this program is distributed as is without any warranty of any kind whether express or implied 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. Reviewed-by: Allison Randal <allison@lohutok.net> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-07mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v4.4Douglas Anderson1-0/+1
This is like commit 3d3451124f3d ("mmc: sdhci-msm: Prefer asynchronous probe") but applied to a whole pile of drivers. This batch converts the drivers that appeared to be around in the v4.4 timeframe. Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com> # SH_MMCIF Tested-by: Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20200903162412.1.Id501e96fa63224f77bb86b2135a5e8324ffb9c43@changeid Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2019-02-25mmc: sdhci-bcm-kona: Drop unused includesLinus Walleij1-2/+0
The SDHCI BCM Kona driver uses slot GPIO helpers and does not make any use of <linux/gpio.h> or <linux/of_gpio.h> so drop these surplus includes. Cc: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2018-05-29mmc: sdhci-*: Don't emit error msg if sdhci_add_host() failsJisheng Zhang1-3/+1
I noticed below error msg with sdhci-pxav3 on some berlin platforms: [.....] sdhci-pxav3 f7ab0000.sdhci failed to add host It is due to getting related vmmc or vqmmc regulator returns -EPROBE_DEFER. It doesn't matter at all but it's confusing. >From another side, if driver probing fails and the error number isn't -EPROBE_DEFER, the core will tell us something as below: [.....] sdhci-pxav3: probe of f7ab0000.sdhci failed with error -EXX So it's not necessary to emit error msg if sdhci_add_host() fails. And some other sdhci host drivers also have this issue, let's fix them together. Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2017-08-30mmc: sdhci-bcm-kona: constify sdhci_pltfm_data and sdhci_ops structuresJulia Lawall1-2/+2
The sdhci_pltfm_data structure is only passed as the second argument of sdhci_pltfm_init, which is const, while the sdhci_ops structure is only stored in the ops field of a sdhci_pltfm_data structure, which is also const. Thus both kinds of structures can be const as well. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2016-09-26mmc: sdhci-bcm-kona: fix error return code in sdhci_bcm_kona_probe()Wei Yongjun1-2/+4
In clk_set_rate() or clk_prepare_enable() error handling case, the error return code ret is not set, so sdhci_bcm_kona_probe() return 0 in those error cases. Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Acked-by: Ray Jui <ray.jui@broadcom.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2016-07-29mmc: sdhci-pltfm: Drop define for SDHCI_PLTFM_PMOPSUlf Hansson1-1/+1
Due to previous changes this define has no longer a purpose. Instead move the sdhci-pltfm drivers over to use the exported struct sdhci_pltfm_pmops. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2016-07-25mmc: host: use the defined function to check whether card is removableJaehoon Chung1-3/+3
In linux/mmc/host.h, mmc_card_is_removable() is already defined. It should be maintainted more easier than now. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2015-10-26mmc: sdhci-bcm-kona: fix logic to check for 8-bit data widthJavier Martinez Canillas1-1/+1
The driver prints if the data width is 8-bit but it's using a binary OR instead of a binary AND so it will always report as "is_8bit=Y" regardless of the flags in host->mmc->caps. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Reviewed-by: Ray Jui <rjui@broadcom.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2015-03-23mmc: sdhci: set the .remove to sdhci_pltfm_unregister()Kevin Hao1-6/+1
In these drivers, the driver specific .remove function just a simple wrapper of function sdhci_pltfm_unregister(). So remove these wrappers and just set .remove to sdhci_pltfm_unregister(). Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2015-03-23mmc: sdhci: disable the clock in sdhci_pltfm_unregister()Kevin Hao1-11/+1
So we can avoid to sprinkle the clk_disable_unprepare() in many drivers. Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2015-03-23mmc: sdhci-bcm-kona: kill the "external_clk" member in driver private structKevin Hao1-33/+13
Actually we can use the "clk" in the struct sdhci_pltfm_host. Also change the "external clock" to "core clock" and kill two redundant private functions in this driver as suggested by Ray Jui. Signed-off-by: Kevin Hao <haokexin@gmail.com> Reviewed-by: Ray Jui <rjui@broadcom.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2015-01-19mmc: sdhci-bcm-kona: Handle error from mmc_of_parse()Ulf Hansson1-1/+3
Since mmc_of_parse() may fail, let's deal with it and thus do proper error handling. Cc: Christian Daudt <bcm@fixthebug.org> Cc: Matt Porter <mporter@linaro.org> Cc: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
2014-10-03mmc, sdhci, bcm-kona, LLVMLinux: Remove use of __initconstBehan Webster1-1/+1
The __initconst is in the wrong place, and when moved to the correct place it uncovers an error where the variable is used by non-init data structures. Instead merely make them const and put the const in the right spot. Signed-off-by: Behan Webster <behanw@converseincode.com> Reviewed-by: Mark Charlebois <charlebm@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Matt Porter <mporter@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2014-09-09mmc: remove .owner field for drivers using module_platform_driverPeter Griffin1-1/+0
This patch removes the superflous .owner field for drivers which use the module_platform_driver API, as this is overriden in platform_driver_register anyway. Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2014-05-22mmc: sdhci: convert sdhci_set_uhs_signaling() into a library functionRussell King1-0/+1
Add sdhci_set_uhs_signaling() and always call the set_uhs_signaling method. This avoids quirks being added into sdhci_set_uhs_signaling(). Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-by: Markus Pargmann <mpa@pengutronix.de> Tested-by: Stephen Warren <swarren@nvidia.com> [Ulf Hansson] Resolved conflict Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <chris@printf.net>
2014-05-22mmc: sdhci: convert sdhci_set_clock() into a library functionRussell King1-0/+1
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-by: Markus Pargmann <mpa@pengutronix.de> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <chris@printf.net>
2014-05-22mmc: sdhci: convert reset into a library functionRussell King1-0/+1
Rather than having platform_reset_enter/platform_reset_exit methods, turn the core of the reset handling into a library function which platforms can call at the appropriate moment in their (new) reset method. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-by: Markus Pargmann <mpa@pengutronix.de> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <chris@printf.net>
2014-05-22mmc: sdhci: convert generic bus width setup to library functionRussell King1-0/+1
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-by: Markus Pargmann <mpa@pengutronix.de> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <chris@printf.net>
2014-03-05mmc: sdhci-bcm-kona: fix build errors when built-inRussell King1-1/+1
`sdhci_bcm_kona_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o Fixes: 058feb53666f ("mmc: sdhci-bcm-kona: make linker-section warning go away") Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-by: Markus Mayer <markus.mayer@linaro.org> Acked-by: Matt Porter <mporter@linaro.org> Cc: <stable@vger.kernel.org> Signed-off-by: Chris Ball <chris@printf.net>
2014-02-24mmc: sdhci-bcm-kona: Add basic use of clocksTim Kryger1-2/+35
Enable the external clock needed by the host controller during the probe and disable it during the remove. Signed-off-by: Tim Kryger <tim.kryger@linaro.org> Reviewed-by: Markus Mayer <markus.mayer@linaro.org> Reviewed-by: Matt Porter <matt.porter@linaro.org> Signed-off-by: Chris Ball <chris@printf.net>
2013-09-26mmc: sdhci-bcm-kona: Use sdhci_pltfm_unregister instead of open codedAxel Lin1-13/+1
This avoid duplicated implementation and also fixes missing iounmap() and release_mem_region() calls in sdhci_bcm_kona_remove(). sdhci_pltfm_init() calls request_mem_region() and ioremap(), thus we need to call the corresponding iounmap() and release_mem_region() calls in sdhci_bcm_kona_remove(). Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-08-30Merge tag 'bcm-for-3.12-late-soc' of git://github.com/broadcom/bcm11351 into ↵Olof Johansson1-2/+1
next/boards From Christian Daudt, late changes for 3.12 broadcom mmc driver. Small trivial changes so I'll take them through arm-soc. * tag 'bcm-for-3.12-late-soc' of git://github.com/broadcom/bcm11351: mmc: sdhci-bcm-kona: Staticize sdhci_bcm_kona_card_event mmc: sdhci-bcm-kona: Remove unneeded version.h inclusion
2013-08-27mmc: sdhci-bcm-kona: Staticize sdhci_bcm_kona_card_eventSachin Kamat1-1/+1
sdhci_bcm_kona_card_event is referenced only in this file. Make it static. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Christian Daudt <csd@broadcom.com>
2013-08-27mmc: sdhci-bcm-kona: Remove unneeded version.h inclusionSachin Kamat1-1/+0
version.h header inclusion is not necessary as detected by versioncheck. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Christian Daudt <csd@broadcom.com>
2013-08-20ARM: DT: binding fixup to align with vendor-prefixes.txt (drivers)Christian Daudt1-1/+2
[ this is a follow-up to this discussion: http://archive.arm.linux.org.uk/lurker/message/20130730.230827.a1ceb12a.en.html ] This patchset renames all uses of "bcm," name bindings to "brcm," as they were done prior to knowing that brcm had already been standardized as Broadcom vendor prefix (in Documentation/devicetree/bindings/vendor-prefixes.txt). This will not cause any churn on devices because none of these bindings have made it into production yet. Signed-off-by: Christian Daudt <csd@broadcom.com> Acked-by: Stephen Warren <swarren@nvidia.com>
2013-08-20ARM: mmc: fix NONREMOVABLE test in sdhci-bcm-konaChristian Daudt1-2/+2
sdhci-bcm-kona driver is incorrectly doing "|" to bit-test NONREMOVABLE. Switch to "&" Signed-off-by: Christian Daudt <csd@broadcom.com> Reviewed-by: Markus Mayer <markus.mayer@linaro.org> Reviewed-by: Matt Porter <matt.porter@linaro.org>
2013-08-20mmc: sdhci-bcm-kona: make linker-section warning go awayMarkus Mayer1-4/+4
This change makes the following build warning go away: [...] LINK vmlinux LD vmlinux.o MODPOST vmlinux.o WARNING: modpost: Found 2 section mismatch(es). To see full details build your kernel with: 'make CONFIG_DEBUG_SECTION_MISMATCH=y' Signed-off-by: Markus Mayer <markus.mayer@linaro.org> Reviewed-by: Christian Daudt <csd@broadcom.com> Reviewed-by: Matt Porter <matt.porter@linaro.org>
2013-07-05mmc: bcm281xx SDHCI driverChristian Daudt1-0/+348
Add SDHCI driver for the Broadcom 281xx SoCs. Still missing: - power managemement Signed-off-by: Christian Daudt <csd@broadcom.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Chris Ball <cjb@laptop.org>