1 /* SPDX-License-Identifier: GPL-2.0-only */
5 * Copyright (C) 2007 Sony Computer Entertainment Inc.
6 * Copyright 2007 Sony Corp.
9 #ifndef _ASM_POWERPC_PS3STOR_H_
10 #define _ASM_POWERPC_PS3STOR_H_
12 #include <linux/interrupt.h>
17 struct ps3_storage_region
{
23 struct ps3_storage_device
{
24 struct ps3_system_bus_device sbd
;
26 struct ps3_dma_region dma_region
;
32 struct completion done
;
34 unsigned long bounce_size
;
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
,
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_ */