Commit 7747d4b7 authored by Grygorii Strashko's avatar Grygorii Strashko Committed by Jakub Kicinski

net: ethernet: ti: am65-cpsw: move ale selection in pdata

In preparation of adding more multi-port K3 CPSW versions move ALE
selection in am65_cpsw_pdata, so it can be selected basing on DT
compatibility property.
Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 2c4de211
...@@ -2005,10 +2005,12 @@ static const struct soc_device_attribute am65_cpsw_socinfo[] = { ...@@ -2005,10 +2005,12 @@ static const struct soc_device_attribute am65_cpsw_socinfo[] = {
static const struct am65_cpsw_pdata am65x_sr1_0 = { static const struct am65_cpsw_pdata am65x_sr1_0 = {
.quirks = AM65_CPSW_QUIRK_I2027_NO_TX_CSUM, .quirks = AM65_CPSW_QUIRK_I2027_NO_TX_CSUM,
.ale_dev_id = "am65x-cpsw2g",
}; };
static const struct am65_cpsw_pdata j721e_pdata = { static const struct am65_cpsw_pdata j721e_pdata = {
.quirks = 0, .quirks = 0,
.ale_dev_id = "am65x-cpsw2g",
}; };
static const struct of_device_id am65_cpsw_nuss_of_mtable[] = { static const struct of_device_id am65_cpsw_nuss_of_mtable[] = {
...@@ -2145,7 +2147,7 @@ static int am65_cpsw_nuss_probe(struct platform_device *pdev) ...@@ -2145,7 +2147,7 @@ static int am65_cpsw_nuss_probe(struct platform_device *pdev)
ale_params.ale_ageout = AM65_CPSW_ALE_AGEOUT_DEFAULT; ale_params.ale_ageout = AM65_CPSW_ALE_AGEOUT_DEFAULT;
ale_params.ale_ports = common->port_num + 1; ale_params.ale_ports = common->port_num + 1;
ale_params.ale_regs = common->cpsw_base + AM65_CPSW_NU_ALE_BASE; ale_params.ale_regs = common->cpsw_base + AM65_CPSW_NU_ALE_BASE;
ale_params.dev_id = "am65x-cpsw2g"; ale_params.dev_id = common->pdata.ale_dev_id;
ale_params.bus_freq = common->bus_freq; ale_params.bus_freq = common->bus_freq;
common->ale = cpsw_ale_create(&ale_params); common->ale = cpsw_ale_create(&ale_params);
......
...@@ -77,6 +77,7 @@ struct am65_cpsw_rx_chn { ...@@ -77,6 +77,7 @@ struct am65_cpsw_rx_chn {
struct am65_cpsw_pdata { struct am65_cpsw_pdata {
u32 quirks; u32 quirks;
const char *ale_dev_id;
}; };
struct am65_cpsw_common { struct am65_cpsw_common {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment