Re: [PATCH 1/3] [SPI] [OMAP] Add OMAP spi100k driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

* Cory Maccarrone <darkstar6262@xxxxxxxxx> [091206 20:48]:
> This change adds the OMAP SPI 100k driver created by
> Fabrice Crohas <fcrohas@xxxxxxxxx>.  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@xxxxxxxxx>
> ---
>  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
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux