All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] of/address: Don't throw errors on absent ranges properties
@ 2014-11-14  6:58 ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2014-11-14  6:58 UTC (permalink / raw)
  To: Grant Likely; +Cc: Rob Herring, devicetree, linux-kernel

The core always tries to translate any "reg" property to construct the platform
device names. This results in a pile of "OF: no ranges; cannot translate" errors
in dmesg whenever we expose things like i2c devices that cannot directly translate
to the MMIO space.

Turn this into a pr_debug instead

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

diff --git a/drivers/of/address.c b/drivers/of/address.c
index f0541fd..bf1f79d 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -444,7 +444,7 @@ static int of_translate_one(struct device_node *parent, struct of_bus *bus,
 	 */
 	ranges = of_get_property(parent, rprop, &rlen);
 	if (ranges == NULL && !of_empty_ranges_quirk()) {
-		pr_err("OF: no ranges; cannot translate\n");
+		pr_debug("OF: no ranges; cannot translate\n");
 		return 1;
 	}
 	if (ranges == NULL || rlen == 0) {



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

* [PATCH] of/address: Don't throw errors on absent ranges properties
@ 2014-11-14  6:58 ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2014-11-14  6:58 UTC (permalink / raw)
  To: Grant Likely
  Cc: Rob Herring, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

The core always tries to translate any "reg" property to construct the platform
device names. This results in a pile of "OF: no ranges; cannot translate" errors
in dmesg whenever we expose things like i2c devices that cannot directly translate
to the MMIO space.

Turn this into a pr_debug instead

Signed-off-by: Benjamin Herrenschmidt <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>

diff --git a/drivers/of/address.c b/drivers/of/address.c
index f0541fd..bf1f79d 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -444,7 +444,7 @@ static int of_translate_one(struct device_node *parent, struct of_bus *bus,
 	 */
 	ranges = of_get_property(parent, rprop, &rlen);
 	if (ranges == NULL && !of_empty_ranges_quirk()) {
-		pr_err("OF: no ranges; cannot translate\n");
+		pr_debug("OF: no ranges; cannot translate\n");
 		return 1;
 	}
 	if (ranges == NULL || rlen == 0) {


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] of/address: Don't throw errors on absent ranges properties
  2014-11-14  6:58 ` Benjamin Herrenschmidt
  (?)
@ 2014-11-18 16:57 ` Grant Likely
  2014-11-19  2:32     ` Benjamin Herrenschmidt
  -1 siblings, 1 reply; 8+ messages in thread
From: Grant Likely @ 2014-11-18 16:57 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: Rob Herring, devicetree, linux-kernel

On Fri, 14 Nov 2014 17:58:23 +1100
, Benjamin Herrenschmidt <benh@kernel.crashing.org>
 wrote:
> The core always tries to translate any "reg" property to construct the platform
> device names. This results in a pile of "OF: no ranges; cannot translate" errors
> in dmesg whenever we expose things like i2c devices that cannot directly translate
> to the MMIO space.

I don't have a problem with the change, but it seems to be catching an
odd usage of of_device_make_bus_id(). Why is of_device_make_bus_id()
being called on i2c devices? Those shouldn't be modelled as
platform_devices.

g.

> 
> Turn this into a pr_debug instead
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> 
> diff --git a/drivers/of/address.c b/drivers/of/address.c
> index f0541fd..bf1f79d 100644
> --- a/drivers/of/address.c
> +++ b/drivers/of/address.c
> @@ -444,7 +444,7 @@ static int of_translate_one(struct device_node *parent, struct of_bus *bus,
>  	 */
>  	ranges = of_get_property(parent, rprop, &rlen);
>  	if (ranges == NULL && !of_empty_ranges_quirk()) {
> -		pr_err("OF: no ranges; cannot translate\n");
> +		pr_debug("OF: no ranges; cannot translate\n");
>  		return 1;
>  	}
>  	if (ranges == NULL || rlen == 0) {
> 
> 


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

* Re: [PATCH] of/address: Don't throw errors on absent ranges properties
@ 2014-11-19  2:32     ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2014-11-19  2:32 UTC (permalink / raw)
  To: Grant Likely; +Cc: Rob Herring, devicetree, linux-kernel

On Tue, 2014-11-18 at 16:57 +0000, Grant Likely wrote:
> On Fri, 14 Nov 2014 17:58:23 +1100
> , Benjamin Herrenschmidt <benh@kernel.crashing.org>
>  wrote:
> > The core always tries to translate any "reg" property to construct the platform
> > device names. This results in a pile of "OF: no ranges; cannot translate" errors
> > in dmesg whenever we expose things like i2c devices that cannot directly translate
> > to the MMIO space.
> 
> I don't have a problem with the change, but it seems to be catching an
> odd usage of of_device_make_bus_id(). Why is of_device_make_bus_id()
> being called on i2c devices? Those shouldn't be modelled as
> platform_devices.

Sorry, this was my explanation being full of crap. It's my i2c
_controller_ which is a platform device, and is on the xscom bus which
isn't directly MMIO translatable.

The patch still stands :)

Cheers,
Ben.

> g.
> 
> > 
> > Turn this into a pr_debug instead
> > 
> > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > 
> > diff --git a/drivers/of/address.c b/drivers/of/address.c
> > index f0541fd..bf1f79d 100644
> > --- a/drivers/of/address.c
> > +++ b/drivers/of/address.c
> > @@ -444,7 +444,7 @@ static int of_translate_one(struct device_node *parent, struct of_bus *bus,
> >  	 */
> >  	ranges = of_get_property(parent, rprop, &rlen);
> >  	if (ranges == NULL && !of_empty_ranges_quirk()) {
> > -		pr_err("OF: no ranges; cannot translate\n");
> > +		pr_debug("OF: no ranges; cannot translate\n");
> >  		return 1;
> >  	}
> >  	if (ranges == NULL || rlen == 0) {
> > 
> > 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/



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

* Re: [PATCH] of/address: Don't throw errors on absent ranges properties
@ 2014-11-19  2:32     ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2014-11-19  2:32 UTC (permalink / raw)
  To: Grant Likely
  Cc: Rob Herring, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Tue, 2014-11-18 at 16:57 +0000, Grant Likely wrote:
> On Fri, 14 Nov 2014 17:58:23 +1100
> , Benjamin Herrenschmidt <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
>  wrote:
> > The core always tries to translate any "reg" property to construct the platform
> > device names. This results in a pile of "OF: no ranges; cannot translate" errors
> > in dmesg whenever we expose things like i2c devices that cannot directly translate
> > to the MMIO space.
> 
> I don't have a problem with the change, but it seems to be catching an
> odd usage of of_device_make_bus_id(). Why is of_device_make_bus_id()
> being called on i2c devices? Those shouldn't be modelled as
> platform_devices.

Sorry, this was my explanation being full of crap. It's my i2c
_controller_ which is a platform device, and is on the xscom bus which
isn't directly MMIO translatable.

The patch still stands :)

Cheers,
Ben.

> g.
> 
> > 
> > Turn this into a pr_debug instead
> > 
> > Signed-off-by: Benjamin Herrenschmidt <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
> > 
> > diff --git a/drivers/of/address.c b/drivers/of/address.c
> > index f0541fd..bf1f79d 100644
> > --- a/drivers/of/address.c
> > +++ b/drivers/of/address.c
> > @@ -444,7 +444,7 @@ static int of_translate_one(struct device_node *parent, struct of_bus *bus,
> >  	 */
> >  	ranges = of_get_property(parent, rprop, &rlen);
> >  	if (ranges == NULL && !of_empty_ranges_quirk()) {
> > -		pr_err("OF: no ranges; cannot translate\n");
> > +		pr_debug("OF: no ranges; cannot translate\n");
> >  		return 1;
> >  	}
> >  	if (ranges == NULL || rlen == 0) {
> > 
> > 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] of/address: Don't throw errors on absent ranges properties
  2014-11-19  2:32     ` Benjamin Herrenschmidt
  (?)
@ 2014-11-19 10:31     ` Grant Likely
  2014-11-20 23:07         ` Benjamin Herrenschmidt
  -1 siblings, 1 reply; 8+ messages in thread
From: Grant Likely @ 2014-11-19 10:31 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: Rob Herring, devicetree, linux-kernel

On Wed, 19 Nov 2014 13:32:31 +1100
, Benjamin Herrenschmidt <benh@kernel.crashing.org>
 wrote:
> On Tue, 2014-11-18 at 16:57 +0000, Grant Likely wrote:
> > On Fri, 14 Nov 2014 17:58:23 +1100
> > , Benjamin Herrenschmidt <benh@kernel.crashing.org>
> >  wrote:
> > > The core always tries to translate any "reg" property to construct the platform
> > > device names. This results in a pile of "OF: no ranges; cannot translate" errors
> > > in dmesg whenever we expose things like i2c devices that cannot directly translate
> > > to the MMIO space.
> > 
> > I don't have a problem with the change, but it seems to be catching an
> > odd usage of of_device_make_bus_id(). Why is of_device_make_bus_id()
> > being called on i2c devices? Those shouldn't be modelled as
> > platform_devices.
> 
> Sorry, this was my explanation being full of crap. It's my i2c
> _controller_ which is a platform device, and is on the xscom bus which
> isn't directly MMIO translatable.

Okay, that makes more sense, but if xscom is a different bus with
different access methods, then why is it using platform_bus_type? I
would expect it to have it's own bus_type and container for struct
device.

> The patch still stands :)

Indeed, I merged it yesterday. :)

> 
> Cheers,
> Ben.
> 
> > g.
> > 
> > > 
> > > Turn this into a pr_debug instead
> > > 
> > > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > > 
> > > diff --git a/drivers/of/address.c b/drivers/of/address.c
> > > index f0541fd..bf1f79d 100644
> > > --- a/drivers/of/address.c
> > > +++ b/drivers/of/address.c
> > > @@ -444,7 +444,7 @@ static int of_translate_one(struct device_node *parent, struct of_bus *bus,
> > >  	 */
> > >  	ranges = of_get_property(parent, rprop, &rlen);
> > >  	if (ranges == NULL && !of_empty_ranges_quirk()) {
> > > -		pr_err("OF: no ranges; cannot translate\n");
> > > +		pr_debug("OF: no ranges; cannot translate\n");
> > >  		return 1;
> > >  	}
> > >  	if (ranges == NULL || rlen == 0) {
> > > 
> > > 
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at  http://www.tux.org/lkml/
> 
> 


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

* Re: [PATCH] of/address: Don't throw errors on absent ranges properties
@ 2014-11-20 23:07         ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2014-11-20 23:07 UTC (permalink / raw)
  To: Grant Likely; +Cc: Rob Herring, devicetree, linux-kernel

On Wed, 2014-11-19 at 10:31 +0000, Grant Likely wrote:
> was my explanation being full of crap. It's my i2c
> > _controller_ which is a platform device, and is on the xscom bus
> which
> > isn't directly MMIO translatable.
> 
> Okay, that makes more sense, but if xscom is a different bus with
> different access methods, then why is it using platform_bus_type? I
> would expect it to have it's own bus_type and container for struct
> device.

There is no point really. It's not really a bus we expose as such to
Linux (mostly the FW uses it) though we use the xscom nodes as chip
nodes.

We do expose selected devices we pick from underneath xscom such
as the LPC bus and the i2c controllers as platform devices which then
use FW interfaces to perform the actual LPC or i2c accesses.

Creating a dedicated bus type would be completely pointless.

The FW itself uses what's there more intensively.

> > The patch still stands :)
> 
> Indeed, I merged it yesterday. :)

Thanks!

Cheers,
Ben.



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

* Re: [PATCH] of/address: Don't throw errors on absent ranges properties
@ 2014-11-20 23:07         ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2014-11-20 23:07 UTC (permalink / raw)
  To: Grant Likely
  Cc: Rob Herring, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Wed, 2014-11-19 at 10:31 +0000, Grant Likely wrote:
> was my explanation being full of crap. It's my i2c
> > _controller_ which is a platform device, and is on the xscom bus
> which
> > isn't directly MMIO translatable.
> 
> Okay, that makes more sense, but if xscom is a different bus with
> different access methods, then why is it using platform_bus_type? I
> would expect it to have it's own bus_type and container for struct
> device.

There is no point really. It's not really a bus we expose as such to
Linux (mostly the FW uses it) though we use the xscom nodes as chip
nodes.

We do expose selected devices we pick from underneath xscom such
as the LPC bus and the i2c controllers as platform devices which then
use FW interfaces to perform the actual LPC or i2c accesses.

Creating a dedicated bus type would be completely pointless.

The FW itself uses what's there more intensively.

> > The patch still stands :)
> 
> Indeed, I merged it yesterday. :)

Thanks!

Cheers,
Ben.


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2014-11-20 23:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-14  6:58 [PATCH] of/address: Don't throw errors on absent ranges properties Benjamin Herrenschmidt
2014-11-14  6:58 ` Benjamin Herrenschmidt
2014-11-18 16:57 ` Grant Likely
2014-11-19  2:32   ` Benjamin Herrenschmidt
2014-11-19  2:32     ` Benjamin Herrenschmidt
2014-11-19 10:31     ` Grant Likely
2014-11-20 23:07       ` Benjamin Herrenschmidt
2014-11-20 23:07         ` Benjamin Herrenschmidt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.