mirror of https://gitee.com/openkylin/linux.git
net: stmmac: dwc-qos: avoid clk and reset for acpi device
There are no clocks, resets or gpios referenced by Tegra ACPI device so don't access clocks, resets or gpios interface with ACPI device. Clocks, resets and GPIOs for ACPI devices will be handled via ACPI interface. Signed-off-by: Ajay Gupta <ajayg@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b59c43e03c
commit
1d4605e0af
|
@ -271,6 +271,7 @@ static void *tegra_eqos_probe(struct platform_device *pdev,
|
||||||
struct plat_stmmacenet_data *data,
|
struct plat_stmmacenet_data *data,
|
||||||
struct stmmac_resources *res)
|
struct stmmac_resources *res)
|
||||||
{
|
{
|
||||||
|
struct device *dev = &pdev->dev;
|
||||||
struct tegra_eqos *eqos;
|
struct tegra_eqos *eqos;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
@ -283,6 +284,9 @@ static void *tegra_eqos_probe(struct platform_device *pdev,
|
||||||
eqos->dev = &pdev->dev;
|
eqos->dev = &pdev->dev;
|
||||||
eqos->regs = res->addr;
|
eqos->regs = res->addr;
|
||||||
|
|
||||||
|
if (!is_of_node(dev->fwnode))
|
||||||
|
goto bypass_clk_reset_gpio;
|
||||||
|
|
||||||
eqos->clk_master = devm_clk_get(&pdev->dev, "master_bus");
|
eqos->clk_master = devm_clk_get(&pdev->dev, "master_bus");
|
||||||
if (IS_ERR(eqos->clk_master)) {
|
if (IS_ERR(eqos->clk_master)) {
|
||||||
err = PTR_ERR(eqos->clk_master);
|
err = PTR_ERR(eqos->clk_master);
|
||||||
|
@ -355,6 +359,7 @@ static void *tegra_eqos_probe(struct platform_device *pdev,
|
||||||
|
|
||||||
usleep_range(2000, 4000);
|
usleep_range(2000, 4000);
|
||||||
|
|
||||||
|
bypass_clk_reset_gpio:
|
||||||
data->fix_mac_speed = tegra_eqos_fix_speed;
|
data->fix_mac_speed = tegra_eqos_fix_speed;
|
||||||
data->init = tegra_eqos_init;
|
data->init = tegra_eqos_init;
|
||||||
data->bsp_priv = eqos;
|
data->bsp_priv = eqos;
|
||||||
|
|
Loading…
Reference in New Issue