From db862461cb035bedb3fbae76e4b1079638a7934a Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 21 Jul 2009 15:47:28 +0000 Subject: 2009-07-21 Roxana Leontie * libmisc/Makefile.am, libmisc/mw-fb/mw_fb.h: mw_fb.h eliminated the ufb_* calls and replaced some of the ioctl structures and numbers with the linux framebuffer equivalents * libmisc/mw-fb/mw_fb.c: Removed. --- cpukit/ChangeLog | 7 +++ cpukit/libmisc/Makefile.am | 2 +- cpukit/libmisc/mw-fb/mw_fb.c | 133 ------------------------------------------- cpukit/libmisc/mw-fb/mw_fb.h | 51 ++--------------- 4 files changed, 12 insertions(+), 181 deletions(-) delete mode 100644 cpukit/libmisc/mw-fb/mw_fb.c (limited to 'cpukit') diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 806c5eefac..0ae6643fdf 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,10 @@ +2009-07-21 Roxana Leontie + + * libmisc/Makefile.am, libmisc/mw-fb/mw_fb.h: mw_fb.h eliminated the + ufb_* calls and replaced some of the ioctl structures and numbers + with the linux framebuffer equivalents + * libmisc/mw-fb/mw_fb.c: Removed. + 2009-07-21 Joel Sherrill * posix/include/rtems/posix/cancel.h, posix/src/cancel.c, diff --git a/cpukit/libmisc/Makefile.am b/cpukit/libmisc/Makefile.am index ef8192ff16..85f7e79e7f 100644 --- a/cpukit/libmisc/Makefile.am +++ b/cpukit/libmisc/Makefile.am @@ -57,7 +57,7 @@ EXTRA_DIST += monitor/README ## mw-fb noinst_LIBRARIES += libmw-fb.a -libmw_fb_a_SOURCES = mw-fb/mw_fb.c mw-fb/mw_uid.c mw-fb/mw_fb.h \ +libmw_fb_a_SOURCES = mw-fb/mw_uid.c mw-fb/mw_fb.h \ mw-fb/mw_uid.h ## shell diff --git a/cpukit/libmisc/mw-fb/mw_fb.c b/cpukit/libmisc/mw-fb/mw_fb.c deleted file mode 100644 index 874c21503c..0000000000 --- a/cpukit/libmisc/mw-fb/mw_fb.c +++ /dev/null @@ -1,133 +0,0 @@ -/* - * - * Copyright (c) 2000 - Rosimildo da Silva - * - * MODULE DESCRIPTION: - * Wrapper API around the ioctls calls for the Micro FrameBuffer - * interface for Embedded Systems - * - * All functions returns 0 on success. Any other value should be - * decoded as an error. A list of errors will be created over time. - * - * $Id$ - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - - -/* - * This function returns the information regarding the display. - * It is called just after the driver be opened to get all needed - * information about the driver. No change in the mode of operation - * of the driver is done with this call. - */ - int ufb_get_screen_info( int fd, struct fb_screeninfo *info ) - { - return ioctl( fd, FB_SCREENINFO, ( void *)info); - } - -/* - * Returns the mode of the graphics subsystem - */ - int ufb_get_mode( int fd, int *mode ) - { - struct fb_exec_function exec; - exec.func_no = FB_FUNC_GET_MODE; - exec.param = ( void *)mode; - return ioctl( fd, FB_EXEC_FUNCTION , ( void *)&exec ); - } - -/* - * Returns the current collor pallete - */ - int ufb_get_palette( int fd, struct fb_cmap *color ) - { - return ioctl( fd, FB_GETPALETTE, ( void *)color ); - } - -/* - * Set the current collor pallete - */ - int ufb_set_palette( int fd, struct fb_cmap *color ) - { - return ioctl( fd, FB_SETPALETTE, ( void *)color ); - } - -/* - * Does all necessary initialization to put the device in - * graphics mode - */ - int ufb_enter_graphics( int fd, int mode ) - { - struct fb_exec_function exec; - exec.func_no = FB_FUNC_ENTER_GRAPHICS; - exec.param = ( void *)mode; - return ioctl( fd, FB_EXEC_FUNCTION , ( void *)&exec ); - } - -/* - * Switch the device back to the default mode of operation. - * In most cases it put the device back to plain text mode. - */ - int ufb_exit_graphics( int fd ) - { - struct fb_exec_function exec; - exec.func_no = FB_FUNC_EXIT_GRAPHICS; - exec.param = 0; - return ioctl( fd, FB_EXEC_FUNCTION , ( void *)&exec ); - } - -/* - * Tell the driver that the "virtual buffer" is dirty, and an update - * of it to the real device, maybe a serial/parallel LCD or whatever - * is required - */ - int ufb_buffer_is_dirty( int fd ) - { - struct fb_exec_function exec; - exec.func_no = FB_FUNC_IS_DIRTY; - exec.param = 0; - return ioctl( fd, FB_EXEC_FUNCTION , ( void *)&exec ); - } - - -/* - * This function maps the physical ( kernel mode ) address of the framebuffer - * device and maps it to the user space address. - */ - int ufb_mmap_to_user_space( - int fd __attribute__((unused)), - void **fb_addr, - void *physical_addr, - unsigned long size __attribute__((unused)) - ) - { - #ifdef __rtems__ - /* RTEMS runs in ring 0, and there is no distinction between - user space and kernel space, so we just return the same - pointer to the caller. - */ - *fb_addr = physical_addr; - return 0; - #else - /* other kernels might want to map it to the user space, - maybe using mmap() - */ - return 0; - #endif - - } - - -/* - * This function unmaps memory of the FB from the user's space - */ - int ufb_unmmap_from_user_space( int fd __attribute__((unused)), void *addr __attribute__((unused))) - { - return 0; - } diff --git a/cpukit/libmisc/mw-fb/mw_fb.h b/cpukit/libmisc/mw-fb/mw_fb.h index c450c0a6ee..664a9a13a7 100644 --- a/cpukit/libmisc/mw-fb/mw_fb.h +++ b/cpukit/libmisc/mw-fb/mw_fb.h @@ -18,10 +18,10 @@ extern "C" { /* ioctls 0x46 is 'F' */ -#define FB_SCREENINFO 0x4601 -#define FB_GETPALETTE 0x4602 -#define FB_SETPALETTE 0x4603 -#define FB_EXEC_FUNCTION 0x4604 +#define FBIOGET_FSCREENINFO 0x4602 +#define FBIOGETCMAP 0x4604 +#define FBIOPUTCMAP 0x4603 +#define FB_EXEC_FUNCTION 0x4606 #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ @@ -78,45 +78,11 @@ struct fb_exec_function /* Micro Framebuffer API Wrapper */ -/* - * This function returns the information regarding the display. - * It is called just after the driver be opened to get all needed - * information about the driver. No change in the mode of operation - * of the driver is done with this call. - */ -extern int ufb_get_screen_info( int fd, struct fb_screeninfo *info ); - - /* * Returns the mode of the graphics subsystem */ extern int ufb_get_mode( int fd, int *mode ); - -/* - * Returns the current collor pallete - */ -extern int ufb_get_palette( int fd, struct fb_cmap *color ); - -/* - * Set the current collor pallete - */ -extern int ufb_set_palette( int fd, struct fb_cmap *color ); - -/* - * Does all necessary initialization to put the device in - * graphics mode - */ -extern int ufb_enter_graphics( int fd, int mode ); - - -/* - * Switch the device back to the default mode of operation. - * In most cases it put the device back to plain text mode. - */ -extern int ufb_exit_graphics( int fd ); - - /* * Tell the driver that the "virtual buffer" is dirty, and an update * of it to the real device, maybe a serial/parallel LCD or whatever @@ -124,15 +90,6 @@ extern int ufb_exit_graphics( int fd ); */ extern int ufb_buffer_is_dirty( int fd ); - -/* - * This function maps the physical ( kernel mode ) address of the framebuffer device - * and maps it to the user space address. - */ - int ufb_mmap_to_user_space( int fd, void **fb_addr, void *physical_addr, unsigned long size ); - - - /* * This function unmaps memory of the FB from the user's space */ -- cgit v1.2.3