mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
sdhci-spear: ST SPEAr based SDHCI controller glue
Add a glue layer to support the sdhci driver on the ST SPEAr platform. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Cc: <shiraz.hashim@st.com> Cc: Linus Walleij <linus.ml.walleij@gmail.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
6c1f716e81
commit
c63b3cba4f
5 changed files with 359 additions and 0 deletions
42
include/linux/mmc/sdhci-spear.h
Normal file
42
include/linux/mmc/sdhci-spear.h
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* include/linux/mmc/sdhci-spear.h
|
||||
*
|
||||
* SDHCI declarations specific to ST SPEAr platform
|
||||
*
|
||||
* Copyright (C) 2010 ST Microelectronics
|
||||
* Viresh Kumar<viresh.kumar@st.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#ifndef MMC_SDHCI_SPEAR_H
|
||||
#define MMC_SDHCI_SPEAR_H
|
||||
|
||||
#include <linux/platform_device.h>
|
||||
/*
|
||||
* struct sdhci_plat_data: spear sdhci platform data structure
|
||||
*
|
||||
* @card_power_gpio: gpio pin for enabling/disabling power to sdhci socket
|
||||
* @power_active_high: if set, enable power to sdhci socket by setting
|
||||
* card_power_gpio
|
||||
* @power_always_enb: If set, then enable power on probe, otherwise enable only
|
||||
* on card insertion and disable on card removal.
|
||||
* card_int_gpio: gpio pin used for card detection
|
||||
*/
|
||||
struct sdhci_plat_data {
|
||||
int card_power_gpio;
|
||||
int power_active_high;
|
||||
int power_always_enb;
|
||||
int card_int_gpio;
|
||||
};
|
||||
|
||||
/* This function is used to set platform_data field of pdev->dev */
|
||||
static inline void
|
||||
sdhci_set_plat_data(struct platform_device *pdev, struct sdhci_plat_data *data)
|
||||
{
|
||||
pdev->dev.platform_data = data;
|
||||
}
|
||||
|
||||
#endif /* MMC_SDHCI_SPEAR_H */
|
Loading…
Add table
Add a link
Reference in a new issue