* [PATCH] powerpc/83xx: don't probe broken PCI on mpc837x_mds boards
@ 2008-10-02 15:18 Anton Vorontsov
2008-10-02 19:48 ` Kumar Gala
0 siblings, 1 reply; 8+ messages in thread
From: Anton Vorontsov @ 2008-10-02 15:18 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
In the standalone setup the board's CPLD disables the PCI internal
arbiter, thus any access to the PCI bus will hang the board.
When there is no PCI arbiter on the bus the u-boot marks the PCI
bus as broken and we should not try to probe it.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
arch/powerpc/platforms/83xx/mpc837x_mds.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/platforms/83xx/mpc837x_mds.c b/arch/powerpc/platforms/83xx/mpc837x_mds.c
index be62de2..8bb13c8 100644
--- a/arch/powerpc/platforms/83xx/mpc837x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc837x_mds.c
@@ -85,8 +85,14 @@ static void __init mpc837x_mds_setup_arch(void)
ppc_md.progress("mpc837x_mds_setup_arch()", 0);
#ifdef CONFIG_PCI
- for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
+ for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") {
+ if (!of_device_is_available(np)) {
+ pr_warning("%s: disabled by the firmware.\n",
+ np->full_name);
+ continue;
+ }
mpc83xx_add_bridge(np);
+ }
#endif
mpc837xmds_usb_cfg();
}
--
1.5.6.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] powerpc/83xx: don't probe broken PCI on mpc837x_mds boards
2008-10-02 15:18 [PATCH] powerpc/83xx: don't probe broken PCI on mpc837x_mds boards Anton Vorontsov
@ 2008-10-02 19:48 ` Kumar Gala
2008-10-03 16:08 ` [PATCH v2] " Anton Vorontsov
0 siblings, 1 reply; 8+ messages in thread
From: Kumar Gala @ 2008-10-02 19:48 UTC (permalink / raw)
To: Anton Vorontsov; +Cc: linuxppc-dev
On Oct 2, 2008, at 10:18 AM, Anton Vorontsov wrote:
> In the standalone setup the board's CPLD disables the PCI internal
> arbiter, thus any access to the PCI bus will hang the board.
>
> When there is no PCI arbiter on the bus the u-boot marks the PCI
> bus as broken and we should not try to probe it.
>
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Can you add to the commit message something about using the 'status
field in the device tree to determine if the pci controller is
available'
- k
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2] powerpc/83xx: don't probe broken PCI on mpc837x_mds boards
2008-10-02 19:48 ` Kumar Gala
@ 2008-10-03 16:08 ` Anton Vorontsov
2008-10-03 16:14 ` Kumar Gala
0 siblings, 1 reply; 8+ messages in thread
From: Anton Vorontsov @ 2008-10-03 16:08 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
In the standalone setup the board's CPLD disables the PCI internal
arbiter, thus any access to the PCI bus will hang the board.
When there is no PCI arbiter on the bus the u-boot adds
status = "broken (no arbiter)" property into the PCI controller's
node, and so marks the PCI controller as unavailable.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
On Thu, Oct 02, 2008 at 02:48:44PM -0500, Kumar Gala wrote:
> Can you add to the commit message something about using the 'status
> field in the device tree to determine if the pci controller is
> available'
Something like this?
Thanks,
arch/powerpc/platforms/83xx/mpc837x_mds.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/platforms/83xx/mpc837x_mds.c b/arch/powerpc/platforms/83xx/mpc837x_mds.c
index be62de2..8bb13c8 100644
--- a/arch/powerpc/platforms/83xx/mpc837x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc837x_mds.c
@@ -85,8 +85,14 @@ static void __init mpc837x_mds_setup_arch(void)
ppc_md.progress("mpc837x_mds_setup_arch()", 0);
#ifdef CONFIG_PCI
- for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
+ for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") {
+ if (!of_device_is_available(np)) {
+ pr_warning("%s: disabled by the firmware.\n",
+ np->full_name);
+ continue;
+ }
mpc83xx_add_bridge(np);
+ }
#endif
mpc837xmds_usb_cfg();
}
--
1.5.6.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2] powerpc/83xx: don't probe broken PCI on mpc837x_mds boards
2008-10-03 16:08 ` [PATCH v2] " Anton Vorontsov
@ 2008-10-03 16:14 ` Kumar Gala
2008-10-03 16:27 ` Anton Vorontsov
0 siblings, 1 reply; 8+ messages in thread
From: Kumar Gala @ 2008-10-03 16:14 UTC (permalink / raw)
To: avorontsov; +Cc: linuxppc-dev
On Oct 3, 2008, at 11:08 AM, Anton Vorontsov wrote:
> In the standalone setup the board's CPLD disables the PCI internal
> arbiter, thus any access to the PCI bus will hang the board.
>
> When there is no PCI arbiter on the bus the u-boot adds
> status = "broken (no arbiter)" property into the PCI controller's
> node, and so marks the PCI controller as unavailable.
>
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
>
> On Thu, Oct 02, 2008 at 02:48:44PM -0500, Kumar Gala wrote:
>> Can you add to the commit message something about using the 'status
>> field in the device tree to determine if the pci controller is
>> available'
>
> Something like this?
>
> Thanks,
yes, but should we just have "status = disabled" since that is the
effect?
- k
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] powerpc/83xx: don't probe broken PCI on mpc837x_mds boards
2008-10-03 16:14 ` Kumar Gala
@ 2008-10-03 16:27 ` Anton Vorontsov
2008-10-03 17:51 ` Kumar Gala
0 siblings, 1 reply; 8+ messages in thread
From: Anton Vorontsov @ 2008-10-03 16:27 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
On Fri, Oct 03, 2008 at 11:14:18AM -0500, Kumar Gala wrote:
>
> On Oct 3, 2008, at 11:08 AM, Anton Vorontsov wrote:
>
>> In the standalone setup the board's CPLD disables the PCI internal
>> arbiter, thus any access to the PCI bus will hang the board.
>>
>> When there is no PCI arbiter on the bus the u-boot adds
>> status = "broken (no arbiter)" property into the PCI controller's
>> node, and so marks the PCI controller as unavailable.
>>
>> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
>> ---
>>
>> On Thu, Oct 02, 2008 at 02:48:44PM -0500, Kumar Gala wrote:
>>> Can you add to the commit message something about using the 'status
>>> field in the device tree to determine if the pci controller is
>>> available'
>>
>> Something like this?
>>
>> Thanks,
>
> yes, but should we just have "status = disabled" since that is the
> effect?
I don't know, should we? For the unavailable/disabled case the status
can be anything but not 'ok' or 'okay' (the only status values for the
available devices). So if we can encode the reason, why not do this?
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] powerpc/83xx: don't probe broken PCI on mpc837x_mds boards
2008-10-03 16:27 ` Anton Vorontsov
@ 2008-10-03 17:51 ` Kumar Gala
2008-10-06 17:08 ` [PATCH v3] " Anton Vorontsov
0 siblings, 1 reply; 8+ messages in thread
From: Kumar Gala @ 2008-10-03 17:51 UTC (permalink / raw)
To: avorontsov; +Cc: linuxppc-dev
On Oct 3, 2008, at 11:27 AM, Anton Vorontsov wrote:
> On Fri, Oct 03, 2008 at 11:14:18AM -0500, Kumar Gala wrote:
>>
>> On Oct 3, 2008, at 11:08 AM, Anton Vorontsov wrote:
>>
>>> In the standalone setup the board's CPLD disables the PCI internal
>>> arbiter, thus any access to the PCI bus will hang the board.
>>>
>>> When there is no PCI arbiter on the bus the u-boot adds
>>> status = "broken (no arbiter)" property into the PCI controller's
>>> node, and so marks the PCI controller as unavailable.
>>>
>>> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
>>> ---
>>>
>>> On Thu, Oct 02, 2008 at 02:48:44PM -0500, Kumar Gala wrote:
>>>> Can you add to the commit message something about using the 'status
>>>> field in the device tree to determine if the pci controller is
>>>> available'
>>>
>>> Something like this?
>>>
>>> Thanks,
>>
>> yes, but should we just have "status = disabled" since that is the
>> effect?
>
> I don't know, should we? For the unavailable/disabled case the status
> can be anything but not 'ok' or 'okay' (the only status values for the
> available devices). So if we can encode the reason, why not do this?
that works for me, just add the fact to the commit msg that the "valid
status's are 'ok' and 'okay' and everything else is treated as "not
available or disabled"
- k
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3] powerpc/83xx: don't probe broken PCI on mpc837x_mds boards
2008-10-03 17:51 ` Kumar Gala
@ 2008-10-06 17:08 ` Anton Vorontsov
2008-10-07 12:32 ` Kumar Gala
0 siblings, 1 reply; 8+ messages in thread
From: Anton Vorontsov @ 2008-10-06 17:08 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
In the standalone setup the board's CPLD disables the PCI internal
arbiter, thus any access to the PCI bus will hang the board.
The common way to disable particular devices in the device tree is to
put the "status" property with any value other than "ok" or "okay"
into the device node we want to disable.
So, when there is no PCI arbiter on the bus the u-boot adds status =
"broken (no arbiter)" property into the PCI controller's node, and so
marks the PCI controller as unavailable.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
On Fri, Oct 03, 2008 at 12:51:41PM -0500, Kumar Gala wrote:
[...]
>>> yes, but should we just have "status = disabled" since that is the
>>> effect?
>>
>> I don't know, should we? For the unavailable/disabled case the status
>> can be anything but not 'ok' or 'okay' (the only status values for the
>> available devices). So if we can encode the reason, why not do this?
>
> that works for me, just add the fact to the commit msg that the "valid
> status's are 'ok' and 'okay' and everything else is treated as "not
> available or disabled"
Done.
arch/powerpc/platforms/83xx/mpc837x_mds.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/platforms/83xx/mpc837x_mds.c b/arch/powerpc/platforms/83xx/mpc837x_mds.c
index be62de2..8bb13c8 100644
--- a/arch/powerpc/platforms/83xx/mpc837x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc837x_mds.c
@@ -85,8 +85,14 @@ static void __init mpc837x_mds_setup_arch(void)
ppc_md.progress("mpc837x_mds_setup_arch()", 0);
#ifdef CONFIG_PCI
- for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
+ for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") {
+ if (!of_device_is_available(np)) {
+ pr_warning("%s: disabled by the firmware.\n",
+ np->full_name);
+ continue;
+ }
mpc83xx_add_bridge(np);
+ }
#endif
mpc837xmds_usb_cfg();
}
--
1.5.6.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v3] powerpc/83xx: don't probe broken PCI on mpc837x_mds boards
2008-10-06 17:08 ` [PATCH v3] " Anton Vorontsov
@ 2008-10-07 12:32 ` Kumar Gala
0 siblings, 0 replies; 8+ messages in thread
From: Kumar Gala @ 2008-10-07 12:32 UTC (permalink / raw)
To: avorontsov; +Cc: linuxppc-dev
On Oct 6, 2008, at 12:08 PM, Anton Vorontsov wrote:
> In the standalone setup the board's CPLD disables the PCI internal
> arbiter, thus any access to the PCI bus will hang the board.
>
> The common way to disable particular devices in the device tree is to
> put the "status" property with any value other than "ok" or "okay"
> into the device node we want to disable.
>
> So, when there is no PCI arbiter on the bus the u-boot adds status =
> "broken (no arbiter)" property into the PCI controller's node, and so
> marks the PCI controller as unavailable.
>
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
applied
- k
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-10-07 12:32 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-02 15:18 [PATCH] powerpc/83xx: don't probe broken PCI on mpc837x_mds boards Anton Vorontsov
2008-10-02 19:48 ` Kumar Gala
2008-10-03 16:08 ` [PATCH v2] " Anton Vorontsov
2008-10-03 16:14 ` Kumar Gala
2008-10-03 16:27 ` Anton Vorontsov
2008-10-03 17:51 ` Kumar Gala
2008-10-06 17:08 ` [PATCH v3] " Anton Vorontsov
2008-10-07 12:32 ` Kumar Gala
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).