diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-10 17:35:22 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-10 17:35:22 -0400 |
| commit | 07888238f55056605cd23aa4ea3ca97d5e15938f (patch) | |
| tree | 1c89230d1d0ceab4a8b7f3a9a93a032ccca13aef /include/linux | |
| parent | 23adbe12ef7d3d4195e80800ab36b37bee28cd03 (diff) | |
| parent | 11bc9381b277a65ea4b3fe994e658f4a78512139 (diff) | |
Merge tag 'mmc-updates-for-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
Pull MMC update from Chris Ball:
"MMC highlights for 3.16:
Core:
- support HS400 mode of eMMC 5.0, via DT bindings mmc-hs400-1_{2,8}v
- if card init at 3.3v doesn't work, try 1.8v and 1.2v too
Drivers:
- moxart: New driver for MOXA ART SoCs
- rtsx_usb_sdmmc: New driver for Realtek USB card readers
- sdhci: Large rework around IRQ/regulator handling, remove card_tasklet
- sdhci-pci-o2micro: Add SeaBird SeaEagle SD3 support
- sunxi: New driver for Allwinner sunxi SoCs
- usdhi6rol0: New driver for Renesas SD/SDIO controller"
* tag 'mmc-updates-for-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (95 commits)
mmc: sdhci-s3c: use mmc_of_parse and remove the card_tasklet
mmc: add a driver for the Renesas usdhi6rol0 SD/SDIO host controller
mmc: sdhci-of-esdhc: Fixup compile error
mmc: tegra: fix reporting of base clock frequency
mmc: tegra: disable UHS modes
mmc: sdhci-dove: use mmc_of_parse() and remove card_tasklet CD handler
MAINTAINERS: mmc: Add path to git tree
mmc: dove: fix missing MACH_DOVE dependency
mmc: sdhci: SD tuning is broken for some controllers
mmc: sdhci-esdhc-imx: fix mmc ddr mode regression issue
mmc: sdhci-pci-o2micro: Add SeaBird SeaEagle SD3 support
mmc: omap_hsmmc: split omap-dma header file
mmc: omap_hsmmc: fix cmd23 multiblock read/write
mmc: omap_hsmmc: use devm_ioremap_resource
mmc: omap_hsmmc: use devm_request_threaded_irq
mmc: omap_hsmmc: use devm_request_irq
mmc: omap_hsmmc: use devm_clk_get
mmc: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs
mmc: wmt-sdmmc: Use GFP_KERNEL instead of hard-coded value
mmc: omap: Use DIV_ROUND_UP instead of open coded
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mmc/card.h | 29 | ||||
| -rw-r--r-- | include/linux/mmc/dw_mmc.h | 14 | ||||
| -rw-r--r-- | include/linux/mmc/host.h | 59 | ||||
| -rw-r--r-- | include/linux/mmc/mmc.h | 23 | ||||
| -rw-r--r-- | include/linux/mmc/sdhci.h | 15 | ||||
| -rw-r--r-- | include/linux/omap-dma.h | 19 | ||||
| -rw-r--r-- | include/linux/omap-dmaengine.h | 21 |
7 files changed, 105 insertions, 75 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index b73027298b3a..d424b9de3aff 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
| @@ -63,12 +63,12 @@ struct mmc_ext_csd { | |||
| 63 | unsigned int power_off_longtime; /* Units: ms */ | 63 | unsigned int power_off_longtime; /* Units: ms */ |
| 64 | u8 power_off_notification; /* state */ | 64 | u8 power_off_notification; /* state */ |
| 65 | unsigned int hs_max_dtr; | 65 | unsigned int hs_max_dtr; |
| 66 | unsigned int hs200_max_dtr; | ||
| 66 | #define MMC_HIGH_26_MAX_DTR 26000000 | 67 | #define MMC_HIGH_26_MAX_DTR 26000000 |
| 67 | #define MMC_HIGH_52_MAX_DTR 52000000 | 68 | #define MMC_HIGH_52_MAX_DTR 52000000 |
| 68 | #define MMC_HIGH_DDR_MAX_DTR 52000000 | 69 | #define MMC_HIGH_DDR_MAX_DTR 52000000 |
| 69 | #define MMC_HS200_MAX_DTR 200000000 | 70 | #define MMC_HS200_MAX_DTR 200000000 |
| 70 | unsigned int sectors; | 71 | unsigned int sectors; |
| 71 | unsigned int card_type; | ||
| 72 | unsigned int hc_erase_size; /* In sectors */ | 72 | unsigned int hc_erase_size; /* In sectors */ |
| 73 | unsigned int hc_erase_timeout; /* In milliseconds */ | 73 | unsigned int hc_erase_timeout; /* In milliseconds */ |
| 74 | unsigned int sec_trim_mult; /* Secure trim multiplier */ | 74 | unsigned int sec_trim_mult; /* Secure trim multiplier */ |
| @@ -110,6 +110,7 @@ struct mmc_ext_csd { | |||
| 110 | u8 raw_pwr_cl_200_360; /* 237 */ | 110 | u8 raw_pwr_cl_200_360; /* 237 */ |
| 111 | u8 raw_pwr_cl_ddr_52_195; /* 238 */ | 111 | u8 raw_pwr_cl_ddr_52_195; /* 238 */ |
| 112 | u8 raw_pwr_cl_ddr_52_360; /* 239 */ | 112 | u8 raw_pwr_cl_ddr_52_360; /* 239 */ |
| 113 | u8 raw_pwr_cl_ddr_200_360; /* 253 */ | ||
| 113 | u8 raw_bkops_status; /* 246 */ | 114 | u8 raw_bkops_status; /* 246 */ |
| 114 | u8 raw_sectors[4]; /* 212 - 4 bytes */ | 115 | u8 raw_sectors[4]; /* 212 - 4 bytes */ |
| 115 | 116 | ||
| @@ -194,6 +195,7 @@ struct sdio_cis { | |||
| 194 | }; | 195 | }; |
| 195 | 196 | ||
| 196 | struct mmc_host; | 197 | struct mmc_host; |
| 198 | struct mmc_ios; | ||
| 197 | struct sdio_func; | 199 | struct sdio_func; |
| 198 | struct sdio_func_tuple; | 200 | struct sdio_func_tuple; |
| 199 | 201 | ||
| @@ -250,15 +252,11 @@ struct mmc_card { | |||
| 250 | unsigned int state; /* (our) card state */ | 252 | unsigned int state; /* (our) card state */ |
| 251 | #define MMC_STATE_PRESENT (1<<0) /* present in sysfs */ | 253 | #define MMC_STATE_PRESENT (1<<0) /* present in sysfs */ |
| 252 | #define MMC_STATE_READONLY (1<<1) /* card is read-only */ | 254 | #define MMC_STATE_READONLY (1<<1) /* card is read-only */ |
| 253 | #define MMC_STATE_HIGHSPEED (1<<2) /* card is in high speed mode */ | 255 | #define MMC_STATE_BLOCKADDR (1<<2) /* card uses block-addressing */ |
| 254 | #define MMC_STATE_BLOCKADDR (1<<3) /* card uses block-addressing */ | 256 | #define MMC_CARD_SDXC (1<<3) /* card is SDXC */ |
| 255 | #define MMC_STATE_HIGHSPEED_DDR (1<<4) /* card is in high speed mode */ | 257 | #define MMC_CARD_REMOVED (1<<4) /* card has been removed */ |
| 256 | #define MMC_STATE_ULTRAHIGHSPEED (1<<5) /* card is in ultra high speed mode */ | 258 | #define MMC_STATE_DOING_BKOPS (1<<5) /* card is doing BKOPS */ |
| 257 | #define MMC_CARD_SDXC (1<<6) /* card is SDXC */ | 259 | #define MMC_STATE_SUSPENDED (1<<6) /* card is suspended */ |
| 258 | #define MMC_CARD_REMOVED (1<<7) /* card has been removed */ | ||
| 259 | #define MMC_STATE_HIGHSPEED_200 (1<<8) /* card is in HS200 mode */ | ||
| 260 | #define MMC_STATE_DOING_BKOPS (1<<10) /* card is doing BKOPS */ | ||
| 261 | #define MMC_STATE_SUSPENDED (1<<11) /* card is suspended */ | ||
| 262 | unsigned int quirks; /* card quirks */ | 260 | unsigned int quirks; /* card quirks */ |
| 263 | #define MMC_QUIRK_LENIENT_FN0 (1<<0) /* allow SDIO FN0 writes outside of the VS CCCR range */ | 261 | #define MMC_QUIRK_LENIENT_FN0 (1<<0) /* allow SDIO FN0 writes outside of the VS CCCR range */ |
| 264 | #define MMC_QUIRK_BLKSZ_FOR_BYTE_MODE (1<<1) /* use func->cur_blksize */ | 262 | #define MMC_QUIRK_BLKSZ_FOR_BYTE_MODE (1<<1) /* use func->cur_blksize */ |
| @@ -301,6 +299,7 @@ struct mmc_card { | |||
| 301 | struct sdio_func_tuple *tuples; /* unknown common tuples */ | 299 | struct sdio_func_tuple *tuples; /* unknown common tuples */ |
| 302 | 300 | ||
| 303 | unsigned int sd_bus_speed; /* Bus Speed Mode set for the card */ | 301 | unsigned int sd_bus_speed; /* Bus Speed Mode set for the card */ |
| 302 | unsigned int mmc_avail_type; /* supported device type by both host and card */ | ||
| 304 | 303 | ||
| 305 | struct dentry *debugfs_root; | 304 | struct dentry *debugfs_root; |
| 306 | struct mmc_part part[MMC_NUM_PHY_PARTITION]; /* physical partitions */ | 305 | struct mmc_part part[MMC_NUM_PHY_PARTITION]; /* physical partitions */ |
| @@ -353,7 +352,7 @@ struct mmc_fixup { | |||
| 353 | #define CID_OEMID_ANY ((unsigned short) -1) | 352 | #define CID_OEMID_ANY ((unsigned short) -1) |
| 354 | #define CID_NAME_ANY (NULL) | 353 | #define CID_NAME_ANY (NULL) |
| 355 | 354 | ||
| 356 | #define END_FIXUP { 0 } | 355 | #define END_FIXUP { NULL } |
| 357 | 356 | ||
| 358 | #define _FIXUP_EXT(_name, _manfid, _oemid, _rev_start, _rev_end, \ | 357 | #define _FIXUP_EXT(_name, _manfid, _oemid, _rev_start, _rev_end, \ |
| 359 | _cis_vendor, _cis_device, \ | 358 | _cis_vendor, _cis_device, \ |
| @@ -418,11 +417,7 @@ static inline void __maybe_unused remove_quirk(struct mmc_card *card, int data) | |||
| 418 | 417 | ||
| 419 | #define mmc_card_present(c) ((c)->state & MMC_STATE_PRESENT) | 418 | #define mmc_card_present(c) ((c)->state & MMC_STATE_PRESENT) |
| 420 | #define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY) | 419 | #define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY) |
| 421 | #define mmc_card_highspeed(c) ((c)->state & MMC_STATE_HIGHSPEED) | ||
| 422 | #define mmc_card_hs200(c) ((c)->state & MMC_STATE_HIGHSPEED_200) | ||
| 423 | #define mmc_card_blockaddr(c) ((c)->state & MMC_STATE_BLOCKADDR) | 420 | #define mmc_card_blockaddr(c) ((c)->state & MMC_STATE_BLOCKADDR) |
| 424 | #define mmc_card_ddr_mode(c) ((c)->state & MMC_STATE_HIGHSPEED_DDR) | ||
| 425 | #define mmc_card_uhs(c) ((c)->state & MMC_STATE_ULTRAHIGHSPEED) | ||
| 426 | #define mmc_card_ext_capacity(c) ((c)->state & MMC_CARD_SDXC) | 421 | #define mmc_card_ext_capacity(c) ((c)->state & MMC_CARD_SDXC) |
| 427 | #define mmc_card_removed(c) ((c) && ((c)->state & MMC_CARD_REMOVED)) | 422 | #define mmc_card_removed(c) ((c) && ((c)->state & MMC_CARD_REMOVED)) |
| 428 | #define mmc_card_doing_bkops(c) ((c)->state & MMC_STATE_DOING_BKOPS) | 423 | #define mmc_card_doing_bkops(c) ((c)->state & MMC_STATE_DOING_BKOPS) |
| @@ -430,11 +425,7 @@ static inline void __maybe_unused remove_quirk(struct mmc_card *card, int data) | |||
| 430 | 425 | ||
| 431 | #define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT) | 426 | #define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT) |
| 432 | #define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY) | 427 | #define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY) |
| 433 | #define mmc_card_set_highspeed(c) ((c)->state |= MMC_STATE_HIGHSPEED) | ||
| 434 | #define mmc_card_set_hs200(c) ((c)->state |= MMC_STATE_HIGHSPEED_200) | ||
| 435 | #define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR) | 428 | #define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR) |
| 436 | #define mmc_card_set_ddr_mode(c) ((c)->state |= MMC_STATE_HIGHSPEED_DDR) | ||
| 437 | #define mmc_card_set_uhs(c) ((c)->state |= MMC_STATE_ULTRAHIGHSPEED) | ||
| 438 | #define mmc_card_set_ext_capacity(c) ((c)->state |= MMC_CARD_SDXC) | 429 | #define mmc_card_set_ext_capacity(c) ((c)->state |= MMC_CARD_SDXC) |
| 439 | #define mmc_card_set_removed(c) ((c)->state |= MMC_CARD_REMOVED) | 430 | #define mmc_card_set_removed(c) ((c)->state |= MMC_CARD_REMOVED) |
| 440 | #define mmc_card_set_doing_bkops(c) ((c)->state |= MMC_STATE_DOING_BKOPS) | 431 | #define mmc_card_set_doing_bkops(c) ((c)->state |= MMC_STATE_DOING_BKOPS) |
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h index 6ce7d2cd3c7a..babaea93bca6 100644 --- a/include/linux/mmc/dw_mmc.h +++ b/include/linux/mmc/dw_mmc.h | |||
| @@ -248,20 +248,6 @@ struct dw_mci_board { | |||
| 248 | /* delay in mS before detecting cards after interrupt */ | 248 | /* delay in mS before detecting cards after interrupt */ |
| 249 | u32 detect_delay_ms; | 249 | u32 detect_delay_ms; |
| 250 | 250 | ||
| 251 | int (*init)(u32 slot_id, irq_handler_t , void *); | ||
| 252 | int (*get_ro)(u32 slot_id); | ||
| 253 | int (*get_cd)(u32 slot_id); | ||
| 254 | int (*get_ocr)(u32 slot_id); | ||
| 255 | int (*get_bus_wd)(u32 slot_id); | ||
| 256 | /* | ||
| 257 | * Enable power to selected slot and set voltage to desired level. | ||
| 258 | * Voltage levels are specified using MMC_VDD_xxx defines defined | ||
| 259 | * in linux/mmc/host.h file. | ||
| 260 | */ | ||
| 261 | void (*setpower)(u32 slot_id, u32 volt); | ||
| 262 | void (*exit)(u32 slot_id); | ||
| 263 | void (*select_slot)(u32 slot_id); | ||
| 264 | |||
| 265 | struct dw_mci_dma_ops *dma_ops; | 251 | struct dw_mci_dma_ops *dma_ops; |
| 266 | struct dma_pdata *data; | 252 | struct dma_pdata *data; |
| 267 | struct block_settings *blk_settings; | 253 | struct block_settings *blk_settings; |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index cb61ea4d6945..7960424d0bc0 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include <linux/fault-inject.h> | 17 | #include <linux/fault-inject.h> |
| 18 | 18 | ||
| 19 | #include <linux/mmc/core.h> | 19 | #include <linux/mmc/core.h> |
| 20 | #include <linux/mmc/card.h> | ||
| 20 | #include <linux/mmc/pm.h> | 21 | #include <linux/mmc/pm.h> |
| 21 | 22 | ||
| 22 | struct mmc_ios { | 23 | struct mmc_ios { |
| @@ -58,13 +59,9 @@ struct mmc_ios { | |||
| 58 | #define MMC_TIMING_UHS_SDR50 5 | 59 | #define MMC_TIMING_UHS_SDR50 5 |
| 59 | #define MMC_TIMING_UHS_SDR104 6 | 60 | #define MMC_TIMING_UHS_SDR104 6 |
| 60 | #define MMC_TIMING_UHS_DDR50 7 | 61 | #define MMC_TIMING_UHS_DDR50 7 |
| 61 | #define MMC_TIMING_MMC_HS200 8 | 62 | #define MMC_TIMING_MMC_DDR52 8 |
| 62 | 63 | #define MMC_TIMING_MMC_HS200 9 | |
| 63 | #define MMC_SDR_MODE 0 | 64 | #define MMC_TIMING_MMC_HS400 10 |
| 64 | #define MMC_1_2V_DDR_MODE 1 | ||
| 65 | #define MMC_1_8V_DDR_MODE 2 | ||
| 66 | #define MMC_1_2V_SDR_MODE 3 | ||
| 67 | #define MMC_1_8V_SDR_MODE 4 | ||
| 68 | 65 | ||
| 69 | unsigned char signal_voltage; /* signalling voltage (1.8V or 3.3V) */ | 66 | unsigned char signal_voltage; /* signalling voltage (1.8V or 3.3V) */ |
| 70 | 67 | ||
| @@ -136,6 +133,9 @@ struct mmc_host_ops { | |||
| 136 | 133 | ||
| 137 | /* The tuning command opcode value is different for SD and eMMC cards */ | 134 | /* The tuning command opcode value is different for SD and eMMC cards */ |
| 138 | int (*execute_tuning)(struct mmc_host *host, u32 opcode); | 135 | int (*execute_tuning)(struct mmc_host *host, u32 opcode); |
| 136 | |||
| 137 | /* Prepare HS400 target operating frequency depending host driver */ | ||
| 138 | int (*prepare_hs400_tuning)(struct mmc_host *host, struct mmc_ios *ios); | ||
| 139 | int (*select_drive_strength)(unsigned int max_dtr, int host_drv, int card_drv); | 139 | int (*select_drive_strength)(unsigned int max_dtr, int host_drv, int card_drv); |
| 140 | void (*hw_reset)(struct mmc_host *host); | 140 | void (*hw_reset)(struct mmc_host *host); |
| 141 | void (*card_event)(struct mmc_host *host); | 141 | void (*card_event)(struct mmc_host *host); |
| @@ -278,6 +278,11 @@ struct mmc_host { | |||
| 278 | #define MMC_CAP2_PACKED_CMD (MMC_CAP2_PACKED_RD | \ | 278 | #define MMC_CAP2_PACKED_CMD (MMC_CAP2_PACKED_RD | \ |
| 279 | MMC_CAP2_PACKED_WR) | 279 | MMC_CAP2_PACKED_WR) |
| 280 | #define MMC_CAP2_NO_PRESCAN_POWERUP (1 << 14) /* Don't power up before scan */ | 280 | #define MMC_CAP2_NO_PRESCAN_POWERUP (1 << 14) /* Don't power up before scan */ |
| 281 | #define MMC_CAP2_HS400_1_8V (1 << 15) /* Can support HS400 1.8V */ | ||
| 282 | #define MMC_CAP2_HS400_1_2V (1 << 16) /* Can support HS400 1.2V */ | ||
| 283 | #define MMC_CAP2_HS400 (MMC_CAP2_HS400_1_8V | \ | ||
| 284 | MMC_CAP2_HS400_1_2V) | ||
| 285 | #define MMC_CAP2_SDIO_IRQ_NOTHREAD (1 << 17) | ||
| 281 | 286 | ||
| 282 | mmc_pm_flag_t pm_caps; /* supported pm features */ | 287 | mmc_pm_flag_t pm_caps; /* supported pm features */ |
| 283 | 288 | ||
| @@ -318,6 +323,8 @@ struct mmc_host { | |||
| 318 | int rescan_disable; /* disable card detection */ | 323 | int rescan_disable; /* disable card detection */ |
| 319 | int rescan_entered; /* used with nonremovable devices */ | 324 | int rescan_entered; /* used with nonremovable devices */ |
| 320 | 325 | ||
| 326 | bool trigger_card_event; /* card_event necessary */ | ||
| 327 | |||
| 321 | struct mmc_card *card; /* device attached to this host */ | 328 | struct mmc_card *card; /* device attached to this host */ |
| 322 | 329 | ||
| 323 | wait_queue_head_t wq; | 330 | wait_queue_head_t wq; |
| @@ -391,12 +398,13 @@ static inline void mmc_signal_sdio_irq(struct mmc_host *host) | |||
| 391 | wake_up_process(host->sdio_irq_thread); | 398 | wake_up_process(host->sdio_irq_thread); |
| 392 | } | 399 | } |
| 393 | 400 | ||
| 401 | void sdio_run_irqs(struct mmc_host *host); | ||
| 402 | |||
| 394 | #ifdef CONFIG_REGULATOR | 403 | #ifdef CONFIG_REGULATOR |
| 395 | int mmc_regulator_get_ocrmask(struct regulator *supply); | 404 | int mmc_regulator_get_ocrmask(struct regulator *supply); |
| 396 | int mmc_regulator_set_ocr(struct mmc_host *mmc, | 405 | int mmc_regulator_set_ocr(struct mmc_host *mmc, |
| 397 | struct regulator *supply, | 406 | struct regulator *supply, |
| 398 | unsigned short vdd_bit); | 407 | unsigned short vdd_bit); |
| 399 | int mmc_regulator_get_supply(struct mmc_host *mmc); | ||
| 400 | #else | 408 | #else |
| 401 | static inline int mmc_regulator_get_ocrmask(struct regulator *supply) | 409 | static inline int mmc_regulator_get_ocrmask(struct regulator *supply) |
| 402 | { | 410 | { |
| @@ -409,13 +417,10 @@ static inline int mmc_regulator_set_ocr(struct mmc_host *mmc, | |||
| 409 | { | 417 | { |
| 410 | return 0; | 418 | return 0; |
| 411 | } | 419 | } |
| 412 | |||
| 413 | static inline int mmc_regulator_get_supply(struct mmc_host *mmc) | ||
| 414 | { | ||
| 415 | return 0; | ||
| 416 | } | ||
| 417 | #endif | 420 | #endif |
| 418 | 421 | ||
| 422 | int mmc_regulator_get_supply(struct mmc_host *mmc); | ||
| 423 | |||
| 419 | int mmc_pm_notify(struct notifier_block *notify_block, unsigned long, void *); | 424 | int mmc_pm_notify(struct notifier_block *notify_block, unsigned long, void *); |
| 420 | 425 | ||
| 421 | static inline int mmc_card_is_removable(struct mmc_host *host) | 426 | static inline int mmc_card_is_removable(struct mmc_host *host) |
| @@ -475,4 +480,32 @@ static inline unsigned int mmc_host_clk_rate(struct mmc_host *host) | |||
| 475 | return host->ios.clock; | 480 | return host->ios.clock; |
| 476 | } | 481 | } |
| 477 | #endif | 482 | #endif |
| 483 | |||
| 484 | static inline int mmc_card_hs(struct mmc_card *card) | ||
| 485 | { | ||
| 486 | return card->host->ios.timing == MMC_TIMING_SD_HS || | ||
| 487 | card->host->ios.timing == MMC_TIMING_MMC_HS; | ||
| 488 | } | ||
| 489 | |||
| 490 | static inline int mmc_card_uhs(struct mmc_card *card) | ||
| 491 | { | ||
| 492 | return card->host->ios.timing >= MMC_TIMING_UHS_SDR12 && | ||
| 493 | card->host->ios.timing <= MMC_TIMING_UHS_DDR50; | ||
| 494 | } | ||
| 495 | |||
| 496 | static inline bool mmc_card_hs200(struct mmc_card *card) | ||
| 497 | { | ||
| 498 | return card->host->ios.timing == MMC_TIMING_MMC_HS200; | ||
| 499 | } | ||
| 500 | |||
| 501 | static inline bool mmc_card_ddr52(struct mmc_card *card) | ||
| 502 | { | ||
| 503 | return card->host->ios.timing == MMC_TIMING_MMC_DDR52; | ||
| 504 | } | ||
| 505 | |||
| 506 | static inline bool mmc_card_hs400(struct mmc_card *card) | ||
| 507 | { | ||
| 508 | return card->host->ios.timing == MMC_TIMING_MMC_HS400; | ||
| 509 | } | ||
| 510 | |||
| 478 | #endif /* LINUX_MMC_HOST_H */ | 511 | #endif /* LINUX_MMC_HOST_H */ |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index 50bcde3677ca..64ec963ed347 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
| @@ -325,6 +325,7 @@ struct _mmc_csd { | |||
| 325 | #define EXT_CSD_POWER_OFF_LONG_TIME 247 /* RO */ | 325 | #define EXT_CSD_POWER_OFF_LONG_TIME 247 /* RO */ |
| 326 | #define EXT_CSD_GENERIC_CMD6_TIME 248 /* RO */ | 326 | #define EXT_CSD_GENERIC_CMD6_TIME 248 /* RO */ |
| 327 | #define EXT_CSD_CACHE_SIZE 249 /* RO, 4 bytes */ | 327 | #define EXT_CSD_CACHE_SIZE 249 /* RO, 4 bytes */ |
| 328 | #define EXT_CSD_PWR_CL_DDR_200_360 253 /* RO */ | ||
| 328 | #define EXT_CSD_TAG_UNIT_SIZE 498 /* RO */ | 329 | #define EXT_CSD_TAG_UNIT_SIZE 498 /* RO */ |
| 329 | #define EXT_CSD_DATA_TAG_SUPPORT 499 /* RO */ | 330 | #define EXT_CSD_DATA_TAG_SUPPORT 499 /* RO */ |
| 330 | #define EXT_CSD_MAX_PACKED_WRITES 500 /* RO */ | 331 | #define EXT_CSD_MAX_PACKED_WRITES 500 /* RO */ |
| @@ -354,18 +355,25 @@ struct _mmc_csd { | |||
| 354 | #define EXT_CSD_CMD_SET_SECURE (1<<1) | 355 | #define EXT_CSD_CMD_SET_SECURE (1<<1) |
| 355 | #define EXT_CSD_CMD_SET_CPSECURE (1<<2) | 356 | #define EXT_CSD_CMD_SET_CPSECURE (1<<2) |
| 356 | 357 | ||
| 357 | #define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */ | 358 | #define EXT_CSD_CARD_TYPE_HS_26 (1<<0) /* Card can run at 26MHz */ |
| 358 | #define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */ | 359 | #define EXT_CSD_CARD_TYPE_HS_52 (1<<1) /* Card can run at 52MHz */ |
| 359 | #define EXT_CSD_CARD_TYPE_MASK 0x3F /* Mask out reserved bits */ | 360 | #define EXT_CSD_CARD_TYPE_HS (EXT_CSD_CARD_TYPE_HS_26 | \ |
| 361 | EXT_CSD_CARD_TYPE_HS_52) | ||
| 360 | #define EXT_CSD_CARD_TYPE_DDR_1_8V (1<<2) /* Card can run at 52MHz */ | 362 | #define EXT_CSD_CARD_TYPE_DDR_1_8V (1<<2) /* Card can run at 52MHz */ |
| 361 | /* DDR mode @1.8V or 3V I/O */ | 363 | /* DDR mode @1.8V or 3V I/O */ |
| 362 | #define EXT_CSD_CARD_TYPE_DDR_1_2V (1<<3) /* Card can run at 52MHz */ | 364 | #define EXT_CSD_CARD_TYPE_DDR_1_2V (1<<3) /* Card can run at 52MHz */ |
| 363 | /* DDR mode @1.2V I/O */ | 365 | /* DDR mode @1.2V I/O */ |
| 364 | #define EXT_CSD_CARD_TYPE_DDR_52 (EXT_CSD_CARD_TYPE_DDR_1_8V \ | 366 | #define EXT_CSD_CARD_TYPE_DDR_52 (EXT_CSD_CARD_TYPE_DDR_1_8V \ |
| 365 | | EXT_CSD_CARD_TYPE_DDR_1_2V) | 367 | | EXT_CSD_CARD_TYPE_DDR_1_2V) |
| 366 | #define EXT_CSD_CARD_TYPE_SDR_1_8V (1<<4) /* Card can run at 200MHz */ | 368 | #define EXT_CSD_CARD_TYPE_HS200_1_8V (1<<4) /* Card can run at 200MHz */ |
| 367 | #define EXT_CSD_CARD_TYPE_SDR_1_2V (1<<5) /* Card can run at 200MHz */ | 369 | #define EXT_CSD_CARD_TYPE_HS200_1_2V (1<<5) /* Card can run at 200MHz */ |
| 368 | /* SDR mode @1.2V I/O */ | 370 | /* SDR mode @1.2V I/O */ |
| 371 | #define EXT_CSD_CARD_TYPE_HS200 (EXT_CSD_CARD_TYPE_HS200_1_8V | \ | ||
| 372 | EXT_CSD_CARD_TYPE_HS200_1_2V) | ||
| 373 | #define EXT_CSD_CARD_TYPE_HS400_1_8V (1<<6) /* Card can run at 200MHz DDR, 1.8V */ | ||
| 374 | #define EXT_CSD_CARD_TYPE_HS400_1_2V (1<<7) /* Card can run at 200MHz DDR, 1.2V */ | ||
| 375 | #define EXT_CSD_CARD_TYPE_HS400 (EXT_CSD_CARD_TYPE_HS400_1_8V | \ | ||
| 376 | EXT_CSD_CARD_TYPE_HS400_1_2V) | ||
| 369 | 377 | ||
| 370 | #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ | 378 | #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ |
| 371 | #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ | 379 | #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ |
| @@ -373,6 +381,11 @@ struct _mmc_csd { | |||
| 373 | #define EXT_CSD_DDR_BUS_WIDTH_4 5 /* Card is in 4 bit DDR mode */ | 381 | #define EXT_CSD_DDR_BUS_WIDTH_4 5 /* Card is in 4 bit DDR mode */ |
| 374 | #define EXT_CSD_DDR_BUS_WIDTH_8 6 /* Card is in 8 bit DDR mode */ | 382 | #define EXT_CSD_DDR_BUS_WIDTH_8 6 /* Card is in 8 bit DDR mode */ |
| 375 | 383 | ||
| 384 | #define EXT_CSD_TIMING_BC 0 /* Backwards compatility */ | ||
| 385 | #define EXT_CSD_TIMING_HS 1 /* High speed */ | ||
| 386 | #define EXT_CSD_TIMING_HS200 2 /* HS200 */ | ||
| 387 | #define EXT_CSD_TIMING_HS400 3 /* HS400 */ | ||
| 388 | |||
| 376 | #define EXT_CSD_SEC_ER_EN BIT(0) | 389 | #define EXT_CSD_SEC_ER_EN BIT(0) |
| 377 | #define EXT_CSD_SEC_BD_BLK_EN BIT(2) | 390 | #define EXT_CSD_SEC_BD_BLK_EN BIT(2) |
| 378 | #define EXT_CSD_SEC_GB_CL_EN BIT(4) | 391 | #define EXT_CSD_SEC_GB_CL_EN BIT(4) |
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index 7be12b883485..08abe9941884 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h | |||
| @@ -57,12 +57,8 @@ struct sdhci_host { | |||
| 57 | #define SDHCI_QUIRK_BROKEN_CARD_DETECTION (1<<15) | 57 | #define SDHCI_QUIRK_BROKEN_CARD_DETECTION (1<<15) |
| 58 | /* Controller reports inverted write-protect state */ | 58 | /* Controller reports inverted write-protect state */ |
| 59 | #define SDHCI_QUIRK_INVERTED_WRITE_PROTECT (1<<16) | 59 | #define SDHCI_QUIRK_INVERTED_WRITE_PROTECT (1<<16) |
| 60 | /* Controller has nonstandard clock management */ | ||
| 61 | #define SDHCI_QUIRK_NONSTANDARD_CLOCK (1<<17) | ||
| 62 | /* Controller does not like fast PIO transfers */ | 60 | /* Controller does not like fast PIO transfers */ |
| 63 | #define SDHCI_QUIRK_PIO_NEEDS_DELAY (1<<18) | 61 | #define SDHCI_QUIRK_PIO_NEEDS_DELAY (1<<18) |
| 64 | /* Controller losing signal/interrupt enable states after reset */ | ||
| 65 | #define SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET (1<<19) | ||
| 66 | /* Controller has to be forced to use block size of 2048 bytes */ | 62 | /* Controller has to be forced to use block size of 2048 bytes */ |
| 67 | #define SDHCI_QUIRK_FORCE_BLK_SZ_2048 (1<<20) | 63 | #define SDHCI_QUIRK_FORCE_BLK_SZ_2048 (1<<20) |
| 68 | /* Controller cannot do multi-block transfers */ | 64 | /* Controller cannot do multi-block transfers */ |
| @@ -147,6 +143,7 @@ struct sdhci_host { | |||
| 147 | 143 | ||
| 148 | bool runtime_suspended; /* Host is runtime suspended */ | 144 | bool runtime_suspended; /* Host is runtime suspended */ |
| 149 | bool bus_on; /* Bus power prevents runtime suspend */ | 145 | bool bus_on; /* Bus power prevents runtime suspend */ |
| 146 | bool preset_enabled; /* Preset is enabled */ | ||
| 150 | 147 | ||
| 151 | struct mmc_request *mrq; /* Current request */ | 148 | struct mmc_request *mrq; /* Current request */ |
| 152 | struct mmc_command *cmd; /* Current command */ | 149 | struct mmc_command *cmd; /* Current command */ |
| @@ -164,8 +161,7 @@ struct sdhci_host { | |||
| 164 | dma_addr_t adma_addr; /* Mapped ADMA descr. table */ | 161 | dma_addr_t adma_addr; /* Mapped ADMA descr. table */ |
| 165 | dma_addr_t align_addr; /* Mapped bounce buffer */ | 162 | dma_addr_t align_addr; /* Mapped bounce buffer */ |
| 166 | 163 | ||
| 167 | struct tasklet_struct card_tasklet; /* Tasklet structures */ | 164 | struct tasklet_struct finish_tasklet; /* Tasklet structures */ |
| 168 | struct tasklet_struct finish_tasklet; | ||
| 169 | 165 | ||
| 170 | struct timer_list timer; /* Timer for timeouts */ | 166 | struct timer_list timer; /* Timer for timeouts */ |
| 171 | 167 | ||
| @@ -177,6 +173,13 @@ struct sdhci_host { | |||
| 177 | unsigned int ocr_avail_mmc; | 173 | unsigned int ocr_avail_mmc; |
| 178 | u32 ocr_mask; /* available voltages */ | 174 | u32 ocr_mask; /* available voltages */ |
| 179 | 175 | ||
| 176 | unsigned timing; /* Current timing */ | ||
| 177 | |||
| 178 | u32 thread_isr; | ||
| 179 | |||
| 180 | /* cached registers */ | ||
| 181 | u32 ier; | ||
| 182 | |||
| 180 | wait_queue_head_t buf_ready_int; /* Waitqueue for Buffer Read Ready interrupt */ | 183 | wait_queue_head_t buf_ready_int; /* Waitqueue for Buffer Read Ready interrupt */ |
| 181 | unsigned int tuning_done; /* Condition flag set when CMD19 succeeds */ | 184 | unsigned int tuning_done; /* Condition flag set when CMD19 succeeds */ |
| 182 | 185 | ||
diff --git a/include/linux/omap-dma.h b/include/linux/omap-dma.h index c29a6dee6bec..88e6ea4a5d36 100644 --- a/include/linux/omap-dma.h +++ b/include/linux/omap-dma.h | |||
| @@ -1,23 +1,6 @@ | |||
| 1 | /* | ||
| 2 | * OMAP DMA Engine support | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License version 2 as | ||
| 6 | * published by the Free Software Foundation. | ||
| 7 | */ | ||
| 8 | #ifndef __LINUX_OMAP_DMA_H | 1 | #ifndef __LINUX_OMAP_DMA_H |
| 9 | #define __LINUX_OMAP_DMA_H | 2 | #define __LINUX_OMAP_DMA_H |
| 10 | 3 | #include <linux/omap-dmaengine.h> | |
| 11 | struct dma_chan; | ||
| 12 | |||
| 13 | #if defined(CONFIG_DMA_OMAP) || (defined(CONFIG_DMA_OMAP_MODULE) && defined(MODULE)) | ||
| 14 | bool omap_dma_filter_fn(struct dma_chan *, void *); | ||
| 15 | #else | ||
| 16 | static inline bool omap_dma_filter_fn(struct dma_chan *c, void *d) | ||
| 17 | { | ||
| 18 | return false; | ||
| 19 | } | ||
| 20 | #endif | ||
| 21 | 4 | ||
| 22 | /* | 5 | /* |
| 23 | * Legacy OMAP DMA handling defines and functions | 6 | * Legacy OMAP DMA handling defines and functions |
diff --git a/include/linux/omap-dmaengine.h b/include/linux/omap-dmaengine.h new file mode 100644 index 000000000000..8e6906c72e90 --- /dev/null +++ b/include/linux/omap-dmaengine.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* | ||
| 2 | * OMAP DMA Engine support | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License version 2 as | ||
| 6 | * published by the Free Software Foundation. | ||
| 7 | */ | ||
| 8 | #ifndef __LINUX_OMAP_DMAENGINE_H | ||
| 9 | #define __LINUX_OMAP_DMAENGINE_H | ||
| 10 | |||
| 11 | struct dma_chan; | ||
| 12 | |||
| 13 | #if defined(CONFIG_DMA_OMAP) || (defined(CONFIG_DMA_OMAP_MODULE) && defined(MODULE)) | ||
| 14 | bool omap_dma_filter_fn(struct dma_chan *, void *); | ||
| 15 | #else | ||
| 16 | static inline bool omap_dma_filter_fn(struct dma_chan *c, void *d) | ||
| 17 | { | ||
| 18 | return false; | ||
| 19 | } | ||
| 20 | #endif | ||
| 21 | #endif /* __LINUX_OMAP_DMAENGINE_H */ | ||
