AnsweredAssumed Answered

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

Question asked by Satoshi Shimoda on Feb 9, 2015
Latest reply on Feb 9, 2015 by igorpadykov

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

Outcomes