From owner-freebsd-arm@FreeBSD.ORG Tue May 20 14:42:47 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2D33B10 for ; Tue, 20 May 2014 14:42:47 +0000 (UTC) Received: from msgw001-05.ocn.ad.jp (msgw001-05.ocn.ad.jp [180.37.203.74]) by mx1.freebsd.org (Postfix) with ESMTP id 751792CD4 for ; Tue, 20 May 2014 14:42:47 +0000 (UTC) Received: from localhost (p11104-ipngn100303sizuokaden.shizuoka.ocn.ne.jp [114.176.34.104]) by msgw001-05.ocn.ad.jp (Postfix) with ESMTP id 2413AA82C1D; Tue, 20 May 2014 23:42:46 +0900 (JST) Date: Tue, 20 May 2014 23:42:45 +0900 (JST) Message-Id: <20140520.234245.38709064.toshi@ruby.ocn.ne.jp> To: madis555@hot.ee Subject: Re: BBB MMC / SD detection instability with U-Boot 2014.04 (CPU 1GHz) From: SAITOU Toshihide In-Reply-To: <537B62D1.4090901@hot.ee> References: <20140520.191001.03109216.toshi@ruby.ocn.ne.jp> <20140520.212003.232778263.toshi@ruby.ocn.ne.jp> <537B62D1.4090901@hot.ee> X-GPG-fingerprint: 34B3 0B6A 8520 F5B0 EBC7 69F6 C055 9F8A 0D49 F8FC X-Mailer: Mew version 6.2.51 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 May 2014 14:42:47 -0000 In message: <537B62D1.4090901@hot.ee> "Sulev-Madis Silber (ketas)" writes: > On 2014-05-20 15:20, SAITOU Toshihide wrote: >> In message: <20140520.191001.03109216.toshi@ruby.ocn.ne.jp> >> SAITOU Toshihide writes: >>> In message: <537ACDB2.9080808@hot.ee> >>> "Sulev-Madis Silber (ketas)" writes: >>>> >>>> Actually I guess many people might think like me... "HELL, optimizing >>>> boot time of 1min?! I have more important tasks to do than this". >>> >>> If you have ``device sdhci'' line in conf/BEAGLEBONE, is there any >>> differences by changing mmchs to sdhci in am335x.dtsi and >>> beaglebone-black.dts? And also remove ``status = "disabled"'' > > Don't edit am335x.dtsi > > And beaglebone-black.dts already has proper config. In this case, how does ``device sdhci'' driver know the register address? I thought that there is an inconsistency in BEAGLEBONE config and dts file for the SD/MMC driver. >>> It's needed for me to detect eMMC, and the perfomance is >>> better: http://lists.freebsd.org/pipermail/freebsd-arm/2013-August/006332.html >>> >>> But I don't success to boot from eMMC yet with u-boot-2014.04. I need >>> to change u-boot. >> >> It was booted from eMMC, though it failed sometimes. > > Are you sure it booted from eMMC? Like, I can't find eMMC in loader > (ubldr). So I need SD to complete this part of boot. > > Not sure what I need to patch, probably loader? Hopefully the old uboot > can be used as well. Version check or something... Yes sure, because SD card is detached. The pach is for u-boot. >> u-boot-2014.04.tar.bz2 >> >> patch >> >> 1. apply these patches: >> >> http://lists.freebsd.org/pipermail/freebsd-arm/2014-April/007922.html >> ~/crochet-freebsd/board/BeagleBone/files/uboot-2013.04_api_api_storage.c.patch >> ~/crochet-freebsd/board/BeagleBone/files/uboot-2013.04_drivers_mmc_mmc.c.patch >> >> patch -p1 or edit. >> >> 2. add followings to include/configs/am335x_evm.h: >> >> #ifndef CONFIG_SPL_BUILD >> #define CONFIG_CMD_ELF >> #define CONFIG_API >> #define CONFIG_SYS_MMC_MAX_DEVICE 2 >> #endif >> >> 3. comment WATCHDOG in include/configs/ti_am335x_common.h: >> >> #define CONFIG_HW_WATCHDOG >> #define CONFIG_OMAP_WATCHDOG >> >> #define CONFIG_SPL_WATCHDOG_SUPPORT >> >> build >> >> gmake CROSS_COMPILE=arm-eabi- am335x_boneblack_config >> gmake CROSS_COMPILE=arm-eabi- >> >> >> uEnv.txt >> >> bootdelay=2 >> fdtaddr=0x80000100 >> loadaddr=0x88000000 >> loaderdev=disk >> fdtfile=beaglebo.dtb >> bootdir= >> bootfile=ubldr >> mmcdev=1 >> mmcloados=mmc rescan >> loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv} >> importbootenv=env import -t $loadaddr $filesize >> findfdt=setenv fdtfile beaglebo.dtb >> loadimage=fatload mmc ${mmcdev} ${loadaddr} ${bootfile} >> loadfdt=fatload mmc ${mmcdev} ${fdtaddr} ${fdtfile}; fdt addr ${fdtaddr} >> mmcboot=bootelf ${loadaddr} >> nandboot=run mmcboot >> >> Please ignore ``Card did not respond to voltage select!'' message. >> > > Crochet already has all those patches, so I use uboot from there. Yes, I use patches of crochet for u-boot-2014.04. -- SAITOU Toshihide