diff options
Diffstat (limited to 'c/src/lib/libbsp/m68k')
115 files changed, 114 insertions, 6044 deletions
diff --git a/c/src/lib/libbsp/m68k/Makefile.am b/c/src/lib/libbsp/m68k/Makefile.am index e03929f5e7..4beada2f35 100644 --- a/c/src/lib/libbsp/m68k/Makefile.am +++ b/c/src/lib/libbsp/m68k/Makefile.am @@ -3,9 +3,6 @@ ACLOCAL_AMFLAGS = -I ../../../aclocal ## Descend into the @RTEMS_BSP_FAMILY@ directory _SUBDIRS = @RTEMS_BSP_FAMILY@ -include_bspdir = $(includedir)/bsp -include_bsp_HEADERS = shared/include/linker-symbols.h - dist_project_lib_DATA = shared/startup/linkcmds.base EXTRA_DIST = @@ -14,10 +11,8 @@ EXTRA_DIST += shared/start.S EXTRA_DIST += shared/bspspuriousinit.c shared/m68000spurious.c -include_HEADERS = shared/mvme/mvme16x_hw.h - EXTRA_DIST += shared/gdbstub/m68k-stub.c shared/gdbstub/gdb_if.h -include $(srcdir)/preinstall.am include $(top_srcdir)/../../../automake/subdirs.am include $(top_srcdir)/../../../automake/local.am +include $(srcdir)/../../../../../bsps/m68k/headers.am diff --git a/c/src/lib/libbsp/m68k/av5282/Makefile.am b/c/src/lib/libbsp/m68k/av5282/Makefile.am index 6e9ed76bee..a3d051a365 100644 --- a/c/src/lib/libbsp/m68k/av5282/Makefile.am +++ b/c/src/lib/libbsp/m68k/av5282/Makefile.am @@ -4,15 +4,8 @@ EXTRA_DIST = include $(top_srcdir)/../../../../automake/compile.am include $(top_srcdir)/../../bsp.am -include_bspdir = $(includedir)/bsp +dist_project_lib_DATA = startup/bsp_specs -dist_project_lib_DATA = bsp_specs - -include_HEADERS = include/bsp.h -include_HEADERS += include/tm27.h - -nodist_include_HEADERS = include/bspopts.h -nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h DISTCLEANFILES = include/bspopts.h noinst_PROGRAMS = @@ -22,7 +15,7 @@ start.$(OBJEXT): start/start.S $(CPPASCOMPILE) -o $@ -c $< project_lib_DATA = start.$(OBJEXT) -dist_project_lib_DATA += startup/linkcmds +project_lib_DATA += linkcmds noinst_LIBRARIES = libbsp.a libbsp_a_SOURCES = @@ -59,5 +52,5 @@ if HAS_NETWORKING libbsp_a_LIBADD += network.rel endif -include $(srcdir)/preinstall.am include $(top_srcdir)/../../../../automake/local.am +include $(srcdir)/../../../../../../bsps/m68k/av5282/headers.am diff --git a/c/src/lib/libbsp/m68k/av5282/configure.ac b/c/src/lib/libbsp/m68k/av5282/configure.ac index 7282407061..4d5e885e95 100644 --- a/c/src/lib/libbsp/m68k/av5282/configure.ac +++ b/c/src/lib/libbsp/m68k/av5282/configure.ac @@ -4,6 +4,9 @@ AC_PREREQ([2.69]) AC_INIT([rtems-c-src-lib-libbsp-m68k-av5282],[_RTEMS_VERSION],[https://devel.rtems.org/newticket]) AC_CONFIG_SRCDIR([make/custom/av5282.cfg]) RTEMS_TOP(../../../../../..) +RTEMS_SOURCE_TOP +RTEMS_BUILD_TOP +RTEMS_BSP_LINKCMDS RTEMS_CANONICAL_TARGET_CPU AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2]) diff --git a/c/src/lib/libbsp/m68k/av5282/include/bsp.h b/c/src/lib/libbsp/m68k/av5282/include/bsp.h deleted file mode 100644 index a8b32e745e..0000000000 --- a/c/src/lib/libbsp/m68k/av5282/include/bsp.h +++ /dev/null @@ -1,97 +0,0 @@ -/** - * @file - * - * @ingroup m68k_av5282 - * - * @brief Global BSP definitions. - */ - -/* - * av5282 BSP header file - */ - -/** - * @defgroup m68k_av5282 AV5282 Support - * - * @ingroup bsp_m68k - * - * @brief AV5282 support. - */ - -#ifndef LIBBSP_M68K_AV5282_BSP_H -#define LIBBSP_M68K_AV5282_BSP_H - -#ifndef ASM - -#include <bspopts.h> -#include <bsp/default-initial-extension.h> - -#include <rtems.h> -#include <rtems/bspIo.h> - -/***************************************************************************/ -/** Hardware data structure headers **/ -#include <mcf5282/mcf5282.h> /* internal MCF5282 modules */ - -#ifdef __cplusplus -extern "C" { -#endif - -/***************************************************************************/ -/** Network driver configuration **/ -struct rtems_bsdnet_ifconfig; -extern int rtems_fec_driver_attach (struct rtems_bsdnet_ifconfig *config, int attaching ); -#define RTEMS_BSP_NETWORK_DRIVER_NAME "fs1" -#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_fec_driver_attach - -/***************************************************************************/ -/** User Definable configuration **/ - -/* define which port the console should use - all other ports are then defined as general purpose */ -#define CONSOLE_PORT 0 - -/* externals */ - -/* constants */ - -/* miscellaneous stuff assumed to exist */ - -/* functions */ - -uint32_t get_CPU_clock_speed(void); - -rtems_isr_entry set_vector( - rtems_isr_entry handler, - rtems_vector_number vector, - int type -); - -/* - * Interrupt assignments - * Highest-priority listed first - */ -#define FEC_IRQ_LEVEL 4 -#define FEC_IRQ_RX_PRIORITY 7 -#define FEC_IRQ_TX_PRIORITY 6 - -#define PIT3_IRQ_LEVEL 4 -#define PIT3_IRQ_PRIORITY 0 - -#define UART0_IRQ_LEVEL 3 -#define UART0_IRQ_PRIORITY 7 -#define UART1_IRQ_LEVEL 3 -#define UART1_IRQ_PRIORITY 6 -#define UART2_IRQ_LEVEL 3 -#define UART2_IRQ_PRIORITY 5 - -/* - * Prototypes for methods called from .S to alow dependency tracking - */ -void Init5282(void); - -#ifdef __cplusplus -} -#endif - -#endif /* !ASM */ -#endif diff --git a/c/src/lib/libbsp/m68k/av5282/include/tm27.h b/c/src/lib/libbsp/m68k/av5282/include/tm27.h deleted file mode 100644 index 1e1dc77e59..0000000000 --- a/c/src/lib/libbsp/m68k/av5282/include/tm27.h +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @file - * - * @ingroup m68k_av5282 - * - * @brief Time Test 27 routines. - */ - -/* - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef _RTEMS_TMTEST27 -#error "This is an RTEMS internal file you must not include directly." -#endif - -#ifndef __tm27_h -#define __tm27_h - -/* - * Stuff for Time Test 27 - * Don't bother with hardware -- just use a software-interrupt - */ - -#define MUST_WAIT_FOR_INTERRUPT 0 - -#define Install_tm27_vector( handler ) set_vector( (handler), 35, 1 ) - -#define Cause_tm27_intr() asm volatile ("trap #3"); - -#define Clear_tm27_intr() /* empty */ - -#define Lower_tm27_intr() /* empty */ - -#endif diff --git a/c/src/lib/libbsp/m68k/av5282/preinstall.am b/c/src/lib/libbsp/m68k/av5282/preinstall.am deleted file mode 100644 index 0bdb6554d6..0000000000 --- a/c/src/lib/libbsp/m68k/av5282/preinstall.am +++ /dev/null @@ -1,63 +0,0 @@ -## Automatically generated by ampolish3 - Do not edit - -if AMPOLISH3 -$(srcdir)/preinstall.am: Makefile.am - $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am -endif - -PREINSTALL_DIRS = -DISTCLEANFILES += $(PREINSTALL_DIRS) - -all-am: $(PREINSTALL_FILES) - -PREINSTALL_FILES = -CLEANFILES = $(PREINSTALL_FILES) - -all-local: $(TMPINSTALL_FILES) - -TMPINSTALL_FILES = -CLEANFILES += $(TMPINSTALL_FILES) - -$(PROJECT_LIB)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_LIB) - @: > $(PROJECT_LIB)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp) - -$(PROJECT_INCLUDE)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE) - @: > $(PROJECT_INCLUDE)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp) - -$(PROJECT_INCLUDE)/bsp/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp - @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp) - -$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs -PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs - -$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h - -$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h - -$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h - -$(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h - -$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT) -TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT) - -$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds - diff --git a/c/src/lib/libbsp/m68k/av5282/bsp_specs b/c/src/lib/libbsp/m68k/av5282/startup/bsp_specs index 87638cc027..87638cc027 100644 --- a/c/src/lib/libbsp/m68k/av5282/bsp_specs +++ b/c/src/lib/libbsp/m68k/av5282/startup/bsp_specs diff --git a/c/src/lib/libbsp/m68k/configure.ac b/c/src/lib/libbsp/m68k/configure.ac index 4f26893934..8c5e064f3c 100644 --- a/c/src/lib/libbsp/m68k/configure.ac +++ b/c/src/lib/libbsp/m68k/configure.ac @@ -4,6 +4,8 @@ AC_PREREQ([2.69]) AC_INIT([rtems-c-src-lib-libbsp-m68k],[_RTEMS_VERSION],[https://devel.rtems.org/newticket]) AC_CONFIG_SRCDIR([shared]) RTEMS_TOP(../../../../..) +RTEMS_SOURCE_TOP +RTEMS_BUILD_TOP RTEMS_CANONICAL_TARGET_CPU AM_INIT_AUTOMAKE([no-define foreign 1.12.2]) diff --git a/c/src/lib/libbsp/m68k/csb360/Makefile.am b/c/src/lib/libbsp/m68k/csb360/Makefile.am index 70278e70ff..ce4afb155b 100644 --- a/c/src/lib/libbsp/m68k/csb360/Makefile.am +++ b/c/src/lib/libbsp/m68k/csb360/Makefile.am @@ -4,16 +4,8 @@ EXTRA_DIST = include $(top_srcdir)/../../../../automake/compile.am include $(top_srcdir)/../../bsp.am -include_bspdir = $(includedir)/bsp +dist_project_lib_DATA = startup/bsp_specs -dist_project_lib_DATA = bsp_specs - -include_HEADERS = include/bsp.h -include_HEADERS += include/tm27.h - -nodist_include_HEADERS = include/bspopts.h -nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h -nodist_include_bsp_HEADERS += ../../shared/include/console-polled.h DISTCLEANFILES = include/bspopts.h @@ -24,7 +16,7 @@ start.$(OBJEXT): start/start.S $(CPPASCOMPILE) -o $@ -c $< project_lib_DATA = start.$(OBJEXT) -dist_project_lib_DATA += startup/linkcmds +project_lib_DATA += linkcmds noinst_LIBRARIES = libbsp.a libbsp_a_SOURCES = @@ -51,5 +43,5 @@ libbsp_a_LIBADD = \ ../../../libcpu/@RTEMS_CPU@/mcf5272/clock.rel \ ../../../libcpu/@RTEMS_CPU@/mcf5272/timer.rel -include $(srcdir)/preinstall.am include $(top_srcdir)/../../../../automake/local.am +include $(srcdir)/../../../../../../bsps/m68k/csb360/headers.am diff --git a/c/src/lib/libbsp/m68k/csb360/configure.ac b/c/src/lib/libbsp/m68k/csb360/configure.ac index f2611c546b..74cdcdeb49 100644 --- a/c/src/lib/libbsp/m68k/csb360/configure.ac +++ b/c/src/lib/libbsp/m68k/csb360/configure.ac @@ -4,6 +4,9 @@ AC_PREREQ([2.69]) AC_INIT([rtems-c-src-lib-libbsp-m68k-csb360],[_RTEMS_VERSION],[https://devel.rtems.org/newticket]) AC_CONFIG_SRCDIR([make/custom/csb360.cfg]) RTEMS_TOP(../../../../../..) +RTEMS_SOURCE_TOP +RTEMS_BUILD_TOP +RTEMS_BSP_LINKCMDS RTEMS_CANONICAL_TARGET_CPU AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2]) diff --git a/c/src/lib/libbsp/m68k/csb360/include/bsp.h b/c/src/lib/libbsp/m68k/csb360/include/bsp.h deleted file mode 100644 index 5272e17ae2..0000000000 --- a/c/src/lib/libbsp/m68k/csb360/include/bsp.h +++ /dev/null @@ -1,189 +0,0 @@ -/** - * @file - * - * @ingroup m68k_csb360 - * - * @brief Global BSP definitions. - */ - -/* - * Board Support Package for CSB360 evaluation board - * BSP definitions - * - * Copyright 2004 Cogent Computer Systems - * Author: Jay Monkman <jtm@lopingdog.com> - * - * Derived from mcf5206elite BSP: - * Copyright (C) 2000 OKTET Ltd., St.-Petersburg, Russia - * Author: Victor V. Vengerov <vvv@oktet.ru> - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef LIBBSP_M68K_CSB360_BSP_H -#define LIBBSP_M68K_CSB360_BSP_H - -#include <mcf5272/mcf5272.h> - -/** - * @defgroup m68k_csb360 CSB360 Support - * - * @ingroup bsp_m68k - * - * @brief CSB360 support. - */ - - -/*** Board resources allocation ***/ -#define BSP_MEM_ADDR_SRAM 0x20000000 -#define BSP_MEM_SIZE_SRAM 4096 - -/* Location and size of sdram. Note this includes space used by - * umon. - */ -#define BSP_MEM_ADDR_SDRAM 0x00000000 -#define BSP_MEM_MASK_SDRAM 0x01ffffff -#define BSP_MEM_SIZE_SDRAM (32 * 1024 * 1024) - -/* Address to put SIM Modules */ -#define BSP_MBAR 0x10000000 - -/* Address to put SRAM */ -#define BSP_RAMBAR BSP_MEM_ADDR_SRAM - -/* Interrupt Vectors */ -#define BSP_INTVEC_INT1 65 -#define BSP_INTVEC_INT2 66 -#define BSP_INTVEC_INT3 67 -#define BSP_INTVEC_INT4 68 -#define BSP_INTVEC_TMR0 69 -#define BSP_INTVEC_TMR1 70 -#define BSP_INTVEC_TMR2 71 -#define BSP_INTVEC_TMR3 72 -#define BSP_INTVEC_UART1 73 -#define BSP_INTVEC_UART2 74 -#define BSP_INTVEC_PLIP 75 -#define BSP_INTVEC_PLIA 76 -#define BSP_INTVEC_USB0 77 -#define BSP_INTVEC_USB1 78 -#define BSP_INTVEC_USB2 79 -#define BSP_INTVEC_USB3 80 -#define BSP_INTVEC_USB4 81 -#define BSP_INTVEC_USB5 82 -#define BSP_INTVEC_USB6 83 -#define BSP_INTVEC_USB7 84 -#define BSP_INTVEC_DMA 85 -#define BSP_INTVEC_ERX 86 -#define BSP_INTVEC_ETX 87 -#define BSP_INTVEC_ENTC 88 -#define BSP_INTVEC_QSPI 89 -#define BSP_INTVEC_INT5 90 -#define BSP_INTVEC_INT6 91 -#define BSP_INTVEC_SWTO 92 - -#define BSP_INTLVL_INT1 1 -#define BSP_INTLVL_INT2 1 -#define BSP_INTLVL_INT3 1 -#define BSP_INTLVL_INT4 1 -#define BSP_INTLVL_TMR0 1 -#define BSP_INTLVL_TMR1 1 -#define BSP_INTLVL_TMR2 1 -#define BSP_INTLVL_TMR3 1 -#define BSP_INTLVL_UART1 1 -#define BSP_INTLVL_UART2 1 -#define BSP_INTLVL_PLIP 1 -#define BSP_INTLVL_PLIA 1 -#define BSP_INTLVL_USB0 1 -#define BSP_INTLVL_USB1 1 -#define BSP_INTLVL_USB2 1 -#define BSP_INTLVL_USB3 1 -#define BSP_INTLVL_USB4 1 -#define BSP_INTLVL_USB5 1 -#define BSP_INTLVL_USB6 1 -#define BSP_INTLVL_USB7 1 -#define BSP_INTLVL_DMA 1 -#define BSP_INTLVL_ERX 1 -#define BSP_INTLVL_ETX 1 -#define BSP_INTLVL_ENTC 1 -#define BSP_INTLVL_QSPI 1 -#define BSP_INTLVL_INT5 1 -#define BSP_INTLVL_INT6 1 -#define BSP_INTLVL_SWTO 1 - - - -#ifndef ASM - -#include <bspopts.h> -#include <rtems.h> -#include <bsp/default-initial-extension.h> - -#ifdef __cplusplus -extern "C" { -#endif - -struct rtems_bsdnet_ifconfig; -extern int rtems_enet_driver_attach (struct rtems_bsdnet_ifconfig *config); -#define RTEMS_BSP_NETWORK_DRIVER_NAME "eth0" -#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_enet_driver_attach - -/* System frequency */ -#define BSP_SYSTEM_FREQUENCY (66 * 1000 * 1000) - -/* - * Simple spin delay in microsecond units for device drivers. - * This is very dependent on the clock speed of the target. - */ - -#define rtems_bsp_delay( microseconds ) \ - { register uint32_t _delay=(microseconds); \ - register uint32_t _tmp=123; \ - __asm__ volatile( "0: \ - nbcd %0 ; \ - nbcd %0 ; \ - dbf %1,0b" \ - : "=d" (_tmp), "=d" (_delay) \ - : "0" (_tmp), "1" (_delay) ); \ - } - -/* - * Real-Time Clock Driver Table Entry - * NOTE: put this entry to the device driver table AFTER I2C bus driver! - */ -#define RTC_DRIVER_TABLE_ENTRY \ - { rtc_initialize, NULL, NULL, NULL, NULL, NULL } -extern rtems_device_driver rtc_initialize( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *arg -); - -/* miscellaneous stuff assumed to exist */ - -extern rtems_isr_entry M68Kvec[]; /* vector table address */ - -extern rtems_isr (*rtems_clock_hook)(rtems_vector_number); - -/* functions */ - -rtems_isr_entry set_vector( - rtems_isr_entry handler, - rtems_vector_number vector, - int type -); - -/* - * Prototypes for BSP methods which cross file boundaries - */ -void init5272(void); - -#ifdef __cplusplus -} -#endif - -#endif /* ASM */ - -#endif diff --git a/c/src/lib/libbsp/m68k/csb360/include/tm27.h b/c/src/lib/libbsp/m68k/csb360/include/tm27.h deleted file mode 100644 index 5f2fd8a383..0000000000 --- a/c/src/lib/libbsp/m68k/csb360/include/tm27.h +++ /dev/null @@ -1,39 +0,0 @@ -/** - * @file - * - * @ingroup m68k_csb360 - * - * @brief Time Test 27 routines. - */ - -/* - * tm27.h - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef _RTEMS_TMTEST27 -#error "This is an RTEMS internal file you must not include directly." -#endif - -#ifndef __tm27_h -#define __tm27_h - -/* - * Stuff for Time Test 27 - * Don't bother with hardware -- just use a software-interrupt - */ - -#define MUST_WAIT_FOR_INTERRUPT 0 - -#define Install_tm27_vector( handler ) set_vector( (handler), 34, 1 ) - -#define Cause_tm27_intr() asm volatile ("trap #2"); - -#define Clear_tm27_intr() /* empty */ - -#define Lower_tm27_intr() /* empty */ - -#endif diff --git a/c/src/lib/libbsp/m68k/csb360/preinstall.am b/c/src/lib/libbsp/m68k/csb360/preinstall.am deleted file mode 100644 index 67ab64c592..0000000000 --- a/c/src/lib/libbsp/m68k/csb360/preinstall.am +++ /dev/null @@ -1,67 +0,0 @@ -## Automatically generated by ampolish3 - Do not edit - -if AMPOLISH3 -$(srcdir)/preinstall.am: Makefile.am - $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am -endif - -PREINSTALL_DIRS = -DISTCLEANFILES += $(PREINSTALL_DIRS) - -all-am: $(PREINSTALL_FILES) - -PREINSTALL_FILES = -CLEANFILES = $(PREINSTALL_FILES) - -all-local: $(TMPINSTALL_FILES) - -TMPINSTALL_FILES = -CLEANFILES += $(TMPINSTALL_FILES) - -$(PROJECT_LIB)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_LIB) - @: > $(PROJECT_LIB)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp) - -$(PROJECT_INCLUDE)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE) - @: > $(PROJECT_INCLUDE)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp) - -$(PROJECT_INCLUDE)/bsp/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp - @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp) - -$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs -PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs - -$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h - -$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h - -$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h - -$(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h - -$(PROJECT_INCLUDE)/bsp/console-polled.h: ../../shared/include/console-polled.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/console-polled.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/console-polled.h - -$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT) -TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT) - -$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds - diff --git a/c/src/lib/libbsp/m68k/csb360/bsp_specs b/c/src/lib/libbsp/m68k/csb360/startup/bsp_specs index 87638cc027..87638cc027 100644 --- a/c/src/lib/libbsp/m68k/csb360/bsp_specs +++ b/c/src/lib/libbsp/m68k/csb360/startup/bsp_specs diff --git a/c/src/lib/libbsp/m68k/gen68340/Makefile.am b/c/src/lib/libbsp/m68k/gen68340/Makefile.am index 58c75f7262..bbb1f63c17 100644 --- a/c/src/lib/libbsp/m68k/gen68340/Makefile.am +++ b/c/src/lib/libbsp/m68k/gen68340/Makefile.am @@ -4,30 +4,18 @@ EXTRA_DIST = include $(top_srcdir)/../../../../automake/compile.am include $(top_srcdir)/../../bsp.am -include_bspdir = $(includedir)/bsp +dist_project_lib_DATA = startup/bsp_specs -dist_project_lib_DATA = bsp_specs - -include_HEADERS = include/bsp.h -include_HEADERS += include/tm27.h - -nodist_include_HEADERS = include/bspopts.h -nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h DISTCLEANFILES = include/bspopts.h noinst_PROGRAMS = -include_HEADERS += include/m340uart.h -include_HEADERS += include/m340timer.h -include_HEADERS += include/m68340.h -include_HEADERS += include/m68340.inc -include_HEADERS += include/m68349.inc EXTRA_DIST += start/start.S start.$(OBJEXT): start/start.S $(CPPASCOMPILE) -o $@ -c $< project_lib_DATA = start.$(OBJEXT) -dist_project_lib_DATA += startup/linkcmds +project_lib_DATA += linkcmds noinst_LIBRARIES = libbsp.a libbsp_a_SOURCES = @@ -53,5 +41,5 @@ libbsp_a_LIBADD = \ ../../../libcpu/@RTEMS_CPU@/shared/cache.rel \ ../../../libcpu/@RTEMS_CPU@/shared/misc.rel -include $(srcdir)/preinstall.am include $(top_srcdir)/../../../../automake/local.am +include $(srcdir)/../../../../../../bsps/m68k/gen68340/headers.am diff --git a/c/src/lib/libbsp/m68k/gen68340/configure.ac b/c/src/lib/libbsp/m68k/gen68340/configure.ac index 6a13816349..a984f2dc35 100644 --- a/c/src/lib/libbsp/m68k/gen68340/configure.ac +++ b/c/src/lib/libbsp/m68k/gen68340/configure.ac @@ -4,6 +4,9 @@ AC_PREREQ([2.69]) AC_INIT([rtems-c-src-lib-libbsp-m68k-gen68340],[_RTEMS_VERSION],[https://devel.rtems.org/newticket]) AC_CONFIG_SRCDIR([make/custom/gen68340.cfg]) RTEMS_TOP(../../../../../..) +RTEMS_SOURCE_TOP +RTEMS_BUILD_TOP +RTEMS_BSP_LINKCMDS RTEMS_CANONICAL_TARGET_CPU AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2]) diff --git a/c/src/lib/libbsp/m68k/gen68340/include/bsp.h b/c/src/lib/libbsp/m68k/gen68340/include/bsp.h deleted file mode 100644 index 28d86ff2f7..0000000000 --- a/c/src/lib/libbsp/m68k/gen68340/include/bsp.h +++ /dev/null @@ -1,81 +0,0 @@ -/** - * @file - * - * @ingroup m68k_gen68340 - * - * @brief Global BSP definitions. - */ - -/* - * Board Support Package for `Generic' Motorola MC68340 - * - * Based on the `gen68360' board support package, and covered by the - * original distribution terms. - */ - -/* bsp.h - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef LIBBSP_M68K_GEN68340_BSP_H -#define LIBBSP_M68K_GEN68340_BSP_H - -#ifndef ASM - -#include <bspopts.h> -#include <bsp/default-initial-extension.h> - -#include <rtems.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup m68k_gen68340 Motorola MC68340 Support - * - * @ingroup bsp_m68k - * - * @brief Motorola MC68340 support. - */ - -/* Constants */ - -/* Structures */ - -extern rtems_isr_entry M68Kvec[]; /* vector table address */ - -/* functions */ - -rtems_isr_entry set_vector( - rtems_isr_entry handler, - rtems_vector_number vector, - int type -); - -/* - * Methods used across files inside the BSP - */ -int dbug_in_char( int minor ); -void dbug_out_char( int minor, int ch ); -int dbug_char_present( int minor ); -void _dbug_dumpanic(void); - -/* - * Only called from .S but prototyped here to capture the dependecy. - */ -void _Init68340 (void); - -#ifdef __cplusplus -} -#endif - -#endif /* !ASM */ - -#endif diff --git a/c/src/lib/libbsp/m68k/gen68340/include/m340timer.h b/c/src/lib/libbsp/m68k/gen68340/include/m340timer.h deleted file mode 100644 index 892c690e5f..0000000000 --- a/c/src/lib/libbsp/m68k/gen68340/include/m340timer.h +++ /dev/null @@ -1,85 +0,0 @@ -/** - * @file - * - * @ingroup m68k_gen68340 - * - * @brief Time driver definitions. - */ - -/* - * Header file for timer driver - * defines for accessing M68340 timer registers - * - * Author: - * Geoffroy Montel - * France Telecom - CNET/DSM/TAM/CAT - * 4, rue du Clos Courtel - * 35512 CESSON-SEVIGNE - * FRANCE - * - * e-mail: g_montel@yahoo.com - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef __m340timer_H__ -#define __m340timer_H__ - -extern void Fifo_Full_benchmark_timer_initialize (void); - -extern void (*Restart_Fifo_Full_A_Timer)(); -extern void (*Restart_Check_A_Timer)(); -extern void (*Restart_Fifo_Full_B_Timer)(); -extern void (*Restart_Check_B_Timer)(); - -/* CR */ -#define m340_SWR (1<<15) -#define m340_Polling_Mode (0<<12) -#define m340_TC_Enabled (1<<12) -#define m340_TG_Enabled (2<<12) -#define m340_TG_TC_Enabled (3<<12) -#define m340_TO_Enabled (4<<12) -#define m340_TO_TC_Enabled (5<<12) -#define m340_TG_TG_Enabled (6<<12) -#define m340_TO_TG_TG_Enabled (7<<12) -#define m340_TGE (1<<11) -#define m340_PSE (1<<10) -#define m340_CPE (1<<9) -#define m340_CLK (1<<8) -#define m340_Divide_by_2 (1<<5) -#define m340_Divide_by_4 (2<<5) -#define m340_Divide_by_8 (3<<5) -#define m340_Divide_by_16 (4<<5) -#define m340_Divide_by_32 (5<<5) -#define m340_Divide_by_64 (6<<5) -#define m340_Divide_by_128 (7<<5) -#define m340_Divide_by_256 (0<<5) -#define m340_ICOC (0<<2) -#define m340_SWG (1<<2) -#define m340_VDCSWG (2<<2) -#define m340_VWSSPG (3<<2) -#define m340_PWM (4<<2) -#define m340_PM (5<<2) -#define m340_EC (6<<2) -#define m340_TB (7<<2) -#define m340_Disabled 0 -#define m340_Toggle_Mode 1 -#define m340_Zero_Mode 2 -#define m340_One_Mode 3 - -/* SR */ -#define m340_IRQ (1<<15) -#define m340_TO (1<<14) -#define m340_TG (1<<13) -#define m340_TC (1<<12) -#define m340_TGL (1<<11) -#define m340_ON (1<<10) -#define m340_OUT (1<<9) -#define m340_COM (1<<8) - -#endif diff --git a/c/src/lib/libbsp/m68k/gen68340/include/m340uart.h b/c/src/lib/libbsp/m68k/gen68340/include/m340uart.h deleted file mode 100644 index 619a732a14..0000000000 --- a/c/src/lib/libbsp/m68k/gen68340/include/m340uart.h +++ /dev/null @@ -1,162 +0,0 @@ -/** - * @file - * - * @ingroup m68k_gen68340 - * - * @brief UART console driver definitions. - */ - -/* - * Header file for console driver - * defines for accessing M68340/68349 UART registers - * - * Author: - * Geoffroy Montel - * France Telecom - CNET/DSM/TAM/CAT - * 4, rue du Clos Courtel - * 35512 CESSON-SEVIGNE - * FRANCE - * - * e-mail: g_montel@yahoo.com - * - * - * COPYRIGHT (c) 1989-2008. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef __m340uart_H__ -#define __m340uart_H__ - -/* UART initialisation */ -#define UART_CHANNEL_A 0 -#define UART_CHANNEL_B 1 -#define UART_NUMBER_OF_CHANNELS 2 -#define UART_CONSOLE_NAME "/dev/console" -#define UART_RAW_IO_NAME "/dev/tty1" -#define UART_FIFO_FULL 0 -#define UART_CRR 1 -#define UART_INTERRUPTS 0 -#define UART_POLLING 1 -#define UART_TERMIOS_CONSOLE 0 -#define UART_TERMIOS_RAW 1 -#define UART_TERMIOS_MIN_DEFAULT 1 -#define UART_TERMIOS_TIME_DEFAULT 0 - -void Init_UART_Table(void); - -typedef struct { - uint8_t enable; - uint16_t rx_buffer_size; /* NOT IMPLEMENTED */ - uint16_t tx_buffer_size; /* NOT IMPLEMENTED */ - } uart_termios_config; - -typedef struct { /* for one channel */ - uint8_t enable; /* use this channel */ - char name[64]; /* use UART_CONSOLE_NAME for console purpose */ - uint8_t parity_mode; /* parity mode, see MR1 section for defines */ - uint8_t bits_per_char; /* bits per character, see MR1 section for defines */ - float rx_baudrate; /* Rx baudrate */ - float tx_baudrate; /* Tx baudrate */ - uint8_t rx_mode; /* FIFO Full (UART_FIFO_FULL) or ChannelReceiverReady (UART_CRR) */ - uint8_t mode; /* use interrupts (UART_INTERRUPTS) or polling (UART_POLLING) */ - uart_termios_config termios; - } uart_channel_config; - -extern uart_channel_config m340_uart_config[UART_NUMBER_OF_CHANNELS]; - -typedef struct { - int set; /* number of the m340 baud speed set */ - int rcs; /* RCS for the needed baud set */ - int tcs; /* TCS for the needed baud set */ - } t_baud_speed; - -typedef struct { - t_baud_speed baud_speed_table[2]; - short nb; - } t_baud_speed_table; - -extern t_baud_speed_table -Find_Right_m340_UART_Config(float ChannelA_ReceiverBaudRate, float ChannelA_TransmitterBaudRate, uint8_t enableA, - float ChannelB_ReceiverBaudRate, float ChannelB_TransmitterBaudRate, uint8_t enableB); - -extern rtems_isr InterruptHandler (rtems_vector_number v); - -extern int dbugRead (int minor); -extern ssize_t dbugWrite (int minor, const char *buf, size_t len); - -extern float m340_Baud_Rates_Table[16][2]; - -/* SR */ -#define m340_Rx_RDY 1 -#define m340_FFULL (1<<1) -#define m340_Tx_RDY (1<<2) -#define m340_TxEMP (1<<3) -#define m340_OE (1<<4) -#define m340_PE (1<<5) -#define m340_FE (1<<6) -#define m340_RB (1<<7) - -/* IER */ -#define m340_TxRDYA 1 -#define m340_RxRDYA (1<<1) -#define m340_TxRxRDYA 0x3 -#define m340_TxRDYB (1<<4) -#define m340_RxRDYB (1<<5) -#define m340_TxRxRDYB 0x30 - -/* CR */ -#define m340_Reset_Error_Status 0x40 -#define m340_Reset_Receiver 0x20 -#define m340_Reset_Transmitter 0x30 -#define m340_Transmitter_Enable (1<<2) -#define m340_Receiver_Enable 1 -#define m340_Transmitter_Disable (2<<2) -#define m340_Receiver_Disable 2 - -/* ACR */ -#define m340_BRG_Set1 0 -#define m340_BRG_Set2 (1<<7) - -/* OPCR */ -#define m340_OPCR_Gal 0x0 -#define m340_OPCR_Aux 0xFF - -/* ISR */ -#define m340_COS (1<<7) -#define m340_DBB (1<<6) -#define m340_XTAL_RDY (1<<3) -#define m340_DBA (1<<2) - -/* MR1 */ -#define m340_RxRTS (1<<7) -#define m340_R_F (1<<6) /* character or block mode */ -#define m340_ERR (1<<5) -#define m340_RxRTX (1<<7) -#define m340_Even_Parity 0 -#define m340_Odd_Parity (1<<2) -#define m340_Low_Parity (2<<2) -#define m340_High_Parity (3<<2) -#define m340_No_Parity (4<<2) -#define m340_Data_Character (6<<2) -#define m340_Address_Character (7<<2) -#define m340_5bpc 0x0 -#define m340_6bpc 0x1 -#define m340_7bpc 0x2 -#define m340_8bpc 0x3 - -/* MR2 */ -#define m340_normal (0<<6) -#define m340_automatic_echo (1<<6) -#define m340_local_loopback (2<<6) -#define m340_remote_loopback (3<<6) -#define m340_TxRTS (1<<5) -#define m340_TxCTS (1<<4) - -/* Baud rates for Transmitter/Receiver */ -#define SCLK 1 /* put your own SCLK value here */ - -#endif diff --git a/c/src/lib/libbsp/m68k/gen68340/include/m68340.h b/c/src/lib/libbsp/m68k/gen68340/include/m68340.h deleted file mode 100644 index 37440f3098..0000000000 --- a/c/src/lib/libbsp/m68k/gen68340/include/m68340.h +++ /dev/null @@ -1,145 +0,0 @@ -/** - * @file - * - * @ingroup m68k_gen68340 - * - * @brief MC68430 definitions. - */ - -/********************************************************************** - * MC68340 C Header File * - * * - * Developed by : Motorola * - * High Performance Embedded Systems Division * - * Austin, TX * - * Rectified by : Geoffroy Montel - * g_montel@yahoo.com * - * * - **********************************************************************/ - -typedef volatile unsigned char * portb; /* 8-bit port */ -typedef volatile unsigned short * portw; /* 16-bit port */ -typedef volatile unsigned int * portl; /* 32-bit port */ - -#define MBASE 0xEFFFF000 /* Module Base Address */ - /* not EFFFF000 due to a 68349 - hardware incompatibility */ - -#define MBAR (*(portb) 0x0003FF00) /* Module Base Addr Reg */ -#define MBAR1 (*(portb) 0x0003FF00) /* Module Base Addr Reg 1 (MSW) */ -#define MBAR2 (*(portb) 0x0003FF02) /* Module Base Addr Reg 2 (LSW) */ - -/* System Integration Module */ - -#define SIMMCR (*(portw) (MBASE+0x0000)) /* SIM Module Config Reg */ -#define SIMSYNCR (*(portw) (MBASE+0x0004)) /* SIM Clock Synth Cont Reg */ -#define SIMAVR (*(portb) (MBASE+0x0006)) /* SIM Autovector Reg */ -#define SIMRSR (*(portb) (MBASE+0x0007)) /* SIM Reset Status Reg */ -#define SIMPORTA (*(portb) (MBASE+0x0011)) /* SIM Port A Data Reg */ -#define SIMDDRA (*(portb) (MBASE+0x0013)) /* SIM Port A Data Dir Reg */ -#define SIMPPRA1 (*(portb) (MBASE+0x0015)) /* SIM Port A Pin Asm 1 Reg */ -#define SIMPPRA2 (*(portb) (MBASE+0x0017)) /* SIM Port A Pin Asm 2 Reg */ -#define SIMPORTB (*(portb) (MBASE+0x0019)) /* SIM Port B Data Reg */ -#define SIMPORTB1 (*(portb) (MBASE+0x001B)) /* SIM Port B Data Reg */ -#define SIMDDRB (*(portb) (MBASE+0x001D)) /* SIM Port B Data Dir Reg */ -#define SIMPPARB (*(portb) (MBASE+0x001F)) /* SIM Port B Pin Asm Reg */ -#define SIMSWIV (*(portb) (MBASE+0x0020)) /* SIM SW Interrupt Vector */ -#define SIMSYPCR (*(portb) (MBASE+0x0021)) /* SIM System Prot Cont Reg */ -#define SIMPICR (*(portw) (MBASE+0x0022)) /* SIM Period Intr Cont Reg */ -#define SIMPITR (*(portw) (MBASE+0x0024)) /* SIM Period Intr Tmg Reg */ -#define SIMSWSR (*(portb) (MBASE+0x0027)) /* SIM Software Service Reg */ - -#define SIMCS0AM (*(portl) (MBASE+0x0040)) /* SIM Chp Sel 0 Addr Msk */ -#define SIMCS0AM1 (*(portw) (MBASE+0x0040)) /* SIM Chp Sel 0 Addr Msk 1 */ -#define SIMCS0AM2 (*(portw) (MBASE+0x0042)) /* SIM Chp Sel 0 Addr Msk 2 */ -#define SIMCS0BA (*(portl) (MBASE+0x0044)) /* SIM Chp Sel 0 Base Addr */ -#define SIMCS0BA1 (*(portw) (MBASE+0x0044)) /* SIM Chp Sel 0 Bas Addr 1 */ -#define SIMCS0BA2 (*(portw) (MBASE+0x0046)) /* SIM Chp Sel 0 Bas Addr 2 */ -#define SIMCS1AM (*(portl) (MBASE+0x0048)) /* SIM Chp Sel 1 Adress Msk */ -#define SIMCS1AM1 (*(portw) (MBASE+0x0048)) /* SIM Chp Sel 1 Addr Msk 1 */ -#define SIMCS1AM2 (*(portw) (MBASE+0x004A)) /* SIM Chp Sel 1 Addr Msk 2 */ -#define SIMCS1BA (*(portl) (MBASE+0x004C)) /* SIM Chp Sel 1 Base Addr */ -#define SIMCS1BA1 (*(portw) (MBASE+0x004C)) /* SIM Chp Sel 1 Bas Addr 1 */ -#define SIMCS1BA2 (*(portw) (MBASE+0x004E)) /* SIM Chp Sel 1 Bas Addr 2 */ -#define SIMCS2AM (*(portl) (MBASE+0x0050)) /* SIM Chp Sel 2 Addr Msk */ -#define SIMCS2AM1 (*(portw) (MBASE+0x0050)) /* SIM Chp Sel 2 Addr Msk 1 */ -#define SIMCS2AM2 (*(portw) (MBASE+0x0052)) /* SIM Chp Sel 2 Addr Msk 2 */ -#define SIMCS2BA (*(portl) (MBASE+0x0054)) /* SIM Chp Sel 2 Base Addr */ -#define SIMCS2BA1 (*(portw) (MBASE+0x0054)) /* SIM Chp Sel 2 Bas Addr 1 */ -#define SIMCS2BA2 (*(portw) (MBASE+0x0056)) /* SIM Chp Sel 2 Bas Addr 2 */ -#define SIMCS3AM (*(portl) (MBASE+0x0058)) /* SIM Chp Sel 3 Addr Msk */ -#define SIMCS3AM1 (*(portw) (MBASE+0x0058)) /* SIM Chp Sel 3 Addr Msk 1 */ -#define SIMCS3AM2 (*(portw) (MBASE+0x005A)) /* SIM Chp Sel 3 Addr Msk 2 */ -#define SIMCS3BA (*(portl) (MBASE+0x005C)) /* SIM Chp Sel 3 Base Addr */ -#define SIMCS3BA1 (*(portw) (MBASE+0x005C)) /* SIM Chp Sel 3 Bas Addr 1 */ -#define SIMCS3BA2 (*(portw) (MBASE+0x005E)) /* SIM Chp Sel 3 Bas Addr 2 */ - -/* Dynamic Memory Access (DMA) Module */ - -#define DMAMCR1 (*(portw) (MBASE+0x0780)) /* DMA Module Config Reg 1 */ -#define DMAINTR1 (*(portw) (MBASE+0x0784)) /* DMA Interrupt Reg 1 */ -#define DMACCR1 (*(portw) (MBASE+0x0788)) /* DMA Channel Cont Reg 1 */ -#define DMACSR1 (*(portb) (MBASE+0x078A)) /* DMA Channel Status Reg 1 */ -#define DMAFCR1 (*(portb) (MBASE+0x078B)) /* DMA Function Code Reg 1 */ -#define DMASAR1 (*(portl) (MBASE+0x078C)) /* DMA DMA Src Addr Reg 1 */ -#define DMADAR1 (*(portl) (MBASE+0x0790)) /* DMA Dest Addr Reg 1 */ -#define DMABTC1 (*(portb) (MBASE+0x079l)) /* DMA Byte Trans Cnt Reg 1 */ - -#define DMAMCR2 (*(portw) (MBASE+0x07A0)) /* DMA Module Config Reg 2 */ -#define DMAINTR2 (*(portw) (MBASE+0x07A4)) /* DMA Interrupt Reg 2 */ -#define DMACCR2 (*(portw) (MBASE+0x07A8)) /* DMA Channel Cont Reg 2 */ -#define DMACSR2 (*(portb) (MBASE+0x07AA)) /* DMA Channel Status Reg 2 */ -#define DMAFCR2 (*(portb) (MBASE+0x07AB)) /* DMA Function Code Reg 1 */ -#define DMASAR2 (*(portl) (MBASE+0x07AC)) /* DMA Source Addr Reg 2 */ -#define DMADAR2 (*(portl) (MBASE+0x07B0)) /* DMA Dest Addr Reg 2 */ -#define DMABTC2 (*(portb) (MBASE+0x07B4)) /* DMA Byte Trans Cnt Reg 2 */ - -/* Dual Serial Module */ - -#define DUMCRH (*(portb) (MBASE+0x0700)) /* DUART Module Config Reg */ -#define DUMCRL (*(portb) (MBASE+0x0701)) /* DUART Module Config Reg */ -#define DUILR (*(portb) (MBASE+0x0704)) /* DUART Interrupt Level */ -#define DUIVR (*(portb) (MBASE+0x0705)) /* DUART Interrupt Vector */ -#define DUMR1A (*(portb) (MBASE+0x0710)) /* DUART Mode Reg 1A */ -#define DUSRA (*(portb) (MBASE+0x0711)) /* DUART Status Reg A */ -#define DUCSRA (*(portb) (MBASE+0x0711)) /* DUART Clock Sel Reg A */ -#define DUCRA (*(portb) (MBASE+0x0712)) /* DUART Command Reg A */ -#define DURBA (*(portb) (MBASE+0x0713)) /* DUART Receiver Buffer A */ -#define DUTBA (*(portb) (MBASE+0x0713)) /* DUART Transmitter Buff A */ -#define DUIPCR (*(portb) (MBASE+0x0714)) /* DUART Input Port Chg Reg */ -#define DUACR (*(portb) (MBASE+0x0714)) /* DUART Auxiliary Cont Reg */ -#define DUISR (*(portb) (MBASE+0x0715)) /* DUART Interrupt Stat Reg */ -#define DUIER (*(portb) (MBASE+0x0715)) /* DUART Interrupt Enb Reg */ - -#define DUMR1B (*(portb) (MBASE+0x0718)) /* DUART Mode Reg 1B */ -#define DUSRB (*(portb) (MBASE+0x0719)) /* DUART Status Reg B */ -#define DUCSRB (*(portb) (MBASE+0x0719)) /* DUART Clock Sel Reg B */ -#define DUCRB (*(portb) (MBASE+0x071A)) /* DUART Command Reg B */ -#define DURBB (*(portb) (MBASE+0x071B)) /* DUART Receiver Buffer B */ -#define DUTBB (*(portb) (MBASE+0x071B)) /* DUART Transmitter Buff B */ -#define DUIP (*(portb) (MBASE+0x071D)) /* DUART Input Port Reg */ -#define DUOPCR (*(portb) (MBASE+0x071D)) /* DUART Outp Port Cnt Reg */ -#define DUOPBS (*(portb) (MBASE+0x071E)) /* DUART Outp Port Bit Set */ -#define DUOPBR (*(portb) (MBASE+0x071F)) /* DUART Outp Port Bit Rst */ -#define DUMR2A (*(portb) (MBASE+0x0720)) /* DUART Mode Reg 2A */ -#define DUMR2B (*(portb) (MBASE+0x0721)) /* DUART Mode Reg 2B */ - -/* Dual Timer Module */ - -#define TMCR1 (*(portw) (MBASE+0x0600)) /* Timer Module Config Reg 1 */ -#define TIR1 (*(portw) (MBASE+0x0604)) /* Timer Interrupt Reg 1 */ -#define TCR1 (*(portw) (MBASE+0x0606)) /* Timer Control Reg 1 */ -#define TSR1 (*(portw) (MBASE+0x0608)) /* Timer Status Reg 1 */ -#define TCNTR1 (*(portw) (MBASE+0x060A)) /* Timer Counter Reg 1 */ -#define WPREL11 (*(portw) (MBASE+0x060C)) /* Timer Preload 1 Reg 1 */ -#define WPREL21 (*(portw) (MBASE+0x060E)) /* Timer Preload 2 Reg 1 */ -#define TCOM1 (*(portw) (MBASE+0x0610)) /* Timer Compare Reg 1 */ - -#define TMCR2 (*(portw) (MBASE+0x0640)) /* Timer Module Config Reg 2 */ -#define TIR2 (*(portw) (MBASE+0x0644)) /* Timer Interrupt Reg 2 */ -#define TCR2 (*(portw) (MBASE+0x0646)) /* Timer Control Reg 2 */ -#define TSR2 (*(portw) (MBASE+0x0648)) /* Timer Status Reg 2 */ -#define TCNTR2 (*(portw) (MBASE+0x064A)) /* Timer Counter Reg 2 */ -#define WPREL12 (*(portw) (MBASE+0x064C)) /* Timer Preload 1 Reg 2 */ -#define WPREL22 (*(portw) (MBASE+0x064E)) /* Timer Preload 2 Reg 2 */ -#define TCOM2 (*(portw) (MBASE+0x0650)) /* Timer Compare Reg 2 */ diff --git a/c/src/lib/libbsp/m68k/gen68340/include/m68340.inc b/c/src/lib/libbsp/m68k/gen68340/include/m68340.inc deleted file mode 100644 index 5c1ba36799..0000000000 --- a/c/src/lib/libbsp/m68k/gen68340/include/m68340.inc +++ /dev/null @@ -1,148 +0,0 @@ -/*---------------------------------------------------------------------------- -* file name: M68340.INC JC RAHUEL CNET/DSM/TAM/CAT -* -* MC68340 BCC Board Support Package -* -* date: 1/12/1993 -* -* Copyright 1989, Ready Systems FRANCE -* -* Supports: VRTX32 and RTscope -* -* Related Board: MOTOROLA BCC M68340 -* -* Description: EQUATES FOR 68340 DEVICES -* -* Changes: -* - Geoffroy Montel (g_montel@yahoo.com) : -* changed EQU syntax for GNU as -* -*----------------------------------------------------------------------------*/ - -/************************************************ - * ATTENTION: must match defs. in C header file * - ************************************************/ - -/* -- SIM equates -- system integration module */ -.equ BASE_REG, 0x3FF00 -.equ BASE_SIM, 0xEFFFF000 -.equ SIM_MCR, 0x000 /* module configuration register */ -.equ SIM_SYNCR, 0x004 /* clock synthesizer control register */ -.equ SIM_AVR, 0x006 /* autovector register */ -.equ SIM_RSR, 0x007 /* reset status register */ - -/* -- Port A -- */ -.equ SIM_PORTA, 0x011 /* port A data */ -.equ SIM_DDRA, 0x013 /* port A direction data */ -.equ SIM_PPRA1, 0x015 /* Port A pin assignement 1 */ -.equ SIM_PPRA2, 0x017 /* Port A pin assignement 2 */ - -/* -- Port B -- */ -.equ SIM_PORTB, 0x019 /* port B data */ -.equ SIM_PORTB1, 0x01B /* port B data auxiliary */ -.equ SIM_DDRB, 0x01D /* port B direction data */ -.equ SIM_PPRB, 0x01F /* Port B pin assignement */ -.equ SIM_SWIV, 0x020 /* SW interrupt vector */ -.equ SIM_SYPCR, 0x021 /* System protection control register */ -.equ SIM_PICR, 0x022 /* Periodic interrupt control register */ -.equ SIM_PITR, 0x024 /* Periodic interrupt timing register */ -.equ SIM_SWSR, 0x027 /* Sofware service */ - -/* -- Chip select -- */ -.equ SIM_MASKH0, 0x040 /* mask register CS0 */ -.equ SIM_MASKL0, 0x042 /* mask register CS0 */ -.equ SIM_ADDRH0, 0x044 /* base address CS0 */ -.equ SIM_ADDRL0, 0x046 /* base address CS0 */ -.equ SIM_MASKH1, 0x048 /* mask register CS1 */ -.equ SIM_MASKL1, 0x04A /* mask register CS1 */ -.equ SIM_ADDRH1, 0x04C /* base address CS1 */ -.equ SIM_ADDRL1, 0x04E /* base address CS1 */ -.equ SIM_MASKH2, 0x050 /* mask register CS2 */ -.equ SIM_MASKL2, 0x052 /* mask register CS2 */ -.equ SIM_ADDRH2, 0x054 /* base address CS2 */ -.equ SIM_ADDRL2, 0x056 /* base address CS2 */ -.equ SIM_MASKH3, 0x058 /* mask register CS3 */ -.equ SIM_MASKL3, 0x05A /* mask register CS3 */ -.equ SIM_ADDRH3, 0x05C /* base address CS3 */ -.equ SIM_ADDRL3, 0x05E /* base address CS3 */ - -/* -- TIMERS equates -- */ - -/* __ TIMER 0 */ -.equ TIM_MCR0, 0x600 /* Module configuration register */ -.equ TIM_IR0, 0x604 /* interrupt register */ -.equ TIM_CR0, 0x606 /* controle register */ -.equ TIM_SR0, 0x608 /* Status/prescaler register */ -.equ TIM_CNTR0, 0x60A /* counter register */ -.equ TIM_PREL10, 0x60C /* Preload register 1 */ -.equ TIM_PREL20, 0x60E /* Preload register 2 */ -.equ TIM_COM0, 0x610 /* Compare register */ - -/* __ TIMER 1 */ - -.equ TIM_MCR1, 0x640 /* Module configuration register */ -.equ TIM_IR1, 0x644 /* interrupt register */ -.equ TIM_CR1, 0x646 /* controle register */ -.equ TIM_SR1, 0x648 /* Status/prescaler register */ -.equ TIM_CNTR1, 0x64A /* counter register */ -.equ TIM_PREL11, 0x64C /* Preload register 1 */ -.equ TIM_PREL21, 0x64E /* Preload register 2 */ -.equ TIM_COM1, 0x650 /* Compare register */ - -/* -- U.A.R.T. equates -- */ - -.equ UA_MCRH, 0x700 /* module configuration register */ -.equ UA_MCRL, 0x701 /* module configuration register */ -.equ UA_ILR, 0x704 /* Interrupt level */ -.equ UA_IVR, 0x705 /* Interrupt vector */ -.equ UA_MR1A, 0x710 /* Mode register 1 A */ -.equ UA_MR2A, 0x720 /* Mode register 2 A*/ -.equ UA_CSRA, 0x711 /* Clock_select register A */ -.equ UA_SRA, 0x711 /* status register A */ -.equ UA_CRA, 0x712 /* command register A */ -.equ UA_RBA, 0x713 /* receive buffer A */ -.equ UA_TBA, 0x713 /* transmit buffer A */ -.equ UA_IPCR, 0x714 /* input port change register */ -.equ UA_ACR, 0x714 /* auxiliary control register */ -.equ UA_ISR, 0x715 /* interrupt status register */ -.equ UA_IER, 0x715 /* interrupt enable register */ -.equ UA_MR1B, 0x718 /* Mode register 1 B */ -.equ UA_MR2B, 0x721 /* Mode register 2 B */ -.equ UA_CSRB, 0x719 /* Clock_select register B */ -.equ UA_SRB, 0x719 /* status register B */ -.equ UA_CRB, 0x71A /* command register A */ -.equ UA_RBB, 0x71B /* receive buffer A */ -.equ UA_TBB, 0x71B /* transmit buffer A */ -.equ UA_IP, 0x71D /* Input port register */ -.equ UA_OPCR, 0x71D /* output port control register */ -.equ UA_OPS, 0x71E /* output port bit set */ -.equ UA_OPR, 0x71F /* output port bit reset */ -.equ TX_A_EN, 0x01 /* Tx A irq enable */ -.equ TX_B_EN, 0x10 /* Tx B irq enable */ -.equ TX_A_DIS, 0xFE /* Tx A irq enable */ -.equ TX_B_DIS, 0xEF /* Tx B irq enable */ -.equ TX_AB_DIS, 0x22 - -/* -- DMA equates -- */ -.equ DMA_MCR0, 0x780 /* module configuration register */ -.equ DMA_IR0, 0x784 /* Interrupt register */ -.equ DMA_CCR0, 0x788 /* Channel control register */ -.equ DMA_CSR0, 0x78A /* Channel status register */ -.equ DMA_FCR0, 0x78B /* Function code register */ -.equ DMA_SARH0, 0x78C /* Source adresse register */ -.equ DMA_SARL0, 0x78E /* Source adresse register */ -.equ DMA_DARH0, 0x790 /* destination adresse register */ -.equ DMA_DARL0, 0x792 /* destination adresse register */ -.equ DMA_BTCH0, 0x794 /* byte transfer register */ -.equ DMA_BTCL0, 0x796 /* byte transfer register */ -.equ DMA_MCR1, 0x7A0 /* module configuration register */ -.equ DMA_IR1, 0x7A4 /* Interrupt register */ -.equ DMA_CCR1, 0x7A8 /* Channel control register */ -.equ DMA_CSR1, 0x7AA /* Channel status register */ -.equ DMA_FCR1, 0x7AB /* Function code register */ -.equ DMA_SARH1, 0x7AC /* Source adresse register */ -.equ DMA_SARL1, 0x7AE /* Source adresse register */ -.equ DMA_DARH1, 0x7B0 /* destination adresse register */ -.equ DMA_DARL1, 0x7B2 /* destination adresse register */ -.equ DMA_BTCH1, 0x7B4 /* byte transfer register */ -.equ DMA_BTCL1, 0x7B6 /* byte transfer register */ diff --git a/c/src/lib/libbsp/m68k/gen68340/include/m68349.inc b/c/src/lib/libbsp/m68k/gen68340/include/m68349.inc deleted file mode 100644 index 4e3ce53d29..0000000000 --- a/c/src/lib/libbsp/m68k/gen68340/include/m68349.inc +++ /dev/null @@ -1,410 +0,0 @@ -/*---------------------------------------------------------------------------- - * file name: M68349.INC P. CADIC CNET/DSM/TAM/CAT - * - * MC68349 BCC Board Support Package - * - * date: 31/07/97 - * - * Description: EQUATES FOR 68349 DEVICES - * - * Modifications: - * - adapted for GNU CC by G.Montel 26/05/98 - *----------------------------------------------------------------------------*/ - -| -- SIM equates -- - -.equ BASE_REG, 0x3FF00 -.equ BASE_SIM, 0xEFFFF000 | pour correction du bug 68349 sur IACK - -.equ SIM_MCR, 0x000 | module configuration register -.equ SIM_IDR, 0x002 | processor identification register -.equ SIM_SYNCR, 0x004 | clock synthesizer control register -.equ SIM_AVR, 0x006 | autovector register -.equ SIM_RSR, 0x007 | reset status register - -| -- Port A -.equ SIM_PORTA, 0x011 | port A data -.equ SIM_DDRA, 0x013 | port A direction data -.equ SIM_PPRA1, 0x015 | Port A pin assignement 1 -.equ SIM_PPRA2, 0x017 | Port A pin assignement 2 - -| -- Port B -.equ SIM_PORTB, 0x019 | port B data -.equ SIM_PORTB1, 0x01B | port B data auxiliary -.equ SIM_DDRB, 0x01D | port B direction data -.equ SIM_PPRB, 0x01F | Port B pin assignement - -.equ SIM_SWIV, 0x020 | SW interrupt vector -.equ SIM_SYPCR, 0x021 | System protection control register -.equ SIM_PICR, 0x022 | Periodic interrupt control register -.equ SIM_PITR, 0x024 | Periodic interrupt timing register -.equ SIM_SWSR, 0x027 | Sofware service - -| -- Chip select -.equ SIM_MASKH0, 0x040 | mask register CS0 -.equ SIM_MASKL0, 0x042 | mask register CS0 -.equ SIM_ADDRH0, 0x044 | base address CS0 -.equ SIM_ADDRL0, 0x046 | base address CS0 - -.equ SIM_MASKH1, 0x048 | mask register CS1 -.equ SIM_MASKL1, 0x04A | mask register CS1 -.equ SIM_ADDRH1, 0x04C | base address CS1 -.equ SIM_ADDRL1, 0x04E | base address CS1 - -.equ SIM_MASKH2, 0x050 | mask register CS2 -.equ SIM_MASKL2, 0x052 | mask register CS2 -.equ SIM_ADDRH2, 0x054 | base address CS2 -.equ SIM_ADDRL2, 0x056 | base address CS2 - -.equ SIM_MASKH3, 0x058 | mask register CS3 -.equ SIM_MASKL3, 0x05A | mask register CS3 -.equ SIM_ADDRH3, 0x05C | base address CS3 -.equ SIM_ADDRL3, 0x05E | base address CS3 - -| -- TIMERS equates -- - -| __ TIMER 0 - -.equ TIM_MCR0, 0x600 | Module configuration register -.equ TIM_IR0, 0x604 | interrupt register -.equ TIM_CR0, 0x606 | controle register -.equ TIM_SR0, 0x608 | Status/prescaler register -.equ TIM_CNTR0, 0x60A | counter register -.equ TIM_PREL10, 0x60C | Preload register 1 -.equ TIM_PREL20, 0x60E | Preload register 2 -.equ TIM_COM0, 0x610 | Compare register - -| __ TIMER 1 - -.equ TIM_MCR1, 0x640 | Module configuration register -.equ TIM_IR1, 0x644 | interrupt register -.equ TIM_CR1, 0x646 | controle register -.equ TIM_SR1, 0x648 | Status/prescaler register -.equ TIM_CNTR1, 0x64A | counter register -.equ TIM_PREL11, 0x64C | Preload register 1 -.equ TIM_PREL21, 0x64E | Preload register 2 -.equ TIM_COM1, 0x650 | Compare register - -| -- U.A.R.T. equates -- - -.equ UA_MCRH, 0x700 | module configuration register -.equ UA_MCRL, 0x701 | module configuration register -.equ UA_ILR, 0x704 | Interrupt level -.equ UA_IVR, 0x705 | Interrupt vector - -.equ UA_MR1A, 0x710 | Mode register 1 A -.equ UA_MR2A, 0x720 | Mode register 2 A -.equ UA_CSRA, 0x711 | Clock_select regiter A -.equ UA_SRA, 0x711 | status register A -.equ UA_CRA, 0x712 | command register A -.equ UA_RBA, 0x713 | receive buffer A -.equ UA_TBA, 0x713 | transmit buffer A - -.equ UA_IPCR, 0x714 | input port change register -.equ UA_ACR, 0x714 | auxiliary control register -.equ UA_ISR, 0x715 | interrupt status register -.equ UA_IER, 0x715 | interrupt enable register - -.equ UA_MR1B, 0x718 | Mode register 1 B -.equ UA_MR2B, 0x721 | Mode register 2 B -.equ UA_CSRB, 0x719 | Clock_select regiter B -.equ UA_SRB, 0x719 | status register B -.equ UA_CRB, 0x71A | command register A -.equ UA_RBB, 0x71B | receive buffer A -.equ UA_TBB, 0x71B | transmit buffer A - -.equ UA_IP, 0x71D | Input port register -.equ UA_OPCR, 0x71D | output port control register -.equ UA_OPS, 0x71E | output port bit set -.equ UA_OPR, 0x71F | output port bit reset -.equ TX_A_EN, 0x01 | Tx A irq enable -.equ TX_B_EN, 0x10 | Tx B irq enable -.equ TX_A_DIS, 0xFE | Tx A irq enable -.equ TX_B_DIS, 0xEF | Tx B irq enable -.equ TX_AB_DIS, 0x22 - - -| -- DMA equates -.equ DMA_MCR0, 0x780 | module configuration register -.equ DMA_IR0, 0x784 | Interrupt register -.equ DMA_CCR0, 0x788 | Channel control register -.equ DMA_CSR0, 0x78A | Channel status register -.equ DMA_FCR0, 0x78B | Function code register -.equ DMA_SARH0, 0x78C | Source adresse register -.equ DMA_SARL0, 0x78E | Source adresse register -.equ DMA_DARH0, 0x790 | destination adresse register -.equ DMA_DARL0, 0x792 | destination adresse register -.equ DMA_BTCH0, 0x794 | byte transfer register -.equ DMA_BTCL0, 0x796 | byte transfer register - -.equ DMA_MCR1, 0x7A0 | module configuration register -.equ DMA_IR1, 0x7A4 | Interrupt register -.equ DMA_CCR1, 0x7A8 | Channel control register -.equ DMA_CSR1, 0x7AA | Channel status register -.equ DMA_FCR1, 0x7AB | Function code register -.equ DMA_SARH1, 0x7AC | Source adresse register -.equ DMA_SARL1, 0x7AE | Source adresse register -.equ DMA_DARH1, 0x7B0 | destination adresse register -.equ DMA_DARL1, 0x7B2 | destination adresse register -.equ DMA_BTCH1, 0x7B4 | byte transfer register -.equ DMA_BTCL1, 0x7B6 | byte transfer register - -| -- cache equates -.equ CACHE_MCR, 0xFC0 | cache config reg. (long) - -| -- quad data memory module (QDMM) equates -.equ QDMM_MCR, 0xC00 | QDMM config reg (long) -.equ QDMM_QBAR0, 0xC10 | QDMM base 0 (long) -.equ QDMM_QBAR1, 0xC14 | QDMM base 1 (long) -.equ QDMM_QBAR2, 0xC18 | QDMM base 2 (long) -.equ QDMM_QBAR3, 0xC1C | QDMM base 3 (long) - - - -|----------------------------------------------------- -| AST68349 internal registers -|----------------------------------------------------- -.equ EPLD_SPACE, 3 | "reserved user" space -.equ CPU_SPACE, 7 | "CPU" space - -|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -| GLUE EPLD -|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| - -.equ GLUE_EPLD, 0xB0000000 - -|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -| configuration of /CS0 : -| -| 7 6 5 4 3 2 1 0 -| +---+---+---+---+---+---+---+---+ -| |ena|val|wid| ws|b31|b30|b29|b28| -| +---+---+---+---+---+---+---+---+ -| -| b[31..28] : base address for decoding /CS[3..0] -| the decoding is as follow : -| -| +----------+------------+------+ -| | a[31..28] | a[27..26] | /CS | -| +-----------+-----------+------+ -| | b[31..28] | 00 | /CS0 | each /CS decodes 64 Mbytes -| | b[31..28] | 01 | /CS1 | -| | b[31..28] | 10 | /CS2 | -| | b[31..28] | 11 | /CS3 | -| +-----------------------+------+ -| -| after /RESET, /CS0 is validated for every cycle, until programmed -| -| ws : number of wait-states : 0 => 0 ws -| 1 => external /dsackx -| wid : width of chip-select : 0 => 16 bits -| 1 => 32 bits -| ena : enable chip-select : 0 => disabled -| 1 => enabled -| -| val : automatic validation. set after reset -| cleared when /CS0 is configured -| -.equ REG_CS0, 0 - - -|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -| configuration of /CS1 to /CS3: -| -| 7 6 5 4 3 2 1 0 -| +---+---+---+---+---+---+---+---+ -| |ena| x |wid| ws| x | x | x | x | -| +---+---+---+---+---+---+---+---+ -| -| ws : number of wait-states : 0 => 0 ws -| 1 => external /dsackx -| wid : width of chip-select : 0 => 16 bits -| 1 => 32 bits -| ena : enable chip-select : 0 => disabled -| 1 => enabled -.equ REG_CS1, 1 -.equ REG_CS2, 2 -.equ REG_CS3, 3 - -|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -| I2C register -| -| 7 6 5 4 3 2 1 0 -| +---+---+---+---+---+---+---+----+ -| | x | x | x | x | x | x |clk|data| -| +---+---+---+---+---+---+---+----+ -| bidirecionnal pin, open drain output. -| set bit to 1 to read external state of pin -| -.equ REG_I2C, 4 - -|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -| PDCS register -| -| 7 6 5 4 3 2 1 0 -| +---+---+---+---+---+---+---+---+ -| |s12|s11|s14|pd5|pd4|pd3|pd2|pd1| -| +---+---+---+---+---+---+---+---+ -| pd[5..1] : value read on the DRAM module -| S12, S11 and S14 : "user reserved" configuration switch -| -.equ REG_PDCS, 5 - -|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -| timer1 register -| -| 7 6 5 4 3 2 1 0 -| +---+---+---+---+---+---+---+---+ -| |ena| x | x | x | x | x | d1| d0| -| +---+---+---+---+---+---+---+---+ -| -| the timer clock is the 1000Hz clock of the ASTECC platform -| the timer is reloaded on each write to the register, or if the input -| TIN1 is set to 0. -| on overflow, the open drain output TOUT1 is set to 0 -| the timer must be disabled to return TOUT1 to the inactive state -| -.equ REG_TIMER1, 6 - -|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -| timer2 register -| -| 7 6 5 4 3 2 1 0 -| +---+---+---+---+---+---+---+---+ -| |ena| x | x | x | x | x | d1| d0| -| +---+---+---+---+---+---+---+---+ -| the timer clock is the 1000Hz clock of the ASTECC platform -| the timer is reloaded on each write to the register, or if the input -| TIN2 is set to 0. -| on overflow, the open drain output TOUT2 is set to 0 -| the timer must be disabled to return TOUT2 to the inactive state -| -.equ REG_TIMER2, 7 - -|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -| baudrate generator register -| -| 7 6 5 4 3 2 1 0 -| +---+---+---+---+---+---+---+---+ -| | x | x | x | x | x | d2| d1| d0| -| +---+---+---+---+---+---+---+---+ -| -| d[2..0] : divider of a 3.6864 Mhz clock -| -| d[2..0] : 0 1 2 3 4 5 6 7 -| divides by : 2 4 6 8 10 12 14 16 -| SCLK (Mhz) : 1.8432 0.9216 0.6144 0.4608 x 0.3072 x 0.2304 -| baudrate : 115200 57600 38400 28800 x 19200 x 14400 -| -.equ REG_BAUDRATE, 8 - -|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -| IO register -| -| 7 6 5 4 3 2 1 0 -| +---+---+---+---+---+---+---+---+ -| | x | x | x |io4|io3|io2|io1|io0| -| +---+---+---+---+---+---+---+---+ -| -| io[4..0] : data written to port -| -| maximum current load is about 5 mA per pin -| -.equ REG_IO, 9 - -|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -| IO port -| -| 7 6 5 4 3 2 1 0 -| +---+---+---+---+---+---+---+---+ -| | x | x | x |io4|io3|io2|io1|io0| -| +---+---+---+---+---+---+---+---+ -| -| io[4..0] : data read from port -| -.equ REG_IO_PORT, 10 - -|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -| IO direction register -| -| 7 6 5 4 3 2 1 0 -| +---+---+---+---+---+---+---+---+ -| | x | x | x | x | x |dr2|dr1|dr0| -| +---+---+---+---+---+---+---+---+ -| -| dr0 : 0 => io port 0 is configured as input (default after /RESET) -| 1 => io port 0 is configured as output -| -| dr1 : 0 => io port 1 is configured as input (default after /RESET) -| 1 => io port 1 is configured as output -| -| dr2 : 0 => io ports 2 to 4 are configured as input (default after /RESET) -| 1 => io ports 2 to 4 are configured as output -| -.equ REG_DIR_IO, 11 - - - - -|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -| DRAM EPLD -|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| - -.equ DRAM_EPLD, 0xA0000000 - -|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -| number of wait-state for DRAM -| -| 7 6 5 4 3 2 1 0 -| +---+---+---+---+---+---+---+---+ -| | x | x | x | x | x | x |ws1|ws0| -| +---+---+---+---+---+---+---+---+ -| -| ws[1..0] : 0 1 2 3 -| wait states : 0 1 2 3 -| -.equ REG_WS, 0 - -|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -| configuration of refresh for DRAM -| -| 7 6 5 4 3 2 1 0 -| +---+---+---+---+---+---+---+---+ -| |ena| x | x | x | x | x |rf1|rf0| -| +---+---+---+---+---+---+---+---+ -| -| rf[1..0] : 0 1 2 3 -| refresh : 5µs 10µs 15µs 20µs -| -| ena == 0 : refresh disabled -| ena == 1 : refresh enabled -| -.equ REG_REFRESH, 1 - -|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -| configuration of DRAM module size -| -| 7 6 5 4 3 2 1 0 -| +---+---+---+---+---+---+---+---+ -| | x | x | x | x | x |sz2|sz1|sz0| -| +---+---+---+---+---+---+---+---+ -| -| sz[2..0] : 0 1 2 3 4 5 6 7 -| size (Mbytes): 4 8 16 32 64 128 0 0 -| -.equ REG_CONFIG, 2 - -|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -| bus width of /CS0 during reset bw[1..0] : 0 1 2 3 -| bus width : 32 16 8 ext. /dsackx -| -| state of CS_SWITCH : sel == 0 => CPU chip_selects (/CS[3..0]) -| : sel == 1 => EPLD chip_selects (/CS[3..0]) -| -| 7 6 5 4 3 2 1 0 -| +---+---+---+---+---+---+---+---+ -| |bw1|bw0| x | x | x | x | x |sel| -| +---+---+---+---+---+---+---+---+ -| -.equ REG_BUSWIDTH, 3 - diff --git a/c/src/lib/libbsp/m68k/gen68340/include/tm27.h b/c/src/lib/libbsp/m68k/gen68340/include/tm27.h deleted file mode 100644 index 0dfa7bf628..0000000000 --- a/c/src/lib/libbsp/m68k/gen68340/include/tm27.h +++ /dev/null @@ -1 +0,0 @@ -#include <rtems/tm27-default.h> diff --git a/c/src/lib/libbsp/m68k/gen68340/preinstall.am b/c/src/lib/libbsp/m68k/gen68340/preinstall.am deleted file mode 100644 index d4174d005d..0000000000 --- a/c/src/lib/libbsp/m68k/gen68340/preinstall.am +++ /dev/null @@ -1,83 +0,0 @@ -## Automatically generated by ampolish3 - Do not edit - -if AMPOLISH3 -$(srcdir)/preinstall.am: Makefile.am - $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am -endif - -PREINSTALL_DIRS = -DISTCLEANFILES += $(PREINSTALL_DIRS) - -all-am: $(PREINSTALL_FILES) - -PREINSTALL_FILES = -CLEANFILES = $(PREINSTALL_FILES) - -all-local: $(TMPINSTALL_FILES) - -TMPINSTALL_FILES = -CLEANFILES += $(TMPINSTALL_FILES) - -$(PROJECT_LIB)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_LIB) - @: > $(PROJECT_LIB)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp) - -$(PROJECT_INCLUDE)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE) - @: > $(PROJECT_INCLUDE)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp) - -$(PROJECT_INCLUDE)/bsp/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp - @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp) - -$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs -PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs - -$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h - -$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h - -$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h - -$(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h - -$(PROJECT_INCLUDE)/m340uart.h: include/m340uart.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/m340uart.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/m340uart.h - -$(PROJECT_INCLUDE)/m340timer.h: include/m340timer.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/m340timer.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/m340timer.h - -$(PROJECT_INCLUDE)/m68340.h: include/m68340.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/m68340.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/m68340.h - -$(PROJECT_INCLUDE)/m68340.inc: include/m68340.inc $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/m68340.inc -PREINSTALL_FILES += $(PROJECT_INCLUDE)/m68340.inc - -$(PROJECT_INCLUDE)/m68349.inc: include/m68349.inc $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/m68349.inc -PREINSTALL_FILES += $(PROJECT_INCLUDE)/m68349.inc - -$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT) -TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT) - -$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds - diff --git a/c/src/lib/libbsp/m68k/gen68340/bsp_specs b/c/src/lib/libbsp/m68k/gen68340/startup/bsp_specs index 3a20757667..3a20757667 100644 --- a/c/src/lib/libbsp/m68k/gen68340/bsp_specs +++ b/c/src/lib/libbsp/m68k/gen68340/startup/bsp_specs diff --git a/c/src/lib/libbsp/m68k/gen68360/Makefile.am b/c/src/lib/libbsp/m68k/gen68360/Makefile.am index a134d792a8..9bb4369caa 100644 --- a/c/src/lib/libbsp/m68k/gen68360/Makefile.am +++ b/c/src/lib/libbsp/m68k/gen68360/Makefile.am @@ -4,25 +4,21 @@ EXTRA_DIST = include $(top_srcdir)/../../../../automake/compile.am include $(top_srcdir)/../../bsp.am -include_bspdir = $(includedir)/bsp +dist_project_lib_DATA = startup/bsp_specs -dist_project_lib_DATA = bsp_specs - -include_HEADERS = include/bsp.h -include_HEADERS += include/tm27.h -nodist_include_HEADERS = include/bspopts.h -nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h DISTCLEANFILES = include/bspopts.h noinst_PROGRAMS = -dist_project_lib_DATA += startup/linkcmds startup/linkcmds.prom \ - startup/linkcmds.bootp EXTRA_DIST += start/start.S start.$(OBJEXT): start/start.S $(CPPASCOMPILE) -o $@ -c $< project_lib_DATA = start.$(OBJEXT) +project_lib_DATA += linkcmds +dist_project_lib_DATA += startup/linkcmds.bootp +dist_project_lib_DATA += startup/linkcmds.prom + noinst_LIBRARIES = libbsp.a libbsp_a_SOURCES = @@ -60,5 +56,5 @@ if HAS_FPSP libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/fpsp.rel endif -include $(srcdir)/preinstall.am include $(top_srcdir)/../../../../automake/local.am +include $(srcdir)/../../../../../../bsps/m68k/gen68360/headers.am diff --git a/c/src/lib/libbsp/m68k/gen68360/configure.ac b/c/src/lib/libbsp/m68k/gen68360/configure.ac index 965e491c78..5a0e72cb21 100644 --- a/c/src/lib/libbsp/m68k/gen68360/configure.ac +++ b/c/src/lib/libbsp/m68k/gen68360/configure.ac @@ -4,6 +4,9 @@ AC_PREREQ([2.69]) AC_INIT([rtems-c-src-lib-libbsp-m68k-gen68360],[_RTEMS_VERSION],[https://devel.rtems.org/newticket]) AC_CONFIG_SRCDIR([make/custom/gen68360.cfg]) RTEMS_TOP(../../../../../..) +RTEMS_SOURCE_TOP +RTEMS_BUILD_TOP +RTEMS_BSP_LINKCMDS RTEMS_CANONICAL_TARGET_CPU AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2]) diff --git a/c/src/lib/libbsp/m68k/gen68360/include/bsp.h b/c/src/lib/libbsp/m68k/gen68360/include/bsp.h deleted file mode 100644 index 0c6a94066c..0000000000 --- a/c/src/lib/libbsp/m68k/gen68360/include/bsp.h +++ /dev/null @@ -1,111 +0,0 @@ -/** - * @file - * - * @ingroup gen68360_bsp - * - * @brief Board Support Package for `Generic' Motorola MC68360 - */ - -/* - * - * Based on the `gen68302' board support package, and covered by the - * original distribution terms. - * - * W. Eric Norum - * Saskatchewan Accelerator Laboratory - * University of Saskatchewan - * Saskatoon, Saskatchewan, CANADA - * eric@skatter.usask.ca - */ - -/* bsp.h - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef LIBBSP_M68K_GEN68360_BSP_H -#define LIBBSP_M68K_GEN68360_BSP_H - -#include <bspopts.h> -#include <bsp/default-initial-extension.h> - -#include <rtems.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup gen68360_bsp Network driver - * - * @ingroup m68k_gen68360 - * - * @brief Network driver configuration - */ - -struct rtems_bsdnet_ifconfig; -extern int rtems_scc1_driver_attach (struct rtems_bsdnet_ifconfig *config, int attaching); -#define RTEMS_BSP_NETWORK_DRIVER_NAME "scc1" -#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_scc1_driver_attach - -extern rtems_isr_entry M68Kvec[]; /* vector table address */ - -/* functions */ - -void M360ExecuteRISC( uint16_t command ); -void *M360AllocateBufferDescriptors( int count ); -void *M360AllocateRiscTimers( int count ); -extern char M360DefaultWatchdogFeeder; - -extern int m360_clock_rate; /* BRG clock rate, defined in console.c */ - -rtems_isr_entry set_vector( - rtems_isr_entry handler, - rtems_vector_number vector, - int type -); - -/* - * Definitions for Atlas Computer Equipment Inc. High Speed Bridge (HSB) - */ -#define ATLASHSB_ESR 0x20010000L -#define ATLASHSB_USICR 0x20010001L -#define ATLASHSB_DSRR 0x20010002L -#define ATLASHSB_LED4 0x20010004L -#define ATLASHSB_ROM_U6 0xFF080000L /* U6 flash ROM socket */ - - -/* - * definitions for PGH360 board - */ -#if defined(PGH360) -/* - * logical SPI addresses of SPI slaves available - */ -#define PGH360_SPI_ADDR_EEPROM 0 -#define PGH360_SPI_ADDR_DISP4_DATA 1 -#define PGH360_SPI_ADDR_DISP4_CTRL 2 - -/* - * Port B bit locations of SPI slave selects - */ -#define PGH360_PB_SPI_DISP4_RS_MSK (1<<15) -#define PGH360_PB_SPI_DISP4_CE_MSK (1<<14) -#define PGH360_PB_SPI_EEP_CE_MSK (1<< 0) -#endif /* defined(PGH360) */ - -/* - * Prototypes for BSP methods which cross file boundaries - */ -void _Init68360(void); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/c/src/lib/libbsp/m68k/gen68360/include/tm27.h b/c/src/lib/libbsp/m68k/gen68360/include/tm27.h deleted file mode 100644 index c71eed3897..0000000000 --- a/c/src/lib/libbsp/m68k/gen68360/include/tm27.h +++ /dev/null @@ -1,40 +0,0 @@ -/** - * @file - * - * @ingroup m68k_tm27 - * - * @brief Time Test 27 - */ - -/* - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef _RTEMS_TMTEST27 -#error "This is an RTEMS internal file you must not include directly." -#endif - -#ifndef __tm27_h -#define __tm27_h - -/** - * @defgroup m68k_tm27 Stuff for Time Test 27 - * - * @ingroup m68k_gen68360 - * - * @brief Don't bother with hardware -- just use a software-interrupt - */ - -#define MUST_WAIT_FOR_INTERRUPT 0 - -#define Install_tm27_vector( handler ) set_vector( (handler), 34, 1 ) - -#define Cause_tm27_intr() asm volatile ("trap #2"); - -#define Clear_tm27_intr() /* empty */ - -#define Lower_tm27_intr() /* empty */ - -#endif diff --git a/c/src/lib/libbsp/m68k/gen68360/preinstall.am b/c/src/lib/libbsp/m68k/gen68360/preinstall.am deleted file mode 100644 index 17d061f6b9..0000000000 --- a/c/src/lib/libbsp/m68k/gen68360/preinstall.am +++ /dev/null @@ -1,71 +0,0 @@ -## Automatically generated by ampolish3 - Do not edit - -if AMPOLISH3 -$(srcdir)/preinstall.am: Makefile.am - $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am -endif - -PREINSTALL_DIRS = -DISTCLEANFILES += $(PREINSTALL_DIRS) - -all-am: $(PREINSTALL_FILES) - -PREINSTALL_FILES = -CLEANFILES = $(PREINSTALL_FILES) - -all-local: $(TMPINSTALL_FILES) - -TMPINSTALL_FILES = -CLEANFILES += $(TMPINSTALL_FILES) - -$(PROJECT_LIB)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_LIB) - @: > $(PROJECT_LIB)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp) - -$(PROJECT_INCLUDE)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE) - @: > $(PROJECT_INCLUDE)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp) - -$(PROJECT_INCLUDE)/bsp/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp - @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp) - -$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs -PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs - -$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h - -$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h - -$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h - -$(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h - -$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds - -$(PROJECT_LIB)/linkcmds.prom: startup/linkcmds.prom $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.prom -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.prom - -$(PROJECT_LIB)/linkcmds.bootp: startup/linkcmds.bootp $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.bootp -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.bootp - -$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT) -TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT) - diff --git a/c/src/lib/libbsp/m68k/gen68360/bsp_specs b/c/src/lib/libbsp/m68k/gen68360/startup/bsp_specs index 87638cc027..87638cc027 100644 --- a/c/src/lib/libbsp/m68k/gen68360/bsp_specs +++ b/c/src/lib/libbsp/m68k/gen68360/startup/bsp_specs diff --git a/c/src/lib/libbsp/m68k/genmcf548x/Makefile.am b/c/src/lib/libbsp/m68k/genmcf548x/Makefile.am index 6259cedae5..fd9eac00f3 100644 --- a/c/src/lib/libbsp/m68k/genmcf548x/Makefile.am +++ b/c/src/lib/libbsp/m68k/genmcf548x/Makefile.am @@ -4,18 +4,7 @@ EXTRA_DIST = include $(top_srcdir)/../../../../automake/compile.am include $(top_srcdir)/../../bsp.am -include_bspdir = $(includedir)/bsp - -include_HEADERS = include/bsp.h -include_HEADERS += include/tm27.h - -nodist_include_HEADERS = include/bspopts.h -nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h - -include_bsp_HEADERS = -include_bsp_HEADERS += ../../shared/include/irq-generic.h -include_bsp_HEADERS += ../../shared/include/irq-info.h -include_bsp_HEADERS += include/irq.h +dist_project_lib_DATA = startup/bsp_specs DISTCLEANFILES = include/bspopts.h noinst_PROGRAMS = @@ -26,16 +15,14 @@ start.$(OBJEXT): start/start.S $(CPPASCOMPILE) -o $@ -c $< project_lib_DATA = start.$(OBJEXT) -dist_project_lib_DATA = bsp_specs -dist_project_lib_DATA += startup/linkcmds.m5484FireEngine.flash +project_lib_DATA += linkcmds dist_project_lib_DATA += startup/linkcmds.COBRA5475 dist_project_lib_DATA += startup/linkcmds.m5484FireEngine - -project_lib_DATA += startup/linkcmds +dist_project_lib_DATA += startup/linkcmds.m5484FireEngine.flash noinst_LIBRARIES = libbsp.a libbsp_a_SOURCES = -libbsp_a_CPPFLAGS = +libbsp_a_CPPFLAGS = $(AM_CPPFLAGS) # startup libbsp_a_SOURCES += \ @@ -82,5 +69,5 @@ if HAS_NETWORKING libbsp_a_LIBADD += network.rel endif -include $(srcdir)/preinstall.am include $(top_srcdir)/../../../../automake/local.am +include $(srcdir)/../../../../../../bsps/m68k/genmcf548x/headers.am diff --git a/c/src/lib/libbsp/m68k/genmcf548x/configure.ac b/c/src/lib/libbsp/m68k/genmcf548x/configure.ac index ce1804c3d2..d7ec6702b9 100644 --- a/c/src/lib/libbsp/m68k/genmcf548x/configure.ac +++ b/c/src/lib/libbsp/m68k/genmcf548x/configure.ac @@ -4,6 +4,9 @@ AC_PREREQ([2.69]) AC_INIT([rtems-c-src-lib-libbsp-m68k-genmcf548x],[_RTEMS_VERSION],[https://devel.rtems.org/newticket]) AC_CONFIG_SRCDIR([make/custom/COBRA5475.cfg]) RTEMS_TOP(../../../../../..) +RTEMS_SOURCE_TOP +RTEMS_BUILD_TOP +RTEMS_BSP_LINKCMDS RTEMS_CANONICAL_TARGET_CPU AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2]) @@ -43,7 +46,6 @@ RTEMS_BSPOPTS_HELP([HAS_LOW_LEVEL_INIT], [If defined, we will do all the low level init of the chip (like bus/memory...).]) RTEMS_BSP_CLEANUP_OPTIONS -RTEMS_BSP_LINKCMDS # Explicitly list all Makefiles here AC_CONFIG_FILES([Makefile]) diff --git a/c/src/lib/libbsp/m68k/genmcf548x/include/bsp.h b/c/src/lib/libbsp/m68k/genmcf548x/include/bsp.h deleted file mode 100644 index 77a7bca0e8..0000000000 --- a/c/src/lib/libbsp/m68k/genmcf548x/include/bsp.h +++ /dev/null @@ -1,134 +0,0 @@ -/** - * @file - * - * @ingroup m68k_genmcf548x - * - * @brief Global BSP definitions. - */ - -/*===============================================================*\ -| Project: RTEMS generic mcf548x BSP | -+-----------------------------------------------------------------+ -| File: bsp.h | -+-----------------------------------------------------------------+ -| The file contains the BSP header of generic MCF548x BSP. | -+-----------------------------------------------------------------+ -| Copyright (c) 2007 | -| Embedded Brains GmbH | -| Obere Lagerstr. 30 | -| D-82178 Puchheim | -| Germany | -| rtems@embedded-brains.de | -+-----------------------------------------------------------------+ -| | -| Parts of the code has been derived from the "dBUG source code" | -| package Freescale is providing for M548X EVBs. The usage of | -| the modified or unmodified code and it's integration into the | -| generic mcf548x BSP has been done according to the Freescale | -| license terms. | -| | -| The Freescale license terms can be reviewed in the file | -| | -| Freescale_license.txt | -| | -+-----------------------------------------------------------------+ -| | -| The generic mcf548x BSP has been developed on the basic | -| structures and modules of the av5282 BSP. | -| | -+-----------------------------------------------------------------+ -| | -| The license and distribution terms for this file may be | -| found in the file LICENSE in this distribution or at | -| | -| http://www.rtems.org/license/LICENSE. | -| | -+-----------------------------------------------------------------+ -| | -| date history ID | -| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | -| 12.11.07 1.0 ras | -| | -\*===============================================================*/ - -#ifndef LIBBSP_M68K_GENMCF548X_BSP_H -#define LIBBSP_M68K_GENMCF548X_BSP_H - -#include <bspopts.h> -#include <bsp/default-initial-extension.h> - -/** - * @defgroup m68k_genmcf548x MCF548X Support - * - * @ingroup bsp_m68k - * - * @brief MCT548X support. - */ - -#include <rtems.h> -#include <rtems/bspIo.h> - -/***************************************************************************/ -/** Hardware data structure headers **/ -#include <mcf548x/mcf548x.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/***************************************************************************/ -/** User Definable configuration **/ - -/* define which port the console should use - all other ports are then defined as general purpose */ -#define CONSOLE_PORT 0 - -/* functions */ - -uint32_t get_CPU_clock_speed(void); - -rtems_isr_entry set_vector( - rtems_isr_entry handler, - rtems_vector_number vector, - int type -); - -/* Initial values for the interrupt level and priority registers (INTC_ICRn) */ -extern const uint8_t mcf548x_intc_icr_init_values[64]; - -/* - * Network driver configuration - */ -struct rtems_bsdnet_ifconfig; -extern int rtems_mcf548x_fec_driver_attach_detach(struct rtems_bsdnet_ifconfig *config,int attaching); -#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_mcf548x_fec_driver_attach_detach - -#define RTEMS_BSP_NETWORK_DRIVER_NAME "fec1" -#define RTEMS_BSP_NETWORK_DRIVER_NAME2 "fec2" - -#ifdef HAS_DBUG - typedef struct { - uint32_t console_baudrate; - uint8_t server_ip [4]; - uint8_t client_ip [4]; - uint8_t gateway_ip[4]; - uint8_t netmask [4]; - uint8_t spare[4]; - uint8_t macaddr [6]; - uint32_t ethport; /* default fec port: 1 = fec1, 2 = fec2 */ - uint32_t uartport; /* default fec port: 1 = psc0, 2 = psc1... */ - } dbug_settings_t; - -#define DBUG_SETTINGS (*(const dbug_settings_t *)0xFC020000) -#endif /* HAS_DBUG */ - -void bsp_cacr_set_flags(uint32_t flags); - -void bsp_cacr_set_self_clear_flags(uint32_t flags); - -void bsp_cacr_clear_flags(uint32_t flags); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/c/src/lib/libbsp/m68k/genmcf548x/include/irq.h b/c/src/lib/libbsp/m68k/genmcf548x/include/irq.h deleted file mode 100644 index 825cc0d104..0000000000 --- a/c/src/lib/libbsp/m68k/genmcf548x/include/irq.h +++ /dev/null @@ -1,96 +0,0 @@ -/** - * @file - * - * @ingroup genmcf548x_interrupt - * - * @brief Interrupt definitions. - */ - -/* - * Copyright (c) 2013 embedded brains GmbH. All rights reserved. - * - * embedded brains GmbH - * Dornierstr. 4 - * 82178 Puchheim - * Germany - * <rtems@embedded-brains.de> - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef LIBBSP_M68K_MCF548X_IRQ_H -#define LIBBSP_M68K_MCF548X_IRQ_H - -#include <rtems.h> -#include <rtems/irq.h> -#include <rtems/irq-extension.h> - -/** - * @defgroup genmcf548x_interrupt Interrupt Support - * - * @ingroup m68k_genmcf548x - * - * @brief Interrupt support. - */ - - -#define MCF548X_IRQ_EPORT_EPF1 1 -#define MCF548X_IRQ_EPORT_EPF2 2 -#define MCF548X_IRQ_EPORT_EPF3 3 -#define MCF548X_IRQ_EPORT_EPF4 4 -#define MCF548X_IRQ_EPORT_EPF5 5 -#define MCF548X_IRQ_EPORT_EPF6 6 -#define MCF548X_IRQ_EPORT_EPF7 7 -#define MCF548X_IRQ_USB_EP0ISR 15 -#define MCF548X_IRQ_USB_EP1ISR 16 -#define MCF548X_IRQ_USB_EP2ISR 17 -#define MCF548X_IRQ_USB_EP3ISR 18 -#define MCF548X_IRQ_USB_EP4ISR 19 -#define MCF548X_IRQ_USB_EP5ISR 20 -#define MCF548X_IRQ_USB_EP6ISR 21 -#define MCF548X_IRQ_USB_ISR 22 -#define MCF548X_IRQ_USB_AISR 23 -#define MCF548X_IRQ_DSPI_RFOF_TFUF 25 -#define MCF548X_IRQ_DSPI_RFOF 26 -#define MCF548X_IRQ_DSPI_RFDF 27 -#define MCF548X_IRQ_DSPI_TFUF 28 -#define MCF548X_IRQ_DSPI_TCF 29 -#define MCF548X_IRQ_DSPI_TFFF 30 -#define MCF548X_IRQ_DSPI_EOQF 31 -#define MCF548X_IRQ_DSPI 25 -#define MCF548X_IRQ_PSC3 32 -#define MCF548X_IRQ_PSC2 33 -#define MCF548X_IRQ_PSC1 34 -#define MCF548X_IRQ_PSC0 35 -#define MCF548X_IRQ_PSC(i) (35 - (i)) -#define MCF548X_IRQ_COMMTIM 36 -#define MCF548X_IRQ_SEC 37 -#define MCF548X_IRQ_FEC1 38 -#define MCF548X_IRQ_FEC0 39 -#define MCF548X_IRQ_FEC(i) (39 - (i)) -#define MCF548X_IRQ_I2C 40 -#define MCF548X_IRQ_PCIARB 41 -#define MCF548X_IRQ_CBPCI 42 -#define MCF548X_IRQ_XLBPCI 43 -#define MCF548X_IRQ_XLBARB 47 -#define MCF548X_IRQ_DMA 48 -#define MCF548X_IRQ_CAN0_ERROR 49 -#define MCF548X_IRQ_CAN0_BUSOFF 50 -#define MCF548X_IRQ_CAN0_MBOR 51 -#define MCF548X_IRQ_SLT1 53 -#define MCF548X_IRQ_SLT0 54 -#define MCF548X_IRQ_CAN1_ERROR 55 -#define MCF548X_IRQ_CAN1_BUSOFF 56 -#define MCF548X_IRQ_CAN1_MBOR 57 -#define MCF548X_IRQ_GPT3 59 -#define MCF548X_IRQ_GPT2 60 -#define MCF548X_IRQ_GPT1 61 -#define MCF548X_IRQ_GPT0 62 - -#define BSP_INTERRUPT_VECTOR_MIN 1 - -#define BSP_INTERRUPT_VECTOR_MAX 63 - -#endif /* LIBBSP_M68K_MCF548X_IRQ_H */ diff --git a/c/src/lib/libbsp/m68k/genmcf548x/include/tm27.h b/c/src/lib/libbsp/m68k/genmcf548x/include/tm27.h deleted file mode 100644 index 31ea8bca0c..0000000000 --- a/c/src/lib/libbsp/m68k/genmcf548x/include/tm27.h +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @file - * - * @ingroup m68k_genmcf548x - * - * @brief Time Test 27 routines. - */ - -/* - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef _RTEMS_TMTEST27 -#error "This is an RTEMS internal file you must not include directly." -#endif - -#ifndef __tm27_h -#define __tm27_h - -/* - * Stuff for Time Test 27 - * Don't bother with hardware -- just use a software-interrupt - */ - -#define MUST_WAIT_FOR_INTERRUPT 0 - -#define Install_tm27_vector( handler ) set_vector( (handler), 35, 1 ) - -#define Cause_tm27_intr() asm volatile ("trap #3"); - -#define Clear_tm27_intr() /* empty */ - -#define Lower_tm27_intr() /* empty */ - -#endif diff --git a/c/src/lib/libbsp/m68k/genmcf548x/preinstall.am b/c/src/lib/libbsp/m68k/genmcf548x/preinstall.am deleted file mode 100644 index 7308faf0d1..0000000000 --- a/c/src/lib/libbsp/m68k/genmcf548x/preinstall.am +++ /dev/null @@ -1,87 +0,0 @@ -## Automatically generated by ampolish3 - Do not edit - -if AMPOLISH3 -$(srcdir)/preinstall.am: Makefile.am - $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am -endif - -PREINSTALL_DIRS = -DISTCLEANFILES += $(PREINSTALL_DIRS) - -all-am: $(PREINSTALL_FILES) - -PREINSTALL_FILES = -CLEANFILES = $(PREINSTALL_FILES) - -all-local: $(TMPINSTALL_FILES) - -TMPINSTALL_FILES = -CLEANFILES += $(TMPINSTALL_FILES) - -$(PROJECT_LIB)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_LIB) - @: > $(PROJECT_LIB)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp) - -$(PROJECT_INCLUDE)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE) - @: > $(PROJECT_INCLUDE)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp) - -$(PROJECT_INCLUDE)/bsp/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp - @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp) - -$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h - -$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h - -$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h - -$(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h - -$(PROJECT_INCLUDE)/bsp/irq-generic.h: ../../shared/include/irq-generic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-generic.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-generic.h - -$(PROJECT_INCLUDE)/bsp/irq-info.h: ../../shared/include/irq-info.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-info.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-info.h - -$(PROJECT_INCLUDE)/bsp/irq.h: include/irq.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq.h - -$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT) -TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT) - -$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs -PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs - -$(PROJECT_LIB)/linkcmds.m5484FireEngine.flash: startup/linkcmds.m5484FireEngine.flash $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.m5484FireEngine.flash -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.m5484FireEngine.flash - -$(PROJECT_LIB)/linkcmds.COBRA5475: startup/linkcmds.COBRA5475 $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.COBRA5475 -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.COBRA5475 - -$(PROJECT_LIB)/linkcmds.m5484FireEngine: startup/linkcmds.m5484FireEngine $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.m5484FireEngine -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.m5484FireEngine - -$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds -TMPINSTALL_FILES += $(PROJECT_LIB)/linkcmds - diff --git a/c/src/lib/libbsp/m68k/genmcf548x/bsp_specs b/c/src/lib/libbsp/m68k/genmcf548x/startup/bsp_specs index 3a20757667..3a20757667 100644 --- a/c/src/lib/libbsp/m68k/genmcf548x/bsp_specs +++ b/c/src/lib/libbsp/m68k/genmcf548x/startup/bsp_specs diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/Makefile.am b/c/src/lib/libbsp/m68k/mcf5206elite/Makefile.am index 90937076c6..7e0c38902b 100644 --- a/c/src/lib/libbsp/m68k/mcf5206elite/Makefile.am +++ b/c/src/lib/libbsp/m68k/mcf5206elite/Makefile.am @@ -4,23 +4,12 @@ EXTRA_DIST = include $(top_srcdir)/../../../../automake/compile.am include $(top_srcdir)/../../bsp.am -include_bspdir = $(includedir)/bsp +dist_project_lib_DATA = startup/bsp_specs -dist_project_lib_DATA = bsp_specs - -include_HEADERS = include/bsp.h -include_HEADERS += include/tm27.h - -nodist_include_HEADERS = include/bspopts.h -nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h DISTCLEANFILES = include/bspopts.h _SUBDIRS = . tools -include_HEADERS += include/i2c.h -include_HEADERS += include/i2cdrv.h -include_HEADERS += include/ds1307.h -include_HEADERS += include/nvram.h EXTRA_DIST += times @@ -29,8 +18,10 @@ start.$(OBJEXT): start/start.S $(CPPASCOMPILE) -o $@ -c $< project_lib_DATA = start.$(OBJEXT) -dist_project_lib_DATA += startup/linkcmds startup/gdbinit \ - startup/linkcmds.flash +project_lib_DATA += linkcmds +dist_project_lib_DATA += startup/linkcmds.flash + +dist_project_lib_DATA += startup/gdbinit noinst_LIBRARIES = libbsp.a libbsp_a_SOURCES = @@ -64,5 +55,5 @@ libbsp_a_LIBADD = \ ../../../libcpu/@RTEMS_CPU@/mcf5206/timer.rel \ ../../../libcpu/@RTEMS_CPU@/mcf5206/mbus.rel -include $(srcdir)/preinstall.am include $(top_srcdir)/../../../../automake/local.am +include $(srcdir)/../../../../../../bsps/m68k/mcf5206elite/headers.am diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/configure.ac b/c/src/lib/libbsp/m68k/mcf5206elite/configure.ac index 5c46002976..ccb3625138 100644 --- a/c/src/lib/libbsp/m68k/mcf5206elite/configure.ac +++ b/c/src/lib/libbsp/m68k/mcf5206elite/configure.ac @@ -4,6 +4,9 @@ AC_PREREQ([2.69]) AC_INIT([rtems-c-src-lib-libbsp-m68k-mcf5206elite],[_RTEMS_VERSION],[https://devel.rtems.org/newticket]) AC_CONFIG_SRCDIR([make/custom/mcf5206elite.cfg]) RTEMS_TOP(../../../../../..) +RTEMS_SOURCE_TOP +RTEMS_BUILD_TOP +RTEMS_BSP_LINKCMDS RTEMS_CANONICAL_TARGET_CPU AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2]) diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/include/bsp.h b/c/src/lib/libbsp/m68k/mcf5206elite/include/bsp.h deleted file mode 100644 index 47c7e8c745..0000000000 --- a/c/src/lib/libbsp/m68k/mcf5206elite/include/bsp.h +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Board Support Package for MCF5206eLITE evaluation board - * BSP definitions - * - * Copyright (C) 2000 OKTET Ltd., St.-Petersburg, Russia - * Author: Victor V. Vengerov <vvv@oktet.ru> - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef LIBBSP_M68K_MCF5206ELITE_BSP_H -#define LIBBSP_M68K_MCF5206ELITE_BSP_H - -#include "mcf5206/mcf5206e.h" - -/*** Board resources allocation ***/ - -/* - * To achieve some compatibility with dBUG monitor, we use the same - * memory resources allocation as it is used in dBUG. - * - * If this definitions will be changed, change the linker script also. - */ - -/* Memory mapping */ -/* CS0: Boot Flash */ -#define BSP_MEM_ADDR_FLASH (0xFFE00000) -#define BSP_MEM_SIZE_FLASH (1*1024*1024) -#define BSP_MEM_MASK_FLASH (MCF5206E_CSMR_MASK_1M) - -/* CS2: External SRAM */ -#define BSP_MEM_ADDR_ESRAM (0x30000000) -#define BSP_MEM_SIZE_ESRAM (1*1024*1024) -#define BSP_MEM_MASK_ESRAM (MCF5206E_CSMR_MASK_1M) - -/* CS3: General-Purpose I/O register */ -#define BSP_MEM_ADDR_GPIO (0x40000000) -#define BSP_MEM_SIZE_GPIO (64*1024) -#define BSP_MEM_MASK_GPIO (MCF5206E_CSMR_MASK_64K) - -/* DRAM0: Dynamic RAM */ -#define BSP_MEM_ADDR_DRAM (0x00000000) -#define BSP_MEM_SIZE_DRAM (16*1024*1024) -#define BSP_MEM_MASK_DRAM (MCF5206E_DCMR_MASK_16M) - -/* On-chip SRAM */ -#define BSP_MEM_ADDR_SRAM (0x20000000) -#define BSP_MEM_SIZE_SRAM (8*1024) - -/* On-chip peripherial registers */ -#define BSP_MEM_ADDR_IMM (0x10000000) -#define BSP_MEM_SIZE_IMM (1*1024) -#define MBAR BSP_MEM_ADDR_IMM - -/* Interrupt vector assignment */ -#define BSP_INTVEC_AVEC1 (25) -#define BSP_INTLVL_AVEC1 (1) -#define BSP_INTPRIO_AVEC1 (3) - -#define BSP_INTVEC_AVEC2 (26) -#define BSP_INTLVL_AVEC2 (2) -#define BSP_INTPRIO_AVEC2 (3) - -#define BSP_INTVEC_AVEC3 (27) -#define BSP_INTLVL_AVEC3 (3) -#define BSP_INTPRIO_AVEC3 (3) - -#define BSP_INTVEC_AVEC4 (28) -#define BSP_INTLVL_AVEC4 (4) -#define BSP_INTPRIO_AVEC4 (3) - -#define BSP_INTVEC_AVEC5 (29) -#define BSP_INTLVL_AVEC5 (5) -#define BSP_INTPRIO_AVEC5 (3) - -#define BSP_INTVEC_AVEC6 (30) -#define BSP_INTLVL_AVEC6 (6) -#define BSP_INTPRIO_AVEC6 (3) - -#define BSP_INTVEC_AVEC7 (31) -#define BSP_INTLVL_AVEC7 (7) -#define BSP_INTPRIO_AVEC7 (3) - -#define BSP_INTVEC_TIMER1 (BSP_INTVEC_AVEC5) -#define BSP_INTLVL_TIMER1 (BSP_INTLVL_AVEC5) -#define BSP_INTPRIO_TIMER1 (2) - -#define BSP_INTVEC_TIMER2 (BSP_INTVEC_AVEC6) -#define BSP_INTLVL_TIMER2 (BSP_INTLVL_AVEC6) -#define BSP_INTPRIO_TIMER2 (2) - -#define BSP_INTVEC_MBUS (BSP_INTVEC_AVEC4) -#define BSP_INTLVL_MBUS (BSP_INTLVL_AVEC4) -#define BSP_INTPRIO_MBUS (2) - -#define BSP_INTVEC_UART1 (64) -#define BSP_INTLVL_UART1 (4) -#define BSP_INTPRIO_UART1 (0) - -#define BSP_INTVEC_UART2 (65) -#define BSP_INTLVL_UART2 (4) -#define BSP_INTPRIO_UART2 (1) - -#define BSP_INTVEC_DMA0 (66) -#define BSP_INTLVL_DMA0 (3) -#define BSP_INTPRIO_DMA0 (1) - -#define BSP_INTVEC_DMA1 (67) -#define BSP_INTLVL_DMA1 (3) -#define BSP_INTPRIO_DMA1 (2) - -/* Location of DS1307 Real-Time Clock/NVRAM chip */ -#define DS1307_I2C_BUS_NUMBER (0) - -#ifndef ASM - -#include <bspopts.h> -#include <rtems.h> -#include <bsp/default-initial-extension.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/* System frequency */ -#define BSP_SYSTEM_FREQUENCY ((unsigned int)&_SYS_CLOCK_FREQUENCY) -extern char _SYS_CLOCK_FREQUENCY; /* Don't use this variable directly!!! */ - -/* MBUS I2C bus clock default frequency */ -#define BSP_MBUS_FREQUENCY (16000) - -/* Number of I2C buses supported in this board */ -#define I2C_NUMBER_OF_BUSES (1) - -/* I2C bus selection */ -#define I2C_SELECT_BUS(bus) - -/* - * Simple spin delay in microsecond units for device drivers. - * This is very dependent on the clock speed of the target. - */ - -#define rtems_bsp_delay( microseconds ) \ - { register uint32_t _delay=(microseconds); \ - register uint32_t _tmp=123; \ - __asm__ volatile( "0: \ - nbcd %0 ; \ - nbcd %0 ; \ - dbf %1,0b" \ - : "=d" (_tmp), "=d" (_delay) \ - : "0" (_tmp), "1" (_delay) ); \ - } - - -extern rtems_isr_entry M68Kvec[]; /* vector table address */ - -extern rtems_isr (*rtems_clock_hook)(rtems_vector_number); - -/* functions */ - -rtems_isr_entry set_vector( - rtems_isr_entry handler, - rtems_vector_number vector, - int type -); - -/* - * Prototypes for BSP methods that cross file boundaries - */ -void Init5206e(void); - -#ifdef __cplusplus -} -#endif - -#endif /* ASM */ - -#endif diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/include/ds1307.h b/c/src/lib/libbsp/m68k/mcf5206elite/include/ds1307.h deleted file mode 100644 index 8e5636a0c8..0000000000 --- a/c/src/lib/libbsp/m68k/mcf5206elite/include/ds1307.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This file contains the definitions for Dallas Semiconductor - * DS1307/DS1308 serial real-time clock/NVRAM. - * - * Copyright (C) 2000 OKTET Ltd., St.-Petersburg, Russia - * Author: Victor V. Vengerov <vvv@oktet.ru> - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef __RTC_DS1307__ -#define __RTC_DS1307__ - -#define DS1307_I2C_ADDRESS (0xD0) /* I2C bus address assigned to DS1307 */ - -#define DS1307_SECOND (0x00) -#define DS1307_SECOND_HALT (0x80) /* High bit is a Clock Halt bit */ -#define DS1307_MINUTE (0x01) -#define DS1307_HOUR (0x02) -#define DS1307_HOUR_12 (0x40) /* 12-hour mode */ -#define DS1307_HOUR_PM (0x20) /* PM in 12-hour mode */ -#define DS1307_DAY_OF_WEEK (0x03) -#define DS1307_DAY (0x04) -#define DS1307_MONTH (0x05) -#define DS1307_YEAR (0x06) -#define DS1307_CONTROL (0x07) -#define DS1307_CONTROL_OUT (0x80) /* Output control */ -#define DS1307_CONTROL_SQWE (0x10) /* Sqware Wave Enable */ -#define DS1307_CONTROL_RS_1 (0x00) /* Rate select: 1 Hz */ -#define DS1307_CONTROL_RS_4096 (0x01) /* Rate select: 4096 Hz */ -#define DS1307_CONTROL_RS_8192 (0x02) /* Rate select: 8192 Hz */ -#define DS1307_CONTROL_RS_32768 (0x03) /* Rate select; 32768 Hz */ - -#define DS1307_NVRAM_START (0x08) /* Start location of non-volatile memory */ -#define DS1307_NVRAM_END (0x3F) /* End location of non-volatile memory */ -#define DS1307_NVRAM_SIZE (56) /* Size of non-volatile memory */ - -#endif __RTC_DS1307__ diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/include/i2c.h b/c/src/lib/libbsp/m68k/mcf5206elite/include/i2c.h deleted file mode 100644 index 8bec067a3a..0000000000 --- a/c/src/lib/libbsp/m68k/mcf5206elite/include/i2c.h +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Generic I2C bus interface for RTEMS - * - * Copyright (C) 2000 OKTET Ltd., St.-Petersburg, Russia - * Author: Victor V. Vengerov <vvv@oktet.ru> - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef __RTEMS__I2C_H__ -#define __RTEMS__I2C_H__ - -#include <rtems.h> -#include <bsp.h> -/* This header file define the generic interface to i2c buses available in - * system. This interface may be used by user applications or i2c-device - * drivers (like RTC, NVRAM, etc). - * - * Functions i2c_initialize and i2c_transfer declared in this header usually - * implemented in particular board support package. Usually this - * implementation is a simple wrapper or multiplexor to I2C controller - * driver which is available in system. It may be generic "software - * controller" I2C driver which control SDA and SCL signals directly (if SDA - * and SCL is general-purpose I/O pins), or driver for hardware I2C - * controller (standalone or integrated with processors: MBus controller in - * ColdFire processors, I2C controller in PowerQUICC and so on). - * - * i2c_transfer is a very generic low-level function. Higher-level function - * i2c_write, i2c_read, i2c_wrrd, i2c_wbrd is defined here too. - */ - -/* I2C Bus Number type */ -typedef uint32_t i2c_bus_number; - -/* I2C device address */ -typedef uint16_t i2c_address; - -/* I2C error codes generated during message transfer */ -typedef enum i2c_message_status { - I2C_SUCCESSFUL = 0, - I2C_TIMEOUT, - I2C_NO_DEVICE, - I2C_ARBITRATION_LOST, - I2C_NO_ACKNOWLEDGE, - I2C_NO_DATA, - I2C_RESOURCE_NOT_AVAILABLE -} i2c_message_status; - -/* I2C Message */ -typedef struct i2c_message { - i2c_address addr; /* I2C slave device address */ - uint16_t flags; /* message flags (see below) */ - i2c_message_status status; /* message transfer status code */ - uint16_t len; /* Number of bytes to read or write */ - uint8_t *buf; /* pointer to data array */ -} i2c_message; - -/* I2C message flag */ -#define I2C_MSG_ADDR_10 (0x01) /* 10-bit address */ -#define I2C_MSG_WR (0x02) /* transfer direction for this message - from master to slave */ -#define I2C_MSG_ERRSKIP (0x04) /* Skip message if last transfered message - is failed */ -/* Type for function which is called when transfer over I2C bus is finished */ -typedef void (*i2c_transfer_done) (void *arg); - -/* i2c_initialize -- - * I2C driver initialization. This function usually called on device - * driver initialization state, before initialization task. All I2C - * buses are initialized; reasonable slow data transfer rate is - * selected for each bus. - * - * PARAMETERS: - * major - I2C device major number - * minor - I2C device minor number - * arg - RTEMS driver initialization argument - * - * RETURNS: - * RTEMS status code - */ -rtems_device_driver -i2c_initialize(rtems_device_major_number major, - rtems_device_minor_number minor, - void *arg); - -/* i2c_select_clock_rate -- - * select I2C bus clock rate for specified bus. Some bus controller do not - * allow to select arbitrary clock rate; in this case nearest possible - * slower clock rate is selected. - * - * PARAMETERS: - * bus - I2C bus number - * bps - data transfer rate for this bytes in bits per second - * - * RETURNS: - * RTEMS_SUCCESSFUL, if operation performed successfully, - * RTEMS_INVALID_NUMBER, if wrong bus number is specified, - * RTEMS_UNSATISFIED, if bus do not support data transfer rate selection - * or specified data transfer rate could not be used. - */ -rtems_status_code -i2c_select_clock_rate(i2c_bus_number bus, int bps); - -/* i2c_transfer -- - * Initiate multiple-messages transfer over specified I2C bus or - * put request into queue if bus or some other resource is busy. (This - * is non-blocking function). - * - * PARAMETERS: - * bus - I2C bus number - * nmsg - number of messages - * msg - pointer to messages array - * done - function which is called when transfer is finished - * done_arg_ptr - arbitrary argument ptr passed to done funciton - * - * RETURNS: - * RTEMS_SUCCESSFUL if transfer initiated successfully, or error - * code if something failed. - */ -rtems_status_code -i2c_transfer(i2c_bus_number bus, int nmsg, i2c_message *msg, - i2c_transfer_done done, void * done_arg_ptr); - -/* i2c_transfer_wait -- - * Initiate I2C bus transfer and block until this transfer will be - * finished. This function wait the semaphore if system in - * SYSTEM_STATE_UP state, or poll done flag in other states. - * - * PARAMETERS: - * bus - I2C bus number - * msg - pointer to transfer messages array - * nmsg - number of messages in transfer - * - * RETURNS: - * I2C_SUCCESSFUL, if transfer finished successfully, - * I2C_RESOURCE_NOT_AVAILABLE, if semaphore operations has failed, - * value of status field of first error-finished message in transfer, - * if something wrong. - */ -i2c_message_status -i2c_transfer_wait(i2c_bus_number bus, i2c_message *msg, int nmsg); - -/* i2c_poll -- - * Poll I2C bus controller for events and hanle it. This function is - * used when I2C driver operates in poll-driven mode. - * - * PARAMETERS: - * bus - bus number to be polled - * - * RETURNS: - * none - */ -void -i2c_poll(i2c_bus_number bus); - -/* i2c_write -- - * Send single message over specified I2C bus to addressed device and - * wait while transfer is finished. - * - * PARAMETERS: - * bus - I2C bus number - * addr - address of I2C device - * buf - data to be sent to device - * size - data buffer size - * - * RETURNS: - * transfer status - */ -i2c_message_status -i2c_write(i2c_bus_number bus, i2c_address addr, void *buf, int size); - -/* i2c_wrbyte -- - * Send single one-byte long message over specified I2C bus to - * addressed device and wait while transfer is finished. - * - * PARAMETERS: - * bus - I2C bus number - * addr - address of I2C device - * cmd - byte message to be sent to device - * - * RETURNS: - * transfer status - */ -i2c_message_status -i2c_wrbyte(i2c_bus_number bus, i2c_address addr, uint8_t cmd); - -/* i2c_read -- - * receive single message over specified I2C bus from addressed device. - * This call will wait while transfer is finished. - * - * PARAMETERS: - * bus - I2C bus number - * addr - address of I2C device - * buf - buffer for received message - * size - receive buffer size - * - * RETURNS: - * transfer status - */ -i2c_message_status -i2c_read(i2c_bus_number bus, i2c_address addr, void *buf, int size); - -/* i2c_wrrd -- - * Send message over I2C bus to specified device and receive message - * from the same device during single transfer. - * - * PARAMETERS: - * bus - I2C bus number - * addr - address of I2C device - * bufw - data to be sent to device - * sizew - send data buffer size - * bufr - buffer for received message - * sizer - receive buffer size - * - * RETURNS: - * transfer status - */ -i2c_message_status -i2c_wrrd(i2c_bus_number bus, i2c_address addr, void *bufw, int sizew, - void *bufr, int sizer); - -/* i2c_wbrd -- - * Send one-byte message over I2C bus to specified device and receive - * message from the same device during single transfer. - * - * PARAMETERS: - * bus - I2C bus number - * addr - address of I2C device - * cmd - one-byte message to be sent over I2C bus - * bufr - buffer for received message - * sizer - receive buffer size - * - * RETURNS: - * transfer status - */ -i2c_message_status -i2c_wbrd(i2c_bus_number bus, i2c_address addr, uint8_t cmd, - void *bufr, int sizer); - -#endif diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/include/i2cdrv.h b/c/src/lib/libbsp/m68k/mcf5206elite/include/i2cdrv.h deleted file mode 100644 index 4b4a1ec141..0000000000 --- a/c/src/lib/libbsp/m68k/mcf5206elite/include/i2cdrv.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * i2cdrv.h -- I2C bus driver prototype and definitions - * - * Copyright (C) 2000 OKTET Ltd., St.-Petersburg, Russia - * Author: Victor V. Vengerov <vvv@oktet.ru> - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef __I2CDRV_H__ -#define __I2CDRV_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -#define I2C_DRIVER_TABLE_ENTRY \ - { i2cdrv_initialize, NULL, NULL, NULL, NULL, NULL } - -/* i2cdrv_initialize -- - * I2C driver initialization (rtems I/O driver primitive) - */ -rtems_device_driver -i2cdrv_initialize(rtems_device_major_number major, - rtems_device_minor_number minor, - void *arg); - -#ifdef __cplusplus -} -#endif - -#endif /* __I2CDRV_H__ */ diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/include/nvram.h b/c/src/lib/libbsp/m68k/mcf5206elite/include/nvram.h deleted file mode 100644 index fd75db2363..0000000000 --- a/c/src/lib/libbsp/m68k/mcf5206elite/include/nvram.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * nvram.h -- DS1307-based non-volatile memory device driver. - * - * This driver support file-like operations to 56-bytes long non-volatile - * memory of DS1307 I2C real-time clock chip. - * - * Copyright (C) 2000 OKTET Ltd., St.-Petersburg, Russia - * Author: Victor V. Vengerov <vvv@oktet.ru> - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef __DRIVER__NVRAM_H__ -#define __DRIVER__NVRAM_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -#define NVRAM_DRIVER_TABLE_ENTRY \ - { nvram_driver_initialize, nvram_driver_open, nvram_driver_close, \ - nvram_driver_read, nvram_driver_write, NULL } - -/* nvram_driver_initialize -- - * Non-volatile memory device driver initialization. - */ -rtems_device_driver -nvram_driver_initialize(rtems_device_major_number major, - rtems_device_minor_number minor, - void *arg); - -/* nvram_driver_open -- - * Non-volatile memory device driver open primitive. - */ -rtems_device_driver -nvram_driver_open(rtems_device_major_number major, - rtems_device_minor_number minor, - void *arg); - -/* nvram_driver_close -- - * Non-volatile memory device driver close primitive. - */ -rtems_device_driver -nvram_driver_close(rtems_device_major_number major, - rtems_device_minor_number minor, - void *arg); - -/* nvram_driver_read -- - * Non-volatile memory device driver read primitive. - */ -rtems_device_driver -nvram_driver_read(rtems_device_major_number major, - rtems_device_minor_number minor, - void *arg); - -/* nvram_driver_write -- - * Non-volatile memory device driver write primitive. - */ -rtems_device_driver -nvram_driver_write(rtems_device_major_number major, - rtems_device_minor_number minor, - void *arg); - -#ifdef __cplusplus -} -#endif - -#endif /* __VFDDRV_H__ */ diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/include/tm27.h b/c/src/lib/libbsp/m68k/mcf5206elite/include/tm27.h deleted file mode 100644 index 2abef68311..0000000000 --- a/c/src/lib/libbsp/m68k/mcf5206elite/include/tm27.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * @file - * @ingroup m68k_mcf5206elite - * @brief Implementations for interrupt mechanisms for Time Test 27 - */ - -/* - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef _RTEMS_TMTEST27 -#error "This is an RTEMS internal file you must not include directly." -#endif - -#ifndef __tm27_h -#define __tm27_h - -/* - * Stuff for Time Test 27 - * Don't bother with hardware -- just use a software-interrupt - */ - -#define MUST_WAIT_FOR_INTERRUPT 0 - -#define Install_tm27_vector( handler ) set_vector( (handler), 34, 1 ) - -#define Cause_tm27_intr() asm volatile ("trap #2"); - -#define Clear_tm27_intr() /* empty */ - -#define Lower_tm27_intr() /* empty */ - -#endif diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/preinstall.am b/c/src/lib/libbsp/m68k/mcf5206elite/preinstall.am deleted file mode 100644 index c08f87dd0a..0000000000 --- a/c/src/lib/libbsp/m68k/mcf5206elite/preinstall.am +++ /dev/null @@ -1,87 +0,0 @@ -## Automatically generated by ampolish3 - Do not edit - -if AMPOLISH3 -$(srcdir)/preinstall.am: Makefile.am - $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am -endif - -PREINSTALL_DIRS = -DISTCLEANFILES += $(PREINSTALL_DIRS) - -all-am: $(PREINSTALL_FILES) - -PREINSTALL_FILES = -CLEANFILES = $(PREINSTALL_FILES) - -all-local: $(TMPINSTALL_FILES) - -TMPINSTALL_FILES = -CLEANFILES += $(TMPINSTALL_FILES) - -$(PROJECT_LIB)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_LIB) - @: > $(PROJECT_LIB)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp) - -$(PROJECT_INCLUDE)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE) - @: > $(PROJECT_INCLUDE)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp) - -$(PROJECT_INCLUDE)/bsp/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp - @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp) - -$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs -PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs - -$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h - -$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h - -$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h - -$(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h - -$(PROJECT_INCLUDE)/i2c.h: include/i2c.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/i2c.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/i2c.h - -$(PROJECT_INCLUDE)/i2cdrv.h: include/i2cdrv.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/i2cdrv.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/i2cdrv.h - -$(PROJECT_INCLUDE)/ds1307.h: include/ds1307.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/ds1307.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/ds1307.h - -$(PROJECT_INCLUDE)/nvram.h: include/nvram.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/nvram.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/nvram.h - -$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT) -TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT) - -$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds - -$(PROJECT_LIB)/gdbinit: startup/gdbinit $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/gdbinit -PREINSTALL_FILES += $(PROJECT_LIB)/gdbinit - -$(PROJECT_LIB)/linkcmds.flash: startup/linkcmds.flash $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.flash -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.flash - diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/bsp_specs b/c/src/lib/libbsp/m68k/mcf5206elite/startup/bsp_specs index 87638cc027..87638cc027 100644 --- a/c/src/lib/libbsp/m68k/mcf5206elite/bsp_specs +++ b/c/src/lib/libbsp/m68k/mcf5206elite/startup/bsp_specs diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/tools/configure.ac b/c/src/lib/libbsp/m68k/mcf5206elite/tools/configure.ac index 39e9682157..c2654a5ca9 100644 --- a/c/src/lib/libbsp/m68k/mcf5206elite/tools/configure.ac +++ b/c/src/lib/libbsp/m68k/mcf5206elite/tools/configure.ac @@ -4,6 +4,8 @@ AC_PREREQ([2.69]) AC_INIT([rtems-c-src-lib-libbsp-m68k-mcf5206elite-tools],[_RTEMS_VERSION],[https://devel.rtems.org/newticket]) AC_CONFIG_SRCDIR([runtest]) RTEMS_TOP(../../../../../../..) +RTEMS_SOURCE_TOP +RTEMS_BUILD_TOP AM_INIT_AUTOMAKE([no-define foreign 1.12.2]) AM_MAINTAINER_MODE diff --git a/c/src/lib/libbsp/m68k/mcf52235/Makefile.am b/c/src/lib/libbsp/m68k/mcf52235/Makefile.am index e1e840966e..5c51afeb58 100644 --- a/c/src/lib/libbsp/m68k/mcf52235/Makefile.am +++ b/c/src/lib/libbsp/m68k/mcf52235/Makefile.am @@ -4,15 +4,8 @@ EXTRA_DIST = include $(top_srcdir)/../../../../automake/compile.am include $(top_srcdir)/../../bsp.am -include_bspdir = $(includedir)/bsp +dist_project_lib_DATA = startup/bsp_specs -dist_project_lib_DATA = bsp_specs - -include_HEADERS = include/bsp.h -include_HEADERS += include/tm27.h - -nodist_include_HEADERS = include/bspopts.h -nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h DISTCLEANFILES = include/bspopts.h noinst_PROGRAMS = @@ -22,7 +15,7 @@ start.$(OBJEXT): start/start.S $(CPPASCOMPILE) -o $@ -c $< project_lib_DATA = start.$(OBJEXT) -dist_project_lib_DATA += startup/linkcmds +project_lib_DATA += linkcmds noinst_LIBRARIES = libbsp.a libbsp_a_SOURCES = @@ -50,5 +43,5 @@ libbsp_a_LIBADD = \ ../../../libcpu/@RTEMS_CPU@/mcf5223x/cachepd.rel \ ../../../libcpu/@RTEMS_CPU@/shared/misc.rel -include $(srcdir)/preinstall.am include $(top_srcdir)/../../../../automake/local.am +include $(srcdir)/../../../../../../bsps/m68k/mcf52235/headers.am diff --git a/c/src/lib/libbsp/m68k/mcf52235/configure.ac b/c/src/lib/libbsp/m68k/mcf52235/configure.ac index 3054b0d441..da0b172536 100644 --- a/c/src/lib/libbsp/m68k/mcf52235/configure.ac +++ b/c/src/lib/libbsp/m68k/mcf52235/configure.ac @@ -4,6 +4,9 @@ AC_PREREQ([2.69]) AC_INIT([rtems-c-src-lib-libbsp-m68k-mcf52235],[_RTEMS_VERSION],[https://devel.rtems.org/newticket]) AC_CONFIG_SRCDIR([make/custom/mcf52235.cfg]) RTEMS_TOP(../../../../../..) +RTEMS_SOURCE_TOP +RTEMS_BUILD_TOP +RTEMS_BSP_LINKCMDS RTEMS_CANONICAL_TARGET_CPU AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2]) diff --git a/c/src/lib/libbsp/m68k/mcf52235/include/bsp.h b/c/src/lib/libbsp/m68k/mcf52235/include/bsp.h deleted file mode 100644 index ef3b928a24..0000000000 --- a/c/src/lib/libbsp/m68k/mcf52235/include/bsp.h +++ /dev/null @@ -1,87 +0,0 @@ -/** - * @file - * - * @ingroup m68k_mcf52235 - * - * @brief Global BSP definitions - */ - -/* - * mcf52235 BSP header file - */ - -#ifndef LIBBSP_M68K_MCF52235_BSP_H -#define LIBBSP_M68K_MCF52235_BSP_H - -#include <bspopts.h> -#include <bsp/default-initial-extension.h> -#include <rtems.h> -#include <rtems/bspIo.h> - -/***************************************************************************/ -/** Hardware data structure headers **/ -#include <mcf5223x/mcf5223x.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/* Declare base address of peripherals area */ -#define __IPSBAR ((vuint8 *) 0x40000000) - -/***************************************************************************/ -/** Network driver configuration **/ - -/***************************************************************************/ -/** User Definable configuration **/ - -/* define which port the console should use - all other ports are then defined as general purpose */ -#define CONSOLE_PORT 0 - -/* externals */ - -/* constants */ - -/* functions */ - -uint32_t bsp_get_CPU_clock_speed(void); - -rtems_isr_entry set_vector( - rtems_isr_entry handler, - rtems_vector_number vector, - int type -); - -/* - * Interrupt assignments - * Highest-priority listed first - */ - -#define PIT3_IRQ_LEVEL 4 -#define PIT3_IRQ_PRIORITY 0 - -#define UART0_IRQ_LEVEL 3 -#define UART0_IRQ_PRIORITY 7 -#define UART1_IRQ_LEVEL 3 -#define UART1_IRQ_PRIORITY 6 -#define UART2_IRQ_LEVEL 3 -#define UART2_IRQ_PRIORITY 5 - -/* - * Prototypes for BSP methods which cross file boundaries - */ -void Init52235(void); - -#ifdef __cplusplus -} -#endif - -#endif - -/** - * @defgroup m68k_mcf52235 MCF52235 Support - * - * @ingroup bsp_m68k - * - * @brief MCF52235 Support Package - */ diff --git a/c/src/lib/libbsp/m68k/mcf52235/include/tm27.h b/c/src/lib/libbsp/m68k/mcf52235/include/tm27.h deleted file mode 100644 index b4b62ef721..0000000000 --- a/c/src/lib/libbsp/m68k/mcf52235/include/tm27.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * @file - * @ingroup m68k_mcf52235 - * @brief Implementations for interrupt mechanisms for Time Test 27 - */ - -/* - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef _RTEMS_TMTEST27 -#error "This is an RTEMS internal file you must not include directly." -#endif - -#ifndef __tm27_h -#define __tm27_h - -/* - * Stuff for Time Test 27 - * Don't bother with hardware -- just use a software-interrupt - */ - -#define MUST_WAIT_FOR_INTERRUPT 0 - -#define Install_tm27_vector( handler ) set_vector( (handler), 35, 1 ) - -#define Cause_tm27_intr() asm volatile ("trap #3"); - -#define Clear_tm27_intr() /* empty */ - -#define Lower_tm27_intr() /* empty */ - -#endif diff --git a/c/src/lib/libbsp/m68k/mcf52235/preinstall.am b/c/src/lib/libbsp/m68k/mcf52235/preinstall.am deleted file mode 100644 index 0bdb6554d6..0000000000 --- a/c/src/lib/libbsp/m68k/mcf52235/preinstall.am +++ /dev/null @@ -1,63 +0,0 @@ -## Automatically generated by ampolish3 - Do not edit - -if AMPOLISH3 -$(srcdir)/preinstall.am: Makefile.am - $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am -endif - -PREINSTALL_DIRS = -DISTCLEANFILES += $(PREINSTALL_DIRS) - -all-am: $(PREINSTALL_FILES) - -PREINSTALL_FILES = -CLEANFILES = $(PREINSTALL_FILES) - -all-local: $(TMPINSTALL_FILES) - -TMPINSTALL_FILES = -CLEANFILES += $(TMPINSTALL_FILES) - -$(PROJECT_LIB)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_LIB) - @: > $(PROJECT_LIB)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp) - -$(PROJECT_INCLUDE)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE) - @: > $(PROJECT_INCLUDE)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp) - -$(PROJECT_INCLUDE)/bsp/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp - @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp) - -$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs -PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs - -$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h - -$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h - -$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h - -$(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h - -$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT) -TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT) - -$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds - diff --git a/c/src/lib/libbsp/m68k/mcf52235/bsp_specs b/c/src/lib/libbsp/m68k/mcf52235/startup/bsp_specs index 3a20757667..3a20757667 100644 --- a/c/src/lib/libbsp/m68k/mcf52235/bsp_specs +++ b/c/src/lib/libbsp/m68k/mcf52235/startup/bsp_specs diff --git a/c/src/lib/libbsp/m68k/mcf5225x/Makefile.am b/c/src/lib/libbsp/m68k/mcf5225x/Makefile.am index e753379b41..b33adc2ef0 100644 --- a/c/src/lib/libbsp/m68k/mcf5225x/Makefile.am +++ b/c/src/lib/libbsp/m68k/mcf5225x/Makefile.am @@ -4,15 +4,8 @@ EXTRA_DIST = include $(top_srcdir)/../../../../automake/compile.am include $(top_srcdir)/../../bsp.am -include_bspdir = $(includedir)/bsp +dist_project_lib_DATA = startup/bsp_specs -dist_project_lib_DATA = bsp_specs - -include_HEADERS = include/bsp.h -include_HEADERS += include/tm27.h - -nodist_include_HEADERS = include/bspopts.h -nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h DISTCLEANFILES = include/bspopts.h noinst_PROGRAMS = @@ -22,7 +15,7 @@ start.$(OBJEXT): start/start.S $(CPPASCOMPILE) -o $@ -c $< project_lib_DATA = start.$(OBJEXT) -dist_project_lib_DATA += startup/linkcmds +project_lib_DATA += linkcmds noinst_LIBRARIES = libbsp.a libbsp_a_SOURCES = \ @@ -45,5 +38,5 @@ libbsp_a_LIBADD = \ ../../../libcpu/@RTEMS_CPU@/mcf5225x/cachepd.rel \ ../../../libcpu/@RTEMS_CPU@/shared/misc.rel -include $(srcdir)/preinstall.am include $(top_srcdir)/../../../../automake/local.am +include $(srcdir)/../../../../../../bsps/m68k/mcf5225x/headers.am diff --git a/c/src/lib/libbsp/m68k/mcf5225x/configure.ac b/c/src/lib/libbsp/m68k/mcf5225x/configure.ac index 4a7371fd87..fab934b3f5 100644 --- a/c/src/lib/libbsp/m68k/mcf5225x/configure.ac +++ b/c/src/lib/libbsp/m68k/mcf5225x/configure.ac @@ -4,6 +4,9 @@ AC_PREREQ([2.69]) AC_INIT([rtems-c-src-lib-libbsp-m68k-dpu],[_RTEMS_VERSION],[https://devel.rtems.org/newticket]) AC_CONFIG_SRCDIR([make/custom/mcf5225x.cfg]) RTEMS_TOP(../../../../../..) +RTEMS_SOURCE_TOP +RTEMS_BUILD_TOP +RTEMS_BSP_LINKCMDS RTEMS_CANONICAL_TARGET_CPU AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2]) diff --git a/c/src/lib/libbsp/m68k/mcf5225x/include/bsp.h b/c/src/lib/libbsp/m68k/mcf5225x/include/bsp.h deleted file mode 100644 index 8b8d40f485..0000000000 --- a/c/src/lib/libbsp/m68k/mcf5225x/include/bsp.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef LIBBSP_M68K_MCF5225X_BSP_H -#define LIBBSP_M68K_MCF5225X_BSP_H - -#include <bspopts.h> -#include <bsp/default-initial-extension.h> -#include <rtems.h> -#include <rtems/bspIo.h> - -/***************************************************************************/ -/** Hardware data structure headers **/ -#include <mcf5225x/mcf5225x.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/* Declare base address of peripherals area */ -#define __IPSBAR ((vuint8 *) 0x40000000) - -/***************************************************************************/ -/** Network driver configuration **/ - -/***************************************************************************/ -/** User Definable configuration **/ - -/* define ports for console and DPU specific for BLUETOOTH and STATIONS */ -#define STATIONS_PORT 0 -#define CONSOLE_PORT 1 -#define BLUETOOTH_PORT 2 - -/* externals */ - -/* constants */ - -/* miscellaneous stuff assumed to exist */ - -/* - * Device Driver Table Entries - */ - -/* - * NOTE: Use the standard Console driver entry - */ - -/* - * NOTE: Use the standard Clock driver entry - */ - - -/* functions */ - -uint32_t bsp_get_CPU_clock_speed(void); - -rtems_isr_entry set_vector( - rtems_isr_entry handler, - rtems_vector_number vector, - int type -); - -/* - * Interrupt assignments - * Highest-priority listed first - */ - -#define PIT3_IRQ_LEVEL 4 -#define PIT3_IRQ_PRIORITY 0 - -#define UART0_IRQ_LEVEL 3 -#define UART0_IRQ_PRIORITY 7 -#define UART1_IRQ_LEVEL 3 -#define UART1_IRQ_PRIORITY 6 -#define UART2_IRQ_LEVEL 3 -#define UART2_IRQ_PRIORITY 5 - -/* - * Prototypes for BSP methods which cross file boundaries - */ -void Init5225x(void); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/c/src/lib/libbsp/m68k/mcf5225x/include/tm27.h b/c/src/lib/libbsp/m68k/mcf5225x/include/tm27.h deleted file mode 100644 index fcf1c4f8aa..0000000000 --- a/c/src/lib/libbsp/m68k/mcf5225x/include/tm27.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * @file - * @ingroup m68k_mcf5225x - * @brief Implementations for interrupt mechanisms for Time Test 27 - */ - -/* - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef _RTEMS_TMTEST27 -#error "This is an RTEMS internal file you must not include directly." -#endif - -#ifndef __tm27_h -#define __tm27_h - -/* - * Stuff for Time Test 27 - * Don't bother with hardware -- just use a software-interrupt - */ - -#define MUST_WAIT_FOR_INTERRUPT 0 - -#define Install_tm27_vector( handler ) set_vector( (handler), 35, 1 ) - -#define Cause_tm27_intr() asm volatile ("trap #3"); - -#define Clear_tm27_intr() /* empty */ - -#define Lower_tm27_intr() /* empty */ - -#endif diff --git a/c/src/lib/libbsp/m68k/mcf5225x/preinstall.am b/c/src/lib/libbsp/m68k/mcf5225x/preinstall.am deleted file mode 100644 index 0bdb6554d6..0000000000 --- a/c/src/lib/libbsp/m68k/mcf5225x/preinstall.am +++ /dev/null @@ -1,63 +0,0 @@ -## Automatically generated by ampolish3 - Do not edit - -if AMPOLISH3 -$(srcdir)/preinstall.am: Makefile.am - $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am -endif - -PREINSTALL_DIRS = -DISTCLEANFILES += $(PREINSTALL_DIRS) - -all-am: $(PREINSTALL_FILES) - -PREINSTALL_FILES = -CLEANFILES = $(PREINSTALL_FILES) - -all-local: $(TMPINSTALL_FILES) - -TMPINSTALL_FILES = -CLEANFILES += $(TMPINSTALL_FILES) - -$(PROJECT_LIB)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_LIB) - @: > $(PROJECT_LIB)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp) - -$(PROJECT_INCLUDE)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE) - @: > $(PROJECT_INCLUDE)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp) - -$(PROJECT_INCLUDE)/bsp/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp - @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp) - -$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs -PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs - -$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h - -$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h - -$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h - -$(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h - -$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT) -TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT) - -$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds - diff --git a/c/src/lib/libbsp/m68k/mcf5225x/bsp_specs b/c/src/lib/libbsp/m68k/mcf5225x/startup/bsp_specs index 3a20757667..3a20757667 100644 --- a/c/src/lib/libbsp/m68k/mcf5225x/bsp_specs +++ b/c/src/lib/libbsp/m68k/mcf5225x/startup/bsp_specs diff --git a/c/src/lib/libbsp/m68k/mcf5235/Makefile.am b/c/src/lib/libbsp/m68k/mcf5235/Makefile.am index 95de41ccb1..8a9027883a 100644 --- a/c/src/lib/libbsp/m68k/mcf5235/Makefile.am +++ b/c/src/lib/libbsp/m68k/mcf5235/Makefile.am @@ -4,26 +4,21 @@ EXTRA_DIST = include $(top_srcdir)/../../../../automake/compile.am include $(top_srcdir)/../../bsp.am -include_bspdir = $(includedir)/bsp +dist_project_lib_DATA = startup/bsp_specs -dist_project_lib_DATA = bsp_specs - -include_HEADERS = include/bsp.h -include_HEADERS += include/tm27.h - -nodist_include_HEADERS = include/bspopts.h -nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h DISTCLEANFILES = include/bspopts.h noinst_PROGRAMS = -dist_project_lib_DATA += startup/linkcmds startup/linkcmdsflash \ - startup/linkcmdsram - EXTRA_DIST += start/start.S start.$(OBJEXT): start/start.S $(CPPASCOMPILE) -o $@ -c $< project_lib_DATA = start.$(OBJEXT) +project_lib_DATA += linkcmds +dist_project_lib_DATA += startup/linkcmds +dist_project_lib_DATA += startup/linkcmdsflash +dist_project_lib_DATA += startup/linkcmdsram + noinst_LIBRARIES = libbsp.a libbsp_a_SOURCES = @@ -60,5 +55,5 @@ if HAS_NETWORKING libbsp_a_LIBADD += network.rel endif -include $(srcdir)/preinstall.am include $(top_srcdir)/../../../../automake/local.am +include $(srcdir)/../../../../../../bsps/m68k/mcf5235/headers.am diff --git a/c/src/lib/libbsp/m68k/mcf5235/configure.ac b/c/src/lib/libbsp/m68k/mcf5235/configure.ac index 82df518466..07838cd677 100644 --- a/c/src/lib/libbsp/m68k/mcf5235/configure.ac +++ b/c/src/lib/libbsp/m68k/mcf5235/configure.ac @@ -4,6 +4,9 @@ AC_PREREQ([2.69]) AC_INIT([rtems-c-src-lib-libbsp-m68k-mcf5235],[_RTEMS_VERSION],[https://devel.rtems.org/newticket]) AC_CONFIG_SRCDIR([make/custom/mcf5235.cfg]) RTEMS_TOP(../../../../../..) +RTEMS_SOURCE_TOP +RTEMS_BUILD_TOP +RTEMS_BSP_LINKCMDS RTEMS_CANONICAL_TARGET_CPU AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2]) diff --git a/c/src/lib/libbsp/m68k/mcf5235/include/bsp.h b/c/src/lib/libbsp/m68k/mcf5235/include/bsp.h deleted file mode 100644 index 14a6b04034..0000000000 --- a/c/src/lib/libbsp/m68k/mcf5235/include/bsp.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * mcf5235 BSP header file - */ - -#ifndef LIBBSP_M68K_MCF5235_BSP_H -#define LIBBSP_M68K_MCF5235_BSP_H - -#include <bspopts.h> -#include <bsp/default-initial-extension.h> -#include <rtems.h> -#include <rtems/bspIo.h> - -/***************************************************************************/ -/** Hardware data structure headers **/ -#include <mcf5235/mcf5235.h> /* internal MCF5235 modules */ - -#ifdef __cplusplus -extern "C" { -#endif - -/***************************************************************************/ -/** Network driver configuration **/ -struct rtems_bsdnet_ifconfig; -extern int rtems_fec_driver_attach (struct rtems_bsdnet_ifconfig *config, int attaching ); -#define RTEMS_BSP_NETWORK_DRIVER_NAME "fec0" -#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_fec_driver_attach - -/***************************************************************************/ -/** User Definable configuration **/ - -/* define which port the console should use - all other ports are then defined as general purpose */ -#define CONSOLE_PORT 0 - -/* functions */ - -uint32_t get_CPU_clock_speed(void); -rtems_isr_entry set_vector( - rtems_isr_entry handler, - rtems_vector_number vector, - int type -); - -/* - * Interrupt assignments - * Highest-priority listed first - */ -#define FEC_IRQ_LEVEL 4 -#define FEC_IRQ_RX_PRIORITY 7 -#define FEC_IRQ_TX_PRIORITY 6 - -#define PIT3_IRQ_LEVEL 4 -#define PIT3_IRQ_PRIORITY 0 - -#define UART0_IRQ_LEVEL 3 -#define UART0_IRQ_PRIORITY 7 -#define UART1_IRQ_LEVEL 3 -#define UART1_IRQ_PRIORITY 6 -#define UART2_IRQ_LEVEL 3 -#define UART2_IRQ_PRIORITY 5 - -/* - * Prototypes for BSP methods which cross file boundaries - */ -void Init5235(void); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/c/src/lib/libbsp/m68k/mcf5235/include/tm27.h b/c/src/lib/libbsp/m68k/mcf5235/include/tm27.h deleted file mode 100644 index 92a85c789a..0000000000 --- a/c/src/lib/libbsp/m68k/mcf5235/include/tm27.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * @file - * @ingroup m68k_mcf5235 - * @brief Implementations for interrupt mechanisms for Time Test 27 - */ - -/* - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef _RTEMS_TMTEST27 -#error "This is an RTEMS internal file you must not include directly." -#endif - -#ifndef __tm27_h -#define __tm27_h - -/* - * Stuff for Time Test 27 - * Don't bother with hardware -- just use a software-interrupt - */ - -#define MUST_WAIT_FOR_INTERRUPT 0 - -#define Install_tm27_vector( handler ) set_vector( (handler), 35, 1 ) - -#define Cause_tm27_intr() asm volatile ("trap #3"); - -#define Clear_tm27_intr() /* empty */ - -#define Lower_tm27_intr() /* empty */ - -#endif diff --git a/c/src/lib/libbsp/m68k/mcf5235/preinstall.am b/c/src/lib/libbsp/m68k/mcf5235/preinstall.am deleted file mode 100644 index 1f590e7235..0000000000 --- a/c/src/lib/libbsp/m68k/mcf5235/preinstall.am +++ /dev/null @@ -1,71 +0,0 @@ -## Automatically generated by ampolish3 - Do not edit - -if AMPOLISH3 -$(srcdir)/preinstall.am: Makefile.am - $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am -endif - -PREINSTALL_DIRS = -DISTCLEANFILES += $(PREINSTALL_DIRS) - -all-am: $(PREINSTALL_FILES) - -PREINSTALL_FILES = -CLEANFILES = $(PREINSTALL_FILES) - -all-local: $(TMPINSTALL_FILES) - -TMPINSTALL_FILES = -CLEANFILES += $(TMPINSTALL_FILES) - -$(PROJECT_LIB)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_LIB) - @: > $(PROJECT_LIB)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp) - -$(PROJECT_INCLUDE)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE) - @: > $(PROJECT_INCLUDE)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp) - -$(PROJECT_INCLUDE)/bsp/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp - @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp) - -$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs -PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs - -$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h - -$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h - -$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h - -$(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h - -$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds - -$(PROJECT_LIB)/linkcmdsflash: startup/linkcmdsflash $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmdsflash -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmdsflash - -$(PROJECT_LIB)/linkcmdsram: startup/linkcmdsram $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmdsram -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmdsram - -$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT) -TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT) - diff --git a/c/src/lib/libbsp/m68k/mcf5235/bsp_specs b/c/src/lib/libbsp/m68k/mcf5235/startup/bsp_specs index 3a20757667..3a20757667 100644 --- a/c/src/lib/libbsp/m68k/mcf5235/bsp_specs +++ b/c/src/lib/libbsp/m68k/mcf5235/startup/bsp_specs diff --git a/c/src/lib/libbsp/m68k/mcf5329/Makefile.am b/c/src/lib/libbsp/m68k/mcf5329/Makefile.am index 49595e90f6..b6527dbe77 100644 --- a/c/src/lib/libbsp/m68k/mcf5329/Makefile.am +++ b/c/src/lib/libbsp/m68k/mcf5329/Makefile.am @@ -4,15 +4,8 @@ EXTRA_DIST = include $(top_srcdir)/../../../../automake/compile.am include $(top_srcdir)/../../bsp.am -include_bspdir = $(includedir)/bsp +dist_project_lib_DATA = startup/bsp_specs -dist_project_lib_DATA = bsp_specs - -include_HEADERS = include/bsp.h -include_HEADERS += include/tm27.h - -nodist_include_HEADERS = include/bspopts.h -nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h DISTCLEANFILES = include/bspopts.h noinst_PROGRAMS = @@ -22,7 +15,8 @@ start.$(OBJEXT): start/start.S $(CPPASCOMPILE) -o $@ -c $< project_lib_DATA = start.$(OBJEXT) -dist_project_lib_DATA += startup/linkcmds startup/linkcmdsflash +project_lib_DATA += linkcmds +dist_project_lib_DATA += startup/linkcmdsflash noinst_LIBRARIES = libbsp.a libbsp_a_SOURCES = @@ -61,5 +55,5 @@ if HAS_NETWORKING libbsp_a_LIBADD += network.rel endif -include $(srcdir)/preinstall.am include $(top_srcdir)/../../../../automake/local.am +include $(srcdir)/../../../../../../bsps/m68k/mcf5329/headers.am diff --git a/c/src/lib/libbsp/m68k/mcf5329/configure.ac b/c/src/lib/libbsp/m68k/mcf5329/configure.ac index ca49b5e7c7..99eb6f5ea4 100644 --- a/c/src/lib/libbsp/m68k/mcf5329/configure.ac +++ b/c/src/lib/libbsp/m68k/mcf5329/configure.ac @@ -4,6 +4,9 @@ AC_PREREQ([2.69]) AC_INIT([rtems-c-src-lib-libbsp-m68k-mcf52235],[_RTEMS_VERSION],[https://devel.rtems.org/newticket]) AC_CONFIG_SRCDIR([make/custom/mcf5329.cfg]) RTEMS_TOP(../../../../../..) +RTEMS_SOURCE_TOP +RTEMS_BUILD_TOP +RTEMS_BSP_LINKCMDS RTEMS_CANONICAL_TARGET_CPU AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2]) diff --git a/c/src/lib/libbsp/m68k/mcf5329/include/bsp.h b/c/src/lib/libbsp/m68k/mcf5329/include/bsp.h deleted file mode 100644 index 7670e7a2d9..0000000000 --- a/c/src/lib/libbsp/m68k/mcf5329/include/bsp.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * mcf52235 BSP header file - */ - -#ifndef LIBBSP_M68K_MCF5329_BSP_H -#define LIBBSP_M68K_MCF5329_BSP_H - -#include <bspopts.h> -#include <bsp/default-initial-extension.h> -#include <rtems.h> -#include <rtems/bspIo.h> - -/***************************************************************************/ -/** Hardware data structure headers **/ -#include <mcf532x/mcf532x.h> - -#ifdef __cplusplus -extern "C" { -#endif - -typedef volatile unsigned char vuint8; -typedef volatile unsigned short vuint16; -typedef volatile unsigned long vuint32; - -/***************************************************************************/ -/** Network driver configuration **/ -struct rtems_bsdnet_ifconfig; -extern int rtems_fec_driver_attach (struct rtems_bsdnet_ifconfig *config, int attaching ); -#define RTEMS_BSP_NETWORK_DRIVER_NAME "fec0" -#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_fec_driver_attach - -/***************************************************************************/ -/** User Definable configuration **/ - -/* define which port the console should use - all other ports are then defined as general purpose */ -#define CONSOLE_PORT 0 - -/* functions */ - -uint32_t bsp_get_CPU_clock_speed(void); -uint32_t bsp_get_BUS_clock_speed(void); - -rtems_isr_entry set_vector( - rtems_isr_entry handler, - rtems_vector_number vector, - int type -); - -/* - * Interrupt assignments - * Highest-priority listed first - */ -#define FEC_IRQ_LEVEL 4 - -#define PIT3_IRQ_LEVEL 4 - -#define UART0_IRQ_LEVEL 3 -#define UART1_IRQ_LEVEL 3 -#define UART2_IRQ_LEVEL 3 - -/* - * Prototypes for BSP methods which cross file boundaries - */ -void Init5329(void); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/c/src/lib/libbsp/m68k/mcf5329/include/tm27.h b/c/src/lib/libbsp/m68k/mcf5329/include/tm27.h deleted file mode 100644 index 33376540ac..0000000000 --- a/c/src/lib/libbsp/m68k/mcf5329/include/tm27.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * @file - * @ingroup m68k_mcf5329 - * @brief Implementations for interrupt mechanisms for Time Test 27 - */ - -/* - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef _RTEMS_TMTEST27 -#error "This is an RTEMS internal file you must not include directly." -#endif - -#ifndef __tm27_h -#define __tm27_h - -/* - * Stuff for Time Test 27 - * Don't bother with hardware -- just use a software-interrupt - */ - -#define MUST_WAIT_FOR_INTERRUPT 0 - -#define Install_tm27_vector( handler ) set_vector( (handler), 35, 1 ) - -#define Cause_tm27_intr() asm volatile ("trap #3"); - -#define Clear_tm27_intr() /* empty */ - -#define Lower_tm27_intr() /* empty */ - -#endif diff --git a/c/src/lib/libbsp/m68k/mcf5329/preinstall.am b/c/src/lib/libbsp/m68k/mcf5329/preinstall.am deleted file mode 100644 index c521ac75e6..0000000000 --- a/c/src/lib/libbsp/m68k/mcf5329/preinstall.am +++ /dev/null @@ -1,67 +0,0 @@ -## Automatically generated by ampolish3 - Do not edit - -if AMPOLISH3 -$(srcdir)/preinstall.am: Makefile.am - $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am -endif - -PREINSTALL_DIRS = -DISTCLEANFILES += $(PREINSTALL_DIRS) - -all-am: $(PREINSTALL_FILES) - -PREINSTALL_FILES = -CLEANFILES = $(PREINSTALL_FILES) - -all-local: $(TMPINSTALL_FILES) - -TMPINSTALL_FILES = -CLEANFILES += $(TMPINSTALL_FILES) - -$(PROJECT_LIB)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_LIB) - @: > $(PROJECT_LIB)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp) - -$(PROJECT_INCLUDE)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE) - @: > $(PROJECT_INCLUDE)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp) - -$(PROJECT_INCLUDE)/bsp/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp - @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp) - -$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs -PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs - -$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h - -$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h - -$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h - -$(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h - -$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT) -TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT) - -$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds - -$(PROJECT_LIB)/linkcmdsflash: startup/linkcmdsflash $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmdsflash -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmdsflash - diff --git a/c/src/lib/libbsp/m68k/mcf5329/bsp_specs b/c/src/lib/libbsp/m68k/mcf5329/startup/bsp_specs index 87638cc027..87638cc027 100644 --- a/c/src/lib/libbsp/m68k/mcf5329/bsp_specs +++ b/c/src/lib/libbsp/m68k/mcf5329/startup/bsp_specs diff --git a/c/src/lib/libbsp/m68k/mrm332/Makefile.am b/c/src/lib/libbsp/m68k/mrm332/Makefile.am index 0d06beaeaf..0cd22f2c0d 100644 --- a/c/src/lib/libbsp/m68k/mrm332/Makefile.am +++ b/c/src/lib/libbsp/m68k/mrm332/Makefile.am @@ -4,19 +4,10 @@ EXTRA_DIST = include $(top_srcdir)/../../../../automake/compile.am include $(top_srcdir)/../../bsp.am -include_bspdir = $(includedir)/bsp +dist_project_lib_DATA = startup/bsp_specs -dist_project_lib_DATA = bsp_specs - -include_HEADERS = include/bsp.h -include_HEADERS += include/tm27.h - -nodist_include_HEADERS = include/bspopts.h -nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h DISTCLEANFILES = include/bspopts.h -include_HEADERS += include/mrm332.h - EXTRA_DIST += times EXTRA_DIST += start/start.S @@ -24,7 +15,7 @@ start.$(OBJEXT): start/start.S $(CPPASCOMPILE) -o $@ -c $< project_lib_DATA = start.$(OBJEXT) -dist_project_lib_DATA += startup/linkcmds +project_lib_DATA += linkcmds noinst_LIBRARIES = libbsp.a libbsp_a_SOURCES = @@ -51,5 +42,5 @@ libbsp_a_LIBADD = \ ../../../libcpu/@RTEMS_CPU@/shared/cache.rel \ ../../../libcpu/@RTEMS_CPU@/shared/misc.rel -include $(srcdir)/preinstall.am include $(top_srcdir)/../../../../automake/local.am +include $(srcdir)/../../../../../../bsps/m68k/mrm332/headers.am diff --git a/c/src/lib/libbsp/m68k/mrm332/configure.ac b/c/src/lib/libbsp/m68k/mrm332/configure.ac index a00483fcd0..c8fb1c1ac3 100644 --- a/c/src/lib/libbsp/m68k/mrm332/configure.ac +++ b/c/src/lib/libbsp/m68k/mrm332/configure.ac @@ -4,6 +4,9 @@ AC_PREREQ([2.69]) AC_INIT([rtems-c-src-lib-libbsp-m68k-mrm332],[_RTEMS_VERSION],[https://devel.rtems.org/newticket]) AC_CONFIG_SRCDIR([make/custom/mrm332.cfg]) RTEMS_TOP(../../../../../..) +RTEMS_SOURCE_TOP +RTEMS_BUILD_TOP +RTEMS_BSP_LINKCMDS RTEMS_CANONICAL_TARGET_CPU AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2]) diff --git a/c/src/lib/libbsp/m68k/mrm332/include/bsp.h b/c/src/lib/libbsp/m68k/mrm332/include/bsp.h deleted file mode 100644 index 6d4f7b8eb2..0000000000 --- a/c/src/lib/libbsp/m68k/mrm332/include/bsp.h +++ /dev/null @@ -1,90 +0,0 @@ -/* bsp.h - * - * This include file contains all mrm board IO definitions. - */ - -/* - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef LIBBSP_M68K_MRM332_BSP_H -#define LIBBSP_M68K_MRM332_BSP_H - -#include <bspopts.h> -#include <bsp/default-initial-extension.h> - -#include <rtems.h> -#include <rtems/bspIo.h> -#include <mrm332.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#define CONSOLE_SCI - -/* externals */ - -extern char _etext[]; -extern char _copy_start[]; -extern char _edata[]; -extern char _clear_start[]; -extern char end[]; -extern bool _copy_data_from_rom; - -/* constants */ - -#ifdef __START_C__ -#define STACK_SIZE "#0x800" -#else -#define STACK_SIZE 0x800 -#endif - -/* macros */ - -#define RAW_PUTS(str) \ - { register char *ptr = str; \ - while (*ptr) SCI_output_char(*ptr++); \ - } - -#define RAW_PUTI(n) { \ - register int i, j; \ - \ - RAW_PUTS("0x"); \ - for (i=28;i>=0;i -= 4) { \ - j = (n>>i) & 0xf; \ - SCI_output_char( (j>9 ? j-10+'a' : j+'0') ); \ - } \ - } - -/* miscellaneous stuff assumed to exist */ - -extern rtems_isr_entry M68Kvec[]; /* vector table address */ - -extern int stack_size; -extern int stack_start; - -/* functions */ - -rtems_isr_entry set_vector( - rtems_isr_entry handler, - rtems_vector_number vector, - int type -); - -void Spurious_Initialize(void); - -void _UART_flush(void); - -void outbyte(char); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/c/src/lib/libbsp/m68k/mrm332/include/mrm332.h b/c/src/lib/libbsp/m68k/mrm332/include/mrm332.h deleted file mode 100644 index 1b8672752d..0000000000 --- a/c/src/lib/libbsp/m68k/mrm332/include/mrm332.h +++ /dev/null @@ -1,71 +0,0 @@ -/* mrm332.h - */ - -#ifndef _MRM332_H_ -#define _MRM332_H_ - -/* SIM_MM (SIM Module Mapping) determines the location of the control - register block. When MM=0, register addresses range fom 0x7ff000 to - 0x7FFFFF. When MM=1, register addresses range from 0xfff000 to - 0xffffff. */ -#define SIM_MM 1 - -/* Interrupt related definitions */ -#define SIM_IARB 15 -#define QSM_IARB 10 - -#define MRM_PIV 64 -#define ISRL_PIT 4 /* zero disables PIT */ - -#define EFI_QIVR 66 /* 66=>SCI and 67=>QSPI interrupt */ -#define ISRL_QSPI 0 - -#define EFI_SPINT 24 /* spurious interrupt */ -#define EFI_INT1 25 /* CTS interrupt */ -#define ISRL_SCI 6 - -/* System Clock definitions */ -#define XTAL 32768.0 /* crystal frequency in Hz */ - -/* Specify the CPU frequency. Do not specify a faster clock than your */ -/* CPU is rated for! */ -#if 0 -/* Default MRM clock rate (8.388688 MHz) set by CPU32: */ -#define MRM_W 0 /* system clock parameters */ -#define MRM_X 0 -#define MRM_Y 0x3f -#endif - -#if 0 -/* 16.77722 MHz: */ -#define MRM_W 1 /* system clock parameters */ -#define MRM_X 1 -#define MRM_Y 0x0f -#endif - -#if 1 -/* 25.16582 MHz: */ -#define MRM_W 1 /* system clock parameters */ -#define MRM_X 1 -#define MRM_Y 0x17 -#define SET_EDIV -#endif - -#define SYS_CLOCK (XTAL*4.0*(MRM_Y+1)*(1 << (2*MRM_W+MRM_X))) -#define SCI_BAUD 19200 /* RS232 Baud Rate */ - -/* macros/functions */ - -#ifndef ASM - -/* - * This prototype really should have the noreturn attribute but - * that causes a warning. Not sure how to fix that. - */ -/* static void reboot(void) __attribute__ ((noreturn)); */ -static void reboot(void); -__inline__ static void reboot() {__asm__ ("trap #15; .word 0x0063");} - -#endif /* ASM */ - -#endif /* _MRM_H_ */ diff --git a/c/src/lib/libbsp/m68k/mrm332/include/tm27.h b/c/src/lib/libbsp/m68k/mrm332/include/tm27.h deleted file mode 100644 index 0dfa7bf628..0000000000 --- a/c/src/lib/libbsp/m68k/mrm332/include/tm27.h +++ /dev/null @@ -1 +0,0 @@ -#include <rtems/tm27-default.h> diff --git a/c/src/lib/libbsp/m68k/mrm332/preinstall.am b/c/src/lib/libbsp/m68k/mrm332/preinstall.am deleted file mode 100644 index 7bf1c0166a..0000000000 --- a/c/src/lib/libbsp/m68k/mrm332/preinstall.am +++ /dev/null @@ -1,67 +0,0 @@ -## Automatically generated by ampolish3 - Do not edit - -if AMPOLISH3 -$(srcdir)/preinstall.am: Makefile.am - $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am -endif - -PREINSTALL_DIRS = -DISTCLEANFILES += $(PREINSTALL_DIRS) - -all-am: $(PREINSTALL_FILES) - -PREINSTALL_FILES = -CLEANFILES = $(PREINSTALL_FILES) - -all-local: $(TMPINSTALL_FILES) - -TMPINSTALL_FILES = -CLEANFILES += $(TMPINSTALL_FILES) - -$(PROJECT_LIB)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_LIB) - @: > $(PROJECT_LIB)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp) - -$(PROJECT_INCLUDE)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE) - @: > $(PROJECT_INCLUDE)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp) - -$(PROJECT_INCLUDE)/bsp/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp - @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp) - -$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs -PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs - -$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h - -$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h - -$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h - -$(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h - -$(PROJECT_INCLUDE)/mrm332.h: include/mrm332.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/mrm332.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/mrm332.h - -$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT) -TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT) - -$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds - diff --git a/c/src/lib/libbsp/m68k/mrm332/bsp_specs b/c/src/lib/libbsp/m68k/mrm332/startup/bsp_specs index 87638cc027..87638cc027 100644 --- a/c/src/lib/libbsp/m68k/mrm332/bsp_specs +++ b/c/src/lib/libbsp/m68k/mrm332/startup/bsp_specs diff --git a/c/src/lib/libbsp/m68k/mvme147/Makefile.am b/c/src/lib/libbsp/m68k/mvme147/Makefile.am index 2314474475..6b1ec396dd 100644 --- a/c/src/lib/libbsp/m68k/mvme147/Makefile.am +++ b/c/src/lib/libbsp/m68k/mvme147/Makefile.am @@ -4,29 +4,20 @@ EXTRA_DIST = include $(top_srcdir)/../../../../automake/compile.am include $(top_srcdir)/../../bsp.am -include_bspdir = $(includedir)/bsp +dist_project_lib_DATA = startup/bsp_specs -dist_project_lib_DATA = bsp_specs - -include_HEADERS = include/bsp.h -include_HEADERS += include/tm27.h - -nodist_include_HEADERS = include/bspopts.h -nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h DISTCLEANFILES = include/bspopts.h noinst_PROGRAMS = ## Zilog component header files -include_rtems_zilogdir = $(includedir)/rtems/zilog -include_rtems_zilog_HEADERS = ../../shared/include/zilog/z8530.h EXTRA_DIST += ../../m68k/shared/start/start.S start.$(OBJEXT): ../../m68k/shared/start/start.S $(CPPASCOMPILE) -o $@ -c $< project_lib_DATA = start.$(OBJEXT) -dist_project_lib_DATA += startup/linkcmds +project_lib_DATA += linkcmds noinst_LIBRARIES = libbsp.a libbsp_a_SOURCES = @@ -52,5 +43,5 @@ libbsp_a_LIBADD = \ EXTRA_DIST += times -include $(srcdir)/preinstall.am include $(top_srcdir)/../../../../automake/local.am +include $(srcdir)/../../../../../../bsps/m68k/mvme147/headers.am diff --git a/c/src/lib/libbsp/m68k/mvme147/configure.ac b/c/src/lib/libbsp/m68k/mvme147/configure.ac index e6b583d0f3..eaec21faa9 100644 --- a/c/src/lib/libbsp/m68k/mvme147/configure.ac +++ b/c/src/lib/libbsp/m68k/mvme147/configure.ac @@ -4,6 +4,9 @@ AC_PREREQ([2.69]) AC_INIT([rtems-c-src-lib-libbsp-m68k-mvme147],[_RTEMS_VERSION],[https://devel.rtems.org/newticket]) AC_CONFIG_SRCDIR([make/custom/mvme147.cfg]) RTEMS_TOP(../../../../../..) +RTEMS_SOURCE_TOP +RTEMS_BUILD_TOP +RTEMS_BSP_LINKCMDS RTEMS_CANONICAL_TARGET_CPU AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2]) diff --git a/c/src/lib/libbsp/m68k/mvme147/include/bsp.h b/c/src/lib/libbsp/m68k/mvme147/include/bsp.h deleted file mode 100644 index 9cf3fbf5a8..0000000000 --- a/c/src/lib/libbsp/m68k/mvme147/include/bsp.h +++ /dev/null @@ -1,117 +0,0 @@ -/* bsp.h - * - * This include file contains all MVME147 board IO definitions. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - * - * MVME147 port for TNI - Telecom Bretagne - * by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr) - * May 1996 - */ - -#ifndef LIBBSP_M68K_MVME147_BSP_H -#define LIBBSP_M68K_MVME147_BSP_H - -#include <bspopts.h> -#include <bsp/default-initial-extension.h> - -#include <rtems.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/* Constants */ - -#define RAM_START 0x00005000 -#define RAM_END 0x00400000 - - /* MVME 147 Peripheral controller chip - see MVME147/D1, 3.4 */ - -struct pcc_map { - /* 32 bit registers */ - uint32_t dma_table_address; /* 0xfffe1000 */ - uint32_t dma_data_address; /* 0xfffe1004 */ - uint32_t dma_bytecount; /* 0xfffe1008 */ - uint32_t dma_data_holding; /* 0xfffe100c */ - - /* 16 bit registers */ - uint16_t timer1_preload; /* 0xfffe1010 */ - uint16_t timer1_count; /* 0xfffe1012 */ - uint16_t timer2_preload; /* 0xfffe1014 */ - uint16_t timer2_count; /* 0xfffe1016 */ - - /* 8 bit registers */ - uint8_t timer1_int_control; /* 0xfffe1018 */ - uint8_t timer1_control; /* 0xfffe1019 */ - uint8_t timer2_int_control; /* 0xfffe101a */ - uint8_t timer2_control; /* 0xfffe101b */ - - uint8_t acfail_int_control; /* 0xfffe101c */ - uint8_t watchdog_control; /* 0xfffe101d */ - - uint8_t printer_int_control; /* 0xfffe101e */ - uint8_t printer_control; /* 0xfffe102f */ - - uint8_t dma_int_control; /* 0xfffe1020 */ - uint8_t dma_control; /* 0xfffe1021 */ - uint8_t bus_error_int_control; /* 0xfffe1022 */ - uint8_t dma_status; /* 0xfffe1023 */ - uint8_t abort_int_control; /* 0xfffe1024 */ - uint8_t table_address_function_code; /* 0xfffe1025 */ - uint8_t serial_port_int_control; /* 0xfffe1026 */ - uint8_t general_purpose_control; /* 0xfffe1027 */ - uint8_t lan_int_control; /* 0xfffe1028 */ - uint8_t general_purpose_status; /* 0xfffe1029 */ - uint8_t scsi_port_int_control; /* 0xfffe102a */ - uint8_t slave_base_address; /* 0xfffe102b */ - uint8_t software_int_1_control; /* 0xfffe102c */ - uint8_t int_base_vector; /* 0xfffe102d */ - uint8_t software_int_2_control; /* 0xfffe102e */ - uint8_t revision_level; /* 0xfffe102f */ -}; - -#define pcc ((volatile struct pcc_map * const) 0xfffe1000) - -#define z8530 0xfffe3001 - -/* interrupt vectors - see MVME146/D1 4.14 */ -#define PCC_BASE_VECTOR 0x40 /* First user int */ -#define SCC_VECTOR PCC_BASE_VECTOR+3 -#define TIMER_1_VECTOR PCC_BASE_VECTOR+8 -#define TIMER_2_VECTOR PCC_BASE_VECTOR+9 -#define SOFT_1_VECTOR PCC_BASE_VECTOR+10 -#define SOFT_2_VECTOR PCC_BASE_VECTOR+11 - -#define USE_CHANNEL_A 1 /* 1 = use channel A for console */ -#define USE_CHANNEL_B 0 /* 1 = use channel B for console */ - -#if (USE_CHANNEL_A == 1) -#define CONSOLE_CONTROL 0xfffe3002 -#define CONSOLE_DATA 0xfffe3003 -#elif (USE_CHANNEL_B == 1) -#define CONSOLE_CONTROL 0xfffe3000 -#define CONSOLE_DATA 0xfffe3001 -#endif - -extern rtems_isr_entry M68Kvec[]; /* vector table address */ - -/* functions */ - -rtems_isr_entry set_vector( - rtems_isr_entry handler, - rtems_vector_number vector, - int type -); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/c/src/lib/libbsp/m68k/mvme147/include/tm27.h b/c/src/lib/libbsp/m68k/mvme147/include/tm27.h deleted file mode 100644 index 5b548a888a..0000000000 --- a/c/src/lib/libbsp/m68k/mvme147/include/tm27.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * @file - * @ingroup m68k_mvme147 - * @brief Implementations for interrupt mechanisms for Time Test 27 - */ - -/* - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef _RTEMS_TMTEST27 -#error "This is an RTEMS internal file you must not include directly." -#endif - -#ifndef __tm27_h -#define __tm27_h - -/* - * Define the interrupt mechanism for Time Test 27 - * - * NOTE: Use the MPCSR vector for the MVME147 - */ - -#define MUST_WAIT_FOR_INTERRUPT 0 - -#define Install_tm27_vector( handler ) set_vector( (handler), \ - SOFT_1_VECTOR, 1 ) - -#define Cause_tm27_intr() pcc->software_int_1_control = 0x0c - /* generate level 4 sotware int. */ - -#define Clear_tm27_intr() pcc->software_int_1_control = 0x00 - -#define Lower_tm27_intr() /* empty */ - -#endif diff --git a/c/src/lib/libbsp/m68k/mvme147/preinstall.am b/c/src/lib/libbsp/m68k/mvme147/preinstall.am deleted file mode 100644 index a7c23bbc1b..0000000000 --- a/c/src/lib/libbsp/m68k/mvme147/preinstall.am +++ /dev/null @@ -1,72 +0,0 @@ -## Automatically generated by ampolish3 - Do not edit - -if AMPOLISH3 -$(srcdir)/preinstall.am: Makefile.am - $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am -endif - -PREINSTALL_DIRS = -DISTCLEANFILES += $(PREINSTALL_DIRS) - -all-am: $(PREINSTALL_FILES) - -PREINSTALL_FILES = -CLEANFILES = $(PREINSTALL_FILES) - -all-local: $(TMPINSTALL_FILES) - -TMPINSTALL_FILES = -CLEANFILES += $(TMPINSTALL_FILES) - -$(PROJECT_LIB)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_LIB) - @: > $(PROJECT_LIB)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp) - -$(PROJECT_INCLUDE)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE) - @: > $(PROJECT_INCLUDE)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp) - -$(PROJECT_INCLUDE)/bsp/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp - @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp) - -$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs -PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs - -$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h - -$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h - -$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h - -$(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h - -$(PROJECT_INCLUDE)/rtems/zilog/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE)/rtems/zilog - @: > $(PROJECT_INCLUDE)/rtems/zilog/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/rtems/zilog/$(dirstamp) - -$(PROJECT_INCLUDE)/rtems/zilog/z8530.h: ../../shared/include/zilog/z8530.h $(PROJECT_INCLUDE)/rtems/zilog/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/zilog/z8530.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/zilog/z8530.h - -$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT) -TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT) - -$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds - diff --git a/c/src/lib/libbsp/m68k/mvme147/bsp_specs b/c/src/lib/libbsp/m68k/mvme147/startup/bsp_specs index 3a20757667..3a20757667 100644 --- a/c/src/lib/libbsp/m68k/mvme147/bsp_specs +++ b/c/src/lib/libbsp/m68k/mvme147/startup/bsp_specs diff --git a/c/src/lib/libbsp/m68k/mvme147s/Makefile.am b/c/src/lib/libbsp/m68k/mvme147s/Makefile.am index 1e663ceeeb..c4d5f5f89d 100644 --- a/c/src/lib/libbsp/m68k/mvme147s/Makefile.am +++ b/c/src/lib/libbsp/m68k/mvme147s/Makefile.am @@ -4,29 +4,20 @@ EXTRA_DIST = include $(top_srcdir)/../../../../automake/compile.am include $(top_srcdir)/../../bsp.am -include_bspdir = $(includedir)/bsp +dist_project_lib_DATA = startup/bsp_specs -dist_project_lib_DATA = bsp_specs - -include_HEADERS = include/bsp.h -include_HEADERS += include/tm27.h - -nodist_include_HEADERS = include/bspopts.h -nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h DISTCLEANFILES = include/bspopts.h noinst_PROGRAMS = ## Zilog component header files -include_rtems_zilogdir = $(includedir)/rtems/zilog -include_rtems_zilog_HEADERS = ../../shared/include/zilog/z8530.h EXTRA_DIST += ../../m68k/shared/start/start.S start.$(OBJEXT): ../../m68k/shared/start/start.S $(CPPASCOMPILE) -o $@ -c $< project_lib_DATA = start.$(OBJEXT) -dist_project_lib_DATA += startup/linkcmds +project_lib_DATA += linkcmds noinst_LIBRARIES = libbsp.a libbsp_a_SOURCES = @@ -60,5 +51,5 @@ libbsp_a_LIBADD = \ EXTRA_DIST += times -include $(srcdir)/preinstall.am include $(top_srcdir)/../../../../automake/local.am +include $(srcdir)/../../../../../../bsps/m68k/mvme147s/headers.am diff --git a/c/src/lib/libbsp/m68k/mvme147s/configure.ac b/c/src/lib/libbsp/m68k/mvme147s/configure.ac index 86dc3b4867..14f9a8bac5 100644 --- a/c/src/lib/libbsp/m68k/mvme147s/configure.ac +++ b/c/src/lib/libbsp/m68k/mvme147s/configure.ac @@ -4,6 +4,9 @@ AC_PREREQ([2.69]) AC_INIT([rtems-c-src-lib-libbsp-m68k-mvme147s],[_RTEMS_VERSION],[https://devel.rtems.org/newticket]) AC_CONFIG_SRCDIR([make/custom/mvme147s.cfg]) RTEMS_TOP(../../../../../..) +RTEMS_SOURCE_TOP +RTEMS_BUILD_TOP +RTEMS_BSP_LINKCMDS RTEMS_CANONICAL_TARGET_CPU AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2]) diff --git a/c/src/lib/libbsp/m68k/mvme147s/include/bsp.h b/c/src/lib/libbsp/m68k/mvme147s/include/bsp.h deleted file mode 100644 index 3a4803fec2..0000000000 --- a/c/src/lib/libbsp/m68k/mvme147s/include/bsp.h +++ /dev/null @@ -1,192 +0,0 @@ -/* bsp.h - * - * This include file contains all MVME147 board IO definitions. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - * - * MVME147 port for TNI - Telecom Bretagne - * by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr) - * May 1996 - */ - -#ifndef LIBBSP_M68K_MVME147S_BSP_H -#define LIBBSP_M68K_MVME147S_BSP_H - -#include <bspopts.h> -#include <bsp/default-initial-extension.h> - -#include <rtems.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/* Constants */ - -#define RAM_START 0x00007000 -#define RAM_END 0x003e0000 -#define DRAM_END 0x00400000 - /* We leave 128k for the shared memory */ - - /* MVME 147 Peripheral controller chip - see MVME147/D1, 3.4 */ - -struct pcc_map { - /* 32 bit registers */ - uint32_t dma_table_address; /* 0xfffe1000 */ - uint32_t dma_data_address; /* 0xfffe1004 */ - uint32_t dma_bytecount; /* 0xfffe1008 */ - uint32_t dma_data_holding; /* 0xfffe100c */ - - /* 16 bit registers */ - uint16_t timer1_preload; /* 0xfffe1010 */ - uint16_t timer1_count; /* 0xfffe1012 */ - uint16_t timer2_preload; /* 0xfffe1014 */ - uint16_t timer2_count; /* 0xfffe1016 */ - - /* 8 bit registers */ - uint8_t timer1_int_control; /* 0xfffe1018 */ - uint8_t timer1_control; /* 0xfffe1019 */ - uint8_t timer2_int_control; /* 0xfffe101a */ - uint8_t timer2_control; /* 0xfffe101b */ - - uint8_t acfail_int_control; /* 0xfffe101c */ - uint8_t watchdog_control; /* 0xfffe101d */ - - uint8_t printer_int_control; /* 0xfffe101e */ - uint8_t printer_control; /* 0xfffe102f */ - - uint8_t dma_int_control; /* 0xfffe1020 */ - uint8_t dma_control; /* 0xfffe1021 */ - uint8_t bus_error_int_control; /* 0xfffe1022 */ - uint8_t dma_status; /* 0xfffe1023 */ - uint8_t abort_int_control; /* 0xfffe1024 */ - uint8_t table_address_function_code; /* 0xfffe1025 */ - uint8_t serial_port_int_control; /* 0xfffe1026 */ - uint8_t general_purpose_control; /* 0xfffe1027 */ - uint8_t lan_int_control; /* 0xfffe1028 */ - uint8_t general_purpose_status; /* 0xfffe1029 */ - uint8_t scsi_port_int_control; /* 0xfffe102a */ - uint8_t slave_base_address; /* 0xfffe102b */ - uint8_t software_int_1_control; /* 0xfffe102c */ - uint8_t int_base_vector; /* 0xfffe102d */ - uint8_t software_int_2_control; /* 0xfffe102e */ - uint8_t revision_level; /* 0xfffe102f */ -}; - -#define pcc ((volatile struct pcc_map * const) 0xfffe1000) - -/* VME chip configuration registers */ - -struct vme_lcsr_map { - uint8_t unused_1; - uint8_t system_controller; /* 0xfffe2001 */ - uint8_t unused_2; - uint8_t vme_bus_requester; /* 0xfffe2003 */ - uint8_t unused_3; - uint8_t master_configuration; /* 0xfffe2005 */ - uint8_t unused_4; - uint8_t slave_configuration; /* 0xfffe2007 */ - uint8_t unused_5; - uint8_t timer_configuration; /* 0xfffe2009 */ - uint8_t unused_6; - uint8_t slave_address_modifier; /* 0xfffe200b */ - uint8_t unused_7; - uint8_t master_address_modifier; /* 0xfffe200d */ - uint8_t unused_8; - uint8_t interrupt_handler_mask; /* 0xfffe200f */ - uint8_t unused_9; - uint8_t utility_interrupt_mask; /* 0xfffe2011 */ - uint8_t unused_10; - uint8_t utility_interrupt_vector; /* 0xfffe2013 */ - uint8_t unused_11; - uint8_t interrupt_request; /* 0xfffe2015 */ - uint8_t unused_12; - uint8_t vme_bus_status_id; /* 0xfffe2017 */ - uint8_t unused_13; - uint8_t bus_error_status; /* 0xfffe2019 */ - uint8_t unused_14; - uint8_t gcsr_base_address; /* 0xfffe201b */ -}; - -#define vme_lcsr ((volatile struct vme_lcsr_map * const) 0xfffe2000) - -struct vme_gcsr_map { - uint8_t unused_1; - uint8_t global_0; /* 0xfffe2021 */ - uint8_t unused_2; - uint8_t global_1; /* 0xfffe2023 */ - uint8_t unused_3; - uint8_t board_identification; /* 0xfffe2025 */ - uint8_t unused_4; - uint8_t general_purpose_0; /* 0xfffe2027 */ - uint8_t unused_5; - uint8_t general_purpose_1; /* 0xfffe2029 */ - uint8_t unused_6; - uint8_t general_purpose_2; /* 0xfffe202b */ - uint8_t unused_7; - uint8_t general_purpose_3; /* 0xfffe202d */ - uint8_t unused_8; - uint8_t general_purpose_4; /* 0xfffe202f */ -}; - -#define vme_gcsr ((volatile struct vme_gcsr_map * const) 0xfffe2020) - -#define z8530 0xfffe3001 - -/* interrupt vectors - see MVME147/D1 4.14 */ -#define PCC_BASE_VECTOR 0x40 /* First user int */ -#define SCC_VECTOR PCC_BASE_VECTOR+3 -#define TIMER_1_VECTOR PCC_BASE_VECTOR+8 -#define TIMER_2_VECTOR PCC_BASE_VECTOR+9 -#define SOFT_1_VECTOR PCC_BASE_VECTOR+10 -#define SOFT_2_VECTOR PCC_BASE_VECTOR+11 - -#define VME_BASE_VECTOR 0x50 -#define VME_SIGLP_VECTOR VME_BASE_VECTOR+1 - -#define USE_CHANNEL_A 1 /* 1 = use channel A for console */ -#define USE_CHANNEL_B 0 /* 1 = use channel B for console */ - -#if (USE_CHANNEL_A == 1) -#define CONSOLE_CONTROL 0xfffe3002 -#define CONSOLE_DATA 0xfffe3003 -#elif (USE_CHANNEL_B == 1) -#define CONSOLE_CONTROL 0xfffe3000 -#define CONSOLE_DATA 0xfffe3001 -#endif - -#define FOREVER 1 /* infinite loop */ - -#ifdef M147_INIT -#undef EXTERN -#define EXTERN -#else -#undef EXTERN -#define EXTERN extern -#endif - -extern rtems_isr_entry M68Kvec[]; /* vector table address */ - -/* - * NOTE: Use the standard Clock driver entry - */ - -/* functions */ - -rtems_isr_entry set_vector( - rtems_isr_entry handler, - rtems_vector_number vector, - int type -); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/c/src/lib/libbsp/m68k/mvme147s/include/tm27.h b/c/src/lib/libbsp/m68k/mvme147s/include/tm27.h deleted file mode 100644 index 48ae0f459a..0000000000 --- a/c/src/lib/libbsp/m68k/mvme147s/include/tm27.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * @file - * @ingroup m68k_mvme147s - * @brief Implementations for interrupt mechanisms for Time Test 27 - */ - -/* - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef _RTEMS_TMTEST27 -#error "This is an RTEMS internal file you must not include directly." -#endif - -#ifndef __tm27_h -#define __tm27_h - -/* - * Define the interrupt mechanism for Time Test 27 - * - * NOTE: Use the MPCSR vector for the MVME147 - */ - -#define MUST_WAIT_FOR_INTERRUPT 0 - -#define Install_tm27_vector( handler ) set_vector( (handler), \ - SOFT_1_VECTOR, 1 ) - -#define Cause_tm27_intr() pcc->software_int_1_control = 0x0c - /* generate level 4 sotware int. */ - -#define Clear_tm27_intr() pcc->software_int_1_control = 0x00 - -#define Lower_tm27_intr() /* empty */ - -#endif diff --git a/c/src/lib/libbsp/m68k/mvme147s/preinstall.am b/c/src/lib/libbsp/m68k/mvme147s/preinstall.am deleted file mode 100644 index a7c23bbc1b..0000000000 --- a/c/src/lib/libbsp/m68k/mvme147s/preinstall.am +++ /dev/null @@ -1,72 +0,0 @@ -## Automatically generated by ampolish3 - Do not edit - -if AMPOLISH3 -$(srcdir)/preinstall.am: Makefile.am - $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am -endif - -PREINSTALL_DIRS = -DISTCLEANFILES += $(PREINSTALL_DIRS) - -all-am: $(PREINSTALL_FILES) - -PREINSTALL_FILES = -CLEANFILES = $(PREINSTALL_FILES) - -all-local: $(TMPINSTALL_FILES) - -TMPINSTALL_FILES = -CLEANFILES += $(TMPINSTALL_FILES) - -$(PROJECT_LIB)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_LIB) - @: > $(PROJECT_LIB)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp) - -$(PROJECT_INCLUDE)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE) - @: > $(PROJECT_INCLUDE)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp) - -$(PROJECT_INCLUDE)/bsp/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp - @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp) - -$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs -PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs - -$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h - -$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h - -$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h - -$(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h - -$(PROJECT_INCLUDE)/rtems/zilog/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE)/rtems/zilog - @: > $(PROJECT_INCLUDE)/rtems/zilog/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/rtems/zilog/$(dirstamp) - -$(PROJECT_INCLUDE)/rtems/zilog/z8530.h: ../../shared/include/zilog/z8530.h $(PROJECT_INCLUDE)/rtems/zilog/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/zilog/z8530.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/zilog/z8530.h - -$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT) -TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT) - -$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds - diff --git a/c/src/lib/libbsp/m68k/mvme147s/bsp_specs b/c/src/lib/libbsp/m68k/mvme147s/startup/bsp_specs index 3a20757667..3a20757667 100644 --- a/c/src/lib/libbsp/m68k/mvme147s/bsp_specs +++ b/c/src/lib/libbsp/m68k/mvme147s/startup/bsp_specs diff --git a/c/src/lib/libbsp/m68k/mvme162/Makefile.am b/c/src/lib/libbsp/m68k/mvme162/Makefile.am index 2ea3f528fe..9ecf9f56e0 100644 --- a/c/src/lib/libbsp/m68k/mvme162/Makefile.am +++ b/c/src/lib/libbsp/m68k/mvme162/Makefile.am @@ -4,30 +4,19 @@ EXTRA_DIST = include $(top_srcdir)/../../../../automake/compile.am include $(top_srcdir)/../../bsp.am -include_bspdir = $(includedir)/bsp +dist_project_lib_DATA = startup/bsp_specs -dist_project_lib_DATA = bsp_specs - -include_HEADERS = include/bsp.h -include_HEADERS += include/tm27.h - -nodist_include_HEADERS = include/bspopts.h -nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h DISTCLEANFILES = include/bspopts.h noinst_PROGRAMS = -include_HEADERS += include/page_table.h - ## Zilog component header files -include_rtems_zilogdir = $(includedir)/rtems/zilog -include_rtems_zilog_HEADERS = ../../shared/include/zilog/z8036.h EXTRA_DIST += ../../m68k/shared/start/start.S start.$(OBJEXT): ../../m68k/shared/start/start.S $(CPPASCOMPILE) -o $@ -c $< project_lib_DATA = start.$(OBJEXT) -dist_project_lib_DATA += startup/linkcmds +project_lib_DATA += linkcmds noinst_LIBRARIES = libbsp.a libbsp_a_SOURCES = @@ -71,5 +60,5 @@ endif EXTRA_DIST += times -include $(srcdir)/preinstall.am include $(top_srcdir)/../../../../automake/local.am +include $(srcdir)/../../../../../../bsps/m68k/mvme162/headers.am diff --git a/c/src/lib/libbsp/m68k/mvme162/configure.ac b/c/src/lib/libbsp/m68k/mvme162/configure.ac index f3ade4ee33..aef42983a9 100644 --- a/c/src/lib/libbsp/m68k/mvme162/configure.ac +++ b/c/src/lib/libbsp/m68k/mvme162/configure.ac @@ -4,6 +4,9 @@ AC_PREREQ([2.69]) AC_INIT([rtems-c-src-lib-libbsp-m68k-mvme162],[_RTEMS_VERSION],[https://devel.rtems.org/newticket]) AC_CONFIG_SRCDIR([make/custom/mvme162.cfg]) RTEMS_TOP(../../../../../..) +RTEMS_SOURCE_TOP +RTEMS_BUILD_TOP +RTEMS_BSP_LINKCMDS RTEMS_CANONICAL_TARGET_CPU AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2]) diff --git a/c/src/lib/libbsp/m68k/mvme162/include/bsp.h b/c/src/lib/libbsp/m68k/mvme162/include/bsp.h deleted file mode 100644 index 3645a31086..0000000000 --- a/c/src/lib/libbsp/m68k/mvme162/include/bsp.h +++ /dev/null @@ -1,204 +0,0 @@ -/* - * This include file contains all MVME162fx board IO definitions. - */ - -/* - * COPYRIGHT (c) 1989-2014. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - * - * Modifications of respective RTEMS file: COPYRIGHT (c) 1994. - * EISCAT Scientific Association. M.Savitski - * - * This material is a part of the MVME162 Board Support Package - * for the RTEMS executive. Its licensing policies are those of the - * RTEMS above. - */ - -#ifndef LIBBSP_M68K_MVME162_BSP_H -#define LIBBSP_M68K_MVME162_BSP_H - -#include <bspopts.h> -#include <bsp/default-initial-extension.h> - -#include <rtems.h> - -#include <mvme16x_hw.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/*----------------------------------------------------------------*/ - -typedef volatile struct { - - unsigned char chipID; - unsigned char chipREV; - unsigned char gen_control; - unsigned char vector_base; - - unsigned long timer_cmp_1; - unsigned long timer_cnt_1; - unsigned long timer_cmp_2; - unsigned long timer_cnt_2; - - unsigned char LSB_prescaler_count; - unsigned char prescaler_clock_adjust; - unsigned char time_ctl_2; - unsigned char time_ctl_1; - - unsigned char time_int_ctl_4; - unsigned char time_int_ctl_3; - unsigned char time_int_ctl_2; - unsigned char time_int_ctl_1; - - unsigned char dram_err_int_ctl; - unsigned char SCC_int_ctl; - unsigned char time_ctl_4; - unsigned char time_ctl_3; - - unsigned short DRAM_space_base; - unsigned short SRAM_space_base; - - unsigned char DRAM_size; - unsigned char DRAM_SRAM_opt; - unsigned char SRAM_size; - unsigned char reserved; - - unsigned char LANC_error; - unsigned char reserved1; - unsigned char LANC_int_ctl; - unsigned char LANC_berr_ctl; - - unsigned char SCSI_error; - unsigned char general_inputs; - unsigned char MVME_162_version; - unsigned char SCSI_int_ctl; - - unsigned long timer_cmp_3; - unsigned long timer_cnt_3; - unsigned long timer_cmp_4; - unsigned long timer_cnt_4; - - unsigned char bus_clk; - unsigned char PROM_acc_time_ctl; - unsigned char FLASH_acc_time_ctl; - unsigned char ABORT_int_ctl; - - unsigned char RESET_ctl; - unsigned char watchdog_timer_ctl; - unsigned char acc_watchdog_time_base_sel; - unsigned char reserved2; - - unsigned char DRAM_ctl; - unsigned char reserved4; - unsigned char MPU_status; - unsigned char reserved3; - - unsigned long prescaler_count; - -} mcchip_regs; - -#define mcchip ((mcchip_regs * const) 0xFFF42000) - -/*----------------------------------------------------------------*/ - -/* - * SCC Z8523(0) defines and macros - * ------------------------------- - * Prototypes for the low-level serial io are also included here, - * because such stuff is bsp-specific (yet). The function bodies - * are in console.c - * - * NOTE from Eric Vaitl <evaitl@viasat.com>: - * - * I dropped RTEMS into a 162FX today (the MVME162-513). The 162FX has a - * bug in the MC2 chip (revision 1) such that the SCC data register is - * not accessible, it has to be accessed indirectly through the SCC - * control register. - */ - -enum {portB, portA}; - -extern bool char_ready(int port, char *ch); -extern char char_wait(int port); -extern void char_put(int port, char ch); - -#define TX_BUFFER_EMPTY 0x04 -#define RX_DATA_AVAILABLE 0x01 -#define SCC_VECTOR 0x40 - -typedef volatile struct { - unsigned char pad1; - volatile unsigned char csr; - unsigned char pad2; - volatile unsigned char buf; -} scc_regs; - -#define scc ((scc_regs * const) 0xFFF45000) - -#define ZWRITE0(port, v) (scc[port].csr = (unsigned char)(v)) -#define ZREAD0(port) (scc[port].csr) - -#define ZREAD(port, n) (ZWRITE0(port, n), (scc[port].csr)) -#define ZREADD(port) (scc[port].csr=0x08, scc[port].csr ) - -#define ZWRITE(port, n, v) (ZWRITE0(port, n), ZWRITE0(port, v)) -#define ZWRITED(port, v) (scc[port].csr = 0x08, \ - scc[port].csr = (unsigned char)(v)) -/*----------------------------------------------------------------*/ - -#ifdef M162_INIT -#undef EXTERN -#define EXTERN -#else -#undef EXTERN -#define EXTERN extern -#endif - -/* - * This value is the default address location of the 162Bug vector table - * and is also the default start address of the boards DRAM. This value - * may be different for your specific board based on a number of factors: - * - * Default DRAM address: 0x00000000 - * Default SRAM address: 0xFFE00000 - * - * o If no DRAM can be found by the 162Bug program, it will use SRAM. - * o The default SRAM address may be different if SRAM mezzanine boards - * are installed on the main board. - * o Both the DRAM and SRAM addresses can be modified by changing the - * appropriate values in NVRAM using the ENV command at the 162Bug - * prompt. - * - * If your board has different values than the defaults, change the value - * of the following define. - * - */ -#define MOT_162BUG_VEC_ADDRESS 0x00000000 - -extern rtems_isr_entry M68Kvec[]; /* vector table address */ - -/* functions */ - -rtems_isr_entry set_vector( - rtems_isr_entry handler, - rtems_vector_number vector, - int type -); - -/* - * Prototypes for methods in the BSP that cross file boundaries. - */ -bool char_ready(int port, char *ch); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/c/src/lib/libbsp/m68k/mvme162/include/page_table.h b/c/src/lib/libbsp/m68k/mvme162/include/page_table.h deleted file mode 100644 index 09b93a49bd..0000000000 --- a/c/src/lib/libbsp/m68k/mvme162/include/page_table.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This file was submitted by Eric Vaitl <vaitl@viasat.com> and - * supports page table initialization. - */ - -#ifndef PAGE_TABLE_H -#define PAGE_TABLE_H - -extern void page_table_teardown(void); -extern void page_table_init(void); -extern int page_table_map(void *addr, unsigned long size, int cache_type); - -enum { - CACHE_WRITE_THROUGH, - CACHE_COPYBACK, - CACHE_NONE_SERIALIZED, - CACHE_NONE -}; -enum { - PTM_SUCCESS, - PTM_BAD_ADDR, - PTM_BAD_SIZE, - PTM_BAD_CACHE, - PTM_NO_TABLE_SPACE -}; - -#endif diff --git a/c/src/lib/libbsp/m68k/mvme162/include/tm27.h b/c/src/lib/libbsp/m68k/mvme162/include/tm27.h deleted file mode 100644 index 750408d009..0000000000 --- a/c/src/lib/libbsp/m68k/mvme162/include/tm27.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * @file - * @ingroup m68k_mvme162 - * @brief Implementations for interrupt mechanisms for Time Test 27 - */ - -/* - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef _RTEMS_TMTEST27 -#error "This is an RTEMS internal file you must not include directly." -#endif - -#ifndef __tm27_h -#define __tm27_h - -/* - * Define the interrupt mechanism for Time Test 27 - * - * NOTE: We use software interrupt 0 - */ - -#define MUST_WAIT_FOR_INTERRUPT 0 - -#define Install_tm27_vector( handler ) \ - set_vector( (handler), VBR1 * 0x10 + 0x8, 1 ); \ - lcsr->intr_level[2] |= 3; \ - lcsr->intr_ena |= 0x100; - -#define Cause_tm27_intr() lcsr->intr_soft_set |= 0x100 - -#define Clear_tm27_intr() lcsr->intr_clear |= 0x100 - -#define Lower_tm27_intr() /* empty */ - -#endif diff --git a/c/src/lib/libbsp/m68k/mvme162/preinstall.am b/c/src/lib/libbsp/m68k/mvme162/preinstall.am deleted file mode 100644 index fe2fdb9359..0000000000 --- a/c/src/lib/libbsp/m68k/mvme162/preinstall.am +++ /dev/null @@ -1,76 +0,0 @@ -## Automatically generated by ampolish3 - Do not edit - -if AMPOLISH3 -$(srcdir)/preinstall.am: Makefile.am - $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am -endif - -PREINSTALL_DIRS = -DISTCLEANFILES += $(PREINSTALL_DIRS) - -all-am: $(PREINSTALL_FILES) - -PREINSTALL_FILES = -CLEANFILES = $(PREINSTALL_FILES) - -all-local: $(TMPINSTALL_FILES) - -TMPINSTALL_FILES = -CLEANFILES += $(TMPINSTALL_FILES) - -$(PROJECT_LIB)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_LIB) - @: > $(PROJECT_LIB)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp) - -$(PROJECT_INCLUDE)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE) - @: > $(PROJECT_INCLUDE)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp) - -$(PROJECT_INCLUDE)/bsp/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp - @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp) - -$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs -PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs - -$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h - -$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h - -$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h - -$(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h - -$(PROJECT_INCLUDE)/page_table.h: include/page_table.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/page_table.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/page_table.h - -$(PROJECT_INCLUDE)/rtems/zilog/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE)/rtems/zilog - @: > $(PROJECT_INCLUDE)/rtems/zilog/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/rtems/zilog/$(dirstamp) - -$(PROJECT_INCLUDE)/rtems/zilog/z8036.h: ../../shared/include/zilog/z8036.h $(PROJECT_INCLUDE)/rtems/zilog/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/zilog/z8036.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/zilog/z8036.h - -$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT) -TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT) - -$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds - diff --git a/c/src/lib/libbsp/m68k/mvme162/bsp_specs b/c/src/lib/libbsp/m68k/mvme162/startup/bsp_specs index 87638cc027..87638cc027 100644 --- a/c/src/lib/libbsp/m68k/mvme162/bsp_specs +++ b/c/src/lib/libbsp/m68k/mvme162/startup/bsp_specs diff --git a/c/src/lib/libbsp/m68k/mvme167/Makefile.am b/c/src/lib/libbsp/m68k/mvme167/Makefile.am index a295731802..fdea7cb506 100644 --- a/c/src/lib/libbsp/m68k/mvme167/Makefile.am +++ b/c/src/lib/libbsp/m68k/mvme167/Makefile.am @@ -4,26 +4,18 @@ EXTRA_DIST = include $(top_srcdir)/../../../../automake/compile.am include $(top_srcdir)/../../bsp.am -include_bspdir = $(includedir)/bsp +dist_project_lib_DATA = startup/bsp_specs -dist_project_lib_DATA = bsp_specs - -include_HEADERS = include/bsp.h -include_HEADERS += include/tm27.h - -nodist_include_HEADERS = include/bspopts.h -nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h DISTCLEANFILES = include/bspopts.h noinst_PROGRAMS = -include_HEADERS += include/page_table.h EXTRA_DIST += ../../m68k/shared/start/start.S start.$(OBJEXT): ../../m68k/shared/start/start.S $(CPPASCOMPILE) -o $@ -c $< project_lib_DATA = start.$(OBJEXT) -dist_project_lib_DATA += startup/linkcmds +project_lib_DATA += linkcmds noinst_LIBRARIES = libbsp.a libbsp_a_SOURCES = @@ -63,5 +55,5 @@ endif EXTRA_DIST += times -include $(srcdir)/preinstall.am include $(top_srcdir)/../../../../automake/local.am +include $(srcdir)/../../../../../../bsps/m68k/mvme167/headers.am diff --git a/c/src/lib/libbsp/m68k/mvme167/configure.ac b/c/src/lib/libbsp/m68k/mvme167/configure.ac index d93f1b4ae5..20120fc1b9 100644 --- a/c/src/lib/libbsp/m68k/mvme167/configure.ac +++ b/c/src/lib/libbsp/m68k/mvme167/configure.ac @@ -4,6 +4,9 @@ AC_PREREQ([2.69]) AC_INIT([rtems-c-src-lib-libbsp-m68k-mvme167],[_RTEMS_VERSION],[https://devel.rtems.org/newticket]) AC_CONFIG_SRCDIR([make/custom/mvme167.cfg]) RTEMS_TOP(../../../../../..) +RTEMS_SOURCE_TOP +RTEMS_BUILD_TOP +RTEMS_BSP_LINKCMDS RTEMS_CANONICAL_TARGET_CPU AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2]) diff --git a/c/src/lib/libbsp/m68k/mvme167/include/bsp.h b/c/src/lib/libbsp/m68k/mvme167/include/bsp.h deleted file mode 100644 index d04b4f3952..0000000000 --- a/c/src/lib/libbsp/m68k/mvme167/include/bsp.h +++ /dev/null @@ -1,318 +0,0 @@ -/** - * @file - * - * Following defines must reflect the setup of the particular MVME167. - * All page references are to the MVME166/MVME167/MVME187 Single Board - * Computer Programmer's Reference Guide (MVME187PG/D2) with the April - * 1993 supplements/addenda (MVME187PG/D2A1). - */ - -/* - * COPYRIGHT (c) 1989-2012. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - * - * Modifications of respective RTEMS file: - * Copyright (c) 1998, National Research Council of Canada - */ - -#ifndef LIBBSP_M68K_MVME167_BSP_H -#define LIBBSP_M68K_MVME167_BSP_H - -#include <bspopts.h> -#include <bsp/default-initial-extension.h> - -#include <rtems.h> -#include <rtems/bspIo.h> - -#include <mvme16x_hw.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/* GCSR is in mvme16x_hw.h */ -/* LCSR is in mvme16x_hw.h */ -/* i82596 is in mvme16x_hw.h */ -/* NVRAM is in mvme16x_hw.h */ - -#if 0 -/* - * Representation of the PCCchip2 - */ -typedef volatile struct pccchip2_regs_ { - unsigned char chip_id; /* 0xFFF42000 */ - unsigned char chip_revision; /* 0xFFF42001 */ - unsigned char gen_control; /* 0xFFF42002 */ - unsigned char vector_base; /* 0xFFF42003 */ - unsigned long timer_cmp_1; /* 0xFFF42004 */ - unsigned long timer_cnt_1; /* 0xFFF42008 */ - unsigned long timer_cmp_2; /* 0xFFF4200C */ - unsigned long timer_cnt_2; /* 0xFFF42010 */ - unsigned char LSB_prescaler_count;/* 0xFFF42014 */ - unsigned char prescaler_clock_adjust; /* 0xFFF42015 */ - unsigned char timer_ctl_2; /* 0xFFF42016 */ - unsigned char timer_ctl_1; /* 0xFFF42017 */ - unsigned char gpi_int_ctl; /* 0xFFF42018 */ - unsigned char gpio_ctl; /* 0xFFF42019 */ - unsigned char timer_int_ctl_2; /* 0xFFF4201A */ - unsigned char timer_int_ctl_1; /* 0xFFF4201B */ - unsigned char SCC_error; /* 0xFFF4201C */ - unsigned char SCC_modem_int_ctl; /* 0xFFF4201D */ - unsigned char SCC_tx_int_ctl; /* 0xFFF4201E */ - unsigned char SCC_rx_int_ctl; /* 0xFFF4201F */ - unsigned char reserved1[3]; - unsigned char modem_piack; /* 0xFFF42023 */ - unsigned char reserved2; - unsigned char tx_piack; /* 0xFFF42025 */ - unsigned char reserved3; - unsigned char rx_piack; /* 0xFFF42027 */ - unsigned char LANC_error; /* 0xFFF42028 */ - unsigned char reserved4; - unsigned char LANC_int_ctl; /* 0xFFF4202A */ - unsigned char LANC_berr_ctl; /* 0xFFF4202B */ - unsigned char SCSI_error; /* 0xFFF4202C */ - unsigned char reserved5[2]; - unsigned char SCSI_int_ctl; /* 0xFFF4202F */ - unsigned char print_ack_int_ctl; /* 0xFFF42030 */ - unsigned char print_fault_int_ctl;/* 0xFFF42031 */ - unsigned char print_sel_int_ctl; /* 0xFFF42032 */ - unsigned char print_pe_int_ctl; /* 0xFFF42033 */ - unsigned char print_busy_int_ctl; /* 0xFFF42034 */ - unsigned char reserved6; - unsigned char print_input_status; /* 0xFFF42036 */ - unsigned char print_ctl; /* 0xFFF42037 */ - unsigned char chip_speed; /* 0xFFF42038 */ - unsigned char reserved7; - unsigned char print_data; /* 0xFFF4203A */ - unsigned char reserved8[3]; - unsigned char int_level; /* 0xFFF4203E */ - unsigned char int_mask; /* 0xFFF4203F */ -} pccchip2_regs; - -/* - * Base address of the PCCchip2. - * This is not configurable in the MVME167. - */ -#define pccchip2 ((pccchip2_regs * const) 0xFFF42000) - -#endif -/* - * The MVME167 is equiped with one or two MEMC040 memory controllers at - * 0xFFF43000 and 0xFFF43100. This port assumes that the controllers - * were initialized by 167Bug. - */ -typedef volatile struct memc040_regs_ { - unsigned char chip_id; /* 0xFFF43000/0xFFF43100 */ - unsigned char reserved1[3]; - unsigned char chip_revision; /* 0xFFF43004/0xFFF43104 */ - unsigned char reserved2[3]; - unsigned char mem_config; /* 0xFFF43008/0xFFF43108 */ - unsigned char reserved3[3]; - unsigned char alt_status; /* 0xFFF4300C/0xFFF4310C */ - unsigned char reserved4[3]; - unsigned char alt_ctl; /* 0xFFF43010/0xFFF43110 */ - unsigned char reserved5[3]; - unsigned char base_addr; /* 0xFFF43014/0xFFF43114 */ - unsigned char reserved6[3]; - unsigned char ram_ctl; /* 0xFFF43018/0xFFF43118 */ - unsigned char reserved7[3]; - unsigned char bus_clk; /* 0xFFF4301C/0xFFF4311C */ -} memc040_regs; - -/* - * Base address of the MEMC040s. - * This is not configurable in the MVME167. - */ -#define memc040_1 ((memc040_regs * const) 0xFFF43000) -#define memc040_2 ((memc040_regs * const) 0xFFF43100) - -/* - * The MVME167 may be equiped with error-correcting RAM cards. In this case, - * each MEMC040 is replaced by two MCECC ECC DRAM controllers. This port - * assumes that these controllers, if present, are initialized by 167Bug. - * They do not appear to hold information of interest at this time, so they - * are not described. However, each MCECC pair lives at the same address as - * the MEMC040 is replaces. The first eight registers of the MCECC are - * nearly identical to the ones of the MEMC040, and the memc040_X structures - * can be used to read those first eight registers. - */ - -/* - * Representation of the Cirrus Logic CL-CD2401 Multi-Protocol Controller - */ -typedef volatile struct cd2401_regs_ { - unsigned char reserved1[7]; - unsigned char cor7; /* 0xFFF45007 - Channel Option 7 */ - unsigned char reserved2; - unsigned char livr; /* 0xFFF45009 - Local Interrupt Vector */ - unsigned char reserved3[6]; - unsigned char cor1; /* 0xFFF45010 - Channel Option 1 */ - unsigned char ier; /* 0xFFF45011 - Interrupt Enable */ - unsigned char stcr; /* 0xFFF45012 - Special Transmit Command */ - unsigned char ccr; /* 0xFFF45013 - Channel Command */ - unsigned char cor5; /* 0xFFF45014 - Channel Option 5 */ - unsigned char cor4; /* 0xFFF45015 - Channel Option 4 */ - unsigned char cor3; /* 0xFFF45016 - Channel Option 3 */ - unsigned char cor2; /* 0xFFF45017 - Channel Option 2 */ - unsigned char cor6; /* 0xFFF45018 - Channel Option 6 */ - unsigned char dmabsts; /* 0xFFF45019 - DMA Buffer Status */ - unsigned char csr; /* 0xFFF4501A - Channel Status */ - unsigned char cmr; /* 0xFFF4501B - Channel Mode */ - union { - struct { - unsigned char schr4; /* 0xFFF4501C - Special Character 4 */ - unsigned char schr3; /* 0xFFF4501D - Special Character 3 */ - unsigned char schr2; /* 0xFFF4501E - Special Character 2 */ - unsigned char schr1; /* 0xFFF4501F - Special Character 1 */ - } async; - struct { - unsigned char rfar4; /* 0xFFF4501C - Receive Frame Address 4 */ - unsigned char rfar3; /* 0xFFF4501D - Receive Frame Address 3 */ - unsigned char rfar2; /* 0xFFF4501E - Receive Frame Address 2 */ - unsigned char rfar1; /* 0xFFF4501F - Receive Frame Address 1 */ - } sync; - } u1; - unsigned char reserved4[2]; - unsigned char scrh; /* 0xFFF45022 - Special Character Range High */ - unsigned char scrl; /* 0xFFF45023 - Special Character Range Low */ - union { - struct { - unsigned short rtpr; /* 0xFFF45024 - Receive Timeout Period */ - } w; - struct { - unsigned char rtprh; /* 0xFFF45024 - Receive Timeout Period High */ - unsigned char rtprl; /* 0xFFF45025 - Receive Timeout Period Low */ - } b; - } u2; - unsigned char licr; /* 0xFFF45026 - Local Interrupt Channel */ - unsigned char reserved5[2]; - union { - struct { - unsigned char ttr; /* 0xFFF45029 - Transmit Timer */ - } async; - struct { - unsigned char gt2; /* 0xFFF45029 - General Timer 2 */ - } sync; - } u3; - union { - struct { - unsigned short gt1; /* 0xFFF4502A - General Timer 1 */ - } w; - struct { - unsigned char gt1h; /* 0xFFF4502A - General Timer 2 High */ - unsigned char gt1l; /* 0xFFF4502B - General Timer 1 Low */ - } b; - } u4; - unsigned char reserved6[2]; - unsigned char lnxt; /* 0xFF4502E - LNext Character */ - unsigned char reserved7; - unsigned char rfoc; /* 0xFFF45030 - Receive FIFO Output Count */ - unsigned char reserved8[7]; - unsigned short tcbadru; /* 0xFF45038 - Transmit Current Buffer Address Upper */ - unsigned short tcbadrl; /* 0xFF4503A - Transmit Current Buffer Address Lower */ - unsigned short rcbadru; /* 0xFF4503C - Receive Current Buffer Address Upper */ - unsigned short rcbadrl; /* 0xFF4503E - Receive Current Buffer Address Lower */ - unsigned short arbadru; /* 0xFF45040 - A Receive Buffer Address Upper */ - unsigned short arbardl; /* 0xFF45042 - A Receive Buffer Address Lower */ - unsigned short brbadru; /* 0xFF45044 - B Receive Buffer Address Upper */ - unsigned short brbadrl; /* 0xFF45046 - B Receive Buffer Address Lower */ - unsigned short brbcnt; /* 0xFF45048 - B Receive Buffer Byte Count */ - unsigned short arbcnt; /* 0xFF4504A - A Receive Buffer Byte Count */ - unsigned short reserved9; - unsigned char brbsts; /* 0xFF4504E - B Receive Buffer Status */ - unsigned char arbsts; /* 0xFF4504F - A Receive Buffer Status */ - unsigned short atbadru; /* 0xFF45050 - A Transmit Buffer Address Upper */ - unsigned short atbadrl; /* 0xFF45052 - A Transmit Buffer Address Lower */ - unsigned short btbadru; /* 0xFF45054 - B Transmit Buffer Address Upper */ - unsigned short btbadrl; /* 0xFF45056 - B Transmit Buffer Address Lower */ - unsigned short btbcnt; /* 0xFF45058 - B Transmit Buffer Byte Count */ - unsigned short atbcnt; /* 0xFF4505A - A Transmit Buffer Byte Count */ - unsigned short reserved10; - unsigned char btbsts; /* 0xFF4505E - B Transmit Buffer Status */ - unsigned char atbsts; /* 0xFF4505F - A Transmit Buffer Status */ - unsigned char reserved11[32]; - unsigned char tftc; /* 0xFFF45080 - Transmit FIFO Transfer Count */ - unsigned char gfrcr; /* 0xFFF45081 - Global Firmware Revision Code */ - unsigned char reserved12[2]; - unsigned char reoir; /* 0xFFF45084 - Receive End Of Interrupt */ - unsigned char teoir; /* 0xFFF45085 - Transmit End Of Interrupt */ - unsigned char meoir; /* 0xFFF45086 - Modem End Of Interrupt */ - union { - struct { - unsigned short risr; /* 0xFFF45088 - Receive Interrupt Status */ - } w; - struct { - unsigned char risrh; /* 0xFFF45088 - Receive Interrupt Status High */ - unsigned char risrl; /* 0xFFF45089 - Receive Interrupt Status Low */ - } b; - } u5; - unsigned char tisr; /* 0xFFF4508A - Transmit Interrupt Status */ - unsigned char misr; /* 0xFFF4508B - Modem/Timer Interrupt Status */ - unsigned char reserved13[2]; - unsigned char bercnt; /* 0xFFF4508E - Bus Error Retry Count */ - unsigned char reserved14[49]; - unsigned char tcor; /* 0xFFF450C0 - Transmit Clock Option */ - unsigned char reserved15[2]; - unsigned char tbpr; /* 0xFFF450C3 - Transmit Baud Rate Period */ - unsigned char reserved16[4]; - unsigned char rcor; /* 0xFFF450C8 - Receive Clock Option */ - unsigned char reserved17[2]; - unsigned char rbpr; /* 0xFFF450CB - Receive Baud Rate Period */ - unsigned char reserved18[10]; - unsigned char cpsr; /* 0xFFF450D6 - CRC Polynomial Select */ - unsigned char reserved19[3]; - unsigned char tpr; /* 0xFFF450DA - Timer Period */ - unsigned char reserved20[3]; - unsigned char msvr_rts; /* 0xFFF450DE - Modem Signal Value - RTS */ - unsigned char msvr_dtr; /* 0xFFF450DF - Modem Signal Value - DTR */ - unsigned char tpilr; /* 0xFFF450E0 - Transmit Priority Interrupt Level */ - unsigned char rpilr; /* 0xFFF450E1 - Receive Priority Interrupt Level */ - unsigned char stk; /* 0xFFF450E2 - Stack */ - unsigned char mpilr; /* 0xFFF450E3 - Modem Priority Interrupt Level */ - unsigned char reserved21[8]; - unsigned char tir; /* 0xFFF450EC - Transmit Interrupt */ - unsigned char rir; /* 0xFFF450ED - Receive Interrupt */ - unsigned char car; /* 0xFFF450EE - Channel Access */ - unsigned char mir; /* 0xFFF450EF - Model Interrupt */ - unsigned char reserved22[6]; - unsigned char dmr; /* 0xFFF450F6 - DMA Mode */ - unsigned char reserved23; - unsigned char dr; /* 0xFFF450F8 - Receive/Transmit Data */ -} cd2401_regs; - -/* - * Base address of the CD2401. - * This is not configurable in the MVME167. - */ -#define cd2401 ((cd2401_regs * const) 0xFFF45000) - -/* CD2401 is clocked at 20 MHz */ -#define CD2401_CLK_RATE 20000000 - -/* BSP-wide functions */ - -rtems_isr_entry set_vector( - rtems_isr_entry handler, - rtems_vector_number vector, - int type -); - -#ifdef M167_INIT -#undef EXTERN -#define EXTERN -#else -#undef EXTERN -#define EXTERN extern -#endif - -extern void *M68Kvec[]; /* vector table address */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/c/src/lib/libbsp/m68k/mvme167/include/page_table.h b/c/src/lib/libbsp/m68k/mvme167/include/page_table.h deleted file mode 100644 index 2db5591729..0000000000 --- a/c/src/lib/libbsp/m68k/mvme167/include/page_table.h +++ /dev/null @@ -1,43 +0,0 @@ -/* page_table.h - * - * This file was submitted by Eric Vaitl <vaitl@viasat.com> and - * supports page table initialization. - * - * For now, we only use the transparent translation registers. Page tables - * may be set up in the future. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - * - * Modifications of respective RTEMS files: - * Copyright (c) 1998, National Research Council of Canada - */ - -#ifndef __PAGE_TABLE_H -#define __PAGE_TABLE_H - -#include <rtems.h> - -void page_table_teardown( void ); -void page_table_init( void ); - -enum { - CACHE_WRITE_THROUGH, - CACHE_COPYBACK, - CACHE_NONE_SERIALIZED, - CACHE_NONE -}; - -enum { - PTM_SUCCESS, - PTM_BAD_ADDR, - PTM_BAD_SIZE, - PTM_BAD_CACHE, - PTM_NO_TABLE_SPACE -}; - -#endif diff --git a/c/src/lib/libbsp/m68k/mvme167/include/tm27.h b/c/src/lib/libbsp/m68k/mvme167/include/tm27.h deleted file mode 100644 index 5b65311794..0000000000 --- a/c/src/lib/libbsp/m68k/mvme167/include/tm27.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * @file - * @ingroup m68k_mvme167 - * @brief Implementations for interrupt mechanisms for Time Test 27 - */ - -/* - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef _RTEMS_TMTEST27 -#error "This is an RTEMS internal file you must not include directly." -#endif - -#ifndef __tm27_h -#define __tm27_h - -/* - * Define the interrupt mechanism for Time Test 27 - * - * NOTE: We use software interrupt 0 - */ -#define MUST_WAIT_FOR_INTERRUPT 0 - -#define Install_tm27_vector( handler ) \ - set_vector( (handler), VBR1 * 0x10 + 0x8, 1 ); \ - lcsr->intr_level[2] |= 3; \ - lcsr->intr_ena |= 0x100 - -#define Cause_tm27_intr() lcsr->intr_soft_set |= 0x100 - -#define Clear_tm27_intr() lcsr->intr_clear |= 0x100 - -#define Lower_tm27_intr() /* empty */ - -#endif diff --git a/c/src/lib/libbsp/m68k/mvme167/preinstall.am b/c/src/lib/libbsp/m68k/mvme167/preinstall.am deleted file mode 100644 index 60f6c0ba9f..0000000000 --- a/c/src/lib/libbsp/m68k/mvme167/preinstall.am +++ /dev/null @@ -1,67 +0,0 @@ -## Automatically generated by ampolish3 - Do not edit - -if AMPOLISH3 -$(srcdir)/preinstall.am: Makefile.am - $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am -endif - -PREINSTALL_DIRS = -DISTCLEANFILES += $(PREINSTALL_DIRS) - -all-am: $(PREINSTALL_FILES) - -PREINSTALL_FILES = -CLEANFILES = $(PREINSTALL_FILES) - -all-local: $(TMPINSTALL_FILES) - -TMPINSTALL_FILES = -CLEANFILES += $(TMPINSTALL_FILES) - -$(PROJECT_LIB)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_LIB) - @: > $(PROJECT_LIB)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp) - -$(PROJECT_INCLUDE)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE) - @: > $(PROJECT_INCLUDE)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp) - -$(PROJECT_INCLUDE)/bsp/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp - @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp) - -$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs -PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs - -$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h - -$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h - -$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h - -$(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h - -$(PROJECT_INCLUDE)/page_table.h: include/page_table.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/page_table.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/page_table.h - -$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT) -TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT) - -$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds - diff --git a/c/src/lib/libbsp/m68k/mvme167/bsp_specs b/c/src/lib/libbsp/m68k/mvme167/startup/bsp_specs index 87638cc027..87638cc027 100644 --- a/c/src/lib/libbsp/m68k/mvme167/bsp_specs +++ b/c/src/lib/libbsp/m68k/mvme167/startup/bsp_specs diff --git a/c/src/lib/libbsp/m68k/preinstall.am b/c/src/lib/libbsp/m68k/preinstall.am deleted file mode 100644 index 2e2ec9e167..0000000000 --- a/c/src/lib/libbsp/m68k/preinstall.am +++ /dev/null @@ -1,42 +0,0 @@ -## Automatically generated by ampolish3 - Do not edit - -if AMPOLISH3 -$(srcdir)/preinstall.am: Makefile.am - $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am -endif - -PREINSTALL_DIRS = -DISTCLEANFILES = $(PREINSTALL_DIRS) - -all-am: $(PREINSTALL_FILES) - -PREINSTALL_FILES = -CLEANFILES = $(PREINSTALL_FILES) - -$(PROJECT_LIB)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_LIB) - @: > $(PROJECT_LIB)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp) - -$(PROJECT_INCLUDE)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE) - @: > $(PROJECT_INCLUDE)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp) - -$(PROJECT_INCLUDE)/bsp/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp - @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp) - -$(PROJECT_INCLUDE)/bsp/linker-symbols.h: shared/include/linker-symbols.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/linker-symbols.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/linker-symbols.h - -$(PROJECT_LIB)/linkcmds.base: shared/startup/linkcmds.base $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.base -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.base - -$(PROJECT_INCLUDE)/mvme16x_hw.h: shared/mvme/mvme16x_hw.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/mvme16x_hw.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/mvme16x_hw.h - diff --git a/c/src/lib/libbsp/m68k/shared/include/linker-symbols.h b/c/src/lib/libbsp/m68k/shared/include/linker-symbols.h deleted file mode 100644 index 8bf5ebfa07..0000000000 --- a/c/src/lib/libbsp/m68k/shared/include/linker-symbols.h +++ /dev/null @@ -1,84 +0,0 @@ -/** - * @file - * - * @ingroup bsp_linker - * - * @brief Symbols defined in linker command base file. - */ - -/* - * Copyright (c) 2008-2013 embedded brains GmbH. All rights reserved. - * - * embedded brains GmbH - * Dornierstr. 4 - * 82178 Puchheim - * Germany - * <info@embedded-brains.de> - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef LIBBSP_M68K_SHARED_LINKER_SYMBOLS_H -#define LIBBSP_M68K_SHARED_LINKER_SYMBOLS_H - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** - * @defgroup bsp_linker Linker Support - * - * @ingroup bsp_kit - * - * @brief Linker support. - * - * @{ - */ - -#ifndef ASM - #define LINKER_SYMBOL(sym) extern char sym []; -#else - #define LINKER_SYMBOL(sym) .extern sym -#endif - -LINKER_SYMBOL(bsp_vector0_begin) -LINKER_SYMBOL(bsp_vector0_end) -LINKER_SYMBOL(bsp_vector0_size) - -LINKER_SYMBOL(bsp_vector1_begin) -LINKER_SYMBOL(bsp_vector1_end) -LINKER_SYMBOL(bsp_vector1_size) - -LINKER_SYMBOL(bsp_section_text_begin) -LINKER_SYMBOL(bsp_section_text_end) -LINKER_SYMBOL(bsp_section_text_size) -LINKER_SYMBOL(bsp_section_text_load_begin) -LINKER_SYMBOL(bsp_section_text_load_end) - -LINKER_SYMBOL(bsp_section_data_begin) -LINKER_SYMBOL(bsp_section_data_end) -LINKER_SYMBOL(bsp_section_data_size) -LINKER_SYMBOL(bsp_section_data_load_begin) -LINKER_SYMBOL(bsp_section_data_load_end) - -LINKER_SYMBOL(bsp_section_bss_begin) -LINKER_SYMBOL(bsp_section_bss_end) -LINKER_SYMBOL(bsp_section_bss_size) - -LINKER_SYMBOL(bsp_section_work_begin) -LINKER_SYMBOL(bsp_section_work_end) -LINKER_SYMBOL(bsp_section_work_size) - -LINKER_SYMBOL(bsp_initstack_begin) -LINKER_SYMBOL(bsp_initstack_end) -LINKER_SYMBOL(bsp_initstack_size) - -/** @} */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* LIBBSP_M68K_SHARED_LINKER_SYMBOLS_H */ diff --git a/c/src/lib/libbsp/m68k/shared/mvme/mvme16x_hw.h b/c/src/lib/libbsp/m68k/shared/mvme/mvme16x_hw.h deleted file mode 100644 index 2ac595a0fa..0000000000 --- a/c/src/lib/libbsp/m68k/shared/mvme/mvme16x_hw.h +++ /dev/null @@ -1,274 +0,0 @@ -/** - * @file - * - * @ingroup m68k_mvme - * - * @brief MVME16x IO definitions - */ - -/* mvme16x_hw.h - * - * This include file contains all MVME16x board IO definitions - * and was derived by combining the common items in the - * mvme162 and mvme167 BSPs. - * - * COPYRIGHT (c) 1989-2000. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef __MVME16xHW_h -#define __MVME16xHW_h - -#include <bsp.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup m68k_mvme MVME16X IO Support - * - * @ingroup m68k_shared - * - * @brief IO Support Package - */ - -struct rtems_bsdnet_ifconfig; -int uti596_attach(struct rtems_bsdnet_ifconfig * pConfig, int attaching ); -#define RTEMS_BSP_NETWORK_DRIVER_NAME "uti1" -#define RTEMS_BSP_NETWORK_DRIVER_ATTACH uti596_attach - -/* - * This is NOT the base address of local RAM! - * This is the base local address of the VMEbus short I/O space. A local - * access to this space results in a A16 VMEbus I/O cycle. This base address - * is NOT configurable on the MVME167, although the types of VMEbus short I/O - * cycles generated when a cycle in the local 0xFFFF0000-0xFFFFFFFF address - * range is generated is under control of bits 8-15 of LCSR 0xFFF4002C. The - * GCSRs of other boards are accessible only through the VMEbus short I/O - * space. See pages 2-45 and 2-7. - */ -#define BOARD_BASE_ADDRESS 0xFFFF0000 - -/* - * This address must be added to the BOARD_BASE_ADDRESS to access the GCSR of - * other MVMEs in the group, i.e. it represents the offset of the GCSRs in the - * VMEbus short I/O space. It also should represent the group address of this - * MVME167! The group address is configurable, and must match the address - * programmed into the MVME167 through the 167Bug monitor. 0xCC is the address - * recommended by Motorola. It is arbitrary. - * See pages 2-42 and 2-97 to 2-104. - */ -#define GROUP_BASE_ADDRESS 0x0000CC00 - -/* - * Representation of the VMEchip2 LCSR. - * Could be made more detailed. - */ - -typedef volatile struct { - unsigned long slave_adr[2]; - unsigned long slave_trn[2]; - unsigned long slave_ctl; - unsigned long mastr_adr[4]; - unsigned long mastr_trn; - unsigned long mastr_att; - unsigned long mastr_ctl; - unsigned long dma_ctl_1; - unsigned long dma_ctl_2; - unsigned long dma_loc_cnt; - unsigned long dma_vme_cnt; - unsigned long dma_byte_cnt; - unsigned long dma_adr_cnt; - unsigned long dma_status; - unsigned long to_ctl; - unsigned long timer_cmp_1; - unsigned long timer_cnt_1; - unsigned long timer_cmp_2; - unsigned long timer_cnt_2; - unsigned long board_ctl; - unsigned long prescaler_cnt; - unsigned long intr_stat; - unsigned long intr_ena; - unsigned long intr_soft_set; - unsigned long intr_clear; - unsigned long intr_level[4]; - unsigned long vector_base; -} lcsr_regs; - -/* - * Base address of VMEchip2 LCSR - * Not configurable on the MVME167. - * XXX what about 162? - */ -#define lcsr ((lcsr_regs * const) 0xFFF40000) - -/* - * Vector numbers for the interrupts from the VMEchip2. Use the values - * "recommended" by Motorola. - * See pages 2-70 to 2-92, and table 2-3. - */ - -/* MIEN (Master Interrupt Enable) bit in LCSR 0xFFF40088. */ -#define MASK_INT 0x00800000 - -/* The content of VBR0 corresponds to "X" in table 2-3 */ -#define VBR0 0x6 - -/* The content of VBR1 corresponds to "Y" in table 2-3 */ -#define VBR1 0x7 - -/* - * Representation of the PCCchip2 - */ -typedef volatile struct pccchip2_regs_ { - unsigned char chip_id; /* 0xFFF42000 */ - unsigned char chip_revision; /* 0xFFF42001 */ - unsigned char gen_control; /* 0xFFF42002 */ - unsigned char vector_base; /* 0xFFF42003 */ - unsigned long timer_cmp_1; /* 0xFFF42004 */ - unsigned long timer_cnt_1; /* 0xFFF42008 */ - unsigned long timer_cmp_2; /* 0xFFF4200C */ - unsigned long timer_cnt_2; /* 0xFFF42010 */ - unsigned char LSB_prescaler_count;/* 0xFFF42014 */ - unsigned char prescaler_clock_adjust; /* 0xFFF42015 */ - unsigned char timer_ctl_2; /* 0xFFF42016 */ - unsigned char timer_ctl_1; /* 0xFFF42017 */ - unsigned char gpi_int_ctl; /* 0xFFF42018 */ - unsigned char gpio_ctl; /* 0xFFF42019 */ - unsigned char timer_int_ctl_2; /* 0xFFF4201A */ - unsigned char timer_int_ctl_1; /* 0xFFF4201B */ - unsigned char SCC_error; /* 0xFFF4201C */ - unsigned char SCC_modem_int_ctl; /* 0xFFF4201D */ - unsigned char SCC_tx_int_ctl; /* 0xFFF4201E */ - unsigned char SCC_rx_int_ctl; /* 0xFFF4201F */ - unsigned char reserved1[3]; - unsigned char modem_piack; /* 0xFFF42023 */ - unsigned char reserved2; - unsigned char tx_piack; /* 0xFFF42025 */ - unsigned char reserved3; - unsigned char rx_piack; /* 0xFFF42027 */ - unsigned char LANC_error; /* 0xFFF42028 */ - unsigned char reserved4; - unsigned char LANC_int_ctl; /* 0xFFF4202A */ - unsigned char LANC_berr_ctl; /* 0xFFF4202B */ - unsigned char SCSI_error; /* 0xFFF4202C */ - unsigned char reserved5[2]; - unsigned char SCSI_int_ctl; /* 0xFFF4202F */ - unsigned char print_ack_int_ctl; /* 0xFFF42030 */ - unsigned char print_fault_int_ctl;/* 0xFFF42031 */ - unsigned char print_sel_int_ctl; /* 0xFFF42032 */ - unsigned char print_pe_int_ctl; /* 0xFFF42033 */ - unsigned char print_busy_int_ctl; /* 0xFFF42034 */ - unsigned char reserved6; - unsigned char print_input_status; /* 0xFFF42036 */ - unsigned char print_ctl; /* 0xFFF42037 */ - unsigned char chip_speed; /* 0xFFF42038 */ - unsigned char reserved7; - unsigned char print_data; /* 0xFFF4203A */ - unsigned char reserved8[3]; - unsigned char int_level; /* 0xFFF4203E */ - unsigned char int_mask; /* 0xFFF4203F */ -} pccchip2_regs; - -/* - * Base address of the PCCchip2. - * This is not configurable in the MVME167. - */ -#define pccchip2 ((pccchip2_regs * const) 0xFFF42000) - -/* - * On the MVME162, we have the mcchip and the pccchip2 on - * the 167. They are similar but different enough where - * we have to reconcile them later. - */ - -/* - * Vector numbers for the interrupts from the PCCchip2. Use the values - * "recommended" by Motorola. - * See page 3-15. - */ -#define PCCCHIP2_VBR 0x5 - -/* - * The following registers are located in the VMEbus short - * IO space and respond to address modifier codes $29 and $2D. - * On FORCE CPU use address gcsr_vme and device /dev/vme16d32. - */ - -typedef volatile struct { - unsigned char chip_revision; - unsigned char chip_id; - unsigned char lmsig; - unsigned char board_scr; - unsigned short gpr[6]; -} gcsr_regs; - -#define gcsr_vme ((gcsr_regs * const) (GROUP_BASE_ADDRESS + BOARD_BASE_ADDRESS)) -#define gcsr ((gcsr_regs * const) 0xFFF40100) - -/* - * Representation of 82596CA LAN controller: Memory Map - */ -typedef volatile struct i82596_regs_ { - unsigned short port_lower; /* 0xFFF46000 */ - unsigned short port_upper; /* 0xFFF46002 */ - unsigned long chan_attn; /* 0xFFF46004 */ -} i82596_regs; - -/* - * Base address of the 82596. - */ - -#define i82596 ((i82596_regs * const) 0xFFF46000) - -/* - * Representation of initialization data in NVRAM - */ - -#if defined(mvme167) -typedef volatile struct nvram_config_ { - unsigned char cache_mode; /* 0xFFFC0000 */ - unsigned char console_mode; /* 0xFFFC0001 */ - unsigned char console_printk_port; /* 0xFFFC0002 */ - unsigned char pad1; /* 0xFFFC0003 */ - unsigned long ipaddr; /* 0xFFFC0004 */ - unsigned long netmask; /* 0xFFFC0008 */ - unsigned char enaddr[6]; /* 0xFFFC000C */ - unsigned short processor_id; /* 0xFFFC0012 */ - unsigned long rma_start; /* 0xFFFC0014 */ - unsigned long vma_start; /* 0xFFFC0018 */ - unsigned long ramsize; /* 0xFFFC001C */ -} nvram_config; - -/* - * Pointer to the base of User Area NVRAM - */ - -#define nvram ((nvram_config * const) 0xFFFC0000) - -#endif - -/* - * Flag to indicate if J1-4 is on (and parameters should be - * sought in User Area NVRAM) - * - * NOTE: If NVRAM has bad settings, the you want to disable this - * on the MVME167. - */ -#if defined(mvme167) - #define NVRAM_CONFIGURE \ - ( !( ( (unsigned char)(lcsr->vector_base & 0xFF) ) & 0x10 ) ) -#else - #define NVRAM_CONFIGURE 0 -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/c/src/lib/libbsp/m68k/uC5282/Makefile.am b/c/src/lib/libbsp/m68k/uC5282/Makefile.am index 86b75950dd..5572d3f3dc 100644 --- a/c/src/lib/libbsp/m68k/uC5282/Makefile.am +++ b/c/src/lib/libbsp/m68k/uC5282/Makefile.am @@ -4,15 +4,8 @@ EXTRA_DIST = include $(top_srcdir)/../../../../automake/compile.am include $(top_srcdir)/../../bsp.am -include_bspdir = $(includedir)/bsp +dist_project_lib_DATA = startup/bsp_specs -dist_project_lib_DATA = bsp_specs - -include_HEADERS = include/bsp.h -include_HEADERS += include/tm27.h - -nodist_include_HEADERS = include/bspopts.h -nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h DISTCLEANFILES = include/bspopts.h noinst_PROGRAMS = @@ -22,7 +15,7 @@ start.$(OBJEXT): start/start.S $(CPPASCOMPILE) -o $@ -c $< project_lib_DATA = start.$(OBJEXT) -dist_project_lib_DATA += startup/linkcmds +project_lib_DATA += linkcmds noinst_LIBRARIES = libbsp.a libbsp_a_SOURCES = @@ -57,5 +50,5 @@ if HAS_NETWORKING libbsp_a_LIBADD += network.rel endif -include $(srcdir)/preinstall.am include $(top_srcdir)/../../../../automake/local.am +include $(srcdir)/../../../../../../bsps/m68k/uC5282/headers.am diff --git a/c/src/lib/libbsp/m68k/uC5282/configure.ac b/c/src/lib/libbsp/m68k/uC5282/configure.ac index a01db32e8f..3025976b40 100644 --- a/c/src/lib/libbsp/m68k/uC5282/configure.ac +++ b/c/src/lib/libbsp/m68k/uC5282/configure.ac @@ -4,6 +4,9 @@ AC_PREREQ([2.69]) AC_INIT([rtems-c-src-lib-libbsp-m68k-uC5282],[_RTEMS_VERSION],[https://devel.rtems.org/newticket]) AC_CONFIG_SRCDIR([make/custom/uC5282.cfg]) RTEMS_TOP(../../../../../..) +RTEMS_SOURCE_TOP +RTEMS_BUILD_TOP +RTEMS_BSP_LINKCMDS RTEMS_CANONICAL_TARGET_CPU AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2]) diff --git a/c/src/lib/libbsp/m68k/uC5282/include/bsp.h b/c/src/lib/libbsp/m68k/uC5282/include/bsp.h deleted file mode 100644 index a887cc0385..0000000000 --- a/c/src/lib/libbsp/m68k/uC5282/include/bsp.h +++ /dev/null @@ -1,175 +0,0 @@ -/* - * uC5282 BSP header file - * - * Author: W. Eric Norum <norume@aps.anl.gov> - * - * COPYRIGHT (c) 2005. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef LIBBSP_M68K_UC5282_BSP_H -#define LIBBSP_M68K_UC5282_BSP_H - -#include <bspopts.h> -#include <bsp/default-initial-extension.h> - -#include <rtems.h> -#include <rtems/bspIo.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/***************************************************************************/ -/** BSP Configuration **/ -/* - * Uncomment to use instruction/data cache - * Leave commented to use instruction-only cache - */ -#define RTEMS_MCF5282_BSP_ENABLE_DATA_CACHE - -/***************************************************************************/ -/** Hardware data structure headers **/ -#include <mcf5282/mcf5282.h> /* internal MCF5282 modules */ - -/***************************************************************************/ -/** Network driver configuration **/ -struct rtems_bsdnet_ifconfig; -extern int rtems_fec_driver_attach (struct rtems_bsdnet_ifconfig *config, int attaching ); -#define RTEMS_BSP_NETWORK_DRIVER_NAME "fs1" -#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_fec_driver_attach - -/***************************************************************************/ -/** User Definable configuration **/ - -/* define which port the console should use - all other ports are then defined as general purpose */ -#define CONSOLE_PORT 0 - -/* functions */ - -typedef struct { - unsigned int l; - void *v; -} bsp_mnode_t; - -#define RTEMS_BSP_PGM_ERASE_FIRST 0x1 -#define RTEMS_BSP_PGM_RESET_AFTER 0x2 -#define RTEMS_BSP_PGM_EXEC_AFTER 0x4 -#define RTEMS_BSP_PGM_HALT_AFTER 0x8 - -uint32_t bsp_get_CPU_clock_speed(void); -rtems_status_code bsp_allocate_interrupt(int level, int priority); -int bsp_sysReset(int flags); -int bsp_program(bsp_mnode_t *chain, int flags); -unsigned const char *bsp_gethwaddr(int a); -const char *bsp_getbenv(const char *a); -int bsp_flash_erase_range(volatile unsigned short *flashptr, int start, int end); -int bsp_flash_write_range(volatile unsigned short *flashptr, bsp_mnode_t *chain, int offset); - -rtems_isr_entry set_vector( - rtems_isr_entry handler, - rtems_vector_number vector, - int type -); - -/* - * Interrupt assignments - * Highest-priority listed first - */ -#define FEC_IRQ_LEVEL 4 -#define FEC_IRQ_RX_PRIORITY 7 -#define FEC_IRQ_TX_PRIORITY 6 - -#define PIT3_IRQ_LEVEL 4 -#define PIT3_IRQ_PRIORITY 0 - -#define UART0_IRQ_LEVEL 3 -#define UART0_IRQ_PRIORITY 7 -#define UART1_IRQ_LEVEL 3 -#define UART1_IRQ_PRIORITY 6 -#define UART2_IRQ_LEVEL 3 -#define UART2_IRQ_PRIORITY 5 - -/* - * Fake VME support - * This makes it easier to use EPICS driver support on this BSP. - */ -#define VME_AM_STD_SUP_ASCENDING 0x3f -#define VME_AM_STD_SUP_PGM 0x3e -#define VME_AM_STD_USR_ASCENDING 0x3b -#define VME_AM_STD_USR_PGM 0x3a -#define VME_AM_STD_SUP_DATA 0x3d -#define VME_AM_STD_USR_DATA 0x39 -#define VME_AM_EXT_SUP_ASCENDING 0x0f -#define VME_AM_EXT_SUP_PGM 0x0e -#define VME_AM_EXT_USR_ASCENDING 0x0b -#define VME_AM_EXT_USR_PGM 0x0a -#define VME_AM_EXT_SUP_DATA 0x0d -#define VME_AM_EXT_USR_DATA 0x09 -#define VME_AM_SUP_SHORT_IO 0x2d -#define VME_AM_USR_SHORT_IO 0x29 - -/* - * 'Extended' BSP support - */ -rtems_status_code bspExtInit(void); -typedef void (*BSP_VME_ISR_t)(void *usrArg, unsigned long vector); -BSP_VME_ISR_t BSP_getVME_isr(unsigned long vector, void **parg); -int BSP_installVME_isr(unsigned long vector, BSP_VME_ISR_t handler, void *usrArg); -int BSP_removeVME_isr(unsigned long vector, BSP_VME_ISR_t handler, void *usrArg); -int BSP_enableVME_int_lvl(unsigned int level); -int BSP_disableVME_int_lvl(unsigned int level); -int BSP_vme2local_adrs(unsigned am, unsigned long vmeaddr, unsigned long *plocaladdr); - -/* - * This BSP provides its own IDLE task to override the RTEMS one. - * So we prototype it and define the constant confdefs.h expects - * to configure a BSP specific one. - */ -void *bsp_idle_thread( uintptr_t ignored ); -#define BSP_IDLE_TASK_BODY bsp_idle_thread - -/* - * The custom IDLE task keeps some idle statistics. - */ -int bsp_cpu_load_percentage(void); - -/* - * This is a helper method to determine the cause of a reset. - */ -void bsp_reset_cause(char *buf, size_t capacity); - -/* - * SRAM. The BSP uses SRAM for maintaining some clock-driver data - * and for ethernet descriptors (and the initial stack during - * early boot). - */ - -typedef struct mcf5282BufferDescriptor_ { - volatile uint16_t status; - uint16_t length; - volatile void *buffer; -} mcf5282BufferDescriptor_t; - -extern struct { - uint32_t idle_counter; - uint32_t filtered_idle; - uint32_t max_idle_count; - uint32_t pitc_per_tick; - uint32_t nsec_per_pitc; - uint32_t pad[3]; /* align to 16-bytes for descriptors */ - mcf5282BufferDescriptor_t fec_descriptors[]; - /* buffer descriptors are allocated from here */ - - /* initial stack is at top of SRAM (start.S) */ -} __SRAMBASE; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/c/src/lib/libbsp/m68k/uC5282/include/tm27.h b/c/src/lib/libbsp/m68k/uC5282/include/tm27.h deleted file mode 100644 index 9a24da3755..0000000000 --- a/c/src/lib/libbsp/m68k/uC5282/include/tm27.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * @file - * @ingroup m68k_uC5282 - * @brief Implementations for interrupt mechanisms for Time Test 27 - */ - -/* - * Author: W. Eric Norum <norume@aps.anl.gov> - * - * COPYRIGHT (c) 2005-2014. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef _RTEMS_TMTEST27 -#error "This is an RTEMS internal file you must not include directly." -#endif - -#ifndef __tm27_h -#define __tm27_h - -/* - * Stuff for Time Test 27 - * Don't bother with hardware -- just use a software-interrupt - */ - -#define MUST_WAIT_FOR_INTERRUPT 0 - -#define Install_tm27_vector( handler ) set_vector( (handler), 35, 1 ) - -#define Cause_tm27_intr() asm volatile ("trap #3"); - -#define Clear_tm27_intr() /* empty */ - -#define Lower_tm27_intr() /* empty */ - -#endif diff --git a/c/src/lib/libbsp/m68k/uC5282/preinstall.am b/c/src/lib/libbsp/m68k/uC5282/preinstall.am deleted file mode 100644 index 0bdb6554d6..0000000000 --- a/c/src/lib/libbsp/m68k/uC5282/preinstall.am +++ /dev/null @@ -1,63 +0,0 @@ -## Automatically generated by ampolish3 - Do not edit - -if AMPOLISH3 -$(srcdir)/preinstall.am: Makefile.am - $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am -endif - -PREINSTALL_DIRS = -DISTCLEANFILES += $(PREINSTALL_DIRS) - -all-am: $(PREINSTALL_FILES) - -PREINSTALL_FILES = -CLEANFILES = $(PREINSTALL_FILES) - -all-local: $(TMPINSTALL_FILES) - -TMPINSTALL_FILES = -CLEANFILES += $(TMPINSTALL_FILES) - -$(PROJECT_LIB)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_LIB) - @: > $(PROJECT_LIB)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp) - -$(PROJECT_INCLUDE)/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE) - @: > $(PROJECT_INCLUDE)/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp) - -$(PROJECT_INCLUDE)/bsp/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp - @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp) - -$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs -PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs - -$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h - -$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h - -$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h - -$(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h - -$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT) -TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT) - -$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds -PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds - diff --git a/c/src/lib/libbsp/m68k/uC5282/bsp_specs b/c/src/lib/libbsp/m68k/uC5282/startup/bsp_specs index 3a20757667..3a20757667 100644 --- a/c/src/lib/libbsp/m68k/uC5282/bsp_specs +++ b/c/src/lib/libbsp/m68k/uC5282/startup/bsp_specs |