aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-at91/at91_mci.h4
-rw-r--r--include/asm-arm/arch-s3c2410/regs-sdi.h20
-rw-r--r--include/asm-arm/plat-s3c24xx/mci.h15
-rw-r--r--include/asm-avr32/arch-at32ap/board.h6
-rw-r--r--include/asm-avr32/atmel-mci.h9
-rw-r--r--include/asm-mips/mach-au1x00/au1100_mmc.h18
-rw-r--r--include/linux/mmc/core.h1
-rw-r--r--include/linux/mmc/host.h32
-rw-r--r--include/linux/mmc/mmc.h1
-rw-r--r--include/linux/mmc/sdio_func.h21
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/spi/mmc_spi.h9
12 files changed, 108 insertions, 29 deletions
diff --git a/include/asm-arm/arch-at91/at91_mci.h b/include/asm-arm/arch-at91/at91_mci.h
index 1551fc24eb43..400ec10014b4 100644
--- a/include/asm-arm/arch-at91/at91_mci.h
+++ b/include/asm-arm/arch-at91/at91_mci.h
@@ -75,6 +75,10 @@
75#define AT91_MCI_TRTYP_MULTIPLE (1 << 19) 75#define AT91_MCI_TRTYP_MULTIPLE (1 << 19)
76#define AT91_MCI_TRTYP_STREAM (2 << 19) 76#define AT91_MCI_TRTYP_STREAM (2 << 19)
77 77
78#define AT91_MCI_BLKR 0x18 /* Block Register */
79#define AT91_MCI_BLKR_BCNT(n) ((0xffff & (n)) << 0) /* Block count */
80#define AT91_MCI_BLKR_BLKLEN(n) ((0xffff & (n)) << 16) /* Block lenght */
81
78#define AT91_MCI_RSPR(n) (0x20 + ((n) * 4)) /* Response Registers 0-3 */ 82#define AT91_MCI_RSPR(n) (0x20 + ((n) * 4)) /* Response Registers 0-3 */
79#define AT91_MCR_RDR 0x30 /* Receive Data Register */ 83#define AT91_MCR_RDR 0x30 /* Receive Data Register */
80#define AT91_MCR_TDR 0x34 /* Transmit Data Register */ 84#define AT91_MCR_TDR 0x34 /* Transmit Data Register */
diff --git a/include/asm-arm/arch-s3c2410/regs-sdi.h b/include/asm-arm/arch-s3c2410/regs-sdi.h
index bb9d30b72952..bfb222fa4abb 100644
--- a/include/asm-arm/arch-s3c2410/regs-sdi.h
+++ b/include/asm-arm/arch-s3c2410/regs-sdi.h
@@ -28,9 +28,15 @@
28#define S3C2410_SDIDCNT (0x30) 28#define S3C2410_SDIDCNT (0x30)
29#define S3C2410_SDIDSTA (0x34) 29#define S3C2410_SDIDSTA (0x34)
30#define S3C2410_SDIFSTA (0x38) 30#define S3C2410_SDIFSTA (0x38)
31
31#define S3C2410_SDIDATA (0x3C) 32#define S3C2410_SDIDATA (0x3C)
32#define S3C2410_SDIIMSK (0x40) 33#define S3C2410_SDIIMSK (0x40)
33 34
35#define S3C2440_SDIDATA (0x40)
36#define S3C2440_SDIIMSK (0x3C)
37
38#define S3C2440_SDICON_SDRESET (1<<8)
39#define S3C2440_SDICON_MMCCLOCK (1<<5)
34#define S3C2410_SDICON_BYTEORDER (1<<4) 40#define S3C2410_SDICON_BYTEORDER (1<<4)
35#define S3C2410_SDICON_SDIOIRQ (1<<3) 41#define S3C2410_SDICON_SDIOIRQ (1<<3)
36#define S3C2410_SDICON_RWAITEN (1<<2) 42#define S3C2410_SDICON_RWAITEN (1<<2)
@@ -42,7 +48,8 @@
42#define S3C2410_SDICMDCON_LONGRSP (1<<10) 48#define S3C2410_SDICMDCON_LONGRSP (1<<10)
43#define S3C2410_SDICMDCON_WAITRSP (1<<9) 49#define S3C2410_SDICMDCON_WAITRSP (1<<9)
44#define S3C2410_SDICMDCON_CMDSTART (1<<8) 50#define S3C2410_SDICMDCON_CMDSTART (1<<8)
45#define S3C2410_SDICMDCON_INDEX (0xff) 51#define S3C2410_SDICMDCON_SENDERHOST (1<<6)
52#define S3C2410_SDICMDCON_INDEX (0x3f)
46 53
47#define S3C2410_SDICMDSTAT_CRCFAIL (1<<12) 54#define S3C2410_SDICMDSTAT_CRCFAIL (1<<12)
48#define S3C2410_SDICMDSTAT_CMDSENT (1<<11) 55#define S3C2410_SDICMDSTAT_CMDSENT (1<<11)
@@ -51,6 +58,9 @@
51#define S3C2410_SDICMDSTAT_XFERING (1<<8) 58#define S3C2410_SDICMDSTAT_XFERING (1<<8)
52#define S3C2410_SDICMDSTAT_INDEX (0xff) 59#define S3C2410_SDICMDSTAT_INDEX (0xff)
53 60
61#define S3C2440_SDIDCON_DS_BYTE (0<<22)
62#define S3C2440_SDIDCON_DS_HALFWORD (1<<22)
63#define S3C2440_SDIDCON_DS_WORD (2<<22)
54#define S3C2410_SDIDCON_IRQPERIOD (1<<21) 64#define S3C2410_SDIDCON_IRQPERIOD (1<<21)
55#define S3C2410_SDIDCON_TXAFTERRESP (1<<20) 65#define S3C2410_SDIDCON_TXAFTERRESP (1<<20)
56#define S3C2410_SDIDCON_RXAFTERCMD (1<<19) 66#define S3C2410_SDIDCON_RXAFTERCMD (1<<19)
@@ -59,6 +69,7 @@
59#define S3C2410_SDIDCON_WIDEBUS (1<<16) 69#define S3C2410_SDIDCON_WIDEBUS (1<<16)
60#define S3C2410_SDIDCON_DMAEN (1<<15) 70#define S3C2410_SDIDCON_DMAEN (1<<15)
61#define S3C2410_SDIDCON_STOP (1<<14) 71#define S3C2410_SDIDCON_STOP (1<<14)
72#define S3C2440_SDIDCON_DATSTART (1<<14)
62#define S3C2410_SDIDCON_DATMODE (3<<12) 73#define S3C2410_SDIDCON_DATMODE (3<<12)
63#define S3C2410_SDIDCON_BLKNUM (0x7ff) 74#define S3C2410_SDIDCON_BLKNUM (0x7ff)
64 75
@@ -68,6 +79,7 @@
68#define S3C2410_SDIDCON_XFER_RXSTART (2<<12) 79#define S3C2410_SDIDCON_XFER_RXSTART (2<<12)
69#define S3C2410_SDIDCON_XFER_TXSTART (3<<12) 80#define S3C2410_SDIDCON_XFER_TXSTART (3<<12)
70 81
82#define S3C2410_SDIDCON_BLKNUM_MASK (0xFFF)
71#define S3C2410_SDIDCNT_BLKNUM_SHIFT (12) 83#define S3C2410_SDIDCNT_BLKNUM_SHIFT (12)
72 84
73#define S3C2410_SDIDSTA_RDYWAITREQ (1<<10) 85#define S3C2410_SDIDSTA_RDYWAITREQ (1<<10)
@@ -82,10 +94,12 @@
82#define S3C2410_SDIDSTA_TXDATAON (1<<1) 94#define S3C2410_SDIDSTA_TXDATAON (1<<1)
83#define S3C2410_SDIDSTA_RXDATAON (1<<0) 95#define S3C2410_SDIDSTA_RXDATAON (1<<0)
84 96
97#define S3C2440_SDIFSTA_FIFORESET (1<<16)
98#define S3C2440_SDIFSTA_FIFOFAIL (3<<14) /* 3 is correct (2 bits) */
85#define S3C2410_SDIFSTA_TFDET (1<<13) 99#define S3C2410_SDIFSTA_TFDET (1<<13)
86#define S3C2410_SDIFSTA_RFDET (1<<12) 100#define S3C2410_SDIFSTA_RFDET (1<<12)
87#define S3C2410_SDIFSTA_TXHALF (1<<11) 101#define S3C2410_SDIFSTA_TFHALF (1<<11)
88#define S3C2410_SDIFSTA_TXEMPTY (1<<10) 102#define S3C2410_SDIFSTA_TFEMPTY (1<<10)
89#define S3C2410_SDIFSTA_RFLAST (1<<9) 103#define S3C2410_SDIFSTA_RFLAST (1<<9)
90#define S3C2410_SDIFSTA_RFFULL (1<<8) 104#define S3C2410_SDIFSTA_RFFULL (1<<8)
91#define S3C2410_SDIFSTA_RFHALF (1<<7) 105#define S3C2410_SDIFSTA_RFHALF (1<<7)
diff --git a/include/asm-arm/plat-s3c24xx/mci.h b/include/asm-arm/plat-s3c24xx/mci.h
new file mode 100644
index 000000000000..2d0852ac3b27
--- /dev/null
+++ b/include/asm-arm/plat-s3c24xx/mci.h
@@ -0,0 +1,15 @@
1#ifndef _ARCH_MCI_H
2#define _ARCH_MCI_H
3
4struct s3c24xx_mci_pdata {
5 unsigned int wprotect_invert : 1;
6 unsigned int detect_invert : 1; /* set => detect active high. */
7
8 unsigned int gpio_detect;
9 unsigned int gpio_wprotect;
10 unsigned long ocr_avail;
11 void (*set_power)(unsigned char power_mode,
12 unsigned short vdd);
13};
14
15#endif /* _ARCH_NCI_H */
diff --git a/include/asm-avr32/arch-at32ap/board.h b/include/asm-avr32/arch-at32ap/board.h
index b4cddfaca90e..a3783861cdd2 100644
--- a/include/asm-avr32/arch-at32ap/board.h
+++ b/include/asm-avr32/arch-at32ap/board.h
@@ -77,7 +77,11 @@ struct i2c_board_info;
77struct platform_device *at32_add_device_twi(unsigned int id, 77struct platform_device *at32_add_device_twi(unsigned int id,
78 struct i2c_board_info *b, 78 struct i2c_board_info *b,
79 unsigned int n); 79 unsigned int n);
80struct platform_device *at32_add_device_mci(unsigned int id); 80
81struct mci_platform_data;
82struct platform_device *
83at32_add_device_mci(unsigned int id, struct mci_platform_data *data);
84
81struct platform_device *at32_add_device_ac97c(unsigned int id); 85struct platform_device *at32_add_device_ac97c(unsigned int id);
82struct platform_device *at32_add_device_abdac(unsigned int id); 86struct platform_device *at32_add_device_abdac(unsigned int id);
83struct platform_device *at32_add_device_psif(unsigned int id); 87struct platform_device *at32_add_device_psif(unsigned int id);
diff --git a/include/asm-avr32/atmel-mci.h b/include/asm-avr32/atmel-mci.h
new file mode 100644
index 000000000000..c2ea6e1c9aa1
--- /dev/null
+++ b/include/asm-avr32/atmel-mci.h
@@ -0,0 +1,9 @@
1#ifndef __ASM_AVR32_ATMEL_MCI_H
2#define __ASM_AVR32_ATMEL_MCI_H
3
4struct mci_platform_data {
5 int detect_pin;
6 int wp_pin;
7};
8
9#endif /* __ASM_AVR32_ATMEL_MCI_H */
diff --git a/include/asm-mips/mach-au1x00/au1100_mmc.h b/include/asm-mips/mach-au1x00/au1100_mmc.h
index 9e0028f60a43..c35e20918490 100644
--- a/include/asm-mips/mach-au1x00/au1100_mmc.h
+++ b/include/asm-mips/mach-au1x00/au1100_mmc.h
@@ -38,15 +38,15 @@
38#ifndef __ASM_AU1100_MMC_H 38#ifndef __ASM_AU1100_MMC_H
39#define __ASM_AU1100_MMC_H 39#define __ASM_AU1100_MMC_H
40 40
41 41#include <linux/leds.h>
42#define NUM_AU1100_MMC_CONTROLLERS 2 42
43 43struct au1xmmc_platform_data {
44#if defined(CONFIG_SOC_AU1100) 44 int(*cd_setup)(void *mmc_host, int on);
45#define AU1100_SD_IRQ AU1100_SD_INT 45 int(*card_inserted)(void *mmc_host);
46#elif defined(CONFIG_SOC_AU1200) 46 int(*card_readonly)(void *mmc_host);
47#define AU1100_SD_IRQ AU1200_SD_INT 47 void(*set_power)(void *mmc_host, int state);
48#endif 48 struct led_classdev *led;
49 49};
50 50
51#define SD0_BASE 0xB0600000 51#define SD0_BASE 0xB0600000
52#define SD1_BASE 0xB0680000 52#define SD1_BASE 0xB0680000
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index d0c3abed74c2..143cebf0586f 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -135,6 +135,7 @@ extern int mmc_wait_for_app_cmd(struct mmc_host *, struct mmc_card *,
135 struct mmc_command *, int); 135 struct mmc_command *, int);
136 136
137extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *); 137extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *);
138extern unsigned int mmc_align_data_size(struct mmc_card *, unsigned int);
138 139
139extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort); 140extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort);
140extern void mmc_release_host(struct mmc_host *host); 141extern void mmc_release_host(struct mmc_host *host);
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 7ab962fa1d73..10a2080086ca 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -51,8 +51,30 @@ struct mmc_ios {
51 51
52struct mmc_host_ops { 52struct mmc_host_ops {
53 void (*request)(struct mmc_host *host, struct mmc_request *req); 53 void (*request)(struct mmc_host *host, struct mmc_request *req);
54 /*
55 * Avoid calling these three functions too often or in a "fast path",
56 * since underlaying controller might implement them in an expensive
57 * and/or slow way.
58 *
59 * Also note that these functions might sleep, so don't call them
60 * in the atomic contexts!
61 *
62 * Return values for the get_ro callback should be:
63 * 0 for a read/write card
64 * 1 for a read-only card
65 * -ENOSYS when not supported (equal to NULL callback)
66 * or a negative errno value when something bad happened
67 *
68 * Return values for the get_ro callback should be:
69 * 0 for a absent card
70 * 1 for a present card
71 * -ENOSYS when not supported (equal to NULL callback)
72 * or a negative errno value when something bad happened
73 */
54 void (*set_ios)(struct mmc_host *host, struct mmc_ios *ios); 74 void (*set_ios)(struct mmc_host *host, struct mmc_ios *ios);
55 int (*get_ro)(struct mmc_host *host); 75 int (*get_ro)(struct mmc_host *host);
76 int (*get_cd)(struct mmc_host *host);
77
56 void (*enable_sdio_irq)(struct mmc_host *host, int enable); 78 void (*enable_sdio_irq)(struct mmc_host *host, int enable);
57}; 79};
58 80
@@ -89,11 +111,11 @@ struct mmc_host {
89 unsigned long caps; /* Host capabilities */ 111 unsigned long caps; /* Host capabilities */
90 112
91#define MMC_CAP_4_BIT_DATA (1 << 0) /* Can the host do 4 bit transfers */ 113#define MMC_CAP_4_BIT_DATA (1 << 0) /* Can the host do 4 bit transfers */
92#define MMC_CAP_MULTIWRITE (1 << 1) /* Can accurately report bytes sent to card on error */ 114#define MMC_CAP_MMC_HIGHSPEED (1 << 1) /* Can do MMC high-speed timing */
93#define MMC_CAP_MMC_HIGHSPEED (1 << 2) /* Can do MMC high-speed timing */ 115#define MMC_CAP_SD_HIGHSPEED (1 << 2) /* Can do SD high-speed timing */
94#define MMC_CAP_SD_HIGHSPEED (1 << 3) /* Can do SD high-speed timing */ 116#define MMC_CAP_SDIO_IRQ (1 << 3) /* Can signal pending SDIO IRQs */
95#define MMC_CAP_SDIO_IRQ (1 << 4) /* Can signal pending SDIO IRQs */ 117#define MMC_CAP_SPI (1 << 4) /* Talks only SPI protocols */
96#define MMC_CAP_SPI (1 << 5) /* Talks only SPI protocols */ 118#define MMC_CAP_NEEDS_POLL (1 << 5) /* Needs polling for card-detection */
97 119
98 /* host specific block data */ 120 /* host specific block data */
99 unsigned int max_seg_size; /* see blk_queue_max_segment_size */ 121 unsigned int max_seg_size; /* see blk_queue_max_segment_size */
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h
index 4236fbf0b6fb..14b81f3e5232 100644
--- a/include/linux/mmc/mmc.h
+++ b/include/linux/mmc/mmc.h
@@ -16,7 +16,6 @@
16 * Based strongly on code by: 16 * Based strongly on code by:
17 * 17 *
18 * Author: Yong-iL Joh <tolkien@mizi.com> 18 * Author: Yong-iL Joh <tolkien@mizi.com>
19 * Date : $Date: 2002/06/18 12:37:30 $
20 * 19 *
21 * Author: Andrew Christian 20 * Author: Andrew Christian
22 * 15 May 2002 21 * 15 May 2002
diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h
index b050f4d7b41f..07bee4a0d457 100644
--- a/include/linux/mmc/sdio_func.h
+++ b/include/linux/mmc/sdio_func.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * include/linux/mmc/sdio_func.h 2 * include/linux/mmc/sdio_func.h
3 * 3 *
4 * Copyright 2007 Pierre Ossman 4 * Copyright 2007-2008 Pierre Ossman
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
@@ -46,6 +46,8 @@ struct sdio_func {
46 unsigned max_blksize; /* maximum block size */ 46 unsigned max_blksize; /* maximum block size */
47 unsigned cur_blksize; /* current block size */ 47 unsigned cur_blksize; /* current block size */
48 48
49 unsigned enable_timeout; /* max enable timeout in msec */
50
49 unsigned int state; /* function state */ 51 unsigned int state; /* function state */
50#define SDIO_STATE_PRESENT (1<<0) /* present in sysfs */ 52#define SDIO_STATE_PRESENT (1<<0) /* present in sysfs */
51 53
@@ -120,23 +122,22 @@ extern int sdio_set_block_size(struct sdio_func *func, unsigned blksz);
120extern int sdio_claim_irq(struct sdio_func *func, sdio_irq_handler_t *handler); 122extern int sdio_claim_irq(struct sdio_func *func, sdio_irq_handler_t *handler);
121extern int sdio_release_irq(struct sdio_func *func); 123extern int sdio_release_irq(struct sdio_func *func);
122 124
123extern unsigned char sdio_readb(struct sdio_func *func, 125extern unsigned int sdio_align_size(struct sdio_func *func, unsigned int sz);
124 unsigned int addr, int *err_ret); 126
125extern unsigned short sdio_readw(struct sdio_func *func, 127extern u8 sdio_readb(struct sdio_func *func, unsigned int addr, int *err_ret);
126 unsigned int addr, int *err_ret); 128extern u16 sdio_readw(struct sdio_func *func, unsigned int addr, int *err_ret);
127extern unsigned long sdio_readl(struct sdio_func *func, 129extern u32 sdio_readl(struct sdio_func *func, unsigned int addr, int *err_ret);
128 unsigned int addr, int *err_ret);
129 130
130extern int sdio_memcpy_fromio(struct sdio_func *func, void *dst, 131extern int sdio_memcpy_fromio(struct sdio_func *func, void *dst,
131 unsigned int addr, int count); 132 unsigned int addr, int count);
132extern int sdio_readsb(struct sdio_func *func, void *dst, 133extern int sdio_readsb(struct sdio_func *func, void *dst,
133 unsigned int addr, int count); 134 unsigned int addr, int count);
134 135
135extern void sdio_writeb(struct sdio_func *func, unsigned char b, 136extern void sdio_writeb(struct sdio_func *func, u8 b,
136 unsigned int addr, int *err_ret); 137 unsigned int addr, int *err_ret);
137extern void sdio_writew(struct sdio_func *func, unsigned short b, 138extern void sdio_writew(struct sdio_func *func, u16 b,
138 unsigned int addr, int *err_ret); 139 unsigned int addr, int *err_ret);
139extern void sdio_writel(struct sdio_func *func, unsigned long b, 140extern void sdio_writel(struct sdio_func *func, u32 b,
140 unsigned int addr, int *err_ret); 141 unsigned int addr, int *err_ret);
141 142
142extern int sdio_memcpy_toio(struct sdio_func *func, unsigned int addr, 143extern int sdio_memcpy_toio(struct sdio_func *func, unsigned int addr,
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 1cf4084b51e8..6be6a7943d8b 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2190,6 +2190,7 @@
2190#define PCI_DEVICE_ID_JMICRON_JMB366 0x2366 2190#define PCI_DEVICE_ID_JMICRON_JMB366 0x2366
2191#define PCI_DEVICE_ID_JMICRON_JMB368 0x2368 2191#define PCI_DEVICE_ID_JMICRON_JMB368 0x2368
2192#define PCI_DEVICE_ID_JMICRON_JMB38X_SD 0x2381 2192#define PCI_DEVICE_ID_JMICRON_JMB38X_SD 0x2381
2193#define PCI_DEVICE_ID_JMICRON_JMB38X_MMC 0x2382
2193#define PCI_DEVICE_ID_JMICRON_JMB38X_MS 0x2383 2194#define PCI_DEVICE_ID_JMICRON_JMB38X_MS 0x2383
2194 2195
2195#define PCI_VENDOR_ID_KORENIX 0x1982 2196#define PCI_VENDOR_ID_KORENIX 0x1982
diff --git a/include/linux/spi/mmc_spi.h b/include/linux/spi/mmc_spi.h
index d5ca78b93a3b..a3626aedaec9 100644
--- a/include/linux/spi/mmc_spi.h
+++ b/include/linux/spi/mmc_spi.h
@@ -23,6 +23,15 @@ struct mmc_spi_platform_data {
23 /* sense switch on sd cards */ 23 /* sense switch on sd cards */
24 int (*get_ro)(struct device *); 24 int (*get_ro)(struct device *);
25 25
26 /*
27 * If board does not use CD interrupts, driver can optimize polling
28 * using this function.
29 */
30 int (*get_cd)(struct device *);
31
32 /* Capabilities to pass into mmc core (e.g. MMC_CAP_NEEDS_POLL). */
33 unsigned long caps;
34
26 /* how long to debounce card detect, in msecs */ 35 /* how long to debounce card detect, in msecs */
27 u16 detect_delay; 36 u16 detect_delay;
28 37