* [patch 0/6] PS3 patches for 2.6.26
@ 2008-03-27 0:36 Geoff Levand
2008-03-28 16:53 ` [patch] PS3: Split device setup for static vs. dynamic devices Geoff Levand
0 siblings, 1 reply; 2+ messages in thread
From: Geoff Levand @ 2008-03-27 0:36 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev, jgarzik
Paul and Jeff,
This is a small set of PS3 patches for 2.6.26. Patches
1-5 are ready to apply to the powerpc tree.
Patch 6 for the network driver needs an ACK by Jeff.
[1/6] PS3: Fix unlikely typo in ps3_get_irq
[2/6] PS3: Add ps3_get_speid routine
[3/6] PS3: Bootwrapper improvements
[4/6] PS3: Save power in busy loops on halt
[5/6] PS3: Sys-manager Wake-on-LAN support
[6/6] PS3: Gelic network driver Wake-on-LAN support
-Geoff
--
^ permalink raw reply [flat|nested] 2+ messages in thread
* [patch] PS3: Split device setup for static vs. dynamic devices
2008-03-27 0:36 [patch 0/6] PS3 patches for 2.6.26 Geoff Levand
@ 2008-03-28 16:53 ` Geoff Levand
0 siblings, 0 replies; 2+ messages in thread
From: Geoff Levand @ 2008-03-28 16:53 UTC (permalink / raw)
To: paulus; +Cc: Geert Uytterhoeven, linuxppc-dev
From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Split the device setup code in ps3_register_repository_device() in two
routines:
1. ps3_setup_static_device(), to handle the setup of static devices in the
PS3 repository, which can be __init,
2. ps3_setup_dynamic_device(), to handle the setup of storage devices that
may appear later in the PS3 repository.
This fixes a few section mismatch warnings.
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
---
Hi Paul,
Here is another one for 2.6.26 that Geert just sent me. Please apply.
-Geoff
arch/powerpc/platforms/ps3/device-init.c | 78 ++++++++++++++++++-------------
1 file changed, 46 insertions(+), 32 deletions(-)
--- a/arch/powerpc/platforms/ps3/device-init.c
+++ b/arch/powerpc/platforms/ps3/device-init.c
@@ -499,41 +499,14 @@ static int __init ps3_register_graphics_
}
/**
- * ps3_register_repository_device - Register a device from the repositiory info.
- *
+ * ps3_setup_dynamic_device - Setup a dynamic device from the repository
*/
-static int ps3_register_repository_device(
- const struct ps3_repository_device *repo)
+static int ps3_setup_dynamic_device(const struct ps3_repository_device *repo)
{
int result;
switch (repo->dev_type) {
- case PS3_DEV_TYPE_SB_GELIC:
- result = ps3_setup_gelic_device(repo);
- if (result) {
- pr_debug("%s:%d ps3_setup_gelic_device failed\n",
- __func__, __LINE__);
- }
- break;
- case PS3_DEV_TYPE_SB_USB:
-
- /* Each USB device has both an EHCI and an OHCI HC */
-
- result = ps3_setup_ehci_device(repo);
-
- if (result) {
- pr_debug("%s:%d ps3_setup_ehci_device failed\n",
- __func__, __LINE__);
- }
-
- result = ps3_setup_ohci_device(repo);
-
- if (result) {
- pr_debug("%s:%d ps3_setup_ohci_device failed\n",
- __func__, __LINE__);
- }
- break;
case PS3_DEV_TYPE_STOR_DISK:
result = ps3_setup_storage_dev(repo, PS3_MATCH_ID_STOR_DISK);
@@ -572,6 +545,48 @@ static int ps3_register_repository_devic
return result;
}
+/**
+ * ps3_setup_static_device - Setup a static device from the repository
+ */
+
+static int __init ps3_setup_static_device(const struct ps3_repository_device *repo)
+{
+ int result;
+
+ switch (repo->dev_type) {
+ case PS3_DEV_TYPE_SB_GELIC:
+ result = ps3_setup_gelic_device(repo);
+ if (result) {
+ pr_debug("%s:%d ps3_setup_gelic_device failed\n",
+ __func__, __LINE__);
+ }
+ break;
+ case PS3_DEV_TYPE_SB_USB:
+
+ /* Each USB device has both an EHCI and an OHCI HC */
+
+ result = ps3_setup_ehci_device(repo);
+
+ if (result) {
+ pr_debug("%s:%d ps3_setup_ehci_device failed\n",
+ __func__, __LINE__);
+ }
+
+ result = ps3_setup_ohci_device(repo);
+
+ if (result) {
+ pr_debug("%s:%d ps3_setup_ohci_device failed\n",
+ __func__, __LINE__);
+ }
+ break;
+
+ default:
+ return ps3_setup_dynamic_device(repo);
+ }
+
+ return result;
+}
+
static void ps3_find_and_add_device(u64 bus_id, u64 dev_id)
{
struct ps3_repository_device repo;
@@ -601,7 +616,7 @@ found:
pr_debug("%s:%u: device %lu:%lu found after %u retries\n",
__func__, __LINE__, bus_id, dev_id, retries);
- ps3_register_repository_device(&repo);
+ ps3_setup_dynamic_device(&repo);
return;
}
@@ -905,8 +920,7 @@ static int __init ps3_register_devices(v
ps3_register_graphics_devices();
- ps3_repository_find_devices(PS3_BUS_TYPE_SB,
- ps3_register_repository_device);
+ ps3_repository_find_devices(PS3_BUS_TYPE_SB, ps3_setup_static_device);
ps3_register_sound_devices();
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-28 16:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-27 0:36 [patch 0/6] PS3 patches for 2.6.26 Geoff Levand
2008-03-28 16:53 ` [patch] PS3: Split device setup for static vs. dynamic devices Geoff Levand
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.