diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2013-10-21 15:30:39 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2013-10-21 15:30:39 +0000 |
commit | 39ce0d419d508a6f78757d8926a160d5a731dc7a (patch) | |
tree | 14046d576e379310947c18f12aabc56a3dc5f49d | |
parent | c7a1bd7b62e67d4a92467b8f37c8ecf5b38c18c3 (diff) |
Add SDHC card detect GPIO pins for the i.MX6 Wandboard.
From Artturi Alm.
-rw-r--r-- | sys/arch/armv7/imx/imxesdhc.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/arch/armv7/imx/imxesdhc.c b/sys/arch/armv7/imx/imxesdhc.c index 7fec46214e8..f68cac7dfcf 100644 --- a/sys/arch/armv7/imx/imxesdhc.c +++ b/sys/arch/armv7/imx/imxesdhc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imxesdhc.c,v 1.1 2013/09/06 20:45:53 patrick Exp $ */ +/* $OpenBSD: imxesdhc.c,v 1.2 2013/10/21 15:30:38 patrick Exp $ */ /* * Copyright (c) 2009 Dale Rahn <drahn@openbsd.org> * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org> @@ -459,7 +459,20 @@ imxesdhc_card_detect(sdmmc_chipset_handle_t sch) return 0; } return imxgpio_get_bit(gpio) ? 0 : 1; + case BOARD_ID_IMX6_WANDBOARD: + switch (sc->unit) { + case 1: + gpio = 0*32 + 2; + break; + case 3: + gpio = 3*32 + 9; + break; + default: + return 0; + } + return imxgpio_get_bit(gpio) ? 0 : 1; default: + printf("%s: unhandled board\n", __func__); return 1; } } |