@@ -37,6 +37,7 @@
#include <plat/gpmc.h>
#include <plat/usb.h>
#include <plat/gpmc-smc91x.h>
+#include <plat/mmc.h>
#include "hsmmc.h"
@@ -187,6 +188,7 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
.mmc = 1,
.wires = 4,
.gpio_cd = -EINVAL,
+ .cd_type = GPIO,
.gpio_wp = -EINVAL,
.ext_clock = 1,
},
@@ -40,6 +40,7 @@
#include <plat/control.h>
#include <plat/gpmc-smc91x.h>
+#include <plat/mmc.h>
#include <mach/board-sdp.h>
@@ -355,11 +356,13 @@ static struct omap2_hsmmc_info mmc[] = {
* so the SIM card isn't used; else 4 bits.
*/
.wires = 8,
+ .cd_type = GPIO,
.gpio_wp = 4,
},
{
.mmc = 2,
.wires = 8,
+ .cd_type = GPIO,
.gpio_wp = 7,
},
{} /* Terminator */
@@ -45,6 +45,7 @@
#include <plat/gpmc.h>
#include <plat/usb.h>
#include <plat/display.h>
+#include <plat/mmc.h>
#include <mach/hardware.h>
@@ -598,6 +599,7 @@ static struct omap2_hsmmc_info mmc[] = {
.mmc = 1,
.wires = 4,
.gpio_cd = -EINVAL,
+ .cd_type = GPIO,
.gpio_wp = -EINVAL,
},
@@ -606,6 +608,7 @@ static struct omap2_hsmmc_info mmc[] = {
.wires = 4,
.transceiver = 1,
.gpio_cd = -EINVAL,
+ .cd_type = GPIO,
.gpio_wp = -EINVAL,
.ocr_mask = 0x00100000, /* 3.3V */
},
@@ -45,6 +45,7 @@
#include <plat/usb.h>
#include <plat/timer-gp.h>
#include <plat/display.h>
+#include <plat/mmc.h>
#include <plat/mcspi.h>
#include <linux/input/matrix_keypad.h>
@@ -122,6 +123,7 @@ static struct omap2_hsmmc_info mmc[] = {
{
.mmc = 1,
.wires = 8,
+ .cd_type = GPIO,
.gpio_wp = 29,
},
{} /* Terminator */
@@ -30,6 +30,7 @@
#include <plat/usb.h>
#include <plat/display.h>
#include <plat/onenand.h>
+#include <plat/mmc.h>
#include "mux.h"
#include "hsmmc.h"
@@ -250,12 +251,14 @@ static struct omap2_hsmmc_info mmc[] = {
.mmc = 1,
.wires = 4,
.gpio_cd = -EINVAL,
+ .cd_type = GPIO,
.gpio_wp = -EINVAL,
},
{
.mmc = 2,
.wires = 4,
.gpio_cd = -EINVAL,
+ .cd_type = GPIO,
.gpio_wp = -EINVAL,
},
{} /* Terminator */
@@ -38,6 +38,7 @@
#include <plat/board.h>
#include <plat/common.h>
#include <plat/gpmc.h>
+#include <plat/mmc.h>
#include <asm/delay.h>
#include <plat/control.h>
@@ -364,6 +365,7 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
.mmc = 1,
.wires = 4,
.gpio_cd = -EINVAL,
+ .cd_type = GPIO,
.gpio_wp = -EINVAL,
},
{} /* Terminator */
@@ -43,6 +43,7 @@
#include <plat/nand.h>
#include <plat/usb.h>
#include <plat/timer-gp.h>
+#include <plat/mmc.h>
#include "mux.h"
#include "hsmmc.h"
@@ -112,6 +113,7 @@ static struct omap2_hsmmc_info mmc[] = {
{
.mmc = 1,
.wires = 8,
+ .cd_type = GPIO,
.gpio_wp = 29,
},
{} /* Terminator */
@@ -42,6 +42,7 @@
#include <plat/common.h>
#include <plat/mcspi.h>
#include <plat/display.h>
+#include <plat/mmc.h>
#include "mux.h"
#include "sdram-micron-mt46h32m32lf-6.h"
@@ -372,6 +373,7 @@ static struct omap2_hsmmc_info mmc[] = {
.mmc = 1,
.wires = 4,
.gpio_cd = -EINVAL,
+ .cd_type = GPIO,
.gpio_wp = 63,
},
{} /* Terminator */
@@ -41,6 +41,7 @@
#include <plat/mcspi.h>
#include <plat/usb.h>
#include <plat/display.h>
+#include <plat/mmc.h>
#include "mux.h"
#include "sdram-micron-mt46h32m32lf-6.h"
@@ -232,6 +233,7 @@ static struct omap2_hsmmc_info omap3pandora_mmc[] = {
.mmc = 1,
.wires = 4,
.gpio_cd = -EINVAL,
+ .cd_type = GPIO,
.gpio_wp = 126,
.ext_clock = 0,
},
@@ -239,6 +241,7 @@ static struct omap2_hsmmc_info omap3pandora_mmc[] = {
.mmc = 2,
.wires = 4,
.gpio_cd = -EINVAL,
+ .cd_type = GPIO,
.gpio_wp = 127,
.ext_clock = 1,
.transceiver = true,
@@ -247,6 +250,7 @@ static struct omap2_hsmmc_info omap3pandora_mmc[] = {
.mmc = 3,
.wires = 4,
.gpio_cd = -EINVAL,
+ .cd_type = GPIO,
.gpio_wp = -EINVAL,
},
{} /* Terminator */
@@ -48,6 +48,7 @@
#include <plat/nand.h>
#include <plat/usb.h>
#include <plat/timer-gp.h>
+#include <plat/mmc.h>
#include "mux.h"
#include "hsmmc.h"
@@ -126,6 +127,7 @@ static struct omap2_hsmmc_info mmc[] = {
{
.mmc = 1,
.wires = 8,
+ .cd_type = GPIO,
.gpio_wp = 29,
},
{} /* Terminator */
@@ -45,6 +45,7 @@
#include <mach/hardware.h>
#include <plat/nand.h>
#include <plat/usb.h>
+#include <plat/mmc.h>
#include "mux.h"
#include "sdram-micron-mt46h32m32lf-6.h"
@@ -277,12 +278,14 @@ static struct omap2_hsmmc_info mmc[] = {
.mmc = 1,
.wires = 4,
.gpio_cd = -EINVAL,
+ .cd_type = GPIO,
.gpio_wp = -EINVAL,
},
{
.mmc = 2,
.wires = 4,
.gpio_cd = -EINVAL,
+ .cd_type = GPIO,
.gpio_wp = -EINVAL,
.transceiver = true,
.ocr_mask = 0x00100000, /* 3.3V */
@@ -32,6 +32,7 @@
#include <plat/gpmc.h>
#include <plat/onenand.h>
#include <plat/gpmc-smc91x.h>
+#include <plat/mmc.h>
#include "mux.h"
#include "hsmmc.h"
@@ -256,6 +257,7 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
.wires = 4,
.cover_only = true,
.gpio_cd = 160,
+ .cd_type = GPIO,
.gpio_wp = -EINVAL,
.power_saving = true,
},
@@ -264,6 +266,7 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
.mmc = 2,
.wires = 8, /* See also rx51_mmc2_remux */
.gpio_cd = -EINVAL,
+ .cd_type = GPIO,
.gpio_wp = -EINVAL,
.nonremovable = true,
.power_saving = true,
@@ -23,6 +23,7 @@
#include <plat/common.h>
#include <plat/usb.h>
+#include <plat/mmc.h>
#include "mux.h"
#include "hsmmc.h"
@@ -156,6 +157,7 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
.name = "external",
.mmc = 1,
.wires = 4,
+ .cd_type = GPIO,
.gpio_wp = -EINVAL,
.power_saving = true,
},
@@ -164,6 +166,7 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
.mmc = 2,
.wires = 8,
.gpio_cd = -EINVAL,
+ .cd_type = GPIO,
.gpio_wp = -EINVAL,
.nonremovable = true,
.power_saving = true,
@@ -17,6 +17,7 @@ struct omap2_hsmmc_info {
bool no_off; /* power_saving and power is not to go off */
bool vcc_aux_disable_is_sleep; /* Regulator off remapped to sleep */
int gpio_cd; /* or -EINVAL */
+ bool cd_type; /* GPIO or NON_GPIO */
int gpio_wp; /* or -EINVAL */
char *name; /* or NULL for default */
struct device *dev; /* returned: pointer to mmc adapter */
@@ -43,6 +43,9 @@
#define OMAP_MMC_MAX_SLOTS 2
+#define NON_GPIO 0
+#define GPIO 1
+
struct omap_mmc_platform_data {
/* back-link to device */
struct device *dev;
@@ -103,6 +106,7 @@ struct omap_mmc_platform_data {
unsigned vcc_aux_disable_is_sleep:1;
int switch_pin; /* gpio (card detect) */
+ unsigned cd_type:1; /* GPIO or NON_GPIO */
int gpio_wp; /* gpio (write protect) */
int (*set_bus_mode)(struct device *dev, int slot, int bus_mode);