mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 02:01:36 +03:00
macsec: Enable clocks for t264 eqos macsec
Bug 4703442 Change-Id: I5966661a6e5b6ea53d2acded93d3c3a1c70bf181 Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3159609 Reviewed-by: Bhadram Varka <vbhadram@nvidia.com> Reviewed-by: Narayana Reddy P <narayanr@nvidia.com> Reviewed-by: Mahesh Patil <maheshp@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
2cda57413f
commit
cb7e8e2116
@@ -100,7 +100,7 @@ static int macsec_disable_car(struct macsec_priv_data *macsec_pdata)
|
|||||||
struct ether_priv_data *pdata = macsec_pdata->ether_pdata;
|
struct ether_priv_data *pdata = macsec_pdata->ether_pdata;
|
||||||
|
|
||||||
PRINT_ENTRY();
|
PRINT_ENTRY();
|
||||||
if (pdata->osi_core->mac != OSI_MAC_HW_EQOS) {
|
if (pdata->osi_core->mac_ver != OSI_EQOS_MAC_5_30) {
|
||||||
if (!IS_ERR_OR_NULL(macsec_pdata->macsec_clk)) {
|
if (!IS_ERR_OR_NULL(macsec_pdata->macsec_clk)) {
|
||||||
clk_disable_unprepare(macsec_pdata->macsec_clk);
|
clk_disable_unprepare(macsec_pdata->macsec_clk);
|
||||||
}
|
}
|
||||||
@@ -129,7 +129,7 @@ static int macsec_enable_car(struct macsec_priv_data *macsec_pdata)
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
PRINT_ENTRY();
|
PRINT_ENTRY();
|
||||||
if (pdata->osi_core->mac != OSI_MAC_HW_EQOS) {
|
if (pdata->osi_core->mac_ver != OSI_EQOS_MAC_5_30) {
|
||||||
if (!IS_ERR_OR_NULL(macsec_pdata->macsec_clk)) {
|
if (!IS_ERR_OR_NULL(macsec_pdata->macsec_clk)) {
|
||||||
ret = clk_prepare_enable(macsec_pdata->macsec_clk);
|
ret = clk_prepare_enable(macsec_pdata->macsec_clk);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
@@ -166,7 +166,7 @@ static int macsec_enable_car(struct macsec_priv_data *macsec_pdata)
|
|||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
err_ns_rst:
|
err_ns_rst:
|
||||||
if (pdata->osi_core->mac != OSI_MAC_HW_EQOS) {
|
if (pdata->osi_core->mac_ver != OSI_EQOS_MAC_5_30) {
|
||||||
if (!IS_ERR_OR_NULL(macsec_pdata->macsec_clk)) {
|
if (!IS_ERR_OR_NULL(macsec_pdata->macsec_clk)) {
|
||||||
clk_disable_unprepare(macsec_pdata->macsec_clk);
|
clk_disable_unprepare(macsec_pdata->macsec_clk);
|
||||||
}
|
}
|
||||||
@@ -325,9 +325,8 @@ static int macsec_get_platform_res(struct macsec_priv_data *macsec_pdata)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Get clks */
|
/* Get clks */
|
||||||
if ((pdata->osi_core->mac != OSI_MAC_HW_EQOS) ||
|
if (pdata->osi_core->mac_ver != OSI_EQOS_MAC_5_30) {
|
||||||
(pdata->osi_core->mac_ver_type == MAC_CORE_VER_TYPE_EQOS_5_40)) {
|
if (pdata->osi_core->mac_ver == OSI_MGBE_MAC_3_10) {
|
||||||
if (pdata->osi_core->mac == OSI_MAC_HW_MGBE) {
|
|
||||||
macsec_pdata->macsec_clk = devm_clk_get(dev, "mgbe_macsec");
|
macsec_pdata->macsec_clk = devm_clk_get(dev, "mgbe_macsec");
|
||||||
} else {
|
} else {
|
||||||
macsec_pdata->macsec_clk = devm_clk_get(dev, "macsec");
|
macsec_pdata->macsec_clk = devm_clk_get(dev, "macsec");
|
||||||
@@ -364,7 +363,7 @@ static void macsec_release_platform_res(struct macsec_priv_data *macsec_pdata)
|
|||||||
struct device *dev = pdata->dev;
|
struct device *dev = pdata->dev;
|
||||||
|
|
||||||
PRINT_ENTRY();
|
PRINT_ENTRY();
|
||||||
if (pdata->osi_core->mac != OSI_MAC_HW_EQOS) {
|
if (pdata->osi_core->mac_ver != OSI_EQOS_MAC_5_30) {
|
||||||
if (!IS_ERR_OR_NULL(macsec_pdata->macsec_clk)) {
|
if (!IS_ERR_OR_NULL(macsec_pdata->macsec_clk)) {
|
||||||
devm_clk_put(dev, macsec_pdata->macsec_clk);
|
devm_clk_put(dev, macsec_pdata->macsec_clk);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user