aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/mcbsp.c
diff options
context:
space:
mode:
authorJarkko Nikula <jarkko.nikula@bitmer.com>2011-09-26 03:45:43 -0400
committerTony Lindgren <tony@atomide.com>2011-09-26 20:48:18 -0400
commitac6747ca0d2e01ed55281d1cc95b5dc646735a20 (patch)
tree9696ff219bc6cc23cbe22829287f0cedd7152931 /arch/arm/plat-omap/mcbsp.c
parent7bba67ab3aa629f88e17786b07177b76b925cb0e (diff)
ARM: OMAP: mcbsp: Use per instance register cache size
Rationale here is to remove one global variable and to make possible to have variable size McBSP register maps inside SoC. 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/plat-omap/mcbsp.c')
-rw-r--r--arch/arm/plat-omap/mcbsp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index 234ab16e8399..3ad536ea6c37 100644
--- a/arch/arm/plat-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -31,7 +31,7 @@
31#include "../mach-omap2/cm-regbits-34xx.h" 31#include "../mach-omap2/cm-regbits-34xx.h"
32 32
33struct omap_mcbsp **mcbsp_ptr; 33struct omap_mcbsp **mcbsp_ptr;
34int omap_mcbsp_count, omap_mcbsp_cache_size; 34int omap_mcbsp_count;
35 35
36static void omap_mcbsp_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val) 36static void omap_mcbsp_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val)
37{ 37{
@@ -678,7 +678,7 @@ int omap_mcbsp_request(unsigned int id)
678 } 678 }
679 mcbsp = id_to_mcbsp_ptr(id); 679 mcbsp = id_to_mcbsp_ptr(id);
680 680
681 reg_cache = kzalloc(omap_mcbsp_cache_size, GFP_KERNEL); 681 reg_cache = kzalloc(mcbsp->reg_cache_size, GFP_KERNEL);
682 if (!reg_cache) { 682 if (!reg_cache) {
683 return -ENOMEM; 683 return -ENOMEM;
684 } 684 }
@@ -1225,7 +1225,7 @@ static int __devinit omap_mcbsp_probe(struct platform_device *pdev)
1225 } 1225 }
1226 } 1226 }
1227 mcbsp->phys_base = res->start; 1227 mcbsp->phys_base = res->start;
1228 omap_mcbsp_cache_size = resource_size(res); 1228 mcbsp->reg_cache_size = resource_size(res);
1229 mcbsp->io_base = ioremap(res->start, resource_size(res)); 1229 mcbsp->io_base = ioremap(res->start, resource_size(res));
1230 if (!mcbsp->io_base) { 1230 if (!mcbsp->io_base) {
1231 ret = -ENOMEM; 1231 ret = -ENOMEM;