diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-09-21 15:38:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-09-21 15:38:45 -0400 |
commit | 5c0a95c73f80c034914e219eee8075acdf56b527 (patch) | |
tree | b6c4eba6b5a1070a673159f14472de741535eb79 /drivers/mmc/host | |
parent | baaea1dc0befb7b64e6dbf2d1469d0a296a79e54 (diff) | |
parent | a650031a6bd16cb6789da9b3c27fc97341239f12 (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:
mmc_test: initialize mmc_test_lock statically
mmc_block: handle error from mmc_register_driver()
atmel-mci: Set MMC_CAP_NEEDS_POLL if no detect_pin
atmel-mci: Fix bogus debugfs file size
atmel-mci: Fix memory leak in atmci_regs_show
atmel-mci: debugfs: enable clock before dumping regs
tmio_mmc: fix compilation with debug enabled
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r-- | drivers/mmc/host/atmel-mci.c | 12 | ||||
-rw-r--r-- | drivers/mmc/host/tmio_mmc.h | 4 |
2 files changed, 10 insertions, 6 deletions
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 0bd06f5bd62f..917035e16da4 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c | |||
@@ -195,7 +195,9 @@ static int atmci_regs_show(struct seq_file *s, void *v) | |||
195 | 195 | ||
196 | /* Grab a more or less consistent snapshot */ | 196 | /* Grab a more or less consistent snapshot */ |
197 | spin_lock_irq(&host->mmc->lock); | 197 | spin_lock_irq(&host->mmc->lock); |
198 | clk_enable(host->mck); | ||
198 | memcpy_fromio(buf, host->regs, MCI_REGS_SIZE); | 199 | memcpy_fromio(buf, host->regs, MCI_REGS_SIZE); |
200 | clk_disable(host->mck); | ||
199 | spin_unlock_irq(&host->mmc->lock); | 201 | spin_unlock_irq(&host->mmc->lock); |
200 | 202 | ||
201 | seq_printf(s, "MR:\t0x%08x%s%s CLKDIV=%u\n", | 203 | seq_printf(s, "MR:\t0x%08x%s%s CLKDIV=%u\n", |
@@ -216,6 +218,8 @@ static int atmci_regs_show(struct seq_file *s, void *v) | |||
216 | atmci_show_status_reg(s, "SR", buf[MCI_SR / 4]); | 218 | atmci_show_status_reg(s, "SR", buf[MCI_SR / 4]); |
217 | atmci_show_status_reg(s, "IMR", buf[MCI_IMR / 4]); | 219 | atmci_show_status_reg(s, "IMR", buf[MCI_IMR / 4]); |
218 | 220 | ||
221 | kfree(buf); | ||
222 | |||
219 | return 0; | 223 | return 0; |
220 | } | 224 | } |
221 | 225 | ||
@@ -237,7 +241,6 @@ static void atmci_init_debugfs(struct atmel_mci *host) | |||
237 | struct mmc_host *mmc; | 241 | struct mmc_host *mmc; |
238 | struct dentry *root; | 242 | struct dentry *root; |
239 | struct dentry *node; | 243 | struct dentry *node; |
240 | struct resource *res; | ||
241 | 244 | ||
242 | mmc = host->mmc; | 245 | mmc = host->mmc; |
243 | root = mmc->debugfs_root; | 246 | root = mmc->debugfs_root; |
@@ -251,9 +254,6 @@ static void atmci_init_debugfs(struct atmel_mci *host) | |||
251 | if (!node) | 254 | if (!node) |
252 | goto err; | 255 | goto err; |
253 | 256 | ||
254 | res = platform_get_resource(host->pdev, IORESOURCE_MEM, 0); | ||
255 | node->d_inode->i_size = res->end - res->start + 1; | ||
256 | |||
257 | node = debugfs_create_file("req", S_IRUSR, root, host, &atmci_req_fops); | 257 | node = debugfs_create_file("req", S_IRUSR, root, host, &atmci_req_fops); |
258 | if (!node) | 258 | if (!node) |
259 | goto err; | 259 | goto err; |
@@ -1059,6 +1059,10 @@ static int __init atmci_probe(struct platform_device *pdev) | |||
1059 | host->present = !gpio_get_value(host->detect_pin); | 1059 | host->present = !gpio_get_value(host->detect_pin); |
1060 | } | 1060 | } |
1061 | } | 1061 | } |
1062 | |||
1063 | if (!gpio_is_valid(host->detect_pin)) | ||
1064 | mmc->caps |= MMC_CAP_NEEDS_POLL; | ||
1065 | |||
1062 | if (gpio_is_valid(host->wp_pin)) { | 1066 | if (gpio_is_valid(host->wp_pin)) { |
1063 | if (gpio_request(host->wp_pin, "mmc_wp")) { | 1067 | if (gpio_request(host->wp_pin, "mmc_wp")) { |
1064 | dev_dbg(&mmc->class_dev, "no WP pin available\n"); | 1068 | dev_dbg(&mmc->class_dev, "no WP pin available\n"); |
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h index 9e647a06054f..ba2b4240a86a 100644 --- a/drivers/mmc/host/tmio_mmc.h +++ b/drivers/mmc/host/tmio_mmc.h | |||
@@ -159,10 +159,10 @@ static inline void tmio_mmc_kunmap_atomic(struct tmio_mmc_host *host, | |||
159 | #define STATUS_TO_TEXT(a) \ | 159 | #define STATUS_TO_TEXT(a) \ |
160 | do { \ | 160 | do { \ |
161 | if (status & TMIO_STAT_##a) \ | 161 | if (status & TMIO_STAT_##a) \ |
162 | printf(#a); \ | 162 | printk(#a); \ |
163 | } while (0) | 163 | } while (0) |
164 | 164 | ||
165 | void debug_status(u32 status) | 165 | void pr_debug_status(u32 status) |
166 | { | 166 | { |
167 | printk(KERN_DEBUG "status: %08x = ", status); | 167 | printk(KERN_DEBUG "status: %08x = ", status); |
168 | STATUS_TO_TEXT(CARD_REMOVE); | 168 | STATUS_TO_TEXT(CARD_REMOVE); |