From owner-freebsd-arm@freebsd.org Fri Sep 7 20:37:11 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06C57106B9D3 for ; Fri, 7 Sep 2018 20:37:11 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic304-12.consmr.mail.bf2.yahoo.com (sonic304-12.consmr.mail.bf2.yahoo.com [74.6.128.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4E9B76BD7 for ; Fri, 7 Sep 2018 20:37:10 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: L_rGxlUVM1k0kno0dWSZEmH1nz7BVGoCicF340QKDAa8E__5S4gu3KEGf_Xj.p3 He4rwc7NnuMLFRfO8Crz32BL4k4f1sEY9tFitKj4a5aQNBGy9XcQLLbzN9B9SERNMR6OrMBOwuFs urfFkxbapYog24rgCL2y0Ac9iKjc601SXY4IwjWUb9.PT7z7emsLgfKJAffs4lGwdFHbd_t_1A68 pvn4mRyCmMZQQvrmfvYQ5XiU87oyMzrK880ppCjhsqfinapEg8Wap8aRfUxxDSi69b6x_mYxuFmV dXekeC9R4ftKen1rQCjeFDk_0njJ6ZfeRg1Nm.usPmYVcxG7l48nGOnpEh5.GTgsndtCrqA_fF92 qKEdepPFsgyvt83y4pvCBUGKCWave.I1M0tr2NHXMHz47sMnipCfiy1rNR.yicw3CGR7Ly6XcQkM R7.tTJfBt.3ESNRHEwSPbPhNaJSB_pC.H9rpHokik8G44CxwR_FyXpiKHN0YXTg.KD4f9PZwebDq aU7PjnXhHmIw6GjLu2FErQyYOS2VGka8CpJqFb3QVSoMeg1zHuFmrbKgSLVUREmGIlidROi_Roc6 Gb3eDmVa9YyTysbmIuMH7cnhOivKfG2JyGWKRC7WvLoPONbJuiLMn0Vs0M2aN0_KZ8mSvjl8QHGP ZFnk1UwOWPbBs5QqJtUHdJnbf9PA0xavMtcS13PWqnuA8lIqN7bH4XmOagSbYfDdtogZrEbW4KSx M1DgsOuT3tZ5p90DECgcoqU0Yt1pT0JJXAa2jxzcdAftZlgEy.IW9ZqOSas8DdTPKtCdvc3AT7pW yAZO2c._sAi9iYf8tAglHqFAnXqVjTT2vUtRqvHPh3_kVdveezwufLLZdB1Zd8PW_Zh1v9Nl.6nC 1WZmT.J4yPN1747j9vPNNGFxZ.5opzDN_q_W_MC8F5Wiv0x.xLkrmmLpAM6P59Ojsnxlx.qpPCJl .R9mQaLedUtCu9Bghm1HEPgLdiVkd5THP.absdnc1dtTidXGhSS1IFiUkzA_Vasb9qIhcyQ-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.bf2.yahoo.com with HTTP; Fri, 7 Sep 2018 20:37:09 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp430.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 722ee6b45f558b207d3574cb36f95fe2 for ; Fri, 07 Sep 2018 20:37:07 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Just an FYI: debug kernel output for an e.MMC on a sdcard adapter (Pine64+ 2GB context, head -r338518 based) Message-Id: <73FE40F2-9D13-4A43-9B03-E8452DC146A9@yahoo.com> Date: Fri, 7 Sep 2018 13:37:05 -0700 To: freebsd-arm X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Sep 2018 20:37:11 -0000 I built and installed a debug kernel with "options VERBOSE_SYSINIT" as well and I added "hw.mmc.debug=3D1" to /boot/loader.conf and used boot -v just to see what such a combination would report for the Pine64+ 2GB attempting to boot from the e.MMC with that kernel on it. The boot_run_interrupt_driven_config_hooks area ended up looking like (serial numbers replaced): QUOTE subsystem a800000 boot_run_interrupt_driven_config_hooks(0)... aw_mmc0: Powering up = sd/mmc axp8xx_pmu0: Enable vcc-3v3 (dcdc1) mmc0: Probing bus ugen1.1: at usbus1 uhub0: on = usbus1 ugen2.1: at usbus2 uhub1: on = usbus2 ugen3.1: at usbus3 uhub2: on = usbus3 ugen0.1: at usbus0 uhub3: on = usbus0 Expensive timeout(9) function: 0xffff0000004149f8(0) 0.002082708 s aw_mmc0: error rint: 0x00000100 AW_MMC_INT_RESP_TIMEOUT=20 mmc0: CMD8 RESULT: 1 aw_mmc0: error rint: 0x00000100 AW_MMC_INT_RESP_TIMEOUT=20 mmc0: CMD8 RESULT: 1 aw_mmc0: error rint: 0x00000100 AW_MMC_INT_RESP_TIMEOUT=20 mmc0: CMD8 RESULT: 1 aw_mmc0: error rint: 0x00000100 AW_MMC_INT_RESP_TIMEOUT=20 mmc0: CMD8 RESULT: 1 aw_mmc0: error rint: 0x00000100 AW_MMC_INT_RESP_TIMEOUT=20 mmc0: CMD55 RESULT: 1 aw_mmc0: error rint: 0x00000100 AW_MMC_INT_RESP_TIMEOUT=20 mmc0: CMD55 RESULT: 1 aw_mmc0: error rint: 0x00000100 AW_MMC_INT_RESP_TIMEOUT=20 mmc0: CMD55 RESULT: 1 aw_mmc0: error rint: 0x00000100 AW_MMC_INT_RESP_TIMEOUT=20 mmc0: CMD55 RESULT: 1 mmc0: SD probe: failed mmc0: MMC probe: OK (OCR: 0x40ff8080) mmc0: Current OCR: 0x00ff8080 mmc0: Probing cards mmc0: New card detected (CID 150100444a4e42345207???????636f) mmc0: New card detected (CSD d02701320f5903fff6dbffef8e40400d) aw_mmc0: error rint: 0x00008018 AW_MMC_INT_DATA_END_BIT_ERR mmc0: CMD19 RESULT: 4 mmc0: Card at relative address 0x0002 added: mmc0: card: MMCHC DJNB4R 0.7 SN MFG 06/2016 by 21 0x0000 mmc0: quirks: 0 mmc0: bus: 4bit, 200MHz (HS200 timing) mmc0: memory: 244277248 blocks, erase sector 1024 blocks aw_mmc0: error rint: 0x00000100 AW_MMC_INT_RESP_TIMEOUT=20 mmc0: CMD2 RESULT: 1 aw_mmc0: error rint: 0x00000100 AW_MMC_INT_RESP_TIMEOUT=20 mmc0: CMD2 RESULT: 1 aw_mmc0: error rint: 0x00000100 AW_MMC_INT_RESP_TIMEOUT=20 mmc0: CMD2 RESULT: 1 uhub0: 1 port with 1 removable, self powered aw_mmc0: error rint: 0x00000104 AW_MMC_INT_RESP_TIMEOUT=20 mmc0: CMD2 RESULT: 1 mmc0: setting transfer rate to 52.000MHz (dual data rate timing) uhub2: 1 port with 1 removable, self powered mmc0: Failed to set VCCQ for card at relative address 2 uhub1: 1 port with 1 removable, self powered uhub3: 1 port with 1 removable, self powered aw_mmc0: controller timeout aw_mmc0: timeout updating clock Expensive timeout(9) function: 0xffff00000068400c(0xfffffd00001bd400) = 11.120601791 s mmc0: CMD8 RESULT: 1 aw_mmc0: controller timeout aw_mmc0: timeout updating clock mmc0: CMD8 RESULT: 1 aw_mmc0: controller timeout aw_mmc0: timeout updating clock mmc0: CMD8 RESULT: 1 aw_mmc0: controller timeout aw_mmc0: Spurious interrupt - no active request, rint: 0x00000000 mmc0: CMD8 RESULT: 1 mmcsd0: Error reading EXT_CSD Timeout device_attach: mmcsd0 attach returned 6 done. vt_upgrade(&vt_consdev)... done. subsystem affffff END QUOTE You may want to ignore my guesses below . . . If I gather right, the part before: mmc0: MMC probe: OK (OCR: 0x40ff8080) is as expected. I'm not sure about: aw_mmc0: error rint: 0x00008018 AW_MMC_INT_DATA_END_BIT_ERR mmc0: CMD19 RESULT: 4 The part between: mmc0: bus: 4bit, 200MHz (HS200 timing) and: mmc0: setting transfer rate to 52.000MHz (dual data rate timing) may well be as expected. I'm guessing that the following is the odd part that contributes to device_attach returning 6: aw_mmc0: controller timeout aw_mmc0: timeout updating clock Expensive timeout(9) function: 0xffff00000068400c(0xfffffd00001bd400) = 11.120601791 s mmc0: CMD8 RESULT: 1 aw_mmc0: controller timeout aw_mmc0: timeout updating clock mmc0: CMD8 RESULT: 1 aw_mmc0: controller timeout aw_mmc0: timeout updating clock mmc0: CMD8 RESULT: 1 aw_mmc0: controller timeout aw_mmc0: Spurious interrupt - no active request, rint: 0x00000000 mmc0: CMD8 RESULT: 1 mmcsd0: Error reading EXT_CSD Timeout device_attach: mmcsd0 attach returned 6 One thing looking different than linux booting from such a e.MMC on a sdcard adapter may be the 52.000MHz. Linux showed: # cat /sys/kernel/debug/mmc0/ios clock: 52000000 Hz actual clock: 50000000 Hz . . . =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)