IPP: version 1.000:add rk29-ipp.ko support
authorchenli <chenli@rock-chips.com>
Thu, 29 Mar 2012 10:13:12 +0000 (18:13 +0800)
committerchenli <chenli@rock-chips.com>
Fri, 30 Mar 2012 02:49:44 +0000 (10:49 +0800)
arch/arm/mach-rk29/board-rk29-ddr3sdk.c
arch/arm/mach-rk29/board-rk29-k97.c
arch/arm/mach-rk29/devices.c
arch/arm/plat-rk/include/plat/ipp.h
drivers/staging/Makefile
drivers/staging/rk29/ipp/Kconfig
drivers/staging/rk29/ipp/Makefile
drivers/staging/rk29/ipp/rk29-ipp-stub.c [new file with mode: 0644]
drivers/staging/rk29/ipp/rk29-ipp.c
pack-kernel-rk29.sh

index 4bae125b865771bd551838dd2e02ac0ad660fded..8de542f17ae3e2f6d01209bb0805717ea7d1c884 100755 (executable)
@@ -2846,9 +2846,11 @@ static struct platform_device *devices[] __initdata = {
 #ifdef CONFIG_USB_ANDROID_RNDIS
     &rk29_device_rndis,
 #endif
-#ifdef CONFIG_RK29_IPP
+
+//#ifdef CONFIG_RK29_IPP
        &rk29_device_ipp,
-#endif
+//#endif
+
 #ifdef CONFIG_VIDEO_RK29XX_VOUT
        &rk29_v4l2_output_devce,
 #endif
index 62f5fefe0e7abcc975757dcf89386a26e70660b4..82ec490c49c2aaa82b1d4acffe3ed54a493f11d0 100755 (executable)
@@ -2815,9 +2815,9 @@ static struct platform_device *devices[] __initdata = {
 #ifdef CONFIG_USB_ANDROID_RNDIS
     &rk29_device_rndis,
 #endif
-#ifdef CONFIG_RK29_IPP
+//#ifdef CONFIG_RK29_IPP
        &rk29_device_ipp,
-#endif
+//#endif
 #ifdef CONFIG_VIDEO_RK29XX_VOUT
        &rk29_v4l2_output_devce,
 #endif
index 125b3f97f9bd926ea10d268f28a591a2a12964b5..779a9f13786c62db65b6d3a1aca4c6055cd80338 100644 (file)
@@ -597,7 +597,8 @@ static struct platform_device rk29_device_pcm = {
        .id = -1,
 };
 
-#ifdef CONFIG_RK29_IPP
+
+//#ifdef CONFIG_RK29_IPP
 /* rk29 ipp resource */
 static struct resource rk29_ipp_resource[] = {
        [0] = {
@@ -620,7 +621,8 @@ struct platform_device rk29_device_ipp = {
        .num_resources    = ARRAY_SIZE(rk29_ipp_resource),
        .resource         = rk29_ipp_resource,
 };
-#endif
+//#endif
+
 
 #ifdef CONFIG_USB20_OTG
 /*DWC_OTG*/
index 488f6e8787e21b3bacb9cf707eb1ce740f2f63d0..91fa239d6dc6162f66e549074ed58407366d216d 100755 (executable)
@@ -128,5 +128,6 @@ typedef enum
 \r
 \r
 int ipp_blit_async(const struct rk29_ipp_req *req);\r
-int ipp_blit_sync(const struct rk29_ipp_req *req);\r
+//int ipp_blit_sync(const struct rk29_ipp_req *req);\r
+extern int (*ipp_blit_sync)(const struct rk29_ipp_req *req);\r
 #endif /*_RK29_IPP_DRIVER_H_*/
\ No newline at end of file
index 03b50930bc30f9397938f8e362580e52dae2d44a..928ee76119addc6edd31f4f0d29c1736b30f23c5 100755 (executable)
@@ -44,7 +44,7 @@ obj-$(CONFIG_DX_SEP)            += sep/
 obj-$(CONFIG_IIO)              += iio/
 obj-$(CONFIG_CS5535_GPIO)      += cs5535_gpio/
 #obj-$(CONFIG_VIVANTE)         += rk29/vivante/
-obj-$(CONFIG_RK29_IPP)         += rk29/ipp/
+obj-y                          += rk29/ipp/
 obj-$(CONFIG_ZRAM)             += zram/
 obj-$(CONFIG_XVMALLOC)         += zram/
 obj-$(CONFIG_ZCACHE)           += zcache/
index 81a951f3178deb31fcc06e6d3a26b9468b1cfdeb..8f93652870e886a8d06f03c2d1ed06560fe943a4 100755 (executable)
@@ -1,7 +1,7 @@
 menu "IPP"
 config RK29_IPP
        tristate "ROCKCHIP RK29 IPP"
-       default y
+       default m
        help
           rk29 ipp module.     
           
index 674c218582e731f538fea93e6f2c58513757d149..79bbd9a33a400b99721f7a2e47ba5909344cac57 100644 (file)
@@ -2,5 +2,6 @@
 # Makefile for the ipp.
 #
 
-obj-$(CONFIG_RK29_IPP) += rk29-ipp.o
-rk29ipp-objs := rk29-ipp.o 
\ No newline at end of file
+obj-y  += rk29-ipp-stub.o
+#obj-$(CONFIG_RK29_IPP)        += rk29-ipp.o
+#rk29ipp-objs := rk29-ipp.o 
diff --git a/drivers/staging/rk29/ipp/rk29-ipp-stub.c b/drivers/staging/rk29/ipp/rk29-ipp-stub.c
new file mode 100644 (file)
index 0000000..7478945
--- /dev/null
@@ -0,0 +1,29 @@
+/* drivers/staging/rk29/ipp/rk29-ipp-stub.c\r
+ *\r
+ * Copyright (C) 2010 ROCKCHIP, Inc.\r
+ *\r
+ * This software is licensed under the terms of the GNU General Public\r
+ * License version 2, as published by the Free Software Foundation, and\r
+ * may be copied, distributed, and modified under those terms.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ */\r
+\r
+/*This is a dummy file */\r
+#include <linux/kernel.h>\r
+#include <linux/init.h>\r
+#include <linux/module.h>\r
+#include <linux/platform_device.h>\r
+#include <plat/ipp.h>\r
+\r
+static int ipp_blit_sync_default(const struct rk29_ipp_req *req)\r
+{\r
+       return 0;\r
+}\r
+\r
+int (*ipp_blit_sync)(const struct rk29_ipp_req *req) = ipp_blit_sync_default;\r
+EXPORT_SYMBOL(ipp_blit_sync);\r
index 82cc651160199d74029491197bcb9fafe286c7a8..f52081215216d4c1b61f73a4cc9181dc1845c4f3 100644 (file)
@@ -43,6 +43,7 @@
 #include <asm/cacheflush.h>\r
 #include <linux/slab.h>\r
 \r
+#define IPP_VERSION "1.000"\r
 //#define IPP_TEST\r
 #ifdef IPP_TEST\r
 \r
@@ -962,7 +963,7 @@ int ipp_blit_async(const struct rk29_ipp_req *req)
        return ret;\r
 }\r
 \r
-int ipp_blit_sync(const struct rk29_ipp_req *req)\r
+static int ipp_blit_sync_real(const struct rk29_ipp_req *req)\r
 {\r
        int status;\r
        int wait_ret;\r
@@ -1614,7 +1615,6 @@ static int __devinit ipp_drv_probe(struct platform_device *pdev)
        struct ipp_drvdata *data;\r
        int ret = 0;\r
 \r
-\r
        data = kmalloc(sizeof(struct ipp_drvdata), GFP_KERNEL);\r
        if(NULL==data)\r
        {\r
@@ -1832,13 +1832,18 @@ static int __init rk29_ipp_init(void)
 {\r
        int ret;\r
 \r
+       //set ipp_blit_sync pointer\r
+       ipp_blit_sync = ipp_blit_sync_real;\r
+       \r
        if ((ret = platform_driver_register(&rk29_ipp_driver)) != 0)\r
-               {\r
-                       ERR("Platform device register failed (%d).\n", ret);\r
-                       return ret;\r
-               }\r
-               INFO("Module initialized.\n");\r
-               return 0;\r
+       {\r
+               ERR("Platform device register failed (%d).\n", ret);\r
+               return ret;\r
+       }\r
+       \r
+       INFO("Module initialized.\n");\r
+       printk("IPP init, version %s\n",IPP_VERSION);\r
+       return 0;\r
 }\r
 \r
 static void __exit rk29_ipp_exit(void)\r
@@ -1848,7 +1853,7 @@ static void __exit rk29_ipp_exit(void)
 \r
 \r
 \r
-device_initcall_sync(rk29_ipp_init);\r
+module_init(rk29_ipp_init);\r
 module_exit(rk29_ipp_exit);\r
 \r
 /* Module information */\r
index f3c5b0441c490b3145b86a3456ee65ebf97e6103..f7835b01b2a1051dacd3c3dc1e0542e9a3cf1d71 100755 (executable)
@@ -10,7 +10,7 @@ arch/arm/mach-rk29/verifyID.c
 
 arch/arm/plat-rk/vpu*.c
 
-drivers/staging/rk29/ipp/rk29-ipp.c
+#drivers/staging/rk29/ipp/rk29-ipp.c
 )
 
 EXCLUDES=(
@@ -33,6 +33,8 @@ arch/arm/mach-rk29/ddr_reconfig.c
 
 drivers/staging/rk29/vivante
 
+drivers/staging/rk29/ipp/rk29-ipp.c
+
 arch/arm/mach-rk29/board-rk29sdk.c
 arch/arm/configs/rk29_sdk_defconfig
 arch/arm/configs/rk29_sdk_yaffs2_defconfig