\r
#define RGA_MAJOR 255\r
\r
+#if 0\r
+#if CONFIG_ARCH_RK2928\r
#define RK30_RGA_PHYS 0x1010C000\r
#define RK30_RGA_SIZE SZ_8K\r
#define RGA_RESET_TIMEOUT 1000\r
+#elif CONFIG_ARCH_RK30\r
+#define RK30_RGA_PHYS 0x10114000\r
+#define RK30_RGA_SIZE SZ_8K\r
+#define RGA_RESET_TIMEOUT 1000\r
+#endif\r
+#endif\r
\r
/* Driver information */\r
#define DRIVER_DESC "RGA Device Driver"\r
\r
\r
/* Logging */\r
-#define RGA_DEBUG 1\r
+#define RGA_DEBUG 0\r
#if RGA_DEBUG\r
#define DBG(format, args...) printk(KERN_DEBUG "%s: " format, DRIVER_NAME, ## args)\r
#define ERR(format, args...) printk(KERN_ERR "%s: " format, DRIVER_NAME, ## args)\r
return __raw_readl(drvdata->rga_base + r);\r
}\r
\r
-#if 0\r
+#if defined(CONFIG_ARCH_RK30)\r
static void rga_soft_reset(void)\r
{\r
u32 i;\r
dmac_flush_range(&rga_service.cmd_buff[0], &rga_service.cmd_buff[28]);\r
outer_flush_range(virt_to_phys(&rga_service.cmd_buff[0]),virt_to_phys(&rga_service.cmd_buff[28]));\r
\r
- //rga_soft_reset();\r
+ #if defined(CONFIG_ARCH_RK30)\r
+ rga_soft_reset();\r
+ #endif\r
+ \r
rga_write(0, RGA_MMU_CTRL);\r
\r
/* CMD buff */\r
data->aclk_rga = clk_get(NULL, "aclk_rga");\r
data->hclk_rga = clk_get(NULL, "hclk_rga");\r
\r
+ \r
/* map the memory */\r
- if (!request_mem_region(RK30_RGA_PHYS, RK30_RGA_SIZE, "rga_io"))\r
+ #if defined(CONFIG_ARCH_RK2928)\r
+ if (!request_mem_region(RK2928_RGA_PHYS, RK2928_RGA_SIZE, "rga_io"))\r
+ #elif defined(CONFIG_ARCH_RK30)\r
+ if (!request_mem_region(RK30_RGA_PHYS, RK30_RGA_SIZE, "rga_io"))\r
+ #endif \r
{\r
pr_info("failed to reserve rga HW regs\n");\r
return -EBUSY;\r
}\r
- data->rga_base = (void*)ioremap_nocache(RK30_RGA_PHYS, RK30_RGA_SIZE);\r
+ \r
+ #if defined(CONFIG_ARCH_RK2928)\r
+ data->rga_base = (void*)ioremap_nocache(RK2928_RGA_PHYS, RK2928_RGA_SIZE);\r
+ #elif defined(CONFIG_ARCH_RK30)\r
+ data->rga_base = (void*)ioremap_nocache(RK30_RGA_PHYS, RK30_RGA_SIZE);\r
+ #endif\r
if (data->rga_base == NULL)\r
{\r
ERR("rga ioremap failed\n");\r