[PATCH 7/7] spi: spi-zynqmp-gqspi: Add tap delay support for GQSPI controller on Versal platform

Krzysztof Kozlowski krzysztof.kozlowski at linaro.org
Thu Sep 1 01:01:56 PDT 2022


On 01/09/2022 08:47, Amit Kumar Mahapatra wrote:
> @@ -1165,6 +1214,7 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
>  	struct spi_controller *ctlr;
>  	struct zynqmp_qspi *xqspi;
>  	struct device *dev = &pdev->dev;
> +	const struct of_device_id *match;
>  	struct device_node *np = dev->of_node;
>  
>  	ctlr = spi_alloc_master(&pdev->dev, sizeof(*xqspi));
> @@ -1176,6 +1226,13 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
>  	xqspi->ctlr = ctlr;
>  	platform_set_drvdata(pdev, xqspi);
>  
> +	match = of_match_node(zynqmp_qspi_of_match, pdev->dev.of_node);
> +	if (match) {
> +		const struct qspi_platform_data *p_data = match->data;

There is a helper for that. Use it.

Best regards,
Krzysztof



More information about the linux-arm-kernel mailing list