[PATCH] Xilinx framebuffer device driver
Grant Likely
grant.likely at secretlab.ca
Thu Apr 26 04:35:44 EST 2007
On 4/25/07, Andrei Konovalov <akonovalov at ru.mvista.com> 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.
grant.likely at secretlab.ca
(403) 399-0195
More information about the Linuxppc-embedded
mailing list