sja1105.h (0898782247ae533d1f4e47a06bc5d4870931b284) | sja1105.h (317ab5b86c8e15015efa208ec697affb9bd0b3f2) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 2 * Copyright (c) 2018, Sensor-Technik Wiedemann GmbH 3 * Copyright (c) 2018-2019, Vladimir Oltean <olteanv@gmail.com> 4 */ 5#ifndef _SJA1105_H 6#define _SJA1105_H 7 8#include <linux/ptp_clock_kernel.h> --- 6 unchanged lines hidden (view full) --- 15#define SJA1105_NUM_PORTS 5 16#define SJA1105_NUM_TC 8 17#define SJA1105ET_FDB_BIN_SIZE 4 18/* The hardware value is in multiples of 10 ms. 19 * The passed parameter is in multiples of 1 ms. 20 */ 21#define SJA1105_AGEING_TIME_MS(ms) ((ms) / 10) 22 | 1/* SPDX-License-Identifier: GPL-2.0 2 * Copyright (c) 2018, Sensor-Technik Wiedemann GmbH 3 * Copyright (c) 2018-2019, Vladimir Oltean <olteanv@gmail.com> 4 */ 5#ifndef _SJA1105_H 6#define _SJA1105_H 7 8#include <linux/ptp_clock_kernel.h> --- 6 unchanged lines hidden (view full) --- 15#define SJA1105_NUM_PORTS 5 16#define SJA1105_NUM_TC 8 17#define SJA1105ET_FDB_BIN_SIZE 4 18/* The hardware value is in multiples of 10 ms. 19 * The passed parameter is in multiples of 1 ms. 20 */ 21#define SJA1105_AGEING_TIME_MS(ms) ((ms) / 10) 22 |
23#include "sja1105_tas.h" 24 |
|
23/* Keeps the different addresses between E/T and P/Q/R/S */ 24struct sja1105_regs { 25 u64 device_id; 26 u64 prod_id; 27 u64 status; 28 u64 port_control; 29 u64 rgu; 30 u64 config; --- 68 unchanged lines hidden (view full) --- 99 struct delayed_work refresh_work; 100 /* Serializes all operations on the cycle counter */ 101 struct mutex ptp_lock; 102 /* Serializes transmission of management frames so that 103 * the switch doesn't confuse them with one another. 104 */ 105 struct mutex mgmt_lock; 106 struct sja1105_tagger_data tagger_data; | 25/* Keeps the different addresses between E/T and P/Q/R/S */ 26struct sja1105_regs { 27 u64 device_id; 28 u64 prod_id; 29 u64 status; 30 u64 port_control; 31 u64 rgu; 32 u64 config; --- 68 unchanged lines hidden (view full) --- 101 struct delayed_work refresh_work; 102 /* Serializes all operations on the cycle counter */ 103 struct mutex ptp_lock; 104 /* Serializes transmission of management frames so that 105 * the switch doesn't confuse them with one another. 106 */ 107 struct mutex mgmt_lock; 108 struct sja1105_tagger_data tagger_data; |
109 struct sja1105_tas_data tas_data; |
|
107}; 108 109#include "sja1105_dynamic_config.h" 110#include "sja1105_ptp.h" 111 112struct sja1105_spi_message { 113 u64 access; 114 u64 read_count; 115 u64 address; 116}; 117 118typedef enum { 119 SPI_READ = 0, 120 SPI_WRITE = 1, 121} sja1105_spi_rw_mode_t; 122 | 110}; 111 112#include "sja1105_dynamic_config.h" 113#include "sja1105_ptp.h" 114 115struct sja1105_spi_message { 116 u64 access; 117 u64 read_count; 118 u64 address; 119}; 120 121typedef enum { 122 SPI_READ = 0, 123 SPI_WRITE = 1, 124} sja1105_spi_rw_mode_t; 125 |
126/* From sja1105_main.c */ 127int sja1105_static_config_reload(struct sja1105_private *priv); 128 |
|
123/* From sja1105_spi.c */ 124int sja1105_spi_send_packed_buf(const struct sja1105_private *priv, 125 sja1105_spi_rw_mode_t rw, u64 reg_addr, 126 void *packed_buf, size_t size_bytes); 127int sja1105_spi_send_int(const struct sja1105_private *priv, 128 sja1105_spi_rw_mode_t rw, u64 reg_addr, 129 u64 *value, u64 size_bytes); 130int sja1105_spi_send_long_packed_buf(const struct sja1105_private *priv, --- 79 unchanged lines hidden --- | 129/* From sja1105_spi.c */ 130int sja1105_spi_send_packed_buf(const struct sja1105_private *priv, 131 sja1105_spi_rw_mode_t rw, u64 reg_addr, 132 void *packed_buf, size_t size_bytes); 133int sja1105_spi_send_int(const struct sja1105_private *priv, 134 sja1105_spi_rw_mode_t rw, u64 reg_addr, 135 u64 *value, u64 size_bytes); 136int sja1105_spi_send_long_packed_buf(const struct sja1105_private *priv, --- 79 unchanged lines hidden --- |