Title: [9619] trunk: [#4788] bf561 inter-core communication driver: code cleanup
Revision
9619
Author
steven.miao
Date
2011-02-17 05:11:35 -0500 (Thu, 17 Feb 2011)

Log Message

[#4788] bf561 inter-core communication driver: code cleanup
move architecture specific defination from drivers/staging/icc/include/icc.h
to arch/blackfin/mach-bf561/include/mach/icc.h

Modified Paths

Diff

Modified: trunk/arch/blackfin/mach-bf561/icc.c (9618 => 9619)


--- trunk/arch/blackfin/mach-bf561/icc.c	2011-02-16 10:18:16 UTC (rev 9618)
+++ trunk/arch/blackfin/mach-bf561/icc.c	2011-02-17 10:11:35 UTC (rev 9619)
@@ -49,7 +49,16 @@
 	SSYNC();
 }
 
+void icc_send_ipi_cpu(unsigned int cpu, int irq)
+{
+	platform_send_ipi_cpu(cpu, irq);
+}
 
+void icc_clear_ipi_cpu(unsigned int cpu, int irq)
+{
+	platform_clear_ipi(cpu, irq);
+}
+
 irqreturn_t ipi_handler_int0(int irq, void *dev_instance)
 {
 	unsigned int cpu = blackfin_core_id();

Modified: trunk/drivers/staging/icc/Kconfig (9618 => 9619)


--- trunk/drivers/staging/icc/Kconfig	2011-02-16 10:18:16 UTC (rev 9618)
+++ trunk/drivers/staging/icc/Kconfig	2011-02-17 10:11:35 UTC (rev 9619)
@@ -1,16 +1,18 @@
 #
-# intercore communication protocol for ADI
+# intercore communication protocol and impelementation on bf561
 #
 
 menuconfig ICC_DRIVER
 	bool "icc driver"
 	select BF561_COREB
 	help
-		ADI icc driver
+	  the icc driver is a device driver that control the DSP devices,
+	  and bridges the the program runing on DSPs and linux user applications
 if ICC_DRIVER
 config	ICC
 	bool "icc protocol"
 	default N
 	help
-		ICC protocol
+	  ICC protocol, a shared memory based protocol for communication between
+	  linux core and DSP core
 endif

Modified: trunk/drivers/staging/icc/core/protocol.c (9618 => 9619)


--- trunk/drivers/staging/icc/core/protocol.c	2011-02-16 10:18:16 UTC (rev 9618)
+++ trunk/drivers/staging/icc/core/protocol.c	2011-02-17 10:11:35 UTC (rev 9619)
@@ -22,15 +22,9 @@
 	printk(KERN_CRIT "sm_debug:"pr_fmt(fmt), ##__VA_ARGS__)
 #else
 #define sm_debug(fmt, ...) \
-	({if (0) printk(KERN_CRIT "sm_debug:"pr_fmt(fmt), ##__VA_ARGS__); 0; })
+	({ if (0) printk(KERN_CRIT "sm_debug:"pr_fmt(fmt), ##__VA_ARGS__); 0; })
 #endif
 
-void platform_request_ipi(int irq, void *handler, void *data);
-
-void platform_send_ipi_cpu(unsigned int cpu, int irq);
-
-void platform_clear_ipi(unsigned int cpu, int irq);
-
 struct sm_icc_desc *icc_info;
 struct sm_proto *sm_protos[SP_MAX];
 
@@ -210,7 +204,7 @@
 	int ret = 0;
 	ret = sm_message_enqueue(dst_cpu, src_cpu, msg);
 	if (!ret)
-		platform_send_ipi_cpu(dst_cpu, IRQ_SUPPLE_0);
+		icc_send_ipi_cpu(dst_cpu, IRQ_SUPPLE_0);
 	return ret;
 }
 

Modified: trunk/drivers/staging/icc/include/icc.h (9618 => 9619)


--- trunk/drivers/staging/icc/include/icc.h	2011-02-16 10:18:16 UTC (rev 9618)
+++ trunk/drivers/staging/icc/include/icc.h	2011-02-17 10:11:35 UTC (rev 9619)
@@ -1,22 +1,16 @@
+/*
+ * Copyright 2010-2011 Analog Devices Inc.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
 #ifndef _ICC_H
 #define _ICC_H
 
-/* arch specific */
-#define sm_atomic_read(v) bfin_read16(v)
-#define sm_atomic_write(v, i) bfin_write16(v, i)
+#include <mach/icc.h>
+void icc_send_ipi_cpu(unsigned int cpu, int irq);
+void icc_clear_ipi(unsigned int cpu, int irq);
 
-typedef unsigned char sm_unit_t;
-typedef unsigned short sm_uint16_t;
-typedef unsigned long sm_uint32_t;
-typedef sm_uint32_t sm_address_t;
-typedef sm_uint16_t sm_atomic_t;
-#define MSGQ_START_ADDR	0xFEB18000
-#define MSG_BUF_ADDR	0xFEB1F000
-
-#define SM_DATA_ATTR __atrribute__((section .l2.atomic))
-#define SM_ATOMIC(type, name) SM_DATA_ATTR \
-		__typeof__(type) name
-
 /* sm protocol */
 /* compose type enumeration value from protocol & subtype */
 #define SM_MSG_TYPE(protocol, subtype) (((protocol)<<24)|(subtype))
@@ -160,7 +154,7 @@
 };
 #endif
 
-#define CMD_COREB_START		_IO('m', 0)
+#define CMD_COREB_START		_IO('b', 0)
 #define CMD_COREB_STOP		_IO('m', 1)
 #define CMD_COREB_RESET		_IO('m', 2)
 #define CMD_SM_SEND		_IO('m', 3)
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to