diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-sh/bus-sh.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/asm-sh/bus-sh.h')
-rw-r--r-- | include/asm-sh/bus-sh.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/include/asm-sh/bus-sh.h b/include/asm-sh/bus-sh.h new file mode 100644 index 000000000000..f782a33a98fa --- /dev/null +++ b/include/asm-sh/bus-sh.h | |||
@@ -0,0 +1,65 @@ | |||
1 | /* | ||
2 | * include/asm-sh/bus-sh.h | ||
3 | * | ||
4 | * Copyright (C) 2004 Paul Mundt | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | #ifndef __ASM_SH_BUS_SH_H | ||
11 | #define __ASM_SH_BUS_SH_H | ||
12 | |||
13 | extern struct bus_type sh_bus_types[]; | ||
14 | |||
15 | struct sh_dev { | ||
16 | struct device dev; | ||
17 | char *name; | ||
18 | unsigned int dev_id; | ||
19 | unsigned int bus_id; | ||
20 | struct resource res; | ||
21 | void *mapbase; | ||
22 | unsigned int irq[6]; | ||
23 | u64 *dma_mask; | ||
24 | }; | ||
25 | |||
26 | #define to_sh_dev(d) container_of((d), struct sh_dev, dev) | ||
27 | |||
28 | #define sh_get_drvdata(d) dev_get_drvdata(&(d)->dev) | ||
29 | #define sh_set_drvdata(d,p) dev_set_drvdata(&(d)->dev, (p)) | ||
30 | |||
31 | struct sh_driver { | ||
32 | struct device_driver drv; | ||
33 | unsigned int dev_id; | ||
34 | unsigned int bus_id; | ||
35 | int (*probe)(struct sh_dev *); | ||
36 | int (*remove)(struct sh_dev *); | ||
37 | int (*suspend)(struct sh_dev *, u32); | ||
38 | int (*resume)(struct sh_dev *); | ||
39 | }; | ||
40 | |||
41 | #define to_sh_driver(d) container_of((d), struct sh_driver, drv) | ||
42 | #define sh_name(d) ((d)->dev.driver->name) | ||
43 | |||
44 | /* | ||
45 | * Device ID numbers for bus types | ||
46 | */ | ||
47 | enum { | ||
48 | SH_DEV_ID_USB_OHCI, | ||
49 | }; | ||
50 | |||
51 | #define SH_NR_BUSES 1 | ||
52 | #define SH_BUS_NAME_VIRT "shbus" | ||
53 | |||
54 | enum { | ||
55 | SH_BUS_VIRT, | ||
56 | }; | ||
57 | |||
58 | /* arch/sh/kernel/cpu/bus.c */ | ||
59 | extern int sh_device_register(struct sh_dev *dev); | ||
60 | extern void sh_device_unregister(struct sh_dev *dev); | ||
61 | extern int sh_driver_register(struct sh_driver *drv); | ||
62 | extern void sh_driver_unregister(struct sh_driver *drv); | ||
63 | |||
64 | #endif /* __ASM_SH_BUS_SH_H */ | ||
65 | |||