00001 /* clib/include/bus/ops.h 00002 * 00003 * ABLE bus operations 00004 * 00005 * Copyright 2003 Simtec Electronics 00006 * 00007 * Permission is hereby granted, free of charge, to any person 00008 * obtaining a copy of this software and associated documentation 00009 * files (the "Software"), to deal in the Software without 00010 * restriction, including without limitation the rights to use, copy, 00011 * modify, merge, publish, distribute, sublicense, and/or sell copies 00012 * of the Software, and to permit persons to whom the Software is 00013 * furnished to do so, subject to the following conditions: 00014 * 00015 * The above copyright notice and this permission notice shall be 00016 * included in all copies or substantial portions of the Software. 00017 * 00018 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00019 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00020 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00021 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 00022 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 00023 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 00024 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 00025 * SOFTWARE. 00026 * 00027 */ 00028 00029 #ifndef _ABLE_CLIB_BUS_OPS_H 00030 #define _ABLE_CLIB_BUS_OPS_H 1 00031 00032 typedef __u32 busop_t; 00033 00034 extern int bus_op(struct bus *bus, busop_t op, void *arg); 00035 00036 #define BUSOP_COMMON (0x00000000) 00037 00038 #define BUSOP_PRINT (BUSOP_COMMON | 0x0001) 00039 #define BUSOP_PRINTDEV (BUSOP_COMMON | 0x0002) 00040 #define BUSOP_IRQMAP (BUSOP_COMMON | 0x0003) 00041 #define BUSOP_GETIOAREA (BUSOP_COMMON | 0x0004) 00042 00043 #define DEVOP_IRQMAP BUSOP_IRQMAP 00044 00045 #define BUSOP_I2C (0xc0000000) 00046 #define BUSOP_I2C_READ (BUSOP_I2C | 0x01) 00047 #define BUSOP_I2C_WRITE (BUSOP_I2C | 0x02) 00048 00049 #define BUSOP_DEV (0xe0000000) 00050 00051 #define DEVOP_MAP_IO (BUSOP_DEV | 0x01) 00052 00053 #define DEVOP_IDE (BUSOP_DEV | 0x10) 00054 00055 #define BUSOP_PCI (0xf0000000) 00056 00057 #define BUSOP_CLASS(x) ((x) & 0xffff0000) 00058 #define BUSOP_OP(x) ((x) & 0x0000ffff) 00059 00060 #endif /* _ABLE_CLIB_BUS_OPS_H */