summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/configs/origen.h7
-rw-r--r--include/configs/s5p_goni.h7
-rw-r--r--include/configs/s5pc210_universal.h7
-rw-r--r--include/configs/smdk5250.h3
-rw-r--r--include/configs/smdkv310.h7
-rw-r--r--include/configs/trats.h3
-rw-r--r--include/fsl_esdhc.h4
-rw-r--r--include/mmc.h53
-rw-r--r--include/sdhci.h7
9 files changed, 33 insertions, 65 deletions
diff --git a/include/configs/origen.h b/include/configs/origen.h
index 8ede825..367f991 100644
--- a/include/configs/origen.h
+++ b/include/configs/origen.h
@@ -69,9 +69,10 @@
#define EXYNOS4_DEFAULT_UART_OFFSET 0x020000
/* SD/MMC configuration */
-#define CONFIG_GENERIC_MMC 1
-#define CONFIG_MMC 1
-#define CONFIG_S5P_MMC 1
+#define CONFIG_GENERIC_MMC
+#define CONFIG_MMC
+#define CONFIG_SDHCI
+#define CONFIG_S5P_SDHCI
/* PWM */
#define CONFIG_PWM 1
diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h
index 56b5547..e133a17 100644
--- a/include/configs/s5p_goni.h
+++ b/include/configs/s5p_goni.h
@@ -63,9 +63,10 @@
#define CONFIG_BAUDRATE 115200
/* MMC */
-#define CONFIG_GENERIC_MMC 1
-#define CONFIG_MMC 1
-#define CONFIG_S5P_MMC 1
+#define CONFIG_GENERIC_MMC
+#define CONFIG_MMC
+#define CONFIG_SDHCI
+#define CONFIG_S5P_SDHCI
/* PWM */
#define CONFIG_PWM 1
diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h
index 1301275..00db374 100644
--- a/include/configs/s5pc210_universal.h
+++ b/include/configs/s5pc210_universal.h
@@ -66,9 +66,10 @@
#define CONFIG_BAUDRATE 115200
/* MMC */
-#define CONFIG_GENERIC_MMC 1
-#define CONFIG_MMC 1
-#define CONFIG_S5P_MMC 1
+#define CONFIG_GENERIC_MMC
+#define CONFIG_MMC
+#define CONFIG_SDHCI
+#define CONFIG_S5P_SDHCI
/* PWM */
#define CONFIG_PWM 1
diff --git a/include/configs/smdk5250.h b/include/configs/smdk5250.h
index 9659f9e..0f63040 100644
--- a/include/configs/smdk5250.h
+++ b/include/configs/smdk5250.h
@@ -78,7 +78,8 @@
/* SD/MMC configuration */
#define CONFIG_GENERIC_MMC
#define CONFIG_MMC
-#define CONFIG_S5P_MMC
+#define CONFIG_SDHCI
+#define CONFIG_S5P_SDHCI
#define CONFIG_BOARD_EARLY_INIT_F
diff --git a/include/configs/smdkv310.h b/include/configs/smdkv310.h
index 93c25da..702134b 100644
--- a/include/configs/smdkv310.h
+++ b/include/configs/smdkv310.h
@@ -68,9 +68,10 @@
#define EXYNOS4_DEFAULT_UART_OFFSET 0x010000
/* SD/MMC configuration */
-#define CONFIG_GENERIC_MMC 1
-#define CONFIG_MMC 1
-#define CONFIG_S5P_MMC 1
+#define CONFIG_GENERIC_MMC
+#define CONFIG_MMC
+#define CONFIG_SDHCI
+#define CONFIG_S5P_SDHCI
/* PWM */
#define CONFIG_PWM 1
diff --git a/include/configs/trats.h b/include/configs/trats.h
index 10f11d9..71b9393 100644
--- a/include/configs/trats.h
+++ b/include/configs/trats.h
@@ -74,7 +74,8 @@
/* MMC */
#define CONFIG_GENERIC_MMC
#define CONFIG_MMC
-#define CONFIG_S5P_MMC
+#define CONFIG_S5P_SDHCI
+#define CONFIG_SDHCI
/* PWM */
#define CONFIG_PWM
diff --git a/include/fsl_esdhc.h b/include/fsl_esdhc.h
index 8418bf7..0e26558 100644
--- a/include/fsl_esdhc.h
+++ b/include/fsl_esdhc.h
@@ -34,12 +34,13 @@
#define SYSCTL_INITA 0x08000000
#define SYSCTL_TIMEOUT_MASK 0x000f0000
#define SYSCTL_CLOCK_MASK 0x0000fff0
-#define SYSCTL_RSTA 0x01000000
#define SYSCTL_CKEN 0x00000008
#define SYSCTL_PEREN 0x00000004
#define SYSCTL_HCKEN 0x00000002
#define SYSCTL_IPGEN 0x00000001
#define SYSCTL_RSTA 0x01000000
+#define SYSCTL_RSTC 0x02000000
+#define SYSCTL_RSTD 0x04000000
#define IRQSTAT 0x0002e030
#define IRQSTAT_DMAE (0x10000000)
@@ -85,6 +86,7 @@
#define IRQSTATEN_CC (0x00000001)
#define PRSSTAT 0x0002e024
+#define PRSSTAT_DAT0 (0x01000000)
#define PRSSTAT_CLSL (0x00800000)
#define PRSSTAT_WPSPL (0x00080000)
#define PRSSTAT_CDPL (0x00040000)
diff --git a/include/mmc.h b/include/mmc.h
index f52df70..2305986 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -47,6 +47,9 @@
#define MMC_MODE_SPI 0x400
#define MMC_MODE_HC 0x800
+#define MMC_MODE_MASK_WIDTH_BITS (MMC_MODE_4BIT | MMC_MODE_8BIT)
+#define MMC_MODE_WIDTH_BITS_SHIFT 8
+
#define SD_DATA_4BIT 0x00040000
#define IS_SD(x) (x->version & SD_VERSION_SD)
@@ -205,56 +208,6 @@ struct mmc_cid {
char pnm[7];
};
-/*
- * WARNING!
- *
- * This structure is used by atmel_mci.c only.
- * It works for the AVR32 architecture but NOT
- * for ARM/AT91 architectures.
- * Its use is highly depreciated.
- * After the atmel_mci.c driver for AVR32 has
- * been replaced this structure will be removed.
- */
-struct mmc_csd
-{
- u8 csd_structure:2,
- spec_vers:4,
- rsvd1:2;
- u8 taac;
- u8 nsac;
- u8 tran_speed;
- u16 ccc:12,
- read_bl_len:4;
- u64 read_bl_partial:1,
- write_blk_misalign:1,
- read_blk_misalign:1,
- dsr_imp:1,
- rsvd2:2,
- c_size:12,
- vdd_r_curr_min:3,
- vdd_r_curr_max:3,
- vdd_w_curr_min:3,
- vdd_w_curr_max:3,
- c_size_mult:3,
- sector_size:5,
- erase_grp_size:5,
- wp_grp_size:5,
- wp_grp_enable:1,
- default_ecc:2,
- r2w_factor:3,
- write_bl_len:4,
- write_bl_partial:1,
- rsvd3:5;
- u8 file_format_grp:1,
- copy:1,
- perm_write_protect:1,
- tmp_write_protect:1,
- file_format:2,
- ecc:2;
- u8 crc:7;
- u8 one:1;
-};
-
struct mmc_cmd {
ushort cmdidx;
uint resp_type;
diff --git a/include/sdhci.h b/include/sdhci.h
index 800f9d9..9d37183 100644
--- a/include/sdhci.h
+++ b/include/sdhci.h
@@ -216,6 +216,9 @@
*/
#define SDHCI_QUIRK_32BIT_DMA_ADDR (1 << 0)
#define SDHCI_QUIRK_REG32_RW (1 << 1)
+#define SDHCI_QUIRK_BROKEN_R1B (1 << 2)
+#define SDHCI_QUIRK_NO_HISPD_BIT (1 << 3)
+#define SDHCI_QUIRK_BROKEN_VOLTAGE (1 << 4)
/* to make gcc happy */
struct sdhci_host;
@@ -240,10 +243,14 @@ struct sdhci_host {
char *name;
void *ioaddr;
unsigned int quirks;
+ unsigned int host_caps;
unsigned int version;
unsigned int clock;
struct mmc *mmc;
const struct sdhci_ops *ops;
+
+ void (*set_control_reg)(struct sdhci_host *host);
+ uint voltages;
};
#ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS