diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mfd/tmio.h | 1 | ||||
| -rw-r--r-- | include/linux/mmc/core.h | 2 | ||||
| -rw-r--r-- | include/linux/mmc/sdhci.h | 1 | ||||
| -rw-r--r-- | include/linux/mmc/sh_mmcif.h | 6 | ||||
| -rw-r--r-- | include/linux/mmc/sh_mobile_sdhi.h | 2 | ||||
| -rw-r--r-- | include/linux/mmc/slot-gpio.h | 3 | ||||
| -rw-r--r-- | include/linux/spi/mmc_spi.h | 19 |
7 files changed, 21 insertions, 13 deletions
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h index ce3511326f80..b22883d60500 100644 --- a/include/linux/mfd/tmio.h +++ b/include/linux/mfd/tmio.h | |||
| @@ -108,7 +108,6 @@ struct tmio_mmc_data { | |||
| 108 | unsigned int cd_gpio; | 108 | unsigned int cd_gpio; |
| 109 | void (*set_pwr)(struct platform_device *host, int state); | 109 | void (*set_pwr)(struct platform_device *host, int state); |
| 110 | void (*set_clk_div)(struct platform_device *host, int state); | 110 | void (*set_clk_div)(struct platform_device *host, int state); |
| 111 | int (*get_cd)(struct platform_device *host); | ||
| 112 | int (*write16_hook)(struct tmio_mmc_host *host, int addr); | 111 | int (*write16_hook)(struct tmio_mmc_host *host, int addr); |
| 113 | /* clock management callbacks */ | 112 | /* clock management callbacks */ |
| 114 | int (*clk_enable)(struct platform_device *pdev, unsigned int *f); | 113 | int (*clk_enable)(struct platform_device *pdev, unsigned int *f); |
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index 443243b241d5..da51bec578c3 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h | |||
| @@ -208,6 +208,8 @@ static inline void mmc_claim_host(struct mmc_host *host) | |||
| 208 | __mmc_claim_host(host, NULL); | 208 | __mmc_claim_host(host, NULL); |
| 209 | } | 209 | } |
| 210 | 210 | ||
| 211 | struct device_node; | ||
| 211 | extern u32 mmc_vddrange_to_ocrmask(int vdd_min, int vdd_max); | 212 | extern u32 mmc_vddrange_to_ocrmask(int vdd_min, int vdd_max); |
| 213 | extern int mmc_of_parse_voltage(struct device_node *np, u32 *mask); | ||
| 212 | 214 | ||
| 213 | #endif /* LINUX_MMC_CORE_H */ | 215 | #endif /* LINUX_MMC_CORE_H */ |
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index e3c6a74d980a..3e781b8c0be7 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h | |||
| @@ -171,6 +171,7 @@ struct sdhci_host { | |||
| 171 | unsigned int ocr_avail_sdio; /* OCR bit masks */ | 171 | unsigned int ocr_avail_sdio; /* OCR bit masks */ |
| 172 | unsigned int ocr_avail_sd; | 172 | unsigned int ocr_avail_sd; |
| 173 | unsigned int ocr_avail_mmc; | 173 | unsigned int ocr_avail_mmc; |
| 174 | u32 ocr_mask; /* available voltages */ | ||
| 174 | 175 | ||
| 175 | wait_queue_head_t buf_ready_int; /* Waitqueue for Buffer Read Ready interrupt */ | 176 | wait_queue_head_t buf_ready_int; /* Waitqueue for Buffer Read Ready interrupt */ |
| 176 | unsigned int tuning_done; /* Condition flag set when CMD19 succeeds */ | 177 | unsigned int tuning_done; /* Condition flag set when CMD19 succeeds */ |
diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h index e7d5dd67bb74..ccd8fb2cad52 100644 --- a/include/linux/mmc/sh_mmcif.h +++ b/include/linux/mmc/sh_mmcif.h | |||
| @@ -16,7 +16,6 @@ | |||
| 16 | 16 | ||
| 17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
| 18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
| 19 | #include <linux/sh_dma.h> | ||
| 20 | 19 | ||
| 21 | /* | 20 | /* |
| 22 | * MMCIF : CE_CLK_CTRL [19:16] | 21 | * MMCIF : CE_CLK_CTRL [19:16] |
| @@ -33,12 +32,12 @@ | |||
| 33 | */ | 32 | */ |
| 34 | 33 | ||
| 35 | struct sh_mmcif_plat_data { | 34 | struct sh_mmcif_plat_data { |
| 36 | void (*set_pwr)(struct platform_device *pdev, int state); | ||
| 37 | void (*down_pwr)(struct platform_device *pdev); | ||
| 38 | int (*get_cd)(struct platform_device *pdef); | 35 | int (*get_cd)(struct platform_device *pdef); |
| 39 | unsigned int slave_id_tx; /* embedded slave_id_[tr]x */ | 36 | unsigned int slave_id_tx; /* embedded slave_id_[tr]x */ |
| 40 | unsigned int slave_id_rx; | 37 | unsigned int slave_id_rx; |
| 41 | bool use_cd_gpio : 1; | 38 | bool use_cd_gpio : 1; |
| 39 | bool ccs_unsupported : 1; | ||
| 40 | bool clk_ctrl2_present : 1; | ||
| 42 | unsigned int cd_gpio; | 41 | unsigned int cd_gpio; |
| 43 | u8 sup_pclk; /* 1 :SH7757, 0: SH7724/SH7372 */ | 42 | u8 sup_pclk; /* 1 :SH7757, 0: SH7724/SH7372 */ |
| 44 | unsigned long caps; | 43 | unsigned long caps; |
| @@ -62,6 +61,7 @@ struct sh_mmcif_plat_data { | |||
| 62 | #define MMCIF_CE_INT_MASK 0x00000044 | 61 | #define MMCIF_CE_INT_MASK 0x00000044 |
| 63 | #define MMCIF_CE_HOST_STS1 0x00000048 | 62 | #define MMCIF_CE_HOST_STS1 0x00000048 |
| 64 | #define MMCIF_CE_HOST_STS2 0x0000004C | 63 | #define MMCIF_CE_HOST_STS2 0x0000004C |
| 64 | #define MMCIF_CE_CLK_CTRL2 0x00000070 | ||
| 65 | #define MMCIF_CE_VERSION 0x0000007C | 65 | #define MMCIF_CE_VERSION 0x0000007C |
| 66 | 66 | ||
| 67 | /* CE_BUF_ACC */ | 67 | /* CE_BUF_ACC */ |
diff --git a/include/linux/mmc/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h index b76bcf0621f6..68927ae50845 100644 --- a/include/linux/mmc/sh_mobile_sdhi.h +++ b/include/linux/mmc/sh_mobile_sdhi.h | |||
| @@ -25,8 +25,6 @@ struct sh_mobile_sdhi_info { | |||
| 25 | unsigned long tmio_caps2; | 25 | unsigned long tmio_caps2; |
| 26 | u32 tmio_ocr_mask; /* available MMC voltages */ | 26 | u32 tmio_ocr_mask; /* available MMC voltages */ |
| 27 | unsigned int cd_gpio; | 27 | unsigned int cd_gpio; |
| 28 | void (*set_pwr)(struct platform_device *pdev, int state); | ||
| 29 | int (*get_cd)(struct platform_device *pdev); | ||
| 30 | 28 | ||
| 31 | /* callbacks for board specific setup code */ | 29 | /* callbacks for board specific setup code */ |
| 32 | int (*init)(struct platform_device *pdev, | 30 | int (*init)(struct platform_device *pdev, |
diff --git a/include/linux/mmc/slot-gpio.h b/include/linux/mmc/slot-gpio.h index 7d88d27bfafa..b0c73e4cacea 100644 --- a/include/linux/mmc/slot-gpio.h +++ b/include/linux/mmc/slot-gpio.h | |||
| @@ -18,7 +18,8 @@ int mmc_gpio_request_ro(struct mmc_host *host, unsigned int gpio); | |||
| 18 | void mmc_gpio_free_ro(struct mmc_host *host); | 18 | void mmc_gpio_free_ro(struct mmc_host *host); |
| 19 | 19 | ||
| 20 | int mmc_gpio_get_cd(struct mmc_host *host); | 20 | int mmc_gpio_get_cd(struct mmc_host *host); |
| 21 | int mmc_gpio_request_cd(struct mmc_host *host, unsigned int gpio); | 21 | int mmc_gpio_request_cd(struct mmc_host *host, unsigned int gpio, |
| 22 | unsigned int debounce); | ||
| 22 | void mmc_gpio_free_cd(struct mmc_host *host); | 23 | void mmc_gpio_free_cd(struct mmc_host *host); |
| 23 | 24 | ||
| 24 | #endif | 25 | #endif |
diff --git a/include/linux/spi/mmc_spi.h b/include/linux/spi/mmc_spi.h index 32be8dbdf191..274bc0fa00af 100644 --- a/include/linux/spi/mmc_spi.h +++ b/include/linux/spi/mmc_spi.h | |||
| @@ -7,6 +7,11 @@ | |||
| 7 | struct device; | 7 | struct device; |
| 8 | struct mmc_host; | 8 | struct mmc_host; |
| 9 | 9 | ||
| 10 | #define MMC_SPI_USE_CD_GPIO (1 << 0) | ||
| 11 | #define MMC_SPI_USE_RO_GPIO (1 << 1) | ||
| 12 | #define MMC_SPI_CD_GPIO_ACTIVE_LOW (1 << 2) | ||
| 13 | #define MMC_SPI_RO_GPIO_ACTIVE_LOW (1 << 3) | ||
| 14 | |||
| 10 | /* Put this in platform_data of a device being used to manage an MMC/SD | 15 | /* Put this in platform_data of a device being used to manage an MMC/SD |
| 11 | * card slot. (Modeled after PXA mmc glue; see that for usage examples.) | 16 | * card slot. (Modeled after PXA mmc glue; see that for usage examples.) |
| 12 | * | 17 | * |
| @@ -21,17 +26,19 @@ struct mmc_spi_platform_data { | |||
| 21 | void *); | 26 | void *); |
| 22 | void (*exit)(struct device *, void *); | 27 | void (*exit)(struct device *, void *); |
| 23 | 28 | ||
| 24 | /* sense switch on sd cards */ | ||
| 25 | int (*get_ro)(struct device *); | ||
| 26 | |||
| 27 | /* | 29 | /* |
| 28 | * If board does not use CD interrupts, driver can optimize polling | 30 | * Card Detect and Read Only GPIOs. To enable debouncing on the card |
| 29 | * using this function. | 31 | * detect GPIO, set the cd_debounce to the debounce time in |
| 32 | * microseconds. | ||
| 30 | */ | 33 | */ |
| 31 | int (*get_cd)(struct device *); | 34 | unsigned int flags; |
| 35 | unsigned int cd_gpio; | ||
| 36 | unsigned int cd_debounce; | ||
| 37 | unsigned int ro_gpio; | ||
| 32 | 38 | ||
| 33 | /* Capabilities to pass into mmc core (e.g. MMC_CAP_NEEDS_POLL). */ | 39 | /* Capabilities to pass into mmc core (e.g. MMC_CAP_NEEDS_POLL). */ |
| 34 | unsigned long caps; | 40 | unsigned long caps; |
| 41 | unsigned long caps2; | ||
| 35 | 42 | ||
| 36 | /* how long to debounce card detect, in msecs */ | 43 | /* how long to debounce card detect, in msecs */ |
| 37 | u16 detect_delay; | 44 | u16 detect_delay; |
