linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Linn <linnj-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
To: "Grant Likely"
	<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
	"Richard Röjfors"
	<richard.rojfors-l7gf1WXxx3uGw+nKnLezzg@public.gmane.org>
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org
Subject: Re: [PATCH v4] xilinx_spi: Splitted into generic, of and platform driver, added support for DS570
Date: Tue, 10 Nov 2009 10:23:02 -0700	[thread overview]
Message-ID: <00fe7c25-4fd8-4df1-b712-ed31db58ba58@SG2EHSMHS010.ehs.local> (raw)
In-Reply-To: <fa686aa40911100844q19789297h8e6713e915185a7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

> -----Original Message-----
> From: glikely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org [mailto:glikely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org] On Behalf Of Grant Likely
> Sent: Tuesday, November 10, 2009 9:45 AM
> To: Richard Röjfors
> Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org; linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org; Andrew Morton;
> dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org; John Linn
> Subject: Re: [spi-devel-general] [PATCH v4] xilinx_spi: Splitted into generic, of and platform
> driver, added support for DS570
> 
> On Tue, Nov 10, 2009 at 9:19 AM, Richard Röjfors
> <richard.rojfors-l7gf1WXxx3uGw+nKnLezzg@public.gmane.org> wrote:
> > Grant Likely wrote:
> >> Oops, I replied to the original version, but missed the subsequent
> >> versions.  Looks like some of my comments still apply though.
> >> Overall, the patch changes too many things all at once.  You should
> >> look at splitting it up.  At the very least the io accessor changes
> >> should be done in a separate patch.
> 
> Hi Richard.  Please do another spin of this patch.  I don't have any
> particular problem with the changes, but it needs to be in a more
> granular form so I can review it properly.

I agree.  

We have a functioning driver such that I need to make sure it doesn't regress. More granular changes will also allow us to better isolate any problems if they occur.

Thanks,
John

> 
> >>> +struct xilinx_spi {
> >>> +       /* bitbang has to be first */
> >>> +       struct spi_bitbang bitbang;
> >>> +       struct completion done;
> >>> +       struct resource mem; /* phys mem */
> >>> +       void __iomem    *regs;  /* virt. address of the control registers */
> >>> +       u32 irq;
> >>> +       u8 *rx_ptr;             /* pointer in the Tx buffer */
> >>> +       const u8 *tx_ptr;       /* pointer in the Rx buffer */
> >>> +       int remaining_bytes;    /* the number of bytes left to transfer */
> >>> +       /* offset to the XSPI regs, these might vary... */
> >>> +       u8 bits_per_word;
> >>> +       bool big_endian;        /* The device could be accessed big or little
> >>> +                                * endian
> >>> +                                */
> >>> +};
> >>> +
> >>
> >> Why is the definition of xilinx_spi moved?
> >
> > I liked the idea of heaving the struct defined in the top of the file.
> 
> ... which is completely unrelated to the patch purpose, and is not
> mentioned in the patch header.  If you really want to move it then put
> it in a completely separate patch and describe the change properly.
> As it is right now it is just noise that makes the stated purpose of
> the patch hard to review.
> 
> >> Ah, you changed these to functions instead of macros.  I like.
> >> However, as you suggested elsewhere in this thread, you could change
> >> these to callbacks and then eliminate the if/else statements.  I think
> >> that is the approach you should use.  I don't think you need to worry
> >> about it being slower.  Any extra cycles for jumping to a callback
> >> will be far dwarfed by the number of cycles it takes to complete an
> >> SPI transfer.
> >
> > Sure that can be updated. I prefer to do that in an incremental patch, would be great to get this
> > big one merged first.
> 
> As already commented on, this patch is too big and does too many
> unrelated things.  Please split into discrete changes so it can be
> reviewed properly.
> 
> Thanks,
> g.
> 
> --
> Grant Likely, B.Sc., P.Eng.
> Secret Lab Technologies Ltd.


This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

  parent reply	other threads:[~2009-11-10 17:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-28 14:22 [PATCH v4] xilinx_spi: Splitted into generic, of and platform driver, added support for DS570 Richard Röjfors
2009-09-28 15:41 ` John Linn
2009-09-29  6:34   ` Richard Röjfors
2009-09-29 15:14     ` John Linn
     [not found] ` <4AC0C699.2070506-l7gf1WXxx3uGw+nKnLezzg@public.gmane.org>
2009-11-09 21:21   ` Grant Likely
2009-11-10  0:59     ` [spi-devel-general] " Stephen Neuendorffer
     [not found]     ` <fa686aa40911091321w187fe85fl4e6d9f36f5966f34-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-11-10 16:19       ` Richard Röjfors
     [not found]         ` <4AF99298.9020207-l7gf1WXxx3uGw+nKnLezzg@public.gmane.org>
2009-11-10 16:44           ` Grant Likely
     [not found]             ` <fa686aa40911100844q19789297h8e6713e915185a7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-11-10 17:23               ` John Linn [this message]
2009-11-11 10:18             ` [spi-devel-general] " Richard Röjfors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00fe7c25-4fd8-4df1-b712-ed31db58ba58@SG2EHSMHS010.ehs.local \
    --to=linnj-gjffaj9ahvfqt0dzr+alfa@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
    --cc=linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
    --cc=richard.rojfors-l7gf1WXxx3uGw+nKnLezzg@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).