-/* $OpenBSD: imx.c,v 1.5 2015/05/15 17:01:18 jsg Exp $ */
+/* $OpenBSD: imx.c,v 1.6 2015/05/17 12:28:03 jsg Exp $ */
/*
* Copyright (c) 2005,2008 Dale Rahn <drahn@openbsd.com>
* Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se>
{ "imxgpio", 5 },
{ "imxgpio", 6 },
{ "imxesdhc", 2 },
- { "imxesdhc", 3 },
{ "ehci", 0 },
{ "imxenet", 0 },
{ "ahci", 0 },
-/* $OpenBSD: imxesdhc.c,v 1.9 2015/05/17 11:18:05 jsg Exp $ */
+/* $OpenBSD: imxesdhc.c,v 1.10 2015/05/17 12:28:03 jsg Exp $ */
/*
* Copyright (c) 2009 Dale Rahn <drahn@openbsd.org>
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
{
case BOARD_ID_IMX6_CUBOXI:
case BOARD_ID_IMX6_HUMMINGBOARD:
- gpio = 0*32 + 4;
+ switch (sc->unit) {
+ case 1:
+ gpio = 0*32 + 4;
+ break;
+ default:
+ return 0;
+ }
imxgpio_set_dir(gpio, IMXGPIO_DIR_IN);
return imxgpio_get_bit(gpio) ? 0 : 1;
- break;
case BOARD_ID_IMX6_PHYFLEX:
switch (sc->unit) {
case 1:
- gpio = 0*32 + 2;
+ gpio = 0*32 + 4;
break;
case 2:
- gpio = 4*32 + 22;
+ gpio = 0*32 + 27;
break;
default:
return 0;
return imxgpio_get_bit(gpio) ? 0 : 1;
case BOARD_ID_IMX6_UDOO:
switch (sc->unit) {
- /*
- * One of these is the SD card, another the wifi
- * the third is not connected (?)
- */
- case 0:
- case 1:
case 2:
- case 3:
- gpio = 3*32 + 9;
- break;
+ return 1;
default:
return 0;
}
- return 1;
case BOARD_ID_IMX6_UTILITE:
switch (sc->unit) {
case 2:
gpio = 0*32 + 2;
break;
case 2:
- gpio = 3*32 + 9;
+ gpio = 2*32 + 9;
break;
default:
return 0;