i.MX: Allow const video mode specifiers
Subsystems (2)
cover i.MX: Allow const video mode specifiers
This will keep static video initializers in the text segment.
PATCH 1/2 i.MX video: struct fb_videomode can be const
Signed-off-by Eric Nelson <[email protected]>
--- drivers/video/mxc_ipuv3_fb.c | 8 +++++--- include/ipu_pixfmt.h | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-)
drivers/video/mxc_ipuv3_fb.c +5 -3
@@ -45,7 +45,7 @@ static int mxcfb_unmap_video_memory(struct fb_info *fbi);/* graphics setup */ static GraphicDevice panel; -static struct fb_videomode *gmode; +static struct fb_videomode const *gmode;static uint8_t gdisp;static uint32_t gpixfmt;
@@ -503,7 +503,7 @@ static struct fb_info *mxcfb_init_fbinfo(void)* @return Appropriate error code to the kernel common code */ static int mxcfb_probe (u32 interface_pix_fmt,uint8_t disp, -struct fb_videomode *mode) +struct fb_videomode const *mode) {struct fb_info *fbi;struct mxcfb_info *mxcfbi;
@@ -619,7 +619,9 @@ void video_set_lut(unsigned int index, /* color number */return ; } -int ipuv3_fb_init (struct fb_videomode *mode,uint8_t disp,uint32_t pixfmt) +int ipuv3_fb_init (struct fb_videomode const *mode, +uint8_t disp, +uint32_t pixfmt) { gmode = mode; gdisp = disp;
include/ipu_pixfmt.h +3 -1
@@ -76,7 +76,9 @@#define IPU_PIX_FMT_YVU422P fourcc('Y', 'V', '1', '6')/*< 16 YVU 4:2:2 */ #define IPU_PIX_FMT_YUV422P fourcc('4', '2', '2', 'P')/*< 16 YUV 4:2:2 */ -int ipuv3_fb_init (struct fb_videomode *mode,uint8_t disp,uint32_t pixfmt); +int ipuv3_fb_init (struct fb_videomode const *mode, +uint8_t disp, +uint32_t pixfmt);void ipuv3_fb_shutdown (void );#endif
Signature · 1 line
1.7.9
PATCH 1/2 i.MX video: struct fb_videomode can be const
Quoted 6 lines · Eric Nelson
Signed-off-by Eric Nelson <[email protected]>--- drivers/video/mxc_ipuv3_fb.c | 8 +++++--- include/ipu_pixfmt.h | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-)
Applied to u-boot-imx, next branch, thanks.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 2/2 i.MX: ipufb: add const to fb_videomode declarations
In reply to Eric NelsonSigned-off-by Eric Nelson <[email protected]>
--- board/freescale/mx51evk/mx51evk.c | 2 +- board/freescale/mx53loco/mx53loco.c | 2 +- board/ttcontrol/vision2/vision2.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
board/freescale/mx51evk/mx51evk.c +1 -1
@@ -467,7 +467,7 @@ int board_mmc_init(bd_t *bis) }#endif -static struct fb_videomode claa_wvga = { +static struct fb_videomode const claa_wvga = { .name ="CLAA07LC0ACW" , .refresh =57 , .xres =800 ,
board/freescale/mx53loco/mx53loco.c +1 -1
@@ -409,7 +409,7 @@ static void clock_1GHz(void)printf ("CPU: Switch DDR clock to 400MHz failed\n" ); } -static struct fb_videomode claa_wvga = { +static struct fb_videomode const claa_wvga = { .name ="CLAA07LC0ACW" , .refresh =57 , .xres =800 ,
board/ttcontrol/vision2/vision2.c +1 -1
@@ -43,7 +43,7 @@DECLARE_GLOBAL_DATA_PTR ; -static struct fb_videomode nec_nl6448bc26_09c = { +static struct fb_videomode const nec_nl6448bc26_09c = {"NEC_NL6448BC26-09C" ,60 ,/* Refresh */ 640 ,/* xres */
Signature · 1 line
1.7.9
PATCH 2/2 i.MX: ipufb: add const to fb_videomode declarations
Quoted 7 lines · Eric Nelson
Signed-off-by Eric Nelson <[email protected]>--- board/freescale/mx51evk/mx51evk.c | 2 +- board/freescale/mx53loco/mx53loco.c | 2 +- board/ttcontrol/vision2/vision2.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
Applied to u-boot-imx, next branch, thanks.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================