[GSOC2009] Frame buffer support for PXA255 target of Skyeye simulator

Joel Sherrill joel.sherrill at OARcorp.com
Mon Jul 27 14:33:16 UTC 2009


Hi,

With Roxana's work on a framebuffer driver interface this raises
questions for me. This is the second FB driver in the tree so
let's do it right.

+ This is now going to be a standard type of driver like
an RTC, Clock or Console. We should have a
CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER
in confdefs.h which means we need a standard
framebuffer.h which defines the standard interface to
this class of driver for configuration purposes.
skyeye_fb.h is actually close to this .h file.

+ I have a feeling the LCD support in the BSP needs to
be conditional on "ENABLE_LCD" and "on skyeye" for the
skyeye specific variant. Unless the Skyeye and real hardware
match for the LCD output. Then ENABLE_LCD is sufficient.
You don't want the graphics memory area mapped unless the
hardware is really there.

+ Does the testing script support enabling the LCD all the
time imply that a graphics window always pops up?
Most of the time we test automated with no graphics and
in batch mode, so this would be bad. I think there needs
to be an option to gdb-sim-run.in like -G for graphics enabled.

+ The csb337 has an ENABLE_LCD option which I think now
might need to be ENABLE_GRAPHICS_ADAPTER or something
more generic like that. Especially since we should use the
same configure variable name across BSPs.

Just trying to come up with a standard cross-BSP approach to
configuring and enabling the support.

Just to be clear, there is nothing really wrong with this patch
technically. I am just trying to think very very broad and long
term. We want this all to go in right the first time. :)

--joel

xi yang wrote:
> Hi Joel, please adding "fb.h" and "skyeye_fb.h" to
> "libbsp/arm/gumstix/fb/fb.h" "libbsp/arm/gumstix/fb/skyeye_fb.h".
> Enable_lcd.patch is for gcc-testing
> frambuffer.patch is for RTEMS
>
> * Enable LCD option for gumstix of gcc-tesging
>
> Index: sim-scripts/gumstix.in
> ===================================================================
> RCS file: /usr1/CVS/gcc-testing/sim-scripts/gumstix.in,v
> retrieving revision 1.4
> diff -u -r1.4 gumstix.in
> --- sim-scripts/gumstix.in	10 Jul 2009 17:07:22 -0000	1.4
> +++ sim-scripts/gumstix.in	26 Jul 2009 13:07:18 -0000
> @@ -43,6 +43,7 @@
>  mem_bank: map=I, type=RW, addr=0xB0000000, size=0x100000
>  mem_bank: map=I, type=RW, addr=0x40000000, size=0x4C000000
>  shutdown_device: addr=0xb0000000, max_ins=${limit}0000000
> +lcd:state=on,type=pxa,mod=gtk
>  EOF
>  if [ ${coverage} = yes ] ; then
>    echo "code_coverage: state=on, filename=${2}.cov, start=0xA0000000,
> end=0xA4000000"
>
>
>
> *Frame buffer support for pxa255 target of SKYEYE simulator
>
> Index: c/src/lib/libbsp/arm/gumstix/ChangeLog
> ===================================================================
> RCS file: /usr1/CVS/rtems/c/src/lib/libbsp/arm/gumstix/ChangeLog,v
> retrieving revision 1.7
> diff -u -r1.7 ChangeLog
> --- c/src/lib/libbsp/arm/gumstix/ChangeLog	16 Jul 2009 23:18:12 -0000	1.7
> +++ c/src/lib/libbsp/arm/gumstix/ChangeLog	26 Jul 2009 13:04:27 -0000
> @@ -1,3 +1,9 @@
> +2009-07-26	Xi Yang <hiyangxi at gmail.com>
> +	* Makefile.am: Add fb/fb.c
> +	* preinstall.am: Install skyeye_fb.h
> +	* fb/fb.c, fb/skyeye_fb.h: Framebuffer support for skyeye simulator
> +	* startup/memmap.c: Change the size of Map I/O to 1216M
> +	
>  2009-07-16	Joel Sherrill <joel.sherrill at oarcorp.com>
>
>  	* configure.ac: Rename BSP_BOOTCARD_OPTIONS to
> Index: c/src/lib/libbsp/arm/gumstix/Makefile.am
> ===================================================================
> RCS file: /usr1/CVS/rtems/c/src/lib/libbsp/arm/gumstix/Makefile.am,v
> retrieving revision 1.4
> diff -u -r1.4 Makefile.am
> --- c/src/lib/libbsp/arm/gumstix/Makefile.am	10 Jul 2009 17:06:37 -0000	1.4
> +++ c/src/lib/libbsp/arm/gumstix/Makefile.am	26 Jul 2009 13:04:27 -0000
> @@ -40,6 +40,8 @@
>  libbsp_a_SOURCES += console/uarts.c ../../shared/console.c
>  #abort
>  libbsp_a_SOURCES += ../shared/abort/abort.c
> +#framebuffer
> +libbsp_a_SOURCES += fb/fb.c
>
>  libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/shared/arm920.rel \
>      ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/clock.rel \
> Index: c/src/lib/libbsp/arm/gumstix/preinstall.am
> ===================================================================
> RCS file: /usr1/CVS/rtems/c/src/lib/libbsp/arm/gumstix/preinstall.am,v
> retrieving revision 1.1
> diff -u -r1.1 preinstall.am
> --- c/src/lib/libbsp/arm/gumstix/preinstall.am	4 Jun 2009 16:23:11 -0000	1.1
> +++ c/src/lib/libbsp/arm/gumstix/preinstall.am	26 Jul 2009 13:04:27 -0000
> @@ -41,6 +41,10 @@
>  	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h
>  PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h
>
> +$(PROJECT_INCLUDE)/rtems/skyeye_fb.h: fb/skyeye_fb.h
> $(PROJECT_INCLUDE)/rtems/$(dirstamp)
> +	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/skyeye_fb.h
> +PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/skyeye_fb.h
> +
>  $(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp)
>  	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h
>  PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h
> Index: c/src/lib/libbsp/arm/gumstix/startup/memmap.c
> ===================================================================
> RCS file: /usr1/CVS/rtems/c/src/lib/libbsp/arm/gumstix/startup/memmap.c,v
> retrieving revision 1.1
> diff -u -r1.1 memmap.c
> --- c/src/lib/libbsp/arm/gumstix/startup/memmap.c	4 Jun 2009 16:23:11 -0000	1.1
> +++ c/src/lib/libbsp/arm/gumstix/startup/memmap.c	26 Jul 2009 13:04:27 -0000
> @@ -12,7 +12,7 @@
>
>  mmu_sect_map_t mem_map[] = {
>  /*  <phys addr>  <virt addr> <size> <flags> */
> -  {0x40000000, 0x40000000,  20,   MMU_CACHE_NONE},  /*Map I/O*/
> +  {0x40000000, 0x40000000,  1216,   MMU_CACHE_NONE},  /*Map I/O*/
>    {0xA0000000, 0x00000000,   1,   MMU_CACHE_NONE},  /*sram*/
>    {0xA0000000, 0xA0000000,  64,   MMU_CACHE_WBACK}, /* SDRAM */
>    {0x00000000, 0x00000000,   0,   0}                /* The end */
> Index: c/src/lib/libcpu/arm/ChangeLog
> ===================================================================
> RCS file: /usr1/CVS/rtems/c/src/lib/libcpu/arm/ChangeLog,v
> retrieving revision 1.61
> diff -u -r1.61 ChangeLog
> --- c/src/lib/libcpu/arm/ChangeLog	17 Jul 2009 13:52:16 -0000	1.61
> +++ c/src/lib/libcpu/arm/ChangeLog	26 Jul 2009 13:04:28 -0000
> @@ -1,3 +1,6 @@
> +2009-07-26	Xi Yang <hiyangxi at gmail.com>
> +	* pxa255/include/pxa255.h: Add LCD related registers
> +	
>  2009-07-15	Sebastian Huber <sebastian.huber at embedded-brains.de>
>
>  	* Makefile.am: Removed references to deleted file
> Index: c/src/lib/libcpu/arm/pxa255/include/pxa255.h
> ===================================================================
> RCS file: /usr1/CVS/rtems/c/src/lib/libcpu/arm/pxa255/include/pxa255.h,v
> retrieving revision 1.3
> diff -u -r1.3 pxa255.h
> --- c/src/lib/libcpu/arm/pxa255/include/pxa255.h	10 Jul 2009 15:34:12 -0000	1.3
> +++ c/src/lib/libcpu/arm/pxa255/include/pxa255.h	26 Jul 2009 13:04:28 -0000
> @@ -106,4 +106,24 @@
>  #define PMC_PMNC_CCD (0x01 << 3)
>  #define PMC_PMNC_PCD (0x01 << 4)
>
> +/*LCD*/
> +#define LCCR0  (*(volatile word_t *)(0x44000000))
> +#define LCCR1  (*(volatile word_t *)(0x44000004))
> +#define LCCR2  (*(volatile word_t *)(0x44000008))
> +#define LCCR3  (*(volatile word_t *)(0x4400000C))
> +
> +#define FDADR0  (*(volatile word_t *)(0x44000200))
> +#define FSADR0  (*(volatile word_t *)(0x44000204))
> +#define FIDR0   (*(volatile word_t *)(0x44000208))
> +#define LDCMD0  (*(volatile word_t *)(0x4400020C))
> +
> +#define FDADR1  (*(volatile word_t *)(0x44000210))
> +#define FSADR1  (*(volatile word_t *)(0x44000214))
> +#define FIDR1   (*(volatile word_t *)(0x44000218))
> +#define LDCMD1  (*(volatile word_t *)(0x4400021C))
> +
> +#define LCCR0_ENB       0x00000001
> +#define LCCR1_PPL       0x000003FF
> +#define LCCR2_LPP       0x000003FF
> +#define LCCR3_BPP       0x07000000
>  #endif
>   


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985





More information about the users mailing list