WIP FPC-III support
[linux/fpc-iii.git] / arch / powerpc / include / asm / ps3stor.h
blob1d8279014f22692660189064c33ee661d881d97b
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * PS3 Storage Devices
5 * Copyright (C) 2007 Sony Computer Entertainment Inc.
6 * Copyright 2007 Sony Corp.
7 */
9 #ifndef _ASM_POWERPC_PS3STOR_H_
10 #define _ASM_POWERPC_PS3STOR_H_
12 #include <linux/interrupt.h>
14 #include <asm/ps3.h>
17 struct ps3_storage_region {
18 unsigned int id;
19 u64 start;
20 u64 size;
23 struct ps3_storage_device {
24 struct ps3_system_bus_device sbd;
26 struct ps3_dma_region dma_region;
27 unsigned int irq;
28 u64 blk_size;
30 u64 tag;
31 u64 lv1_status;
32 struct completion done;
34 unsigned long bounce_size;
35 void *bounce_buf;
36 u64 bounce_lpar;
37 dma_addr_t bounce_dma;
39 unsigned int num_regions;
40 unsigned long accessible_regions;
41 unsigned int region_idx; /* first accessible region */
42 struct ps3_storage_region regions[]; /* Must be last */
45 static inline struct ps3_storage_device *to_ps3_storage_device(struct device *dev)
47 return container_of(dev, struct ps3_storage_device, sbd.core);
50 extern int ps3stor_setup(struct ps3_storage_device *dev,
51 irq_handler_t handler);
52 extern void ps3stor_teardown(struct ps3_storage_device *dev);
53 extern u64 ps3stor_read_write_sectors(struct ps3_storage_device *dev, u64 lpar,
54 u64 start_sector, u64 sectors,
55 int write);
56 extern u64 ps3stor_send_command(struct ps3_storage_device *dev, u64 cmd,
57 u64 arg1, u64 arg2, u64 arg3, u64 arg4);
59 #endif /* _ASM_POWERPC_PS3STOR_H_ */