X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmmc%2Fau1xmmc.c;h=b7156a4555b594b5cb036f3f68f987a24d1824e2;hb=f74d132cec60b686bce1f284822c1a496700bd3c;hp=800527cf40d5c58be4792a2001ca7ed1daa383e9;hpb=f0eef25339f92f7cd4aeea23d9ae97987a5a1e82;p=linux-2.6 diff --git a/drivers/mmc/au1xmmc.c b/drivers/mmc/au1xmmc.c index 800527cf40..b7156a4555 100644 --- a/drivers/mmc/au1xmmc.c +++ b/drivers/mmc/au1xmmc.c @@ -42,7 +42,6 @@ #include #include -#include #include #include #include @@ -152,8 +151,9 @@ static inline int au1xmmc_card_inserted(struct au1xmmc_host *host) ? 1 : 0; } -static inline int au1xmmc_card_readonly(struct au1xmmc_host *host) +static int au1xmmc_card_readonly(struct mmc_host *mmc) { + struct au1xmmc_host *host = mmc_priv(mmc); return (bcsr->status & au1xmmc_card_table[host->id].wpstatus) ? 1 : 0; } @@ -193,6 +193,8 @@ static int au1xmmc_send_command(struct au1xmmc_host *host, int wait, u32 mmccmd = (cmd->opcode << SD_CMD_CI_SHIFT); switch (mmc_resp_type(cmd)) { + case MMC_RSP_NONE: + break; case MMC_RSP_R1: mmccmd |= SD_CMD_RT_1; break; @@ -205,6 +207,10 @@ static int au1xmmc_send_command(struct au1xmmc_host *host, int wait, case MMC_RSP_R3: mmccmd |= SD_CMD_RT_3; break; + default: + printk(KERN_INFO "au1xmmc: unhandled response type %02x\n", + mmc_resp_type(cmd)); + return MMC_ERR_INVALID; } switch(cmd->opcode) { @@ -878,6 +884,7 @@ static void au1xmmc_init_dma(struct au1xmmc_host *host) static const struct mmc_host_ops au1xmmc_ops = { .request = au1xmmc_request, .set_ios = au1xmmc_set_ios, + .get_ro = au1xmmc_card_readonly, }; static int __devinit au1xmmc_probe(struct platform_device *pdev) @@ -914,6 +921,9 @@ static int __devinit au1xmmc_probe(struct platform_device *pdev) mmc->max_seg_size = AU1XMMC_DESCRIPTOR_SIZE; mmc->max_phys_segs = AU1XMMC_DESCRIPTOR_COUNT; + mmc->max_blk_size = 2048; + mmc->max_blk_count = 512; + mmc->ocr_avail = AU1XMMC_OCR; host = mmc_priv(mmc);