From 2852902afc7e5139fbf2db9a451997b44f5d4339 Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 15 May 2015 17:01:18 +0000 Subject: [PATCH] Decrement the unit numbers on the novena sdhc devices. The imx6 dts files seem to have labels numbered one higher than the nodes they are assigned to. Tested by djm --- sys/arch/armv7/imx/imx.c | 4 ++-- sys/arch/armv7/imx/imxesdhc.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/arch/armv7/imx/imx.c b/sys/arch/armv7/imx/imx.c index 17c5ab2eca9..ea04cf4c8c4 100644 --- a/sys/arch/armv7/imx/imx.c +++ b/sys/arch/armv7/imx/imx.c @@ -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 * Copyright (c) 2012-2013 Patrick Wildt @@ -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 }, diff --git a/sys/arch/armv7/imx/imxesdhc.c b/sys/arch/armv7/imx/imxesdhc.c index 533673cbd51..14e26707782 100644 --- a/sys/arch/armv7/imx/imxesdhc.c +++ b/sys/arch/armv7/imx/imxesdhc.c @@ -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 * Copyright (c) 2006 Uwe Stuehler @@ -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; -- 2.20.1