hellcreek.h (e4b27ebc780fa7fa951d81d241912755532568ff) | hellcreek.h (ddd56dfe52c987d82964595902db0600970ef406) |
---|---|
1/* SPDX-License-Identifier: (GPL-2.0 or MIT) */ 2/* 3 * DSA driver for: 4 * Hirschmann Hellcreek TSN switch. 5 * 6 * Copyright (C) 2019,2020 Linutronix GmbH 7 * Author Kurt Kanzenbach <kurt@linutronix.de> 8 */ 9 10#ifndef _HELLCREEK_H_ 11#define _HELLCREEK_H_ 12 13#include <linux/bitmap.h> 14#include <linux/bitops.h> 15#include <linux/device.h> 16#include <linux/kernel.h> 17#include <linux/mutex.h> | 1/* SPDX-License-Identifier: (GPL-2.0 or MIT) */ 2/* 3 * DSA driver for: 4 * Hirschmann Hellcreek TSN switch. 5 * 6 * Copyright (C) 2019,2020 Linutronix GmbH 7 * Author Kurt Kanzenbach <kurt@linutronix.de> 8 */ 9 10#ifndef _HELLCREEK_H_ 11#define _HELLCREEK_H_ 12 13#include <linux/bitmap.h> 14#include <linux/bitops.h> 15#include <linux/device.h> 16#include <linux/kernel.h> 17#include <linux/mutex.h> |
18#include <linux/workqueue.h> |
|
18#include <linux/platform_data/hirschmann-hellcreek.h> 19#include <linux/ptp_clock_kernel.h> 20#include <linux/timecounter.h> 21#include <net/dsa.h> 22 23/* Ports: 24 * - 0: CPU 25 * - 1: Tunnel --- 206 unchanged lines hidden (view full) --- 232 u8 reprio_tc; 233 u8 reprio_en; 234}; 235 236struct hellcreek { 237 const struct hellcreek_platform_data *pdata; 238 struct device *dev; 239 struct dsa_switch *ds; | 19#include <linux/platform_data/hirschmann-hellcreek.h> 20#include <linux/ptp_clock_kernel.h> 21#include <linux/timecounter.h> 22#include <net/dsa.h> 23 24/* Ports: 25 * - 0: CPU 26 * - 1: Tunnel --- 206 unchanged lines hidden (view full) --- 233 u8 reprio_tc; 234 u8 reprio_en; 235}; 236 237struct hellcreek { 238 const struct hellcreek_platform_data *pdata; 239 struct device *dev; 240 struct dsa_switch *ds; |
241 struct ptp_clock *ptp_clock; 242 struct ptp_clock_info ptp_clock_info; |
|
240 struct hellcreek_port *ports; | 243 struct hellcreek_port *ports; |
244 struct delayed_work overflow_work; |
|
241 struct mutex reg_lock; /* Switch IP register lock */ 242 struct mutex vlan_lock; /* VLAN bitmaps lock */ | 245 struct mutex reg_lock; /* Switch IP register lock */ 246 struct mutex vlan_lock; /* VLAN bitmaps lock */ |
247 struct mutex ptp_lock; /* PTP IP register lock */ |
|
243 void __iomem *base; | 248 void __iomem *base; |
249 void __iomem *ptp_base; |
|
244 u16 swcfg; /* swcfg shadow */ 245 u8 *vidmbrcfg; /* vidmbrcfg shadow */ | 250 u16 swcfg; /* swcfg shadow */ 251 u8 *vidmbrcfg; /* vidmbrcfg shadow */ |
252 u64 seconds; /* PTP seconds */ 253 u64 last_ts; /* Used for overflow detection */ |
|
246 size_t fdb_entries; 247}; 248 249#endif /* _HELLCREEK_H_ */ | 254 size_t fdb_entries; 255}; 256 257#endif /* _HELLCREEK_H_ */ |