Hi,
* Cory Maccarrone <[email protected]> [091206 20:48]:
> This change adds the OMAP SPI 100k driver created by
> Fabrice Crohas <[email protected]>. 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 <[email protected]>
> ---
> 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html