Can we use "if" or "switch" branching in flash_header.S?

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

Can we use "if" or "switch" branching in flash_header.S?

Jump to solution
564 Views
satoshishimoda
Senior Contributor I

Hi community,

Our partner have a question about i.MX6SDL BSP (L3.0.35_4.1.0).

In fact, our partner will use their next product to i.MX6S rev.1.3 chip even though they are using rev.1.1 chip.

To reduce man-hour cost, they want to use same u-boot code to both current product and next product.

In this case, they want to set the DDR calibration data individually after reading chip revision as following.

1. Read USB_ANALOG_DIGPROG value in <u-boot>/board/freescale/mx6q_sabresd/flash_header.S.

2. If USB_ANALOG_DIGPROG is 0x00000011, set the DDR calibration for current product.

   Else if USB_ANALOG_DIGPROG is 0x00000013, set the DDR calibration for next product.

Then, our question is simple.

[Q]

Can we use "if", "else", and "else if" or "switch" and "case" in flash_header.S likes C language?

We understand "ifdef" and "else" are OK, but have not understood whether oter conditional branching are OK.

Best Regards,

Satoshi Shimoda

Labels (3)
Tags (1)
0 Kudos
1 Solution
458 Views
igorpadykov
NXP Employee
NXP Employee

Hi Satoshi

iROM does not support conditional branching

while reading dcd data, it just write data to address locations,

as described in sect.8.7.2 Device Configuration Data (DCD) IMX6DQRM

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
1 Reply
459 Views
igorpadykov
NXP Employee
NXP Employee

Hi Satoshi

iROM does not support conditional branching

while reading dcd data, it just write data to address locations,

as described in sect.8.7.2 Device Configuration Data (DCD) IMX6DQRM

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos