drivers/net/dsa/hirschmann/hellcreek.h
Source file repositories/reference/linux-study-clean/drivers/net/dsa/hirschmann/hellcreek.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/dsa/hirschmann/hellcreek.h- Extension
.h- Size
- 9486 bytes
- Lines
- 325
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitmap.hlinux/bitops.hlinux/container_of.hlinux/device.hlinux/leds.hlinux/mutex.hlinux/platform_data/hirschmann-hellcreek.hlinux/ptp_clock_kernel.hlinux/timecounter.hlinux/types.hlinux/workqueue.hnet/dsa.hnet/pkt_sched.h
Detected Declarations
struct hellcreek_counterstruct hellcreekstruct hellcreek_port_hwtstampstruct hellcreek_portstruct hellcreek_fdb_entrystruct hellcreekstruct hellcreek_devlink_vlan_entryenum hellcreek_devlink_resource_id
Annotated Snippet
struct hellcreek_counter {
u8 offset;
const char *name;
};
struct hellcreek;
/* State flags for hellcreek_port_hwtstamp::state */
enum {
HELLCREEK_HWTSTAMP_ENABLED,
HELLCREEK_HWTSTAMP_TX_IN_PROGRESS,
};
/* A structure to hold hardware timestamping information per port */
struct hellcreek_port_hwtstamp {
/* Timestamping state */
unsigned long state;
/* Resources for receive timestamping */
struct sk_buff_head rx_queue; /* For synchronization messages */
/* Resources for transmit timestamping */
unsigned long tx_tstamp_start;
struct sk_buff *tx_skb;
/* Current timestamp configuration */
struct kernel_hwtstamp_config tstamp_config;
};
struct hellcreek_port {
struct hellcreek *hellcreek;
unsigned long *vlan_dev_bitmap;
int port;
u16 ptcfg; /* ptcfg shadow */
u64 *counter_values;
/* Per-port timestamping resources */
struct hellcreek_port_hwtstamp port_hwtstamp;
/* Per-port Qbv schedule information */
struct tc_taprio_qopt_offload *current_schedule;
struct delayed_work schedule_work;
};
struct hellcreek_fdb_entry {
size_t idx;
unsigned char mac[ETH_ALEN];
u8 portmask;
u8 age;
u8 is_obt;
u8 pass_blocked;
u8 is_static;
u8 reprio_tc;
u8 reprio_en;
};
struct hellcreek {
const struct hellcreek_platform_data *pdata;
struct device *dev;
struct dsa_switch *ds;
struct ptp_clock *ptp_clock;
struct ptp_clock_info ptp_clock_info;
struct delayed_work overflow_work;
struct led_classdev led_is_gm;
struct led_classdev led_sync_good;
struct mutex reg_lock; /* Switch IP register lock */
struct mutex vlan_lock; /* VLAN bitmaps lock */
struct mutex ptp_lock; /* PTP IP register lock */
struct devlink_region *vlan_region;
struct devlink_region *fdb_region;
void __iomem *base;
void __iomem *ptp_base;
u16 swcfg; /* swcfg shadow */
u8 *vidmbrcfg; /* vidmbrcfg shadow */
u64 seconds; /* PTP seconds */
u64 last_ts; /* Used for overflow detection */
u16 status_out; /* ptp.status_out shadow */
size_t fdb_entries;
struct hellcreek_port ports[];
};
/* A Qbv schedule can only started up to 8 seconds in the future. If the delta
* between the base time and the current ptp time is larger than 8 seconds, then
* use periodic work to check for the schedule to be started. The delayed work
* cannot be armed directly to $base_time - 8 + X, because for large deltas the
* PTP frequency matters.
*/
#define HELLCREEK_SCHEDULE_PERIOD (2 * HZ)
#define dw_to_hellcreek_port(dw) \
container_of(dw, struct hellcreek_port, schedule_work)
Annotation
- Immediate include surface: `linux/bitmap.h`, `linux/bitops.h`, `linux/container_of.h`, `linux/device.h`, `linux/leds.h`, `linux/mutex.h`, `linux/platform_data/hirschmann-hellcreek.h`, `linux/ptp_clock_kernel.h`.
- Detected declarations: `struct hellcreek_counter`, `struct hellcreek`, `struct hellcreek_port_hwtstamp`, `struct hellcreek_port`, `struct hellcreek_fdb_entry`, `struct hellcreek`, `struct hellcreek_devlink_vlan_entry`, `enum hellcreek_devlink_resource_id`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.