Re: [edk2] How to add support to different reg offset definition to share the same driver code?

2017-07-02 Thread Jun Nie
2017-06-30 19:01 GMT+08:00 Leif Lindholm : > Hi Jun, > > I think there is more than one benefit in mimicing the Linux driver, > so I would lean towards the Pcd option. But as Ard points out to me, > it needs to use a FixedPcd (using FixedPcdGet()) - this can only ever > have a buildtime resolution.

Re: [edk2] How to add support to different reg offset definition to share the same driver code?

2017-07-02 Thread Jun Nie
ne 30, 2017 11:35 AM >> To: Leif Lindholm ; Ard Biesheuvel >> ; edk2-devel@lists.01.org; >> linaro-u...@lists.linaro.org; alexei.fedo...@arm.com; evan.ll...@arm.com >> Subject: [edk2] How to add support to different reg offset definition to >> share the same driver

Re: [edk2] How to add support to different reg offset definition to share the same driver code?

2017-06-30 Thread Gao, Liming
How to add support to different reg offset definition to > share the same driver code? > > Hi, > > I am trying to add support to different reg offset and bit offset in > PL011 UART. It seems impossible to add macro in platform.dsc to enable > undef/redef in the header file w

Re: [edk2] How to add support to different reg offset definition to share the same driver code?

2017-06-30 Thread Leif Lindholm
Hi Jun, I think there is more than one benefit in mimicing the Linux driver, so I would lean towards the Pcd option. But as Ard points out to me, it needs to use a FixedPcd (using FixedPcdGet()) - this can only ever have a buildtime resolution. Regards, Leif (technically on holiday, so no patch

[edk2] How to add support to different reg offset definition to share the same driver code?

2017-06-29 Thread Jun Nie
Hi, I am trying to add support to different reg offset and bit offset in PL011 UART. It seems impossible to add macro in platform.dsc to enable undef/redef in the header file with "#ifdef ZX_PL011_FLAG". Is there any proper way to control the reg/bit offset definition? Or we have to adopt the Linu