From owner-svn-src-all@freebsd.org Tue Apr 19 20:17:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 536A7B14448 for ; Tue, 19 Apr 2016 20:17:29 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-ig0-x22a.google.com (mail-ig0-x22a.google.com [IPv6:2607:f8b0:4001:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 17BE1105C for ; Tue, 19 Apr 2016 20:17:29 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: by mail-ig0-x22a.google.com with SMTP id gy3so110347270igb.0 for ; Tue, 19 Apr 2016 13:17:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=clockworksquid.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=skWIM2XNlCULk/IOXLLVauVcyK/4CIU/NiJgucFLybM=; b=RczozftpEGWL5clBtcAr0b4FeN8oCPvdDhg8Bv02de3Y2RK3/nrUwl8h3VUy9JWD5B XrPqNzoJPur+9psfOhC/t6AItk7QMXwaeWTZ0aYwRRpBbes/cEPsTdTWoNaDO4iwU7Wz VVjWfzpN1cE3XPTbVBR5sBZk13j8zClBMpDEI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=skWIM2XNlCULk/IOXLLVauVcyK/4CIU/NiJgucFLybM=; b=DZDA76R6VuwXCdcEUSZ/MqYNJip9xdSezGR0PEAz9QbpRcgyqjkv4oJY3ZElcwOWDr B8b1+tfNEebCSYTnrRc4NKWvnvX11USC0O2IouRCUgrA58CqFWk8mtQ1reCeYmo0SeFB hg9xOpIZ/KW8+HFOHn5f2YY7+wv5YDsCkZ1QiEUF+dC2fzktuK7DYc+kzILaZQ8SOeBq 9ElDvPFVVsXaOB2czsSxZGPeXM+ByuSLzAN7H4PLngtATALsU4mYS8VK79J1ITZBWpUt cxKYsFza4GoMqp9EfSq89QdtHrg4gBkrgEyy7Rs8sAvSSs+bqyU+uIouAD+42RPW2M3L B3Vw== X-Gm-Message-State: AOPr4FVeO+lJt6hvH2RapnObCNWSOtKKD5lf3Ksbx4lIs6hEAb3bevvvF93iucji65YezfB6xgzL2SGG12f/3g== X-Received: by 10.50.10.166 with SMTP id j6mr6025367igb.28.1461097048154; Tue, 19 Apr 2016 13:17:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.15.66 with HTTP; Tue, 19 Apr 2016 13:17:08 -0700 (PDT) In-Reply-To: <20160419171243.GA30453@bsdpad.com> References: <201604191539.u3JFdkHx048678@repo.freebsd.org> <20160419171243.GA30453@bsdpad.com> From: Juli Mallett Date: Tue, 19 Apr 2016 13:17:08 -0700 Message-ID: Subject: Re: svn commit: r298274 - head/sys/dev/spibus To: Ruslan Bukin Cc: Adrian Chadd , Ruslan Bukin , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Patrick Kelsey Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2016 20:17:29 -0000 Patrick Kelsey offered an mmcspi driver for FreeBSD, but nobody seemed interested. I know of one proprietary branch of FreeBSD using it. You might poke him if you want to know how he dealt with this, and if you want to commit his driver. On Tue, Apr 19, 2016 at 10:12 AM, Ruslan Bukin wrote: > Why I added or why I reverted ? > So once I started to work on generic MMC over SPI driver it was looking like > MMC/SD device in harware requires to keep CS asserted during multiple transfers, > but once I completed it is become clear hardware don't require that. > > Ruslan > > On Tue, Apr 19, 2016 at 09:40:23AM -0700, Adrian Chadd wrote: >> Hm, why'd you do this? did you get it reviewed first? >> >> I'm about to write a kernel bitbang SPI driver that supports arbitrary >> GPIOs, and I was thinking of fleshing this out somewhat. >> >> >> >> -adrian >> >> >> On 19 April 2016 at 08:39, Ruslan Bukin wrote: >> > Author: br >> > Date: Tue Apr 19 15:39:46 2016 >> > New Revision: 298274 >> > URL: https://svnweb.freebsd.org/changeset/base/298274 >> > >> > Log: >> > Revert r298268 (Add optional chip_select/deselect methods). >> > None of supported hardware do require that. >> > >> > Modified: >> > head/sys/dev/spibus/spibus.c >> > head/sys/dev/spibus/spibus_if.m >> > >> > Modified: head/sys/dev/spibus/spibus.c >> > ============================================================================== >> > --- head/sys/dev/spibus/spibus.c Tue Apr 19 15:36:18 2016 (r298273) >> > +++ head/sys/dev/spibus/spibus.c Tue Apr 19 15:39:46 2016 (r298274) >> > @@ -185,24 +185,9 @@ spibus_hinted_child(device_t bus, const >> > static int >> > spibus_transfer_impl(device_t dev, device_t child, struct spi_command *cmd) >> > { >> > - >> > return (SPIBUS_TRANSFER(device_get_parent(dev), child, cmd)); >> > } >> > >> > -static int >> > -spibus_chip_select_impl(device_t dev, device_t child) >> > -{ >> > - >> > - return (SPIBUS_CHIP_SELECT(device_get_parent(dev), child)); >> > -} >> > - >> > -static int >> > -spibus_chip_deselect_impl(device_t dev, device_t child) >> > -{ >> > - >> > - return (SPIBUS_CHIP_DESELECT(device_get_parent(dev), child)); >> > -} >> > - >> > static device_method_t spibus_methods[] = { >> > /* Device interface */ >> > DEVMETHOD(device_probe, spibus_probe), >> > @@ -223,8 +208,6 @@ static device_method_t spibus_methods[] >> > >> > /* spibus interface */ >> > DEVMETHOD(spibus_transfer, spibus_transfer_impl), >> > - DEVMETHOD(spibus_chip_select, spibus_chip_select_impl), >> > - DEVMETHOD(spibus_chip_deselect, spibus_chip_deselect_impl), >> > >> > DEVMETHOD_END >> > }; >> > >> > Modified: head/sys/dev/spibus/spibus_if.m >> > ============================================================================== >> > --- head/sys/dev/spibus/spibus_if.m Tue Apr 19 15:36:18 2016 (r298273) >> > +++ head/sys/dev/spibus/spibus_if.m Tue Apr 19 15:39:46 2016 (r298274) >> > @@ -39,19 +39,3 @@ METHOD int transfer { >> > device_t child; >> > struct spi_command *cmd; >> > }; >> > - >> > -# >> > -# Assert chip select >> > -# >> > -METHOD int chip_select { >> > - device_t dev; >> > - device_t child; >> > -}; >> > - >> > -# >> > -# Deassert chip select >> > -# >> > -METHOD int chip_deselect { >> > - device_t dev; >> > - device_t child; >> > -}; >> > >> >