blob: 59acd987ed340e18b69a55fd15f0872dca94b055 [file] [log] [blame]
Zhangfei Gaobfed3452011-06-20 22:11:52 +08001/*
2 * include/linux/platform_data/pxa_sdhci.h
Zhangfei Gao536ac992010-09-20 10:51:28 -04003 *
4 * Copyright 2010 Marvell
5 * Zhangfei Gao <zhangfei.gao@marvell.com>
6 *
7 * PXA Platform - SDHCI platform data definitions
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 version 2 as
11 * published by the Free Software Foundation.
12 */
13
Zhangfei Gaobfed3452011-06-20 22:11:52 +080014#ifndef _PXA_SDHCI_H_
15#define _PXA_SDHCI_H_
Zhangfei Gao536ac992010-09-20 10:51:28 -040016
17/* pxa specific flag */
18/* Require clock free running */
Zhangfei Gaoa702c8a2011-06-08 17:41:57 +080019#define PXA_FLAG_ENABLE_CLOCK_GATING (1<<0)
20/* card always wired to host, like on-chip emmc */
21#define PXA_FLAG_CARD_PERMANENT (1<<1)
Philip Rakity15ec4462010-11-19 16:48:39 -050022/* Board design supports 8-bit data on SD/SDIO BUS */
23#define PXA_FLAG_SD_8_BIT_CAPABLE_SLOT (1<<2)
24
Zhangfei Gao536ac992010-09-20 10:51:28 -040025/*
26 * struct pxa_sdhci_platdata() - Platform device data for PXA SDHCI
Zhangfei Gao536ac992010-09-20 10:51:28 -040027 * @flags: flags for platform requirement
Zhangfei Gaoa702c8a2011-06-08 17:41:57 +080028 * @clk_delay_cycles:
29 * mmp2: each step is roughly 100ps, 5bits width
30 * pxa910: each step is 1ns, 4bits width
31 * @clk_delay_sel: select clk_delay, used on pxa910
32 * 0: choose feedback clk
33 * 1: choose feedback clk + delay value
34 * 2: choose internal clk
35 * @clk_delay_enable: enable clk_delay or not, used on pxa910
36 * @ext_cd_gpio: gpio pin used for external CD line
37 * @ext_cd_gpio_invert: invert values for external CD gpio line
38 * @max_speed: the maximum speed supported
39 * @host_caps: Standard MMC host capabilities bit field.
40 * @quirks: quirks of platfrom
41 * @pm_caps: pm_caps of platfrom
Zhangfei Gao536ac992010-09-20 10:51:28 -040042 */
43struct sdhci_pxa_platdata {
Zhangfei Gao536ac992010-09-20 10:51:28 -040044 unsigned int flags;
Zhangfei Gaoa702c8a2011-06-08 17:41:57 +080045 unsigned int clk_delay_cycles;
46 unsigned int clk_delay_sel;
47 bool clk_delay_enable;
48 unsigned int ext_cd_gpio;
49 bool ext_cd_gpio_invert;
50 unsigned int max_speed;
51 unsigned int host_caps;
Chris Ball8f637952012-09-19 16:29:12 +080052 unsigned int host_caps2;
Zhangfei Gaoa702c8a2011-06-08 17:41:57 +080053 unsigned int quirks;
54 unsigned int pm_caps;
55};
56
57struct sdhci_pxa {
58 u8 clk_enable;
59 u8 power_mode;
Zhangfei Gao536ac992010-09-20 10:51:28 -040060};
Zhangfei Gaobfed3452011-06-20 22:11:52 +080061#endif /* _PXA_SDHCI_H_ */