ARM: OMAP: mcbsp: Make tranceiver configuration control register access generic

McBSP transmit and receive configuration control registers must be set up
for OMAP2430 and later. Replace is_omap tests in generic code with a new
feature flag has_ccr in platform data so that there is no need to change
code for any upcoming OMAP version.

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>
This commit is contained in:
Jarkko Nikula
2011-09-26 10:45:41 +03:00
committed by Tony Lindgren
parent 1a6458847d
commit 88408230d2
3 changed files with 9 additions and 6 deletions

View File

@@ -127,10 +127,12 @@ static int omap_init_mcbsp(struct omap_hwmod *oh, void *unused)
}
pdata->reg_step = 4;
if (oh->class->rev < MCBSP_CONFIG_TYPE2)
if (oh->class->rev < MCBSP_CONFIG_TYPE2) {
pdata->reg_size = 2;
else
} else {
pdata->reg_size = 4;
pdata->has_ccr = true;
}
if (oh->class->rev == MCBSP_CONFIG_TYPE3) {
if (id == 2)