]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/mmc.h
Merge branch 'master' of git://git.denx.de/u-boot-sh
[karo-tx-uboot.git] / include / mmc.h
index b9b27ba1817ec07ec0f3290aae1bff06acb88c25..fcd0fd1de572c2cf7a54fc0ad1a5414c38c0c549 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008, Freescale Semiconductor, Inc
+ * Copyright 2008,2010 Freescale Semiconductor, Inc
  * Andy Fleming
  *
  * Based (loosely) on the Linux code
@@ -47,7 +47,7 @@
 
 #define SD_DATA_4BIT   0x00040000
 
-#define IS_SD(x) (mmc->version & SD_VERSION_SD)
+#define IS_SD(x) (x->version & SD_VERSION_SD)
 
 #define MMC_DATA_READ          1
 #define MMC_DATA_WRITE         2
@@ -91,7 +91,7 @@
 #define MMC_HS_TIMING          0x00000100
 #define MMC_HS_52MHZ           0x2
 
-#define OCR_BUSY       0x80
+#define OCR_BUSY       0x80000000
 #define OCR_HCS                0x40000000
 
 #define MMC_VDD_165_195                0x00000080      /* VDD voltage 1.65 - 1.95 */
@@ -179,6 +179,16 @@ 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,
@@ -223,7 +233,7 @@ struct mmc_cmd {
        ushort cmdidx;
        uint resp_type;
        uint cmdarg;
-       char response[18];
+       uint response[4];
        uint flags;
 };
 
@@ -253,7 +263,7 @@ struct mmc {
        uint ocr;
        uint scr[2];
        uint csd[4];
-       char cid[16];
+       uint cid[4];
        ushort rca;
        uint tran_speed;
        uint read_bl_len;
@@ -264,16 +274,25 @@ struct mmc {
                        struct mmc_cmd *cmd, struct mmc_data *data);
        void (*set_ios)(struct mmc *mmc);
        int (*init)(struct mmc *mmc);
+#ifdef CONFIG_MMC_MBLOCK
+       uint b_max;
+#endif
 };
 
 int mmc_register(struct mmc *mmc);
 int mmc_initialize(bd_t *bis);
 int mmc_init(struct mmc *mmc);
 int mmc_read(struct mmc *mmc, u64 src, uchar *dst, int size);
+void mmc_set_clock(struct mmc *mmc, uint clock);
 struct mmc *find_mmc_device(int dev_num);
+int mmc_set_dev(int dev_num);
 void print_mmc_devices(char separator);
+int board_mmc_getcd(u8 *cd, struct mmc *mmc);
 
-#ifndef CONFIG_GENERIC_MMC
+#ifdef CONFIG_GENERIC_MMC
+int atmel_mci_init(void *regs);
+#else
 int mmc_legacy_init(int verbose);
 #endif
+
 #endif /* _MMC_H_ */