of/address: Don't throw errors on absent ranges properties
PATCH 1/1 of/address: Don't throw errors on absent ranges properties
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
drivers/of/address.c +1 -1
@@ -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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · Benjamin Herrenschmidt
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.
Quoted 20 lines
Turn this into a
pr_debuginsteadSigned-off-by Benjamin Herrenschmidt <[email protected]>drivers/of/address.c +1
-1@@ -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 ) {
Quoted 8 lines · Grant Likely
Quoted 4 lines · Benjamin Herrenschmidt
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.
Quoted 4 lines
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 isof_device_make_bus_id()being called on i2c devices? Those shouldn't be modelled asplatform_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.
Quoted 20 lines
g.
Quoted 18 lines
Turn this into a
pr_debuginsteadSigned-off-by Benjamin Herrenschmidt <[email protected]>drivers/of/address.c +1
-1@@ -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 ) {
Quoted 8 lines
Quoted 2 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 9 lines · Benjamin Herrenschmidt
Quoted 8 lines · Grant Likely
Quoted 4 lines · Benjamin Herrenschmidt
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.
Quoted 8 lines
Quoted 4 lines
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 isof_device_make_bus_id()being called on i2c devices? Those shouldn't be modelled asplatform_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.
Quoted 1 line
The patch still stands :)
Indeed, I merged it yesterday. :)
Quoted 34 lines
Cheers,
Ben.Quoted 28 lines
g.
Quoted 12 lines
Turn this into a
pr_debuginsteadSigned-off-by Benjamin Herrenschmidt <[email protected]>drivers/of/address.c +0
-0drivers/of/address.c static int of_translate_one(struct device_node *parent, struct of_bus *bus, · line 450
Quoted 8 lines
drivers/of/address.c +1
-1@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 9 lines · Grant Likely
was my explanation being full of crap. It's my i2c
Quoted 1 line
_controller_ which is a platform device, and is on the xscom bus
which
Quoted 1 line
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 ownbus_typeand 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.
Quoted 3 lines
Quoted 1 line
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html