summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap1/mcbsp.c
diff options
context:
space:
mode:
authorJarkko Nikula <jarkko.nikula@bitmer.com>2011-09-26 11:45:39 +0400
committerTony Lindgren <tony@atomide.com>2011-09-27 04:46:48 +0400
commitcdc71514a0f4f3e8c995f18d1119cef01a501dac (patch)
treeffc6ae60449339619d92dda064051052da7ededb /arch/arm/mach-omap1/mcbsp.c
parent40246e0003f02160a116db249270129b0c600e95 (diff)
downloadlinux-cdc71514a0f4f3e8c995f18d1119cef01a501dac.tar.xz
ARM: OMAP: mcbsp: Implement generic register access
Register access can be made more generic by calculating register address offsets runtime from common register definitions and by using reg_size and reg_step variables that are passed via platform data. Common register definitions are possible since McBSP registers are ordered similarly between OMAP versions. Remove also references to OMAP2+ specific config_type variable from generic McBSP code since other variables and feature flags are better to carry needed information from platform code. Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1/mcbsp.c')
-rw-r--r--arch/arm/mach-omap1/mcbsp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c
index 3c985ac1dfc7..36ab5d83327e 100644
--- a/arch/arm/mach-omap1/mcbsp.c
+++ b/arch/arm/mach-omap1/mcbsp.c
@@ -391,6 +391,8 @@ static void omap_mcbsp_register_board_cfg(struct resource *res, int res_count,
continue;
platform_device_add_resources(new_mcbsp, &res[i * res_count],
res_count);
+ config[i].reg_size = 2;
+ config[i].reg_step = 2;
new_mcbsp->dev.platform_data = &config[i];
ret = platform_device_add(new_mcbsp);
if (ret) {