blob: 184974cc734de25f852d971d0983fcbc20219c10 [file] [log] [blame]
Markus Lidel9e875452005-06-23 22:02:21 -07001/*
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 Lidel9e875452005-06-23 22:02:21 -070017extern struct i2o_driver i2o_exec_driver;
18extern int i2o_exec_lct_get(struct i2o_controller *);
19
20extern int __init i2o_exec_init(void);
21extern void __exit i2o_exec_exit(void);
22
23/* driver */
Markus Lidel2e1973a2006-01-06 00:19:32 -080024extern struct bus_type i2o_bus_type;
25
Markus Lidel9e875452005-06-23 22:02:21 -070026extern int i2o_driver_dispatch(struct i2o_controller *, u32);
27
28extern int __init i2o_driver_init(void);
29extern void __exit i2o_driver_exit(void);
30
31/* PCI */
32extern int __init i2o_pci_init(void);
33extern void __exit i2o_pci_exit(void);
34
35/* device */
Markus Lidel24791bd2006-01-06 00:19:31 -080036extern struct device_attribute i2o_device_attrs[];
37
Markus Lidel9e875452005-06-23 22:02:21 -070038extern void i2o_device_remove(struct i2o_device *);
39extern int i2o_device_parse_lct(struct i2o_controller *);
40
Markus Lidel9e875452005-06-23 22:02:21 -070041/* IOP */
42extern struct i2o_controller *i2o_iop_alloc(void);
Markus Lidelf6ed39a2006-01-06 00:19:33 -080043
44/**
45 * i2o_iop_free - Free the i2o_controller struct
46 * @c: I2O controller to free
47 */
48static inline void i2o_iop_free(struct i2o_controller *c)
49{
50 i2o_pool_free(&c->in_msg);
51 kfree(c);
52}
Markus Lidel9e875452005-06-23 22:02:21 -070053
54extern int i2o_iop_add(struct i2o_controller *);
55extern void i2o_iop_remove(struct i2o_controller *);
56
Markus Lidel9e875452005-06-23 22:02:21 -070057/* control registers relative to c->base */
58#define I2O_IRQ_STATUS 0x30
59#define I2O_IRQ_MASK 0x34
60#define I2O_IN_PORT 0x40
61#define I2O_OUT_PORT 0x44
62
Markus Lidel8b3e09e2006-02-03 03:04:29 -080063/* Motorola/Freescale specific register offset */
64#define I2O_MOTOROLA_PORT_OFFSET 0x10400
65
Markus Lidel9e875452005-06-23 22:02:21 -070066#define I2O_IRQ_OUTBOUND_POST 0x00000008