Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic The sdmmc layer will send single requests up to M...



details:   https://anonhg.NetBSD.org/src/rev/bb7cce585ea4
branches:  trunk
changeset: 354024:bb7cce585ea4
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Thu Jun 01 16:57:12 2017 +0000

description:
The sdmmc layer will send single requests up to MAXPHYS (65536) in size.
The length field on PL180/PL181 is 16-bit, and can only support up to
65535 byte transfers.

Workaround this for now by setting the SMC_CAPS_SINGLE_ONLY flag to only
do single block (512-byte) transfers. While here set SMC_CAPS_4BIT_MODE
as well.

diffstat:

 sys/dev/ic/pl181.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r fdca3a920baa -r bb7cce585ea4 sys/dev/ic/pl181.c
--- a/sys/dev/ic/pl181.c        Thu Jun 01 15:45:02 2017 +0000
+++ b/sys/dev/ic/pl181.c        Thu Jun 01 16:57:12 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pl181.c,v 1.1 2015/01/27 16:33:26 jmcneill Exp $ */
+/* $NetBSD: pl181.c,v 1.2 2017/06/01 16:57:12 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pl181.c,v 1.1 2015/01/27 16:33:26 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pl181.c,v 1.2 2017/06/01 16:57:12 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -118,7 +118,7 @@
        saa.saa_sch = sc;
        saa.saa_clkmin = 400;
        saa.saa_clkmax = sc->sc_clock_freq / 1000;
-       saa.saa_caps = 0;
+       saa.saa_caps = SMC_CAPS_4BIT_MODE | SMC_CAPS_SINGLE_ONLY;
 
        sc->sc_sdmmc_dev = config_found(sc->sc_dev, &saa, NULL);
 }



Home | Main Index | Thread Index | Old Index