From cdc71514a0f4f3e8c995f18d1119cef01a501dac Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Mon, 26 Sep 2011 10:45:39 +0300 Subject: 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 Acked-by: Peter Ujfalusi Tested-by: Janusz Krzysztofik Signed-off-by: Tony Lindgren --- arch/arm/mach-omap1/mcbsp.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm/mach-omap1/mcbsp.c') 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) { -- cgit v1.2.3