Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102198
b: refs/heads/master
c: cf0984c
h: refs/heads/master
v: v3
  • Loading branch information
Ben Dooks authored and Pierre Ossman committed Jul 15, 2008
1 parent fd3001f commit d9adeec
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: edb5a98e43682d66c98ddd1dee863d867807546e
refs/heads/master: cf0984c8edf63017fcc2ead212ca057877e345df
11 changes: 9 additions & 2 deletions trunk/drivers/mmc/host/s3cmci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1083,11 +1083,18 @@ static void s3cmci_reset(struct s3cmci_host *host)
static int s3cmci_get_ro(struct mmc_host *mmc)
{
struct s3cmci_host *host = mmc_priv(mmc);
struct s3c24xx_mci_pdata *pdata = host->pdata;
int ret;

if (host->pdata->gpio_wprotect == 0)
if (pdata->gpio_wprotect == 0)
return 0;

return s3c2410_gpio_getpin(host->pdata->gpio_wprotect);
ret = s3c2410_gpio_getpin(pdata->gpio_wprotect);

if (pdata->wprotect_invert)
ret = !ret;

return ret;
}

static struct mmc_host_ops s3cmci_ops = {
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/asm-arm/plat-s3c24xx/mci.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#define _ARCH_MCI_H

struct s3c24xx_mci_pdata {
unsigned int wprotect_invert : 1;

unsigned int gpio_detect;
unsigned int gpio_wprotect;
unsigned long ocr_avail;
Expand Down

0 comments on commit d9adeec

Please sign in to comment.