]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - drivers/mmc/host/s3cmci.h
MMC: S3C24XX MMC/SD driver.
[linux-2.6-omap-h63xx.git] / drivers / mmc / host / s3cmci.h
1 /*
2  *  linux/drivers/mmc/s3cmci.h - Samsung S3C MCI driver
3  *
4  *  Copyright (C) 2004-2006 Thomas Kleffel, All Rights Reserved.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  */
10
11 /* FIXME: DMA Resource management ?! */
12 #define S3CMCI_DMA 0
13
14 enum s3cmci_waitfor {
15         COMPLETION_NONE,
16         COMPLETION_FINALIZE,
17         COMPLETION_CMDSENT,
18         COMPLETION_RSPFIN,
19         COMPLETION_XFERFINISH,
20         COMPLETION_XFERFINISH_RSPFIN,
21 };
22
23 struct s3cmci_host {
24         struct platform_device  *pdev;
25         struct mmc_host         *mmc;
26         struct resource         *mem;
27         struct clk              *clk;
28         void __iomem            *base;
29         int                     irq;
30         int                     irq_cd;
31         int                     dma;
32
33         unsigned long           clk_rate;
34         unsigned long           clk_div;
35         unsigned long           real_rate;
36         u8                      prescaler;
37
38         int                     is2440;
39         unsigned                sdiimsk;
40         unsigned                sdidata;
41         int                     dodma;
42         int                     dmatogo;
43
44         struct mmc_request      *mrq;
45         int                     cmd_is_stop;
46
47         spinlock_t              complete_lock;
48         enum s3cmci_waitfor     complete_what;
49
50         int                     dma_complete;
51
52         u32                     pio_sgptr;
53         u32                     pio_words;
54         u32                     pio_count;
55         u32                     *pio_ptr;
56 #define XFER_NONE 0
57 #define XFER_READ 1
58 #define XFER_WRITE 2
59         u32                     pio_active;
60
61         int                     bus_width;
62
63         char                    dbgmsg_cmd[301];
64         char                    dbgmsg_dat[301];
65         char                    *status;
66
67         unsigned int            ccnt, dcnt;
68         struct tasklet_struct   pio_tasklet;
69 };