source: svn/trunk/newcon3bcm2_21bu/toolchain/mips-linux-uclibc/include/linux/superhyway.h @ 2

Last change on this file since 2 was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 2.0 KB
Line 
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
22struct 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
31struct superhyway_device_id {
32        unsigned int id;
33        unsigned long driver_data;
34};
35
36struct superhyway_device;
37extern struct bus_type superhyway_bus_type;
38
39struct 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
51struct 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
68extern int superhyway_scan_bus(void);
69
70/* drivers/sh/superhyway/superhyway.c */
71int superhyway_register_driver(struct superhyway_driver *);
72void superhyway_unregister_driver(struct superhyway_driver *);
73int superhyway_add_device(unsigned int, unsigned long, unsigned long long);
74
75/* drivers/sh/superhyway/superhyway-sysfs.c */
76extern struct device_attribute superhyway_dev_attrs[];
77
78#endif /* __LINUX_SUPERHYWAY_H */
79
Note: See TracBrowser for help on using the repository browser.