Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7472
b: refs/heads/master
c: e619524
h: refs/heads/master
v: v3
  • Loading branch information
Richard Purdie authored and Linus Torvalds committed Sep 7, 2005
1 parent 816a721 commit 77bfa58
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5b4fd9aef778e223968dfab1b90f905b3f2bd23d
refs/heads/master: e619524fe5f5b0c13db34ed0f6320d2dcccf6e8d
11 changes: 11 additions & 0 deletions trunk/drivers/mmc/pxamci.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,16 @@ static void pxamci_request(struct mmc_host *mmc, struct mmc_request *mrq)
pxamci_start_cmd(host, mrq->cmd, cmdat);
}

static int pxamci_get_ro(struct mmc_host *mmc)
{
struct pxamci_host *host = mmc_priv(mmc);

if (host->pdata && host->pdata->get_ro)
return host->pdata->get_ro(mmc->dev);
/* Host doesn't support read only detection so assume writeable */
return 0;
}

static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
{
struct pxamci_host *host = mmc_priv(mmc);
Expand Down Expand Up @@ -401,6 +411,7 @@ static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)

static struct mmc_host_ops pxamci_ops = {
.request = pxamci_request,
.get_ro = pxamci_get_ro,
.set_ios = pxamci_set_ios,
};

Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-arm/arch-pxa/mmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ struct mmc_host;
struct pxamci_platform_data {
unsigned int ocr_mask; /* available voltages */
int (*init)(struct device *, irqreturn_t (*)(int, void *, struct pt_regs *), void *);
int (*get_ro)(struct device *);
void (*setpower)(struct device *, unsigned int);
void (*exit)(struct device *, void *);
};
Expand Down

0 comments on commit 77bfa58

Please sign in to comment.