Message ID | 1411424546-12718-1-git-send-email-srinivas.kandagatla@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Srini, On Mon, 22 Sep 2014, Srinivas Kandagatla wrote: > This patch fixes a compilation error while building with the > random kernel configuration. > > drivers/media/rc/st_rc.c: In function 'st_rc_probe': > drivers/media/rc/st_rc.c:281:2: error: implicit declaration of > function 'reset_control_get' [-Werror=implicit-function-declaration] > rc_dev->rstc = reset_control_get(dev, NULL); > > drivers/media/rc/st_rc.c:281:15: warning: assignment makes pointer > from integer without a cast [enabled by default] > rc_dev->rstc = reset_control_get(dev, NULL); Is managing the reset line actually optional though? I can't test atm as I don't have access to my board, but quite often if the IP's aren't taken out of reset reads / writes to the perhpiheral will hang the SoC. If managing the reset line isn't optional then I think the correct fix is to add depends on RESET_CONTROLLER in the kconfig. This will then do the right thing for randconfig builds as well. regards, Peter.
Hi Pete, On 23/09/14 19:02, Peter Griffin wrote: > Hi Srini, > > On Mon, 22 Sep 2014, Srinivas Kandagatla wrote: > >> This patch fixes a compilation error while building with the >> random kernel configuration. >> >> drivers/media/rc/st_rc.c: In function 'st_rc_probe': >> drivers/media/rc/st_rc.c:281:2: error: implicit declaration of >> function 'reset_control_get' [-Werror=implicit-function-declaration] >> rc_dev->rstc = reset_control_get(dev, NULL); >> >> drivers/media/rc/st_rc.c:281:15: warning: assignment makes pointer >> from integer without a cast [enabled by default] >> rc_dev->rstc = reset_control_get(dev, NULL); > > Is managing the reset line actually optional though? I can't test atm as I don't have > access to my board, but quite often if the IP's aren't taken out of reset reads / writes > to the perhpiheral will hang the SoC. > Yes and No. AFAIK reset line is optional on SOCs like 7108, 7141. I think having the driver function without reset might is a value add in case we plan to reuse the mainline driver for these SOCs. On latest ARM SOCs with SBC the IRB IP is moved to SBC and held in reset. Am not sure, if the reset line is optional in next generation SOCs? > If managing the reset line isn't optional then I think the correct fix is to add > depends on RESET_CONTROLLER in the kconfig. I agree. This would make the COMPILE_TEST less useful though. thanks, srini > > This will then do the right thing for randconfig builds as well. > > regards, > > Peter. >
Hi Srini, Peter, On 09/24/2014 10:12 AM, Srinivas Kandagatla wrote: > Hi Pete, > > On 23/09/14 19:02, Peter Griffin wrote: >> Hi Srini, >> >> On Mon, 22 Sep 2014, Srinivas Kandagatla wrote: >> >>> This patch fixes a compilation error while building with the >>> random kernel configuration. >>> >>> drivers/media/rc/st_rc.c: In function 'st_rc_probe': >>> drivers/media/rc/st_rc.c:281:2: error: implicit declaration of >>> function 'reset_control_get' [-Werror=implicit-function-declaration] >>> rc_dev->rstc = reset_control_get(dev, NULL); >>> >>> drivers/media/rc/st_rc.c:281:15: warning: assignment makes pointer >>> from integer without a cast [enabled by default] >>> rc_dev->rstc = reset_control_get(dev, NULL); >> >> Is managing the reset line actually optional though? I can't test atm >> as I don't have >> access to my board, but quite often if the IP's aren't taken out of >> reset reads / writes >> to the perhpiheral will hang the SoC. >> > Yes and No. > AFAIK reset line is optional on SOCs like 7108, 7141. > I think having the driver function without reset might is a value add in > case we plan to reuse the mainline driver for these SOCs. > > On latest ARM SOCs with SBC the IRB IP is moved to SBC and held in reset. > Am not sure, if the reset line is optional in next generation SOCs? I don't know for next SoCs, but I think it makes sense to make it optional. Regards, Maxime > >> If managing the reset line isn't optional then I think the correct fix >> is to add >> depends on RESET_CONTROLLER in the kconfig. > I agree. > This would make the COMPILE_TEST less useful though. > > > thanks, > srini >> >> This will then do the right thing for randconfig builds as well. >> >> regards, >> >> Peter. >> > > _______________________________________________ > Kernel mailing list > Kernel@stlinux.com > http://www.stlinux.com/mailman/listinfo/kernel
Hi Srini, Sorry seems I never replied to this. > >>drivers/media/rc/st_rc.c:281:15: warning: assignment makes pointer > >>from integer without a cast [enabled by default] > >> rc_dev->rstc = reset_control_get(dev, NULL); > > > >Is managing the reset line actually optional though? I can't test atm as I don't have > >access to my board, but quite often if the IP's aren't taken out of reset reads / writes > >to the perhpiheral will hang the SoC. > > > Yes and No. > AFAIK reset line is optional on SOCs like 7108, 7141. > I think having the driver function without reset might is a value > add in case we plan to reuse the mainline driver for these SOCs. Yes that is a good point, for the series: - Acked-by: Peter Griffin <peter.griffin@linaro.org> regards, Peter.
diff --git a/drivers/media/rc/st_rc.c b/drivers/media/rc/st_rc.c index 5c15135..e0f1312 100644 --- a/drivers/media/rc/st_rc.c +++ b/drivers/media/rc/st_rc.c @@ -278,7 +278,7 @@ static int st_rc_probe(struct platform_device *pdev) rc_dev->rx_base = rc_dev->base; - rc_dev->rstc = reset_control_get(dev, NULL); + rc_dev->rstc = reset_control_get_optional(dev, NULL); if (IS_ERR(rc_dev->rstc)) rc_dev->rstc = NULL;
This patch fixes a compilation error while building with the random kernel configuration. drivers/media/rc/st_rc.c: In function 'st_rc_probe': drivers/media/rc/st_rc.c:281:2: error: implicit declaration of function 'reset_control_get' [-Werror=implicit-function-declaration] rc_dev->rstc = reset_control_get(dev, NULL); drivers/media/rc/st_rc.c:281:15: warning: assignment makes pointer from integer without a cast [enabled by default] rc_dev->rstc = reset_control_get(dev, NULL); Reported-by: Jim Davis <jim.epost@gmail.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> --- drivers/media/rc/st_rc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)