From owner-freebsd-arm@FreeBSD.ORG Sun Jan 18 08:31:08 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CF19AD0 for ; Sun, 18 Jan 2015 08:31:08 +0000 (UTC) Received: from moon.peach.ne.jp (moon.peach.ne.jp [203.141.148.98]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 283A8C18 for ; Sun, 18 Jan 2015 08:31:07 +0000 (UTC) Received: from moon.peach.ne.jp (localhost [127.0.0.1]) by moon.peach.ne.jp (Postfix) with ESMTP id 6A45668120 for ; Sun, 18 Jan 2015 17:31:06 +0900 (JST) Received: from artemis (unknown [172.18.0.21]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by moon.peach.ne.jp (Postfix) with ESMTPSA id 63B1E6811E for ; Sun, 18 Jan 2015 17:31:06 +0900 (JST) Message-ID: <9C4B3BEE66EA4C1582F149682BBF729E@ad.peach.ne.jp> From: "Daisuke Aoyama" To: References: In-Reply-To: Subject: Re: HS mode in RPi Date: Sun, 18 Jan 2015 17:31:04 +0900 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 14.0.8117.416 X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416 X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 08:31:08 -0000 I forget mention. r276985 is complete wrong. SDHCI_COMMAND_FLAGS is never stored in local variable. So accessing it means "return uninitialized value". > if (off == SDHCI_TRANSFER_MODE) { > return (sc->cmd_and_mode >> 16); > } else if (off == SDHCI_COMMAND_FLAGS) { > return (sc->cmd_and_mode & 0x0000ffff); > } Also I fixed, the code may return unexpected value. 16bit width access should use even address. >return ((val >> (off & 3)*8) & 0xffff); For more, please see my patch. http://www.peach.ne.jp/archives/rpi/patch/src-r277169-20150114.patch.gz Regards, -- Daisuke Aoyama