On 4/25/07, Andrei Konovalov <[EMAIL PROTECTED]> wrote:
> Grant,
>
> > static struct xilinxfb_platform_data xilinxfb_pdata = {
> > #if defined(XPAR_TFT_0_USE_DCR) && (XPAR_TFT_0_USE_DCR != 0)
> >     .use_dcr = 1;
> > #else
> >     .use_dcr = 0;
> > #endif
>
> IOW I am trying to avoid conditional compilation like:

I agree 100%.  All the device options should be specified dynamically.
 Heck, it should be possible to build a single kernel and boot it on
just about any design.

>
> #if defined(XPAR_TFT_0_USE_DCR) && (XPAR_TFT_0_USE_DCR != 0)
> #define xilinxfb_out_be32(addr, mask)     mtdcr((addr), (mask))
> #else
> #define xilinxfb_out_be32(addr, mask)     out_be32((addr), (mask))
> #endif
>
> - as this would make the driver to include xparameters.h which would
> be an issue when moving to the OF device tree.

Which is a bad thing.  I believe that the Xilinx folks would like to
use the device tree for the microblaze target also; but there is a
fair bit of work that need to be done before that is feasable.

>
> Or "use DCR" could be a Kconfig option for the driver.

My preference would be for it to be a runtime thing.

-- 
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
[EMAIL PROTECTED]
(403) 399-0195
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

Reply via email to