omap: McBSP: Introduce caching in register write operations
authorJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Mon, 15 Feb 2010 18:03:33 +0000 (10:03 -0800)
committerTony Lindgren <tony@atomide.com>
Mon, 15 Feb 2010 18:03:33 +0000 (10:03 -0800)
commitc8c99699bd25d8b238ba75d2530d1be90e3c39ea
tree50d4b5fa730c3f1a77c96ebb4abd7593c0fcb7e0
parent8ea3200f1de1c3d8f3c884a704107fb1e7449547
omap: McBSP: Introduce caching in register write operations

Determine cache size required per McBSP port at init time, based on
processor type running on.

Allocate space for storing cached copies of McBSP register values at
port request.

Modify omap_msbcp_write() function to update the cache with every
register write operation.

Modify omap_mcbsp_read() to support reading from cache or hardware.

Update MCBSP_READ() macro for modified omap_mcbsp_read() function API.

Introduce a new macro that reads from the cache.

Tested on OMAP1510 based Amstrad Delta using linux-omap for-next, commit
fb7380d70e041e4b3892f6b19dff7efb609d15a4 (2.6.33-rc3+ dated 2010-01-11).
Compile-tested with: omap_perseus2_730_defconfig, omap_generic_1610_defconfig,
omap_generic_2420_defconfig, omap_2430sdp_defconfig, omap_3430sdp_defconfig,
omap_4430sdp_defconfig with CONFIG_OMAP_MCBSP=y selected.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap1/mcbsp.c
arch/arm/mach-omap2/mcbsp.c
arch/arm/plat-omap/include/plat/mcbsp.h
arch/arm/plat-omap/mcbsp.c