Skip to contentSkip to conversation

of: Fix address decoding on Bimini and js2x machines

PATCH In review Benjamin Herrenschmidt 4 participants 5 messages Jul 3, 2013 – Jul 4, 2013 Device tree

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 of: Fix address decoding on Bimini and js2x machines

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

---

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

drivers/of/address.c +6 -2
index 04da786..7c8221d 100644
@@ -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,
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Benjamin Herrenschmidt

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.

Quoted 7 lines

This fixes it by treating hypertransport as a PCI bus

---

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

NP.

Rob

Quoted 22 lines
drivers/of/address.c +6 -2
index 04da786..7c8221d 100644
@@ -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,
#2 lore raw
Quoted 17 lines · Rob Herring
Quoted 16 lines · Benjamin Herrenschmidt

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

---

Quoted 5 lines
Quoted 1 line

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

NP.

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

g.

#3 lore raw
Quoted 18 lines · Grant Likely
Quoted 17 lines · Rob Herring
Quoted 16 lines · Benjamin Herrenschmidt

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

---

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

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

NP.

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.

#4 lore raw
Quoted 8 lines · Grant Likely
Quoted 1 line

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.