summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci-pltfm.h
AgeCommit message (Collapse)Author
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-08mmc: sdhci-pltfm: Convert DT properties to generic device propertiesAdrian Hunter
Convert DT properties to generic device properties so that drivers can get properties from DT or ACPI. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Tested-by: Srinath Mannam <srinath.mannam@broadcom.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2017-08-30mmc: sdhci-pltfm: export sdhci_pltfm_suspend/resumeMasahiro Yamada
This will be useful when drivers want to reuse either suspend or resume callback instead of whole of sdhci_pltfm_pmops. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2016-11-29mmc: sdhci: remove unneeded (void *) casts in sdhci_(pltfm_)priv()Masahiro Yamada
The type of host->private is (unsigned long *). No cast is needed to return an opaque pointer. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.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 Hansson
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-29mmc: sdhci-pltfm: Convert to use the SET_SYSTEM_SLEEP_PM_OPSUlf Hansson
Move the system PM callbacks within #ifdef CONFIG_PM_SLEEP as to avoid them being build when not used. This also allows us to use the SET_SYSTEM_SLEEP_PM_OPS macro which simplifies the code. Within this context it also makes sense to move the declaration of the struct sdhci_pltfm_pmops, outside the #ifdef CONFIG_PM as the SET_SYSTEM_SLEEP_PM_OPS deals with this. This further simplifies the code. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2016-07-29mmc: sdhci-pltfm: Make sdhci_pltfm_suspend|resume() staticUlf Hansson
There are no users left of these exported APIs, so let's make them static. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2016-02-29mmc: sdhci-pltfm: remove priv variable from sdhci_pltfm_hostJisheng Zhang
Now all clients migration to use sdhci_pltfm_init for private allocation is done and there's no users of the priv variable, so we can remove it from the sdhci_pltfm_host structure. Signed-off-by: Jisheng Zhang <jszhang@marvell.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2014-01-13mmc: sdhci-pltfm: export pltfm suspend/resume apiDong Aisheng
It is helpful for platform code to use to eliminate duplicated code. Signed-off-by: Dong Aisheng <b29396@freescale.com> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-05-31mmc: sdhci: Add size for caller in init+registerChristian Daudt
Add a param to allow users of sdhci_pltfm to allocate private space in calls to sdhci_pltfm_init+sdhci_pltfm_register. This is implemented in the same way as sdhci does for its users. None of the users have been migrated yet and are passing in zero to retain their private allocation. - todo: migrate clients to using allocation this way - todo: remove priv variable once migration is complete Also removed unused variable in sdhci_pltfm_init fn Signed-off-by: Christian Daudt <csd@broadcom.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-05-26mmc: sdhci-pltfm: Allow drivers to set quirks2 from platform dataAl Cooper
Signed-off-by: Al Cooper <alcooperx@gmail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-03-22mmc: sdhci-pltfm: Constify the ops field of sdhci_pltfm_data structLars-Peter Clausen
All users of the sdhci_ops struct in the sdhci core already treat it as const. The sdhci-pltfm code itself never actually looks at the ops field of the sdhci_pltfm_data struct and merely passes it on to the sdhci core, so make we can make it const in the sdhci_pltfm_data struct as well. This allows us to declare sdhci_ops structs as const in drivers using the sdhci-pltfm helper code. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-03-22mmc: sdhci_pltfm: Constify sdhci_pltfm_dataLars-Peter Clausen
The sdhci_pltfm_data struct is never modified within the sdhci_pltfm module. So make the pdata parameter to sdhci_pltfm_init and sdhci_pltfm_register const. This allows drivers to declare their sdhci_pltfm_data struct as const. This patch also makes the sdhci_pltfm_data declarations const where possible. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2013-02-24mmc: sdhci-pltfm: Add a common clk API implementation of get_timeout_clockLars-Peter Clausen
Quite a few drivers have a implementation of the get_timeout_clock callback which simply returns the result of clk_get_rate on the device's clock. This patch adds a common implementation of this to the sdhci-pltfm module and replaces all custom implementations with the common one. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: Shawn Guo <shawn.guo@linaro.org> Tested-by: Kevin Liu <kliu5@marvell.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2011-12-19mmc: sdhci: remove "state" argument from sdhci_suspend_hostManuel Lauss
Drop the "state" argument from sdhci_suspend_host. Its only user is the PCI glue; this allows to move all SDHCI glues to use dev_pm_ops instead. Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2011-07-20mmc: sdhci: change sdhci-pltfm into a moduleShawn Guo
There are a couple of problems left from the sdhci pltfm and OF consolidation changes. * When building more than one sdhci-pltfm based drivers in the same image, linker will give multiple definition error on the sdhci-pltfm helper functions. For example right now, building sdhci-of-esdhc and sdhci-of-hlwd together is a valid combination from Kconfig view. * With the current build method, there is error with building the drivers as module, but module installation fails with modprobe. The patch fixes above problems by changing sdhci-pltfm into a module. To avoid EXPORT_SYMBOL on so many big endian IO accessors, it moves these accessors into sdhci-pltfm.h as the 'static inline' functions. As a result, sdhci.h needs to be included in sdhci-pltfm.h, and in turn can be removed from individual drivers which already include sdhci-pltfm.h. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2011-07-20mmc: sdhci: merge two sdhci-pltfm.h into oneShawn Guo
The structure sdhci_pltfm_data is not necessarily to be in a public header like include/linux/mmc/sdhci-pltfm.h, so the patch moves it into drivers/mmc/host/sdhci-pltfm.h and eliminates the former one. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Reviewed-by: Grant Likely <grant.likely@secretlab.ca> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Chris Ball <cjb@laptop.org>
2011-07-20mmc: sdhci: make sdhci-of device drivers self registeredShawn Guo
The patch turns the sdhci-of-core common stuff into helper functions added into sdhci-pltfm.c, and makes sdhci-of device drviers self registered using the same pair of .probe and .remove used by sdhci-pltfm device drivers. As a result, sdhci-of-core.c and sdhci-of.h can be eliminated with those common things merged into sdhci-pltfm.c and sdhci-pltfm.h respectively. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Chris Ball <cjb@laptop.org>
2011-07-20mmc: sdhci: eliminate sdhci_of_host and sdhci_of_dataShawn Guo
The patch migrates the use of sdhci_of_host and sdhci_of_data to sdhci_pltfm_host and sdhci_pltfm_data, so that the former pair can be eliminated. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Reviewed-by: Grant Likely <grant.likely@secretlab.ca> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2011-07-20mmc: sdhci: make sdhci-pltfm device drivers self registeredShawn Guo
The patch turns the common stuff in sdhci-pltfm.c into functions, and add device drivers their own .probe and .remove which in turn call into the common functions, so that those sdhci-pltfm device drivers register itself and keep all device specific things away from common sdhci-pltfm file. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Reviewed-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2011-03-25mmc: sdhci-esdhc: use writel/readl as general APIsRichard Zhu
Add one flag to indicate the GPIO CD/WP is enabled or not on imx platforms, and reuse the writel/readl as the general APIs for imx SOCs. Signed-off-by: Richard Zhu <Hong-Xing.Zhu@freescale.com> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Chris Ball <cjb@laptop.org>
2011-01-08mmc: add sdhci-tegra driver for Tegra SoCsOlof Johansson
SDHCI driver for Tegra. This driver plugs in as a new variant of sdhci-pltfm, using the platform data structure passed in to specify the GPIOs to use for card detect, write protect and card power enablement. Original driver (of which only the header file is left): Signed-off-by: Yvonne Yip <y@palm.com> The rest, which has been rewritten by now: Signed-off-by: Olof Johansson <olof@lixom.net> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Chris Ball <cjb@laptop.org>
2011-01-08mmc: Add support for the Marvell Dove SDHCI controllerMike Rapoport
Implement an sdhci-pltfm driver for the controller found in the Marvell Dove SoC. Signed-off-by: Mike Rapoport <mike@compulab.co.il> CC: Saeed Bishara <saeed@marvell.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Chris Ball <cjb@laptop.org>
2010-10-23mmc: sdhci-pltfm: add -pltfm driver for imx35/51Wolfram Sang
This driver adds basic support for the esdhc-core found on e.g. imx35/51, as a platform driver. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> Tested-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2010-10-23mmc: sdhci-pltfm: move .h file into appropriate subdirWolfram Sang
Make use of the include/linux/mmc directory. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> Tested-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2010-10-23mmc: sdhci-pltfm: Add structure for host-specific dataWolfram Sang
We need to carry some information per host, e.g. the clock. Add a structure for it and initialize it in the generic part. Also improve the check for a parent. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Richard Röjfors <richard.rojfors.ext@mocean-labs.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2010-08-11sdhci-pltfm: add support for CNS3xxx SoC devicesAnton Vorontsov
There's nothing special, just SoC-specific ops and quirks. Signed-off-by: Anton Vorontsov <avorontsov@mvista.com> Cc: Ben Dooks <ben@simtec.co.uk> Cc: Richard R?jfors <richard.rojfors@pelagicore.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11sdhci-pltfm: switch to module device table matchingAnton Vorontsov
Sometimes want to place SoC-specific parts alongside with the generic driver, and to do so, we have to switch the driver over to the module device table matching. Note that drivers/mmc/host/sdhci-pltfm.h is so far empty, but it'll hold SoC-specific driver data handlers soon. Signed-off-by: Anton Vorontsov <avorontsov@mvista.com> Cc: Ben Dooks <ben@simtec.co.uk> Cc: Richard R?jfors <richard.rojfors@pelagicore.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>