Decrement the unit numbers on the novena sdhc devices. The imx6 dts
authorjsg <jsg@openbsd.org>
Fri, 15 May 2015 17:01:18 +0000 (17:01 +0000)
committerjsg <jsg@openbsd.org>
Fri, 15 May 2015 17:01:18 +0000 (17:01 +0000)
files seem to have labels numbered one higher than the nodes they are
assigned to.

Tested by djm

sys/arch/armv7/imx/imx.c
sys/arch/armv7/imx/imxesdhc.c

index 17c5ab2..ea04cf4 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: imx.c,v 1.4 2015/05/15 15:35:43 jsg Exp $ */
+/* $OpenBSD: imx.c,v 1.5 2015/05/15 17:01:18 jsg Exp $ */
 /*
  * Copyright (c) 2005,2008 Dale Rahn <drahn@openbsd.com>
  * Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se>
@@ -172,8 +172,8 @@ struct board_dev novena_devs[] = {
        { "imxgpio",    4 },
        { "imxgpio",    5 },
        { "imxgpio",    6 },
+       { "imxesdhc",   1 },
        { "imxesdhc",   2 },
-       { "imxesdhc",   3 },
        { "ehci",       0 },
        { "imxenet",    0 },
        { "ahci",       0 },
index 533673c..14e2670 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: imxesdhc.c,v 1.7 2015/05/08 03:38:26 jsg Exp $        */
+/*     $OpenBSD: imxesdhc.c,v 1.8 2015/05/15 17:01:18 jsg Exp $        */
 /*
  * Copyright (c) 2009 Dale Rahn <drahn@openbsd.org>
  * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -509,11 +509,11 @@ imxesdhc_card_detect(sdmmc_chipset_handle_t sch)
                return imxgpio_get_bit(gpio) ? 0 : 1;
        case BOARD_ID_IMX6_NOVENA:
                switch (sc->unit) {
-                       case 2:
+                       case 1:
                                gpio = 0*32 + 4;
                                break;
-                       /* no card detect for uSD */
-                       case 3:
+                       /* no card detect */
+                       case 2:
                                return 1;
                        default:
                                return 0;