Date: Wed, 19 Nov 2008 07:59:32 +0100 (CET) From: Björn König <bkoenig@alpha-tierchen.de> To: FreeBSD-gnats-submit@FreeBSD.org Subject: arm/128987: [patch] Fix at91_mci and use 1-bit mode. Message-ID: <20081119065932.1E5B328A19@home.alpha-tierchen.de> Resent-Message-ID: <200811190700.mAJ70Dp7004138@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 128987 >Category: arm >Synopsis: [patch] Fix at91_mci and use 1-bit mode. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-arm >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Nov 19 07:00:13 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Björn König >Release: >Organization: >Environment: >Description: Currently SD Cards doesn't work with the at91_mci driver for AT91RM9200. These changes will make them work: - The 4-bit mode of the never worked. Disable it for now. - Return 'caps' ivar. Probably the 4-bit mode works for other AT91 controllers. Therefore it's necessary to find a better solution. >How-To-Repeat: >Fix: --- src-sys-arm-at91-at91_mci.c.diff begins here --- diff --git src/sys/arm/at91/at91_mci.c src/sys/arm/at91/at91_mci.c index 07efc71..8e1cdeb 100644 --- src/sys/arm/at91/at91_mci.c +++ src/sys/arm/at91/at91_mci.c @@ -200,7 +200,8 @@ at91_mci_attach(device_t dev) sc->host.f_min = 375000; sc->host.f_max = 30000000; sc->host.host_ocr = MMC_OCR_320_330 | MMC_OCR_330_340; - sc->host.caps = MMC_CAP_4_BIT_DATA; +// sc->host.caps = MMC_CAP_4_BIT_DATA; + sc->host.caps = 0; child = device_add_child(dev, "mmc", 0); device_set_ivars(dev, &sc->host); err = bus_generic_attach(dev); @@ -615,6 +616,9 @@ at91_mci_read_ivar(device_t bus, device_t child, int which, u_char *result) case MMCBR_IVAR_BUS_WIDTH: *(int *)result = sc->host.ios.bus_width; break; + case MMCBR_IVAR_CAPS: + *(int *)result = sc->host.caps; + break; case MMCBR_IVAR_CHIP_SELECT: *(int *)result = sc->host.ios.chip_select; break; --- src-sys-arm-at91-at91_mci.c.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081119065932.1E5B328A19>