Chris Packham says: ==================== net: mvneta: Armada 98DX2530 SoC This is split off from [1] to let it go in via net-next rather than waiting for the rest of the series to land. [1] - https://lore.kernel.org/lkml/20220314213143.2404162-1-chris.packham@alliedtelesis.co.nz/ ====================
Unified · Split
| @@ -5,6 +5,7 @@ Required properties: · 4 unmodified lines | |||
| 5 | "marvell,armada-370-neta" | 5 | "marvell,armada-370-neta" |
| 6 | "marvell,armada-xp-neta" | 6 | "marvell,armada-xp-neta" |
| 7 | "marvell,armada-3700-neta" | 7 | "marvell,armada-3700-neta" |
| 8 | "marvell,armada-ac5-neta" | ||
| 8 | - reg: address and length of the register set for the device. | 9 | - reg: address and length of the register set for the device. |
| 9 | - interrupts: interrupt for the device | 10 | - interrupts: interrupt for the device |
| 10 | - phy: See ethernet.txt file in the same directory. | 11 | - phy: See ethernet.txt file in the same directory. |
| @@ -76,6 +76,8 @@ · 75 unmodified lines | |||
| 76 | #define MVNETA_WIN_SIZE(w) (0x2204 + ((w) << 3)) | 76 | #define MVNETA_WIN_SIZE(w) (0x2204 + ((w) << 3)) |
| 77 | #define MVNETA_WIN_REMAP(w) (0x2280 + ((w) << 2)) | 77 | #define MVNETA_WIN_REMAP(w) (0x2280 + ((w) << 2)) |
| 78 | #define MVNETA_BASE_ADDR_ENABLE 0x2290 | 78 | #define MVNETA_BASE_ADDR_ENABLE 0x2290 |
| 79 | #define MVNETA_AC5_CNM_DDR_TARGET 0x2 | ||
| 80 | #define MVNETA_AC5_CNM_DDR_ATTR 0xb | ||
| 79 | #define MVNETA_ACCESS_PROTECT_ENABLE 0x2294 | 81 | #define MVNETA_ACCESS_PROTECT_ENABLE 0x2294 |
| 80 | #define MVNETA_PORT_CONFIG 0x2400 | 82 | #define MVNETA_PORT_CONFIG 0x2400 |
| 81 | #define MVNETA_UNI_PROMISC_MODE BIT(0) | 83 | #define MVNETA_UNI_PROMISC_MODE BIT(0) |
| @@ -544,6 +546,7 @@ struct mvneta_port { · 462 unmodified lines | |||
| 544 | 546 | ||
| 545 | /* Flags for special SoC configurations */ | 547 | /* Flags for special SoC configurations */ |
| 546 | bool neta_armada3700; | 548 | bool neta_armada3700; |
| 549 | bool neta_ac5; | ||
| 547 | u16 rx_offset_correction; | 550 | u16 rx_offset_correction; |
| 548 | const struct mbus_dram_target_info *dram_target_info; | 551 | const struct mbus_dram_target_info *dram_target_info; |
| 549 | }; | 552 | }; |
| @@ -5324,6 +5327,10 @@ static void mvneta_conf_mbus_windows(struct mvneta_port *pp, · 4774 unmodified lines | |||
| 5324 | win_protect |= 3 << (2 * i); | 5327 | win_protect |= 3 << (2 * i); |
| 5325 | } | 5328 | } |
| 5326 | } else { | 5329 | } else { |
| 5330 | if (pp->neta_ac5) | ||
| 5331 | mvreg_write(pp, MVNETA_WIN_BASE(0), | ||
| 5332 | (MVNETA_AC5_CNM_DDR_ATTR << 8) | | ||
| 5333 | MVNETA_AC5_CNM_DDR_TARGET); | ||
| 5327 | /* For Armada3700 open default 4GB Mbus window, leaving | 5334 | /* For Armada3700 open default 4GB Mbus window, leaving |
| 5328 | * arbitration of target/attribute to a different layer | 5335 | * arbitration of target/attribute to a different layer |
| 5329 | * of configuration. | 5336 | * of configuration. |
| @@ -5409,6 +5416,10 @@ static int mvneta_probe(struct platform_device *pdev) · 79 unmodified lines | |||
| 5409 | /* Get special SoC configurations */ | 5416 | /* Get special SoC configurations */ |
| 5410 | if (of_device_is_compatible(dn, "marvell,armada-3700-neta")) | 5417 | if (of_device_is_compatible(dn, "marvell,armada-3700-neta")) |
| 5411 | pp->neta_armada3700 = true; | 5418 | pp->neta_armada3700 = true; |
| 5419 | if (of_device_is_compatible(dn, "marvell,armada-ac5-neta")) { | ||
| 5420 | pp->neta_armada3700 = true; | ||
| 5421 | pp->neta_ac5 = true; | ||
| 5422 | } | ||
| 5412 | 5423 | ||
| 5413 | dev->irq = irq_of_parse_and_map(dn, 0); | 5424 | dev->irq = irq_of_parse_and_map(dn, 0); |
| 5414 | if (dev->irq == 0) | 5425 | if (dev->irq == 0) |
| @@ -5769,6 +5780,7 @@ static const struct of_device_id mvneta_match[] = { · 354 unmodified lines | |||
| 5769 | { .compatible = "marvell,armada-370-neta" }, | 5780 | { .compatible = "marvell,armada-370-neta" }, |
| 5770 | { .compatible = "marvell,armada-xp-neta" }, | 5781 | { .compatible = "marvell,armada-xp-neta" }, |
| 5771 | { .compatible = "marvell,armada-3700-neta" }, | 5782 | { .compatible = "marvell,armada-3700-neta" }, |
| 5783 | { .compatible = "marvell,armada-ac5-neta" }, | ||
| 5772 | { } | 5784 | { } |
| 5773 | }; | 5785 | }; |
| 5774 | MODULE_DEVICE_TABLE(of, mvneta_match); | 5786 | MODULE_DEVICE_TABLE(of, mvneta_match); |