Commit 1fdb3712 authored by Bernard Blackham's avatar Bernard Blackham Committed by Kevin Hilman

MMC: DaVinci: move other globals and statics into struct

Move other statics and globals into device struct. Shrink some of the
flags into single-bit fields, and the more often used flags into
bools.
Signed-off-by: default avatarBernard Blackham <bernard@largestprime.net>
Signed-off-by: default avatarKevin Hilman <khilman@mvista.com>
parent 47fb4554
This diff is collapsed.
......@@ -170,6 +170,7 @@ struct mmc_davinci_host {
struct device *dev;
unsigned char id;
struct clk *clk;
unsigned int mmc_input_clk;
void __iomem *base;
int irq;
unsigned char bus_mode;
......@@ -182,16 +183,16 @@ struct mmc_davinci_host {
u32 bytes_left;
int power_pin;
int use_dma;
int do_dma;
bool use_dma;
bool do_dma;
struct completion dma_completion;
struct timer_list timer;
unsigned int is_core_command;
unsigned int is_core_command:1;
unsigned int cmd_code;
unsigned int old_card_state;
unsigned int old_card_state:1;
unsigned char sd_support;
unsigned char sd_support:1;
struct edma_ch_mmcsd edma_ch_details;
......@@ -203,6 +204,37 @@ struct mmc_davinci_host {
unsigned int option_read;
unsigned int option_write;
/* Indicates if card being used currently by linux core or not */
unsigned int is_card_busy:1;
/* Indicates if card probe(detection) is currently in progress */
unsigned int is_card_detect_progress:1;
/* Indicates if core is currently initializing the card or not */
unsigned int is_init_progress:1;
/* Indicate whether core request has been queued up or not because
* request has come when card detection/probe was in progress
*/
unsigned int is_req_queued_up:1;
/* data structure to queue one request */
struct mmc_host *que_mmc_host;
/* data structure to queue one request */
struct mmc_request *que_mmc_request;
/* tells whether card is initizlzed or not */
int is_card_initialized:1;
/* tells current state of card */
unsigned int new_card_state:1;
unsigned int is_card_removed:1;
/* protect against mmc_check_card */
spinlock_t lock;
};
struct mmcsd_config_def {
......@@ -223,7 +255,7 @@ enum mmcsdevent {
MMCSD_EVENT_BLOCK_XFERRED = (1 << 0)
};
static void init_mmcsd_host(void);
static void init_mmcsd_host(struct mmc_davinci_host *host);
static void davinci_fifo_data_trans(struct mmc_davinci_host *host);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment