[PATCH - v4 1/4] V4L - vpfe_capture-remove clock and platform code
Mauro, I know you are busy, but this patch is sitting too long for merge and require your service. Could you at least respond to my email with your plan so that I can work on the next patch set for your merge. Thanks and regards, Murali Karicheri Software Design Engineer Texas Instruments Inc. Germantown, MD 20874 phone: 301-407-9583 email: m-kariche...@ti.com -Original Message- From: davinci-linux-open-source-boun...@linux.davincidsp.com [mailto:davinci-linux-open-source-boun...@linux.davincidsp.com] On Behalf Of Karicheri, Muralidharan Sent: Thursday, January 14, 2010 4:24 PM To: mche...@infradead.org Cc: davinci-linux-open-sou...@linux.davincidsp.com; mche...@infradead.org; linux-media@vger.kernel.org Subject: RE: [PATCH - v4 1/4] V4L - vpfe_capture-remove clock and platform code Mauro, Could you add patches 1-3 to linux-next ASAP? See the response from Kevin for the arch part. Murali Karicheri Software Design Engineer Texas Instruments Inc. Germantown, MD 20874 phone: 301-407-9583 email: m-kariche...@ti.com -Original Message- From: Kevin Hilman [mailto:khil...@deeprootsystems.com] Sent: Thursday, January 14, 2010 3:48 PM To: Karicheri, Muralidharan Cc: linux-media@vger.kernel.org; hverk...@xs4all.nl; mche...@infradead.org; davinci-linux-open-sou...@linux.davincidsp.com Subject: Re: [PATCH - v4 1/4] V4L - vpfe_capture-remove clock and platform code Karicheri, Muralidharan m-kariche...@ti.com writes: Mauro, Please merge this patches if there are no more comments. Kevin, Could you work with Mauro to merge the arch part as required? This version looks good with me. I'll assume that these are targed for 2.6.34, not 2.6.33-rc fixes window. These appear to be able at least compile independently, so as soon as Mauro/Hans sign-off on them, I wi add PATCH 4/4 to davinci-next so it will be queued for 2.6.34 and be a part of linux-next. Mauro can queue patches 1-3 in his queue for 2.6.34. They will both be in linux-next for testing. Also, I can *temporarily* add patches 1-3 to davinci git so davinci git will have them all while waiting for 2.6.34 merge window. I will then drop them when Mauro's tree merges upstream. Kevin Murali Karicheri Software Design Engineer Texas Instruments Inc. Germantown, MD 20874 phone: 301-407-9583 email: m-kariche...@ti.com -Original Message- From: Karicheri, Muralidharan Sent: Wednesday, January 13, 2010 6:27 PM To: linux-media@vger.kernel.org; hverk...@xs4all.nl; khil...@deeprootsystems.com; mche...@infradead.org Cc: davinci-linux-open-sou...@linux.davincidsp.com; Karicheri, Muralidharan Subject: [PATCH - v4 1/4] V4L - vpfe_capture-remove clock and platform code From: Muralidharan Karicheri m-kariche...@ti.com Following changes are done in this patch:- 1) removed the platform code and clk configuration. They are now part of ccdc driver (part of the ccdc patches and platform patches 2-4) 2) Added proper error codes for ccdc register function Reviewed-by: Vaibhav Hiremath hvaib...@ti.com Reviewed-by: Kevin Hilman khil...@deeprootsystems.com Reviewed-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Muralidharan Karicheri m-kariche...@ti.com --- Rebased to latest linux-next tree of v4l-dvb This combines the two patches sent earlier to change the clock configuration and converting ccdc drivers to platform drivers. This has updated comments against v1 of these patches. drivers/media/video/davinci/vpfe_capture.c | 131 +++-- - -- 1 files changed, 13 insertions(+), 118 deletions(-) diff --git a/drivers/media/video/davinci/vpfe_capture.c b/drivers/media/video/davinci/vpfe_capture.c index de22bc9..885cd54 100644 --- a/drivers/media/video/davinci/vpfe_capture.c +++ b/drivers/media/video/davinci/vpfe_capture.c @@ -107,9 +107,6 @@ struct ccdc_config { int vpfe_probed; /* name of ccdc device */ char name[32]; - /* for storing mem maps for CCDC */ - int ccdc_addr_size; - void *__iomem ccdc_addr; }; /* data structures */ @@ -229,7 +226,6 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev) BUG_ON(!dev-hw_ops.set_image_window); BUG_ON(!dev-hw_ops.get_image_window); BUG_ON(!dev-hw_ops.get_line_length); - BUG_ON(!dev-hw_ops.setfbaddr); BUG_ON(!dev-hw_ops.getfid); mutex_lock(ccdc_lock); @@ -240,25 +236,23 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev) * walk through it during vpfe probe */ printk(KERN_ERR vpfe capture not initialized\n); - ret = -1; + ret = -EFAULT; goto unlock; } if (strcmp(dev-name, ccdc_cfg-name)) { /* ignore this ccdc */ - ret = -1; + ret = -EINVAL; goto unlock; } if (ccdc_dev) { printk(KERN_ERR ccdc already registered\n); - ret = -1; + ret = -EINVAL; goto unlock; } ccdc_dev
Re: [PATCH - v4 1/4] V4L - vpfe_capture-remove clock and platform code
Karicheri, Muralidharan m-kariche...@ti.com writes: Mauro, Please merge this patches if there are no more comments. Kevin, Could you work with Mauro to merge the arch part as required? This version looks good with me. I'll assume that these are targed for 2.6.34, not 2.6.33-rc fixes window. These appear to be able at least compile independently, so as soon as Mauro/Hans sign-off on them, I wi add PATCH 4/4 to davinci-next so it will be queued for 2.6.34 and be a part of linux-next. Mauro can queue patches 1-3 in his queue for 2.6.34. They will both be in linux-next for testing. Also, I can *temporarily* add patches 1-3 to davinci git so davinci git will have them all while waiting for 2.6.34 merge window. I will then drop them when Mauro's tree merges upstream. Kevin Murali Karicheri Software Design Engineer Texas Instruments Inc. Germantown, MD 20874 phone: 301-407-9583 email: m-kariche...@ti.com -Original Message- From: Karicheri, Muralidharan Sent: Wednesday, January 13, 2010 6:27 PM To: linux-media@vger.kernel.org; hverk...@xs4all.nl; khil...@deeprootsystems.com; mche...@infradead.org Cc: davinci-linux-open-sou...@linux.davincidsp.com; Karicheri, Muralidharan Subject: [PATCH - v4 1/4] V4L - vpfe_capture-remove clock and platform code From: Muralidharan Karicheri m-kariche...@ti.com Following changes are done in this patch:- 1) removed the platform code and clk configuration. They are now part of ccdc driver (part of the ccdc patches and platform patches 2-4) 2) Added proper error codes for ccdc register function Reviewed-by: Vaibhav Hiremath hvaib...@ti.com Reviewed-by: Kevin Hilman khil...@deeprootsystems.com Reviewed-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Muralidharan Karicheri m-kariche...@ti.com --- Rebased to latest linux-next tree of v4l-dvb This combines the two patches sent earlier to change the clock configuration and converting ccdc drivers to platform drivers. This has updated comments against v1 of these patches. drivers/media/video/davinci/vpfe_capture.c | 131 +++- 1 files changed, 13 insertions(+), 118 deletions(-) diff --git a/drivers/media/video/davinci/vpfe_capture.c b/drivers/media/video/davinci/vpfe_capture.c index de22bc9..885cd54 100644 --- a/drivers/media/video/davinci/vpfe_capture.c +++ b/drivers/media/video/davinci/vpfe_capture.c @@ -107,9 +107,6 @@ struct ccdc_config { int vpfe_probed; /* name of ccdc device */ char name[32]; - /* for storing mem maps for CCDC */ - int ccdc_addr_size; - void *__iomem ccdc_addr; }; /* data structures */ @@ -229,7 +226,6 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev) BUG_ON(!dev-hw_ops.set_image_window); BUG_ON(!dev-hw_ops.get_image_window); BUG_ON(!dev-hw_ops.get_line_length); - BUG_ON(!dev-hw_ops.setfbaddr); BUG_ON(!dev-hw_ops.getfid); mutex_lock(ccdc_lock); @@ -240,25 +236,23 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev) * walk through it during vpfe probe */ printk(KERN_ERR vpfe capture not initialized\n); - ret = -1; + ret = -EFAULT; goto unlock; } if (strcmp(dev-name, ccdc_cfg-name)) { /* ignore this ccdc */ - ret = -1; + ret = -EINVAL; goto unlock; } if (ccdc_dev) { printk(KERN_ERR ccdc already registered\n); - ret = -1; + ret = -EINVAL; goto unlock; } ccdc_dev = dev; - dev-hw_ops.set_ccdc_base(ccdc_cfg-ccdc_addr, - ccdc_cfg-ccdc_addr_size); unlock: mutex_unlock(ccdc_lock); return ret; @@ -1786,61 +1780,6 @@ static struct vpfe_device *vpfe_initialize(void) return vpfe_dev; } -static void vpfe_disable_clock(struct vpfe_device *vpfe_dev) -{ - struct vpfe_config *vpfe_cfg = vpfe_dev-cfg; - - clk_disable(vpfe_cfg-vpssclk); - clk_put(vpfe_cfg-vpssclk); - clk_disable(vpfe_cfg-slaveclk); - clk_put(vpfe_cfg-slaveclk); - v4l2_info(vpfe_dev-pdev-driver, - vpfe vpss master slave clocks disabled\n); -} - -static int vpfe_enable_clock(struct vpfe_device *vpfe_dev) -{ - struct vpfe_config *vpfe_cfg = vpfe_dev-cfg; - int ret = -ENOENT; - - vpfe_cfg-vpssclk = clk_get(vpfe_dev-pdev, vpss_master); - if (NULL == vpfe_cfg-vpssclk) { - v4l2_err(vpfe_dev-pdev-driver, No clock defined for - vpss_master\n); - return ret; - } - - if (clk_enable(vpfe_cfg-vpssclk)) { - v4l2_err(vpfe_dev-pdev-driver, - vpfe vpss master clock not enabled\n); - goto out; - } - v4l2_info(vpfe_dev-pdev-driver, - vpfe vpss master clock enabled\n); - - vpfe_cfg-slaveclk = clk_get(vpfe_dev-pdev
RE: [PATCH - v4 1/4] V4L - vpfe_capture-remove clock and platform code
-Original Message- From: Kevin Hilman [mailto:khil...@deeprootsystems.com] Sent: Thursday, January 14, 2010 3:48 PM To: Karicheri, Muralidharan Cc: linux-media@vger.kernel.org; hverk...@xs4all.nl; mche...@infradead.org; davinci-linux-open-sou...@linux.davincidsp.com Subject: Re: [PATCH - v4 1/4] V4L - vpfe_capture-remove clock and platform code Karicheri, Muralidharan m-kariche...@ti.com writes: Mauro, Please merge this patches if there are no more comments. Kevin, Could you work with Mauro to merge the arch part as required? This version looks good with me. I'll assume that these are targed for 2.6.34, not 2.6.33-rc fixes window. That is correct. These appear to be able at least compile independently, so as soon as Mauro/Hans sign-off on them, I wi add PATCH 4/4 to davinci-next so it will be queued for 2.6.34 and be a part of linux-next. Thanks. Murali Mauro can queue patches 1-3 in his queue for 2.6.34. They will both be in linux-next for testing. Also, I can *temporarily* add patches 1-3 to davinci git so davinci git will have them all while waiting for 2.6.34 merge window. I will then drop them when Mauro's tree merges upstream. Kevin Murali Karicheri Software Design Engineer Texas Instruments Inc. Germantown, MD 20874 phone: 301-407-9583 email: m-kariche...@ti.com -Original Message- From: Karicheri, Muralidharan Sent: Wednesday, January 13, 2010 6:27 PM To: linux-media@vger.kernel.org; hverk...@xs4all.nl; khil...@deeprootsystems.com; mche...@infradead.org Cc: davinci-linux-open-sou...@linux.davincidsp.com; Karicheri, Muralidharan Subject: [PATCH - v4 1/4] V4L - vpfe_capture-remove clock and platform code From: Muralidharan Karicheri m-kariche...@ti.com Following changes are done in this patch:- 1) removed the platform code and clk configuration. They are now part of ccdc driver (part of the ccdc patches and platform patches 2-4) 2) Added proper error codes for ccdc register function Reviewed-by: Vaibhav Hiremath hvaib...@ti.com Reviewed-by: Kevin Hilman khil...@deeprootsystems.com Reviewed-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Muralidharan Karicheri m-kariche...@ti.com --- Rebased to latest linux-next tree of v4l-dvb This combines the two patches sent earlier to change the clock configuration and converting ccdc drivers to platform drivers. This has updated comments against v1 of these patches. drivers/media/video/davinci/vpfe_capture.c | 131 +++--- -- 1 files changed, 13 insertions(+), 118 deletions(-) diff --git a/drivers/media/video/davinci/vpfe_capture.c b/drivers/media/video/davinci/vpfe_capture.c index de22bc9..885cd54 100644 --- a/drivers/media/video/davinci/vpfe_capture.c +++ b/drivers/media/video/davinci/vpfe_capture.c @@ -107,9 +107,6 @@ struct ccdc_config { int vpfe_probed; /* name of ccdc device */ char name[32]; -/* for storing mem maps for CCDC */ -int ccdc_addr_size; -void *__iomem ccdc_addr; }; /* data structures */ @@ -229,7 +226,6 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev) BUG_ON(!dev-hw_ops.set_image_window); BUG_ON(!dev-hw_ops.get_image_window); BUG_ON(!dev-hw_ops.get_line_length); -BUG_ON(!dev-hw_ops.setfbaddr); BUG_ON(!dev-hw_ops.getfid); mutex_lock(ccdc_lock); @@ -240,25 +236,23 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev) * walk through it during vpfe probe */ printk(KERN_ERR vpfe capture not initialized\n); -ret = -1; +ret = -EFAULT; goto unlock; } if (strcmp(dev-name, ccdc_cfg-name)) { /* ignore this ccdc */ -ret = -1; +ret = -EINVAL; goto unlock; } if (ccdc_dev) { printk(KERN_ERR ccdc already registered\n); -ret = -1; +ret = -EINVAL; goto unlock; } ccdc_dev = dev; -dev-hw_ops.set_ccdc_base(ccdc_cfg-ccdc_addr, - ccdc_cfg-ccdc_addr_size); unlock: mutex_unlock(ccdc_lock); return ret; @@ -1786,61 +1780,6 @@ static struct vpfe_device *vpfe_initialize(void) return vpfe_dev; } -static void vpfe_disable_clock(struct vpfe_device *vpfe_dev) -{ -struct vpfe_config *vpfe_cfg = vpfe_dev-cfg; - -clk_disable(vpfe_cfg-vpssclk); -clk_put(vpfe_cfg-vpssclk); -clk_disable(vpfe_cfg-slaveclk); -clk_put(vpfe_cfg-slaveclk); -v4l2_info(vpfe_dev-pdev-driver, - vpfe vpss master slave clocks disabled\n); -} - -static int vpfe_enable_clock(struct vpfe_device *vpfe_dev) -{ -struct vpfe_config *vpfe_cfg = vpfe_dev-cfg; -int ret = -ENOENT; - -vpfe_cfg-vpssclk = clk_get(vpfe_dev-pdev, vpss_master); -if (NULL == vpfe_cfg-vpssclk) { -v4l2_err(vpfe_dev-pdev-driver, No clock defined for - vpss_master\n
RE: [PATCH - v4 1/4] V4L - vpfe_capture-remove clock and platform code
Mauro, Could you add patches 1-3 to linux-next ASAP? See the response from Kevin for the arch part. Murali Karicheri Software Design Engineer Texas Instruments Inc. Germantown, MD 20874 phone: 301-407-9583 email: m-kariche...@ti.com -Original Message- From: Kevin Hilman [mailto:khil...@deeprootsystems.com] Sent: Thursday, January 14, 2010 3:48 PM To: Karicheri, Muralidharan Cc: linux-media@vger.kernel.org; hverk...@xs4all.nl; mche...@infradead.org; davinci-linux-open-sou...@linux.davincidsp.com Subject: Re: [PATCH - v4 1/4] V4L - vpfe_capture-remove clock and platform code Karicheri, Muralidharan m-kariche...@ti.com writes: Mauro, Please merge this patches if there are no more comments. Kevin, Could you work with Mauro to merge the arch part as required? This version looks good with me. I'll assume that these are targed for 2.6.34, not 2.6.33-rc fixes window. These appear to be able at least compile independently, so as soon as Mauro/Hans sign-off on them, I wi add PATCH 4/4 to davinci-next so it will be queued for 2.6.34 and be a part of linux-next. Mauro can queue patches 1-3 in his queue for 2.6.34. They will both be in linux-next for testing. Also, I can *temporarily* add patches 1-3 to davinci git so davinci git will have them all while waiting for 2.6.34 merge window. I will then drop them when Mauro's tree merges upstream. Kevin Murali Karicheri Software Design Engineer Texas Instruments Inc. Germantown, MD 20874 phone: 301-407-9583 email: m-kariche...@ti.com -Original Message- From: Karicheri, Muralidharan Sent: Wednesday, January 13, 2010 6:27 PM To: linux-media@vger.kernel.org; hverk...@xs4all.nl; khil...@deeprootsystems.com; mche...@infradead.org Cc: davinci-linux-open-sou...@linux.davincidsp.com; Karicheri, Muralidharan Subject: [PATCH - v4 1/4] V4L - vpfe_capture-remove clock and platform code From: Muralidharan Karicheri m-kariche...@ti.com Following changes are done in this patch:- 1) removed the platform code and clk configuration. They are now part of ccdc driver (part of the ccdc patches and platform patches 2-4) 2) Added proper error codes for ccdc register function Reviewed-by: Vaibhav Hiremath hvaib...@ti.com Reviewed-by: Kevin Hilman khil...@deeprootsystems.com Reviewed-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Muralidharan Karicheri m-kariche...@ti.com --- Rebased to latest linux-next tree of v4l-dvb This combines the two patches sent earlier to change the clock configuration and converting ccdc drivers to platform drivers. This has updated comments against v1 of these patches. drivers/media/video/davinci/vpfe_capture.c | 131 +++--- -- 1 files changed, 13 insertions(+), 118 deletions(-) diff --git a/drivers/media/video/davinci/vpfe_capture.c b/drivers/media/video/davinci/vpfe_capture.c index de22bc9..885cd54 100644 --- a/drivers/media/video/davinci/vpfe_capture.c +++ b/drivers/media/video/davinci/vpfe_capture.c @@ -107,9 +107,6 @@ struct ccdc_config { int vpfe_probed; /* name of ccdc device */ char name[32]; -/* for storing mem maps for CCDC */ -int ccdc_addr_size; -void *__iomem ccdc_addr; }; /* data structures */ @@ -229,7 +226,6 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev) BUG_ON(!dev-hw_ops.set_image_window); BUG_ON(!dev-hw_ops.get_image_window); BUG_ON(!dev-hw_ops.get_line_length); -BUG_ON(!dev-hw_ops.setfbaddr); BUG_ON(!dev-hw_ops.getfid); mutex_lock(ccdc_lock); @@ -240,25 +236,23 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev) * walk through it during vpfe probe */ printk(KERN_ERR vpfe capture not initialized\n); -ret = -1; +ret = -EFAULT; goto unlock; } if (strcmp(dev-name, ccdc_cfg-name)) { /* ignore this ccdc */ -ret = -1; +ret = -EINVAL; goto unlock; } if (ccdc_dev) { printk(KERN_ERR ccdc already registered\n); -ret = -1; +ret = -EINVAL; goto unlock; } ccdc_dev = dev; -dev-hw_ops.set_ccdc_base(ccdc_cfg-ccdc_addr, - ccdc_cfg-ccdc_addr_size); unlock: mutex_unlock(ccdc_lock); return ret; @@ -1786,61 +1780,6 @@ static struct vpfe_device *vpfe_initialize(void) return vpfe_dev; } -static void vpfe_disable_clock(struct vpfe_device *vpfe_dev) -{ -struct vpfe_config *vpfe_cfg = vpfe_dev-cfg; - -clk_disable(vpfe_cfg-vpssclk); -clk_put(vpfe_cfg-vpssclk); -clk_disable(vpfe_cfg-slaveclk); -clk_put(vpfe_cfg-slaveclk); -v4l2_info(vpfe_dev-pdev-driver, - vpfe vpss master slave clocks disabled\n); -} - -static int vpfe_enable_clock(struct vpfe_device *vpfe_dev) -{ -struct vpfe_config *vpfe_cfg = vpfe_dev-cfg; -int ret = -ENOENT; - -vpfe_cfg
[PATCH - v4 1/4] V4L - vpfe_capture-remove clock and platform code
From: Muralidharan Karicheri m-kariche...@ti.com Following changes are done in this patch:- 1) removed the platform code and clk configuration. They are now part of ccdc driver (part of the ccdc patches and platform patches 2-4) 2) Added proper error codes for ccdc register function Reviewed-by: Vaibhav Hiremath hvaib...@ti.com Reviewed-by: Kevin Hilman khil...@deeprootsystems.com Reviewed-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Muralidharan Karicheri m-kariche...@ti.com --- Rebased to latest linux-next tree of v4l-dvb This combines the two patches sent earlier to change the clock configuration and converting ccdc drivers to platform drivers. This has updated comments against v1 of these patches. drivers/media/video/davinci/vpfe_capture.c | 131 +++- 1 files changed, 13 insertions(+), 118 deletions(-) diff --git a/drivers/media/video/davinci/vpfe_capture.c b/drivers/media/video/davinci/vpfe_capture.c index de22bc9..885cd54 100644 --- a/drivers/media/video/davinci/vpfe_capture.c +++ b/drivers/media/video/davinci/vpfe_capture.c @@ -107,9 +107,6 @@ struct ccdc_config { int vpfe_probed; /* name of ccdc device */ char name[32]; - /* for storing mem maps for CCDC */ - int ccdc_addr_size; - void *__iomem ccdc_addr; }; /* data structures */ @@ -229,7 +226,6 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev) BUG_ON(!dev-hw_ops.set_image_window); BUG_ON(!dev-hw_ops.get_image_window); BUG_ON(!dev-hw_ops.get_line_length); - BUG_ON(!dev-hw_ops.setfbaddr); BUG_ON(!dev-hw_ops.getfid); mutex_lock(ccdc_lock); @@ -240,25 +236,23 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev) * walk through it during vpfe probe */ printk(KERN_ERR vpfe capture not initialized\n); - ret = -1; + ret = -EFAULT; goto unlock; } if (strcmp(dev-name, ccdc_cfg-name)) { /* ignore this ccdc */ - ret = -1; + ret = -EINVAL; goto unlock; } if (ccdc_dev) { printk(KERN_ERR ccdc already registered\n); - ret = -1; + ret = -EINVAL; goto unlock; } ccdc_dev = dev; - dev-hw_ops.set_ccdc_base(ccdc_cfg-ccdc_addr, - ccdc_cfg-ccdc_addr_size); unlock: mutex_unlock(ccdc_lock); return ret; @@ -1786,61 +1780,6 @@ static struct vpfe_device *vpfe_initialize(void) return vpfe_dev; } -static void vpfe_disable_clock(struct vpfe_device *vpfe_dev) -{ - struct vpfe_config *vpfe_cfg = vpfe_dev-cfg; - - clk_disable(vpfe_cfg-vpssclk); - clk_put(vpfe_cfg-vpssclk); - clk_disable(vpfe_cfg-slaveclk); - clk_put(vpfe_cfg-slaveclk); - v4l2_info(vpfe_dev-pdev-driver, -vpfe vpss master slave clocks disabled\n); -} - -static int vpfe_enable_clock(struct vpfe_device *vpfe_dev) -{ - struct vpfe_config *vpfe_cfg = vpfe_dev-cfg; - int ret = -ENOENT; - - vpfe_cfg-vpssclk = clk_get(vpfe_dev-pdev, vpss_master); - if (NULL == vpfe_cfg-vpssclk) { - v4l2_err(vpfe_dev-pdev-driver, No clock defined for -vpss_master\n); - return ret; - } - - if (clk_enable(vpfe_cfg-vpssclk)) { - v4l2_err(vpfe_dev-pdev-driver, - vpfe vpss master clock not enabled\n); - goto out; - } - v4l2_info(vpfe_dev-pdev-driver, -vpfe vpss master clock enabled\n); - - vpfe_cfg-slaveclk = clk_get(vpfe_dev-pdev, vpss_slave); - if (NULL == vpfe_cfg-slaveclk) { - v4l2_err(vpfe_dev-pdev-driver, - No clock defined for vpss slave\n); - goto out; - } - - if (clk_enable(vpfe_cfg-slaveclk)) { - v4l2_err(vpfe_dev-pdev-driver, -vpfe vpss slave clock not enabled\n); - goto out; - } - v4l2_info(vpfe_dev-pdev-driver, vpfe vpss slave clock enabled\n); - return 0; -out: - if (vpfe_cfg-vpssclk) - clk_put(vpfe_cfg-vpssclk); - if (vpfe_cfg-slaveclk) - clk_put(vpfe_cfg-slaveclk); - - return -1; -} - /* * vpfe_probe : This function creates device entries by register * itself to the V4L2 driver and initializes fields of each @@ -1870,7 +1809,7 @@ static __init int vpfe_probe(struct platform_device *pdev) if (NULL == pdev-dev.platform_data) { v4l2_err(pdev-dev.driver, Unable to get vpfe config\n); - ret = -ENOENT; + ret = -ENODEV; goto probe_free_dev_mem; } @@ -1884,18 +1823,13 @@ static __init int
RE: [PATCH - v4 1/4] V4L-vpfe_capture-remove-clock and platform code
Murali Karicheri Software Design Engineer Texas Instruments Inc. Germantown, MD 20874 phone: 301-407-9583 email: m-kariche...@ti.com -Original Message- From: Kevin Hilman [mailto:khil...@deeprootsystems.com] Sent: Monday, January 11, 2010 7:17 PM To: Karicheri, Muralidharan Cc: linux-media@vger.kernel.org; mche...@infradead.org; hverk...@xs4all.nl; davinci-linux-open-sou...@linux.davincidsp.com Subject: Re: [PATCH - v4 1/4] V4L-vpfe_capture-remove-clock and platform code m-kariche...@ti.com writes: From: Muralidharan Karicheri m-kariche...@ti.com This combines the two patches sent earlier to change the clock configuration and converting ccdc drivers to platform drivers. This has updated comments against v1 of these patches. This part is also not relevant to the git history, and should be after the '---' In this patch, the clock configuration is moved to ccdc driver since clocks are configured for ccdc. Also adding proper error codes for ccdc register function and removing the ccdc memory resource handling. Also, this doesn't accuratly reflect the changes done in the patch. Here the clock configuration isn't moved, it's removed. You should mention it being removed here and added to platform-specific code in subsequent patches. Sorry to be so nit-picky about the comments, but having a well-written and descriptive changelog is extremely importanty. For the benefit of reading the git history later, and also for those of us less familiar with the details of these drivers, we rely heavily on a good changelog. [MK] I think you are being too picky on these comments :( Besides this was gone through several reviews and I was wondering why you chose to ignore these comments earlier. It was now being sent for merge, not for review. This is really not helping the upstream merge :( Anyways, I will make these changes and send again. Kevin Reviewed-by: Vaibhav Hiremath hvaib...@ti.com Reviewed-by: Kevin Hilman khil...@deeprootsystems.com Reviewed-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Muralidharan Karicheri m-kariche...@ti.com --- Rebased to latest linux-next tree Applies to linux-next tree of v4l-dvb drivers/media/video/davinci/vpfe_capture.c | 131 +++--- -- 1 files changed, 13 insertions(+), 118 deletions(-) diff --git a/drivers/media/video/davinci/vpfe_capture.c b/drivers/media/video/davinci/vpfe_capture.c index de22bc9..885cd54 100644 --- a/drivers/media/video/davinci/vpfe_capture.c +++ b/drivers/media/video/davinci/vpfe_capture.c @@ -107,9 +107,6 @@ struct ccdc_config { int vpfe_probed; /* name of ccdc device */ char name[32]; -/* for storing mem maps for CCDC */ -int ccdc_addr_size; -void *__iomem ccdc_addr; }; /* data structures */ @@ -229,7 +226,6 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev) BUG_ON(!dev-hw_ops.set_image_window); BUG_ON(!dev-hw_ops.get_image_window); BUG_ON(!dev-hw_ops.get_line_length); -BUG_ON(!dev-hw_ops.setfbaddr); BUG_ON(!dev-hw_ops.getfid); mutex_lock(ccdc_lock); @@ -240,25 +236,23 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev) * walk through it during vpfe probe */ printk(KERN_ERR vpfe capture not initialized\n); -ret = -1; +ret = -EFAULT; goto unlock; } if (strcmp(dev-name, ccdc_cfg-name)) { /* ignore this ccdc */ -ret = -1; +ret = -EINVAL; goto unlock; } if (ccdc_dev) { printk(KERN_ERR ccdc already registered\n); -ret = -1; +ret = -EINVAL; goto unlock; } ccdc_dev = dev; -dev-hw_ops.set_ccdc_base(ccdc_cfg-ccdc_addr, - ccdc_cfg-ccdc_addr_size); unlock: mutex_unlock(ccdc_lock); return ret; @@ -1786,61 +1780,6 @@ static struct vpfe_device *vpfe_initialize(void) return vpfe_dev; } -static void vpfe_disable_clock(struct vpfe_device *vpfe_dev) -{ -struct vpfe_config *vpfe_cfg = vpfe_dev-cfg; - -clk_disable(vpfe_cfg-vpssclk); -clk_put(vpfe_cfg-vpssclk); -clk_disable(vpfe_cfg-slaveclk); -clk_put(vpfe_cfg-slaveclk); -v4l2_info(vpfe_dev-pdev-driver, - vpfe vpss master slave clocks disabled\n); -} - -static int vpfe_enable_clock(struct vpfe_device *vpfe_dev) -{ -struct vpfe_config *vpfe_cfg = vpfe_dev-cfg; -int ret = -ENOENT; - -vpfe_cfg-vpssclk = clk_get(vpfe_dev-pdev, vpss_master); -if (NULL == vpfe_cfg-vpssclk) { -v4l2_err(vpfe_dev-pdev-driver, No clock defined for - vpss_master\n); -return ret; -} - -if (clk_enable(vpfe_cfg-vpssclk)) { -v4l2_err(vpfe_dev-pdev-driver, -vpfe vpss master clock not enabled\n
Re: [PATCH - v4 1/4] V4L-vpfe_capture-remove-clock and platform code
Karicheri, Muralidharan m-kariche...@ti.com writes: [...] Also, this doesn't accuratly reflect the changes done in the patch. Here the clock configuration isn't moved, it's removed. You should mention it being removed here and added to platform-specific code in subsequent patches. Sorry to be so nit-picky about the comments, but having a well-written and descriptive changelog is extremely importanty. For the benefit of reading the git history later, and also for those of us less familiar with the details of these drivers, we rely heavily on a good changelog. [MK] I think you are being too picky on these comments :( Part of my role is to be picky. ;) Besides this was gone through several reviews and I was wondering why you chose to ignore these comments earlier. It was now being sent for merge, not for review. I did not do a detailed review in the earlier versions because I was leaving this to be thoroughly reviewed by linux-media folks. However, with all the clock issues, I decided to give it a more thorough review, and I found the changelogs to not be helpful in understanding the patches. The linux-media maintainers are certainly free to merge the stuff with the current confusing changelog, but I would not recommend it. This is really not helping the upstream merge :( Well, it may be taking a bit longer, but it is helping the quality of the changes that are eventually merged upstream. Anyways, I will make these changes and send again. Thanks, Kevin -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH - v4 1/4] V4L-vpfe_capture-remove-clock and platform code
From: Muralidharan Karicheri m-kariche...@ti.com Rebased to latest linux-next tree This combines the two patches sent earlier to change the clock configuration and converting ccdc drivers to platform drivers. This has updated comments against v1 of these patches. In this patch, the clock configuration is moved to ccdc driver since clocks are configured for ccdc. Also adding proper error codes for ccdc register function and removing the ccdc memory resource handling. Reviewed-by: Vaibhav Hiremath hvaib...@ti.com Reviewed-by: Kevin Hilman khil...@deeprootsystems.com Reviewed-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Muralidharan Karicheri m-kariche...@ti.com --- Applies to linux-next tree of v4l-dvb drivers/media/video/davinci/vpfe_capture.c | 131 +++- 1 files changed, 13 insertions(+), 118 deletions(-) diff --git a/drivers/media/video/davinci/vpfe_capture.c b/drivers/media/video/davinci/vpfe_capture.c index de22bc9..885cd54 100644 --- a/drivers/media/video/davinci/vpfe_capture.c +++ b/drivers/media/video/davinci/vpfe_capture.c @@ -107,9 +107,6 @@ struct ccdc_config { int vpfe_probed; /* name of ccdc device */ char name[32]; - /* for storing mem maps for CCDC */ - int ccdc_addr_size; - void *__iomem ccdc_addr; }; /* data structures */ @@ -229,7 +226,6 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev) BUG_ON(!dev-hw_ops.set_image_window); BUG_ON(!dev-hw_ops.get_image_window); BUG_ON(!dev-hw_ops.get_line_length); - BUG_ON(!dev-hw_ops.setfbaddr); BUG_ON(!dev-hw_ops.getfid); mutex_lock(ccdc_lock); @@ -240,25 +236,23 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev) * walk through it during vpfe probe */ printk(KERN_ERR vpfe capture not initialized\n); - ret = -1; + ret = -EFAULT; goto unlock; } if (strcmp(dev-name, ccdc_cfg-name)) { /* ignore this ccdc */ - ret = -1; + ret = -EINVAL; goto unlock; } if (ccdc_dev) { printk(KERN_ERR ccdc already registered\n); - ret = -1; + ret = -EINVAL; goto unlock; } ccdc_dev = dev; - dev-hw_ops.set_ccdc_base(ccdc_cfg-ccdc_addr, - ccdc_cfg-ccdc_addr_size); unlock: mutex_unlock(ccdc_lock); return ret; @@ -1786,61 +1780,6 @@ static struct vpfe_device *vpfe_initialize(void) return vpfe_dev; } -static void vpfe_disable_clock(struct vpfe_device *vpfe_dev) -{ - struct vpfe_config *vpfe_cfg = vpfe_dev-cfg; - - clk_disable(vpfe_cfg-vpssclk); - clk_put(vpfe_cfg-vpssclk); - clk_disable(vpfe_cfg-slaveclk); - clk_put(vpfe_cfg-slaveclk); - v4l2_info(vpfe_dev-pdev-driver, -vpfe vpss master slave clocks disabled\n); -} - -static int vpfe_enable_clock(struct vpfe_device *vpfe_dev) -{ - struct vpfe_config *vpfe_cfg = vpfe_dev-cfg; - int ret = -ENOENT; - - vpfe_cfg-vpssclk = clk_get(vpfe_dev-pdev, vpss_master); - if (NULL == vpfe_cfg-vpssclk) { - v4l2_err(vpfe_dev-pdev-driver, No clock defined for -vpss_master\n); - return ret; - } - - if (clk_enable(vpfe_cfg-vpssclk)) { - v4l2_err(vpfe_dev-pdev-driver, - vpfe vpss master clock not enabled\n); - goto out; - } - v4l2_info(vpfe_dev-pdev-driver, -vpfe vpss master clock enabled\n); - - vpfe_cfg-slaveclk = clk_get(vpfe_dev-pdev, vpss_slave); - if (NULL == vpfe_cfg-slaveclk) { - v4l2_err(vpfe_dev-pdev-driver, - No clock defined for vpss slave\n); - goto out; - } - - if (clk_enable(vpfe_cfg-slaveclk)) { - v4l2_err(vpfe_dev-pdev-driver, -vpfe vpss slave clock not enabled\n); - goto out; - } - v4l2_info(vpfe_dev-pdev-driver, vpfe vpss slave clock enabled\n); - return 0; -out: - if (vpfe_cfg-vpssclk) - clk_put(vpfe_cfg-vpssclk); - if (vpfe_cfg-slaveclk) - clk_put(vpfe_cfg-slaveclk); - - return -1; -} - /* * vpfe_probe : This function creates device entries by register * itself to the V4L2 driver and initializes fields of each @@ -1870,7 +1809,7 @@ static __init int vpfe_probe(struct platform_device *pdev) if (NULL == pdev-dev.platform_data) { v4l2_err(pdev-dev.driver, Unable to get vpfe config\n); - ret = -ENOENT; + ret = -ENODEV; goto probe_free_dev_mem; } @@ -1884,18 +1823,13 @@ static __init int vpfe_probe(struct platform_device *pdev)
RE: [PATCH - v4 1/4] V4L-vpfe_capture-remove-clock and platform code
Hi Mauro Kevin, I am re-sending these patches to do following:- 1) arch patches are re-created based on Linus tree 2) V4l patches are rebased to latest linux-next tree These patches will override the pull request from Hans. I am trying to setup mercurial to send the pull request, but will take few more days to be fully functional. Meanwhile please merge the attached patches. The kernel upstream tree is at 2.6.33.rc3. We have a bunch of patches planned for 2.6.34. So please start merging these patches to the linux-next so that they can make to 2.6.34. You might have seen a bunch of patches from Vaibhav as well that is being reviewed on the list. Regarding the merge of arch patches, I would let Kevin to comment on how to handle the merge. I have re-created the arch patches against the Linus tree as per Kevin's suggestion. Thanks. Murali Karicheri Software Design Engineer Texas Instruments Inc. Germantown, MD 20874 phone: 301-407-9583 email: m-kariche...@ti.com -Original Message- From: Karicheri, Muralidharan Sent: Monday, January 11, 2010 2:23 PM To: linux-media@vger.kernel.org; khil...@deeprootsystems.com; mche...@infradead.org Cc: hverk...@xs4all.nl; davinci-linux-open-sou...@linux.davincidsp.com; Karicheri, Muralidharan Subject: [PATCH - v4 1/4] V4L-vpfe_capture-remove-clock and platform code From: Muralidharan Karicheri m-kariche...@ti.com Rebased to latest linux-next tree This combines the two patches sent earlier to change the clock configuration and converting ccdc drivers to platform drivers. This has updated comments against v1 of these patches. In this patch, the clock configuration is moved to ccdc driver since clocks are configured for ccdc. Also adding proper error codes for ccdc register function and removing the ccdc memory resource handling. Reviewed-by: Vaibhav Hiremath hvaib...@ti.com Reviewed-by: Kevin Hilman khil...@deeprootsystems.com Reviewed-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Muralidharan Karicheri m-kariche...@ti.com --- Applies to linux-next tree of v4l-dvb drivers/media/video/davinci/vpfe_capture.c | 131 +++- 1 files changed, 13 insertions(+), 118 deletions(-) diff --git a/drivers/media/video/davinci/vpfe_capture.c b/drivers/media/video/davinci/vpfe_capture.c index de22bc9..885cd54 100644 --- a/drivers/media/video/davinci/vpfe_capture.c +++ b/drivers/media/video/davinci/vpfe_capture.c @@ -107,9 +107,6 @@ struct ccdc_config { int vpfe_probed; /* name of ccdc device */ char name[32]; - /* for storing mem maps for CCDC */ - int ccdc_addr_size; - void *__iomem ccdc_addr; }; /* data structures */ @@ -229,7 +226,6 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev) BUG_ON(!dev-hw_ops.set_image_window); BUG_ON(!dev-hw_ops.get_image_window); BUG_ON(!dev-hw_ops.get_line_length); - BUG_ON(!dev-hw_ops.setfbaddr); BUG_ON(!dev-hw_ops.getfid); mutex_lock(ccdc_lock); @@ -240,25 +236,23 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev) * walk through it during vpfe probe */ printk(KERN_ERR vpfe capture not initialized\n); - ret = -1; + ret = -EFAULT; goto unlock; } if (strcmp(dev-name, ccdc_cfg-name)) { /* ignore this ccdc */ - ret = -1; + ret = -EINVAL; goto unlock; } if (ccdc_dev) { printk(KERN_ERR ccdc already registered\n); - ret = -1; + ret = -EINVAL; goto unlock; } ccdc_dev = dev; - dev-hw_ops.set_ccdc_base(ccdc_cfg-ccdc_addr, -ccdc_cfg-ccdc_addr_size); unlock: mutex_unlock(ccdc_lock); return ret; @@ -1786,61 +1780,6 @@ static struct vpfe_device *vpfe_initialize(void) return vpfe_dev; } -static void vpfe_disable_clock(struct vpfe_device *vpfe_dev) -{ - struct vpfe_config *vpfe_cfg = vpfe_dev-cfg; - - clk_disable(vpfe_cfg-vpssclk); - clk_put(vpfe_cfg-vpssclk); - clk_disable(vpfe_cfg-slaveclk); - clk_put(vpfe_cfg-slaveclk); - v4l2_info(vpfe_dev-pdev-driver, - vpfe vpss master slave clocks disabled\n); -} - -static int vpfe_enable_clock(struct vpfe_device *vpfe_dev) -{ - struct vpfe_config *vpfe_cfg = vpfe_dev-cfg; - int ret = -ENOENT; - - vpfe_cfg-vpssclk = clk_get(vpfe_dev-pdev, vpss_master); - if (NULL == vpfe_cfg-vpssclk) { - v4l2_err(vpfe_dev-pdev-driver, No clock defined for - vpss_master\n); - return ret; - } - - if (clk_enable(vpfe_cfg-vpssclk)) { - v4l2_err(vpfe_dev-pdev-driver, - vpfe vpss master clock not enabled\n); - goto out; - } - v4l2_info(vpfe_dev-pdev-driver, - vpfe vpss
[PATCH - v4 1/4] V4L-vpfe_capture-remove-clock and platform code
From: Muralidharan Karicheri m-kariche...@ti.com This combines the two patches sent earlier to change the clock configuration and converting ccdc drivers to platform drivers. This has updated comments against v1 of these patches. In this patch, the clock configuration is moved to ccdc driver since clocks are configured for ccdc. Also adding proper error codes for ccdc register function and removing the ccdc memory resource handling. Reviewed-by: Vaibhav Hiremath hvaib...@ti.com Reviewed-by: Kevin Hilman khil...@deeprootsystems.com Reviewed-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Muralidharan Karicheri m-kariche...@ti.com --- Rebased to latest linux-next tree Applies to linux-next tree of v4l-dvb drivers/media/video/davinci/vpfe_capture.c | 131 +++- 1 files changed, 13 insertions(+), 118 deletions(-) diff --git a/drivers/media/video/davinci/vpfe_capture.c b/drivers/media/video/davinci/vpfe_capture.c index de22bc9..885cd54 100644 --- a/drivers/media/video/davinci/vpfe_capture.c +++ b/drivers/media/video/davinci/vpfe_capture.c @@ -107,9 +107,6 @@ struct ccdc_config { int vpfe_probed; /* name of ccdc device */ char name[32]; - /* for storing mem maps for CCDC */ - int ccdc_addr_size; - void *__iomem ccdc_addr; }; /* data structures */ @@ -229,7 +226,6 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev) BUG_ON(!dev-hw_ops.set_image_window); BUG_ON(!dev-hw_ops.get_image_window); BUG_ON(!dev-hw_ops.get_line_length); - BUG_ON(!dev-hw_ops.setfbaddr); BUG_ON(!dev-hw_ops.getfid); mutex_lock(ccdc_lock); @@ -240,25 +236,23 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev) * walk through it during vpfe probe */ printk(KERN_ERR vpfe capture not initialized\n); - ret = -1; + ret = -EFAULT; goto unlock; } if (strcmp(dev-name, ccdc_cfg-name)) { /* ignore this ccdc */ - ret = -1; + ret = -EINVAL; goto unlock; } if (ccdc_dev) { printk(KERN_ERR ccdc already registered\n); - ret = -1; + ret = -EINVAL; goto unlock; } ccdc_dev = dev; - dev-hw_ops.set_ccdc_base(ccdc_cfg-ccdc_addr, - ccdc_cfg-ccdc_addr_size); unlock: mutex_unlock(ccdc_lock); return ret; @@ -1786,61 +1780,6 @@ static struct vpfe_device *vpfe_initialize(void) return vpfe_dev; } -static void vpfe_disable_clock(struct vpfe_device *vpfe_dev) -{ - struct vpfe_config *vpfe_cfg = vpfe_dev-cfg; - - clk_disable(vpfe_cfg-vpssclk); - clk_put(vpfe_cfg-vpssclk); - clk_disable(vpfe_cfg-slaveclk); - clk_put(vpfe_cfg-slaveclk); - v4l2_info(vpfe_dev-pdev-driver, -vpfe vpss master slave clocks disabled\n); -} - -static int vpfe_enable_clock(struct vpfe_device *vpfe_dev) -{ - struct vpfe_config *vpfe_cfg = vpfe_dev-cfg; - int ret = -ENOENT; - - vpfe_cfg-vpssclk = clk_get(vpfe_dev-pdev, vpss_master); - if (NULL == vpfe_cfg-vpssclk) { - v4l2_err(vpfe_dev-pdev-driver, No clock defined for -vpss_master\n); - return ret; - } - - if (clk_enable(vpfe_cfg-vpssclk)) { - v4l2_err(vpfe_dev-pdev-driver, - vpfe vpss master clock not enabled\n); - goto out; - } - v4l2_info(vpfe_dev-pdev-driver, -vpfe vpss master clock enabled\n); - - vpfe_cfg-slaveclk = clk_get(vpfe_dev-pdev, vpss_slave); - if (NULL == vpfe_cfg-slaveclk) { - v4l2_err(vpfe_dev-pdev-driver, - No clock defined for vpss slave\n); - goto out; - } - - if (clk_enable(vpfe_cfg-slaveclk)) { - v4l2_err(vpfe_dev-pdev-driver, -vpfe vpss slave clock not enabled\n); - goto out; - } - v4l2_info(vpfe_dev-pdev-driver, vpfe vpss slave clock enabled\n); - return 0; -out: - if (vpfe_cfg-vpssclk) - clk_put(vpfe_cfg-vpssclk); - if (vpfe_cfg-slaveclk) - clk_put(vpfe_cfg-slaveclk); - - return -1; -} - /* * vpfe_probe : This function creates device entries by register * itself to the V4L2 driver and initializes fields of each @@ -1870,7 +1809,7 @@ static __init int vpfe_probe(struct platform_device *pdev) if (NULL == pdev-dev.platform_data) { v4l2_err(pdev-dev.driver, Unable to get vpfe config\n); - ret = -ENOENT; + ret = -ENODEV; goto probe_free_dev_mem; } @@ -1884,18 +1823,13 @@ static __init int vpfe_probe(struct platform_device *pdev)
Re: [PATCH - v4 1/4] V4L-vpfe_capture-remove-clock and platform code
m-kariche...@ti.com writes: From: Muralidharan Karicheri m-kariche...@ti.com This combines the two patches sent earlier to change the clock configuration and converting ccdc drivers to platform drivers. This has updated comments against v1 of these patches. This part is also not relevant to the git history, and should be after the '---' In this patch, the clock configuration is moved to ccdc driver since clocks are configured for ccdc. Also adding proper error codes for ccdc register function and removing the ccdc memory resource handling. Also, this doesn't accuratly reflect the changes done in the patch. Here the clock configuration isn't moved, it's removed. You should mention it being removed here and added to platform-specific code in subsequent patches. Sorry to be so nit-picky about the comments, but having a well-written and descriptive changelog is extremely importanty. For the benefit of reading the git history later, and also for those of us less familiar with the details of these drivers, we rely heavily on a good changelog. Kevin Reviewed-by: Vaibhav Hiremath hvaib...@ti.com Reviewed-by: Kevin Hilman khil...@deeprootsystems.com Reviewed-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Muralidharan Karicheri m-kariche...@ti.com --- Rebased to latest linux-next tree Applies to linux-next tree of v4l-dvb drivers/media/video/davinci/vpfe_capture.c | 131 +++- 1 files changed, 13 insertions(+), 118 deletions(-) diff --git a/drivers/media/video/davinci/vpfe_capture.c b/drivers/media/video/davinci/vpfe_capture.c index de22bc9..885cd54 100644 --- a/drivers/media/video/davinci/vpfe_capture.c +++ b/drivers/media/video/davinci/vpfe_capture.c @@ -107,9 +107,6 @@ struct ccdc_config { int vpfe_probed; /* name of ccdc device */ char name[32]; - /* for storing mem maps for CCDC */ - int ccdc_addr_size; - void *__iomem ccdc_addr; }; /* data structures */ @@ -229,7 +226,6 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev) BUG_ON(!dev-hw_ops.set_image_window); BUG_ON(!dev-hw_ops.get_image_window); BUG_ON(!dev-hw_ops.get_line_length); - BUG_ON(!dev-hw_ops.setfbaddr); BUG_ON(!dev-hw_ops.getfid); mutex_lock(ccdc_lock); @@ -240,25 +236,23 @@ int vpfe_register_ccdc_device(struct ccdc_hw_device *dev) * walk through it during vpfe probe */ printk(KERN_ERR vpfe capture not initialized\n); - ret = -1; + ret = -EFAULT; goto unlock; } if (strcmp(dev-name, ccdc_cfg-name)) { /* ignore this ccdc */ - ret = -1; + ret = -EINVAL; goto unlock; } if (ccdc_dev) { printk(KERN_ERR ccdc already registered\n); - ret = -1; + ret = -EINVAL; goto unlock; } ccdc_dev = dev; - dev-hw_ops.set_ccdc_base(ccdc_cfg-ccdc_addr, - ccdc_cfg-ccdc_addr_size); unlock: mutex_unlock(ccdc_lock); return ret; @@ -1786,61 +1780,6 @@ static struct vpfe_device *vpfe_initialize(void) return vpfe_dev; } -static void vpfe_disable_clock(struct vpfe_device *vpfe_dev) -{ - struct vpfe_config *vpfe_cfg = vpfe_dev-cfg; - - clk_disable(vpfe_cfg-vpssclk); - clk_put(vpfe_cfg-vpssclk); - clk_disable(vpfe_cfg-slaveclk); - clk_put(vpfe_cfg-slaveclk); - v4l2_info(vpfe_dev-pdev-driver, - vpfe vpss master slave clocks disabled\n); -} - -static int vpfe_enable_clock(struct vpfe_device *vpfe_dev) -{ - struct vpfe_config *vpfe_cfg = vpfe_dev-cfg; - int ret = -ENOENT; - - vpfe_cfg-vpssclk = clk_get(vpfe_dev-pdev, vpss_master); - if (NULL == vpfe_cfg-vpssclk) { - v4l2_err(vpfe_dev-pdev-driver, No clock defined for - vpss_master\n); - return ret; - } - - if (clk_enable(vpfe_cfg-vpssclk)) { - v4l2_err(vpfe_dev-pdev-driver, - vpfe vpss master clock not enabled\n); - goto out; - } - v4l2_info(vpfe_dev-pdev-driver, - vpfe vpss master clock enabled\n); - - vpfe_cfg-slaveclk = clk_get(vpfe_dev-pdev, vpss_slave); - if (NULL == vpfe_cfg-slaveclk) { - v4l2_err(vpfe_dev-pdev-driver, - No clock defined for vpss slave\n); - goto out; - } - - if (clk_enable(vpfe_cfg-slaveclk)) { - v4l2_err(vpfe_dev-pdev-driver, - vpfe vpss slave clock not enabled\n); - goto out; - } - v4l2_info(vpfe_dev-pdev-driver, vpfe vpss slave clock enabled\n); - return 0; -out: - if (vpfe_cfg-vpssclk) - clk_put(vpfe_cfg-vpssclk); - if