I2C: OMAP2+: Set hwmod flags to only allow 16-bit accesses to i2c
authorAndy Green <andy@warmcat.com>
Mon, 30 May 2011 14:43:00 +0000 (07:43 -0700)
committerGrazvydas Ignotas <notasas@gmail.com>
Fri, 3 Jun 2011 11:49:35 +0000 (14:49 +0300)
commit4ff36d3f4a2ecb6b3f73b2d4e8e52a47be7cb6eb
tree965a7bf46fb6b341dcdff52d933ccd8efc5e557e
parent744c95a27477d1fb3963bf32522a94edf7e82c3e
I2C: OMAP2+: Set hwmod flags to only allow 16-bit accesses to i2c

Peter Maydell noticed when running under QEMU he was getting
errors reporting 32-bit access to I2C peripheral unit registers
that are documented to be 8 or 16-bit only[1][2]

The I2C driver is blameless as it wraps its accesses in a
function using __raw_writew and __raw_readw, it turned out it
is the hwmod stuff.

However the hwmod code already has a flag to force a
perhipheral unit to only be accessed using 16-bit operations.

This patch applies the 16-bit only flag to the 2430,
OMAP3xxx and OMAP44xx hwmod structs.  2420 was already
correctly marked up as 16-bit.

The 2430 change will need testing by TI as arranged
in the comments to the previous patch version.

When the 16-bit flag is or-ed with other flags, it is placed
first as requested in comments.

[1] OMAP4430 Technical reference manual section 23.1.6.2
[2] OMAP3530 Techincal reference manual section 18.6

Cc: patches@linaro.org
Cc: Ben Dooks <ben-linux@fluff.org>
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andy Green <andy.green@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
arch/arm/mach-omap2/omap_hwmod_2430_data.c
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
arch/arm/mach-omap2/omap_hwmod_44xx_data.c