[ARM] Fix buggy __phys_to_pfn / __pfn_to_phys
[linux-2.6/btrfs-unstable.git] / include / linux / superhyway.h
blobc906c5a0aaefadb6f93f53f45ce25f9b3ff62d2f
1 /*
2 * include/linux/superhyway.h
4 * SuperHyway Bus definitions
6 * Copyright (C) 2004, 2005 Paul Mundt <lethal@linux-sh.org>
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.
12 #ifndef __LINUX_SUPERHYWAY_H
13 #define __LINUX_SUPERHYWAY_H
15 #include <linux/device.h>
18 * SuperHyway IDs
20 #define SUPERHYWAY_DEVICE_ID_SH5_DMAC 0x0183
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 */
31 struct superhyway_device_id {
32 unsigned int id;
33 unsigned long driver_data;
36 struct superhyway_device;
37 extern struct bus_type superhyway_bus_type;
39 struct superhyway_driver {
40 char *name;
42 const struct superhyway_device_id *id_table;
43 struct device_driver drv;
45 int (*probe)(struct superhyway_device *dev, const struct superhyway_device_id *id);
46 void (*remove)(struct superhyway_device *dev);
49 #define to_superhyway_driver(d) container_of((d), struct superhyway_driver, drv)
51 struct superhyway_device {
52 char name[32];
54 struct device dev;
56 struct superhyway_device_id id;
57 struct superhyway_driver *drv;
59 struct resource resource;
60 struct vcr_info vcr;
63 #define to_superhyway_device(d) container_of((d), struct superhyway_device, dev)
65 #define superhyway_get_drvdata(d) dev_get_drvdata(&(d)->dev)
66 #define superhyway_set_drvdata(d,p) dev_set_drvdata(&(d)->dev, (p))
68 extern int superhyway_scan_bus(void);
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);
75 /* drivers/sh/superhyway/superhyway-sysfs.c */
76 extern struct device_attribute superhyway_dev_attrs[];
78 #endif /* __LINUX_SUPERHYWAY_H */