commit: http://blackfin.uclinux.org/git/?p=linux-kernel;a=commitdiff;h=0329a1eb003e2165d17d3552004bc63b5e5f379e
branch: http://blackfin.uclinux.org/git/?p=linux-kernel;a=shortlog;h=refs/heads/2012R1

Signed-off-by: Steven Miao <[email protected]>
---
 arch/blackfin/mach-bf561/include/mach/icc.h |    1 +
 arch/blackfin/mach-bf609/include/mach/icc.h |    5 +++--
 drivers/staging/icc/Kconfig                 |    2 +-
 drivers/staging/icc/core/protocol.c         |    3 +++
 drivers/staging/icc/include/icc.h           |    2 ++
 5 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/arch/blackfin/mach-bf561/include/mach/icc.h b/arch/blackfin/mach-bf561/include/mach/icc.h
index e4edf4c..827830c 100644
--- a/arch/blackfin/mach-bf561/include/mach/icc.h
+++ b/arch/blackfin/mach-bf561/include/mach/icc.h
@@ -18,6 +18,7 @@
 
 #define COREB_TASK_START	0x3C00000
 #define COREB_MEMPOOL_START	0x3D00000
+#define ICC_CODE_START		0xFEB0000
 
 #define ICC_LOW_SEND            IRQ_SUPPLE_0
 #define ICC_LOW_RECV            IRQ_SUPPLE_0
diff --git a/arch/blackfin/mach-bf609/include/mach/icc.h b/arch/blackfin/mach-bf609/include/mach/icc.h
index 35a3e0d..c246ebb 100644
--- a/arch/blackfin/mach-bf609/include/mach/icc.h
+++ b/arch/blackfin/mach-bf609/include/mach/icc.h
@@ -12,9 +12,10 @@
 #define sm_atomic_read(v) bfin_read16(v)
 #define sm_atomic_write(v, i) bfin_write16(v, i)
 
-#define MSGQ_START_ADDR		(L2_START + 0x10000)
+#define MSGQ_START_ADDR		L2_START
 #define MSGQ_SIZE		0x4000
-#define DEBUG_MSG_BUF_ADDR	(MSGQ_START_ADDR + MSGQ_SIZE + 0x1000)
+#define DEBUG_MSG_BUF_ADDR	(MSGQ_START_ADDR + MSGQ_SIZE)
+#define ICC_CODE_START		0xc8088000
 
 #define COREB_TASK_START	0x7C00000
 #define COREB_MEMPOOL_START	0x7D00000
diff --git a/drivers/staging/icc/Kconfig b/drivers/staging/icc/Kconfig
index a0789df..138eab3 100644
--- a/drivers/staging/icc/Kconfig
+++ b/drivers/staging/icc/Kconfig
@@ -5,7 +5,7 @@
 menuconfig ICC_DRIVER
 	bool "icc driver"
 	depends on !SMP && !BFIN_L2_DCACHEABLE
-	select BF561_COREB
+	select BFIN_COREB
 	help
 	  the icc driver is a device driver that control the DSP devices,
 	  and bridges the the program runing on DSPs and linux user applications
diff --git a/drivers/staging/icc/core/protocol.c b/drivers/staging/icc/core/protocol.c
index 2404c1a..669e42e 100644
--- a/drivers/staging/icc/core/protocol.c
+++ b/drivers/staging/icc/core/protocol.c
@@ -68,6 +68,7 @@ static void wakeup_icc_thread(void)
 
 static int init_sm_message_queue(struct bfin_icc *icc)
 {
+	BUG_ON(MSGQ_SIZE < (sizeof(struct sm_message_queue) * 2));
 	icc->icc_info.icc_queue = (struct sm_message_queue *)MSGQ_START_ADDR;
 	memset(icc->icc_info.icc_queue, 0, sizeof(struct sm_message_queue)*2);
 	return 0;
@@ -1465,6 +1466,8 @@ static int __devinit bfin_icc_probe(struct platform_device *pdev)
 	struct sm_icc_desc *icc_info;
 	int ret;
 
+	BUG_ON(SM_MSGQ_END > ICC_CODE_START);
+
 	if (bfin_icc) {
 		dev_err(&pdev->dev, "Can't register more than one bfin_icc device.\n");
 		return -ENOENT;
diff --git a/drivers/staging/icc/include/icc.h b/drivers/staging/icc/include/icc.h
index 03670b3..1f01baa 100644
--- a/drivers/staging/icc/include/icc.h
+++ b/drivers/staging/icc/include/icc.h
@@ -141,6 +141,8 @@ struct sm_message {
 };
 
 #define SM_MSGQ_LEN 16
+#define DEBUG_MSG_LINE 128
+#define SM_MSGQ_END (MSGQ_START_ADDR + MSGQ_SIZE + (DEBUG_MSG_LINE * SM_MSGQ_LEN))
 
 /* Simple FIFO buffer */
 struct sm_message_queue {
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to