* [PATCH] fix i2c on PPC linkstation / kurobox machines
[not found] ` <20081023213309.GA19777@weiser.dinsnail.net>
@ 2008-10-23 23:05 ` Guennadi Liakhovetski
2008-10-24 0:19 ` Benjamin Herrenschmidt
2008-10-28 13:58 ` Kumar Gala
0 siblings, 2 replies; 5+ messages in thread
From: Guennadi Liakhovetski @ 2008-10-23 23:05 UTC (permalink / raw)
To: Scott Wood, Michael Weiser; +Cc: Rogério Brito, linuxppc-dev
i2c is broken on linkstation / kurobox machines since at least 2.6.27. Fix
it. Also remove CONFIG_SERIAL_OF_PLATFORM, which, if enabled, breaks the
serial console after the "console handover: boot [udbg0] -> real [ttyS1]"
message.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
No, I do not really understand why I have to remove
CONFIG_SERIAL_OF_PLATFORM now after adding a call to
of_platform_bus_probe(), but it works this way. It must have something to
do with the legacy serial driver... If accepted in this form, I'll also
forward it to stable.
diff --git a/arch/powerpc/configs/linkstation_defconfig b/arch/powerpc/configs/linkstation_defconfig
index 6fc4c21..d0846ec 100644
--- a/arch/powerpc/configs/linkstation_defconfig
+++ b/arch/powerpc/configs/linkstation_defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.27-rc4
-# Thu Aug 21 00:52:05 2008
+# Linux kernel version: 2.6.27
+# Fri Oct 24 00:42:39 2008
#
# CONFIG_PPC64 is not set
@@ -934,7 +934,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_SERIAL_JSM is not set
-CONFIG_SERIAL_OF_PLATFORM=y
+# CONFIG_SERIAL_OF_PLATFORM is not set
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
@@ -1211,7 +1211,6 @@ CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_ALAUDA is not set
# CONFIG_USB_STORAGE_ONETOUCH is not set
# CONFIG_USB_STORAGE_KARMA is not set
-# CONFIG_USB_STORAGE_SIERRA is not set
# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
# CONFIG_USB_LIBUSUAL is not set
diff --git a/arch/powerpc/platforms/embedded6xx/linkstation.c b/arch/powerpc/platforms/embedded6xx/linkstation.c
index eb5d74e..2ca7be6 100644
--- a/arch/powerpc/platforms/embedded6xx/linkstation.c
+++ b/arch/powerpc/platforms/embedded6xx/linkstation.c
@@ -13,6 +13,7 @@
#include <linux/kernel.h>
#include <linux/initrd.h>
#include <linux/mtd/physmap.h>
+#include <linux/of_platform.h>
#include <asm/time.h>
#include <asm/prom.h>
@@ -54,6 +55,19 @@ static struct mtd_partition linkstation_physmap_partitions[] = {
},
};
+static __initdata struct of_device_id of_bus_ids[] = {
+ { .type = "soc", },
+ { .compatible = "simple-bus", },
+ {},
+};
+
+static int __init declare_of_platform_devices(void)
+{
+ of_platform_bus_probe(NULL, of_bus_ids, NULL);
+ return 0;
+}
+machine_device_initcall(linkstation, declare_of_platform_devices);
+
static int __init linkstation_add_bridge(struct device_node *dev)
{
#ifdef CONFIG_PCI
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] fix i2c on PPC linkstation / kurobox machines
2008-10-23 23:05 ` [PATCH] fix i2c on PPC linkstation / kurobox machines Guennadi Liakhovetski
@ 2008-10-24 0:19 ` Benjamin Herrenschmidt
2008-10-24 18:25 ` Guennadi Liakhovetski
2008-10-28 13:58 ` Kumar Gala
1 sibling, 1 reply; 5+ messages in thread
From: Benjamin Herrenschmidt @ 2008-10-24 0:19 UTC (permalink / raw)
To: Guennadi Liakhovetski
Cc: Michael Weiser, Rogério Brito, linuxppc-dev, Scott Wood
On Fri, 2008-10-24 at 01:05 +0200, Guennadi Liakhovetski wrote:
> i2c is broken on linkstation / kurobox machines since at least 2.6.27. Fix
> it. Also remove CONFIG_SERIAL_OF_PLATFORM, which, if enabled, breaks the
> serial console after the "console handover: boot [udbg0] -> real [ttyS1]"
> message.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
You may want to use udbg_printf() to track down what's up. There's some
fishy code there indeed, what happens is that the legacy serial code
creates a platform device at boot time. Then, the of_serial attaches to
the device node for the same device and tries to register it. It's
supposed to "detect" that it's the same device but yeah, it may be
buggy, I've seen problems with it in the past, among others, I think it
can lose some state.
In the meantime, removing SERIAL_OF_PLATFORM is a good solution.
Ben.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fix i2c on PPC linkstation / kurobox machines
2008-10-24 0:19 ` Benjamin Herrenschmidt
@ 2008-10-24 18:25 ` Guennadi Liakhovetski
0 siblings, 0 replies; 5+ messages in thread
From: Guennadi Liakhovetski @ 2008-10-24 18:25 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: Michael Weiser, Rogério Brito, linuxppc-dev, Scott Wood
On Fri, 24 Oct 2008, Benjamin Herrenschmidt wrote:
> On Fri, 2008-10-24 at 01:05 +0200, Guennadi Liakhovetski wrote:
> > i2c is broken on linkstation / kurobox machines since at least 2.6.27. Fix
> > it. Also remove CONFIG_SERIAL_OF_PLATFORM, which, if enabled, breaks the
> > serial console after the "console handover: boot [udbg0] -> real [ttyS1]"
> > message.
> >
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
>
> You may want to use udbg_printf() to track down what's up. There's some
> fishy code there indeed, what happens is that the legacy serial code
> creates a platform device at boot time. Then, the of_serial attaches to
> the device node for the same device and tries to register it. It's
> supposed to "detect" that it's the same device but yeah, it may be
> buggy, I've seen problems with it in the past, among others, I think it
> can lose some state.
>
> In the meantime, removing SERIAL_OF_PLATFORM is a good solution.
>
> Ben.
I think, this needs an acked-by for -stable.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fix i2c on PPC linkstation / kurobox machines
2008-10-23 23:05 ` [PATCH] fix i2c on PPC linkstation / kurobox machines Guennadi Liakhovetski
2008-10-24 0:19 ` Benjamin Herrenschmidt
@ 2008-10-28 13:58 ` Kumar Gala
2008-10-28 14:06 ` Jon Smirl
1 sibling, 1 reply; 5+ messages in thread
From: Kumar Gala @ 2008-10-28 13:58 UTC (permalink / raw)
To: Guennadi Liakhovetski
Cc: Michael Weiser, Rogério Brito, linuxppc-dev, Scott Wood
On Oct 23, 2008, at 6:05 PM, Guennadi Liakhovetski wrote:
> i2c is broken on linkstation / kurobox machines since at least
> 2.6.27. Fix
> it. Also remove CONFIG_SERIAL_OF_PLATFORM, which, if enabled, breaks
> the
> serial console after the "console handover: boot [udbg0] -> real
> [ttyS1]"
> message.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
>
> ---
>
> No, I do not really understand why I have to remove
> CONFIG_SERIAL_OF_PLATFORM now after adding a call to
> of_platform_bus_probe(), but it works this way. It must have
> something to
> do with the legacy serial driver... If accepted in this form, I'll
> also
> forward it to stable.
>
> diff --git
applied to merge.
- k
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fix i2c on PPC linkstation / kurobox machines
2008-10-28 13:58 ` Kumar Gala
@ 2008-10-28 14:06 ` Jon Smirl
0 siblings, 0 replies; 5+ messages in thread
From: Jon Smirl @ 2008-10-28 14:06 UTC (permalink / raw)
To: Kumar Gala
Cc: Michael Weiser, Rogério Brito, linuxppc-dev, Scott Wood,
Guennadi Liakhovetski
On Tue, Oct 28, 2008 at 9:58 AM, Kumar Gala <galak@kernel.crashing.org> wrote:
>
> On Oct 23, 2008, at 6:05 PM, Guennadi Liakhovetski wrote:
>
>> i2c is broken on linkstation / kurobox machines since at least 2.6.27. Fix
>> it. Also remove CONFIG_SERIAL_OF_PLATFORM, which, if enabled, breaks the
>> serial console after the "console handover: boot [udbg0] -> real [ttyS1]"
>> message.
>>
>> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
>>
>> ---
>>
>> No, I do not really understand why I have to remove
>> CONFIG_SERIAL_OF_PLATFORM now after adding a call to
>> of_platform_bus_probe(), but it works this way. It must have something to
>> do with the legacy serial driver... If accepted in this form, I'll also
>> forward it to stable.
>>
>> diff --git
>
>
> applied to merge.
Did you change the comment? I2C wasn't broken, the bus definition was broken.
>
> - k
>
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-10-28 14:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20081022191650.GA11406@weiser.dinsnail.net>
[not found] ` <Pine.LNX.4.64.0810232029380.9657@axis700.grange>
[not found] ` <20081023213309.GA19777@weiser.dinsnail.net>
2008-10-23 23:05 ` [PATCH] fix i2c on PPC linkstation / kurobox machines Guennadi Liakhovetski
2008-10-24 0:19 ` Benjamin Herrenschmidt
2008-10-24 18:25 ` Guennadi Liakhovetski
2008-10-28 13:58 ` Kumar Gala
2008-10-28 14:06 ` Jon Smirl
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).