fix-glamo-mci-slow-clock-until-first-bulk.patch
[linux-2.6/openmoko-kernel/knife-kernel.git] / drivers / mfd / glamo / glamo-mci.h
blob38f6376f438b425bc5865bbdac353b34c072e4e8
1 /*
2 * linux/drivers/mmc/host/glamo-mmc.h - GLAMO MCI driver
4 * Copyright (C) 2007-2008 Openmoko, Inc, Andy Green <andy@openmoko.com>
5 * based on S3C MMC driver -->
6 * Copyright (C) 2004-2006 Thomas Kleffel, All Rights Reserved.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
14 enum glamo_mci_waitfor {
15 COMPLETION_NONE,
16 COMPLETION_FINALIZE,
17 COMPLETION_CMDSENT,
18 COMPLETION_RSPFIN,
19 COMPLETION_XFERFINISH,
20 COMPLETION_XFERFINISH_RSPFIN,
23 struct glamo_mci_host {
24 struct platform_device *pdev;
25 struct glamo_mci_pdata *pdata;
26 struct mmc_host *mmc;
27 struct resource *mem;
28 struct resource *mem_data;
29 struct clk *clk;
30 void __iomem *base;
31 u16 __iomem *base_data;
32 int irq;
33 int irq_cd;
34 int dma;
35 int data_max_size;
37 int suspending;
39 int power_mode_current;
40 unsigned int vdd_current;
42 unsigned long clk_rate;
43 unsigned long clk_div;
44 unsigned long real_rate;
45 u8 prescaler;
47 int force_slow_during_powerup;
49 unsigned sdiimsk;
50 int dodma;
52 volatile int dmatogo;
54 struct mmc_request *mrq;
55 int cmd_is_stop;
57 spinlock_t complete_lock;
58 volatile enum glamo_mci_waitfor
59 complete_what;
61 volatile int dma_complete;
63 volatile u32 pio_sgptr;
64 volatile u32 pio_words;
65 volatile u32 pio_count;
66 volatile u16 *pio_ptr;
67 #define XFER_NONE 0
68 #define XFER_READ 1
69 #define XFER_WRITE 2
70 volatile u32 pio_active;
72 int bus_width;
74 char dbgmsg_cmd[301];
75 char dbgmsg_dat[301];
76 volatile char *status;
78 unsigned int ccnt, dcnt;
79 struct tasklet_struct pio_tasklet;