diff mbox

of: Fix address decoding on Bimini and js2x machines

Message ID 1372831270.4122.36.camel@pasglop (mailing list archive)
State Not Applicable
Headers show

Commit Message

Benjamin Herrenschmidt July 3, 2013, 6:01 a.m. UTC
Commit:
    
  e38c0a1fbc5803cbacdaac0557c70ac8ca5152e7
  of/address: Handle #address-cells > 2 specially
    
broke real time clock access on Bimini, js2x, and similar powerpc
machines using the "maple" platform. That code was indirectly relying
on the old (broken) behaviour of the translation for the hypertransport
to ISA bridge.
    
This fixes it by treating hypertransport as a PCI bus
    
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: <stable@vger.kernel.org> [v3.6+]
---

Rob, if you have no objection I will put that in powerpc -next

Comments

Rob Herring July 3, 2013, 2:10 p.m. UTC | #1
On 07/03/2013 01:01 AM, Benjamin Herrenschmidt wrote:
>  Commit:
>     
>   e38c0a1fbc5803cbacdaac0557c70ac8ca5152e7
>   of/address: Handle #address-cells > 2 specially
>     
> broke real time clock access on Bimini, js2x, and similar powerpc
> machines using the "maple" platform. That code was indirectly relying
> on the old (broken) behaviour of the translation for the hypertransport
> to ISA bridge.
>     
> This fixes it by treating hypertransport as a PCI bus
>     
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> CC: <stable@vger.kernel.org> [v3.6+]
> ---
> 
> Rob, if you have no objection I will put that in powerpc -next

NP.

Acked-by: Rob Herring <rob.herring@calxeda.com>

Rob

> 
> diff --git a/drivers/of/address.c b/drivers/of/address.c
> index 04da786..7c8221d 100644
> --- a/drivers/of/address.c
> +++ b/drivers/of/address.c
> @@ -106,8 +106,12 @@ static unsigned int of_bus_default_get_flags(const __be32 *
>  
>  static int of_bus_pci_match(struct device_node *np)
>  {
> -       /* "vci" is for the /chaos bridge on 1st-gen PCI powermacs */
> -       return !strcmp(np->type, "pci") || !strcmp(np->type, "vci");
> +       /*
> +        * "vci" is for the /chaos bridge on 1st-gen PCI powermacs
> +        * "ht" is hypertransport
> +        */
> +       return !strcmp(np->type, "pci") || !strcmp(np->type, "vci") ||
> +               !strcmp(np->type, "ht");
>  }
>  
>  static void of_bus_pci_count_cells(struct device_node *np,
> 
>
Grant Likely July 3, 2013, 2:37 p.m. UTC | #2
On Wed, Jul 3, 2013 at 3:10 PM, Rob Herring <robherring2@gmail.com> wrote:
> On 07/03/2013 01:01 AM, Benjamin Herrenschmidt wrote:
>>  Commit:
>>
>>   e38c0a1fbc5803cbacdaac0557c70ac8ca5152e7
>>   of/address: Handle #address-cells > 2 specially
>>
>> broke real time clock access on Bimini, js2x, and similar powerpc
>> machines using the "maple" platform. That code was indirectly relying
>> on the old (broken) behaviour of the translation for the hypertransport
>> to ISA bridge.
>>
>> This fixes it by treating hypertransport as a PCI bus
>>
>> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>> CC: <stable@vger.kernel.org> [v3.6+]
>> ---
>>
>> Rob, if you have no objection I will put that in powerpc -next
>
> NP.
>
> Acked-by: Rob Herring <rob.herring@calxeda.com>

I'll include this in my 3.11 pull request for Linus

g.
Grant Likely July 4, 2013, 4:18 p.m. UTC | #3
On Wed, 3 Jul 2013 15:37:56 +0100, Grant Likely <grant.likely@linaro.org> wrote:
> On Wed, Jul 3, 2013 at 3:10 PM, Rob Herring <robherring2@gmail.com> wrote:
> > On 07/03/2013 01:01 AM, Benjamin Herrenschmidt wrote:
> >>  Commit:
> >>
> >>   e38c0a1fbc5803cbacdaac0557c70ac8ca5152e7
> >>   of/address: Handle #address-cells > 2 specially
> >>
> >> broke real time clock access on Bimini, js2x, and similar powerpc
> >> machines using the "maple" platform. That code was indirectly relying
> >> on the old (broken) behaviour of the translation for the hypertransport
> >> to ISA bridge.
> >>
> >> This fixes it by treating hypertransport as a PCI bus
> >>
> >> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> >> CC: <stable@vger.kernel.org> [v3.6+]
> >> ---
> >>
> >> Rob, if you have no objection I will put that in powerpc -next
> >
> > NP.
> >
> > Acked-by: Rob Herring <rob.herring@calxeda.com>
> 
> I'll include this in my 3.11 pull request for Linus

Oops. Ben, I misread what you wrote. It would have been just fine to
include it in your powerpc -next branch. Sorry for the confusion.

Anyway, I saw your powerpc pull req and that this patch wasn't in it, so
I've picked it up and will send it to Linus as soon as the test build
completes.

g.
Benjamin Herrenschmidt July 4, 2013, 9:55 p.m. UTC | #4
On Thu, 2013-07-04 at 17:18 +0100, Grant Likely wrote:
> > I'll include this in my 3.11 pull request for Linus
> 
> Oops. Ben, I misread what you wrote. It would have been just fine to
> include it in your powerpc -next branch. Sorry for the confusion.
> 
> Anyway, I saw your powerpc pull req and that this patch wasn't in it, so
> I've picked it up and will send it to Linus as soon as the test build
> completes.

Yeah, I was about to add it to a subsequent "fixes" branch but since you
picked it up I'll just leave it.

Thanks !

Cheers,
Ben.
diff mbox

Patch

diff --git a/drivers/of/address.c b/drivers/of/address.c
index 04da786..7c8221d 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -106,8 +106,12 @@  static unsigned int of_bus_default_get_flags(const __be32 *
 
 static int of_bus_pci_match(struct device_node *np)
 {
-       /* "vci" is for the /chaos bridge on 1st-gen PCI powermacs */
-       return !strcmp(np->type, "pci") || !strcmp(np->type, "vci");
+       /*
+        * "vci" is for the /chaos bridge on 1st-gen PCI powermacs
+        * "ht" is hypertransport
+        */
+       return !strcmp(np->type, "pci") || !strcmp(np->type, "vci") ||
+               !strcmp(np->type, "ht");
 }
 
 static void of_bus_pci_count_cells(struct device_node *np,