All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dirk Behme <dirk.behme@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] TI DaVinci: Driver for the davinci SPI controller
Date: Fri, 25 Dec 2009 18:11:13 +0100	[thread overview]
Message-ID: <4B34F231.9000703@googlemail.com> (raw)
In-Reply-To: <1261554276-20449-1-git-send-email-sudhakar.raj@ti.com>

On 23.12.2009 08:44, 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>
> ---
>   drivers/spi/Makefile      |    1 +
>   drivers/spi/davinci_spi.c |  205 +++++++++++++++++++++++++++++++++++++++++++++
>   drivers/spi/davinci_spi.h |   84 ++++++++++++++++++
>   3 files changed, 290 insertions(+), 0 deletions(-)
>   create mode 100644 drivers/spi/davinci_spi.c
>   create mode 100644 drivers/spi/davinci_spi.h
>
> diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
> index 824d8e7..07b9611 100644
> --- a/drivers/spi/Makefile
> +++ b/drivers/spi/Makefile
> @@ -34,6 +34,7 @@ COBJS-$(CONFIG_MPC52XX_SPI) += mpc52xx_spi.o
>   COBJS-$(CONFIG_MPC8XXX_SPI) += mpc8xxx_spi.o
>   COBJS-$(CONFIG_MXC_SPI) += mxc_spi.o
>   COBJS-$(CONFIG_SOFT_SPI) += soft_spi.o
> +COBJS-$(CONFIG_DAVINCI_SPI) += davinci_spi.o

Should this list be kept sorted alphabetically? I.e.

...
COBJS-$(CONFIG_BFIN_SPI) += bfin_spi.o
COBJS-$(CONFIG_CF_SPI) += cf_spi.o
  +COBJS-$(CONFIG_DAVINCI_SPI) += davinci_spi.o
COBJS-$(CONFIG_KIRKWOOD_SPI) += kirkwood_spi.o
...

?

>   COBJS	:= $(COBJS-y)
>   SRCS	:= $(COBJS:.o=.c)
> diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c
> new file mode 100644
> index 0000000..1c988bb
> --- /dev/null
> +++ b/drivers/spi/davinci_spi.c
> @@ -0,0 +1,205 @@
...
> +void spi_init()
...
> +struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
> +			unsigned int max_hz, unsigned int mode)
...
> +void spi_free_slave(struct spi_slave *slave)
....
> +int spi_claim_bus(struct spi_slave *slave)
....
> +void spi_release_bus(struct spi_slave *slave)
....
> +int spi_xfer(struct spi_slave *slave, unsigned int bitlen,
> +		const void *dout, void *din, unsigned long flags)

I wonder if all (SPI API) functions from include/spi.h should be 
implemented? I.e. do we need (dummy) functions for spi_cs_is_valid(), 
spi_cs_activate() and spi_cs_deactivate(), too? Just in case a driver 
does use them.

> diff --git a/drivers/spi/davinci_spi.h b/drivers/spi/davinci_spi.h
> new file mode 100644
> index 0000000..b3bf916
> --- /dev/null
> +++ b/drivers/spi/davinci_spi.h
> @@ -0,0 +1,84 @@
> +/*
> + * Register definitions for the DaVinci SPI Controller
> + */

Do we want a complete GPL header, like in the .c file, here, too?

Do we want a protection against multiple inclusion

#ifndef _DAVINCI_SPI_H_
#define _DAVINCI_SPI_H_

in this header file?

Best regards

Dirk

  parent reply	other threads:[~2009-12-25 17:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-23  7:44 [U-Boot] [PATCH] TI DaVinci: Driver for the davinci SPI controller Sudhakar Rajashekhara
2009-12-24  1:34 ` Mike Frysinger
2009-12-24  2:52   ` Sudhakar Rajashekhara
2009-12-25 17:11 ` Dirk Behme [this message]
2010-01-04  9:42   ` Sudhakar Rajashekhara
2010-01-04  9:46   ` Sudhakar Rajashekhara
2010-01-05  6:01     ` Mike Frysinger
2010-01-05  7:14       ` [U-Boot] NS16550 Register structure Pedanekar, Hemant
2010-01-05  7:35         ` Wolfgang Denk
2010-01-05  8:55           ` Pedanekar, Hemant
2010-01-05  9:58             ` Wolfgang Denk
2010-01-18 14:51               ` Pedanekar, Hemant
2010-01-19 13:04                 ` Detlev Zundel
2010-01-21 11:58                   ` Pedanekar, Hemant
2010-01-28  9:54                   ` Pedanekar, Hemant
2010-01-28 11:00                     ` Wolfgang Denk
2010-01-04  9:47 ` [U-Boot] [PATCH] TI DaVinci: Driver for the davinci SPI controller Nick Thompson
2010-01-04 10:42   ` Sudhakar Rajashekhara
2010-01-04 19:50     ` Dirk Behme
2010-01-05  0:20       ` Mike Frysinger
2010-03-05  6:47       ` Mansoor
2010-03-07 12:38         ` [U-Boot] OMAP3 SPI driver ( was Re: [PATCH] TI DaVinci: Driver for the davinci SPI controller) Dirk Behme

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=4B34F231.9000703@googlemail.com \
    --to=dirk.behme@googlemail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.