diff options
author | Senthilvadivu Guruswamy <svadivu@ti.com> | 2011-01-24 01:22:04 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-03-11 08:46:21 -0500 |
commit | ea9da36a304eed585fc5ef89c0f1c460eca61b48 (patch) | |
tree | b1e14d36fc7c25f845677c6d3249311d0304cd09 /drivers/video/omap2/dss/venc.c | |
parent | a06b62f8004bd95c132fa312e8593c9a10f466ec (diff) |
OMAP2,3: DSS2: Use platform device to get baseaddr
DSS, DISPC, DSI, RFBI, VENC baseaddr can be obtained from platform_get_resource().
This API in turn picks the right silicon baseaddr from the hwmod database.
So hardcoding of base addr could be removed.
Reviewed-by: Paul Walmsley <paul@pwsan.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Tested-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Senthilvadivu Guruswamy <svadivu@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/venc.c')
-rw-r--r-- | drivers/video/omap2/dss/venc.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c index 4a02f8eeb0d8..ef36811f6ac8 100644 --- a/drivers/video/omap2/dss/venc.c +++ b/drivers/video/omap2/dss/venc.c | |||
@@ -39,8 +39,6 @@ | |||
39 | 39 | ||
40 | #include "dss.h" | 40 | #include "dss.h" |
41 | 41 | ||
42 | #define VENC_BASE 0x48050C00 | ||
43 | |||
44 | /* Venc registers */ | 42 | /* Venc registers */ |
45 | #define VENC_REV_ID 0x00 | 43 | #define VENC_REV_ID 0x00 |
46 | #define VENC_STATUS 0x04 | 44 | #define VENC_STATUS 0x04 |
@@ -717,13 +715,20 @@ void venc_dump_regs(struct seq_file *s) | |||
717 | static int omap_venchw_probe(struct platform_device *pdev) | 715 | static int omap_venchw_probe(struct platform_device *pdev) |
718 | { | 716 | { |
719 | u8 rev_id; | 717 | u8 rev_id; |
718 | struct resource *venc_mem; | ||
719 | |||
720 | venc.pdev = pdev; | 720 | venc.pdev = pdev; |
721 | 721 | ||
722 | mutex_init(&venc.venc_lock); | 722 | mutex_init(&venc.venc_lock); |
723 | 723 | ||
724 | venc.wss_data = 0; | 724 | venc.wss_data = 0; |
725 | 725 | ||
726 | venc.base = ioremap(VENC_BASE, SZ_1K); | 726 | venc_mem = platform_get_resource(venc.pdev, IORESOURCE_MEM, 0); |
727 | if (!venc_mem) { | ||
728 | DSSERR("can't get IORESOURCE_MEM VENC\n"); | ||
729 | return -EINVAL; | ||
730 | } | ||
731 | venc.base = ioremap(venc_mem->start, resource_size(venc_mem)); | ||
727 | if (!venc.base) { | 732 | if (!venc.base) { |
728 | DSSERR("can't ioremap VENC\n"); | 733 | DSSERR("can't ioremap VENC\n"); |
729 | return -ENOMEM; | 734 | return -ENOMEM; |