diff options
Diffstat (limited to 'c/src/lib/libbsp/arm/gumstix')
-rw-r--r-- | c/src/lib/libbsp/arm/gumstix/Makefile.am | 20 | ||||
-rw-r--r-- | c/src/lib/libbsp/arm/gumstix/configure.ac | 3 | ||||
-rw-r--r-- | c/src/lib/libbsp/arm/gumstix/include/bsp.h | 84 | ||||
-rw-r--r-- | c/src/lib/libbsp/arm/gumstix/include/bsp/irq.h | 29 | ||||
-rw-r--r-- | c/src/lib/libbsp/arm/gumstix/include/ffuart.h | 48 | ||||
-rw-r--r-- | c/src/lib/libbsp/arm/gumstix/include/pxa255.h | 128 | ||||
-rw-r--r-- | c/src/lib/libbsp/arm/gumstix/include/tm27.h | 1 | ||||
-rw-r--r-- | c/src/lib/libbsp/arm/gumstix/preinstall.am | 87 | ||||
-rw-r--r-- | c/src/lib/libbsp/arm/gumstix/startup/bsp_specs (renamed from c/src/lib/libbsp/arm/gumstix/bsp_specs) | 0 |
9 files changed, 6 insertions, 394 deletions
diff --git a/c/src/lib/libbsp/arm/gumstix/Makefile.am b/c/src/lib/libbsp/arm/gumstix/Makefile.am index 5fb8d708bf..d4793d6acd 100644 --- a/c/src/lib/libbsp/arm/gumstix/Makefile.am +++ b/c/src/lib/libbsp/arm/gumstix/Makefile.am @@ -4,19 +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 -include_HEADERS += include/pxa255.h -include_HEADERS += include/ffuart.h - -include_bsp_HEADERS = - -nodist_include_HEADERS = include/bspopts.h -nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h DISTCLEANFILES = include/bspopts.h noinst_PROGRAMS = @@ -26,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 @@ -48,9 +37,6 @@ libbsp_a_SOURCES += console/uarts.c ../../shared/console.c \ ../../shared/console_read.c ../../shared/console_write.c libbsp_a_SOURCES += console/ffuart.c # IRQ -include_bsp_HEADERS += ../../shared/include/irq-generic.h \ - ../../shared/include/irq-info.h -include_bsp_HEADERS += include/bsp/irq.h libbsp_a_SOURCES += ../../shared/src/irq-default-handler.c libbsp_a_SOURCES += ../../shared/src/irq-generic.c libbsp_a_SOURCES += ../../shared/src/irq-info.c @@ -84,5 +70,5 @@ libbsp_a_LIBADD += rtl8019.rel endif endif -include $(srcdir)/preinstall.am include $(top_srcdir)/../../../../automake/local.am +include $(srcdir)/../../../../../../bsps/arm/gumstix/headers.am diff --git a/c/src/lib/libbsp/arm/gumstix/configure.ac b/c/src/lib/libbsp/arm/gumstix/configure.ac index 037990be57..299085bb17 100644 --- a/c/src/lib/libbsp/arm/gumstix/configure.ac +++ b/c/src/lib/libbsp/arm/gumstix/configure.ac @@ -4,6 +4,9 @@ AC_PREREQ([2.69]) AC_INIT([rtems-c-src-lib-libbsp-arm-gumstix],[_RTEMS_VERSION],[https://devel.rtems.org/newticket]) AC_CONFIG_SRCDIR([make/custom/gumstix.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/arm/gumstix/include/bsp.h b/c/src/lib/libbsp/arm/gumstix/include/bsp.h deleted file mode 100644 index caee8f9e19..0000000000 --- a/c/src/lib/libbsp/arm/gumstix/include/bsp.h +++ /dev/null @@ -1,84 +0,0 @@ -/** - * @file - * @ingroup arm_gumstix - * @brief Global BSP definitions. - */ - -/* - * By Yang Xi <hiyangxi@gmail.com>. - * - * 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_ARM_GUMSTIX_BSP_H -#define LIBBSP_ARM_GUMSTIX_BSP_H - -#include <bspopts.h> -#include <bsp/default-initial-extension.h> - -#include <rtems.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup arm_gumstix Gumstix Support - * @ingroup bsp_arm - * @brief Gumstix support package - * @{ - */ - -#define BSP_FEATURE_IRQ_EXTENSION - -#define BSP_HAS_FRAME_BUFFER 1 - -/** @brief What is the input clock freq in hertz */ -#define BSP_MAIN_FREQ 3686400 /* 3.6864 MHz */ -#define BSP_SLCK_FREQ 32768 /* 32.768 KHz */ - -/** @brief What is the last interrupt */ -#define BSP_MAX_INT AT91RM9200_MAX_INT - -/* - * forward reference the type to avoid conflicts between libchip serial - * and libchip rtc get and set register types. - */ -typedef struct _console_tbl console_tbl; -console_tbl *BSP_get_uart_from_minor(int minor); - -static inline int32_t BSP_get_baud(void) {return 115200;} - -/** @brief How big should the interrupt stack be? */ -#define CONFIGURE_INTERRUPT_STACK_MEMORY (16 * 1024) - -#define ST_PIMR_PIV 33 /* 33 ticks of the 32.768Khz clock ~= 1msec */ - -#define outport_byte(port,val) *((unsigned char volatile*)(port)) = (val) -#define inport_byte(port,val) (val) = *((unsigned char volatile*)(port)) -#define outport_word(port,val) *((unsigned short volatile*)(port)) = (val) -#define inport_word(port,val) (val) = *((unsigned short volatile*)(port)) - -struct rtems_bsdnet_ifconfig; -extern int rtems_ne_driver_attach(struct rtems_bsdnet_ifconfig *, int); -#define BSP_NE2000_NETWORK_DRIVER_NAME "ne1" -#define BSP_NE2000_NETWORK_DRIVER_ATTACH rtems_ne_driver_attach - -#ifndef RTEMS_BSP_NETWORK_DRIVER_NAME -#define RTEMS_BSP_NETWORK_DRIVER_NAME BSP_NE2000_NETWORK_DRIVER_NAME -#endif - -#ifndef RTEMS_BSP_NETWORK_DRIVER_ATTACH -#define RTEMS_BSP_NETWORK_DRIVER_ATTACH BSP_NE2000_NETWORK_DRIVER_ATTACH -#endif - -/** @} */ - -#ifdef __cplusplus -} -#endif - -#endif /* _BSP_H */ - diff --git a/c/src/lib/libbsp/arm/gumstix/include/bsp/irq.h b/c/src/lib/libbsp/arm/gumstix/include/bsp/irq.h deleted file mode 100644 index a8b5d24da1..0000000000 --- a/c/src/lib/libbsp/arm/gumstix/include/bsp/irq.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2010 embedded brains GmbH. - * - * Interrupt handler Header file for PXA By Yang Xi <hiyangxi@gmail.com> - * Copyright (c) 2004 by Jay Monkman <jtm@lopingdog.com> - * - * 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 __IRQ_H__ -#define __IRQ_H__ - -#ifndef __asm__ - -#include <rtems.h> -#include <rtems/irq.h> -#include <rtems/irq-extension.h> - -#include <pxa255.h> - -#define BSP_INTERRUPT_VECTOR_MIN 0 - -#define BSP_INTERRUPT_VECTOR_MAX (PRIMARY_IRQS - 1) - -#endif /* __asm__ */ - -#endif /* __IRQ_H__ */ diff --git a/c/src/lib/libbsp/arm/gumstix/include/ffuart.h b/c/src/lib/libbsp/arm/gumstix/include/ffuart.h deleted file mode 100644 index 68df822183..0000000000 --- a/c/src/lib/libbsp/arm/gumstix/include/ffuart.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * FFUART for PXA250 CPU by Yang Xi<hiyangxi@gmail.com> - * - * 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 __FFUART_H__ -#define __FFUART_H__ - -typedef struct { - /* - *Receive buffer(DLAB=0).Transmit buffer(DLAB=0). - *Divisor Latch Low(DLAB=1) - */ - volatile unsigned int rbr; - /*Interrupt enable(DLAB=0). Divisor Latch High(DLAB=1)*/ - volatile unsigned int ier; - /*Interrupt identification.FIFO control*/ - volatile unsigned int iir; - /*Line Control*/ - volatile unsigned int lcr; - /*Modem control*/ - volatile unsigned int mcr; - /*Line Status*/ - volatile unsigned int lsr; - /*Modem status*/ - volatile unsigned int msr; - /*Scratch Pad*/ - volatile unsigned int spr; - /*Infrared Selection*/ - volatile unsigned int isr; -} ffuart_reg_t; - - -#define EIGHT_BITS_NOPARITY_1STOPBIT 0x3 -#define DLAB 0x80 - - -/*Divisor = frequency_uart/(16 * BaudRate*)*/ -#define FREQUENCY_UART (14745600) - -#define SEND_EMPTY 0x20 -#define FULL_RECEIVE 0x01 - -#endif - diff --git a/c/src/lib/libbsp/arm/gumstix/include/pxa255.h b/c/src/lib/libbsp/arm/gumstix/include/pxa255.h deleted file mode 100644 index d5f2830c53..0000000000 --- a/c/src/lib/libbsp/arm/gumstix/include/pxa255.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - * By Yang Xi <hiyangxi@gmail.com>. - * - * 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 __PXA_255_H__ -#define __PXA_255_H__ - -typedef unsigned int word_t; - -/*Interrupt*/ - -#define PRIMARY_IRQS 32 -#define GPIO_IRQS (85 - 2) /* The first two IRQs have level - one interrupts */ -#define GPIO_IRQ 10 - -#define IRQS (PRIMARY_IRQS + GPIO_IRQS) - -/* Interrupt Controller */ -#define INTERRUPT_OFFSET 0xd00000 -#define XSCALE_IRQ_OS_TIMER 26 -#define XSCALE_IRQ_PMU 12 -#define XSCALE_IRQ_STUART 20 -#define XSCALE_IRQ_NETWORK 16 - -#define PMU_IRQ 12 -#define CCNT_IRQ_ENABLE 1UL << 6 -#define PMN1_IRQ_ENABLE 1UL << 5 -#define PMN0_IRQ_ENABLE 1UL << 4 - -#define IODEVICE_VADDR 0x40000000 -#define XSCALE_INT (IODEVICE_VADDR + INTERRUPT_OFFSET) - -#define XSCALE_INT_ICMR (*(volatile word_t *)(XSCALE_INT + 0x04)) /* Mask register */ -#define XSCALE_INT_ICLR (*(volatile word_t *)(XSCALE_INT + 0x08)) /* FIQ / IRQ selection */ -#define XSCALE_INT_ICCR (*(volatile word_t *)(XSCALE_INT + 0x14)) /* Control register */ -#define XSCALE_INT_ICIP (*(volatile word_t *)(XSCALE_INT + 0x00)) /* IRQ pending */ -#define XSCALE_INT_ICFP (*(volatile word_t *)(XSCALE_INT + 0x0c)) /* FIQ pending */ -#define XSCALE_INT_ICPR (*(volatile word_t *)(XSCALE_INT + 0x10)) /* Pending (unmasked) */ - -/* GPIO */ -#define GPIO_OFFSET 0xe00000 -#define PXA_GPIO (IODEVICE_VADDR + GPIO_OFFSET) - -#define PXA_GEDR0 (*(volatile word_t *)(PXA_GPIO + 0x48)) /* GPIO edge detect 0 */ -#define PXA_GEDR1 (*(volatile word_t *)(PXA_GPIO + 0x4C)) /* GPIO edge detect 1 */ -#define PXA_GEDR2 (*(volatile word_t *)(PXA_GPIO + 0x50)) /* GPIO edge detect 2 */ - - -/* PXA2XX Timer */ - -#define TIMER_OFFSET 0x0a00000 -#define CLOCKS_OFFSET 0x1300000 -/*I change the TIMER_RATE to 36864,because when I use 3686400, the period will be calculate - to 30000*/ -#define TIMER_RATE 36864 - -#define XSCALE_TIMERS (IODEVICE_VADDR + TIMER_OFFSET) - -/* Match registers */ -#define XSCALE_OS_TIMER_MR0 (*(volatile word_t *)(XSCALE_TIMERS + 0x00)) -#define XSCALE_OS_TIMER_MR1 (*(volatile word_t *)(XSCALE_TIMERS + 0x04)) -#define XSCALE_OS_TIMER_MR2 (*(volatile word_t *)(XSCALE_TIMERS + 0x08)) -#define XSCALE_OS_TIMER_MR3 (*(volatile word_t *)(XSCALE_TIMERS + 0x0c)) - -/* Interrupt enable register */ -#define XSCALE_OS_TIMER_IER (*(volatile word_t *)(XSCALE_TIMERS + 0x1c)) -/* Watchdog match enable register */ -#define XSCALE_OS_TIMER_WMER (*(volatile word_t *)(XSCALE_TIMERS + 0x18)) -/* Timer count register */ -#define XSCALE_OS_TIMER_TCR (*(volatile word_t *)(XSCALE_TIMERS + 0x10)) -/* Timer status register */ -#define XSCALE_OS_TIMER_TSR (*(volatile word_t *)(XSCALE_TIMERS + 0x14)) - -#define XSCALE_CLOCKS (IODEVICE_VADDR + CLOCKS_VOFFSET) - -#define XSCALE_CLOCKS_CCCR (*(volatile word_t *)(XSCALE_CLOCKS + 0x00)) - -/*Use ffuart port as the console*/ -#define FFUART_BASE 0x40100000 - -/*Write to SKYEYE_MAGIC_ADDRESS to make SKYEYE exit*/ - -#define SKYEYE_MAGIC_ADDRESS (*(volatile word_t *)(0xb0000000)) -#define SKYEYE_MAGIC_NUMBER (0xf0f0f0f0) - -/*PMC*/ -#define PMC_PMNC 0 -#define PMC_CCNT 1 -#define PMC_INTEN 2 -#define PMC_FLAG 3 -#define PMC_EVTSEL 4 -#define PMC_PMN0 5 -#define PMC_PMN1 6 -#define PMC_PMN2 7 -#define PMC_PMN3 8 - -#define PMC_PMNC_E (0x01) -#define PMC_PMNC_PCR (0x01 << 1) -#define PMC_PMNC_CCR (0x01 << 2) -#define PMC_PMNC_CCD (0x01 << 3) -#define PMC_PMNC_PCD (0x01 << 4) - -/*LCD*/ -#define LCCR0 (*(volatile word_t *)(0x44000000)) -#define LCCR1 (*(volatile word_t *)(0x44000004)) -#define LCCR2 (*(volatile word_t *)(0x44000008)) -#define LCCR3 (*(volatile word_t *)(0x4400000C)) - -#define FDADR0 (*(volatile word_t *)(0x44000200)) -#define FSADR0 (*(volatile word_t *)(0x44000204)) -#define FIDR0 (*(volatile word_t *)(0x44000208)) -#define LDCMD0 (*(volatile word_t *)(0x4400020C)) - -#define FDADR1 (*(volatile word_t *)(0x44000210)) -#define FSADR1 (*(volatile word_t *)(0x44000214)) -#define FIDR1 (*(volatile word_t *)(0x44000218)) -#define LDCMD1 (*(volatile word_t *)(0x4400021C)) - -#define LCCR0_ENB 0x00000001 -#define LCCR1_PPL 0x000003FF -#define LCCR2_LPP 0x000003FF -#define LCCR3_BPP 0x07000000 -#endif diff --git a/c/src/lib/libbsp/arm/gumstix/include/tm27.h b/c/src/lib/libbsp/arm/gumstix/include/tm27.h deleted file mode 100644 index 0dfa7bf628..0000000000 --- a/c/src/lib/libbsp/arm/gumstix/include/tm27.h +++ /dev/null @@ -1 +0,0 @@ -#include <rtems/tm27-default.h> diff --git a/c/src/lib/libbsp/arm/gumstix/preinstall.am b/c/src/lib/libbsp/arm/gumstix/preinstall.am deleted file mode 100644 index 99477a8ded..0000000000 --- a/c/src/lib/libbsp/arm/gumstix/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)/pxa255.h: include/pxa255.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/pxa255.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/pxa255.h - -$(PROJECT_INCLUDE)/ffuart.h: include/ffuart.h $(PROJECT_INCLUDE)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/ffuart.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/ffuart.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_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/bsp/irq.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq.h - -if ON_SKYEYE -endif -if ON_SKYEYE -endif diff --git a/c/src/lib/libbsp/arm/gumstix/bsp_specs b/c/src/lib/libbsp/arm/gumstix/startup/bsp_specs index 47dd31d46b..47dd31d46b 100644 --- a/c/src/lib/libbsp/arm/gumstix/bsp_specs +++ b/c/src/lib/libbsp/arm/gumstix/startup/bsp_specs |