linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* usb: host: ohci: fix sfr kernel warning in ohci-at91 driver
@ 2018-05-25 22:04 Prasanthi Chellakumar
  0 siblings, 0 replies; 3+ messages in thread
From: Prasanthi Chellakumar @ 2018-05-25 22:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Prasanthi Chellakumar, Alan Stern, Greg Kroah-Hartman, linux-usb

The USB Host Controller driver 'ohci-at91.c' reads a Special Function
Register - OHCI Interrupt Configuration Register (AT91_SFR_OHCIICR)
for bits SUSPEND_A/B/C. These bits are defined in sama5d2 alone, so
sfr register mapping is done with compatible string "atmel,sama5d2-sfr".
This gives a kernel warning 'failed to find sfr node' with non sama5d2
cpus which is removed here, thus leaving it up to having a proper DTS.

Signed-off-by: Prasanthi Chellakumar <prasanthi.chellakumar@microchip.com>
---

The AT91_SFR_OHCIIR register is read for USB suspend and wake
up control. The OHCI driver has a sfr register mapping for sama5d2
alone. The USB suspend proceeds only when there is valid sfr regmap.
So SFR access in boards that it is absent is not required. In such
boards, USB suspend control requests is processed by usb_hub_control().
But there is a kernel warning with non sama5d2 cpus. This patch fixes
the kernel warning, changing to debug message(dev_dbg).
---
 drivers/usb/host/ohci-at91.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index af0566d..ce11c47 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -214,7 +214,7 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
 
 	ohci_at91->sfr_regmap = at91_dt_syscon_sfr();
 	if (!ohci_at91->sfr_regmap)
-		dev_warn(dev, "failed to find sfr node\n");
+		dev_dbg(dev, "failed to find sfr node\n");
 
 	board = hcd->self.controller->platform_data;
 	ohci = hcd_to_ohci(hcd);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* usb: host: ohci: fix sfr kernel warning in ohci-at91 driver
@ 2018-05-29 18:56 Alan Stern
  0 siblings, 0 replies; 3+ messages in thread
From: Alan Stern @ 2018-05-29 18:56 UTC (permalink / raw)
  To: Prasanthi Chellakumar; +Cc: linux-kernel, Greg Kroah-Hartman, linux-usb

On Fri, 25 May 2018, Prasanthi Chellakumar wrote:

> The USB Host Controller driver 'ohci-at91.c' reads a Special Function
> Register - OHCI Interrupt Configuration Register (AT91_SFR_OHCIICR)
> for bits SUSPEND_A/B/C. These bits are defined in sama5d2 alone, so
> sfr register mapping is done with compatible string "atmel,sama5d2-sfr".
> This gives a kernel warning 'failed to find sfr node' with non sama5d2
> cpus which is removed here, thus leaving it up to having a proper DTS.
> 
> Signed-off-by: Prasanthi Chellakumar <prasanthi.chellakumar@microchip.com>
> 
> ---
> 
> The AT91_SFR_OHCIIR register is read for USB suspend and wake
> up control. The OHCI driver has a sfr register mapping for sama5d2
> alone. The USB suspend proceeds only when there is valid sfr regmap.
> So SFR access in boards that it is absent is not required. In such
> boards, USB suspend control requests is processed by usb_hub_control().
> But there is a kernel warning with non sama5d2 cpus. This patch fixes
> the kernel warning, changing to debug message(dev_dbg).
> ---
>  drivers/usb/host/ohci-at91.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
> index af0566d..ce11c47 100644
> --- a/drivers/usb/host/ohci-at91.c
> +++ b/drivers/usb/host/ohci-at91.c
> @@ -214,7 +214,7 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
>  
>  	ohci_at91->sfr_regmap = at91_dt_syscon_sfr();
>  	if (!ohci_at91->sfr_regmap)
> -		dev_warn(dev, "failed to find sfr node\n");
> +		dev_dbg(dev, "failed to find sfr node\n");
>  
>  	board = hcd->self.controller->platform_data;
>  	ohci = hcd_to_ohci(hcd);

Acked-by: Alan Stern <stern@rowland.harvard.edu>
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* usb: host: ohci: fix sfr kernel warning in ohci-at91 driver
@ 2018-05-31  9:15 Nicolas Ferre
  0 siblings, 0 replies; 3+ messages in thread
From: Nicolas Ferre @ 2018-05-31  9:15 UTC (permalink / raw)
  To: Prasanthi Chellakumar, linux-kernel, Alan Stern,
	Greg Kroah-Hartman
  Cc: linux-usb, linux-arm-kernel

On 26/05/2018 at 00:04, Prasanthi Chellakumar wrote:
> The USB Host Controller driver 'ohci-at91.c' reads a Special Function
> Register - OHCI Interrupt Configuration Register (AT91_SFR_OHCIICR)
> for bits SUSPEND_A/B/C. These bits are defined in sama5d2 alone, so
> sfr register mapping is done with compatible string "atmel,sama5d2-sfr".
> This gives a kernel warning 'failed to find sfr node' with non sama5d2
> cpus which is removed here, thus leaving it up to having a proper DTS.
> 
> Signed-off-by: Prasanthi Chellakumar <prasanthi.chellakumar@microchip.com>
> Acked-by: Alan Stern <stern@rowland.harvard.edu>

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

Thanks Prasanthi. Best regards,
   Nicolas

> ---
> 
> The AT91_SFR_OHCIIR register is read for USB suspend and wake
> up control. The OHCI driver has a sfr register mapping for sama5d2
> alone. The USB suspend proceeds only when there is valid sfr regmap.
> So SFR access in boards that it is absent is not required. In such
> boards, USB suspend control requests is processed by usb_hub_control().
> But there is a kernel warning with non sama5d2 cpus. This patch fixes
> the kernel warning, changing to debug message(dev_dbg).
> ---
>   drivers/usb/host/ohci-at91.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
> index af0566d..ce11c47 100644
> --- a/drivers/usb/host/ohci-at91.c
> +++ b/drivers/usb/host/ohci-at91.c
> @@ -214,7 +214,7 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
>   
>   	ohci_at91->sfr_regmap = at91_dt_syscon_sfr();
>   	if (!ohci_at91->sfr_regmap)
> -		dev_warn(dev, "failed to find sfr node\n");
> +		dev_dbg(dev, "failed to find sfr node\n");
>   
>   	board = hcd->self.controller->platform_data;
>   	ohci = hcd_to_ohci(hcd);
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-31  9:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-25 22:04 usb: host: ohci: fix sfr kernel warning in ohci-at91 driver Prasanthi Chellakumar
  -- strict thread matches above, loose matches on Subject: below --
2018-05-29 18:56 Alan Stern
2018-05-31  9:15 Nicolas Ferre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).