linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: Stefan Roese <sr@denx.de>
Cc: David Brownell <david-b@pacbell.net>,
	linuxppc-dev@ozlabs.org, spi-devel-general@lists.sourceforge.net
Subject: Re: [PATCH v5] spi: Add PPC4xx SPI driver
Date: Mon, 05 Jan 2009 20:31:17 +0100	[thread overview]
Message-ID: <20090105193117.E5AD98387CDB@gemini.denx.de> (raw)
In-Reply-To: <200901051912.25874.sr@denx.de>

Dear Stefan,

In message <200901051912.25874.sr@denx.de> you wrote:
>
> > > +	/* Write new configration */
> > > +	out_8(&hw->regs->mode, cs->mode);
> > > +
> > > +	/*
> > > +	 * Allow platform reduce the interrupt load on the CPU during SPI
> > > +	 * transfers. We do not target maximum performance, but rather allow
> > > +	 * platform to limit SPI bus frequency and interrupt rate.
> >
> > That comment doesn't seem even vaguely related to the
> > code it allegedly refers to ... nothing in this routine
> > affects the IRQ load.
> 
> IIRC (I didn't write the original version of this driver) then this comments 
> simply refers to the fact that the platform can select a maximum SPI 
> frequency via spi->max_speed_hz which is pretty obvious. So I'll just remove 
> this comment in the next version.

On PPC4xx systems we get one interrupt per transferred  byte,  i.  e.
there  is  a  direct relation between SPI bus frequency and interrupt
rate.

Since this is a PPC4xx SPI driver, the comment is actually helpful to
understand the operation of the driver especially in relation to  the
limitations of the hardware.

Instead of removing the  comment  (which  leaves  the  casual  reader
clueless)  it  would probably better to add a sentence explaining the
one byte / one interrupt situation?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
...when fits of creativity run strong, more than  one  programmer  or
writer  has  been  known to abandon the desktop for the more spacious
floor.                                             - Fred Brooks, Jr.

  reply	other threads:[~2009-01-05 19:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-25 15:48 [PATCH v5] spi: Add PPC4xx SPI driver Stefan Roese
2008-12-09 21:48 ` Steven A. Falco
2008-12-09 22:14   ` Steven A. Falco
2008-12-27 19:30 ` David Brownell
2009-01-05 18:12   ` Stefan Roese
2009-01-05 19:31     ` Wolfgang Denk [this message]
2009-01-06  8:26       ` Stefan Roese
2008-12-27 19:32 ` David Brownell
2008-12-27 21:36   ` Stephen Rothwell
2009-01-06  2:06 ` [spi-devel-general] " Anton Vorontsov
2009-01-06  8:14   ` Stefan Roese

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=20090105193117.E5AD98387CDB@gemini.denx.de \
    --to=wd@denx.de \
    --cc=david-b@pacbell.net \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    --cc=sr@denx.de \
    /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).