07-05-2017 12:43 PM
I've created an OpenAMP design with Petalinux 2016.4 on CPU0 and Bare-Metal on CPU1. This design is based on an AMP design I did with Petalinux 2014.2 that worked. I have a card that's connected to the FMC LPC port on a ZC706 eval board. My old AMP code works, but my new OpenAMP code fails to talk to the FMC board via I2C.
If I run just the Bare Metal code on CPU1 using SDK via JTAG (so CPU0 is not loaded), the I2C interface works fine and the control of the FMC board works as expected. However, if I run the full OpenAMP design, that particular interface does not work (I've even tried simple XilIn and XilOut calls to 0xE00040XX, the address in CPU1's xparameters.h).
Anyway, after going through the Community Forums, the closest thing I can find is possibly disabling the I2C in the device tree, and also putting clk_ignore_unused in the bootargs. Another possibility is messing with the GIC because, maybe, CPU0 has all the interrupts.
1. Am I on the right track? Or is something else causing this behavior?
2. If I need to add "clk_ignore_unused", what's the proper way to do so? Is there something in petalinux-config I should do? Or do I have to manually edit a file that the documentation says not to edit?
3. If I have to deal with the GIC, how do I go about doing that? Again, I'm concerned about documentation saying that many files should not be edited.
07-06-2017 12:07 PM
Update: Here's what I did to get the I2C to work for the FMC LPC port.
I did a "disable" of the i2c in the device tree, and I set the "clk_ignore_unused" bootarg.
1. In <project_directory>/project-spec/meta-user/recipes-dt/device-tree/files/system-top.dts
In the i2c section:
status = "disabled";
2. In <project_directory>/project-spec/configs/config
Edited the last line:
CONFIG_SUBSYSTEM_BOOTARGS_GENERATED="console=ttyPS0,115200 earlyprintk clk_ignore_unused"
NOTE: step 2 has to be performed every time you perform a "petalinux-config". I tried to de-select "generate boot args automatically" in the Kernel Bootargs window of petalinux-config, but I may be doing something wrong because any change to "config" still gets overwritten on subsequent calls to petalinux-config.
Is there a way to set the bootarg for clk_ignore_unused, so it doesn't get blown away whenever petalinux gets reconfigured?
07-12-2017 10:26 AM
Please refer to this AR to set custom boot args.
In v2017.1, this property is present in the config and need not be manually added