From: Nick Thompson <nick.thompson@ge.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] TI DaVinci: Driver for the davinci SPI controller
Date: Tue, 05 Jan 2010 09:52:39 +0000 [thread overview]
Message-ID: <4B430BE7.1060007@ge.com> (raw)
In-Reply-To: <1262666822-27247-1-git-send-email-sudhakar.raj@ti.com>
On 05/01/10 04:47, Sudhakar Rajashekhara wrote:
> From: Sekhar Nori <nsekhar@ti.com>
>
> This adds a driver for the SPI controller found on davinci
> based SoCs from Texas Instruments.
>
> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
> Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
> ---
> From the previous version following have been modified:
> 1. Sorted the entries in drivers/spi/Makefile alphabetically.
> 2. Implemented dummy functions for spi_cs_is_valid(),
> spi_cs_activate() and spi_cs_deactivate().
> 3. Added GPL header for drivers/spi/davinci_spi.h file.
> 4. Added protection against multiple inclusion of SPI header
> file.
> 5. Replaced the macro based register offsets in SPI header
> file with structure.
> 6. Replaced the spi_readl and spi_writel functions with
> readl and writel respectively.
>
> drivers/spi/Makefile | 1 +
> drivers/spi/davinci_spi.c | 221 ++++++++++++++++++++++++++++++++++++++++++++
> drivers/spi/davinci_spi.h | 102 ++++++++++++++++++++
> include/configs/da830evm.h | 2 +-
No sign of this file in the patch set. Is this intentional?
> 4 files changed, 325 insertions(+), 1 deletions(-)
> create mode 100644 drivers/spi/davinci_spi.c
> create mode 100644 drivers/spi/davinci_spi.h
...
> diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c
> new file mode 100644
> index 0000000..c3f1810
> --- /dev/null
> +++ b/drivers/spi/davinci_spi.c
> @@ -0,0 +1,221 @@
...
> +
> + /* CS, CLK, SIMO and SOMI are functional pins */
> + writel((SPIPC0_EN0FUN_MASK) | (SPIPC0_CLKFUN_MASK) |
> + (SPIPC0_DOFUN_MASK) | (SPIPC0_DIFUN_MASK), &ds->regs->pc0);
There seem to be numerous cases, here and elsewhere in the file where bare defines
are referenced within parenthesis for no obvious reason. If they are needed they
should be in the #define statement. I think in all cases they are, so the above
lines should be something like...
/* CS, CLK, SIMO and SOMI are functional pins */
writel((SPIPC0_EN0FUN_MASK | SPIPC0_CLKFUN_MASK |
SPIPC0_DOFUN_MASK | SPIPC0_DIFUN_MASK), &ds->regs->pc0);
...which also corrects the alignment of the last line.
Regards,
Nick.
next prev parent reply other threads:[~2010-01-05 9:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-05 4:47 [U-Boot] [PATCH v2] TI DaVinci: Driver for the davinci SPI controller Sudhakar Rajashekhara
2010-01-05 9:52 ` Nick Thompson [this message]
2010-01-05 13:29 ` Sudhakar Rajashekhara
2010-01-05 14:19 ` Tom
2010-01-06 11:26 ` Sudhakar Rajashekhara
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=4B430BE7.1060007@ge.com \
--to=nick.thompson@ge.com \
--cc=u-boot@lists.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