diff options
author | Chris Johns <chrisj@rtems.org> | 2008-06-11 08:03:50 +0000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2008-06-11 08:03:50 +0000 |
commit | b7ad0ed12b39b7d96d3a64e847fc22b7ec090f1f (patch) | |
tree | c81009bbeafc21c99b6fb0752784b8b894ec834c /c/src | |
parent | 2008-06-10 Matthew Riek <matthew.riek@ibiscomputer.com.au> (diff) | |
download | rtems-b7ad0ed12b39b7d96d3a64e847fc22b7ec090f1f.tar.bz2 |
2008-06-10 Matthew Riek <matthew.riek@ibiscomputer.com.au>
* Makefile.am: Add shared/m68kbspgetworkarea.c to sources.
* configure.ac: Add RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION.
* include/bsp.h: Add include bspopts.h.
* start/start.S: Formatting changes.
* startup/bspstart.c: Updated to use the shared BSP support.
Diffstat (limited to 'c/src')
-rw-r--r-- | c/src/lib/libbsp/m68k/mcf5235/ChangeLog | 8 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/mcf5235/Makefile.am | 1 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/mcf5235/configure.ac | 2 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/mcf5235/include/bsp.h | 1 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/mcf5235/start/start.S | 16 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/mcf5235/startup/bspstart.c | 28 |
6 files changed, 22 insertions, 34 deletions
diff --git a/c/src/lib/libbsp/m68k/mcf5235/ChangeLog b/c/src/lib/libbsp/m68k/mcf5235/ChangeLog index ea80ddb4e8..ba54288b91 100644 --- a/c/src/lib/libbsp/m68k/mcf5235/ChangeLog +++ b/c/src/lib/libbsp/m68k/mcf5235/ChangeLog @@ -1,3 +1,11 @@ +2008-06-10 Matthew Riek <matthew.riek@ibiscomputer.com.au> + + * Makefile.am: Add shared/m68kbspgetworkarea.c to sources. + * configure.ac: Add RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION. + * include/bsp.h: Add include bspopts.h. + * start/start.S: Formatting changes. + * startup/bspstart.c: Updated to use the shared BSP support. + 2008-05-29 Chris Johns <chrisj@rtems.org> * include/bsp.h: FEC unit numbers based on 0 not 1. Change the diff --git a/c/src/lib/libbsp/m68k/mcf5235/Makefile.am b/c/src/lib/libbsp/m68k/mcf5235/Makefile.am index 62530b0eb5..1ec2bee944 100644 --- a/c/src/lib/libbsp/m68k/mcf5235/Makefile.am +++ b/c/src/lib/libbsp/m68k/mcf5235/Makefile.am @@ -29,6 +29,7 @@ dist_project_lib_DATA += startup/linkcmds startup/linkcmdsflash \ startup_SOURCES = startup/bspclean.c ../../shared/bsppredriverhook.c \ ../../shared/bsplibc.c ../../shared/bsppost.c \ ../../m68k/shared/m68kpretaskinghook.c \ + ../../m68k/shared/m68kbspgetworkarea.c \ startup/init5235.c startup/bspstart.c \ ../../shared/bootcard.c \ ../../shared/sbrk.c ../../m68k/shared/setvec.c \ diff --git a/c/src/lib/libbsp/m68k/mcf5235/configure.ac b/c/src/lib/libbsp/m68k/mcf5235/configure.ac index 24d784e87c..d98be75c45 100644 --- a/c/src/lib/libbsp/m68k/mcf5235/configure.ac +++ b/c/src/lib/libbsp/m68k/mcf5235/configure.ac @@ -15,6 +15,8 @@ RTEMS_PROG_CC_FOR_TARGET RTEMS_CANONICALIZE_TOOLS RTEMS_PROG_CCAS +RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION + RTEMS_CHECK_NETWORKING AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes") diff --git a/c/src/lib/libbsp/m68k/mcf5235/include/bsp.h b/c/src/lib/libbsp/m68k/mcf5235/include/bsp.h index 4732261056..e939deccc1 100644 --- a/c/src/lib/libbsp/m68k/mcf5235/include/bsp.h +++ b/c/src/lib/libbsp/m68k/mcf5235/include/bsp.h @@ -9,6 +9,7 @@ extern "C" { #endif +#include <bspopts.h> #include <rtems.h> #include <rtems/iosupp.h> #include <rtems/console.h> diff --git a/c/src/lib/libbsp/m68k/mcf5235/start/start.S b/c/src/lib/libbsp/m68k/mcf5235/start/start.S index 69fc8f4dbf..f941b028f6 100644 --- a/c/src/lib/libbsp/m68k/mcf5235/start/start.S +++ b/c/src/lib/libbsp/m68k/mcf5235/start/start.S @@ -309,15 +309,19 @@ SYM(_spuriousInterrupt): .align 4 PUBLIC (start) SYM(start): - move.w #0x0000,d0 | Turn off watchdog timer + move.w #0x0000,d0 | Turn off watchdog timer move.w d0, (0x40140000) - move.l #0x01000000,d0 | Set system frequency to 150 MHz + move.l #0x01000000,d0 | Set system frequency to 150 MHz move.l d0, (0x40120000) - move.w #0x2700,sr | Disable interrupts + move.w #0x2700,sr | Disable interrupts - move.l #__SRAMBASE+1,d0 | Enable the MCF5235 internal SRAM - movec d0,%rambar | ...so we have a stack - move.l #__IPSBAR+1,d0 | Enable the MCF5235 internal peripherals + move.l #__SRAMBASE+1,d0 | Enable the MCF5235 internal SRAM + movec d0,%rambar | ...so we have a stack + + move.l #0x20000201, d0 + move.l d0,(0x40000008) | set up 2nd RAMBAR to make 2nd port avail to FEC + + move.l #__IPSBAR+1,d0 | Enable the MCF5235 internal peripherals move.l d0,DEFAULT_IPSBAR /* diff --git a/c/src/lib/libbsp/m68k/mcf5235/startup/bspstart.c b/c/src/lib/libbsp/m68k/mcf5235/startup/bspstart.c index 9d95b16118..e581296862 100644 --- a/c/src/lib/libbsp/m68k/mcf5235/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/mcf5235/startup/bspstart.c @@ -134,40 +134,12 @@ void _CPU_cache_invalidate_1_data_line(const void *addr) } /* - * Use the shared implementations of the following routines - */ -void bsp_libc_init( void *, uint32_t, int ); -void bsp_pretasking_hook(void); /* m68k version */ - -/* * bsp_start * * This routine does the bulk of the system initialisation. */ void bsp_start( void ) { - extern char _WorkspaceBase[]; - extern char _RamSize[]; - extern unsigned long _M68k_Ramsize; - - _M68k_Ramsize = (unsigned long)_RamSize; /* RAM size set in linker script */ - - /* - * Allocate the memory for the RTEMS Work Space. This can come from - * a variety of places: hard coded address, malloc'ed from outside - * RTEMS world (e.g. simulator or primitive memory manager), or (as - * typically done by stock BSPs) by subtracting the required amount - * of work space from the last physical address on the CPU board. - */ - - /* - * Need to "allocate" the memory for the RTEMS Workspace and - * tell the RTEMS configuration where it is. This memory is - * not malloc'ed. It is just "pulled from the air". - */ - - Configuration.work_space_start = (void *)_WorkspaceBase; - /* * Invalidate the cache and disable it */ |