diff options
author | Andreas Noever <andreas.noever@gmail.com> | 2014-06-04 00:04:01 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-20 01:07:07 +0400 |
commit | 7adf60972c692b0b3d0958cd7322e22a67187111 (patch) | |
tree | 08b992f201dda4a6a2c545c2dce7b4620f72a5ca /drivers/thunderbolt/tb.c | |
parent | d6cc51cd1a4aed1d9e2dd66d643d729acb4be560 (diff) | |
download | linux-7adf60972c692b0b3d0958cd7322e22a67187111.tar.xz |
thunderbolt: Add tb_regs.h
Every thunderbolt device consists (logically) of a switch with multiple
ports. Every port contains up to four config regions (HOPS, PORT,
SWITCH, COUNTERS) which are used to configure the device.
The tb_regs.h file contains all known registers and capabilities from
these config regions.
Signed-off-by: Andreas Noever <andreas.noever@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/thunderbolt/tb.c')
-rw-r--r-- | drivers/thunderbolt/tb.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c index 6920979c5b14..164dea083e9e 100644 --- a/drivers/thunderbolt/tb.c +++ b/drivers/thunderbolt/tb.c @@ -9,6 +9,7 @@ #include <linux/delay.h> #include "tb.h" +#include "tb_regs.h" /* hotplug handling */ @@ -100,6 +101,10 @@ struct tb *thunderbolt_alloc_and_start(struct tb_nhi *nhi) { struct tb *tb; + BUILD_BUG_ON(sizeof(struct tb_regs_switch_header) != 5 * 4); + BUILD_BUG_ON(sizeof(struct tb_regs_port_header) != 8 * 4); + BUILD_BUG_ON(sizeof(struct tb_regs_hop) != 2 * 4); + tb = kzalloc(sizeof(*tb), GFP_KERNEL); if (!tb) return NULL; |