<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic [LS1028a]: Couldn't able to load PCIe driver module file. in Processor Expert Software</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/LS1028a-Couldn-t-able-to-load-PCIe-driver-module-file/m-p/1547442#M5310</link>
    <description>&lt;P&gt;Hi NXP Support Team,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We have a LS1028A based custom board in which PCIe2.0, is connected with PCIe switch (PEX8604) and another PCIe is connected to&amp;nbsp;&lt;STRONG&gt;IGLOO2 COMM FPGA&lt;/STRONG&gt;&amp;nbsp;as shown in attached block diagram.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In our PCie driver Makefile we are compiling as module and modified below things:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;obj-m += sms_pcieDriver.o&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;under driver/Makefile we are compiling as module as shown below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;obj-m += sms_pcieDriver/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;below is our&amp;nbsp;&lt;STRONG&gt;pcie_dma_init() function&lt;/STRONG&gt; code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;----------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;static int __init pcie_dma_init (void)&lt;BR /&gt;{&lt;BR /&gt;int irq;&lt;BR /&gt;int ret = -ENOMEM;&lt;BR /&gt;int user_bus_no = pciebusno;&lt;BR /&gt;int bar_num =0;&lt;BR /&gt;&lt;BR /&gt;printk(KERN_ALERT "\r\nchecking device at bus no : %i\n",pciebusno);&lt;BR /&gt;g_pdev = pci_get_device (PCIE_VENDOR_ID, PCI_ANY_ID, g_pdev);&lt;BR /&gt;if (NULL == g_pdev)&lt;BR /&gt;{&lt;BR /&gt;printk(KERN_EMERG"\r\n%s: Init: Hardware not found.\n", DRV_NAME);&lt;BR /&gt;return FAILURE;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;#ifdef DEBUG&lt;BR /&gt;printk(KERN_EMERG"\r\nInit: PCIe_DMA Device Found.\n", DRV_NAME);&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;for(bar_num =0; bar_num &amp;lt; NO_OF_BARS; bar_num++)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;bar_addr[bar_num] = pci_resource_start(g_pdev, bar_num);&lt;BR /&gt;if(bar_addr[bar_num] &amp;lt; 0)&lt;BR /&gt;{&lt;BR /&gt;printk(KERN_EMERG "\r\nbar_addr[%d]: Failed to get address\n",bar_num);&lt;BR /&gt;return FAILURE;&lt;BR /&gt;}&lt;BR /&gt;printk (KERN_EMERG "\r\nbar_addr[%d] = %lX\n", bar_num,bar_addr[bar_num]);&lt;/P&gt;&lt;P&gt;bar_mem_len[bar_num] = pci_resource_len(g_pdev, bar_num);&lt;BR /&gt;printk (KERN_EMERG "\r\nbar_mem_len[%d] = %lX\n", bar_num,bar_mem_len[bar_num]);&lt;BR /&gt;&lt;BR /&gt;/* Re-map IO memory to kernel address space */&lt;BR /&gt;IOAddress[bar_num] = (unsigned long)ioremap(bar_addr[bar_num], bar_mem_len[bar_num]);&lt;BR /&gt;if (!IOAddress[bar_num])&lt;BR /&gt;{&lt;BR /&gt;printk(KERN_EMERG "\r\nInit: ioremap for bar_addr[%d] FAILED.\n",bar_num, DRV_NAME);&lt;BR /&gt;return FAILURE;&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;#ifdef DEBUG&lt;BR /&gt;printk(KERN_EMERG "\r\nInit: SUCCESSED.\n", DRV_NAME);&lt;BR /&gt;#endif&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;fsl_dma_ctrl_addr = (unsigned long)ioremap(DMA_CONTROLLER_ADDRESS,DMA_CONTROLLER_MAP_SIZE);&lt;BR /&gt;if (!fsl_dma_ctrl_addr)&lt;BR /&gt;{&lt;BR /&gt;printk(KERN_EMERG "\r\nInit: ioremap for fsl_dma_ctrl_addr FAILED.\n", DRV_NAME);&lt;BR /&gt;return FAILURE;&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;#ifdef DEBUG&lt;BR /&gt;printk(KERN_EMERG "\r\nInit: fsl_dma_ctrl_addr SUCCESSED.\n", DRV_NAME);&lt;BR /&gt;#endif&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if(request_mem_region(bar_addr[bar_num],bar_mem_len[bar_num], DRV_NAME) == NULL)&lt;BR /&gt;{&lt;BR /&gt;printk(KERN_EMERG "\r\nreq_mem_region FAILED\n", DRV_NAME);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;/* Initialize PCI device */&lt;BR /&gt;if (pci_enable_device(g_pdev) &amp;lt; 0)&lt;BR /&gt;{&lt;BR /&gt;printk(KERN_EMERG "\r\npci enable device failed returning error \r\n");&lt;BR /&gt;ret = -EIO;&lt;BR /&gt;return ret;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;#ifdef DEBUG&lt;BR /&gt;printk(KERN_EMERG "\r\nPCIe_DMA Device enabled\n", DRV_NAME);&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;/* Enables bus-mastering on the device */&lt;BR /&gt;pci_set_master (g_pdev);&lt;/P&gt;&lt;P&gt;/* Allocate memory for global structure */&lt;BR /&gt;if ((g_pcie_dma = kmalloc(sizeof(pcie_dma_data), GFP_KERNEL)) == NULL)&lt;BR /&gt;{&lt;BR /&gt;printk (KERN_EMERG "\r\nFailed to allocate memory\r\n");&lt;BR /&gt;return FAILURE;&lt;BR /&gt;}&lt;BR /&gt;#ifdef DEBUG&lt;BR /&gt;printk (KERN_EMERG "\r\nRegistering PCIe_DMA driver\r\n");&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;/* Register a new pci driver */&lt;BR /&gt;ret = pci_register_driver(&amp;amp;pcie_dma_driver);&lt;BR /&gt;major_pcie_dma = register_chrdev (0, DRV_NAME, &amp;amp;pcie_dma_fops);&lt;BR /&gt;#ifdef DEBUG&lt;BR /&gt;printk (KERN_EMERG "\r\nMajor Number - PCIe_DMA = %d \r\n", major_pcie_dma);&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;/* Major number should be greater than 0 */&lt;BR /&gt;if(major_pcie_dma &amp;lt; 0)&lt;BR /&gt;{&lt;BR /&gt;printk(KERN_EMERG "\r\nUnable to get a major for PCIe_DMA\n");&lt;BR /&gt;return major_pcie_dma;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;return 0;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;-----------------------------------&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;With&amp;nbsp;&lt;STRONG&gt;lspci&lt;/STRONG&gt;&amp;nbsp;command we are able to enumerate FPGA ,then we&amp;nbsp; trying to load our PCIe driver module file using&amp;nbsp;&lt;STRONG&gt;insmod&lt;/STRONG&gt;&amp;nbsp;command but we are getting below error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;--------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;log print:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;root@TinyLinux:~# lspci&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;0000:00:00.0 Class 0200: Device 1957:e100 (rev 01)&lt;BR /&gt;0000:00:00.1 Class 0200: Device 1957:e100 (rev 01)&lt;BR /&gt;0000:00:00.2 Class 0200: Device 1957:e100 (rev 01)&lt;BR /&gt;0000:00:00.3 Class 0880: Device 1957:ee01 (rev 01)&lt;BR /&gt;0000:00:00.4 Class 0880: Device 1957:ee02 (rev 01)&lt;BR /&gt;0000:00:00.5 Class 0208: Device 1957:eef0 (rev 01)&lt;BR /&gt;0000:00:00.6 Class 0200: Device 1957:e100 (rev 01)&lt;BR /&gt;0000:00:1f.0 Class 0807: Device 1957:e001 (rev 01)&lt;BR /&gt;0001:00:00.0 Class 0604: Device 1957:82c0 (rev 10)&lt;BR /&gt;0001:01:00.0 Class 0604: Device 10b5:8604 (rev ba)&lt;BR /&gt;0001:02:01.0 Class 0604: Device 10b5:8604 (rev ba)&lt;BR /&gt;0001:02:04.0 Class 0604: Device 10b5:8604 (rev ba)&lt;BR /&gt;0001:02:05.0 Class 0604: Device 10b5:8604 (rev ba)&lt;BR /&gt;0002:00:00.0 Class 0604: Device 1957:82c0 (rev 10)&lt;BR /&gt;0002:01:00.0 Class 0000: Device&amp;nbsp;&lt;STRONG&gt;11aa:1556&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;root@TinyLinux:/home#&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;insmod sms_pcieDriver.ko&lt;/STRONG&gt;&lt;BR /&gt;[ 238.420952]&lt;BR /&gt;[ 238.420952] checking device at bus no : 0&lt;BR /&gt;[ 238.426572]&lt;BR /&gt;[ 238.426572] Init: PCIe_DMA Device Found.&lt;BR /&gt;[ 238.432126] pci 0002:01:00.0: can't enable device: BAR 0 [mem 0x8840000000-0x88407fffff 64bit pref] not claimed&lt;BR /&gt;[ 238.442263]&lt;BR /&gt;[ 238.442263] pci enable device failed returning error&lt;BR /&gt;[ 238.481007]&lt;BR /&gt;[ 238.481007] checking device at bus no : 0&lt;BR /&gt;[ 238.486632]&lt;BR /&gt;[ 238.486632] Init: PCIe_DMA Device Found.&lt;BR /&gt;[ 238.492172] pci 0002:01:00.0:&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;can't enable device: BAR 0 [mem 0x8840000000-0x88407fffff 64bit pref] not claimed&lt;/STRONG&gt;&lt;BR /&gt;[ 238.502299]&lt;BR /&gt;[ 238.502299]&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;pci enable device failed returning error&lt;/STRONG&gt;&lt;BR /&gt;insmod:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;can't insert 'sms_pcieDriver.ko': Input/output error&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;11aa:1556&lt;/STRONG&gt; is the device id and vendor id of COMM FPGA.&lt;/P&gt;&lt;P&gt;--------------------------&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please help us on this.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit Keshri&lt;/P&gt;</description>
    <pubDate>Wed, 02 Nov 2022 06:18:39 GMT</pubDate>
    <dc:creator>Amit_Keshri</dc:creator>
    <dc:date>2022-11-02T06:18:39Z</dc:date>
    <item>
      <title>[LS1028a]: Couldn't able to load PCIe driver module file.</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/LS1028a-Couldn-t-able-to-load-PCIe-driver-module-file/m-p/1547442#M5310</link>
      <description>&lt;P&gt;Hi NXP Support Team,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We have a LS1028A based custom board in which PCIe2.0, is connected with PCIe switch (PEX8604) and another PCIe is connected to&amp;nbsp;&lt;STRONG&gt;IGLOO2 COMM FPGA&lt;/STRONG&gt;&amp;nbsp;as shown in attached block diagram.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In our PCie driver Makefile we are compiling as module and modified below things:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;obj-m += sms_pcieDriver.o&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;under driver/Makefile we are compiling as module as shown below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;obj-m += sms_pcieDriver/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;below is our&amp;nbsp;&lt;STRONG&gt;pcie_dma_init() function&lt;/STRONG&gt; code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;----------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;static int __init pcie_dma_init (void)&lt;BR /&gt;{&lt;BR /&gt;int irq;&lt;BR /&gt;int ret = -ENOMEM;&lt;BR /&gt;int user_bus_no = pciebusno;&lt;BR /&gt;int bar_num =0;&lt;BR /&gt;&lt;BR /&gt;printk(KERN_ALERT "\r\nchecking device at bus no : %i\n",pciebusno);&lt;BR /&gt;g_pdev = pci_get_device (PCIE_VENDOR_ID, PCI_ANY_ID, g_pdev);&lt;BR /&gt;if (NULL == g_pdev)&lt;BR /&gt;{&lt;BR /&gt;printk(KERN_EMERG"\r\n%s: Init: Hardware not found.\n", DRV_NAME);&lt;BR /&gt;return FAILURE;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;#ifdef DEBUG&lt;BR /&gt;printk(KERN_EMERG"\r\nInit: PCIe_DMA Device Found.\n", DRV_NAME);&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;for(bar_num =0; bar_num &amp;lt; NO_OF_BARS; bar_num++)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;bar_addr[bar_num] = pci_resource_start(g_pdev, bar_num);&lt;BR /&gt;if(bar_addr[bar_num] &amp;lt; 0)&lt;BR /&gt;{&lt;BR /&gt;printk(KERN_EMERG "\r\nbar_addr[%d]: Failed to get address\n",bar_num);&lt;BR /&gt;return FAILURE;&lt;BR /&gt;}&lt;BR /&gt;printk (KERN_EMERG "\r\nbar_addr[%d] = %lX\n", bar_num,bar_addr[bar_num]);&lt;/P&gt;&lt;P&gt;bar_mem_len[bar_num] = pci_resource_len(g_pdev, bar_num);&lt;BR /&gt;printk (KERN_EMERG "\r\nbar_mem_len[%d] = %lX\n", bar_num,bar_mem_len[bar_num]);&lt;BR /&gt;&lt;BR /&gt;/* Re-map IO memory to kernel address space */&lt;BR /&gt;IOAddress[bar_num] = (unsigned long)ioremap(bar_addr[bar_num], bar_mem_len[bar_num]);&lt;BR /&gt;if (!IOAddress[bar_num])&lt;BR /&gt;{&lt;BR /&gt;printk(KERN_EMERG "\r\nInit: ioremap for bar_addr[%d] FAILED.\n",bar_num, DRV_NAME);&lt;BR /&gt;return FAILURE;&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;#ifdef DEBUG&lt;BR /&gt;printk(KERN_EMERG "\r\nInit: SUCCESSED.\n", DRV_NAME);&lt;BR /&gt;#endif&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;fsl_dma_ctrl_addr = (unsigned long)ioremap(DMA_CONTROLLER_ADDRESS,DMA_CONTROLLER_MAP_SIZE);&lt;BR /&gt;if (!fsl_dma_ctrl_addr)&lt;BR /&gt;{&lt;BR /&gt;printk(KERN_EMERG "\r\nInit: ioremap for fsl_dma_ctrl_addr FAILED.\n", DRV_NAME);&lt;BR /&gt;return FAILURE;&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;#ifdef DEBUG&lt;BR /&gt;printk(KERN_EMERG "\r\nInit: fsl_dma_ctrl_addr SUCCESSED.\n", DRV_NAME);&lt;BR /&gt;#endif&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if(request_mem_region(bar_addr[bar_num],bar_mem_len[bar_num], DRV_NAME) == NULL)&lt;BR /&gt;{&lt;BR /&gt;printk(KERN_EMERG "\r\nreq_mem_region FAILED\n", DRV_NAME);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;/* Initialize PCI device */&lt;BR /&gt;if (pci_enable_device(g_pdev) &amp;lt; 0)&lt;BR /&gt;{&lt;BR /&gt;printk(KERN_EMERG "\r\npci enable device failed returning error \r\n");&lt;BR /&gt;ret = -EIO;&lt;BR /&gt;return ret;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;#ifdef DEBUG&lt;BR /&gt;printk(KERN_EMERG "\r\nPCIe_DMA Device enabled\n", DRV_NAME);&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;/* Enables bus-mastering on the device */&lt;BR /&gt;pci_set_master (g_pdev);&lt;/P&gt;&lt;P&gt;/* Allocate memory for global structure */&lt;BR /&gt;if ((g_pcie_dma = kmalloc(sizeof(pcie_dma_data), GFP_KERNEL)) == NULL)&lt;BR /&gt;{&lt;BR /&gt;printk (KERN_EMERG "\r\nFailed to allocate memory\r\n");&lt;BR /&gt;return FAILURE;&lt;BR /&gt;}&lt;BR /&gt;#ifdef DEBUG&lt;BR /&gt;printk (KERN_EMERG "\r\nRegistering PCIe_DMA driver\r\n");&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;/* Register a new pci driver */&lt;BR /&gt;ret = pci_register_driver(&amp;amp;pcie_dma_driver);&lt;BR /&gt;major_pcie_dma = register_chrdev (0, DRV_NAME, &amp;amp;pcie_dma_fops);&lt;BR /&gt;#ifdef DEBUG&lt;BR /&gt;printk (KERN_EMERG "\r\nMajor Number - PCIe_DMA = %d \r\n", major_pcie_dma);&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;/* Major number should be greater than 0 */&lt;BR /&gt;if(major_pcie_dma &amp;lt; 0)&lt;BR /&gt;{&lt;BR /&gt;printk(KERN_EMERG "\r\nUnable to get a major for PCIe_DMA\n");&lt;BR /&gt;return major_pcie_dma;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;return 0;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;-----------------------------------&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;With&amp;nbsp;&lt;STRONG&gt;lspci&lt;/STRONG&gt;&amp;nbsp;command we are able to enumerate FPGA ,then we&amp;nbsp; trying to load our PCIe driver module file using&amp;nbsp;&lt;STRONG&gt;insmod&lt;/STRONG&gt;&amp;nbsp;command but we are getting below error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;--------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;log print:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;root@TinyLinux:~# lspci&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;0000:00:00.0 Class 0200: Device 1957:e100 (rev 01)&lt;BR /&gt;0000:00:00.1 Class 0200: Device 1957:e100 (rev 01)&lt;BR /&gt;0000:00:00.2 Class 0200: Device 1957:e100 (rev 01)&lt;BR /&gt;0000:00:00.3 Class 0880: Device 1957:ee01 (rev 01)&lt;BR /&gt;0000:00:00.4 Class 0880: Device 1957:ee02 (rev 01)&lt;BR /&gt;0000:00:00.5 Class 0208: Device 1957:eef0 (rev 01)&lt;BR /&gt;0000:00:00.6 Class 0200: Device 1957:e100 (rev 01)&lt;BR /&gt;0000:00:1f.0 Class 0807: Device 1957:e001 (rev 01)&lt;BR /&gt;0001:00:00.0 Class 0604: Device 1957:82c0 (rev 10)&lt;BR /&gt;0001:01:00.0 Class 0604: Device 10b5:8604 (rev ba)&lt;BR /&gt;0001:02:01.0 Class 0604: Device 10b5:8604 (rev ba)&lt;BR /&gt;0001:02:04.0 Class 0604: Device 10b5:8604 (rev ba)&lt;BR /&gt;0001:02:05.0 Class 0604: Device 10b5:8604 (rev ba)&lt;BR /&gt;0002:00:00.0 Class 0604: Device 1957:82c0 (rev 10)&lt;BR /&gt;0002:01:00.0 Class 0000: Device&amp;nbsp;&lt;STRONG&gt;11aa:1556&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;root@TinyLinux:/home#&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;insmod sms_pcieDriver.ko&lt;/STRONG&gt;&lt;BR /&gt;[ 238.420952]&lt;BR /&gt;[ 238.420952] checking device at bus no : 0&lt;BR /&gt;[ 238.426572]&lt;BR /&gt;[ 238.426572] Init: PCIe_DMA Device Found.&lt;BR /&gt;[ 238.432126] pci 0002:01:00.0: can't enable device: BAR 0 [mem 0x8840000000-0x88407fffff 64bit pref] not claimed&lt;BR /&gt;[ 238.442263]&lt;BR /&gt;[ 238.442263] pci enable device failed returning error&lt;BR /&gt;[ 238.481007]&lt;BR /&gt;[ 238.481007] checking device at bus no : 0&lt;BR /&gt;[ 238.486632]&lt;BR /&gt;[ 238.486632] Init: PCIe_DMA Device Found.&lt;BR /&gt;[ 238.492172] pci 0002:01:00.0:&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;can't enable device: BAR 0 [mem 0x8840000000-0x88407fffff 64bit pref] not claimed&lt;/STRONG&gt;&lt;BR /&gt;[ 238.502299]&lt;BR /&gt;[ 238.502299]&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;pci enable device failed returning error&lt;/STRONG&gt;&lt;BR /&gt;insmod:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;can't insert 'sms_pcieDriver.ko': Input/output error&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;11aa:1556&lt;/STRONG&gt; is the device id and vendor id of COMM FPGA.&lt;/P&gt;&lt;P&gt;--------------------------&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please help us on this.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit Keshri&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 06:18:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/LS1028a-Couldn-t-able-to-load-PCIe-driver-module-file/m-p/1547442#M5310</guid>
      <dc:creator>Amit_Keshri</dc:creator>
      <dc:date>2022-11-02T06:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: [LS1028a]: Couldn't able to load PCIe driver module file.</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/LS1028a-Couldn-t-able-to-load-PCIe-driver-module-file/m-p/1553797#M5325</link>
      <description>&lt;P&gt;&lt;SPAN&gt;The error message "can't enable device: BAR 0 [mem 0x8840000000-0x88407fffff 64bit pref] not claimed" is caused by the some regions not reserved.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This piece of code print the error message in pci_enable_resources. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if (!r-&amp;gt;parent) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; pci_err(dev, "can't enable device: BAR %d %pR not claimed\n",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; i, r);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; return -EINVAL;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please follow this steps:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. use pci_request_regions() to reserve all memory region&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Call pci_ioremap_bar() to map bars&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Call pci_enable_device to enable the device&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 07:45:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/LS1028a-Couldn-t-able-to-load-PCIe-driver-module-file/m-p/1553797#M5325</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2022-11-15T07:45:04Z</dc:date>
    </item>
  </channel>
</rss>

