#include <asm/io.h>\r
#include <linux/irq.h>\r
#include <linux/interrupt.h>\r
-#include <mach/io.h>\r
-#include <mach/irqs.h>\r
#include <linux/fs.h>\r
#include <asm/uaccess.h>\r
#include <linux/miscdevice.h>\r
return;\r
\r
//clk_enable(rga2_drvdata->rga2);\r
- clk_prepare_enable(rga2_drvdata->aclk_rga2);\r
- clk_prepare_enable(rga2_drvdata->hclk_rga2);\r
+ //clk_prepare_enable(rga2_drvdata->aclk_rga2);\r
+ //clk_prepare_enable(rga2_drvdata->hclk_rga2);\r
//clk_enable(rga2_drvdata->pd_rga2);\r
wake_lock(&rga2_drvdata->wake_lock);\r
rga2_service.enable = true;\r
\r
//clk_disable(rga2_drvdata->pd_rga2);\r
//clk_disable(rga2_drvdata->rga2);\r
- clk_disable_unprepare(rga2_drvdata->aclk_rga2);\r
- clk_disable_unprepare(rga2_drvdata->hclk_rga2);\r
+ //clk_disable_unprepare(rga2_drvdata->aclk_rga2);\r
+ //clk_disable_unprepare(rga2_drvdata->hclk_rga2);\r
wake_unlock(&rga2_drvdata->wake_lock);\r
rga2_service.enable = false;\r
}\r
rga2_write(virt_to_phys(rga2_service.cmd_buff), RGA2_CMD_BASE);\r
\r
#if RGA2_TEST\r
- if(rga2_flag)\r
+ if(1)//rga2_flag)\r
{\r
//printk(KERN_DEBUG "cmd_addr = %.8x\n", rga_read(RGA_CMD_ADDR));\r
uint32_t i, *p;\r
atomic_set(®->session->done, 0);\r
rga2_write(0x1, RGA2_CMD_CTRL);\r
#if RGA2_TEST\r
- if(rga2_flag)\r
+ if(1)//rga2_flag)\r
{\r
uint32_t i;\r
printk("CMD_READ_BACK_REG\n");\r
}\r
}\r
\r
-\r
-static void rga2_mem_addr_sel(struct rga2_req *req)\r
-{\r
-}\r
-\r
-\r
static int rga2_blit(rga2_session *session, struct rga2_req *req)\r
{\r
int ret = -1;\r
int num = 0;\r
struct rga2_reg *reg;\r
\r
- do\r
- {\r
+ do {\r
/* check value if legal */\r
ret = rga2_check_param(req);\r
if(ret == -EINVAL) {\r
int ret = -1;\r
\r
#if RGA2_TEST_MSG\r
- //printk("*** rga_blit_async proc ***\n");\r
if (req->src.format >= 0x10) {\r
print_info(req);\r
rga2_flag = 1;\r
.fops = &rga2_fops,\r
};\r
\r
-static const struct of_device_id rockchip_rga_of_match[] = {\r
- { .compatible = "rockchip,rga", .data = NULL, },\r
+static const struct of_device_id rockchip_rga_dt_ids[] = {\r
+ { .compatible = "rockchip,rga", },\r
{},\r
};\r
\r
-static int __devinit rga2_drv_probe(struct platform_device *pdev)\r
+static int rga2_drv_probe(struct platform_device *pdev)\r
{\r
struct rga2_drvdata_t *data;\r
struct resource *res;\r
- struct device_node *np = pdev->dev.of_node;\r
int ret = 0;\r
\r
mutex_init(&rga2_service.lock);\r
\r
//data->pd_rga2 = clk_get(NULL, "pd_rga");\r
//data->rga2 = clk_get(NULL, "rga");\r
- data->aclk_rga = devm_clk_get(&pdev->dev, "aclk_rga");\r
- data->hclk_rga = devm_clk_get(&pdev->dev, "hclk_rga");\r
+ //data->aclk_rga2 = devm_clk_get(&pdev->dev, "aclk_rga");\r
+ //data->hclk_rga2 = devm_clk_get(&pdev->dev, "hclk_rga");\r
\r
/* map the registers */\r
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);\r
\r
//clk_put(data->pd_rga2);\r
//clk_put(data->rga2);\r
- devm_clk_put(&pdev->dev, data->aclk_rga2);\r
- devm_clk_put(&pdev->dev, data->hclk_rga2);\r
+ //devm_clk_put(&pdev->dev, data->aclk_rga2);\r
+ //devm_clk_put(&pdev->dev, data->hclk_rga2);\r
\r
kfree(data);\r
return 0;\r
\r
static struct platform_driver rga2_driver = {\r
.probe = rga2_drv_probe,\r
- .remove = __devexit_p(rga2_drv_remove),\r
+ .remove = rga2_drv_remove,\r
.driver = {\r
.owner = THIS_MODULE,\r
.name = "rga",\r
+ .of_match_table = of_match_ptr(rockchip_rga_dt_ids),\r
},\r
};\r
\r
atomic_set(&session.num_done, 0);\r
//file->private_data = (void *)session;\r
\r
- fb = rk_get_fb(0);\r
+ //fb = rk_get_fb(0);\r
\r
memset(&req, 0, sizeof(struct rga2_req));\r
src = kmalloc(800*480*4, GFP_KERNEL);\r