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.
Unified · Split
| @@ -14,6 +14,7 @@ · 13 unmodified lines | ||
| 14 | 14 | #include <linux/regmap.h> |
| 15 | 15 | #include <net/dsa.h> |
| 16 | 16 | #include <linux/irq.h> |
| 17 | +#include <linux/platform_data/microchip-ksz.h> | |
| 17 | 18 | |
| 18 | 19 | #include "ksz_ptp.h" |
| 19 | 20 | |
| @@ -203,25 +204,6 @@ enum ksz_model { · 183 unmodified lines | ||
| 203 | 204 | LAN9374, |
| 204 | 205 | }; |
| 205 | 206 | |
| 206 | −enum 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 | − | |
| 225 | 207 | enum ksz_regs { |
| 226 | 208 | REG_SW_MAC_ADDR, |
| 227 | 209 | REG_IND_CTRL_0, |
| @@ -22,6 +22,25 @@ · 21 unmodified lines | ||
| 22 | 22 | #include <linux/types.h> |
| 23 | 23 | #include <linux/platform_data/dsa.h> |
| 24 | 24 | |
| 25 | +enum 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 | + | |
| 25 | 44 | struct ksz_platform_data { |
| 26 | 45 | /* Must be first such that dsa_register_switch() can access it */ |
| 27 | 46 | struct dsa_chip_data cd; |