aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/davinci
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-24 20:35:10 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-24 20:35:10 -0500
commit21fbd5809ad126b949206d78e0a0e07ec872ea11 (patch)
treea824045df99fc1f0690095a925cceb50207e332b /drivers/media/platform/davinci
parentd9978ec5680059d727b39d6c706777c6973587f2 (diff)
parented72d37a33fdf43dc47787fe220532cdec9da528 (diff)
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab: - Some cleanups at V4L2 documentation - new drivers: ts2020 frontend, ov9650 sensor, s5c73m3 sensor, sh-mobile veu mem2mem driver, radio-ma901, davinci_vpfe staging driver - Lots of missing MAINTAINERS entries added - several em28xx driver improvements, including its conversion to videobuf2 - several fixups on drivers to make them to better comply with the API - DVB core: add support for DVBv5 stats, allowing the implementation of statistics for new standards like ISDB - mb86a20s: add statistics to the driver - lots of new board additions, cleanups, and driver improvements. * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (596 commits) [media] media: Add 0x3009 USB PID to ttusb2 driver (fixed diff) [media] rtl28xxu: Add USB IDs for Compro VideoMate U620F [media] em28xx: add usb id for terratec h5 rev. 3 [media] media: rc: gpio-ir-recv: add support for device tree parsing [media] mceusb: move check earlier to make smatch happy [media] radio-si470x doc: add info about v4l2-ctl and sox+alsa [media] staging: media: Remove unnecessary OOM messages [media] sh_vou: Use vou_dev instead of vou_file wherever possible [media] sh_vou: Use video_drvdata() [media] drivers/media/platform/soc_camera/pxa_camera.c: use devm_ functions [media] mt9t112: mt9t111 format set up differs from mt9t112 [media] sh-mobile-ceu-camera: fix SHARPNESS control default Revert "[media] fc0011: Return early, if the frequency is already tuned" [media] cx18/ivtv: fix regression: remove __init from a non-init function [media] em28xx: fix analog streaming with USB bulk transfers [media] stv0900: remove unnecessary null pointer check [media] fc0011: Return early, if the frequency is already tuned [media] fc0011: Add some sanity checks and cleanups [media] fc0011: Fix xin value clamping Revert "[media] [PATH,1/2] mxl5007 move reset to attach" ...
Diffstat (limited to 'drivers/media/platform/davinci')
-rw-r--r--drivers/media/platform/davinci/Kconfig22
-rw-r--r--drivers/media/platform/davinci/Makefile4
-rw-r--r--drivers/media/platform/davinci/dm355_ccdc.c2
-rw-r--r--drivers/media/platform/davinci/vpbe.c12
-rw-r--r--drivers/media/platform/davinci/vpbe_display.c9
-rw-r--r--drivers/media/platform/davinci/vpbe_osd.c35
-rw-r--r--drivers/media/platform/davinci/vpbe_venc.c65
-rw-r--r--drivers/media/platform/davinci/vpfe_capture.c5
-rw-r--r--drivers/media/platform/davinci/vpif_capture.c2
-rw-r--r--drivers/media/platform/davinci/vpif_display.c6
-rw-r--r--drivers/media/platform/davinci/vpss.c70
11 files changed, 162 insertions, 70 deletions
diff --git a/drivers/media/platform/davinci/Kconfig b/drivers/media/platform/davinci/Kconfig
index 3c56037c82fc..ccfde4eb626a 100644
--- a/drivers/media/platform/davinci/Kconfig
+++ b/drivers/media/platform/davinci/Kconfig
@@ -97,25 +97,15 @@ config VIDEO_ISIF
97 To compile this driver as a module, choose M here: the 97 To compile this driver as a module, choose M here: the
98 module will be called vpfe. 98 module will be called vpfe.
99 99
100config VIDEO_DM644X_VPBE 100config VIDEO_DAVINCI_VPBE_DISPLAY
101 tristate "DM644X VPBE HW module" 101 tristate "DM644X/DM365/DM355 VPBE HW module"
102 depends on ARCH_DAVINCI_DM644x 102 depends on ARCH_DAVINCI_DM644x || ARCH_DAVINCI_DM355 || ARCH_DAVINCI_DM365
103 select VIDEO_VPSS_SYSTEM 103 select VIDEO_VPSS_SYSTEM
104 select VIDEOBUF2_DMA_CONTIG 104 select VIDEOBUF2_DMA_CONTIG
105 help 105 help
106 Enables VPBE modules used for display on a DM644x 106 Enables Davinci VPBE module used for display devices.
107 SoC. 107 This module is common for following DM644x/DM365/DM355
108 based display devices.
108 109
109 To compile this driver as a module, choose M here: the 110 To compile this driver as a module, choose M here: the
110 module will be called vpbe. 111 module will be called vpbe.
111
112
113config VIDEO_VPBE_DISPLAY
114 tristate "VPBE V4L2 Display driver"
115 depends on ARCH_DAVINCI_DM644x
116 select VIDEO_DM644X_VPBE
117 help
118 Enables VPBE V4L2 Display driver on a DM644x device
119
120 To compile this driver as a module, choose M here: the
121 module will be called vpbe_display.
diff --git a/drivers/media/platform/davinci/Makefile b/drivers/media/platform/davinci/Makefile
index 74ed92d09257..f40f5219ca50 100644
--- a/drivers/media/platform/davinci/Makefile
+++ b/drivers/media/platform/davinci/Makefile
@@ -16,5 +16,5 @@ obj-$(CONFIG_VIDEO_VPFE_CAPTURE) += vpfe_capture.o
16obj-$(CONFIG_VIDEO_DM6446_CCDC) += dm644x_ccdc.o 16obj-$(CONFIG_VIDEO_DM6446_CCDC) += dm644x_ccdc.o
17obj-$(CONFIG_VIDEO_DM355_CCDC) += dm355_ccdc.o 17obj-$(CONFIG_VIDEO_DM355_CCDC) += dm355_ccdc.o
18obj-$(CONFIG_VIDEO_ISIF) += isif.o 18obj-$(CONFIG_VIDEO_ISIF) += isif.o
19obj-$(CONFIG_VIDEO_DM644X_VPBE) += vpbe.o vpbe_osd.o vpbe_venc.o 19obj-$(CONFIG_VIDEO_DAVINCI_VPBE_DISPLAY) += vpbe.o vpbe_osd.o \
20obj-$(CONFIG_VIDEO_VPBE_DISPLAY) += vpbe_display.o 20 vpbe_venc.o vpbe_display.o
diff --git a/drivers/media/platform/davinci/dm355_ccdc.c b/drivers/media/platform/davinci/dm355_ccdc.c
index f263cabade7a..4277e4ad810c 100644
--- a/drivers/media/platform/davinci/dm355_ccdc.c
+++ b/drivers/media/platform/davinci/dm355_ccdc.c
@@ -557,7 +557,7 @@ static int ccdc_config_vdfc(struct ccdc_vertical_dft *dfc)
557 */ 557 */
558static void ccdc_config_csc(struct ccdc_csc *csc) 558static void ccdc_config_csc(struct ccdc_csc *csc)
559{ 559{
560 u32 val1, val2; 560 u32 val1 = 0, val2;
561 int i; 561 int i;
562 562
563 if (!csc->enable) 563 if (!csc->enable)
diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c
index 841b91a3d255..4ca0f9a2ad8a 100644
--- a/drivers/media/platform/davinci/vpbe.c
+++ b/drivers/media/platform/davinci/vpbe.c
@@ -558,9 +558,9 @@ static int platform_device_get(struct device *dev, void *data)
558 struct platform_device *pdev = to_platform_device(dev); 558 struct platform_device *pdev = to_platform_device(dev);
559 struct vpbe_device *vpbe_dev = data; 559 struct vpbe_device *vpbe_dev = data;
560 560
561 if (strcmp("vpbe-osd", pdev->name) == 0) 561 if (strstr(pdev->name, "vpbe-osd") != NULL)
562 vpbe_dev->osd_device = platform_get_drvdata(pdev); 562 vpbe_dev->osd_device = platform_get_drvdata(pdev);
563 if (strcmp("vpbe-venc", pdev->name) == 0) 563 if (strstr(pdev->name, "vpbe-venc") != NULL)
564 vpbe_dev->venc_device = dev_get_platdata(&pdev->dev); 564 vpbe_dev->venc_device = dev_get_platdata(&pdev->dev);
565 565
566 return 0; 566 return 0;
@@ -584,7 +584,6 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev)
584 struct v4l2_subdev **enc_subdev; 584 struct v4l2_subdev **enc_subdev;
585 struct osd_state *osd_device; 585 struct osd_state *osd_device;
586 struct i2c_adapter *i2c_adap; 586 struct i2c_adapter *i2c_adap;
587 int output_index;
588 int num_encoders; 587 int num_encoders;
589 int ret = 0; 588 int ret = 0;
590 int err; 589 int err;
@@ -632,8 +631,10 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev)
632 631
633 err = bus_for_each_dev(&platform_bus_type, NULL, vpbe_dev, 632 err = bus_for_each_dev(&platform_bus_type, NULL, vpbe_dev,
634 platform_device_get); 633 platform_device_get);
635 if (err < 0) 634 if (err < 0) {
636 return err; 635 ret = err;
636 goto fail_dev_unregister;
637 }
637 638
638 vpbe_dev->venc = venc_sub_dev_init(&vpbe_dev->v4l2_dev, 639 vpbe_dev->venc = venc_sub_dev_init(&vpbe_dev->v4l2_dev,
639 vpbe_dev->cfg->venc.module_name); 640 vpbe_dev->cfg->venc.module_name);
@@ -731,7 +732,6 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev)
731 /* set the current encoder and output to that of venc by default */ 732 /* set the current encoder and output to that of venc by default */
732 vpbe_dev->current_sd_index = 0; 733 vpbe_dev->current_sd_index = 0;
733 vpbe_dev->current_out_index = 0; 734 vpbe_dev->current_out_index = 0;
734 output_index = 0;
735 735
736 mutex_unlock(&vpbe_dev->lock); 736 mutex_unlock(&vpbe_dev->lock);
737 737
diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c
index e707a6f2325b..5e6b0cab514b 100644
--- a/drivers/media/platform/davinci/vpbe_display.c
+++ b/drivers/media/platform/davinci/vpbe_display.c
@@ -791,7 +791,6 @@ static int vpbe_display_g_crop(struct file *file, void *priv,
791 struct vpbe_device *vpbe_dev = fh->disp_dev->vpbe_dev; 791 struct vpbe_device *vpbe_dev = fh->disp_dev->vpbe_dev;
792 struct osd_state *osd_device = fh->disp_dev->osd_device; 792 struct osd_state *osd_device = fh->disp_dev->osd_device;
793 struct v4l2_rect *rect = &crop->c; 793 struct v4l2_rect *rect = &crop->c;
794 int ret;
795 794
796 v4l2_dbg(1, debug, &vpbe_dev->v4l2_dev, 795 v4l2_dbg(1, debug, &vpbe_dev->v4l2_dev,
797 "VIDIOC_G_CROP, layer id = %d\n", 796 "VIDIOC_G_CROP, layer id = %d\n",
@@ -799,7 +798,7 @@ static int vpbe_display_g_crop(struct file *file, void *priv,
799 798
800 if (crop->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) { 799 if (crop->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) {
801 v4l2_err(&vpbe_dev->v4l2_dev, "Invalid buf type\n"); 800 v4l2_err(&vpbe_dev->v4l2_dev, "Invalid buf type\n");
802 ret = -EINVAL; 801 return -EINVAL;
803 } 802 }
804 osd_device->ops.get_layer_config(osd_device, 803 osd_device->ops.get_layer_config(osd_device,
805 layer->layer_info.id, cfg); 804 layer->layer_info.id, cfg);
@@ -1393,9 +1392,9 @@ static int vpbe_display_reqbufs(struct file *file, void *priv,
1393 } 1392 }
1394 /* Initialize videobuf queue as per the buffer type */ 1393 /* Initialize videobuf queue as per the buffer type */
1395 layer->alloc_ctx = vb2_dma_contig_init_ctx(vpbe_dev->pdev); 1394 layer->alloc_ctx = vb2_dma_contig_init_ctx(vpbe_dev->pdev);
1396 if (!layer->alloc_ctx) { 1395 if (IS_ERR(layer->alloc_ctx)) {
1397 v4l2_err(&vpbe_dev->v4l2_dev, "Failed to get the context\n"); 1396 v4l2_err(&vpbe_dev->v4l2_dev, "Failed to get the context\n");
1398 return -EINVAL; 1397 return PTR_ERR(layer->alloc_ctx);
1399 } 1398 }
1400 q = &layer->buffer_queue; 1399 q = &layer->buffer_queue;
1401 memset(q, 0, sizeof(*q)); 1400 memset(q, 0, sizeof(*q));
@@ -1656,7 +1655,7 @@ static int vpbe_device_get(struct device *dev, void *data)
1656 if (strcmp("vpbe_controller", pdev->name) == 0) 1655 if (strcmp("vpbe_controller", pdev->name) == 0)
1657 vpbe_disp->vpbe_dev = platform_get_drvdata(pdev); 1656 vpbe_disp->vpbe_dev = platform_get_drvdata(pdev);
1658 1657
1659 if (strcmp("vpbe-osd", pdev->name) == 0) 1658 if (strstr(pdev->name, "vpbe-osd") != NULL)
1660 vpbe_disp->osd_device = platform_get_drvdata(pdev); 1659 vpbe_disp->osd_device = platform_get_drvdata(pdev);
1661 1660
1662 return 0; 1661 return 0;
diff --git a/drivers/media/platform/davinci/vpbe_osd.c b/drivers/media/platform/davinci/vpbe_osd.c
index 707f243f810d..12ad17c52ef3 100644
--- a/drivers/media/platform/davinci/vpbe_osd.c
+++ b/drivers/media/platform/davinci/vpbe_osd.c
@@ -39,7 +39,22 @@
39#include <linux/io.h> 39#include <linux/io.h>
40#include "vpbe_osd_regs.h" 40#include "vpbe_osd_regs.h"
41 41
42#define MODULE_NAME VPBE_OSD_SUBDEV_NAME 42#define MODULE_NAME "davinci-vpbe-osd"
43
44static struct platform_device_id vpbe_osd_devtype[] = {
45 {
46 .name = DM644X_VPBE_OSD_SUBDEV_NAME,
47 .driver_data = VPBE_VERSION_1,
48 }, {
49 .name = DM365_VPBE_OSD_SUBDEV_NAME,
50 .driver_data = VPBE_VERSION_2,
51 }, {
52 .name = DM355_VPBE_OSD_SUBDEV_NAME,
53 .driver_data = VPBE_VERSION_3,
54 },
55};
56
57MODULE_DEVICE_TABLE(platform, vpbe_osd_devtype);
43 58
44/* register access routines */ 59/* register access routines */
45static inline u32 osd_read(struct osd_state *sd, u32 offset) 60static inline u32 osd_read(struct osd_state *sd, u32 offset)
@@ -129,7 +144,7 @@ static int _osd_dm6446_vid0_pingpong(struct osd_state *sd,
129 struct osd_platform_data *pdata; 144 struct osd_platform_data *pdata;
130 145
131 pdata = (struct osd_platform_data *)sd->dev->platform_data; 146 pdata = (struct osd_platform_data *)sd->dev->platform_data;
132 if (pdata->field_inv_wa_enable) { 147 if (pdata != NULL && pdata->field_inv_wa_enable) {
133 148
134 if (!field_inversion || !lconfig->interlaced) { 149 if (!field_inversion || !lconfig->interlaced) {
135 osd_write(sd, fb_base_phys & ~0x1F, OSD_VIDWIN0ADR); 150 osd_write(sd, fb_base_phys & ~0x1F, OSD_VIDWIN0ADR);
@@ -1526,7 +1541,7 @@ static const struct vpbe_osd_ops osd_ops = {
1526 1541
1527static int osd_probe(struct platform_device *pdev) 1542static int osd_probe(struct platform_device *pdev)
1528{ 1543{
1529 struct osd_platform_data *pdata; 1544 const struct platform_device_id *pdev_id;
1530 struct osd_state *osd; 1545 struct osd_state *osd;
1531 struct resource *res; 1546 struct resource *res;
1532 int ret = 0; 1547 int ret = 0;
@@ -1535,16 +1550,15 @@ static int osd_probe(struct platform_device *pdev)
1535 if (osd == NULL) 1550 if (osd == NULL)
1536 return -ENOMEM; 1551 return -ENOMEM;
1537 1552
1538 osd->dev = &pdev->dev; 1553 pdev_id = platform_get_device_id(pdev);
1539 pdata = (struct osd_platform_data *)pdev->dev.platform_data; 1554 if (!pdev_id) {
1540 osd->vpbe_type = (enum vpbe_version)pdata->vpbe_type; 1555 ret = -EINVAL;
1541 if (NULL == pdev->dev.platform_data) {
1542 dev_err(osd->dev, "No platform data defined for OSD"
1543 " sub device\n");
1544 ret = -ENOENT;
1545 goto free_mem; 1556 goto free_mem;
1546 } 1557 }
1547 1558
1559 osd->dev = &pdev->dev;
1560 osd->vpbe_type = pdev_id->driver_data;
1561
1548 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1562 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1549 if (!res) { 1563 if (!res) {
1550 dev_err(osd->dev, "Unable to get OSD register address map\n"); 1564 dev_err(osd->dev, "Unable to get OSD register address map\n");
@@ -1595,6 +1609,7 @@ static struct platform_driver osd_driver = {
1595 .name = MODULE_NAME, 1609 .name = MODULE_NAME,
1596 .owner = THIS_MODULE, 1610 .owner = THIS_MODULE,
1597 }, 1611 },
1612 .id_table = vpbe_osd_devtype
1598}; 1613};
1599 1614
1600module_platform_driver(osd_driver); 1615module_platform_driver(osd_driver);
diff --git a/drivers/media/platform/davinci/vpbe_venc.c b/drivers/media/platform/davinci/vpbe_venc.c
index aed7369b962a..bdbebd59df98 100644
--- a/drivers/media/platform/davinci/vpbe_venc.c
+++ b/drivers/media/platform/davinci/vpbe_venc.c
@@ -38,7 +38,22 @@
38 38
39#include "vpbe_venc_regs.h" 39#include "vpbe_venc_regs.h"
40 40
41#define MODULE_NAME VPBE_VENC_SUBDEV_NAME 41#define MODULE_NAME "davinci-vpbe-venc"
42
43static struct platform_device_id vpbe_venc_devtype[] = {
44 {
45 .name = DM644X_VPBE_VENC_SUBDEV_NAME,
46 .driver_data = VPBE_VERSION_1,
47 }, {
48 .name = DM365_VPBE_VENC_SUBDEV_NAME,
49 .driver_data = VPBE_VERSION_2,
50 }, {
51 .name = DM355_VPBE_VENC_SUBDEV_NAME,
52 .driver_data = VPBE_VERSION_3,
53 },
54};
55
56MODULE_DEVICE_TABLE(platform, vpbe_venc_devtype);
42 57
43static int debug = 2; 58static int debug = 2;
44module_param(debug, int, 0644); 59module_param(debug, int, 0644);
@@ -54,6 +69,7 @@ struct venc_state {
54 spinlock_t lock; 69 spinlock_t lock;
55 void __iomem *venc_base; 70 void __iomem *venc_base;
56 void __iomem *vdaccfg_reg; 71 void __iomem *vdaccfg_reg;
72 enum vpbe_version venc_type;
57}; 73};
58 74
59static inline struct venc_state *to_state(struct v4l2_subdev *sd) 75static inline struct venc_state *to_state(struct v4l2_subdev *sd)
@@ -127,7 +143,7 @@ static int venc_set_dac(struct v4l2_subdev *sd, u32 out_index)
127static void venc_enabledigitaloutput(struct v4l2_subdev *sd, int benable) 143static void venc_enabledigitaloutput(struct v4l2_subdev *sd, int benable)
128{ 144{
129 struct venc_state *venc = to_state(sd); 145 struct venc_state *venc = to_state(sd);
130 struct venc_platform_data *pdata = venc->pdata; 146
131 v4l2_dbg(debug, 2, sd, "venc_enabledigitaloutput\n"); 147 v4l2_dbg(debug, 2, sd, "venc_enabledigitaloutput\n");
132 148
133 if (benable) { 149 if (benable) {
@@ -159,7 +175,7 @@ static void venc_enabledigitaloutput(struct v4l2_subdev *sd, int benable)
159 175
160 /* Disable LCD output control (accepting default polarity) */ 176 /* Disable LCD output control (accepting default polarity) */
161 venc_write(sd, VENC_LCDOUT, 0); 177 venc_write(sd, VENC_LCDOUT, 0);
162 if (pdata->venc_type != VPBE_VERSION_3) 178 if (venc->venc_type != VPBE_VERSION_3)
163 venc_write(sd, VENC_CMPNT, 0x100); 179 venc_write(sd, VENC_CMPNT, 0x100);
164 venc_write(sd, VENC_HSPLS, 0); 180 venc_write(sd, VENC_HSPLS, 0);
165 venc_write(sd, VENC_HINT, 0); 181 venc_write(sd, VENC_HINT, 0);
@@ -203,11 +219,11 @@ static int venc_set_ntsc(struct v4l2_subdev *sd)
203 219
204 venc_enabledigitaloutput(sd, 0); 220 venc_enabledigitaloutput(sd, 0);
205 221
206 if (pdata->venc_type == VPBE_VERSION_3) { 222 if (venc->venc_type == VPBE_VERSION_3) {
207 venc_write(sd, VENC_CLKCTL, 0x01); 223 venc_write(sd, VENC_CLKCTL, 0x01);
208 venc_write(sd, VENC_VIDCTL, 0); 224 venc_write(sd, VENC_VIDCTL, 0);
209 val = vdaccfg_write(sd, VDAC_CONFIG_SD_V3); 225 val = vdaccfg_write(sd, VDAC_CONFIG_SD_V3);
210 } else if (pdata->venc_type == VPBE_VERSION_2) { 226 } else if (venc->venc_type == VPBE_VERSION_2) {
211 venc_write(sd, VENC_CLKCTL, 0x01); 227 venc_write(sd, VENC_CLKCTL, 0x01);
212 venc_write(sd, VENC_VIDCTL, 0); 228 venc_write(sd, VENC_VIDCTL, 0);
213 vdaccfg_write(sd, VDAC_CONFIG_SD_V2); 229 vdaccfg_write(sd, VDAC_CONFIG_SD_V2);
@@ -238,7 +254,6 @@ static int venc_set_ntsc(struct v4l2_subdev *sd)
238static int venc_set_pal(struct v4l2_subdev *sd) 254static int venc_set_pal(struct v4l2_subdev *sd)
239{ 255{
240 struct venc_state *venc = to_state(sd); 256 struct venc_state *venc = to_state(sd);
241 struct venc_platform_data *pdata = venc->pdata;
242 257
243 v4l2_dbg(debug, 2, sd, "venc_set_pal\n"); 258 v4l2_dbg(debug, 2, sd, "venc_set_pal\n");
244 259
@@ -249,11 +264,11 @@ static int venc_set_pal(struct v4l2_subdev *sd)
249 264
250 venc_enabledigitaloutput(sd, 0); 265 venc_enabledigitaloutput(sd, 0);
251 266
252 if (pdata->venc_type == VPBE_VERSION_3) { 267 if (venc->venc_type == VPBE_VERSION_3) {
253 venc_write(sd, VENC_CLKCTL, 0x1); 268 venc_write(sd, VENC_CLKCTL, 0x1);
254 venc_write(sd, VENC_VIDCTL, 0); 269 venc_write(sd, VENC_VIDCTL, 0);
255 vdaccfg_write(sd, VDAC_CONFIG_SD_V3); 270 vdaccfg_write(sd, VDAC_CONFIG_SD_V3);
256 } else if (pdata->venc_type == VPBE_VERSION_2) { 271 } else if (venc->venc_type == VPBE_VERSION_2) {
257 venc_write(sd, VENC_CLKCTL, 0x1); 272 venc_write(sd, VENC_CLKCTL, 0x1);
258 venc_write(sd, VENC_VIDCTL, 0); 273 venc_write(sd, VENC_VIDCTL, 0);
259 vdaccfg_write(sd, VDAC_CONFIG_SD_V2); 274 vdaccfg_write(sd, VDAC_CONFIG_SD_V2);
@@ -293,8 +308,8 @@ static int venc_set_480p59_94(struct v4l2_subdev *sd)
293 struct venc_platform_data *pdata = venc->pdata; 308 struct venc_platform_data *pdata = venc->pdata;
294 309
295 v4l2_dbg(debug, 2, sd, "venc_set_480p59_94\n"); 310 v4l2_dbg(debug, 2, sd, "venc_set_480p59_94\n");
296 if ((pdata->venc_type != VPBE_VERSION_1) && 311 if (venc->venc_type != VPBE_VERSION_1 &&
297 (pdata->venc_type != VPBE_VERSION_2)) 312 venc->venc_type != VPBE_VERSION_2)
298 return -EINVAL; 313 return -EINVAL;
299 314
300 /* Setup clock at VPSS & VENC for SD */ 315 /* Setup clock at VPSS & VENC for SD */
@@ -303,12 +318,12 @@ static int venc_set_480p59_94(struct v4l2_subdev *sd)
303 318
304 venc_enabledigitaloutput(sd, 0); 319 venc_enabledigitaloutput(sd, 0);
305 320
306 if (pdata->venc_type == VPBE_VERSION_2) 321 if (venc->venc_type == VPBE_VERSION_2)
307 vdaccfg_write(sd, VDAC_CONFIG_HD_V2); 322 vdaccfg_write(sd, VDAC_CONFIG_HD_V2);
308 venc_write(sd, VENC_OSDCLK0, 0); 323 venc_write(sd, VENC_OSDCLK0, 0);
309 venc_write(sd, VENC_OSDCLK1, 1); 324 venc_write(sd, VENC_OSDCLK1, 1);
310 325
311 if (pdata->venc_type == VPBE_VERSION_1) { 326 if (venc->venc_type == VPBE_VERSION_1) {
312 venc_modify(sd, VENC_VDPRO, VENC_VDPRO_DAFRQ, 327 venc_modify(sd, VENC_VDPRO, VENC_VDPRO_DAFRQ,
313 VENC_VDPRO_DAFRQ); 328 VENC_VDPRO_DAFRQ);
314 venc_modify(sd, VENC_VDPRO, VENC_VDPRO_DAUPS, 329 venc_modify(sd, VENC_VDPRO, VENC_VDPRO_DAUPS,
@@ -341,8 +356,8 @@ static int venc_set_576p50(struct v4l2_subdev *sd)
341 356
342 v4l2_dbg(debug, 2, sd, "venc_set_576p50\n"); 357 v4l2_dbg(debug, 2, sd, "venc_set_576p50\n");
343 358
344 if ((pdata->venc_type != VPBE_VERSION_1) && 359 if (venc->venc_type != VPBE_VERSION_1 &&
345 (pdata->venc_type != VPBE_VERSION_2)) 360 venc->venc_type != VPBE_VERSION_2)
346 return -EINVAL; 361 return -EINVAL;
347 /* Setup clock at VPSS & VENC for SD */ 362 /* Setup clock at VPSS & VENC for SD */
348 if (pdata->setup_clock(VPBE_ENC_CUSTOM_TIMINGS, 27000000) < 0) 363 if (pdata->setup_clock(VPBE_ENC_CUSTOM_TIMINGS, 27000000) < 0)
@@ -350,13 +365,13 @@ static int venc_set_576p50(struct v4l2_subdev *sd)
350 365
351 venc_enabledigitaloutput(sd, 0); 366 venc_enabledigitaloutput(sd, 0);
352 367
353 if (pdata->venc_type == VPBE_VERSION_2) 368 if (venc->venc_type == VPBE_VERSION_2)
354 vdaccfg_write(sd, VDAC_CONFIG_HD_V2); 369 vdaccfg_write(sd, VDAC_CONFIG_HD_V2);
355 370
356 venc_write(sd, VENC_OSDCLK0, 0); 371 venc_write(sd, VENC_OSDCLK0, 0);
357 venc_write(sd, VENC_OSDCLK1, 1); 372 venc_write(sd, VENC_OSDCLK1, 1);
358 373
359 if (pdata->venc_type == VPBE_VERSION_1) { 374 if (venc->venc_type == VPBE_VERSION_1) {
360 venc_modify(sd, VENC_VDPRO, VENC_VDPRO_DAFRQ, 375 venc_modify(sd, VENC_VDPRO, VENC_VDPRO_DAFRQ,
361 VENC_VDPRO_DAFRQ); 376 VENC_VDPRO_DAFRQ);
362 venc_modify(sd, VENC_VDPRO, VENC_VDPRO_DAUPS, 377 venc_modify(sd, VENC_VDPRO, VENC_VDPRO_DAUPS,
@@ -460,14 +475,14 @@ static int venc_s_dv_timings(struct v4l2_subdev *sd,
460 else if (height == 480) 475 else if (height == 480)
461 return venc_set_480p59_94(sd); 476 return venc_set_480p59_94(sd);
462 else if ((height == 720) && 477 else if ((height == 720) &&
463 (venc->pdata->venc_type == VPBE_VERSION_2)) { 478 (venc->venc_type == VPBE_VERSION_2)) {
464 /* TBD setup internal 720p mode here */ 479 /* TBD setup internal 720p mode here */
465 ret = venc_set_720p60_internal(sd); 480 ret = venc_set_720p60_internal(sd);
466 /* for DM365 VPBE, there is DAC inside */ 481 /* for DM365 VPBE, there is DAC inside */
467 vdaccfg_write(sd, VDAC_CONFIG_HD_V2); 482 vdaccfg_write(sd, VDAC_CONFIG_HD_V2);
468 return ret; 483 return ret;
469 } else if ((height == 1080) && 484 } else if ((height == 1080) &&
470 (venc->pdata->venc_type == VPBE_VERSION_2)) { 485 (venc->venc_type == VPBE_VERSION_2)) {
471 /* TBD setup internal 1080i mode here */ 486 /* TBD setup internal 1080i mode here */
472 ret = venc_set_1080i30_internal(sd); 487 ret = venc_set_1080i30_internal(sd);
473 /* for DM365 VPBE, there is DAC inside */ 488 /* for DM365 VPBE, there is DAC inside */
@@ -556,7 +571,7 @@ static int venc_device_get(struct device *dev, void *data)
556 struct platform_device *pdev = to_platform_device(dev); 571 struct platform_device *pdev = to_platform_device(dev);
557 struct venc_state **venc = data; 572 struct venc_state **venc = data;
558 573
559 if (strcmp(MODULE_NAME, pdev->name) == 0) 574 if (strstr(pdev->name, "vpbe-venc") != NULL)
560 *venc = platform_get_drvdata(pdev); 575 *venc = platform_get_drvdata(pdev);
561 576
562 return 0; 577 return 0;
@@ -593,6 +608,7 @@ EXPORT_SYMBOL(venc_sub_dev_init);
593 608
594static int venc_probe(struct platform_device *pdev) 609static int venc_probe(struct platform_device *pdev)
595{ 610{
611 const struct platform_device_id *pdev_id;
596 struct venc_state *venc; 612 struct venc_state *venc;
597 struct resource *res; 613 struct resource *res;
598 int ret; 614 int ret;
@@ -601,6 +617,12 @@ static int venc_probe(struct platform_device *pdev)
601 if (venc == NULL) 617 if (venc == NULL)
602 return -ENOMEM; 618 return -ENOMEM;
603 619
620 pdev_id = platform_get_device_id(pdev);
621 if (!pdev_id) {
622 ret = -EINVAL;
623 goto free_mem;
624 }
625 venc->venc_type = pdev_id->driver_data;
604 venc->pdev = &pdev->dev; 626 venc->pdev = &pdev->dev;
605 venc->pdata = pdev->dev.platform_data; 627 venc->pdata = pdev->dev.platform_data;
606 if (NULL == venc->pdata) { 628 if (NULL == venc->pdata) {
@@ -630,7 +652,7 @@ static int venc_probe(struct platform_device *pdev)
630 goto release_venc_mem_region; 652 goto release_venc_mem_region;
631 } 653 }
632 654
633 if (venc->pdata->venc_type != VPBE_VERSION_1) { 655 if (venc->venc_type != VPBE_VERSION_1) {
634 res = platform_get_resource(pdev, IORESOURCE_MEM, 1); 656 res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
635 if (!res) { 657 if (!res) {
636 dev_err(venc->pdev, 658 dev_err(venc->pdev,
@@ -681,7 +703,7 @@ static int venc_remove(struct platform_device *pdev)
681 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 703 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
682 iounmap((void *)venc->venc_base); 704 iounmap((void *)venc->venc_base);
683 release_mem_region(res->start, resource_size(res)); 705 release_mem_region(res->start, resource_size(res));
684 if (venc->pdata->venc_type != VPBE_VERSION_1) { 706 if (venc->venc_type != VPBE_VERSION_1) {
685 res = platform_get_resource(pdev, IORESOURCE_MEM, 1); 707 res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
686 iounmap((void *)venc->vdaccfg_reg); 708 iounmap((void *)venc->vdaccfg_reg);
687 release_mem_region(res->start, resource_size(res)); 709 release_mem_region(res->start, resource_size(res));
@@ -698,6 +720,7 @@ static struct platform_driver venc_driver = {
698 .name = MODULE_NAME, 720 .name = MODULE_NAME,
699 .owner = THIS_MODULE, 721 .owner = THIS_MODULE,
700 }, 722 },
723 .id_table = vpbe_venc_devtype
701}; 724};
702 725
703module_platform_driver(venc_driver); 726module_platform_driver(venc_driver);
diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c
index be9d3e1b4868..28d019da4c01 100644
--- a/drivers/media/platform/davinci/vpfe_capture.c
+++ b/drivers/media/platform/davinci/vpfe_capture.c
@@ -560,10 +560,7 @@ static void vpfe_schedule_bottom_field(struct vpfe_device *vpfe_dev)
560 560
561static void vpfe_process_buffer_complete(struct vpfe_device *vpfe_dev) 561static void vpfe_process_buffer_complete(struct vpfe_device *vpfe_dev)
562{ 562{
563 struct timeval timevalue; 563 v4l2_get_timestamp(&vpfe_dev->cur_frm->ts);
564
565 do_gettimeofday(&timevalue);
566 vpfe_dev->cur_frm->ts = timevalue;
567 vpfe_dev->cur_frm->state = VIDEOBUF_DONE; 564 vpfe_dev->cur_frm->state = VIDEOBUF_DONE;
568 vpfe_dev->cur_frm->size = vpfe_dev->fmt.fmt.pix.sizeimage; 565 vpfe_dev->cur_frm->size = vpfe_dev->fmt.fmt.pix.sizeimage;
569 wake_up_interruptible(&vpfe_dev->cur_frm->done); 566 wake_up_interruptible(&vpfe_dev->cur_frm->done);
diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
index a409ccefb380..5892d2bc8eee 100644
--- a/drivers/media/platform/davinci/vpif_capture.c
+++ b/drivers/media/platform/davinci/vpif_capture.c
@@ -411,7 +411,7 @@ static struct vb2_ops video_qops = {
411 */ 411 */
412static void vpif_process_buffer_complete(struct common_obj *common) 412static void vpif_process_buffer_complete(struct common_obj *common)
413{ 413{
414 do_gettimeofday(&common->cur_frm->vb.v4l2_buf.timestamp); 414 v4l2_get_timestamp(&common->cur_frm->vb.v4l2_buf.timestamp);
415 vb2_buffer_done(&common->cur_frm->vb, 415 vb2_buffer_done(&common->cur_frm->vb,
416 VB2_BUF_STATE_DONE); 416 VB2_BUF_STATE_DONE);
417 /* Make curFrm pointing to nextFrm */ 417 /* Make curFrm pointing to nextFrm */
diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c
index 9f2b603be9c9..dd249c96126d 100644
--- a/drivers/media/platform/davinci/vpif_display.c
+++ b/drivers/media/platform/davinci/vpif_display.c
@@ -402,7 +402,7 @@ static void process_interlaced_mode(int fid, struct common_obj *common)
402 /* one frame is displayed If next frame is 402 /* one frame is displayed If next frame is
403 * available, release cur_frm and move on */ 403 * available, release cur_frm and move on */
404 /* Copy frame display time */ 404 /* Copy frame display time */
405 do_gettimeofday(&common->cur_frm->vb.v4l2_buf.timestamp); 405 v4l2_get_timestamp(&common->cur_frm->vb.v4l2_buf.timestamp);
406 /* Change status of the cur_frm */ 406 /* Change status of the cur_frm */
407 vb2_buffer_done(&common->cur_frm->vb, 407 vb2_buffer_done(&common->cur_frm->vb,
408 VB2_BUF_STATE_DONE); 408 VB2_BUF_STATE_DONE);
@@ -462,8 +462,8 @@ static irqreturn_t vpif_channel_isr(int irq, void *dev_id)
462 if (!channel_first_int[i][channel_id]) { 462 if (!channel_first_int[i][channel_id]) {
463 /* Mark status of the cur_frm to 463 /* Mark status of the cur_frm to
464 * done and unlock semaphore on it */ 464 * done and unlock semaphore on it */
465 do_gettimeofday(&common->cur_frm->vb. 465 v4l2_get_timestamp(&common->cur_frm->vb.
466 v4l2_buf.timestamp); 466 v4l2_buf.timestamp);
467 vb2_buffer_done(&common->cur_frm->vb, 467 vb2_buffer_done(&common->cur_frm->vb,
468 VB2_BUF_STATE_DONE); 468 VB2_BUF_STATE_DONE);
469 /* Make cur_frm pointing to next_frm */ 469 /* Make cur_frm pointing to next_frm */
diff --git a/drivers/media/platform/davinci/vpss.c b/drivers/media/platform/davinci/vpss.c
index 684e815a81b6..a19c552232d1 100644
--- a/drivers/media/platform/davinci/vpss.c
+++ b/drivers/media/platform/davinci/vpss.c
@@ -50,13 +50,29 @@ MODULE_AUTHOR("Texas Instruments");
50/* VENCINT - vpss_int8 */ 50/* VENCINT - vpss_int8 */
51#define DM355_VPSSBL_EVTSEL_DEFAULT 0x4 51#define DM355_VPSSBL_EVTSEL_DEFAULT 0x4
52 52
53#define DM365_ISP5_PCCR 0x04 53#define DM365_ISP5_PCCR 0x04
54#define DM365_ISP5_PCCR_BL_CLK_ENABLE BIT(0)
55#define DM365_ISP5_PCCR_ISIF_CLK_ENABLE BIT(1)
56#define DM365_ISP5_PCCR_H3A_CLK_ENABLE BIT(2)
57#define DM365_ISP5_PCCR_RSZ_CLK_ENABLE BIT(3)
58#define DM365_ISP5_PCCR_IPIPE_CLK_ENABLE BIT(4)
59#define DM365_ISP5_PCCR_IPIPEIF_CLK_ENABLE BIT(5)
60#define DM365_ISP5_PCCR_RSV BIT(6)
61
62#define DM365_ISP5_BCR 0x08
63#define DM365_ISP5_BCR_ISIF_OUT_ENABLE BIT(1)
64
54#define DM365_ISP5_INTSEL1 0x10 65#define DM365_ISP5_INTSEL1 0x10
55#define DM365_ISP5_INTSEL2 0x14 66#define DM365_ISP5_INTSEL2 0x14
56#define DM365_ISP5_INTSEL3 0x18 67#define DM365_ISP5_INTSEL3 0x18
57#define DM365_ISP5_CCDCMUX 0x20 68#define DM365_ISP5_CCDCMUX 0x20
58#define DM365_ISP5_PG_FRAME_SIZE 0x28 69#define DM365_ISP5_PG_FRAME_SIZE 0x28
59#define DM365_VPBE_CLK_CTRL 0x00 70#define DM365_VPBE_CLK_CTRL 0x00
71
72#define VPSS_CLK_CTRL 0x01c40044
73#define VPSS_CLK_CTRL_VENCCLKEN BIT(3)
74#define VPSS_CLK_CTRL_DACCLKEN BIT(4)
75
60/* 76/*
61 * vpss interrupts. VDINT0 - vpss_int0, VDINT1 - vpss_int1, 77 * vpss interrupts. VDINT0 - vpss_int0, VDINT1 - vpss_int1,
62 * AF - vpss_int3 78 * AF - vpss_int3
@@ -94,12 +110,19 @@ struct vpss_hw_ops {
94 void (*select_ccdc_source)(enum vpss_ccdc_source_sel src_sel); 110 void (*select_ccdc_source)(enum vpss_ccdc_source_sel src_sel);
95 /* clear wbl overflow bit */ 111 /* clear wbl overflow bit */
96 int (*clear_wbl_overflow)(enum vpss_wbl_sel wbl_sel); 112 int (*clear_wbl_overflow)(enum vpss_wbl_sel wbl_sel);
113 /* set sync polarity */
114 void (*set_sync_pol)(struct vpss_sync_pol);
115 /* set the PG_FRAME_SIZE register*/
116 void (*set_pg_frame_size)(struct vpss_pg_frame_size);
117 /* check and clear interrupt if occured */
118 int (*dma_complete_interrupt)(void);
97}; 119};
98 120
99/* vpss configuration */ 121/* vpss configuration */
100struct vpss_oper_config { 122struct vpss_oper_config {
101 __iomem void *vpss_regs_base0; 123 __iomem void *vpss_regs_base0;
102 __iomem void *vpss_regs_base1; 124 __iomem void *vpss_regs_base1;
125 resource_size_t *vpss_regs_base2;
103 enum vpss_platform_type platform; 126 enum vpss_platform_type platform;
104 spinlock_t vpss_lock; 127 spinlock_t vpss_lock;
105 struct vpss_hw_ops hw_ops; 128 struct vpss_hw_ops hw_ops;
@@ -157,6 +180,14 @@ static void dm355_select_ccdc_source(enum vpss_ccdc_source_sel src_sel)
157 bl_regw(src_sel << VPSS_HSSISEL_SHIFT, DM355_VPSSBL_CCDCMUX); 180 bl_regw(src_sel << VPSS_HSSISEL_SHIFT, DM355_VPSSBL_CCDCMUX);
158} 181}
159 182
183int vpss_dma_complete_interrupt(void)
184{
185 if (!oper_cfg.hw_ops.dma_complete_interrupt)
186 return 2;
187 return oper_cfg.hw_ops.dma_complete_interrupt();
188}
189EXPORT_SYMBOL(vpss_dma_complete_interrupt);
190
160int vpss_select_ccdc_source(enum vpss_ccdc_source_sel src_sel) 191int vpss_select_ccdc_source(enum vpss_ccdc_source_sel src_sel)
161{ 192{
162 if (!oper_cfg.hw_ops.select_ccdc_source) 193 if (!oper_cfg.hw_ops.select_ccdc_source)
@@ -182,6 +213,15 @@ static int dm644x_clear_wbl_overflow(enum vpss_wbl_sel wbl_sel)
182 return 0; 213 return 0;
183} 214}
184 215
216void vpss_set_sync_pol(struct vpss_sync_pol sync)
217{
218 if (!oper_cfg.hw_ops.set_sync_pol)
219 return;
220
221 oper_cfg.hw_ops.set_sync_pol(sync);
222}
223EXPORT_SYMBOL(vpss_set_sync_pol);
224
185int vpss_clear_wbl_overflow(enum vpss_wbl_sel wbl_sel) 225int vpss_clear_wbl_overflow(enum vpss_wbl_sel wbl_sel)
186{ 226{
187 if (!oper_cfg.hw_ops.clear_wbl_overflow) 227 if (!oper_cfg.hw_ops.clear_wbl_overflow)
@@ -347,6 +387,15 @@ void dm365_vpss_set_sync_pol(struct vpss_sync_pol sync)
347} 387}
348EXPORT_SYMBOL(dm365_vpss_set_sync_pol); 388EXPORT_SYMBOL(dm365_vpss_set_sync_pol);
349 389
390void vpss_set_pg_frame_size(struct vpss_pg_frame_size frame_size)
391{
392 if (!oper_cfg.hw_ops.set_pg_frame_size)
393 return;
394
395 oper_cfg.hw_ops.set_pg_frame_size(frame_size);
396}
397EXPORT_SYMBOL(vpss_set_pg_frame_size);
398
350void dm365_vpss_set_pg_frame_size(struct vpss_pg_frame_size frame_size) 399void dm365_vpss_set_pg_frame_size(struct vpss_pg_frame_size frame_size)
351{ 400{
352 int current_reg = ((frame_size.hlpfr >> 1) - 1) << 16; 401 int current_reg = ((frame_size.hlpfr >> 1) - 1) << 16;
@@ -425,6 +474,16 @@ static int vpss_probe(struct platform_device *pdev)
425 oper_cfg.hw_ops.enable_clock = dm365_enable_clock; 474 oper_cfg.hw_ops.enable_clock = dm365_enable_clock;
426 oper_cfg.hw_ops.select_ccdc_source = dm365_select_ccdc_source; 475 oper_cfg.hw_ops.select_ccdc_source = dm365_select_ccdc_source;
427 /* Setup vpss interrupts */ 476 /* Setup vpss interrupts */
477 isp5_write((isp5_read(DM365_ISP5_PCCR) |
478 DM365_ISP5_PCCR_BL_CLK_ENABLE |
479 DM365_ISP5_PCCR_ISIF_CLK_ENABLE |
480 DM365_ISP5_PCCR_H3A_CLK_ENABLE |
481 DM365_ISP5_PCCR_RSZ_CLK_ENABLE |
482 DM365_ISP5_PCCR_IPIPE_CLK_ENABLE |
483 DM365_ISP5_PCCR_IPIPEIF_CLK_ENABLE |
484 DM365_ISP5_PCCR_RSV), DM365_ISP5_PCCR);
485 isp5_write((isp5_read(DM365_ISP5_BCR) |
486 DM365_ISP5_BCR_ISIF_OUT_ENABLE), DM365_ISP5_BCR);
428 isp5_write(DM365_ISP5_INTSEL1_DEFAULT, DM365_ISP5_INTSEL1); 487 isp5_write(DM365_ISP5_INTSEL1_DEFAULT, DM365_ISP5_INTSEL1);
429 isp5_write(DM365_ISP5_INTSEL2_DEFAULT, DM365_ISP5_INTSEL2); 488 isp5_write(DM365_ISP5_INTSEL2_DEFAULT, DM365_ISP5_INTSEL2);
430 isp5_write(DM365_ISP5_INTSEL3_DEFAULT, DM365_ISP5_INTSEL3); 489 isp5_write(DM365_ISP5_INTSEL3_DEFAULT, DM365_ISP5_INTSEL3);
@@ -470,11 +529,20 @@ static struct platform_driver vpss_driver = {
470 529
471static void vpss_exit(void) 530static void vpss_exit(void)
472{ 531{
532 iounmap(oper_cfg.vpss_regs_base2);
533 release_mem_region(VPSS_CLK_CTRL, 4);
473 platform_driver_unregister(&vpss_driver); 534 platform_driver_unregister(&vpss_driver);
474} 535}
475 536
476static int __init vpss_init(void) 537static int __init vpss_init(void)
477{ 538{
539 if (!request_mem_region(VPSS_CLK_CTRL, 4, "vpss_clock_control"))
540 return -EBUSY;
541
542 oper_cfg.vpss_regs_base2 = ioremap(VPSS_CLK_CTRL, 4);
543 writel(VPSS_CLK_CTRL_VENCCLKEN |
544 VPSS_CLK_CTRL_DACCLKEN, oper_cfg.vpss_regs_base2);
545
478 return platform_driver_register(&vpss_driver); 546 return platform_driver_register(&vpss_driver);
479} 547}
480subsys_initcall(vpss_init); 548subsys_initcall(vpss_init);