diff options
Diffstat (limited to 'drivers/video/omap2/dss/venc.c')
-rw-r--r-- | drivers/video/omap2/dss/venc.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c index 5c3d0f901510..9c3daf71750c 100644 --- a/drivers/video/omap2/dss/venc.c +++ b/drivers/video/omap2/dss/venc.c | |||
@@ -699,6 +699,11 @@ void venc_dump_regs(struct seq_file *s) | |||
699 | { | 699 | { |
700 | #define DUMPREG(r) seq_printf(s, "%-35s %08x\n", #r, venc_read_reg(r)) | 700 | #define DUMPREG(r) seq_printf(s, "%-35s %08x\n", #r, venc_read_reg(r)) |
701 | 701 | ||
702 | if (cpu_is_omap44xx()) { | ||
703 | seq_printf(s, "VENC currently disabled on OMAP44xx\n"); | ||
704 | return; | ||
705 | } | ||
706 | |||
702 | if (venc_runtime_get()) | 707 | if (venc_runtime_get()) |
703 | return; | 708 | return; |
704 | 709 | ||
@@ -790,39 +795,41 @@ static int omap_venchw_probe(struct platform_device *pdev) | |||
790 | venc_mem = platform_get_resource(venc.pdev, IORESOURCE_MEM, 0); | 795 | venc_mem = platform_get_resource(venc.pdev, IORESOURCE_MEM, 0); |
791 | if (!venc_mem) { | 796 | if (!venc_mem) { |
792 | DSSERR("can't get IORESOURCE_MEM VENC\n"); | 797 | DSSERR("can't get IORESOURCE_MEM VENC\n"); |
793 | r = -EINVAL; | 798 | return -EINVAL; |
794 | goto err_ioremap; | ||
795 | } | 799 | } |
796 | venc.base = ioremap(venc_mem->start, resource_size(venc_mem)); | 800 | |
801 | venc.base = devm_ioremap(&pdev->dev, venc_mem->start, | ||
802 | resource_size(venc_mem)); | ||
797 | if (!venc.base) { | 803 | if (!venc.base) { |
798 | DSSERR("can't ioremap VENC\n"); | 804 | DSSERR("can't ioremap VENC\n"); |
799 | r = -ENOMEM; | 805 | return -ENOMEM; |
800 | goto err_ioremap; | ||
801 | } | 806 | } |
802 | 807 | ||
803 | r = venc_get_clocks(pdev); | 808 | r = venc_get_clocks(pdev); |
804 | if (r) | 809 | if (r) |
805 | goto err_get_clk; | 810 | return r; |
806 | 811 | ||
807 | pm_runtime_enable(&pdev->dev); | 812 | pm_runtime_enable(&pdev->dev); |
808 | 813 | ||
809 | r = venc_runtime_get(); | 814 | r = venc_runtime_get(); |
810 | if (r) | 815 | if (r) |
811 | goto err_get_venc; | 816 | goto err_runtime_get; |
812 | 817 | ||
813 | rev_id = (u8)(venc_read_reg(VENC_REV_ID) & 0xff); | 818 | rev_id = (u8)(venc_read_reg(VENC_REV_ID) & 0xff); |
814 | dev_dbg(&pdev->dev, "OMAP VENC rev %d\n", rev_id); | 819 | dev_dbg(&pdev->dev, "OMAP VENC rev %d\n", rev_id); |
815 | 820 | ||
816 | venc_runtime_put(); | 821 | venc_runtime_put(); |
817 | 822 | ||
818 | return omap_dss_register_driver(&venc_driver); | 823 | r = omap_dss_register_driver(&venc_driver); |
824 | if (r) | ||
825 | goto err_reg_panel_driver; | ||
826 | |||
827 | return 0; | ||
819 | 828 | ||
820 | err_get_venc: | 829 | err_reg_panel_driver: |
830 | err_runtime_get: | ||
821 | pm_runtime_disable(&pdev->dev); | 831 | pm_runtime_disable(&pdev->dev); |
822 | venc_put_clocks(); | 832 | venc_put_clocks(); |
823 | err_get_clk: | ||
824 | iounmap(venc.base); | ||
825 | err_ioremap: | ||
826 | return r; | 833 | return r; |
827 | } | 834 | } |
828 | 835 | ||
@@ -837,7 +844,6 @@ static int omap_venchw_remove(struct platform_device *pdev) | |||
837 | pm_runtime_disable(&pdev->dev); | 844 | pm_runtime_disable(&pdev->dev); |
838 | venc_put_clocks(); | 845 | venc_put_clocks(); |
839 | 846 | ||
840 | iounmap(venc.base); | ||
841 | return 0; | 847 | return 0; |
842 | } | 848 | } |
843 | 849 | ||