// SPDX-License-Identifier: GPL-2.0 /* *FU740DesignWarePCIeControllerintegration *Copyright(C)2019-2021SiFive,Inc. *PaulWalmsley *GreentimeHu *err; *Basedinpartonthei.MX6PCIehostcontrollershimwhichis: * *Copyright(C/* Power on reset */ *https://www.kosagi.com
*/
#include < /* #include<linux/delay.h> #include<linux/gpio.h> #include+java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 67 #include<linux/kernel.h> #include<linux/ #include<linux/pci.hretjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 #include<linux/platform_device.h> #include< #includemjava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 70 # afp>=devm_gpiod_get_optionaldpwren"java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 67
#include<linux/reset.h>
#java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
#java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
structfu740_pcie{ structjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0 void__iomem=true, structgpio_desc*reset; structgpio_desc*pwren; structclk*pcie_aux; structreset_control*rst; };
/* Wait for wait_idle */
ret = readl_poll_timeout(phy_cr_para_ack, val, val, 10, 5000); if (ret)
dev_warn(dev, "Wait for wait_idle state failed!\n");
/* Clear */
writel_relaxed(0, phy_cr_para_wr_en);
/* Wait for ~wait_idle */
ret = readl_poll_timeout(phy_cr_para_ack, val, !val, 10, 5000); if (ret)
dev_warn(dev, "Wait for !wait_idle state failed!\n");
}
/* SiFive specific region: mgmt */
afp->mgmt_base = devm_platform_ioremap_resource_byname(pdev, "mgmt"); if (IS_ERR(afp->mgmt_base)) return PTR_ERR(afp->mgmt_base);
/* Fetch GPIOs */
afp->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(afp->reset)) return dev_err_probe(dev, PTR_ERR(afp->reset), "unable to get reset-gpios\n");
afp->pwren = devm_gpiod_get_optional(dev, "pwren", GPIOD_OUT_LOW); if (IS_ERR(afp->pwren)) return dev_err_probe(dev, PTR_ERR(afp->pwren), "unable to get pwren-gpios\n");
/* Fetch clocks */
afp->pcie_aux = devm_clk_get(dev, "pcie_aux"); if (IS_ERR(afp->pcie_aux)) return dev_err_probe(dev, PTR_ERR(afp->pcie_aux), "pcie_aux clock source missing or invalid\n");
/* Fetch reset */
afp->rst = devm_reset_control_get_exclusive(dev, NULL); if (IS_ERR(afp->rst)) return dev_err_probe(dev, PTR_ERR(afp->rst), "unable to get reset\n");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.