aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJarkko Nikula <jhnikula@gmail.com>2011-07-01 04:52:27 -0400
committerTony Lindgren <tony@atomide.com>2011-07-07 15:06:34 -0400
commitfd1ee39151f397730a2b23d14fb232c098743f4b (patch)
tree1861b6c8a87dd838758bf88828cd3bc1519f5c3a
parent9df0fcc4c842703080ee431112d624b1f8f2f1c8 (diff)
omap: mcbsp: Remove port number enums
These McBSP port number enums are used only in two places in the McBSP code so we may remove then and just use numeric values like rest of the code does. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap1/mcbsp.c4
-rw-r--r--arch/arm/plat-omap/include/plat/mcbsp.h10
2 files changed, 3 insertions, 11 deletions
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c
index d9af9811dedd..ab7395d84bc8 100644
--- a/arch/arm/mach-omap1/mcbsp.c
+++ b/arch/arm/mach-omap1/mcbsp.c
@@ -38,7 +38,7 @@ static void omap1_mcbsp_request(unsigned int id)
38 * On 1510, 1610 and 1710, McBSP1 and McBSP3 38 * On 1510, 1610 and 1710, McBSP1 and McBSP3
39 * are DSP public peripherals. 39 * are DSP public peripherals.
40 */ 40 */
41 if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3) { 41 if (id == 0 || id == 2) {
42 if (dsp_use++ == 0) { 42 if (dsp_use++ == 0) {
43 api_clk = clk_get(NULL, "api_ck"); 43 api_clk = clk_get(NULL, "api_ck");
44 dsp_clk = clk_get(NULL, "dsp_ck"); 44 dsp_clk = clk_get(NULL, "dsp_ck");
@@ -59,7 +59,7 @@ static void omap1_mcbsp_request(unsigned int id)
59 59
60static void omap1_mcbsp_free(unsigned int id) 60static void omap1_mcbsp_free(unsigned int id)
61{ 61{
62 if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3) { 62 if (id == 0 || id == 2) {
63 if (--dsp_use == 0) { 63 if (--dsp_use == 0) {
64 if (!IS_ERR(api_clk)) { 64 if (!IS_ERR(api_clk)) {
65 clk_disable(api_clk); 65 clk_disable(api_clk);
diff --git a/arch/arm/plat-omap/include/plat/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h
index 63464ad9c67a..9882c657b2d4 100644
--- a/arch/arm/plat-omap/include/plat/mcbsp.h
+++ b/arch/arm/plat-omap/include/plat/mcbsp.h
@@ -33,7 +33,7 @@
33#define OMAP_MCBSP_PLATFORM_DEVICE(port_nr) \ 33#define OMAP_MCBSP_PLATFORM_DEVICE(port_nr) \
34static struct platform_device omap_mcbsp##port_nr = { \ 34static struct platform_device omap_mcbsp##port_nr = { \
35 .name = "omap-mcbsp-dai", \ 35 .name = "omap-mcbsp-dai", \
36 .id = OMAP_MCBSP##port_nr, \ 36 .id = port_nr - 1, \
37} 37}
38 38
39#define MCBSP_CONFIG_TYPE2 0x2 39#define MCBSP_CONFIG_TYPE2 0x2
@@ -332,14 +332,6 @@ struct omap_mcbsp_reg_cfg {
332}; 332};
333 333
334typedef enum { 334typedef enum {
335 OMAP_MCBSP1 = 0,
336 OMAP_MCBSP2,
337 OMAP_MCBSP3,
338 OMAP_MCBSP4,
339 OMAP_MCBSP5
340} omap_mcbsp_id;
341
342typedef enum {
343 OMAP_MCBSP_WORD_8 = 0, 335 OMAP_MCBSP_WORD_8 = 0,
344 OMAP_MCBSP_WORD_12, 336 OMAP_MCBSP_WORD_12,
345 OMAP_MCBSP_WORD_16, 337 OMAP_MCBSP_WORD_16,