提交 c4223c2c 编写于 作者: M Manuel Lauss 提交者: Pierre Ossman

au1xmmc: remove db1200 board code, rewrite probe.

Remove the DB1200 board-specific functions (card present, read-only,
activity LED methods) and instead add platform data which is passed
to the driver.  This also allows for platforms to implement other
carddetect schemes (e.g. dedicated irq) without having to pollute the
driver code.  The poll timer (used for pb1200) is kept for compatibility.

With the board-specific stuff gone, the driver's ->probe() code can be
cleaned up considerably.
Signed-off-by: NManuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
上级 12bd2575
此差异已折叠。
......@@ -49,8 +49,6 @@ struct au1xmmc_host {
struct mmc_host *mmc;
struct mmc_request *mrq;
u32 id;
u32 flags;
u32 iobase;
u32 clock;
......@@ -73,11 +71,14 @@ struct au1xmmc_host {
u32 tx_chan;
u32 rx_chan;
int irq;
struct timer_list timer;
struct tasklet_struct finish_task;
struct tasklet_struct data_task;
spinlock_t lock;
struct au1xmmc_platform_data *platdata;
struct platform_device *pdev;
struct resource *ioarea;
};
/* Status flags used by the host structure */
......
......@@ -38,15 +38,15 @@
#ifndef __ASM_AU1100_MMC_H
#define __ASM_AU1100_MMC_H
#define NUM_AU1100_MMC_CONTROLLERS 2
#if defined(CONFIG_SOC_AU1100)
#define AU1100_SD_IRQ AU1100_SD_INT
#elif defined(CONFIG_SOC_AU1200)
#define AU1100_SD_IRQ AU1200_SD_INT
#endif
#include <linux/leds.h>
struct au1xmmc_platform_data {
int(*cd_setup)(void *mmc_host, int on);
int(*card_inserted)(void *mmc_host);
int(*card_readonly)(void *mmc_host);
void(*set_power)(void *mmc_host, int state);
struct led_classdev *led;
};
#define SD0_BASE 0xB0600000
#define SD1_BASE 0xB0680000
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册