]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - drivers/mmc/host/sdhci-esdhc.h
Merge branches 'for-4.11/upstream-fixes', 'for-4.12/accutouch', 'for-4.12/cp2112...
[mirror_ubuntu-artful-kernel.git] / drivers / mmc / host / sdhci-esdhc.h
1 /*
2 * Freescale eSDHC controller driver generics for OF and pltfm.
3 *
4 * Copyright (c) 2007 Freescale Semiconductor, Inc.
5 * Copyright (c) 2009 MontaVista Software, Inc.
6 * Copyright (c) 2010 Pengutronix e.K.
7 * Author: Wolfram Sang <w.sang@pengutronix.de>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License.
12 */
13
14 #ifndef _DRIVERS_MMC_SDHCI_ESDHC_H
15 #define _DRIVERS_MMC_SDHCI_ESDHC_H
16
17 /*
18 * Ops and quirks for the Freescale eSDHC controller.
19 */
20
21 #define ESDHC_DEFAULT_QUIRKS (SDHCI_QUIRK_FORCE_BLK_SZ_2048 | \
22 SDHCI_QUIRK_NO_BUSY_IRQ | \
23 SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | \
24 SDHCI_QUIRK_PIO_NEEDS_DELAY | \
25 SDHCI_QUIRK_NO_HISPD_BIT)
26
27 /* pltfm-specific */
28 #define ESDHC_HOST_CONTROL_LE 0x20
29
30 /*
31 * eSDHC register definition
32 */
33
34 /* Present State Register */
35 #define ESDHC_PRSSTAT 0x24
36 #define ESDHC_CLOCK_STABLE 0x00000008
37
38 /* Protocol Control Register */
39 #define ESDHC_PROCTL 0x28
40 #define ESDHC_CTRL_4BITBUS (0x1 << 1)
41 #define ESDHC_CTRL_8BITBUS (0x2 << 1)
42 #define ESDHC_CTRL_BUSWIDTH_MASK (0x3 << 1)
43 #define ESDHC_HOST_CONTROL_RES 0x01
44
45 /* System Control Register */
46 #define ESDHC_SYSTEM_CONTROL 0x2c
47 #define ESDHC_CLOCK_MASK 0x0000fff0
48 #define ESDHC_PREDIV_SHIFT 8
49 #define ESDHC_DIVIDER_SHIFT 4
50 #define ESDHC_CLOCK_SDCLKEN 0x00000008
51 #define ESDHC_CLOCK_PEREN 0x00000004
52 #define ESDHC_CLOCK_HCKEN 0x00000002
53 #define ESDHC_CLOCK_IPGEN 0x00000001
54
55 /* Control Register for DMA transfer */
56 #define ESDHC_DMA_SYSCTL 0x40c
57 #define ESDHC_DMA_SNOOP 0x00000040
58
59 #endif /* _DRIVERS_MMC_SDHCI_ESDHC_H */