Date: Wed, 11 Feb 2015 00:35:03 -0500 (EST) From: John Wehle <john@feith.com> To: ganbold@gmail.com Cc: freebsd-arm@freebsd.org Subject: Re: Initial Amlogic aml8726-m6 and aml8726-m8 support files Message-ID: <201502110535.t1B5Z3c7007720@jwlab.FEITH.COM>
next in thread | raw e-mail | index | archive | help
Ganbold Tsagaankhuu wrote on Mon Feb 2 07:19:11 UTC 2015: > Maybe making mmc stable is more priority. Try the attached patch. -- John --------------------8<-------------------8<----------------------------- --- sys/arm/amlogic/aml8726/aml8726_mmc.c.ORIGINAL 2015-01-07 00:57:31.000000000 -0500 +++ sys/arm/amlogic/aml8726/aml8726_mmc.c 2015-02-10 23:51:49.000000000 -0500 @@ -353,7 +353,8 @@ aml8726_mmc_intr(void *arg) return; } - if ((isr & AML_MMC_IRQ_STATUS_CMD_BUSY) != 0) { + if ((isr & AML_MMC_IRQ_STATUS_CMD_BUSY) != 0 + && (isr & AML_MMC_IRQ_STATUS_CMD_DONE_IRQ) == 0) { if (mmc_error != MMC_ERR_TIMEOUT) mmc_error = MMC_ERR_FAILED; @@ -431,13 +432,14 @@ aml8726_mmc_intr(void *arg) } /* - * If this command was successfully executed and there's - * a linked stop command, then start the stop command. + * If there's a linked stop command, then start the stop command. + * In order to establish a known state attempt the stop command + * even if the original request encountered an error. */ stop_cmd = (cmd->mrq->stop != cmd) ? cmd->mrq->stop : NULL; - if (stop_cmd != NULL && mmc_error == MMC_ERR_NONE) { + if (stop_cmd != NULL) { mmc_stop_error = aml8726_mmc_start_command(sc, stop_cmd); if (mmc_stop_error == MMC_ERR_NONE) { AML_MMC_UNLOCK(sc); ------------------------------------------------------------------------- | Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com | | John Wehle | Fax: 1-215-540-5495 | | -------------------------------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502110535.t1B5Z3c7007720>