bsps/arm: Move libcpu content to bsps

This patch is a part of the BSP source reorganization.

Update #3285.
This commit is contained in:
Sebastian Huber
2018-03-10 10:17:35 +01:00
parent b6755affc0
commit c4905d8d31
22 changed files with 5 additions and 264 deletions

View File

@@ -50,7 +50,7 @@ libbsp_a_SOURCES += network/lan91c11x.c
libbsp_a_SOURCES += network/network.c
endif
libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/shared/arm920.rel
libbsp_a_SOURCES += ../../../../../../bsps/arm/shared/cp15/arm920-mmu.c
include $(top_srcdir)/../../../../automake/local.am
include $(srcdir)/../../../../../../bsps/arm/csb336/headers.am

View File

@@ -5,7 +5,6 @@
include $(RTEMS_ROOT)/make/custom/default.cfg
RTEMS_CPU=arm
RTEMS_CPU_MODEL=shared
# This contains the compiler options necessary to select the CPU model
# and (hopefully) optimize for it.

View File

@@ -80,7 +80,7 @@ if HAS_NETWORKING
libbsp_a_SOURCES += network/network.c
endif
libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/shared/arm920.rel
libbsp_a_SOURCES += ../../../../../../bsps/arm/shared/cp15/arm920-mmu.c
include $(top_srcdir)/../../../../automake/local.am
include $(srcdir)/../../../../../../bsps/arm/csb337/headers.am

View File

@@ -5,7 +5,6 @@
include $(RTEMS_ROOT)/make/custom/default.cfg
RTEMS_CPU=arm
RTEMS_CPU_MODEL=shared
# This contains the compiler options necessary to select the CPU model
# and (hopefully) optimize for it.

View File

@@ -5,12 +5,11 @@
include $(RTEMS_ROOT)/make/custom/default.cfg
RTEMS_CPU=arm
RTEMS_CPU_MODEL=arm7tdmi
# This contains the compiler options necessary to select the CPU model
# and (hopefully) optimize for it.
#
CPU_CFLAGS = -mcpu=$(RTEMS_CPU_MODEL)
CPU_CFLAGS = -mcpu=arm7tdmi
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -g

View File

@@ -52,11 +52,6 @@ libbsp_a_SOURCES += ../../shared/src/irq-shell.c
# Cache
libbsp_a_SOURCES += ../../../../../../bsps/shared/cache/nocache.c
#libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/shared/arm920.rel \
# ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/clock.rel \
# ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/timer.rel \
# ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/irq.rel
# Shared
if shared
libbsp_a_SOURCES += ../shared/arm-cp15-set-exception-handler.c

View File

@@ -5,7 +5,6 @@
include $(RTEMS_ROOT)/make/custom/default.cfg
RTEMS_CPU=arm
RTEMS_CPU_MODEL=arm1136
# This contains the compiler options necessary to select the CPU model
# and (hopefully) optimize for it.

View File

@@ -5,7 +5,6 @@
include $(RTEMS_ROOT)/make/custom/default.cfg
RTEMS_CPU=arm
RTEMS_CPU_MODEL=arm1136
# This contains the compiler options necessary to select the CPU model
# and (hopefully) optimize for it.

View File

@@ -5,7 +5,6 @@
include $(RTEMS_ROOT)/make/custom/default.cfg
RTEMS_CPU=arm
RTEMS_CPU_MODEL=arm7tdmi
# This contains the compiler options necessary to select the CPU model
# and (hopefully) optimize for it.

View File

@@ -5,7 +5,6 @@
include $(RTEMS_ROOT)/make/custom/default.cfg
RTEMS_CPU=arm
RTEMS_CPU_MODEL=arm920
# This contains the compiler options necessary to select the CPU model
# and (hopefully) optimize for it.

View File

@@ -5,7 +5,6 @@
include $(RTEMS_ROOT)/make/custom/default.cfg
RTEMS_CPU=arm
RTEMS_CPU_MODEL=arm1136
# This contains the compiler options necessary to select the CPU model
# and (hopefully) optimize for it.

View File

@@ -55,7 +55,7 @@ libbsp_a_SOURCES += rtl8019/rtl8019.c rtl8019/wd80x3.h
endif
endif
libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/shared/arm920.rel
libbsp_a_SOURCES += ../../../../../../bsps/arm/shared/cp15/arm920-mmu.c
include $(top_srcdir)/../../../../automake/local.am
include $(srcdir)/../../../../../../bsps/arm/gumstix/headers.am

View File

@@ -5,7 +5,6 @@
include $(RTEMS_ROOT)/make/custom/default.cfg
RTEMS_CPU=arm
RTEMS_CPU_MODEL=shared
# This contains the compiler options necessary to select the CPU model
# and (hopefully) optimize for it.

View File

@@ -58,7 +58,7 @@ libbsp_a_SOURCES += smc/smc.h
# Cache
libbsp_a_SOURCES += ../../../../../../bsps/arm/shared/cache/cache-cp15.c
libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/shared/arm920.rel
libbsp_a_SOURCES += ../../../../../../bsps/arm/shared/cp15/arm920-mmu.c
include $(top_srcdir)/../../../../automake/local.am
include $(srcdir)/../../../../../../bsps/arm/smdk2410/headers.am

View File

@@ -5,7 +5,6 @@
include $(RTEMS_ROOT)/make/custom/default.cfg
RTEMS_CPU=arm
RTEMS_CPU_MODEL=shared
# This contains the compiler options necessary to select the CPU model
# and (hopefully) optimize for it.

View File

@@ -1,19 +0,0 @@
ACLOCAL_AMFLAGS = -I ../../../aclocal
include $(top_srcdir)/../../../automake/compile.am
EXTRA_DIST =
noinst_PROGRAMS =
## shared/include
if shared
## shared/arm920
noinst_PROGRAMS += shared/arm920.rel
shared_arm920_rel_SOURCES = shared/arm920/mmu.c
shared_arm920_rel_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/shared/src
shared_arm920_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
endif
include $(top_srcdir)/../../../automake/local.am

View File

@@ -1,32 +0,0 @@
## Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([rtems-c-src-lib-libcpu-arm],[_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 subdir-objects 1.12.2])
AM_MAINTAINER_MODE
RTEMS_ENV_RTEMSBSP
RTEMS_PROJECT_ROOT
RTEMS_PROG_CC_FOR_TARGET
AM_PROG_CC_C_O
RTEMS_CANONICALIZE_TOOLS
RTEMS_PROG_CCAS
AM_CONDITIONAL(shared, test "$RTEMS_CPU_MODEL" = "arm1136" || \
test "$RTEMS_CPU_MODEL" = "shared")
RTEMS_AMPOLISH3
# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile
])
AC_OUTPUT

View File

@@ -1,57 +0,0 @@
/*
* LPC22XX/LPC21xx Intererrupt handler
*
* Modified by Ray <rayx.cn@gmail.com> 2006 from Jay Monkman's code
*
* 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.
*/
#define __asm__
/*
* BSP specific interrupt handler for INT or FIQ. In here
* you do determine which interrupt happened and call its
* handler.
* Called from ISR_Handler, It is better to write in C function
*/
.globl bsp_interrupt_dispatch
bsp_interrupt_dispatch :
#ifdef __thumb__
.code 16
#endif
/*
* Look at interrupt status register to determine source.
* From source, determine offset into expanded vector table
* and load handler address into r0.
*/
ldr r0, =0xFFFFF030 /* Read the vector number */
ldr r0, [r0]
#ifdef __thumb__
push {lr}
ldr r2, =IRQ_return /* prepare the return from handler */
mov lr, r2
#else
stmdb sp!,{lr}
ldr lr, =IRQ_return /* prepare the return from handler */
#endif
/*C code will be called*/
mov pc, r0 /* EXECUTE INT HANDLER */
/*
* C code may come back from Thumb if --thumb-interwork flag is False
* Add some veneer to make sure that code back to ARM
*/
IRQ_return:
#ifdef __thumb__
pop {r1}
bx r1
#else
ldmia sp!,{r1}
mov pc, r1
#endif

View File

@@ -1,65 +0,0 @@
/*
* NXP/Philips LPC22XX/LPC21xx Interrupt handler
* Ray 2007 <rayx.cn@gmail.com> to support LPC ARM
* 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.
*/
#include <irq.h>
#include <bsp.h>
#include <lpc22xx.h>
/*
* Interrupt system initialization. Disable interrupts, clear
* any that are pending.
*/
void BSP_rtems_irq_mngt_init(void)
{
long *vectorTable;
int i;
/* disable all interrupts */
VICIntEnClr = 0xFFFFFFFF;
vectorTable = (long *) VECTOR_TABLE;
/* Initialize the vector table contents with default handler */
for (i=0; i<BSP_MAX_INT; i++) {
*(vectorTable + i) = (long)(default_int_handler);
}
/*
* Set IRQHandler
*/
IRQ_VECTOR_ADDR = 0xE59FF018; /* LDR PC,[PC,#0x18] instruction */
/*
* Set FIQHandler
*/
FIQ_VECTOR_ADDR = 0xE59FF018; /* LDR PC,[PC,#0x18] instruction */
/*
* We does not need the next interrupt sources in the moment,
* therefore jump to itself.
*/
UNDEFINED_INSTRUCTION_VECTOR_ADDR = 0xEAFFFFFE;
SOFTWARE_INTERRUPT_VECTOR_ADDR = 0xEAFFFFFE;
PREFETCH_ABORT_VECTOR_ADDR = 0xEAFFFFFE;
/*
* In case we must find an ABORT error,
* enable the next lines and set a breakpoint
* in ABORTHandler.
*/
#if 1
DATA_ABORT_VECTOR_ADDR = 0xE59FF018;
#endif
/*
* Init the Vectored Interrupt Controller (VIC)
*/
VICProtection = 0;
VICIntSelect = 0;
VICVectAddr = 0;
}

View File

@@ -1,31 +0,0 @@
/*
* PXA255 Interrupt handler by Yang Xi <hiyangxi@gmail.com>
* Copyright (c) 2004 by Jay Monkman <jtm@lopgindog.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.
*/
#define __asm__
.globl bsp_interrupt_dispatch
bsp_interrupt_dispatch :
/*
* Look at interrupt status register to determine source.
* From source, determine offset into expanded vector table
* and load vector into r0 and handler address into r1.
*/
ldr r0,=0x40d00000
ldr r1,[r0]
clz r0,r1
cmp r0,#32
moveq pc,lr /*All zeros*/
mov r2,#31
sub r0,r2,r0
ldr r2,=IRQ_table
add r2,r2,r0,LSL #2
ldr r1,[r2]
mov pc,r1

View File

@@ -1,40 +0,0 @@
/*
* PXA255 interrupt controller by Yang Xi <hiyangxi@gmail.com>
* Copyright (c) 2004 by Jay Monkman <jtm@lopgindog.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.
*/
#include <irq.h>
#include <bsp.h>
#include <pxa255.h>
void dummy_handler(rtems_irq_hdl_param unused)
{
printk("I am dummy handler\n");
}
void (*IRQ_table[PRIMARY_IRQS])(rtems_irq_hdl_param param);
/*
* Interrupt system initialization. Disable interrupts, clear
* any that are pending.
*/
void BSP_rtems_irq_mngt_init(void)
{
int i;
/* Initialize the vector table contents with default handler */
for (i=0; i<PRIMARY_IRQS; i++) {
IRQ_table[i] = dummy_handler;
}
/* disable all interrupts */
XSCALE_INT_ICMR = 0x0;
/* Direct the interrupt to IRQ*/
XSCALE_INT_ICLR = 0x0;
}