From owner-freebsd-mips@FreeBSD.ORG Mon Apr 8 18:32:12 2013 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 949AF769; Mon, 8 Apr 2013 18:32:12 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by mx1.freebsd.org (Postfix) with ESMTP id 04A95FBD; Mon, 8 Apr 2013 18:32:11 +0000 (UTC) Received: by mail-wg0-f53.google.com with SMTP id c11so6248196wgh.20 for ; Mon, 08 Apr 2013 11:32:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=I4J+NZqg8XBn5CjEPy7XK48+guJ6PHiVI7ehJr/N7+M=; b=kghsQwByanBRQzcL/9DG3lgr5PzSkWvmUiESTQS41b8NsHLnkdByc9NQMefganE8yC CBKtCVdcvtx7Pb57nXpSbtumUKSwJAeKUd8iwfTbVoHKODc9/u/QfUhXvRClJc9uRnMK dhzZwTct1HYvROMaP/nB5BIKmMvjmWOY3zzV07CRuX6Iz9Py9nWZoGd3Y+Zu8VXK2+Kt 5R5b4X4tobKd5ENAs2yZGi7R5UoFWYQ+CxVMirL0QaSyToK5E8jYELqARr18ojz3Ckvr FRbgHEI6KmAuzp4J4CrDDfbira72WO+7jOFb9i8A7uc9fKuhod1bTjr4Id4w30jzi2P8 60HA== MIME-Version: 1.0 X-Received: by 10.194.88.138 with SMTP id bg10mr33602297wjb.13.1365445930535; Mon, 08 Apr 2013 11:32:10 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.121.136 with HTTP; Mon, 8 Apr 2013 11:32:10 -0700 (PDT) In-Reply-To: <20130408153334.9cc11688aedbf32dcbf83a7b@freebsd.org> References: <20130407011307.9a9a9d64.ray@freebsd.org> <20130407022428.86a66c6a.ray@freebsd.org> <20130408153334.9cc11688aedbf32dcbf83a7b@freebsd.org> Date: Mon, 8 Apr 2013 11:32:10 -0700 X-Google-Sender-Auth: ggvX5yoZpclZl4ZOfcbs1kh10m0 Message-ID: Subject: Re: [PATCH] MMC/SD SPI-mode driver From: Adrian Chadd To: Aleksandr Rybalko Content-Type: text/plain; charset=ISO-8859-1 Cc: Dmytro , freebsd-mips@freebsd.org X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 18:32:12 -0000 On 8 April 2013 05:33, Aleksandr Rybalko wrote: >> That way both can occur independently. > > Agree, but you forget to say about lock/unlock :) Yup, locking is implied. :-) I don't have any problem with extending the bus with this particular method hack to allow the driver to implement an alternate read method. Anyone else? I'm happy to review a patch against -HEAD that does this: * add that new method, same as zrouter * add the code to the flash driver, same as zrouter * add spi locking in ar71xx_spi to ensure that entire transfers are done inside a lock; * for that copy read method, have it lock the device, put it back into mapped mode, do the copy, put it into SPI mode, unlock the device. I think that should make it kick ass. Any takers? :) adrian