diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-06 17:54:54 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-06 17:54:54 -0500 |
commit | 2442d3109943bafbdfc4f0495e3d10eeedc8390c (patch) | |
tree | 9700491eb6ca418ee226c5d8438464a1a2c87281 /include | |
parent | 02aedd69e2ef31b0fca1e8960cb1e7fd0c343110 (diff) | |
parent | f9d429a2e579ed7c51c49a81265f7e7d2c59c197 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: (32 commits)
mmc: tifm: replace kmap with page_address
mmc: sdhci: fix voltage ocr
mmc: sdhci: replace kmap with page_address
mmc: wbsd: replace kmap with page_address
mmc: handle pci_enable_device() return value in sdhci
mmc: Proper unclaim in mmc_block
mmc: change wbsd mailing list
mmc: Graceful fallback for fancy features
mmc: Handle wbsd's stupid command list
mmc: Allow host drivers to specify max block count
mmc: Allow host drivers to specify a max block size
tifm_sd: add suspend and resume functionality
tifm_core: add suspend/resume infrastructure for tifm devices
tifm_7xx1: prettify
tifm_7xx1: recognize device 0xac8f as supported
tifm_7xx1: switch from workqueue to kthread
tifm_7xx1: Merge media insert and media remove functions
tifm_7xx1: simplify eject function
Add dummy_signal_irq function to save check in ISR
Remove unused return value from signal_irq callback
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mmc/card.h | 3 | ||||
-rw-r--r-- | include/linux/mmc/host.h | 10 | ||||
-rw-r--r-- | include/linux/mmc/mmc.h | 1 | ||||
-rw-r--r-- | include/linux/mmc/protocol.h | 13 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 4 | ||||
-rw-r--r-- | include/linux/tifm.h | 35 |
6 files changed, 43 insertions, 23 deletions
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index d0e6a5497614..e45712acfac5 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
@@ -71,6 +71,7 @@ struct mmc_card { | |||
71 | #define MMC_STATE_SDCARD (1<<3) /* is an SD card */ | 71 | #define MMC_STATE_SDCARD (1<<3) /* is an SD card */ |
72 | #define MMC_STATE_READONLY (1<<4) /* card is read-only */ | 72 | #define MMC_STATE_READONLY (1<<4) /* card is read-only */ |
73 | #define MMC_STATE_HIGHSPEED (1<<5) /* card is in high speed mode */ | 73 | #define MMC_STATE_HIGHSPEED (1<<5) /* card is in high speed mode */ |
74 | #define MMC_STATE_BLOCKADDR (1<<6) /* card uses block-addressing */ | ||
74 | u32 raw_cid[4]; /* raw card CID */ | 75 | u32 raw_cid[4]; /* raw card CID */ |
75 | u32 raw_csd[4]; /* raw card CSD */ | 76 | u32 raw_csd[4]; /* raw card CSD */ |
76 | u32 raw_scr[2]; /* raw card SCR */ | 77 | u32 raw_scr[2]; /* raw card SCR */ |
@@ -87,6 +88,7 @@ struct mmc_card { | |||
87 | #define mmc_card_sd(c) ((c)->state & MMC_STATE_SDCARD) | 88 | #define mmc_card_sd(c) ((c)->state & MMC_STATE_SDCARD) |
88 | #define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY) | 89 | #define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY) |
89 | #define mmc_card_highspeed(c) ((c)->state & MMC_STATE_HIGHSPEED) | 90 | #define mmc_card_highspeed(c) ((c)->state & MMC_STATE_HIGHSPEED) |
91 | #define mmc_card_blockaddr(c) ((c)->state & MMC_STATE_BLOCKADDR) | ||
90 | 92 | ||
91 | #define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT) | 93 | #define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT) |
92 | #define mmc_card_set_dead(c) ((c)->state |= MMC_STATE_DEAD) | 94 | #define mmc_card_set_dead(c) ((c)->state |= MMC_STATE_DEAD) |
@@ -94,6 +96,7 @@ struct mmc_card { | |||
94 | #define mmc_card_set_sd(c) ((c)->state |= MMC_STATE_SDCARD) | 96 | #define mmc_card_set_sd(c) ((c)->state |= MMC_STATE_SDCARD) |
95 | #define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY) | 97 | #define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY) |
96 | #define mmc_card_set_highspeed(c) ((c)->state |= MMC_STATE_HIGHSPEED) | 98 | #define mmc_card_set_highspeed(c) ((c)->state |= MMC_STATE_HIGHSPEED) |
99 | #define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR) | ||
97 | 100 | ||
98 | #define mmc_card_name(c) ((c)->cid.prod_name) | 101 | #define mmc_card_name(c) ((c)->cid.prod_name) |
99 | #define mmc_card_id(c) ((c)->dev.bus_id) | 102 | #define mmc_card_id(c) ((c)->dev.bus_id) |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index c15ae1986b98..913e5752569f 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -92,8 +92,10 @@ struct mmc_host { | |||
92 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ | 92 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ |
93 | unsigned short max_hw_segs; /* see blk_queue_max_hw_segments */ | 93 | unsigned short max_hw_segs; /* see blk_queue_max_hw_segments */ |
94 | unsigned short max_phys_segs; /* see blk_queue_max_phys_segments */ | 94 | unsigned short max_phys_segs; /* see blk_queue_max_phys_segments */ |
95 | unsigned short max_sectors; /* see blk_queue_max_sectors */ | ||
96 | unsigned short unused; | 95 | unsigned short unused; |
96 | unsigned int max_req_size; /* maximum number of bytes in one req */ | ||
97 | unsigned int max_blk_size; /* maximum size of one mmc block */ | ||
98 | unsigned int max_blk_count; /* maximum number of blocks in one req */ | ||
97 | 99 | ||
98 | /* private data */ | 100 | /* private data */ |
99 | struct mmc_ios ios; /* current io bus settings */ | 101 | struct mmc_ios ios; /* current io bus settings */ |
@@ -106,8 +108,9 @@ struct mmc_host { | |||
106 | struct list_head cards; /* devices attached to this host */ | 108 | struct list_head cards; /* devices attached to this host */ |
107 | 109 | ||
108 | wait_queue_head_t wq; | 110 | wait_queue_head_t wq; |
109 | spinlock_t lock; /* card_busy lock */ | 111 | spinlock_t lock; /* claimed lock */ |
110 | struct mmc_card *card_busy; /* the MMC card claiming host */ | 112 | unsigned int claimed:1; /* host exclusively claimed */ |
113 | |||
111 | struct mmc_card *card_selected; /* the selected MMC card */ | 114 | struct mmc_card *card_selected; /* the selected MMC card */ |
112 | 115 | ||
113 | struct delayed_work detect; | 116 | struct delayed_work detect; |
@@ -126,6 +129,7 @@ static inline void *mmc_priv(struct mmc_host *host) | |||
126 | } | 129 | } |
127 | 130 | ||
128 | #define mmc_dev(x) ((x)->parent) | 131 | #define mmc_dev(x) ((x)->parent) |
132 | #define mmc_classdev(x) (&(x)->class_dev) | ||
129 | #define mmc_hostname(x) ((x)->class_dev.bus_id) | 133 | #define mmc_hostname(x) ((x)->class_dev.bus_id) |
130 | 134 | ||
131 | extern int mmc_suspend_host(struct mmc_host *, pm_message_t); | 135 | extern int mmc_suspend_host(struct mmc_host *, pm_message_t); |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index bcf24909d677..cdc54be804f1 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -43,6 +43,7 @@ struct mmc_command { | |||
43 | #define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC) | 43 | #define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC) |
44 | #define MMC_RSP_R3 (MMC_RSP_PRESENT) | 44 | #define MMC_RSP_R3 (MMC_RSP_PRESENT) |
45 | #define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) | 45 | #define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) |
46 | #define MMC_RSP_R7 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) | ||
46 | 47 | ||
47 | #define mmc_resp_type(cmd) ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE)) | 48 | #define mmc_resp_type(cmd) ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE)) |
48 | 49 | ||
diff --git a/include/linux/mmc/protocol.h b/include/linux/mmc/protocol.h index 2dce60c43f4b..c90b6768329d 100644 --- a/include/linux/mmc/protocol.h +++ b/include/linux/mmc/protocol.h | |||
@@ -79,9 +79,12 @@ | |||
79 | #define MMC_GEN_CMD 56 /* adtc [0] RD/WR R1 */ | 79 | #define MMC_GEN_CMD 56 /* adtc [0] RD/WR R1 */ |
80 | 80 | ||
81 | /* SD commands type argument response */ | 81 | /* SD commands type argument response */ |
82 | /* class 8 */ | 82 | /* class 0 */ |
83 | /* This is basically the same command as for MMC with some quirks. */ | 83 | /* This is basically the same command as for MMC with some quirks. */ |
84 | #define SD_SEND_RELATIVE_ADDR 3 /* bcr R6 */ | 84 | #define SD_SEND_RELATIVE_ADDR 3 /* bcr R6 */ |
85 | #define SD_SEND_IF_COND 8 /* bcr [11:0] See below R7 */ | ||
86 | |||
87 | /* class 10 */ | ||
85 | #define SD_SWITCH 6 /* adtc [31:0] See below R1 */ | 88 | #define SD_SWITCH 6 /* adtc [31:0] See below R1 */ |
86 | 89 | ||
87 | /* Application commands */ | 90 | /* Application commands */ |
@@ -115,6 +118,14 @@ | |||
115 | */ | 118 | */ |
116 | 119 | ||
117 | /* | 120 | /* |
121 | * SD_SEND_IF_COND argument format: | ||
122 | * | ||
123 | * [31:12] Reserved (0) | ||
124 | * [11:8] Host Voltage Supply Flags | ||
125 | * [7:0] Check Pattern (0xAA) | ||
126 | */ | ||
127 | |||
128 | /* | ||
118 | MMC status in R1 | 129 | MMC status in R1 |
119 | Type | 130 | Type |
120 | e : error bit | 131 | e : error bit |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 3d1d21035dec..ccd706f876ec 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -735,9 +735,11 @@ | |||
735 | #define PCI_DEVICE_ID_TI_TVP4020 0x3d07 | 735 | #define PCI_DEVICE_ID_TI_TVP4020 0x3d07 |
736 | #define PCI_DEVICE_ID_TI_4450 0x8011 | 736 | #define PCI_DEVICE_ID_TI_4450 0x8011 |
737 | #define PCI_DEVICE_ID_TI_XX21_XX11 0x8031 | 737 | #define PCI_DEVICE_ID_TI_XX21_XX11 0x8031 |
738 | #define PCI_DEVICE_ID_TI_XX21_XX11_FM 0x8033 | ||
738 | #define PCI_DEVICE_ID_TI_XX21_XX11_SD 0x8034 | 739 | #define PCI_DEVICE_ID_TI_XX21_XX11_SD 0x8034 |
739 | #define PCI_DEVICE_ID_TI_X515 0x8036 | 740 | #define PCI_DEVICE_ID_TI_X515 0x8036 |
740 | #define PCI_DEVICE_ID_TI_XX12 0x8039 | 741 | #define PCI_DEVICE_ID_TI_XX12 0x8039 |
742 | #define PCI_DEVICE_ID_TI_XX12_FM 0x803b | ||
741 | #define PCI_DEVICE_ID_TI_1130 0xac12 | 743 | #define PCI_DEVICE_ID_TI_1130 0xac12 |
742 | #define PCI_DEVICE_ID_TI_1031 0xac13 | 744 | #define PCI_DEVICE_ID_TI_1031 0xac13 |
743 | #define PCI_DEVICE_ID_TI_1131 0xac15 | 745 | #define PCI_DEVICE_ID_TI_1131 0xac15 |
@@ -765,6 +767,7 @@ | |||
765 | #define PCI_DEVICE_ID_TI_1510 0xac56 | 767 | #define PCI_DEVICE_ID_TI_1510 0xac56 |
766 | #define PCI_DEVICE_ID_TI_X620 0xac8d | 768 | #define PCI_DEVICE_ID_TI_X620 0xac8d |
767 | #define PCI_DEVICE_ID_TI_X420 0xac8e | 769 | #define PCI_DEVICE_ID_TI_X420 0xac8e |
770 | #define PCI_DEVICE_ID_TI_XX20_FM 0xac8f | ||
768 | 771 | ||
769 | #define PCI_VENDOR_ID_SONY 0x104d | 772 | #define PCI_VENDOR_ID_SONY 0x104d |
770 | 773 | ||
@@ -1971,6 +1974,7 @@ | |||
1971 | #define PCI_DEVICE_ID_TOPIC_TP560 0x0000 | 1974 | #define PCI_DEVICE_ID_TOPIC_TP560 0x0000 |
1972 | 1975 | ||
1973 | #define PCI_VENDOR_ID_ENE 0x1524 | 1976 | #define PCI_VENDOR_ID_ENE 0x1524 |
1977 | #define PCI_DEVICE_ID_ENE_CB712_SD 0x0550 | ||
1974 | #define PCI_DEVICE_ID_ENE_1211 0x1211 | 1978 | #define PCI_DEVICE_ID_ENE_1211 0x1211 |
1975 | #define PCI_DEVICE_ID_ENE_1225 0x1225 | 1979 | #define PCI_DEVICE_ID_ENE_1225 0x1225 |
1976 | #define PCI_DEVICE_ID_ENE_1410 0x1410 | 1980 | #define PCI_DEVICE_ID_ENE_1410 0x1410 |
diff --git a/include/linux/tifm.h b/include/linux/tifm.h index dfb8052eee5e..3deb0a6c1370 100644 --- a/include/linux/tifm.h +++ b/include/linux/tifm.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/wait.h> | 17 | #include <linux/wait.h> |
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
20 | #include <linux/scatterlist.h> | 20 | #include <linux/kthread.h> |
21 | 21 | ||
22 | /* Host registers (relative to pci base address): */ | 22 | /* Host registers (relative to pci base address): */ |
23 | enum { | 23 | enum { |
@@ -62,11 +62,10 @@ enum { | |||
62 | 62 | ||
63 | 63 | ||
64 | #define TIFM_IRQ_ENABLE 0x80000000 | 64 | #define TIFM_IRQ_ENABLE 0x80000000 |
65 | #define TIFM_IRQ_SOCKMASK 0x00000001 | 65 | #define TIFM_IRQ_SOCKMASK(x) (x) |
66 | #define TIFM_IRQ_CARDMASK 0x00000100 | 66 | #define TIFM_IRQ_CARDMASK(x) ((x) << 8) |
67 | #define TIFM_IRQ_FIFOMASK 0x00010000 | 67 | #define TIFM_IRQ_FIFOMASK(x) ((x) << 16) |
68 | #define TIFM_IRQ_SETALL 0xffffffff | 68 | #define TIFM_IRQ_SETALL 0xffffffff |
69 | #define TIFM_IRQ_SETALLSOCK 0x0000000f | ||
70 | 69 | ||
71 | #define TIFM_CTRL_LED 0x00000040 | 70 | #define TIFM_CTRL_LED 0x00000040 |
72 | #define TIFM_CTRL_FAST_CLK 0x00000100 | 71 | #define TIFM_CTRL_FAST_CLK 0x00000100 |
@@ -89,10 +88,9 @@ struct tifm_dev { | |||
89 | char __iomem *addr; | 88 | char __iomem *addr; |
90 | spinlock_t lock; | 89 | spinlock_t lock; |
91 | tifm_media_id media_id; | 90 | tifm_media_id media_id; |
92 | char wq_name[KOBJ_NAME_LEN]; | 91 | unsigned int socket_id; |
93 | struct workqueue_struct *wq; | ||
94 | 92 | ||
95 | unsigned int (*signal_irq)(struct tifm_dev *sock, | 93 | void (*signal_irq)(struct tifm_dev *sock, |
96 | unsigned int sock_irq_status); | 94 | unsigned int sock_irq_status); |
97 | 95 | ||
98 | struct tifm_driver *drv; | 96 | struct tifm_driver *drv; |
@@ -103,24 +101,23 @@ struct tifm_driver { | |||
103 | tifm_media_id *id_table; | 101 | tifm_media_id *id_table; |
104 | int (*probe)(struct tifm_dev *dev); | 102 | int (*probe)(struct tifm_dev *dev); |
105 | void (*remove)(struct tifm_dev *dev); | 103 | void (*remove)(struct tifm_dev *dev); |
104 | int (*suspend)(struct tifm_dev *dev, | ||
105 | pm_message_t state); | ||
106 | int (*resume)(struct tifm_dev *dev); | ||
106 | 107 | ||
107 | struct device_driver driver; | 108 | struct device_driver driver; |
108 | }; | 109 | }; |
109 | 110 | ||
110 | struct tifm_adapter { | 111 | struct tifm_adapter { |
111 | char __iomem *addr; | 112 | char __iomem *addr; |
112 | unsigned int irq_status; | ||
113 | unsigned int insert_mask; | ||
114 | unsigned int remove_mask; | ||
115 | spinlock_t lock; | 113 | spinlock_t lock; |
114 | unsigned int irq_status; | ||
115 | unsigned int socket_change_set; | ||
116 | wait_queue_head_t change_set_notify; | ||
116 | unsigned int id; | 117 | unsigned int id; |
117 | unsigned int max_sockets; | 118 | unsigned int num_sockets; |
118 | char wq_name[KOBJ_NAME_LEN]; | ||
119 | unsigned int inhibit_new_cards; | ||
120 | struct workqueue_struct *wq; | ||
121 | struct work_struct media_inserter; | ||
122 | struct work_struct media_remover; | ||
123 | struct tifm_dev **sockets; | 119 | struct tifm_dev **sockets; |
120 | struct task_struct *media_switcher; | ||
124 | struct class_device cdev; | 121 | struct class_device cdev; |
125 | struct device *dev; | 122 | struct device *dev; |
126 | 123 | ||
@@ -130,9 +127,9 @@ struct tifm_adapter { | |||
130 | struct tifm_adapter *tifm_alloc_adapter(void); | 127 | struct tifm_adapter *tifm_alloc_adapter(void); |
131 | void tifm_free_device(struct device *dev); | 128 | void tifm_free_device(struct device *dev); |
132 | void tifm_free_adapter(struct tifm_adapter *fm); | 129 | void tifm_free_adapter(struct tifm_adapter *fm); |
133 | int tifm_add_adapter(struct tifm_adapter *fm); | 130 | int tifm_add_adapter(struct tifm_adapter *fm, int (*mediathreadfn)(void *data)); |
134 | void tifm_remove_adapter(struct tifm_adapter *fm); | 131 | void tifm_remove_adapter(struct tifm_adapter *fm); |
135 | struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm, unsigned int id); | 132 | struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm); |
136 | int tifm_register_driver(struct tifm_driver *drv); | 133 | int tifm_register_driver(struct tifm_driver *drv); |
137 | void tifm_unregister_driver(struct tifm_driver *drv); | 134 | void tifm_unregister_driver(struct tifm_driver *drv); |
138 | void tifm_eject(struct tifm_dev *sock); | 135 | void tifm_eject(struct tifm_dev *sock); |