Re: [PATCH v5 3/4] i2c: mv64xxx: Fix bus hang on A0 version of the Armada XP SoCs
On Wednesday 08 January 2014, Gregory CLEMENT wrote: > On 08/01/2014 16:21, Wolfram Sang wrote: > >> diff --git a/drivers/i2c/busses/i2c-mv64xxx.c > >> b/drivers/i2c/busses/i2c-mv64xxx.c > >> index 8be7e42aa4de..f424c0f89946 100644 > >> --- a/drivers/i2c/busses/i2c-mv64xxx.c > >> +++ b/drivers/i2c/busses/i2c-mv64xxx.c > >> @@ -692,6 +692,10 @@ static const struct of_device_id > >> mv64xxx_i2c_of_match_table[] = { > >> { .compatible = "allwinner,sun4i-i2c", .data = > >> &mv64xxx_i2c_regs_sun4i}, > >> { .compatible = "marvell,mv64xxx-i2c", .data = > >> &mv64xxx_i2c_regs_mv64xxx}, > >> { .compatible = "marvell,mv78230-i2c", .data = > >> &mv64xxx_i2c_regs_mv64xxx}, > >> +{ > >> +.compatible = "marvell,mv78230-a0-i2c", > >> +.data = &mv64xxx_i2c_regs_mv64xxx > >> +}, > > > > I think a oneliner entry like the entries above is easier to read, but > > that is very minor... > > By using one line we would break the 80 character rule, > hat why I did in this way. > It's more a guideline than a strict rule. I agree that one line would be better here, but it's not important. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v5 3/4] i2c: mv64xxx: Fix bus hang on A0 version of the Armada XP SoCs
> >> + { > >> + .compatible = "marvell,mv78230-a0-i2c", > >> + .data = &mv64xxx_i2c_regs_mv64xxx > >> + }, > > > > I think a oneliner entry like the entries above is easier to read, but > > that is very minor... > > By using one line we would break the 80 character rule, > hat why I did in this way. This rule is there to keep code readable. If it doesn't help readability, it may/can/should be broken IMO. It's a mileage, though. signature.asc Description: Digital signature
Re: [PATCH v5 3/4] i2c: mv64xxx: Fix bus hang on A0 version of the Armada XP SoCs
On 08/01/2014 16:21, Wolfram Sang wrote: > On Wed, Jan 08, 2014 at 04:06:28PM +0100, Gregory CLEMENT wrote: >> The first variants of Armada XP SoCs (A0 stepping) have issues related >> to the i2c controller which prevent to use the offload mechanism and >> lead to a kernel hang during boot. >> >> The commit introduces a new the compatible string >> marvell,mv78230-a0-i2c for the i2c controller. When this compatible >> string is used the driver disables the offload mechanism and the >> kernel no more hangs on these SoCs. >> >> Signed-off-by: Gregory CLEMENT >> Reported-by: Andrew Lunn >> Cc: sta...@vger.kernel.org >> --- >> drivers/i2c/busses/i2c-mv64xxx.c | 8 >> 1 file changed, 8 insertions(+) >> >> diff --git a/drivers/i2c/busses/i2c-mv64xxx.c >> b/drivers/i2c/busses/i2c-mv64xxx.c >> index 8be7e42aa4de..f424c0f89946 100644 >> --- a/drivers/i2c/busses/i2c-mv64xxx.c >> +++ b/drivers/i2c/busses/i2c-mv64xxx.c >> @@ -692,6 +692,10 @@ static const struct of_device_id >> mv64xxx_i2c_of_match_table[] = { >> { .compatible = "allwinner,sun4i-i2c", .data = &mv64xxx_i2c_regs_sun4i}, >> { .compatible = "marvell,mv64xxx-i2c", .data = >> &mv64xxx_i2c_regs_mv64xxx}, >> { .compatible = "marvell,mv78230-i2c", .data = >> &mv64xxx_i2c_regs_mv64xxx}, >> +{ >> +.compatible = "marvell,mv78230-a0-i2c", >> +.data = &mv64xxx_i2c_regs_mv64xxx >> +}, > > I think a oneliner entry like the entries above is easier to read, but > that is very minor... By using one line we would break the 80 character rule, hat why I did in this way. > > Acked-by: Wolfram Sang > Thanks! Gregory -- Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v5 3/4] i2c: mv64xxx: Fix bus hang on A0 version of the Armada XP SoCs
On Wed, Jan 08, 2014 at 04:06:28PM +0100, Gregory CLEMENT wrote: > The first variants of Armada XP SoCs (A0 stepping) have issues related > to the i2c controller which prevent to use the offload mechanism and > lead to a kernel hang during boot. > > The commit introduces a new the compatible string > marvell,mv78230-a0-i2c for the i2c controller. When this compatible > string is used the driver disables the offload mechanism and the > kernel no more hangs on these SoCs. > > Signed-off-by: Gregory CLEMENT > Reported-by: Andrew Lunn > Cc: sta...@vger.kernel.org > --- > drivers/i2c/busses/i2c-mv64xxx.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/drivers/i2c/busses/i2c-mv64xxx.c > b/drivers/i2c/busses/i2c-mv64xxx.c > index 8be7e42aa4de..f424c0f89946 100644 > --- a/drivers/i2c/busses/i2c-mv64xxx.c > +++ b/drivers/i2c/busses/i2c-mv64xxx.c > @@ -692,6 +692,10 @@ static const struct of_device_id > mv64xxx_i2c_of_match_table[] = { > { .compatible = "allwinner,sun4i-i2c", .data = &mv64xxx_i2c_regs_sun4i}, > { .compatible = "marvell,mv64xxx-i2c", .data = > &mv64xxx_i2c_regs_mv64xxx}, > { .compatible = "marvell,mv78230-i2c", .data = > &mv64xxx_i2c_regs_mv64xxx}, > + { > + .compatible = "marvell,mv78230-a0-i2c", > + .data = &mv64xxx_i2c_regs_mv64xxx > + }, I think a oneliner entry like the entries above is easier to read, but that is very minor... Acked-by: Wolfram Sang signature.asc Description: Digital signature
[PATCH v5 3/4] i2c: mv64xxx: Fix bus hang on A0 version of the Armada XP SoCs
The first variants of Armada XP SoCs (A0 stepping) have issues related to the i2c controller which prevent to use the offload mechanism and lead to a kernel hang during boot. The commit introduces a new the compatible string marvell,mv78230-a0-i2c for the i2c controller. When this compatible string is used the driver disables the offload mechanism and the kernel no more hangs on these SoCs. Signed-off-by: Gregory CLEMENT Reported-by: Andrew Lunn Cc: sta...@vger.kernel.org --- drivers/i2c/busses/i2c-mv64xxx.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c index 8be7e42aa4de..f424c0f89946 100644 --- a/drivers/i2c/busses/i2c-mv64xxx.c +++ b/drivers/i2c/busses/i2c-mv64xxx.c @@ -692,6 +692,10 @@ static const struct of_device_id mv64xxx_i2c_of_match_table[] = { { .compatible = "allwinner,sun4i-i2c", .data = &mv64xxx_i2c_regs_sun4i}, { .compatible = "marvell,mv64xxx-i2c", .data = &mv64xxx_i2c_regs_mv64xxx}, { .compatible = "marvell,mv78230-i2c", .data = &mv64xxx_i2c_regs_mv64xxx}, + { + .compatible = "marvell,mv78230-a0-i2c", + .data = &mv64xxx_i2c_regs_mv64xxx + }, {} }; MODULE_DEVICE_TABLE(of, mv64xxx_i2c_of_match_table); @@ -783,6 +787,10 @@ mv64xxx_of_config(struct mv64xxx_i2c_data *drv_data, drv_data->errata_delay = true; } + if (of_device_is_compatible(np, "marvell,mv78230-a0-i2c")) { + drv_data->offload_enabled = false; + drv_data->errata_delay = true; + } out: return rc; #endif -- 1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html