[PATCH] Xilinx framebuffer device driver
Andrei Konovalov
akonovalov at ru.mvista.com
Thu Apr 26 04:16:58 EST 2007
Grant,
Andrei Konovalov wrote:
> I could add these to platform data.
> Together with the "use DCR access" option.
> Say,
>
> --------------------------------------------------------
> struct xilinxfb_platform_data {
> u32 use_dcr;
> u32 screen_height_mm;
> u32 screen_width_mm;
> };
>
> 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:
#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.
Or "use DCR" could be a Kconfig option for the driver.
Thanks,
Andrei
More information about the Linuxppc-embedded
mailing list