diff options
Diffstat (limited to '')
90 files changed, 488 insertions, 340 deletions
diff --git a/c/src/lib/libc/Makefile.am b/c/src/lib/libc/Makefile.am index 20893f29eb..54b674b2f7 100644 --- a/c/src/lib/libc/Makefile.am +++ b/c/src/lib/libc/Makefile.am @@ -48,15 +48,14 @@ LIBC_GLUE_C_FILES = __getpid.c __gettod.c __times.c truncate.c access.c \ UNIX_LIBC_C_FILES = unixlibc.c hosterr.c -COMMON_C_FILES = $(BASE_FS_C_FILES) $(MALLOC_C_FILES) \ - $(TERMIOS_C_FILES) $(ERROR_C_FILES) $(ASSOCIATION_C_FILES) +COMMON_C_FILES = gxx_wrappers.c $(BASE_FS_C_FILES) $(MALLOC_C_FILES) $(TERMIOS_C_FILES) \ + $(ERROR_C_FILES) $(ASSOCIATION_C_FILES) UNIX_C_FILES = $(UNIX_LIBC_C_FILES) imfs_unixstub.c -EMBEDDED_C_FILES = $(LIBC_GLUE_C_FILES) \ - $(PASSWORD_GROUP_C_FILES) $(TERMINAL_IDENTIFICATION_C_FILES) \ - $(SYSTEM_CALL_C_FILES) $(DIRECTORY_SCAN_C_FILES) \ - $(IMFS_C_FILES) +EMBEDDED_C_FILES = $(LIBC_GLUE_C_FILES) $(PASSWORD_GROUP_C_FILES) \ + $(TERMINAL_IDENTIFICATION_C_FILES) $(SYSTEM_CALL_C_FILES) \ + $(DIRECTORY_SCAN_C_FILES) $(IMFS_C_FILES) if UNIX C_FILES = $(COMMON_C_FILES) $(UNIX_C_FILES) @@ -73,13 +72,10 @@ noinst_HEADERS = libio_.h include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg include $(top_srcdir)/../../../automake/lib.am -PREINSTALL_FILES = \ -$(PROJECT_INCLUDE) \ -$(PROJECT_INCLUDE)/rtems \ -$(PROJECT_INCLUDE)/sys \ -$(H_FILES:%=$(PROJECT_INCLUDE)/%) \ -$(RTEMS_H_FILES:%=$(PROJECT_INCLUDE)/rtems/%) \ -$(SYS_H_FILES:%=$(PROJECT_INCLUDE)/sys/%) +PREINSTALL_FILES += $(PROJECT_INCLUDE) $(PROJECT_INCLUDE)/rtems \ + $(PROJECT_INCLUDE)/sys $(H_FILES:%=$(PROJECT_INCLUDE)/%) \ + $(RTEMS_H_FILES:%=$(PROJECT_INCLUDE)/rtems/%) \ + $(SYS_H_FILES:%=$(PROJECT_INCLUDE)/sys/%) $(PROJECT_INCLUDE): @$(mkinstalldirs) $@ @@ -95,8 +91,7 @@ $(PROJECT_INCLUDE)/rtems/%.h: %.h $(PROJECT_INCLUDE)/sys/%.h: %.h $(INSTALL_DATA) $< $@ -TMPINSTALL_FILES += \ -$(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a +TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a OBJS = $(C_O_FILES) @@ -106,7 +101,7 @@ OBJS = $(C_O_FILES) AM_CFLAGS += $(LIBC_DEFINES) -all: ${ARCH} $(TMPINSTALL_FILES) +all-local: ${ARCH} $(TMPINSTALL_FILES) $(LIB): ${OBJS} $(make-library) @@ -116,9 +111,7 @@ $(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a: $(LIB) DOC_FILES = TODO CASES -EXTRA_DIST = \ -$(DOC_FILES) \ -$(COMMON_C_FILES) $(EMBEDDED_C_FILES) $(UNIX_C_FILES) \ -$(H_FILES) $(RTEMS_H_FILES) $(SYS_H_FILES) +EXTRA_DIST = $(DOC_FILES) $(COMMON_C_FILES) $(EMBEDDED_C_FILES) \ + $(UNIX_C_FILES) $(H_FILES) $(RTEMS_H_FILES) $(SYS_H_FILES) include $(top_srcdir)/../../../automake/local.am diff --git a/c/src/lib/libc/error.h b/c/src/lib/libc/error.h index a0698afb5d..de6e1715db 100644 --- a/c/src/lib/libc/error.h +++ b/c/src/lib/libc/error.h @@ -7,6 +7,10 @@ #ifndef __RTEMS_ERROR_h #define __RTEMS_ERROR_h +#ifdef __cplusplus +extern "C" { +#endif + /* * rtems_error() and rtems_panic() support */ @@ -34,5 +38,10 @@ void rtems_panic(const char *printf_format, ...); extern int rtems_panic_in_progress; +#ifdef __cplusplus +} +#endif + + #endif /* end of include file */ diff --git a/c/src/lib/libc/gxx_wrappers.c b/c/src/lib/libc/gxx_wrappers.c index e69de29bb2..323da73e7f 100644 --- a/c/src/lib/libc/gxx_wrappers.c +++ b/c/src/lib/libc/gxx_wrappers.c @@ -0,0 +1,219 @@ +/* + * RTEMS threads compatibily routines for libgcc2. + * + * by: Rosimildo da Silva ( rdasilva@connecttel.com + * + * Used ideas from: + * W. Eric Norum + * Canadian Light Source + * University of Saskatchewan + * Saskatoon, Saskatchewan, CANADA + * eric@cls.usask.ca + * + * Eric sent some e-mail in the rtems-list as a start point for this + * module implementation. + * + * + */ + +/* We might not need, defined just in case */ +#define __RTEMS_INSIDE__ 1 + + +#include <stdlib.h> +#include <stdio.h> + +#include <rtems.h> +#include <rtems/system.h> +#include <rtems/rtems/tasks.h> + +/* + * These typedefs should match with the ones defined in the file + * gcc/gthr-rtems.h in the gcc distribution. + */ +typedef void *__gthread_key_t; +typedef int __gthread_once_t; +typedef void *__gthread_mutex_t; + + +/* uncomment this if you need to debug this interface */ + +/* +#define DEBUG_GXX_WRAPPERS 1 +*/ + + +/* prototype for the terminate() */ +extern void __terminate( void ); + + +#ifdef DEBUG_GXX_WRAPPERS +/* local function to return the ID of the calling thread */ +static rtems_id get_tid( void ) +{ + rtems_id id = 0; + rtems_task_ident( RTEMS_SELF, 0, &id ); + return id; +} +#endif + + +int rtems_gxx_once(__gthread_once_t *once, void (*func) ()) +{ +#ifdef DEBUG_GXX_WRAPPERS + printk( "gxx_wrappers: once=%x, func=%x\n", *once, func ); +#endif + if( *once == 0 ) + { + /* + * NOTE: could not use the call to disable "preemption", it causes + * one exception. Somebody might want to investiage it further + * sometime later. + */ + _Thread_Disable_dispatch(); + *once = 1; + (*func)(); + _Thread_Enable_dispatch(); + } + return 0; +} + + +int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *)) +{ + /* Ok, this can be a bit tricky. We are going to return a "key" as a + * pointer to the buffer that will hold the value of the key itself. + * We have to to this, becuase the others functions on this interface + * deal with the value of the key, as used with the POSIX API. + */ + /* Do not pull your hair, trust me this works. :-) */ + __gthread_key_t *new_key = ( __gthread_key_t * )malloc( sizeof( __gthread_key_t ) ); + *key = ( __gthread_key_t )new_key; + *new_key = NULL; + +#ifdef DEBUG_GXX_WRAPPERS + printk( "gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key ); +#endif + /* register with RTEMS the buffer that will hold the key values */ + if( rtems_task_variable_add( RTEMS_SELF, (void **)new_key, NULL ) == RTEMS_SUCCESSFUL ) + return 0; + return -1; +} + +int rtems_gxx_key_dtor (__gthread_key_t key, void *ptr) +{ +#ifdef DEBUG_GXX_WRAPPERS + printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr ); +#endif + *(void **)key = 0; + return 0; +} + +int rtems_gxx_key_delete (__gthread_key_t key) +{ +#ifdef DEBUG_GXX_WRAPPERS + printk( "gxx_wrappers: delete key=%x\n", key ); +#endif + /* register with RTEMS the buffer that will hold the key values */ + if( rtems_task_variable_delete( RTEMS_SELF, (void **)key ) == RTEMS_SUCCESSFUL ) + { + if( key ) free( (void *)key ); + return 0; + } + return 0; +} + + +void *rtems_gxx_getspecific(__gthread_key_t key) +{ + void *p= 0; + + /* register with RTEMS the buffer that will hold the key values */ + if( rtems_task_variable_get( RTEMS_SELF, (void **)key, &p ) == RTEMS_SUCCESSFUL ) + { + /* We do not have to do this, but what the heck ! */ + p= *( void **)key; + } + else + { + /* fisrt time, always set to zero, it is unknown the value that the others + * threads are using at the moment of this call + */ + if( rtems_task_variable_add( RTEMS_SELF, (void **)key, NULL ) != RTEMS_SUCCESSFUL ) + { + __terminate (); + } + *( void ** )key = (void *)0; + } + +#ifdef DEBUG_GXX_WRAPPERS + printk( "gxx_wrappers: getspecific key=%x, ptr=%x, id=%x\n", key, p, get_tid() ); +#endif + return p; +} + + +int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr) +{ +#ifdef DEBUG_GXX_WRAPPERS + printk( "gxx_wrappers: setspecific key=%x, ptr=%x, id=%x\n", key, ptr, get_tid() ); +#endif + /* register with RTEMS the buffer that will hold the key values */ + if( rtems_task_variable_add( RTEMS_SELF, (void **)key, NULL ) == RTEMS_SUCCESSFUL ) + { + /* now let's set the proper value */ + *( void ** )key = (void *)ptr; + return 0; + } + return -1; +} + + +/* + * MUTEX support + */ +void rtems_gxx_mutex_init (__gthread_mutex_t *mutex) +{ +#ifdef DEBUG_GXX_WRAPPERS + printk( "gxx_wrappers: mutex init =%X\n", *mutex ); +#endif + if( rtems_semaphore_create( rtems_build_name ('G', 'C', 'C', '2'), + 1, + RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE + |RTEMS_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL, + 0, + (rtems_id *)mutex ) != RTEMS_SUCCESSFUL ) + { + __terminate (); + } +#ifdef DEBUG_GXX_WRAPPERS + printk( "gxx_wrappers: mutex init complete =%X\n", *mutex ); +#endif +} + +int rtems_gxx_mutex_lock (__gthread_mutex_t *mutex) +{ +#ifdef DEBUG_GXX_WRAPPERS + printk( "gxx_wrappers: lock mutex=%X\n", *mutex ); +#endif + return ( rtems_semaphore_obtain( (rtems_id)*mutex, + RTEMS_WAIT, RTEMS_NO_TIMEOUT ) == RTEMS_SUCCESSFUL) ? 0 : -1; +} + +int rtems_gxx_mutex_trylock (__gthread_mutex_t *mutex) +{ +#ifdef DEBUG_GXX_WRAPPERS + printk( "gxx_wrappers: trylock mutex=%X\n", *mutex ); +#endif + return (rtems_semaphore_obtain ((rtems_id)*mutex, + RTEMS_NO_WAIT, 0) == RTEMS_SUCCESSFUL) ? 0 : -1; +} + +int rtems_gxx_mutex_unlock (__gthread_mutex_t *mutex) +{ +#ifdef DEBUG_GXX_WRAPPERS + printk( "gxx_wrappers: unlock mutex=%X\n", *mutex ); +#endif + return (rtems_semaphore_release( (rtems_id)*mutex ) == RTEMS_SUCCESSFUL) ? 0 :-1; +} + diff --git a/c/src/lib/libc/imfs.h b/c/src/lib/libc/imfs.h index 38c770a325..3a44c50ee3 100644 --- a/c/src/lib/libc/imfs.h +++ b/c/src/lib/libc/imfs.h @@ -157,9 +157,9 @@ struct IMFS_jnode_tt { uid_t st_uid; /* User ID of owner */ gid_t st_gid; /* Group ID of owner */ - time_t st_atime; /* Time of last access */ - time_t st_mtime; /* Time of last modification */ - time_t st_ctime; /* Time of last status change */ + time_t stat_atime; /* Time of last access */ + time_t stat_mtime; /* Time of last modification */ + time_t stat_ctime; /* Time of last status change */ IMFS_jnode_types_t type; /* Type of this entry */ IMFS_types_union info; }; @@ -168,29 +168,29 @@ struct IMFS_jnode_tt { do { \ struct timeval tv; \ gettimeofday( &tv, 0 ); \ - _jnode->st_atime = (time_t) tv.tv_sec; \ + _jnode->stat_atime = (time_t) tv.tv_sec; \ } while (0) #define IMFS_update_mtime( _jnode ) \ do { \ struct timeval tv; \ gettimeofday( &tv, 0 ); \ - _jnode->st_mtime = (time_t) tv.tv_sec; \ + _jnode->stat_mtime = (time_t) tv.tv_sec; \ } while (0) #define IMFS_update_ctime( _jnode ) \ do { \ struct timeval tv; \ gettimeofday( &tv, 0 ); \ - _jnode->st_ctime = (time_t) tv.tv_sec; \ + _jnode->stat_ctime = (time_t) tv.tv_sec; \ } while (0) #define IMFS_atime_mtime_update( _jnode ) \ do { \ struct timeval tv; \ gettimeofday( &tv, 0 ); \ - _jnode->st_mtime = (time_t) tv.tv_sec; \ - _jnode->st_atime = (time_t) tv.tv_sec; \ + _jnode->stat_mtime = (time_t) tv.tv_sec; \ + _jnode->stat_atime = (time_t) tv.tv_sec; \ } while (0) typedef struct { diff --git a/c/src/lib/libc/imfs_creat.c b/c/src/lib/libc/imfs_creat.c index 227b5f9300..b60e78540e 100644 --- a/c/src/lib/libc/imfs_creat.c +++ b/c/src/lib/libc/imfs_creat.c @@ -72,9 +72,9 @@ IMFS_jnode_t *IMFS_create_node( gettimeofday( &tv, 0 ); - node->st_atime = (time_t) tv.tv_sec; - node->st_mtime = (time_t) tv.tv_sec; - node->st_ctime = (time_t) tv.tv_sec; + node->stat_atime = (time_t) tv.tv_sec; + node->stat_mtime = (time_t) tv.tv_sec; + node->stat_ctime = (time_t) tv.tv_sec; /* * Set the type specific information diff --git a/c/src/lib/libc/imfs_directory.c b/c/src/lib/libc/imfs_directory.c index 1f6d9b5ff5..38280c565c 100644 --- a/c/src/lib/libc/imfs_directory.c +++ b/c/src/lib/libc/imfs_directory.c @@ -219,9 +219,9 @@ int imfs_dir_lseek( * dirent structure * st_blksize 0 * st_blocks 0 - * st_atime time of last access - * st_mtime time of last modification - * st_ctime time of the last change + * stat_atime time of last access + * stat_mtime time of last modification + * stat_ctime time of the last change * * This information will be returned to the calling function in a -stat- struct * @@ -248,9 +248,9 @@ int imfs_dir_fstat( buf->st_rdev = 0ll; buf->st_blksize = 0; buf->st_blocks = 0; - buf->st_atime = the_jnode->st_atime; - buf->st_mtime = the_jnode->st_mtime; - buf->st_ctime = the_jnode->st_ctime; + buf->st_atime = the_jnode->stat_atime; + buf->st_mtime = the_jnode->stat_mtime; + buf->st_ctime = the_jnode->stat_ctime; buf->st_size = 0; diff --git a/c/src/lib/libc/imfs_stat.c b/c/src/lib/libc/imfs_stat.c index 2edc1a9e9b..f5858498c1 100644 --- a/c/src/lib/libc/imfs_stat.c +++ b/c/src/lib/libc/imfs_stat.c @@ -50,9 +50,9 @@ int IMFS_stat( buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; - buf->st_atime = the_jnode->st_atime; - buf->st_mtime = the_jnode->st_mtime; - buf->st_ctime = the_jnode->st_ctime; + buf->st_atime = the_jnode->stat_atime; + buf->st_mtime = the_jnode->stat_mtime; + buf->st_ctime = the_jnode->stat_ctime; return 0; } diff --git a/c/src/lib/libc/imfs_utime.c b/c/src/lib/libc/imfs_utime.c index e20d352c50..c9bd9ddd90 100644 --- a/c/src/lib/libc/imfs_utime.c +++ b/c/src/lib/libc/imfs_utime.c @@ -30,8 +30,8 @@ int IMFS_utime( the_jnode = (IMFS_jnode_t *) pathloc->node_access; - the_jnode->st_atime = actime; - the_jnode->st_mtime = modtime; + the_jnode->stat_atime = actime; + the_jnode->stat_mtime = modtime; return 0; } diff --git a/c/src/lib/libc/libio.c b/c/src/lib/libc/libio.c index 9e075c9f0b..c878db6247 100644 --- a/c/src/lib/libc/libio.c +++ b/c/src/lib/libc/libio.c @@ -260,7 +260,7 @@ int rtems_libio_is_open_files_in_fs( * Look for any active file descriptor entry. */ - for (iop=rtems_libio_iops,i=0; i <= rtems_libio_number_iops; iop++, i++){ + for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { @@ -304,7 +304,7 @@ int rtems_libio_is_file_open( * Look for any active file descriptor entry. */ - for (iop=rtems_libio_iops,i=0; i <= rtems_libio_number_iops; iop++, i++){ + for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { /* diff --git a/c/src/lib/libc/malloc.c b/c/src/lib/libc/malloc.c index cc63b6c7d0..08660d75cc 100644 --- a/c/src/lib/libc/malloc.c +++ b/c/src/lib/libc/malloc.c @@ -120,7 +120,7 @@ void RTEMS_Malloc_Initialize( rtems_build_name( 'H', 'E', 'A', 'P' ), starting_address, length, - CPU_ALIGNMENT, + CPU_HEAP_ALIGNMENT, RTEMS_DEFAULT_ATTRIBUTES, &RTEMS_Malloc_Heap ); diff --git a/c/src/lib/libc/scandir.c b/c/src/lib/libc/scandir.c index 43c7c51747..25f3263187 100644 --- a/c/src/lib/libc/scandir.c +++ b/c/src/lib/libc/scandir.c @@ -112,7 +112,7 @@ scandir(dirname, namelist, select, dcomp) p->d_ino = d->d_ino; p->d_reclen = d->d_reclen; p->d_namlen = d->d_namlen; - strncpy(p->d_name, d->d_name, p->d_namlen + 1); + strncpy(d->d_name, p->d_name, p->d_namlen + 1); /* * Check to make sure the array has space left and * realloc the maximum size. diff --git a/c/src/lib/libc/termios.c b/c/src/lib/libc/termios.c index 6d334ecd23..7883e94b63 100644 --- a/c/src/lib/libc/termios.c +++ b/c/src/lib/libc/termios.c @@ -28,7 +28,6 @@ * FreeBSD does not support a full POSIX termios so we have to help it out */ - #if defined(__FreeBSD__) #define XTABS 0 #define ONLRET 0 @@ -41,6 +40,14 @@ #endif /* + * Cygwin does not define these + */ + +#if defined(__CYGWIN__) +#define ECHOPRT 0 +#endif + +/* * The size of the cooked buffer */ #define CBUFSIZE 256 @@ -238,7 +245,7 @@ rtems_termios_open ( */ tty->termios.c_iflag = BRKINT | ICRNL | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; - tty->termios.c_cflag = B9600 | CS8 | CREAD; + tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; @@ -256,8 +263,8 @@ rtems_termios_open ( tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; - /* setup flow control mode, clear flow control flags */ - tty->flow_ctrl = FL_MDXON; + /* start with no flow control, clear flow control flags */ + tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ diff --git a/c/src/lib/libc/termiosreserveresources.c b/c/src/lib/libc/termiosreserveresources.c index 2d9c05c988..664bdd1f62 100644 --- a/c/src/lib/libc/termiosreserveresources.c +++ b/c/src/lib/libc/termiosreserveresources.c @@ -6,15 +6,19 @@ #include <rtems.h> +#if 0 static int first_time; /* assumed to be zeroed by BSS initialization */ +#endif void rtems_termios_reserve_resources ( rtems_configuration_table *configuration, rtems_unsigned32 number_of_devices ) { +#if 0 rtems_api_configuration_table *rtems_config; + if (!configuration) rtems_fatal_error_occurred (0xFFF0F001); rtems_config = configuration->RTEMS_api_configuration; @@ -24,5 +28,6 @@ void rtems_termios_reserve_resources ( rtems_config->maximum_semaphores += 1; first_time = 1; rtems_config->maximum_semaphores += (4 * number_of_devices); +#endif } diff --git a/c/src/lib/libc/unmount.c b/c/src/lib/libc/unmount.c index c4b6bdae7d..46b11d1848 100644 --- a/c/src/lib/libc/unmount.c +++ b/c/src/lib/libc/unmount.c @@ -62,7 +62,6 @@ int unmount( int status; rtems_filesystem_location_info_t temp_loc; rtems_filesystem_mount_table_entry_t temp_mt_entry; - int result; /* * Are there any file systems below the mount_path specified @@ -101,7 +100,7 @@ int unmount( /* * Allow the file system being mounted on to do its cleanup. * XXX - Did I change these correctly ??? It looks like either I did - * XXX this backwards or the IMFS_unmount and IMFS_fsumount are swaped. + * XXX this backwards or the IMFS_unmount and IMFS_fsumount are swapped. * XXX Add to the mt_point_node unmount to set the mt_entry back to null * XXX I will step off in space when evaluating past the end of the node. */ @@ -121,12 +120,6 @@ int unmount( } /* - * Allow the file system to clean up. - */ - - result = (*temp_loc.ops->fsunmount_me)( temp_loc.mt_entry ); - - /* * Extract the mount table entry from the chain */ @@ -140,8 +133,7 @@ int unmount( free( temp_loc.mt_entry ); rtems_filesystem_freenode( &temp_loc ); - return result; - + return 0; } diff --git a/c/src/lib/libcpu/Makefile.am b/c/src/lib/libcpu/Makefile.am index e1d1694a24..c3bf45662c 100644 --- a/c/src/lib/libcpu/Makefile.am +++ b/c/src/lib/libcpu/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal diff --git a/c/src/lib/libcpu/a29k/Makefile.am b/c/src/lib/libcpu/a29k/Makefile.am index e9046ede08..d9fad31f51 100644 --- a/c/src/lib/libcpu/a29k/Makefile.am +++ b/c/src/lib/libcpu/a29k/Makefile.am @@ -1,11 +1,11 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal -SUBDIRS = clock timer +SUBDIRS = clock timer include $(top_srcdir)/../../../../../automake/subdirs.am include $(top_srcdir)/../../../../../automake/local.am diff --git a/c/src/lib/libcpu/a29k/clock/Makefile.am b/c/src/lib/libcpu/a29k/clock/Makefile.am index 00fc4bc7b8..755c132239 100644 --- a/c/src/lib/libcpu/a29k/clock/Makefile.am +++ b/c/src/lib/libcpu/a29k/clock/Makefile.am @@ -1,10 +1,10 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 -PGM=$(ARCH)/clock.rel +PGM = $(ARCH)/clock.rel C_FILES = ckinit.c C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o) diff --git a/c/src/lib/libcpu/a29k/timer/Makefile.am b/c/src/lib/libcpu/a29k/timer/Makefile.am index c87e702427..a468af3fbe 100644 --- a/c/src/lib/libcpu/a29k/timer/Makefile.am +++ b/c/src/lib/libcpu/a29k/timer/Makefile.am @@ -1,10 +1,10 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 -PGM=$(ARCH)/timer.rel +PGM = $(ARCH)/timer.rel # NOTE: timerisr is normally an assembly file!!! diff --git a/c/src/lib/libcpu/hppa1.1/Makefile.am b/c/src/lib/libcpu/hppa1.1/Makefile.am index 45763883d6..2abc6093f2 100644 --- a/c/src/lib/libcpu/hppa1.1/Makefile.am +++ b/c/src/lib/libcpu/hppa1.1/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal diff --git a/c/src/lib/libcpu/hppa1.1/clock/Makefile.am b/c/src/lib/libcpu/hppa1.1/clock/Makefile.am index b79f23bd38..f8b46ecc12 100644 --- a/c/src/lib/libcpu/hppa1.1/clock/Makefile.am +++ b/c/src/lib/libcpu/hppa1.1/clock/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/hppa1.1/include/Makefile.am b/c/src/lib/libcpu/hppa1.1/include/Makefile.am index f99916c405..8adb914568 100644 --- a/c/src/lib/libcpu/hppa1.1/include/Makefile.am +++ b/c/src/lib/libcpu/hppa1.1/include/Makefile.am @@ -1,12 +1,12 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 H_FILES = runway.h semaphore.h -# NOTE: Unlike other CPUS, we install into a subdirectory to avoid +# NOTE: Unlike other CPUS, we install into a subdirectory to avoid # file name conflicts $(PROJECT_INCLUDE)/hppa1.1: diff --git a/c/src/lib/libcpu/hppa1.1/milli/Makefile.am b/c/src/lib/libcpu/hppa1.1/milli/Makefile.am index d642f8ec89..41744e4ef2 100644 --- a/c/src/lib/libcpu/hppa1.1/milli/Makefile.am +++ b/c/src/lib/libcpu/hppa1.1/milli/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/hppa1.1/semaphore/Makefile.am b/c/src/lib/libcpu/hppa1.1/semaphore/Makefile.am index 96f8324776..c0af1ec990 100644 --- a/c/src/lib/libcpu/hppa1.1/semaphore/Makefile.am +++ b/c/src/lib/libcpu/hppa1.1/semaphore/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/hppa1.1/timer/Makefile.am b/c/src/lib/libcpu/hppa1.1/timer/Makefile.am index d586fcac77..65edc98d9f 100644 --- a/c/src/lib/libcpu/hppa1.1/timer/Makefile.am +++ b/c/src/lib/libcpu/hppa1.1/timer/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/i386/Makefile.am b/c/src/lib/libcpu/i386/Makefile.am index ee4972ff64..90e2d0bc8b 100644 --- a/c/src/lib/libcpu/i386/Makefile.am +++ b/c/src/lib/libcpu/i386/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal diff --git a/c/src/lib/libcpu/m68k/Makefile.am b/c/src/lib/libcpu/m68k/Makefile.am index a0579f3cf3..6e9cd33d32 100644 --- a/c/src/lib/libcpu/m68k/Makefile.am +++ b/c/src/lib/libcpu/m68k/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal diff --git a/c/src/lib/libcpu/m68k/m68040/Makefile.am b/c/src/lib/libcpu/m68k/m68040/Makefile.am index 0ae724c75a..24fa3c6a9f 100644 --- a/c/src/lib/libcpu/m68k/m68040/Makefile.am +++ b/c/src/lib/libcpu/m68k/m68040/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/m68k/m68040/fpsp/Makefile.am b/c/src/lib/libcpu/m68k/m68040/fpsp/Makefile.am index 3e0284b63f..c4ffe3f26d 100644 --- a/c/src/lib/libcpu/m68k/m68040/fpsp/Makefile.am +++ b/c/src/lib/libcpu/m68k/m68040/fpsp/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -28,8 +28,6 @@ OBJS = $(C_O_FILES) $(S_O_FILES) # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS += $(CFLAGS_OS_V) - $(PGM): $(OBJS) $(make-rel) diff --git a/c/src/lib/libcpu/mips/Makefile.am b/c/src/lib/libcpu/mips/Makefile.am index f40a256bdd..d9fad31f51 100644 --- a/c/src/lib/libcpu/mips/Makefile.am +++ b/c/src/lib/libcpu/mips/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal diff --git a/c/src/lib/libcpu/mips/clock/Makefile.am b/c/src/lib/libcpu/mips/clock/Makefile.am index e235a5d4de..6384df0a0a 100644 --- a/c/src/lib/libcpu/mips/clock/Makefile.am +++ b/c/src/lib/libcpu/mips/clock/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/mips/timer/Makefile.am b/c/src/lib/libcpu/mips/timer/Makefile.am index ee37d10453..d0c0ee598f 100644 --- a/c/src/lib/libcpu/mips/timer/Makefile.am +++ b/c/src/lib/libcpu/mips/timer/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/mips64orion/Makefile.am b/c/src/lib/libcpu/mips64orion/Makefile.am index f40a256bdd..d9fad31f51 100644 --- a/c/src/lib/libcpu/mips64orion/Makefile.am +++ b/c/src/lib/libcpu/mips64orion/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal diff --git a/c/src/lib/libcpu/mips64orion/clock/Makefile.am b/c/src/lib/libcpu/mips64orion/clock/Makefile.am index e235a5d4de..6384df0a0a 100644 --- a/c/src/lib/libcpu/mips64orion/clock/Makefile.am +++ b/c/src/lib/libcpu/mips64orion/clock/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/mips64orion/timer/Makefile.am b/c/src/lib/libcpu/mips64orion/timer/Makefile.am index ee37d10453..d0c0ee598f 100644 --- a/c/src/lib/libcpu/mips64orion/timer/Makefile.am +++ b/c/src/lib/libcpu/mips64orion/timer/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/powerpc/Makefile.am b/c/src/lib/libcpu/powerpc/Makefile.am index e8fc76d85e..9f82006795 100644 --- a/c/src/lib/libcpu/powerpc/Makefile.am +++ b/c/src/lib/libcpu/powerpc/Makefile.am @@ -1,14 +1,14 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal -## Check configure.in for conditions to set the conditionals below +## Check configure.in for conditions to set the conditionals below if shared SHARED_LIB = shared -endif +endif if mpc505 CPU_SUBDIR = mpc505 diff --git a/c/src/lib/libcpu/powerpc/mpc505/Makefile.am b/c/src/lib/libcpu/powerpc/mpc505/Makefile.am index a482efa54f..37b11c93a3 100644 --- a/c/src/lib/libcpu/powerpc/mpc505/Makefile.am +++ b/c/src/lib/libcpu/powerpc/mpc505/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/powerpc/mpc505/timer/Makefile.am b/c/src/lib/libcpu/powerpc/mpc505/timer/Makefile.am index a8bfed1b4a..65edc98d9f 100644 --- a/c/src/lib/libcpu/powerpc/mpc505/timer/Makefile.am +++ b/c/src/lib/libcpu/powerpc/mpc505/timer/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -17,8 +17,6 @@ include $(top_srcdir)/../../../../../automake/lib.am # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS = $(CFLAGS_OS_V) - $(PGM): $(timer_rel_OBJECTS) $(make-rel) diff --git a/c/src/lib/libcpu/powerpc/mpc505/vectors/Makefile.am b/c/src/lib/libcpu/powerpc/mpc505/vectors/Makefile.am index 3b5aed6f7d..0f5a304686 100644 --- a/c/src/lib/libcpu/powerpc/mpc505/vectors/Makefile.am +++ b/c/src/lib/libcpu/powerpc/mpc505/vectors/Makefile.am @@ -1,12 +1,13 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 -## FIXME VPATH = @srcdir@:@srcdir@/../../ppc403/vectors +## FIXME + PGM = ${ARCH}/vectors.rel ## Assembly sources @@ -21,8 +22,6 @@ include $(top_srcdir)/../../../../../automake/lib.am # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS = $(CFLAGS_OS_V) - $(PGM): $(vectors_rel_OBJECTS) $(make-rel) diff --git a/c/src/lib/libcpu/powerpc/mpc6xx/Makefile.am b/c/src/lib/libcpu/powerpc/mpc6xx/Makefile.am index 0cde1acc1e..c5452ae7a0 100644 --- a/c/src/lib/libcpu/powerpc/mpc6xx/Makefile.am +++ b/c/src/lib/libcpu/powerpc/mpc6xx/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/powerpc/mpc6xx/clock/Makefile.am b/c/src/lib/libcpu/powerpc/mpc6xx/clock/Makefile.am index fb711f3414..7ac55df4a7 100644 --- a/c/src/lib/libcpu/powerpc/mpc6xx/clock/Makefile.am +++ b/c/src/lib/libcpu/powerpc/mpc6xx/clock/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -22,8 +22,6 @@ $(PROJECT_INCLUDE)/libcpu/%.h: %.h # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS = $(CFLAGS_OS_V) - PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu \ $(PROJECT_INCLUDE)/libcpu/c_clock.h diff --git a/c/src/lib/libcpu/powerpc/mpc6xx/exceptions/Makefile.am b/c/src/lib/libcpu/powerpc/mpc6xx/exceptions/Makefile.am index e1aca735af..ea6b94b5b5 100644 --- a/c/src/lib/libcpu/powerpc/mpc6xx/exceptions/Makefile.am +++ b/c/src/lib/libcpu/powerpc/mpc6xx/exceptions/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -27,8 +27,6 @@ $(PROJECT_INCLUDE)/libcpu/%.h: %.h # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS = $(CFLAGS_OS_V) - $(PGM): $(exceptions_rel_OBJECTS) $(make-rel) diff --git a/c/src/lib/libcpu/powerpc/mpc6xx/mmu/Makefile.am b/c/src/lib/libcpu/powerpc/mpc6xx/mmu/Makefile.am index 0c3ee63743..c64da3def0 100644 --- a/c/src/lib/libcpu/powerpc/mpc6xx/mmu/Makefile.am +++ b/c/src/lib/libcpu/powerpc/mpc6xx/mmu/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -26,8 +26,6 @@ $(PROJECT_INCLUDE)/libcpu/%.h: %.h # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS = $(CFLAGS_OS_V) - $(PGM): $(mmu_rel_OBJECTS) $(make-rel) diff --git a/c/src/lib/libcpu/powerpc/mpc6xx/timer/Makefile.am b/c/src/lib/libcpu/powerpc/mpc6xx/timer/Makefile.am index a8bfed1b4a..65edc98d9f 100644 --- a/c/src/lib/libcpu/powerpc/mpc6xx/timer/Makefile.am +++ b/c/src/lib/libcpu/powerpc/mpc6xx/timer/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -17,8 +17,6 @@ include $(top_srcdir)/../../../../../automake/lib.am # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS = $(CFLAGS_OS_V) - $(PGM): $(timer_rel_OBJECTS) $(make-rel) diff --git a/c/src/lib/libcpu/powerpc/mpc6xx/wrapup/Makefile.am b/c/src/lib/libcpu/powerpc/mpc6xx/wrapup/Makefile.am index 819c3a6c2b..36950229a9 100644 --- a/c/src/lib/libcpu/powerpc/mpc6xx/wrapup/Makefile.am +++ b/c/src/lib/libcpu/powerpc/mpc6xx/wrapup/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -9,9 +9,9 @@ PROC_SPECIFIC_O_FILES = exceptions mmu GENERIC_FILES = # bummer; have to use $foreach since % pattern subst rules only replace 1x -OBJS = $(foreach piece, $(PROC_SPECIFIC_O_FILES), \ - ../../mpc6xx/$(piece)/$(ARCH)/*.o) $(foreach piece, $(GENERIC_FILES), \ - ../../mpc6xx/$(piece)/$(ARCH)/*.o) +OBJS = \ + $(foreach piece, $(PROC_SPECIFIC_O_FILES), ../../mpc6xx/$(piece)/$(ARCH)/*.o) \ + $(foreach piece, $(GENERIC_FILES), ../../mpc6xx/$(piece)/$(ARCH)/*.o) LIB = $(ARCH)/libcpuspec.a include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg diff --git a/c/src/lib/libcpu/powerpc/mpc821/Makefile.am b/c/src/lib/libcpu/powerpc/mpc821/Makefile.am index f5b09cdd4a..a5679c9061 100644 --- a/c/src/lib/libcpu/powerpc/mpc821/Makefile.am +++ b/c/src/lib/libcpu/powerpc/mpc821/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/powerpc/mpc821/clock/Makefile.am b/c/src/lib/libcpu/powerpc/mpc821/clock/Makefile.am index 2ed74ad76f..f8b46ecc12 100644 --- a/c/src/lib/libcpu/powerpc/mpc821/clock/Makefile.am +++ b/c/src/lib/libcpu/powerpc/mpc821/clock/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -17,8 +17,6 @@ include $(top_srcdir)/../../../../../automake/lib.am # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS = $(CFLAGS_OS_V) - $(PGM): $(clock_rel_OBJECTS) $(make-rel) diff --git a/c/src/lib/libcpu/powerpc/mpc821/console-generic/Makefile.am b/c/src/lib/libcpu/powerpc/mpc821/console-generic/Makefile.am index 279386ae5e..b0c900fc7c 100644 --- a/c/src/lib/libcpu/powerpc/mpc821/console-generic/Makefile.am +++ b/c/src/lib/libcpu/powerpc/mpc821/console-generic/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -17,8 +17,6 @@ include $(top_srcdir)/../../../../../automake/lib.am # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS = $(CFLAGS_OS_V) - $(PGM): $(console_generic_rel_OBJECTS) $(make-rel) diff --git a/c/src/lib/libcpu/powerpc/mpc821/console-generic/console-generic.c b/c/src/lib/libcpu/powerpc/mpc821/console-generic/console-generic.c index 325fcbf87d..f93022f142 100644 --- a/c/src/lib/libcpu/powerpc/mpc821/console-generic/console-generic.c +++ b/c/src/lib/libcpu/powerpc/mpc821/console-generic/console-generic.c @@ -71,7 +71,6 @@ static volatile m821BufferDescriptor_t *RxBd[NIFACES], *TxBd[NIFACES]; */ static int m821_get_brg_cd(int); unsigned char m821_get_brg_clk(int); -void m821_console_reserve_resources(rtems_configuration_table *); unsigned char m821_get_brg_clk(int); @@ -99,7 +98,7 @@ m821_get_brg_cd (int baud) /* at any time since the OS started. It needs to be fixed. FIXME */ unsigned char m821_get_brg_clk(int baud) { - static short brg_spd[4]; + static int brg_spd[4]; static char brg_used[4]; int i; @@ -370,8 +369,8 @@ m821_smc_initialize (int port) /* port is the SMC number (i.e. 1 or 2) */ /* * Put SMC in NMSI mode, connect SMC to BRG */ - m821.simode &= ~0x7000 << ((port-1) * 8); - m821.simode |= brg << (12 + ((port-1) * 8)); + m860.simode &= ~(0x7000 << ((port-1) * 16)); + m860.simode |= brg << (12 + ((port-1) * 16)); /* * Set up SMC1 parameter RAM common to all protocols @@ -677,14 +676,6 @@ m821_buf_poll_write (int minor, char *buf, int len) return 0; } -/* - * This is needed in case we use TERMIOS - */ -void m821_console_reserve_resources(rtems_configuration_table *configuration) -{ - rtems_termios_reserve_resources (configuration, 1); -} - void m821_console_initialize(void) { int i; diff --git a/c/src/lib/libcpu/powerpc/mpc821/include/Makefile.am b/c/src/lib/libcpu/powerpc/mpc821/include/Makefile.am index 2fad30df67..8a4dfbd74d 100644 --- a/c/src/lib/libcpu/powerpc/mpc821/include/Makefile.am +++ b/c/src/lib/libcpu/powerpc/mpc821/include/Makefile.am @@ -1,15 +1,14 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 H_FILES = console.h mpc821.h noinst_HEADERS = $(H_FILES) -TMPINSTALL_FILES = \ -$(PROJECT_INCLUDE)/mpc821 \ -$(H_FILES:%=$(PROJECT_INCLUDE)/mpc821/%) +TMPINSTALL_FILES += $(PROJECT_INCLUDE)/mpc821 \ + $(H_FILES:%=$(PROJECT_INCLUDE)/mpc821/%) $(PROJECT_INCLUDE)/mpc821: $(mkinstalldirs) $@ @@ -17,6 +16,6 @@ $(PROJECT_INCLUDE)/mpc821: $(PROJECT_INCLUDE)/mpc821/%.h: %.h $(INSTALL_DATA) $< $@ -all-local: $(TMPINSTALL_FILES) +all-local: $(TMPINSTALL_FILES) include $(top_srcdir)/../../../../../automake/local.am diff --git a/c/src/lib/libcpu/powerpc/mpc821/timer/Makefile.am b/c/src/lib/libcpu/powerpc/mpc821/timer/Makefile.am index a8bfed1b4a..65edc98d9f 100644 --- a/c/src/lib/libcpu/powerpc/mpc821/timer/Makefile.am +++ b/c/src/lib/libcpu/powerpc/mpc821/timer/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -17,8 +17,6 @@ include $(top_srcdir)/../../../../../automake/lib.am # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS = $(CFLAGS_OS_V) - $(PGM): $(timer_rel_OBJECTS) $(make-rel) diff --git a/c/src/lib/libcpu/powerpc/mpc821/vectors/Makefile.am b/c/src/lib/libcpu/powerpc/mpc821/vectors/Makefile.am index d82045bf32..8d8bce2c1d 100644 --- a/c/src/lib/libcpu/powerpc/mpc821/vectors/Makefile.am +++ b/c/src/lib/libcpu/powerpc/mpc821/vectors/Makefile.am @@ -1,12 +1,13 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 -## FIXME VPATH = @srcdir@:@srcdir@/../../ppc403/vectors +## FIXME + PGM = ${ARCH}/vectors.rel ## Assembly sources @@ -21,8 +22,6 @@ include $(top_srcdir)/../../../../../automake/lib.am # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS = $(CFLAGS_OS_V) - $(PGM): $(vectors_rel_OBJECTS) $(make-rel) diff --git a/c/src/lib/libcpu/powerpc/mpc860/Makefile.am b/c/src/lib/libcpu/powerpc/mpc860/Makefile.am index f5b09cdd4a..a5679c9061 100644 --- a/c/src/lib/libcpu/powerpc/mpc860/Makefile.am +++ b/c/src/lib/libcpu/powerpc/mpc860/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/powerpc/mpc860/clock/Makefile.am b/c/src/lib/libcpu/powerpc/mpc860/clock/Makefile.am index 2ed74ad76f..f8b46ecc12 100644 --- a/c/src/lib/libcpu/powerpc/mpc860/clock/Makefile.am +++ b/c/src/lib/libcpu/powerpc/mpc860/clock/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -17,8 +17,6 @@ include $(top_srcdir)/../../../../../automake/lib.am # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS = $(CFLAGS_OS_V) - $(PGM): $(clock_rel_OBJECTS) $(make-rel) diff --git a/c/src/lib/libcpu/powerpc/mpc860/console-generic/Makefile.am b/c/src/lib/libcpu/powerpc/mpc860/console-generic/Makefile.am index 279386ae5e..b0c900fc7c 100644 --- a/c/src/lib/libcpu/powerpc/mpc860/console-generic/Makefile.am +++ b/c/src/lib/libcpu/powerpc/mpc860/console-generic/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -17,8 +17,6 @@ include $(top_srcdir)/../../../../../automake/lib.am # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS = $(CFLAGS_OS_V) - $(PGM): $(console_generic_rel_OBJECTS) $(make-rel) diff --git a/c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c b/c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c index e611b3bda8..76c1cb0314 100644 --- a/c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c +++ b/c/src/lib/libcpu/powerpc/mpc860/console-generic/console-generic.c @@ -74,7 +74,6 @@ static volatile m860BufferDescriptor_t *RxBd[NIFACES], *TxBd[NIFACES]; */ static int m860_get_brg_cd(int); unsigned char m860_get_brg_clk(int); -void m860_console_reserve_resources(rtems_configuration_table *); unsigned char m860_get_brg_clk(int); @@ -102,8 +101,8 @@ m860_get_brg_cd (int baud) /* at any time since the OS started. It needs to be fixed. FIXME */ unsigned char m860_get_brg_clk(int baud) { - static short brg_spd[4]; - static char brg_used[4]; + static int brg_spd[4]; + static char brg_used[4]; int i; /* first try to find a BRG that is already at the right speed */ @@ -385,8 +384,8 @@ m860_smc_initialize (int port) /* port is the SMC number (i.e. 1 or 2) */ /* * Put SMC in NMSI mode, connect SMC to BRG */ - m860.simode &= ~0x7000 << ((port-1) * 8); - m860.simode |= brg << (12 + ((port-1) * 8)); + m860.simode &= ~(0x7000 << ((port-1) * 16)); + m860.simode |= brg << (12 + ((port-1) * 16)); /* * Set up SMC1 parameter RAM common to all protocols @@ -770,14 +769,6 @@ m860_buf_poll_write (int minor, char *buf, int len) return 0; } -/* - * This is needed in case we use TERMIOS - */ -void m860_console_reserve_resources(rtems_configuration_table *configuration) -{ - rtems_termios_reserve_resources (configuration, 1); -} - void m860_console_initialize(void) { int i; diff --git a/c/src/lib/libcpu/powerpc/mpc860/include/Makefile.am b/c/src/lib/libcpu/powerpc/mpc860/include/Makefile.am index 4bd4d6d7b5..ebbb1a1e51 100644 --- a/c/src/lib/libcpu/powerpc/mpc860/include/Makefile.am +++ b/c/src/lib/libcpu/powerpc/mpc860/include/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -9,10 +9,9 @@ MPC860_H_FILES = console.h noinst_HEADERS = $(H_FILES) $(MPC860_H_FILES) -PREINSTALL_FILES = \ -$(PROJECT_INCLUDE)/mpc860 \ -$(H_FILES:%.h=$(PROJECT_INCLUDE)/%.h) \ -$(MPC860_H_FILES:%.h=$(PROJECT_INCLUDE)/mpc860/%.h) +PREINSTALL_FILES += $(PROJECT_INCLUDE)/mpc860 \ + $(H_FILES:%.h=$(PROJECT_INCLUDE)/%.h) \ + $(MPC860_H_FILES:%.h=$(PROJECT_INCLUDE)/mpc860/%.h) $(PROJECT_INCLUDE)/mpc860: $(mkinstalldirs) $@ @@ -23,6 +22,6 @@ $(PROJECT_INCLUDE)/%.h: %.h $(PROJECT_INCLUDE)/mpc860/%.h: %.h $(INSTALL_DATA) $< $@ -all-local: $(PREINSTALL_FILES) +all-local: $(PREINSTALL_FILES) include $(top_srcdir)/../../../../../automake/local.am diff --git a/c/src/lib/libcpu/powerpc/mpc860/include/mpc860.h b/c/src/lib/libcpu/powerpc/mpc860/include/mpc860.h index 7daee45bf0..4a9c20f049 100644 --- a/c/src/lib/libcpu/powerpc/mpc860/include/mpc860.h +++ b/c/src/lib/libcpu/powerpc/mpc860/include/mpc860.h @@ -112,8 +112,8 @@ * Memory controller registers */ typedef struct m860MEMCRegisters_ { - rtems_unsigned32 br; - rtems_unsigned32 or; + rtems_unsigned32 _br; + rtems_unsigned32 _or; } m860MEMCRegisters_t; /* diff --git a/c/src/lib/libcpu/powerpc/mpc860/timer/Makefile.am b/c/src/lib/libcpu/powerpc/mpc860/timer/Makefile.am index a8bfed1b4a..65edc98d9f 100644 --- a/c/src/lib/libcpu/powerpc/mpc860/timer/Makefile.am +++ b/c/src/lib/libcpu/powerpc/mpc860/timer/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -17,8 +17,6 @@ include $(top_srcdir)/../../../../../automake/lib.am # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS = $(CFLAGS_OS_V) - $(PGM): $(timer_rel_OBJECTS) $(make-rel) diff --git a/c/src/lib/libcpu/powerpc/mpc860/vectors/Makefile.am b/c/src/lib/libcpu/powerpc/mpc860/vectors/Makefile.am index d82045bf32..8d8bce2c1d 100644 --- a/c/src/lib/libcpu/powerpc/mpc860/vectors/Makefile.am +++ b/c/src/lib/libcpu/powerpc/mpc860/vectors/Makefile.am @@ -1,12 +1,13 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 -## FIXME VPATH = @srcdir@:@srcdir@/../../ppc403/vectors +## FIXME + PGM = ${ARCH}/vectors.rel ## Assembly sources @@ -21,8 +22,6 @@ include $(top_srcdir)/../../../../../automake/lib.am # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS = $(CFLAGS_OS_V) - $(PGM): $(vectors_rel_OBJECTS) $(make-rel) diff --git a/c/src/lib/libcpu/powerpc/new_exception_processing/Makefile.am b/c/src/lib/libcpu/powerpc/new_exception_processing/Makefile.am index c3195b159d..1f4affe8f4 100644 --- a/c/src/lib/libcpu/powerpc/new_exception_processing/Makefile.am +++ b/c/src/lib/libcpu/powerpc/new_exception_processing/Makefile.am @@ -9,7 +9,7 @@ C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o) ROOT_H_FILES = RTEMS_SCORE_H_FILES = cpu.h c_isr.inl -noinst_HEADERS = $(ROOT_H_FILES) $(RTEMS_SCORE_H_FILES) +noinst_HEADERS = $(ROOT_H_FILES) $(RTEMS_SCORE_H_FILES) S_FILES = cpu_asm.S S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o) @@ -21,11 +21,9 @@ include $(top_srcdir)/../../../../../../automake/lib.am # (OPTIONAL) Add local stuff here using += # -PREINSTALL_FILES = \ -$(PROJECT_INCLUDE) \ -$(PROJECT_INCLUDE)/rtems/score \ -$(ROOT_H_FILES:%=$(PROJECT_INCLUDE)/%) \ -$(RTEMS_SCORE_H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%) +PREINSTALL_FILES += $(PROJECT_INCLUDE) $(PROJECT_INCLUDE)/rtems/score \ + $(ROOT_H_FILES:%=$(PROJECT_INCLUDE)/%) \ + $(RTEMS_SCORE_H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%) ##TMPINSTALL_FILES += \ ##$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o @@ -55,10 +53,8 @@ all-local: $(ARCH) $(PREINSTALL_FILES) $(REL) ## all-local: $(ARCH)/rtems.o all-local: $(TMPINSTALL_FILES) -clean-local: - $(RM) -r ../o-optimize ../o-debug ../o-profile +CLEANDIRS = ../o-optimize ../o-debug ../o-profile -EXTRA_DIST = \ -$(C_FILES) $(S_FILES) +EXTRA_DIST = $(C_FILES) $(S_FILES) include $(top_srcdir)/../../../../../../automake/local.am diff --git a/c/src/lib/libcpu/powerpc/old-exceptions/irq_stub.S b/c/src/lib/libcpu/powerpc/old-exceptions/irq_stub.S index 76c8927305..400cccdf73 100644 --- a/c/src/lib/libcpu/powerpc/old-exceptions/irq_stub.S +++ b/c/src/lib/libcpu/powerpc/old-exceptions/irq_stub.S @@ -55,7 +55,9 @@ lis r11,_CPU_IRQ_info@ha addi r11,r11,_CPU_IRQ_info@l #endif +#if ( PPC_USE_DATA_CACHE ) dcbt r0, r11 +#endif stw r5, IP_CR(r1) stw r6, IP_CTR(r1) stw r7, IP_XER(r1) diff --git a/c/src/lib/libcpu/powerpc/old_exception_processing/Makefile.am b/c/src/lib/libcpu/powerpc/old_exception_processing/Makefile.am index afd66502eb..9629808140 100644 --- a/c/src/lib/libcpu/powerpc/old_exception_processing/Makefile.am +++ b/c/src/lib/libcpu/powerpc/old_exception_processing/Makefile.am @@ -19,14 +19,11 @@ S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o) include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg include $(top_srcdir)/../../../../../../automake/lib.am -PREINSTALL_FILES = \ -$(PROJECT_INCLUDE) \ -$(PROJECT_INCLUDE)/rtems/score \ -$(ROOT_H_FILES:%=$(PROJECT_INCLUDE)/%) \ -$(RTEMS_SCORE_H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%) +PREINSTALL_FILES += $(PROJECT_INCLUDE) $(PROJECT_INCLUDE)/rtems/score \ + $(ROOT_H_FILES:%=$(PROJECT_INCLUDE)/%) \ + $(RTEMS_SCORE_H_FILES:%=$(PROJECT_INCLUDE)/rtems/score/%) -TMPINSTALL_FILES += \ -$(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o +TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o $(PROJECT_RELEASE)/lib/rtems$(LIB_VARIANT).o: $(ARCH)/rtems.o $(INSTALL_DATA) $< $@ @@ -49,18 +46,12 @@ $(REL): $(C_O_FILES) $(S_O_FILES) test -d ../$(ARCH) || mkdir ../$(ARCH) $(make-rel) -all-local: $(ARCH) $(PREINSTALL_FILES) $(REL) -all-local: $(ARCH)/rtems.o -all-local: $(TMPINSTALL_FILES) +all-local: $(ARCH) $(PREINSTALL_FILES) $(REL) $(ARCH)/rtems.o $(TMPINSTALL_FILES) -clean-local: - $(RM) -r ../o-optimize ../o-debug ../o-profile +CLEANDIRS = ../o-optimize ../o-debug ../o-profile UNUSED_FILES = irq_stub.S -EXTRA_DIST = \ -TODO \ -rtems.S \ -$(C_FILES) $(S_FILES) $(UNUSED_FILES) +EXTRA_DIST = TODO rtems.S $(C_FILES) $(S_FILES) $(UNUSED_FILES) include $(top_srcdir)/../../../../../../automake/local.am diff --git a/c/src/lib/libcpu/powerpc/old_exception_processing/irq_stub.S b/c/src/lib/libcpu/powerpc/old_exception_processing/irq_stub.S index 76c8927305..400cccdf73 100644 --- a/c/src/lib/libcpu/powerpc/old_exception_processing/irq_stub.S +++ b/c/src/lib/libcpu/powerpc/old_exception_processing/irq_stub.S @@ -55,7 +55,9 @@ lis r11,_CPU_IRQ_info@ha addi r11,r11,_CPU_IRQ_info@l #endif +#if ( PPC_USE_DATA_CACHE ) dcbt r0, r11 +#endif stw r5, IP_CR(r1) stw r6, IP_CTR(r1) stw r7, IP_XER(r1) diff --git a/c/src/lib/libcpu/powerpc/ppc403/Makefile.am b/c/src/lib/libcpu/powerpc/ppc403/Makefile.am index 78d893c980..bd55ab2ed0 100644 --- a/c/src/lib/libcpu/powerpc/ppc403/Makefile.am +++ b/c/src/lib/libcpu/powerpc/ppc403/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/powerpc/ppc403/clock/Makefile.am b/c/src/lib/libcpu/powerpc/ppc403/clock/Makefile.am index 2ed74ad76f..f8b46ecc12 100644 --- a/c/src/lib/libcpu/powerpc/ppc403/clock/Makefile.am +++ b/c/src/lib/libcpu/powerpc/ppc403/clock/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -17,8 +17,6 @@ include $(top_srcdir)/../../../../../automake/lib.am # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS = $(CFLAGS_OS_V) - $(PGM): $(clock_rel_OBJECTS) $(make-rel) diff --git a/c/src/lib/libcpu/powerpc/ppc403/console/Makefile.am b/c/src/lib/libcpu/powerpc/ppc403/console/Makefile.am index 0dede804bf..4289321d14 100644 --- a/c/src/lib/libcpu/powerpc/ppc403/console/Makefile.am +++ b/c/src/lib/libcpu/powerpc/ppc403/console/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -17,8 +17,6 @@ include $(top_srcdir)/../../../../../automake/lib.am # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS = $(CFLAGS_OS_V) - $(PGM): $(console_rel_OBJECTS) $(make-rel) diff --git a/c/src/lib/libcpu/powerpc/ppc403/console/console.c b/c/src/lib/libcpu/powerpc/ppc403/console/console.c index 11177c8a42..9313a9bc90 100644 --- a/c/src/lib/libcpu/powerpc/ppc403/console/console.c +++ b/c/src/lib/libcpu/powerpc/ppc403/console/console.c @@ -404,16 +404,6 @@ spiInitialize(void) *************** */ -/* - * Reserve resources consumed by this driver - */ -void console_reserve_resources( - rtems_configuration_table *configuration -) -{ - rtems_termios_reserve_resources (configuration, 1); -} - /* console_initialize * * This routine initializes the console IO driver. diff --git a/c/src/lib/libcpu/powerpc/ppc403/ictrl/Makefile.am b/c/src/lib/libcpu/powerpc/ppc403/ictrl/Makefile.am index 7aa2278352..efefed93e9 100644 --- a/c/src/lib/libcpu/powerpc/ppc403/ictrl/Makefile.am +++ b/c/src/lib/libcpu/powerpc/ppc403/ictrl/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -24,8 +24,6 @@ $(PROJECT_INCLUDE)/%.h: %.h # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS = $(CFLAGS_OS_V) - $(PGM): $(ictrl_rel_OBJECTS) $(make-rel) diff --git a/c/src/lib/libcpu/powerpc/ppc403/timer/Makefile.am b/c/src/lib/libcpu/powerpc/ppc403/timer/Makefile.am index a8bfed1b4a..65edc98d9f 100644 --- a/c/src/lib/libcpu/powerpc/ppc403/timer/Makefile.am +++ b/c/src/lib/libcpu/powerpc/ppc403/timer/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -17,8 +17,6 @@ include $(top_srcdir)/../../../../../automake/lib.am # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS = $(CFLAGS_OS_V) - $(PGM): $(timer_rel_OBJECTS) $(make-rel) diff --git a/c/src/lib/libcpu/powerpc/ppc403/vectors/Makefile.am b/c/src/lib/libcpu/powerpc/ppc403/vectors/Makefile.am index 65eb4ae728..ce95f92721 100644 --- a/c/src/lib/libcpu/powerpc/ppc403/vectors/Makefile.am +++ b/c/src/lib/libcpu/powerpc/ppc403/vectors/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -18,8 +18,6 @@ include $(top_srcdir)/../../../../../automake/lib.am # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS = $(CFLAGS_OS_V) - $(PGM): $(vectors_rel_OBJECTS) $(make-rel) diff --git a/c/src/lib/libcpu/powerpc/shared/Makefile.am b/c/src/lib/libcpu/powerpc/shared/Makefile.am index bc2d1d1ace..edbb18ae0c 100644 --- a/c/src/lib/libcpu/powerpc/shared/Makefile.am +++ b/c/src/lib/libcpu/powerpc/shared/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/powerpc/wrapup/Makefile.am b/c/src/lib/libcpu/powerpc/wrapup/Makefile.am index 609b64bbfb..48af0f6dcb 100644 --- a/c/src/lib/libcpu/powerpc/wrapup/Makefile.am +++ b/c/src/lib/libcpu/powerpc/wrapup/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -9,8 +9,8 @@ GENERIC_FILES = shared # Use two variables so that I can make two ar command. # So far FAMILY_OBJS is empty and ar dislike it... CPU_SPECIFIC_OBJS = $(wildcard ../$(RTEMS_CPU_MODEL)/*/$(ARCH)/*.o) -FAMILY_OBJS = $(wildcard ../shared/$(ARCH)/*.o ../shared/*/$(ARCH)/*.o \ - ../mpc6xx/*/$(ARCH)/*.o) +FAMILY_OBJS = \ + $(wildcard ../shared/$(ARCH)/*.o ../shared/*/$(ARCH)/*.o ../mpc6xx/*/$(ARCH)/*.o) LIB = $(ARCH)/libcpu.a diff --git a/c/src/lib/libcpu/sh/Makefile.am b/c/src/lib/libcpu/sh/Makefile.am index f904c56993..8de599ce50 100644 --- a/c/src/lib/libcpu/sh/Makefile.am +++ b/c/src/lib/libcpu/sh/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal diff --git a/c/src/lib/libcpu/sh/sh7032/Makefile.am b/c/src/lib/libcpu/sh/sh7032/Makefile.am index 4817b67a71..ad159e941c 100644 --- a/c/src/lib/libcpu/sh/sh7032/Makefile.am +++ b/c/src/lib/libcpu/sh/sh7032/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/sh/sh7032/clock/Makefile.am b/c/src/lib/libcpu/sh/sh7032/clock/Makefile.am index 0f3042d757..10ae91df8f 100644 --- a/c/src/lib/libcpu/sh/sh7032/clock/Makefile.am +++ b/c/src/lib/libcpu/sh/sh7032/clock/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -18,8 +18,6 @@ include $(top_srcdir)/../../../../../automake/lib.am # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS += $(CFLAGS_OS_V) - $(PGM): $(OBJS) $(make-rel) diff --git a/c/src/lib/libcpu/sh/sh7032/delay/Makefile.am b/c/src/lib/libcpu/sh/sh7032/delay/Makefile.am index 5637116300..44ff144b86 100644 --- a/c/src/lib/libcpu/sh/sh7032/delay/Makefile.am +++ b/c/src/lib/libcpu/sh/sh7032/delay/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/sh/sh7032/include/Makefile.am b/c/src/lib/libcpu/sh/sh7032/include/Makefile.am index 72e931ea32..7d26513f10 100644 --- a/c/src/lib/libcpu/sh/sh7032/include/Makefile.am +++ b/c/src/lib/libcpu/sh/sh7032/include/Makefile.am @@ -1,12 +1,12 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 H_FILES = null.h sci.h sh7_pfc.h sh7_sci.h -# NOTE: Unlike other CPUS, we install into a subdirectory to avoid +# NOTE: Unlike other CPUS, we install into a subdirectory to avoid # file name conflicts $(PROJECT_INCLUDE)/sh: diff --git a/c/src/lib/libcpu/sh/sh7032/null/Makefile.am b/c/src/lib/libcpu/sh/sh7032/null/Makefile.am index 67862acb20..2e6baea4a3 100644 --- a/c/src/lib/libcpu/sh/sh7032/null/Makefile.am +++ b/c/src/lib/libcpu/sh/sh7032/null/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/sh/sh7032/sci/Makefile.am b/c/src/lib/libcpu/sh/sh7032/sci/Makefile.am index d28034d8a8..aef7e13b3b 100644 --- a/c/src/lib/libcpu/sh/sh7032/sci/Makefile.am +++ b/c/src/lib/libcpu/sh/sh7032/sci/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/sh/sh7032/timer/Makefile.am b/c/src/lib/libcpu/sh/sh7032/timer/Makefile.am index b72f9ca03b..5a164c0d4c 100644 --- a/c/src/lib/libcpu/sh/sh7032/timer/Makefile.am +++ b/c/src/lib/libcpu/sh/sh7032/timer/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/sh/sh7045/Makefile.am b/c/src/lib/libcpu/sh/sh7045/Makefile.am index 77c3665b87..5452a07131 100644 --- a/c/src/lib/libcpu/sh/sh7045/Makefile.am +++ b/c/src/lib/libcpu/sh/sh7045/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/sh/sh7045/clock/Makefile.am b/c/src/lib/libcpu/sh/sh7045/clock/Makefile.am index 0f3042d757..10ae91df8f 100644 --- a/c/src/lib/libcpu/sh/sh7045/clock/Makefile.am +++ b/c/src/lib/libcpu/sh/sh7045/clock/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -18,8 +18,6 @@ include $(top_srcdir)/../../../../../automake/lib.am # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS += $(CFLAGS_OS_V) - $(PGM): $(OBJS) $(make-rel) diff --git a/c/src/lib/libcpu/sh/sh7045/include/Makefile.am b/c/src/lib/libcpu/sh/sh7045/include/Makefile.am index 7fb244b465..8a424d634f 100644 --- a/c/src/lib/libcpu/sh/sh7045/include/Makefile.am +++ b/c/src/lib/libcpu/sh/sh7045/include/Makefile.am @@ -1,12 +1,12 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 H_FILES = io_types.h null.h sci.h sh7_pfc.h sh7_sci.h -# NOTE: Unlike other CPUS, we install into a subdirectory to avoid +# NOTE: Unlike other CPUS, we install into a subdirectory to avoid # file name conflicts $(PROJECT_INCLUDE)/sh: diff --git a/c/src/lib/libcpu/sh/sh7045/null/Makefile.am b/c/src/lib/libcpu/sh/sh7045/null/Makefile.am index 67862acb20..2e6baea4a3 100644 --- a/c/src/lib/libcpu/sh/sh7045/null/Makefile.am +++ b/c/src/lib/libcpu/sh/sh7045/null/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/sh/sh7045/sci/Makefile.am b/c/src/lib/libcpu/sh/sh7045/sci/Makefile.am index d28034d8a8..aef7e13b3b 100644 --- a/c/src/lib/libcpu/sh/sh7045/sci/Makefile.am +++ b/c/src/lib/libcpu/sh/sh7045/sci/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/sh/sh7045/sci/sci.c b/c/src/lib/libcpu/sh/sh7045/sci/sci.c index 9acddbde9b..5cfef8a585 100644 --- a/c/src/lib/libcpu/sh/sh7045/sci/sci.c +++ b/c/src/lib/libcpu/sh/sh7045/sci/sci.c @@ -51,7 +51,7 @@ #include <rtems/score/iosh7045.h> #include <sh/sh7_sci.h> #include <sh/sh7_pfc.h> -/* #include <sh/io_types.h> */ + #include <sh/sci.h> #ifndef STANDALONE_EVB @@ -330,18 +330,18 @@ rtems_device_driver sh_sci_open( return RTEMS_SUCCESSFUL ; } - /* enable I/O pins */ + /* set PFC registers to enable I/O pins */ if ((minor == 0) && (STANDALONE_EVB == 1)) { - temp16 = read16(PFC_PACRL2) & /* disable SCK0, Tx0, Rx0 */ - ~(PA2MD1 | PA2MD0 | PA1MD0 | PA0MD0); - temp16 |= (PA_TXD0 | PA_RXD0); /* assign pins for Tx0, Rx0 */ + temp16 = read16(PFC_PACRL2); /* disable SCK0, DMA, IRQ */ + temp16 &= ~(PA2MD1 | PA2MD0); + temp16 |= (PA_TXD0 | PA_RXD0); /* enable pins for Tx0, Rx0 */ write16(temp16, PFC_PACRL2); } else if (minor == 1) { - temp16 = read16(PFC_PACRL2) & /* disable SCK1, Tx1, Rx1 */ - ~(PA5MD1 | PA5MD0 | PA4MD0 | PA3MD0); - temp16 |= (PA_TXD1 | PA_RXD1); /* assign pins for Tx1, Rx1 */ + temp16 = read16(PFC_PACRL2); /* disable SCK1, DMA, IRQ */ + temp16 &= ~(PA5MD1 | PA5MD0); + temp16 |= (PA_TXD1 | PA_RXD1); /* enable pins for Tx1, Rx1 */ write16(temp16, PFC_PACRL2); } /* add other devices and pins as req'd. */ @@ -349,16 +349,23 @@ rtems_device_driver sh_sci_open( /* set up SCI registers */ if ((minor != 0) || (STANDALONE_EVB == 1)) { write8(0x00, sci_device[minor].addr + SCI_SCR); /* Clear SCR */ - /* set SCR and BRR */ + /* set SMR and BRR */ _sci_set_cflags( &sci_device[minor], sci_device[minor].cflags ); - for(a=0; a < 10000L; a++) { /* One-bit delay */ + for(a=0; a < 10000L; a++) { /* Delay */ asm volatile ("nop"); } write8((SCI_RE | SCI_TE), /* enable async. Tx and Rx */ sci_device[minor].addr + SCI_SCR); temp8 = read8(sci_device[minor].addr + SCI_RDR); /* flush input */ + /* Clear RDRF flag */ + temp8= read8(sci_device[minor].addr + SCI_SSR) & ~SCI_RDRF; + write8(temp8, sci_device[minor].addr + SCI_SSR); + write8(0x00, sci_device[minor].addr + SCI_TDR); /* force output */ + /* Clear the TDRE bit */ + temp8 = read8(sci_device[minor].addr + SCI_SSR) & ~SCI_TDRE; + write8(temp8, sci_device[minor].addr + SCI_SSR); /* add interrupt setup if required */ diff --git a/c/src/lib/libcpu/sh/sh7045/timer/Makefile.am b/c/src/lib/libcpu/sh/sh7045/timer/Makefile.am index b72f9ca03b..5a164c0d4c 100644 --- a/c/src/lib/libcpu/sh/sh7045/timer/Makefile.am +++ b/c/src/lib/libcpu/sh/sh7045/timer/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 diff --git a/c/src/lib/libcpu/sparc/Makefile.am b/c/src/lib/libcpu/sparc/Makefile.am index 4c5ead3d5f..d89863901e 100644 --- a/c/src/lib/libcpu/sparc/Makefile.am +++ b/c/src/lib/libcpu/sparc/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal diff --git a/c/src/lib/libcpu/sparc/reg_win/Makefile.am b/c/src/lib/libcpu/sparc/reg_win/Makefile.am index 91a8f1feb1..00e28ec1da 100644 --- a/c/src/lib/libcpu/sparc/reg_win/Makefile.am +++ b/c/src/lib/libcpu/sparc/reg_win/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -16,8 +16,6 @@ include $(top_srcdir)/../../../../../automake/lib.am # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS = $(CFLAGS_OS_V) - $(PGM): $(reg_win_rel_OBJECTS) $(make-rel) diff --git a/c/src/lib/libcpu/sparc/syscall/Makefile.am b/c/src/lib/libcpu/sparc/syscall/Makefile.am index e0246b2829..7dc41907bf 100644 --- a/c/src/lib/libcpu/sparc/syscall/Makefile.am +++ b/c/src/lib/libcpu/sparc/syscall/Makefile.am @@ -1,6 +1,6 @@ -## +## ## $Id$ -## +## AUTOMAKE_OPTIONS = foreign 1.4 @@ -20,8 +20,6 @@ include $(top_srcdir)/../../../../../automake/lib.am # (OPTIONAL) Add local stuff here using += # -AM_CFLAGS = $(CFLAGS_OS_V) - $(PGM): $(syscall_rel_OBJECTS) $(make-rel) |