Markus Lidel | 9e87545 | 2005-06-23 22:02:21 -0700 | [diff] [blame] | 1 | /* |
| 2 | * I2O core internal declarations |
| 3 | * |
| 4 | * Copyright (C) 2005 Markus Lidel <Markus.Lidel@shadowconnect.com> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * under the terms of the GNU General Public License as published by the |
| 8 | * Free Software Foundation; either version 2 of the License, or (at your |
| 9 | * option) any later version. |
| 10 | * |
| 11 | * Fixes/additions: |
| 12 | * Markus Lidel <Markus.Lidel@shadowconnect.com> |
| 13 | * initial version. |
| 14 | */ |
| 15 | |
| 16 | /* Exec-OSM */ |
Markus Lidel | 9e87545 | 2005-06-23 22:02:21 -0700 | [diff] [blame] | 17 | extern struct i2o_driver i2o_exec_driver; |
| 18 | extern int i2o_exec_lct_get(struct i2o_controller *); |
| 19 | |
| 20 | extern int __init i2o_exec_init(void); |
Ralf Baechle | d784372 | 2006-12-13 00:33:53 -0800 | [diff] [blame] | 21 | extern void i2o_exec_exit(void); |
Markus Lidel | 9e87545 | 2005-06-23 22:02:21 -0700 | [diff] [blame] | 22 | |
| 23 | /* driver */ |
Markus Lidel | 2e1973a | 2006-01-06 00:19:32 -0800 | [diff] [blame] | 24 | extern struct bus_type i2o_bus_type; |
| 25 | |
Markus Lidel | 9e87545 | 2005-06-23 22:02:21 -0700 | [diff] [blame] | 26 | extern int i2o_driver_dispatch(struct i2o_controller *, u32); |
| 27 | |
| 28 | extern int __init i2o_driver_init(void); |
Ralf Baechle | d784372 | 2006-12-13 00:33:53 -0800 | [diff] [blame] | 29 | extern void i2o_driver_exit(void); |
Markus Lidel | 9e87545 | 2005-06-23 22:02:21 -0700 | [diff] [blame] | 30 | |
| 31 | /* PCI */ |
| 32 | extern int __init i2o_pci_init(void); |
| 33 | extern void __exit i2o_pci_exit(void); |
| 34 | |
| 35 | /* device */ |
Greg Kroah-Hartman | ba6857b | 2013-10-07 18:27:42 -0700 | [diff] [blame] | 36 | extern const struct attribute_group *i2o_device_groups[]; |
Markus Lidel | 24791bd | 2006-01-06 00:19:31 -0800 | [diff] [blame] | 37 | |
Markus Lidel | 9e87545 | 2005-06-23 22:02:21 -0700 | [diff] [blame] | 38 | extern void i2o_device_remove(struct i2o_device *); |
| 39 | extern int i2o_device_parse_lct(struct i2o_controller *); |
| 40 | |
Adrian Bunk | e62c23c | 2006-07-10 04:45:40 -0700 | [diff] [blame] | 41 | int i2o_parm_issue(struct i2o_device *i2o_dev, int cmd, void *oplist, |
| 42 | int oplen, void *reslist, int reslen); |
| 43 | |
Markus Lidel | 9e87545 | 2005-06-23 22:02:21 -0700 | [diff] [blame] | 44 | /* IOP */ |
| 45 | extern struct i2o_controller *i2o_iop_alloc(void); |
Markus Lidel | f6ed39a | 2006-01-06 00:19:33 -0800 | [diff] [blame] | 46 | |
| 47 | /** |
| 48 | * i2o_iop_free - Free the i2o_controller struct |
| 49 | * @c: I2O controller to free |
| 50 | */ |
| 51 | static inline void i2o_iop_free(struct i2o_controller *c) |
| 52 | { |
| 53 | i2o_pool_free(&c->in_msg); |
| 54 | kfree(c); |
| 55 | } |
Markus Lidel | 9e87545 | 2005-06-23 22:02:21 -0700 | [diff] [blame] | 56 | |
| 57 | extern int i2o_iop_add(struct i2o_controller *); |
| 58 | extern void i2o_iop_remove(struct i2o_controller *); |
| 59 | |
Markus Lidel | 9e87545 | 2005-06-23 22:02:21 -0700 | [diff] [blame] | 60 | /* control registers relative to c->base */ |
| 61 | #define I2O_IRQ_STATUS 0x30 |
| 62 | #define I2O_IRQ_MASK 0x34 |
| 63 | #define I2O_IN_PORT 0x40 |
| 64 | #define I2O_OUT_PORT 0x44 |
| 65 | |
Markus Lidel | 8b3e09e | 2006-02-03 03:04:29 -0800 | [diff] [blame] | 66 | /* Motorola/Freescale specific register offset */ |
| 67 | #define I2O_MOTOROLA_PORT_OFFSET 0x10400 |
| 68 | |
Markus Lidel | 9e87545 | 2005-06-23 22:02:21 -0700 | [diff] [blame] | 69 | #define I2O_IRQ_OUTBOUND_POST 0x00000008 |