Re: [External] : [PATCH RFC 10/13] dmaengine: sdxi: Add PCI driver support

ALOK TIWARI
2025-09-16T16:43:45Z

On 9/6/2025 12:18 AM, Nathan Lynch via B4 Relay wrote:
> +static int sdxi_pci_init(struct sdxi_dev *sdxi)
> +{
> + struct pci_dev *pdev = sdxi_to_pci_dev(sdxi);
> + struct device *dev = &pdev->dev;
> + int dma_bits = 64;
> + int ret;
> +
> + ret = pcim_enable_device(pdev);
> + if (ret) {
> + sdxi_err(sdxi, "pcim_enbale_device failed\n");

typo pcim_enbale_device -> pcim_enable_device

> + return ret;
> + }
> +
> + pci_set_master(pdev);
> + ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(dma_bits));
> + if (ret) {
> + sdxi_err(sdxi, "failed to set DMA mask & coherent bits\n");
> + return ret;
> + }
> +
> + ret = sdxi_pci_map(sdxi);
> + if (ret) {
> + sdxi_err(sdxi, "failed to map device IO resources\n");
> + return ret;
> + }
> +
> + return 0;
> +}

Thanks,
Alok