Skip to contentSkip to conversation

What is OCP_FUNC_OPB ??

PATCH Roland Dreier 2 participants 2 messages Oct 13, 2005 – Oct 14, 2005

lore
Share & tools
lore
#0 lore raw

While merging Ruslan Sushko's fix for GPIO and IIC addresses into my 440SPe tree, I noticed that ocp_core[] has an entry for a function OCP_FUNC_OPB. I'd like to get this correct for the 440SPe port, but I don't see any users in the tree.

Is this field just used to create an entry in sysfs -- if so what does userspace use it for?? Or is it just completely obsolete? What is the .paddr member supposed to represent? Is it just the base address of the whole OPB region?

Is it worth applying the patch below (according to the 440SP manual, the OPB region starts at 0x1 f000 0000), or should we just get rid of these entries entirely?

Thanks,
Roland

[PPC32] Correct OPB base address for PowerPC 440SP

---

arch/ppc/platforms/4xx/ibm440sp.c +1 -1
index feb17e4..0b7e462 100644
@@ -60,7 +60,7 @@ struct ocp_def core_ocp[] = {
 	{ .vendor	= OCP_VENDOR_IBM,
 	  .function	= OCP_FUNC_OPB,
 	  .index	= 0,
-	  .paddr	= 0x0000000140000000ULL,
+	  .paddr	= 0x00000001f0000000ULL,
 	  .irq		= OCP_IRQ_NA,
 	  .pm		= OCP_CPM_NA,
 	},
#1 lore raw
Quoted 28 lines · Roland Dreier

While merging Ruslan Sushko's fix for GPIO and IIC addresses into my 440SPe tree, I noticed that ocp_core[] has an entry for a function OCP_FUNC_OPB. I'd like to get this correct for the 440SPe port, but I don't see any users in the tree.

Is this field just used to create an entry in sysfs -- if so what does userspace use it for?? Or is it just completely obsolete? What is the .paddr member supposed to represent? Is it just the base address of the whole OPB region?

Is it worth applying the patch below (according to the 440SP manual, the OPB region starts at 0x1 f000 0000), or should we just get rid of these entries entirely?

Thanks,
Roland

[PPC32] Correct OPB base address for PowerPC 440SP

---

arch/ppc/platforms/4xx/ibm440sp.c +0 -0
index feb17e4..0b7e462 100644

arch/ppc/platforms/4xx/ibm440sp.c struct ocp_def core_ocp[] = { · line 66

Quoted 8 lines
arch/ppc/platforms/4xx/ibm440sp.c +1 -1
@@ -60,7 +60,7 @@ struct ocp_def core_ocp[] = {
 	{ .vendor	= OCP_VENDOR_IBM,
 	  .function	= OCP_FUNC_OPB,
 	  .index	= 0,
-	  .paddr	= 0x0000000140000000ULL,
+	  .paddr	= 0x00000001f0000000ULL,
 	  .irq		= OCP_IRQ_NA,
 	  .pm		= OCP_CPM_NA,
 	},

I think this is useless stuff. IIRC Ben added these fields when converting from Armin's OCP, I have no idea what he had in mind at the time (probably some "bus" object owning all "peripheral" objects).

I doubt anything in user/kernel-space uses it. IMHO we can safely remove these entries from all 4xx platform files.

Signature · 1 line
Eugene