Message ID | 20220314213143.2404162-6-chris.packham@alliedtelesis.co.nz (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | arm64: mvebu: Support for Marvell 98DX2530 (and variants) | expand |
On Tue, Mar 15, 2022 at 10:31:40AM +1300, Chris Packham wrote: > The 98DX2530 SoC is similar to the Armada 3700 except it needs a > different MBUS window configuration. Add a new compatible string to > identify this device and the required MBUS window configuration. > > Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> I suggest you separate the two mvneta patches and send them to the netdev list. They are likely to get merged before the merge window opens next weekend. The other patches are less likely to be merged so fast. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Andrew
On 15/03/22 13:12, Andrew Lunn wrote: > On Tue, Mar 15, 2022 at 10:31:40AM +1300, Chris Packham wrote: >> The 98DX2530 SoC is similar to the Armada 3700 except it needs a >> different MBUS window configuration. Add a new compatible string to >> identify this device and the required MBUS window configuration. >> >> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> > I suggest you separate the two mvneta patches and send them to the > netdev list. They are likely to get merged before the merge window > opens next weekend. The other patches are less likely to be merged so > fast. Thanks for the suggestion. I did wonder about doing that for this patch and the sdhci one. It'd also cut down the Cc spam. > Reviewed-by: Andrew Lunn <andrew@lunn.ch> > > Andrew
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index 83c8908f0cc7..000929794266 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -76,6 +76,8 @@ #define MVNETA_WIN_SIZE(w) (0x2204 + ((w) << 3)) #define MVNETA_WIN_REMAP(w) (0x2280 + ((w) << 2)) #define MVNETA_BASE_ADDR_ENABLE 0x2290 +#define MVNETA_AC5_CNM_DDR_TARGET 0x2 +#define MVNETA_AC5_CNM_DDR_ATTR 0xb #define MVNETA_ACCESS_PROTECT_ENABLE 0x2294 #define MVNETA_PORT_CONFIG 0x2400 #define MVNETA_UNI_PROMISC_MODE BIT(0) @@ -544,6 +546,7 @@ struct mvneta_port { /* Flags for special SoC configurations */ bool neta_armada3700; + bool neta_ac5; u16 rx_offset_correction; const struct mbus_dram_target_info *dram_target_info; }; @@ -5272,6 +5275,10 @@ static void mvneta_conf_mbus_windows(struct mvneta_port *pp, win_protect |= 3 << (2 * i); } } else { + if (pp->neta_ac5) + mvreg_write(pp, MVNETA_WIN_BASE(0), + (MVNETA_AC5_CNM_DDR_ATTR << 8) | + MVNETA_AC5_CNM_DDR_TARGET); /* For Armada3700 open default 4GB Mbus window, leaving * arbitration of target/attribute to a different layer * of configuration. @@ -5397,6 +5404,11 @@ static int mvneta_probe(struct platform_device *pdev) /* Get special SoC configurations */ if (of_device_is_compatible(dn, "marvell,armada-3700-neta")) pp->neta_armada3700 = true; + if (of_device_is_compatible(dn, "marvell,armada-ac5-neta")) { + pp->neta_armada3700 = true; + pp->neta_ac5 = true; + } + pp->clk = devm_clk_get(&pdev->dev, "core"); if (IS_ERR(pp->clk)) @@ -5720,6 +5732,7 @@ static const struct of_device_id mvneta_match[] = { { .compatible = "marvell,armada-370-neta" }, { .compatible = "marvell,armada-xp-neta" }, { .compatible = "marvell,armada-3700-neta" }, + { .compatible = "marvell,armada-ac5-neta" }, { } }; MODULE_DEVICE_TABLE(of, mvneta_match);
The 98DX2530 SoC is similar to the Armada 3700 except it needs a different MBUS window configuration. Add a new compatible string to identify this device and the required MBUS window configuration. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> --- Notes: Changes in v2: - New drivers/net/ethernet/marvell/mvneta.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)