aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/platforms/ps3/Makefile1
-rw-r--r--arch/powerpc/platforms/ps3/htab.c1
-rw-r--r--arch/powerpc/platforms/ps3/interrupt.c1
-rw-r--r--arch/powerpc/platforms/ps3/mm.c1
-rw-r--r--arch/powerpc/platforms/ps3/os-area.c1
-rw-r--r--arch/powerpc/platforms/ps3/platform.h151
-rw-r--r--arch/powerpc/platforms/ps3/repository.c3
-rw-r--r--arch/powerpc/platforms/ps3/setup.c1
-rw-r--r--arch/powerpc/platforms/ps3/smp.c1
-rw-r--r--arch/powerpc/platforms/ps3/spu.c3
-rw-r--r--arch/powerpc/platforms/ps3/system-bus.c (renamed from drivers/ps3/system-bus.c)5
-rw-r--r--drivers/ps3/Makefile1
-rw-r--r--include/asm-powerpc/ps3.h150
13 files changed, 159 insertions, 161 deletions
diff --git a/arch/powerpc/platforms/ps3/Makefile b/arch/powerpc/platforms/ps3/Makefile
index 1994904f580f..a0048fcf0866 100644
--- a/arch/powerpc/platforms/ps3/Makefile
+++ b/arch/powerpc/platforms/ps3/Makefile
@@ -1,5 +1,6 @@
1obj-y += setup.o mm.o time.o hvcall.o htab.o repository.o 1obj-y += setup.o mm.o time.o hvcall.o htab.o repository.o
2obj-y += interrupt.o exports.o os-area.o 2obj-y += interrupt.o exports.o os-area.o
3obj-y += system-bus.o
3 4
4obj-$(CONFIG_SMP) += smp.o 5obj-$(CONFIG_SMP) += smp.o
5obj-$(CONFIG_SPU_BASE) += spu.o 6obj-$(CONFIG_SPU_BASE) += spu.o
diff --git a/arch/powerpc/platforms/ps3/htab.c b/arch/powerpc/platforms/ps3/htab.c
index 8fe1769655a3..a4b5a1bc60f4 100644
--- a/arch/powerpc/platforms/ps3/htab.c
+++ b/arch/powerpc/platforms/ps3/htab.c
@@ -23,7 +23,6 @@
23#include <asm/machdep.h> 23#include <asm/machdep.h>
24#include <asm/lmb.h> 24#include <asm/lmb.h>
25#include <asm/udbg.h> 25#include <asm/udbg.h>
26#include <asm/ps3.h>
27#include <asm/lv1call.h> 26#include <asm/lv1call.h>
28 27
29#include "platform.h" 28#include "platform.h"
diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c
index 95b128ba9087..bb17283275aa 100644
--- a/arch/powerpc/platforms/ps3/interrupt.c
+++ b/arch/powerpc/platforms/ps3/interrupt.c
@@ -24,7 +24,6 @@
24 24
25#include <asm/machdep.h> 25#include <asm/machdep.h>
26#include <asm/udbg.h> 26#include <asm/udbg.h>
27#include <asm/ps3.h>
28#include <asm/lv1call.h> 27#include <asm/lv1call.h>
29 28
30#include "platform.h" 29#include "platform.h"
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c
index 49c0d010d491..42354de3f557 100644
--- a/arch/powerpc/platforms/ps3/mm.c
+++ b/arch/powerpc/platforms/ps3/mm.c
@@ -25,7 +25,6 @@
25#include <asm/firmware.h> 25#include <asm/firmware.h>
26#include <asm/lmb.h> 26#include <asm/lmb.h>
27#include <asm/udbg.h> 27#include <asm/udbg.h>
28#include <asm/ps3.h>
29#include <asm/lv1call.h> 28#include <asm/lv1call.h>
30 29
31#include "platform.h" 30#include "platform.h"
diff --git a/arch/powerpc/platforms/ps3/os-area.c b/arch/powerpc/platforms/ps3/os-area.c
index 6d0d2ac39bd8..5c3da08bc0c4 100644
--- a/arch/powerpc/platforms/ps3/os-area.c
+++ b/arch/powerpc/platforms/ps3/os-area.c
@@ -22,7 +22,6 @@
22#include <linux/io.h> 22#include <linux/io.h>
23 23
24#include <asm/lmb.h> 24#include <asm/lmb.h>
25#include <asm/ps3.h>
26 25
27#include "platform.h" 26#include "platform.h"
28 27
diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h
index 23b111bea9d0..ca04f03305c7 100644
--- a/arch/powerpc/platforms/ps3/platform.h
+++ b/arch/powerpc/platforms/ps3/platform.h
@@ -22,6 +22,9 @@
22#define _PS3_PLATFORM_H 22#define _PS3_PLATFORM_H
23 23
24#include <linux/rtc.h> 24#include <linux/rtc.h>
25#include <scsi/scsi.h>
26
27#include <asm/ps3.h>
25 28
26/* htab */ 29/* htab */
27 30
@@ -65,4 +68,152 @@ void ps3_spu_set_platform (void);
65static inline void ps3_spu_set_platform (void) {} 68static inline void ps3_spu_set_platform (void) {}
66#endif 69#endif
67 70
71/* repository bus info */
72
73enum ps3_bus_type {
74 PS3_BUS_TYPE_SB = 4,
75 PS3_BUS_TYPE_STORAGE = 5,
76};
77
78enum ps3_dev_type {
79 PS3_DEV_TYPE_STOR_DISK = TYPE_DISK, /* 0 */
80 PS3_DEV_TYPE_SB_GELIC = 3,
81 PS3_DEV_TYPE_SB_USB = 4,
82 PS3_DEV_TYPE_STOR_ROM = TYPE_ROM, /* 5 */
83 PS3_DEV_TYPE_SB_GPIO = 6,
84 PS3_DEV_TYPE_STOR_FLASH = TYPE_RBC, /* 14 */
85};
86
87int ps3_repository_read_bus_str(unsigned int bus_index, const char *bus_str,
88 u64 *value);
89int ps3_repository_read_bus_id(unsigned int bus_index, unsigned int *bus_id);
90int ps3_repository_read_bus_type(unsigned int bus_index,
91 enum ps3_bus_type *bus_type);
92int ps3_repository_read_bus_num_dev(unsigned int bus_index,
93 unsigned int *num_dev);
94
95/* repository bus device info */
96
97enum ps3_interrupt_type {
98 PS3_INTERRUPT_TYPE_EVENT_PORT = 2,
99 PS3_INTERRUPT_TYPE_SB_OHCI = 3,
100 PS3_INTERRUPT_TYPE_SB_EHCI = 4,
101 PS3_INTERRUPT_TYPE_OTHER = 5,
102};
103
104enum ps3_reg_type {
105 PS3_REG_TYPE_SB_OHCI = 3,
106 PS3_REG_TYPE_SB_EHCI = 4,
107 PS3_REG_TYPE_SB_GPIO = 5,
108};
109
110int ps3_repository_read_dev_str(unsigned int bus_index,
111 unsigned int dev_index, const char *dev_str, u64 *value);
112int ps3_repository_read_dev_id(unsigned int bus_index, unsigned int dev_index,
113 unsigned int *dev_id);
114int ps3_repository_read_dev_type(unsigned int bus_index,
115 unsigned int dev_index, enum ps3_dev_type *dev_type);
116int ps3_repository_read_dev_intr(unsigned int bus_index,
117 unsigned int dev_index, unsigned int intr_index,
118 enum ps3_interrupt_type *intr_type, unsigned int *interrupt_id);
119int ps3_repository_read_dev_reg_type(unsigned int bus_index,
120 unsigned int dev_index, unsigned int reg_index,
121 enum ps3_reg_type *reg_type);
122int ps3_repository_read_dev_reg_addr(unsigned int bus_index,
123 unsigned int dev_index, unsigned int reg_index, u64 *bus_addr,
124 u64 *len);
125int ps3_repository_read_dev_reg(unsigned int bus_index,
126 unsigned int dev_index, unsigned int reg_index,
127 enum ps3_reg_type *reg_type, u64 *bus_addr, u64 *len);
128
129/* repository bus enumerators */
130
131struct ps3_repository_device {
132 unsigned int bus_index;
133 unsigned int dev_index;
134 struct ps3_device_id did;
135};
136
137int ps3_repository_find_device(enum ps3_bus_type bus_type,
138 enum ps3_dev_type dev_type,
139 const struct ps3_repository_device *start_dev,
140 struct ps3_repository_device *dev);
141static inline int ps3_repository_find_first_device(
142 enum ps3_bus_type bus_type, enum ps3_dev_type dev_type,
143 struct ps3_repository_device *dev)
144{
145 return ps3_repository_find_device(bus_type, dev_type, NULL, dev);
146}
147int ps3_repository_find_interrupt(const struct ps3_repository_device *dev,
148 enum ps3_interrupt_type intr_type, unsigned int *interrupt_id);
149int ps3_repository_find_reg(const struct ps3_repository_device *dev,
150 enum ps3_reg_type reg_type, u64 *bus_addr, u64 *len);
151
152/* repository block device info */
153
154int ps3_repository_read_stor_dev_port(unsigned int bus_index,
155 unsigned int dev_index, u64 *port);
156int ps3_repository_read_stor_dev_blk_size(unsigned int bus_index,
157 unsigned int dev_index, u64 *blk_size);
158int ps3_repository_read_stor_dev_num_blocks(unsigned int bus_index,
159 unsigned int dev_index, u64 *num_blocks);
160int ps3_repository_read_stor_dev_num_regions(unsigned int bus_index,
161 unsigned int dev_index, unsigned int *num_regions);
162int ps3_repository_read_stor_dev_region_id(unsigned int bus_index,
163 unsigned int dev_index, unsigned int region_index,
164 unsigned int *region_id);
165int ps3_repository_read_stor_dev_region_size(unsigned int bus_index,
166 unsigned int dev_index, unsigned int region_index, u64 *region_size);
167int ps3_repository_read_stor_dev_region_start(unsigned int bus_index,
168 unsigned int dev_index, unsigned int region_index, u64 *region_start);
169int ps3_repository_read_stor_dev_info(unsigned int bus_index,
170 unsigned int dev_index, u64 *port, u64 *blk_size,
171 u64 *num_blocks, unsigned int *num_regions);
172int ps3_repository_read_stor_dev_region(unsigned int bus_index,
173 unsigned int dev_index, unsigned int region_index,
174 unsigned int *region_id, u64 *region_start, u64 *region_size);
175
176/* repository pu and memory info */
177
178int ps3_repository_read_num_pu(unsigned int *num_pu);
179int ps3_repository_read_ppe_id(unsigned int *pu_index, unsigned int *ppe_id);
180int ps3_repository_read_rm_base(unsigned int ppe_id, u64 *rm_base);
181int ps3_repository_read_rm_size(unsigned int ppe_id, u64 *rm_size);
182int ps3_repository_read_region_total(u64 *region_total);
183int ps3_repository_read_mm_info(u64 *rm_base, u64 *rm_size,
184 u64 *region_total);
185
186/* repository pme info */
187
188int ps3_repository_read_num_be(unsigned int *num_be);
189int ps3_repository_read_be_node_id(unsigned int be_index, u64 *node_id);
190int ps3_repository_read_tb_freq(u64 node_id, u64 *tb_freq);
191int ps3_repository_read_be_tb_freq(unsigned int be_index, u64 *tb_freq);
192
193/* repository 'Other OS' area */
194
195int ps3_repository_read_boot_dat_addr(u64 *lpar_addr);
196int ps3_repository_read_boot_dat_size(unsigned int *size);
197int ps3_repository_read_boot_dat_info(u64 *lpar_addr, unsigned int *size);
198
199/* repository spu info */
200
201/**
202 * enum spu_resource_type - Type of spu resource.
203 * @spu_resource_type_shared: Logical spu is shared with other partions.
204 * @spu_resource_type_exclusive: Logical spu is not shared with other partions.
205 *
206 * Returned by ps3_repository_read_spu_resource_id().
207 */
208
209enum ps3_spu_resource_type {
210 PS3_SPU_RESOURCE_TYPE_SHARED = 0,
211 PS3_SPU_RESOURCE_TYPE_EXCLUSIVE = 0x8000000000000000UL,
212};
213
214int ps3_repository_read_num_spu_reserved(unsigned int *num_spu_reserved);
215int ps3_repository_read_num_spu_resource_id(unsigned int *num_resource_id);
216int ps3_repository_read_spu_resource_id(unsigned int res_index,
217 enum ps3_spu_resource_type* resource_type, unsigned int *resource_id);
218
68#endif 219#endif
diff --git a/arch/powerpc/platforms/ps3/repository.c b/arch/powerpc/platforms/ps3/repository.c
index 2416bfadec9e..ae586a0e5d3f 100644
--- a/arch/powerpc/platforms/ps3/repository.c
+++ b/arch/powerpc/platforms/ps3/repository.c
@@ -18,9 +18,10 @@
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 19 */
20 20
21#include <asm/ps3.h>
22#include <asm/lv1call.h> 21#include <asm/lv1call.h>
23 22
23#include "platform.h"
24
24enum ps3_vendor_id { 25enum ps3_vendor_id {
25 PS3_VENDOR_ID_NONE = 0, 26 PS3_VENDOR_ID_NONE = 0,
26 PS3_VENDOR_ID_SONY = 0x8000000000000000UL, 27 PS3_VENDOR_ID_SONY = 0x8000000000000000UL,
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c
index cb91a81352bf..e62505e18813 100644
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -32,7 +32,6 @@
32#include <asm/udbg.h> 32#include <asm/udbg.h>
33#include <asm/prom.h> 33#include <asm/prom.h>
34#include <asm/lv1call.h> 34#include <asm/lv1call.h>
35#include <asm/ps3.h>
36 35
37#include "platform.h" 36#include "platform.h"
38 37
diff --git a/arch/powerpc/platforms/ps3/smp.c b/arch/powerpc/platforms/ps3/smp.c
index bde71b0572bd..6fb887961a6d 100644
--- a/arch/powerpc/platforms/ps3/smp.c
+++ b/arch/powerpc/platforms/ps3/smp.c
@@ -23,7 +23,6 @@
23 23
24#include <asm/machdep.h> 24#include <asm/machdep.h>
25#include <asm/udbg.h> 25#include <asm/udbg.h>
26#include <asm/ps3.h>
27 26
28#include "platform.h" 27#include "platform.h"
29 28
diff --git a/arch/powerpc/platforms/ps3/spu.c b/arch/powerpc/platforms/ps3/spu.c
index 9f6edc58568d..d1929721b0e4 100644
--- a/arch/powerpc/platforms/ps3/spu.c
+++ b/arch/powerpc/platforms/ps3/spu.c
@@ -26,9 +26,10 @@
26 26
27#include <asm/spu.h> 27#include <asm/spu.h>
28#include <asm/spu_priv1.h> 28#include <asm/spu_priv1.h>
29#include <asm/ps3.h>
30#include <asm/lv1call.h> 29#include <asm/lv1call.h>
31 30
31#include "platform.h"
32
32/* spu_management_ops */ 33/* spu_management_ops */
33 34
34/** 35/**
diff --git a/drivers/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
index 468bdbcc722c..9f2c6a909e4d 100644
--- a/drivers/ps3/system-bus.c
+++ b/arch/powerpc/platforms/ps3/system-bus.c
@@ -25,10 +25,11 @@
25#include <linux/err.h> 25#include <linux/err.h>
26 26
27#include <asm/udbg.h> 27#include <asm/udbg.h>
28#include <asm/ps3.h>
29#include <asm/lv1call.h> 28#include <asm/lv1call.h>
30#include <asm/firmware.h> 29#include <asm/firmware.h>
31 30
31#include "platform.h"
32
32#define dump_mmio_region(_a) _dump_mmio_region(_a, __func__, __LINE__) 33#define dump_mmio_region(_a) _dump_mmio_region(_a, __func__, __LINE__)
33static void _dump_mmio_region(const struct ps3_mmio_region* r, 34static void _dump_mmio_region(const struct ps3_mmio_region* r,
34 const char* func, int line) 35 const char* func, int line)
@@ -158,7 +159,7 @@ static int ps3_system_bus_remove(struct device *_dev)
158} 159}
159 160
160struct bus_type ps3_system_bus_type = { 161struct bus_type ps3_system_bus_type = {
161 .name = "ps3_system_bus", 162 .name = "ps3_system_bus",
162 .match = ps3_system_bus_match, 163 .match = ps3_system_bus_match,
163 .probe = ps3_system_bus_probe, 164 .probe = ps3_system_bus_probe,
164 .remove = ps3_system_bus_remove, 165 .remove = ps3_system_bus_remove,
diff --git a/drivers/ps3/Makefile b/drivers/ps3/Makefile
index 8433eb7562cb..d547cf50ca9d 100644
--- a/drivers/ps3/Makefile
+++ b/drivers/ps3/Makefile
@@ -1,2 +1 @@
1obj-y += system-bus.o
2obj-$(CONFIG_PS3_VUART) += vuart.o obj-$(CONFIG_PS3_VUART) += vuart.o
diff --git a/include/asm-powerpc/ps3.h b/include/asm-powerpc/ps3.h
index 59ae9d7bf6a7..873aab042c70 100644
--- a/include/asm-powerpc/ps3.h
+++ b/include/asm-powerpc/ps3.h
@@ -24,7 +24,6 @@
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/types.h> 25#include <linux/types.h>
26#include <linux/device.h> 26#include <linux/device.h>
27#include <scsi/scsi.h>
28 27
29union ps3_firmware_version { 28union ps3_firmware_version {
30 u64 raw; 29 u64 raw;
@@ -282,155 +281,6 @@ static inline const char* ps3_result(int result)
282#endif 281#endif
283} 282}
284 283
285/* repository bus info */
286
287enum ps3_bus_type {
288 PS3_BUS_TYPE_SB = 4,
289 PS3_BUS_TYPE_STORAGE = 5,
290};
291
292enum ps3_dev_type {
293 PS3_DEV_TYPE_STOR_DISK = TYPE_DISK, /* 0 */
294 PS3_DEV_TYPE_SB_GELIC = 3,
295 PS3_DEV_TYPE_SB_USB = 4,
296 PS3_DEV_TYPE_STOR_ROM = TYPE_ROM, /* 5 */
297 PS3_DEV_TYPE_SB_GPIO = 6,
298 PS3_DEV_TYPE_STOR_FLASH = TYPE_RBC, /* 14 */
299};
300
301int ps3_repository_read_bus_str(unsigned int bus_index, const char *bus_str,
302 u64 *value);
303int ps3_repository_read_bus_id(unsigned int bus_index, unsigned int *bus_id);
304int ps3_repository_read_bus_type(unsigned int bus_index,
305 enum ps3_bus_type *bus_type);
306int ps3_repository_read_bus_num_dev(unsigned int bus_index,
307 unsigned int *num_dev);
308
309/* repository bus device info */
310
311enum ps3_interrupt_type {
312 PS3_INTERRUPT_TYPE_EVENT_PORT = 2,
313 PS3_INTERRUPT_TYPE_SB_OHCI = 3,
314 PS3_INTERRUPT_TYPE_SB_EHCI = 4,
315 PS3_INTERRUPT_TYPE_OTHER = 5,
316};
317
318enum ps3_reg_type {
319 PS3_REG_TYPE_SB_OHCI = 3,
320 PS3_REG_TYPE_SB_EHCI = 4,
321 PS3_REG_TYPE_SB_GPIO = 5,
322};
323
324int ps3_repository_read_dev_str(unsigned int bus_index,
325 unsigned int dev_index, const char *dev_str, u64 *value);
326int ps3_repository_read_dev_id(unsigned int bus_index, unsigned int dev_index,
327 unsigned int *dev_id);
328int ps3_repository_read_dev_type(unsigned int bus_index,
329 unsigned int dev_index, enum ps3_dev_type *dev_type);
330int ps3_repository_read_dev_intr(unsigned int bus_index,
331 unsigned int dev_index, unsigned int intr_index,
332 enum ps3_interrupt_type *intr_type, unsigned int *interrupt_id);
333int ps3_repository_read_dev_reg_type(unsigned int bus_index,
334 unsigned int dev_index, unsigned int reg_index,
335 enum ps3_reg_type *reg_type);
336int ps3_repository_read_dev_reg_addr(unsigned int bus_index,
337 unsigned int dev_index, unsigned int reg_index, u64 *bus_addr,
338 u64 *len);
339int ps3_repository_read_dev_reg(unsigned int bus_index,
340 unsigned int dev_index, unsigned int reg_index,
341 enum ps3_reg_type *reg_type, u64 *bus_addr, u64 *len);
342
343/* repository bus enumerators */
344
345struct ps3_repository_device {
346 unsigned int bus_index;
347 unsigned int dev_index;
348 struct ps3_device_id did;
349};
350
351int ps3_repository_find_device(enum ps3_bus_type bus_type,
352 enum ps3_dev_type dev_type,
353 const struct ps3_repository_device *start_dev,
354 struct ps3_repository_device *dev);
355static inline int ps3_repository_find_first_device(
356 enum ps3_bus_type bus_type, enum ps3_dev_type dev_type,
357 struct ps3_repository_device *dev)
358{
359 return ps3_repository_find_device(bus_type, dev_type, NULL, dev);
360}
361int ps3_repository_find_interrupt(const struct ps3_repository_device *dev,
362 enum ps3_interrupt_type intr_type, unsigned int *interrupt_id);
363int ps3_repository_find_reg(const struct ps3_repository_device *dev,
364 enum ps3_reg_type reg_type, u64 *bus_addr, u64 *len);
365
366/* repository block device info */
367
368int ps3_repository_read_stor_dev_port(unsigned int bus_index,
369 unsigned int dev_index, u64 *port);
370int ps3_repository_read_stor_dev_blk_size(unsigned int bus_index,
371 unsigned int dev_index, u64 *blk_size);
372int ps3_repository_read_stor_dev_num_blocks(unsigned int bus_index,
373 unsigned int dev_index, u64 *num_blocks);
374int ps3_repository_read_stor_dev_num_regions(unsigned int bus_index,
375 unsigned int dev_index, unsigned int *num_regions);
376int ps3_repository_read_stor_dev_region_id(unsigned int bus_index,
377 unsigned int dev_index, unsigned int region_index,
378 unsigned int *region_id);
379int ps3_repository_read_stor_dev_region_size(unsigned int bus_index,
380 unsigned int dev_index, unsigned int region_index, u64 *region_size);
381int ps3_repository_read_stor_dev_region_start(unsigned int bus_index,
382 unsigned int dev_index, unsigned int region_index, u64 *region_start);
383int ps3_repository_read_stor_dev_info(unsigned int bus_index,
384 unsigned int dev_index, u64 *port, u64 *blk_size,
385 u64 *num_blocks, unsigned int *num_regions);
386int ps3_repository_read_stor_dev_region(unsigned int bus_index,
387 unsigned int dev_index, unsigned int region_index,
388 unsigned int *region_id, u64 *region_start, u64 *region_size);
389
390/* repository pu and memory info */
391
392int ps3_repository_read_num_pu(unsigned int *num_pu);
393int ps3_repository_read_ppe_id(unsigned int *pu_index, unsigned int *ppe_id);
394int ps3_repository_read_rm_base(unsigned int ppe_id, u64 *rm_base);
395int ps3_repository_read_rm_size(unsigned int ppe_id, u64 *rm_size);
396int ps3_repository_read_region_total(u64 *region_total);
397int ps3_repository_read_mm_info(u64 *rm_base, u64 *rm_size,
398 u64 *region_total);
399
400/* repository pme info */
401
402int ps3_repository_read_num_be(unsigned int *num_be);
403int ps3_repository_read_be_node_id(unsigned int be_index, u64 *node_id);
404int ps3_repository_read_tb_freq(u64 node_id, u64 *tb_freq);
405int ps3_repository_read_be_tb_freq(unsigned int be_index, u64 *tb_freq);
406
407/* repository 'Other OS' area */
408
409int ps3_repository_read_boot_dat_addr(u64 *lpar_addr);
410int ps3_repository_read_boot_dat_size(unsigned int *size);
411int ps3_repository_read_boot_dat_info(u64 *lpar_addr, unsigned int *size);
412
413/* repository spu info */
414
415/**
416 * enum spu_resource_type - Type of spu resource.
417 * @spu_resource_type_shared: Logical spu is shared with other partions.
418 * @spu_resource_type_exclusive: Logical spu is not shared with other partions.
419 *
420 * Returned by ps3_repository_read_spu_resource_id().
421 */
422
423enum ps3_spu_resource_type {
424 PS3_SPU_RESOURCE_TYPE_SHARED = 0,
425 PS3_SPU_RESOURCE_TYPE_EXCLUSIVE = 0x8000000000000000UL,
426};
427
428int ps3_repository_read_num_spu_reserved(unsigned int *num_spu_reserved);
429int ps3_repository_read_num_spu_resource_id(unsigned int *num_resource_id);
430int ps3_repository_read_spu_resource_id(unsigned int res_index,
431 enum ps3_spu_resource_type* resource_type, unsigned int *resource_id);
432
433
434/* system bus routines */ 284/* system bus routines */
435 285
436enum ps3_match_id { 286enum ps3_match_id {