History

net: dsa: microchip: move ksz_chip_id enum to platform include

With the ksz_chip_id enums moved to the platform include file for ksz switches, platform code that instantiates a device can now use these to set ksz_platform_data::chip_id.

Daniel Danzberger committed 2 years ago

Commit d16f1091 parent 3bc05fa2 files · +20 −19Browse files

Unified · Split

2 files
  1. drivers/net/dsa/microchip/ksz_common.h +1 −19
  2. include/linux/platform_data/microchip-ksz.h +19 −0
drivers/net/dsa/microchip/ksz_common.h+1−19
@@ -14,6 +14,7 @@ · 13 unmodified lines
14#include <linux/regmap.h>14#include <linux/regmap.h>
15#include <net/dsa.h>15#include <net/dsa.h>
16#include <linux/irq.h>16#include <linux/irq.h>
17#include <linux/platform_data/microchip-ksz.h>
17 18
18#include "ksz_ptp.h"19#include "ksz_ptp.h"
19 20
@@ -203,25 +204,6 @@ enum ksz_model { · 183 unmodified lines
203 LAN9374,204 LAN9374,
204};205};
205 206
206enum ksz_chip_id {
207 KSZ8563_CHIP_ID = 0x8563,
208 KSZ8795_CHIP_ID = 0x8795,
209 KSZ8794_CHIP_ID = 0x8794,
210 KSZ8765_CHIP_ID = 0x8765,
211 KSZ8830_CHIP_ID = 0x8830,
212 KSZ9477_CHIP_ID = 0x00947700,
213 KSZ9896_CHIP_ID = 0x00989600,
214 KSZ9897_CHIP_ID = 0x00989700,
215 KSZ9893_CHIP_ID = 0x00989300,
216 KSZ9563_CHIP_ID = 0x00956300,
217 KSZ9567_CHIP_ID = 0x00956700,
218 LAN9370_CHIP_ID = 0x00937000,
219 LAN9371_CHIP_ID = 0x00937100,
220 LAN9372_CHIP_ID = 0x00937200,
221 LAN9373_CHIP_ID = 0x00937300,
222 LAN9374_CHIP_ID = 0x00937400,
223};
224
225enum ksz_regs {207enum ksz_regs {
226 REG_SW_MAC_ADDR,208 REG_SW_MAC_ADDR,
227 REG_IND_CTRL_0,209 REG_IND_CTRL_0,
include/linux/platform_data/microchip-ksz.h+19−0
@@ -22,6 +22,25 @@ · 21 unmodified lines
22#include <linux/types.h>22#include <linux/types.h>
23#include <linux/platform_data/dsa.h>23#include <linux/platform_data/dsa.h>
24 24
25enum ksz_chip_id {
26 KSZ8563_CHIP_ID = 0x8563,
27 KSZ8795_CHIP_ID = 0x8795,
28 KSZ8794_CHIP_ID = 0x8794,
29 KSZ8765_CHIP_ID = 0x8765,
30 KSZ8830_CHIP_ID = 0x8830,
31 KSZ9477_CHIP_ID = 0x00947700,
32 KSZ9896_CHIP_ID = 0x00989600,
33 KSZ9897_CHIP_ID = 0x00989700,
34 KSZ9893_CHIP_ID = 0x00989300,
35 KSZ9563_CHIP_ID = 0x00956300,
36 KSZ9567_CHIP_ID = 0x00956700,
37 LAN9370_CHIP_ID = 0x00937000,
38 LAN9371_CHIP_ID = 0x00937100,
39 LAN9372_CHIP_ID = 0x00937200,
40 LAN9373_CHIP_ID = 0x00937300,
41 LAN9374_CHIP_ID = 0x00937400,
42};
43
25struct ksz_platform_data {44struct ksz_platform_data {
26 /* Must be first such that dsa_register_switch() can access it */45 /* Must be first such that dsa_register_switch() can access it */
27 struct dsa_chip_data cd;46 struct dsa_chip_data cd;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t