summaryrefslogtreecommitdiffstats
path: root/sound/soc/blackfin/bf5xx-sport.h
diff options
context:
space:
mode:
authorBarry Song2011-03-28 07:45:10 +0200
committerMark Brown2011-03-30 00:20:05 +0200
commit2c66cb99d134d787827ed1cd93cc59351ab66a95 (patch)
tree4c67200205b224947e9500b17af9537e54254a65 /sound/soc/blackfin/bf5xx-sport.h
parentASoC: Blackfin: standardize machine driver names (diff)
downloadkernel-qcow2-linux-2c66cb99d134d787827ed1cd93cc59351ab66a95.tar.gz
kernel-qcow2-linux-2c66cb99d134d787827ed1cd93cc59351ab66a95.tar.xz
kernel-qcow2-linux-2c66cb99d134d787827ed1cd93cc59351ab66a95.zip
ASoC: Blackfin: push down SPORT settings from global variables
Now that we have multi-component support, take the time to unify the SPORT implementations a bit and make the setup dynamic. This kills off the global sport_handle which was shared across all the Blackfin machine drivers. The pin management aspect is off loaded to platform resources, and now multiple SPORTs can be instantiated simultaneously. Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Scott Jiang <scott.jiang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/blackfin/bf5xx-sport.h')
-rw-r--r--sound/soc/blackfin/bf5xx-sport.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/sound/soc/blackfin/bf5xx-sport.h b/sound/soc/blackfin/bf5xx-sport.h
index a86e8cc0b2d3..5ab60bd613ea 100644
--- a/sound/soc/blackfin/bf5xx-sport.h
+++ b/sound/soc/blackfin/bf5xx-sport.h
@@ -1,5 +1,5 @@
/*
- * File: bf5xx_ac97_sport.h
+ * File: bf5xx_sport.h
* Based on:
* Author: Roy Huang <roy.huang@analog.com>
*
@@ -33,15 +33,18 @@
#include <linux/types.h>
#include <linux/wait.h>
#include <linux/workqueue.h>
+#include <linux/platform_device.h>
#include <asm/dma.h>
#include <asm/bfin_sport.h>
#define DESC_ELEMENT_COUNT 9
struct sport_device {
+ int num;
int dma_rx_chan;
int dma_tx_chan;
int err_irq;
+ const unsigned short *pin_req;
struct sport_register *regs;
unsigned char *rx_buf;
@@ -103,17 +106,20 @@ struct sport_device {
void *private_data;
};
-extern struct sport_device *sport_handle;
-
struct sport_param {
+ int num;
int dma_rx_chan;
int dma_tx_chan;
int err_irq;
+ const unsigned short *pin_req;
struct sport_register *regs;
+ unsigned int wdsize;
+ unsigned int dummy_count;
+ void *private_data;
};
-struct sport_device *sport_init(struct sport_param *param, unsigned wdsize,
- unsigned dummy_count, void *private_data);
+struct sport_device *sport_init(struct platform_device *pdev,
+ unsigned int wdsize, unsigned int dummy_count, size_t priv_size);
void sport_done(struct sport_device *sport);