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/linux/superhyway.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/linux/superhyway.h')
-rw-r--r-- | include/linux/superhyway.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/include/linux/superhyway.h b/include/linux/superhyway.h new file mode 100644 index 000000000000..c906c5a0aaef --- /dev/null +++ b/include/linux/superhyway.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | * include/linux/superhyway.h | ||
3 | * | ||
4 | * SuperHyway Bus definitions | ||
5 | * | ||
6 | * Copyright (C) 2004, 2005 Paul Mundt <lethal@linux-sh.org> | ||
7 | * | ||
8 | * This file is subject to the terms and conditions of the GNU General Public | ||
9 | * License. See the file "COPYING" in the main directory of this archive | ||
10 | * for more details. | ||
11 | */ | ||
12 | #ifndef __LINUX_SUPERHYWAY_H | ||
13 | #define __LINUX_SUPERHYWAY_H | ||
14 | |||
15 | #include <linux/device.h> | ||
16 | |||
17 | /* | ||
18 | * SuperHyway IDs | ||
19 | */ | ||
20 | #define SUPERHYWAY_DEVICE_ID_SH5_DMAC 0x0183 | ||
21 | |||
22 | struct vcr_info { | ||
23 | u8 perr_flags; /* P-port Error flags */ | ||
24 | u8 merr_flags; /* Module Error flags */ | ||
25 | u16 mod_vers; /* Module Version */ | ||
26 | u16 mod_id; /* Module ID */ | ||
27 | u8 bot_mb; /* Bottom Memory block */ | ||
28 | u8 top_mb; /* Top Memory block */ | ||
29 | }; | ||
30 | |||
31 | struct superhyway_device_id { | ||
32 | unsigned int id; | ||
33 | unsigned long driver_data; | ||
34 | }; | ||
35 | |||
36 | struct superhyway_device; | ||
37 | extern struct bus_type superhyway_bus_type; | ||
38 | |||
39 | struct superhyway_driver { | ||
40 | char *name; | ||
41 | |||
42 | const struct superhyway_device_id *id_table; | ||
43 | struct device_driver drv; | ||
44 | |||
45 | int (*probe)(struct superhyway_device *dev, const struct superhyway_device_id *id); | ||
46 | void (*remove)(struct superhyway_device *dev); | ||
47 | }; | ||
48 | |||
49 | #define to_superhyway_driver(d) container_of((d), struct superhyway_driver, drv) | ||
50 | |||
51 | struct superhyway_device { | ||
52 | char name[32]; | ||
53 | |||
54 | struct device dev; | ||
55 | |||
56 | struct superhyway_device_id id; | ||
57 | struct superhyway_driver *drv; | ||
58 | |||
59 | struct resource resource; | ||
60 | struct vcr_info vcr; | ||
61 | }; | ||
62 | |||
63 | #define to_superhyway_device(d) container_of((d), struct superhyway_device, dev) | ||
64 | |||
65 | #define superhyway_get_drvdata(d) dev_get_drvdata(&(d)->dev) | ||
66 | #define superhyway_set_drvdata(d,p) dev_set_drvdata(&(d)->dev, (p)) | ||
67 | |||
68 | extern int superhyway_scan_bus(void); | ||
69 | |||
70 | /* drivers/sh/superhyway/superhyway.c */ | ||
71 | int superhyway_register_driver(struct superhyway_driver *); | ||
72 | void superhyway_unregister_driver(struct superhyway_driver *); | ||
73 | int superhyway_add_device(unsigned int, unsigned long, unsigned long long); | ||
74 | |||
75 | /* drivers/sh/superhyway/superhyway-sysfs.c */ | ||
76 | extern struct device_attribute superhyway_dev_attrs[]; | ||
77 | |||
78 | #endif /* __LINUX_SUPERHYWAY_H */ | ||
79 | |||