linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Cory Maccarrone <darkstar6262@gmail.com>
Cc: spi-devel-general@lists.sourceforge.net, linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/3] [SPI] [OMAP] Add OMAP spi100k driver
Date: Mon, 7 Dec 2009 10:08:05 -0800	[thread overview]
Message-ID: <20091207180805.GD24013@atomide.com> (raw)
In-Reply-To: <1260161299-17656-2-git-send-email-darkstar6262@gmail.com>

Hi,

* Cory Maccarrone <darkstar6262@gmail.com> [091206 20:48]:
> This change adds the OMAP SPI 100k driver created by
> Fabrice Crohas <fcrohas@gmail.com>.  This SPI bus is found on
> OMAP7xx-series smartphones, and for many, the touchscreen is
> attached to this bus.
> 
> The lion's share of the work was done by Fabrice on this driver --
> I am merely porting it from the Linwizard project on his behalf.
> 
> Signed-off-by: Cory Maccarrone <darkstar6262@gmail.com>
> ---
>  drivers/spi/Kconfig         |    6 +
>  drivers/spi/Makefile        |    1 +
>  drivers/spi/omap_spi_100k.c |  642 +++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 649 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/spi/omap_spi_100k.c

<snip>

> +static void spi100k_enable_clock(struct spi_master *master)
> +{
> +	unsigned int val;
> +	struct omap1_spi100k *spi100k = spi_master_get_devdata(master);
> +
> +	/* enable SPI */
> +	val = omap_readw(spi100k->base_addr + SPI_SETUP1);
> +	val |= SPI_SETUP1_CLOCK_ENABLE;
> +	omap_writew(val, spi100k->base_addr + SPI_SETUP1);
> +}

Please do not use omap_read/write for the new drivers.

Instead, please use ioremap in the platform init code in
arch/arm/mach-omap1/, and pass the virtual address in
platform_data to the driver. Then you can use readw/writew
in the driver.

We have static mappings in place for ioremap, so there's
no extra overhead.

Regards,

Tony

  parent reply	other threads:[~2009-12-07 18:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-07  4:48 [PATCH 0/3] Add spi100k driver and arch support Cory Maccarrone
2009-12-07  4:48 ` [PATCH 1/3] [SPI] [OMAP] Add OMAP spi100k driver Cory Maccarrone
     [not found]   ` <1260161299-17656-2-git-send-email-darkstar6262-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-12-07  5:33     ` jassi brar
2009-12-07  6:36       ` [spi-devel-general] " Cory Maccarrone
2009-12-07 18:08   ` Tony Lindgren [this message]
2009-12-07  4:48 ` [PATCH 2/3] [OMAP] Add spi100k configuration to OMAP1 Cory Maccarrone
2009-12-07 18:14   ` Tony Lindgren
2009-12-07  4:48 ` [PATCH 3/3] [OMAP] Add OMAP 7xx pin muxes for SPI Cory Maccarrone

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=20091207180805.GD24013@atomide.com \
    --to=tony@atomide.com \
    --cc=darkstar6262@gmail.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    --subject='Re: [PATCH 1/3] [SPI] [OMAP] Add OMAP spi100k driver' \
    /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

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).