aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-topology.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2009-06-05 10:26:18 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2009-06-05 10:26:18 -0400
commit77c9a5daa9c4d9b37812c9c69c7bcbb3f9399c3c (patch)
tree54ea3c48e0663ef1b9f227ffff7710f0ea03f9a1 /drivers/firewire/fw-topology.c
parente8ca97021c8eb127bb04aec4e2420e1d66be371d (diff)
firewire: reorganize header files
The three header files of firewire-core, i.e. "drivers/firewire/fw-device.h", "drivers/firewire/fw-topology.h", "drivers/firewire/fw-transaction.h", are replaced by "drivers/firewire/core.h", "include/linux/firewire.h". The latter includes everything which a firewire high-level driver (like firewire-sbp2) needs besides linux/firewire-constants.h, while core.h contains the rest which is needed by firewire-core itself and by low- level drivers (card drivers) like firewire-ohci. High-level drivers can now also reside outside of drivers/firewire without having to add drivers/firewire to the header file search path in makefiles. At least the firedtv driver will be such a driver. I also considered to spread the contents of core.h over several files, one for each .c file where the respective implementation resides. But it turned out that most core .c files will end up including most of the core .h files. Also, the combined core.h isn't unreasonably big, and it will lose more of its contents to linux/firewire.h anyway soon when more firewire drivers are added. (IP-over-1394, firedtv, and there are plans for one or two more.) Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and ohci.h is chosen with regard to name changes of the .c files in a follow-up change. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-topology.c')
-rw-r--r--drivers/firewire/fw-topology.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/firewire/fw-topology.c b/drivers/firewire/fw-topology.c
index 6d0ea1bb7e23..fddf2b358936 100644
--- a/drivers/firewire/fw-topology.c
+++ b/drivers/firewire/fw-topology.c
@@ -20,6 +20,8 @@
20 20
21#include <linux/bug.h> 21#include <linux/bug.h>
22#include <linux/errno.h> 22#include <linux/errno.h>
23#include <linux/firewire.h>
24#include <linux/firewire-constants.h>
23#include <linux/jiffies.h> 25#include <linux/jiffies.h>
24#include <linux/kernel.h> 26#include <linux/kernel.h>
25#include <linux/list.h> 27#include <linux/list.h>
@@ -31,8 +33,7 @@
31#include <asm/atomic.h> 33#include <asm/atomic.h>
32#include <asm/system.h> 34#include <asm/system.h>
33 35
34#include "fw-topology.h" 36#include "core.h"
35#include "fw-transaction.h"
36 37
37#define SELF_ID_PHY_ID(q) (((q) >> 24) & 0x3f) 38#define SELF_ID_PHY_ID(q) (((q) >> 24) & 0x3f)
38#define SELF_ID_EXTENDED(q) (((q) >> 23) & 0x01) 39#define SELF_ID_EXTENDED(q) (((q) >> 23) & 0x01)
@@ -45,6 +46,11 @@
45 46
46#define SELF_ID_EXT_SEQUENCE(q) (((q) >> 20) & 0x07) 47#define SELF_ID_EXT_SEQUENCE(q) (((q) >> 20) & 0x07)
47 48
49#define SELFID_PORT_CHILD 0x3
50#define SELFID_PORT_PARENT 0x2
51#define SELFID_PORT_NCONN 0x1
52#define SELFID_PORT_NONE 0x0
53
48static u32 *count_ports(u32 *sid, int *total_port_count, int *child_port_count) 54static u32 *count_ports(u32 *sid, int *total_port_count, int *child_port_count)
49{ 55{
50 u32 q; 56 u32 q;