Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ps3stor.h
Go to the documentation of this file.
1 /*
2  * PS3 Storage Devices
3  *
4  * Copyright (C) 2007 Sony Computer Entertainment Inc.
5  * Copyright 2007 Sony Corp.
6  *
7  * This program is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU General Public License as published
9  * by the Free Software Foundation; version 2 of the License.
10  *
11  * This program is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #ifndef _ASM_POWERPC_PS3STOR_H_
22 #define _ASM_POWERPC_PS3STOR_H_
23 
24 #include <linux/interrupt.h>
25 
26 #include <asm/ps3.h>
27 
28 
30  unsigned int id;
33 };
34 
37 
39  unsigned int irq;
41 
44  struct completion done;
45 
46  unsigned long bounce_size;
47  void *bounce_buf;
50 
51  unsigned int num_regions;
52  unsigned long accessible_regions;
53  unsigned int region_idx; /* first accessible region */
54  struct ps3_storage_region regions[0]; /* Must be last */
55 };
56 
57 static inline struct ps3_storage_device *to_ps3_storage_device(struct device *dev)
58 {
59  return container_of(dev, struct ps3_storage_device, sbd.core);
60 }
61 
62 extern int ps3stor_setup(struct ps3_storage_device *dev,
63  irq_handler_t handler);
64 extern void ps3stor_teardown(struct ps3_storage_device *dev);
67  int write);
70 
71 #endif /* _ASM_POWERPC_PS3STOR_H_ */