PCI Command problem in Sabresd u-boot

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PCI Command problem in Sabresd u-boot

2,159 Views
saisuryanarayan
Contributor I

Hi,

I am using Sabresd Board i want to run "pci" command at u-boot for that i have added following lines to "mx6sabre_common.h".

#define CONFIG_CMD_PCI

#ifdef CONFIG_CMD_PCI

#define CONFIG_PCI

#define CONFIG_PCI_PNP

#define CONFIG_PCI_SCAN_SHOW

#define CONFIG_PCIE_IMX

#endif

but when i compile i am getting compilation errors as follows.

In function `imx_pcie_write_config'  undefined reference to `_data_abort'

...

I want to know will sabresd boards support pci commands at u-boot?

if so what else i need to define to use pci commands?

0 Kudos
9 Replies

1,215 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

Are you still getting the compiling errors?

Best Regards,

Alejandro

0 Kudos

1,215 Views
saisuryanarayan
Contributor I

Hi Alejandro,

I have added those lines in my code still same errors i am getting.

Here are my error logs.

aisurya/saisurya/projects/VELU_WMSD/build/tmp/sysroots/imx6qsabresd/usr/lib/arm-poky-linux-gnueabi/4.8.2 -lgcc -Map u-boot.map -o u-boot

| drivers/pci/built-in.o: In function `imx_pcie_read_config':

| /home/saisurya/saisurya/projects/VELU_WMSD/build/tmp/work/imx6qsabresd-poky-linux-gnueabi/u-boot-fslc/v2014.01-r0/git/drivers/pci/pcie_imx.c:392: undefined reference to `_data_abort'

| drivers/pci/built-in.o: In function `imx_pcie_write_config':

| /home/saisurya/saisurya/projects/VELU_WMSD/build/tmp/work/imx6qsabresd-poky-linux-gnueabi/u-boot-fslc/v2014.01-r0/git/drivers/pci/pcie_imx.c:416: undefined reference to `_data_abort'

| make: *** [u-boot] Error 1

0 Kudos

1,215 Views
amankumar
Contributor I

Hi Saisurya,

If you see the imx pcie driver "drivers/pci/pcie_imx.c", the definition of imx_pcie_fix_dabt_handler(bool set) says :

/*

* Replace the original ARM DABT handler with a simple jump-back one.

*

* The problem here is that if we have a PCIe bridge attached to this PCIe

* controller, but no PCIe device is connected to the bridges' downstream

* port, the attempt to read/write from/to the config space will produce

* a DABT. This is a behavior of the controller and can not be disabled

* unfortuatelly.

*

* To work around the problem, we backup the current DABT handler address

* and replace it with our own DABT handler, which only bounces right back

* into the code.

*/

Here, *_data_abort, is the backup handler and should be defined somewhere else as declared extern here.
I've also got the same issue and narrowed down by defining it global in u-boot/arch/arm/cpu/armv7/start.S file.
Just adding below line in the mentioned file(line no. 44) helped me. Hope, it'll work for you too.

.globl   _data_abort

0 Kudos

1,215 Views
fabio_estevam
NXP Employee
NXP Employee

Hi Saisurya,

2014.01 is a bit old. I would suggest you to use 2015.04 instead.

PCI works out of box in this version on mx6sabre.

Regards,

Fabio Estevam

0 Kudos

1,215 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

Which configuration are you using? As far as I remember the mx6sabresd enables this option.

Have you tried this one?

Best Regards,

Alejandro

0 Kudos

1,215 Views
saisuryanarayan
Contributor I

Hi,

I am unsing "include/configs/mx6sabresd.h" and mine was sabresd board.

0 Kudos

1,215 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

Have you tried the version Fabio suggested?

/Alejandro

0 Kudos

1,215 Views
alejandrolozan1
NXP Employee
NXP Employee

I tried that config and I did not get any issue and I did not have to modify the mx6sabre_common.h file.  Which BSP version are you using?

/Alejandro

0 Kudos

1,215 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

I have this

#define CONFIG_CMD_PCI

#ifdef CONFIG_CMD_PCI

#define CONFIG_PCI

#define CONFIG_PCI_PNP

#define CONFIG_PCI_SCAN_SHOW

#define CONFIG_PCIE_IMX

#define CONFIG_PCIE_IMX_PERST_GPIO      IMX_GPIO_NR(7, 12)

#define CONFIG_PCIE_IMX_POWER_GPIO      IMX_GPIO_NR(3, 19)

#endif

in the include/configs/mx6sabresd.h file and it compiled with not problems.

/Alejandro

0 Kudos