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".
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?
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
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
* 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.
I have this
#define CONFIG_PCIE_IMX_PERST_GPIO IMX_GPIO_NR(7, 12)
#define CONFIG_PCIE_IMX_POWER_GPIO IMX_GPIO_NR(3, 19)
in the include/configs/mx6sabresd.h file and it compiled with not problems.