Some firmwares have "pcie" for the "name" property of the CPC945 PCI
Express host bridge. Check for "pcie" in addition to "pci" so we
don't miss it.
Signed-off-by: Nathan Lynch <redacted>
---
arch/powerpc/platforms/maple/pci.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
On maple, use the RTAS "system-reboot" and "power-off" methods if they
are available.
Signed-off-by: Nathan Lynch <redacted>
---
arch/powerpc/platforms/maple/setup.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
To test for the existence of an RTAS function, we typically do:
foo_token = rtas_token("foo");
if (foo_token == RTAS_UNKNOWN_SERVICE)
return;
Add a rtas_service_present method, which provides a more conventional
boolean interface for testing the existence of an RTAS method.
Signed-off-by: Nathan Lynch <redacted>
---
arch/powerpc/kernel/rtas.c | 6 ++++++
include/asm-powerpc/rtas.h | 1 +
2 files changed, 7 insertions(+), 0 deletions(-)
From: Michael Ellerman <hidden> Date: 2006-12-07 02:51:33
On Wed, 2006-12-06 at 18:50 -0600, Nathan Lynch wrote:
To test for the existence of an RTAS function, we typically do:
foo_token = rtas_token("foo");
if (foo_token == RTAS_UNKNOWN_SERVICE)
return;
Add a rtas_service_present method, which provides a more conventional
boolean interface for testing the existence of an RTAS method.
I like it a lot ..
But should it be called rtas_token_present() ? :D
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
Some systems supported by the maple platform have RTAS; make PPC_MAPLE
select PPC_RTAS.
Signed-off-by: Nathan Lynch <redacted>
---
arch/powerpc/Kconfig | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
On Wed, 2006-12-06 at 18:50 -0600, Nathan Lynch wrote:
quoted
To test for the existence of an RTAS function, we typically do:
foo_token = rtas_token("foo");
if (foo_token == RTAS_UNKNOWN_SERVICE)
return;
Add a rtas_service_present method, which provides a more conventional
boolean interface for testing the existence of an RTAS method.
I like it a lot ..
But should it be called rtas_token_present() ? :D
I considered that, but thought my name was a little more descriptive
-- a token is merely an integer value, but we're really interested in
whether the service named is available.
I don't really care that much either way, though :)
Some firmwares have "pcie" for the "name" property of the CPC945 PCI
Express host bridge. Check for "pcie" in addition to "pci" so we
don't miss it.
1275 (draft) supplement for PCI Express use 'pciex'. 'Some firmware'
should be changed instead, if possible.
Nah, the draft should be changed, "pciex" is an absolutely
horrible name :-) The draft contains a few serious bugs
btw, I hope no one implements this as-is :-)
Apple uses plain "pci". Using the "device_type" and the
"compatible" property works fine everywhere -- *except*
for implementations following this broken draft spec (the
draft doesn't even define a value for "device_type"; also
it prohibits declaring in the "compatible" property that
a device is backward compatible to some plain old PCI
device).
Segher
On Thu, Dec 07, 2006 at 01:51:33PM +1100, Michael Ellerman wrote:
On Wed, 2006-12-06 at 18:50 -0600, Nathan Lynch wrote:
quoted
To test for the existence of an RTAS function, we typically do:
foo_token = rtas_token("foo");
if (foo_token == RTAS_UNKNOWN_SERVICE)
return;
Add a rtas_service_present method, which provides a more conventional
boolean interface for testing the existence of an RTAS method.
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2006-12-12 22:26:53
On Mon, 2006-12-11 at 16:38 -0600, Nathan Lynch wrote:
Segher Boessenkool wrote:
quoted
quoted
Some firmwares have "pcie" for the "name" property of the CPC945 PCI
Express host bridge. Check for "pcie" in addition to "pci" so we
don't miss it.
You shouldn't use "name" but "device_type" and "compatible".
Like this?
(Hmm, does the u3-agp on maple have "pci" for device_type?)
I hope so...
There are plenty bits of code in the kernel that _assume_ that
device_type is PCI for PHB's and P2P bridges, wether they are PCI, PCI-X
or PCIe. prom_parse.c is one, but there is more.
Ben.