Index: c/src/lib/libbsp/m68k/mcf5235/ChangeLog
===================================================================
--- c/src/lib/libbsp/m68k/mcf5235/ChangeLog	(revision 288f1c33c916c88406b889d58b0e610539fc0931)
+++ c/src/lib/libbsp/m68k/mcf5235/ChangeLog	(revision 56e8ee4ebd4388832558b71d044584ee2b2b5ee0)
@@ -1,2 +1,10 @@
+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>
 
Index: c/src/lib/libbsp/m68k/mcf5235/Makefile.am
===================================================================
--- c/src/lib/libbsp/m68k/mcf5235/Makefile.am	(revision 288f1c33c916c88406b889d58b0e610539fc0931)
+++ c/src/lib/libbsp/m68k/mcf5235/Makefile.am	(revision 56e8ee4ebd4388832558b71d044584ee2b2b5ee0)
@@ -30,4 +30,5 @@
     ../../shared/bsplibc.c ../../shared/bsppost.c \
     ../../m68k/shared/m68kpretaskinghook.c \
+    ../../m68k/shared/m68kbspgetworkarea.c \
     startup/init5235.c startup/bspstart.c \
     ../../shared/bootcard.c \
Index: c/src/lib/libbsp/m68k/mcf5235/configure.ac
===================================================================
--- c/src/lib/libbsp/m68k/mcf5235/configure.ac	(revision 288f1c33c916c88406b889d58b0e610539fc0931)
+++ c/src/lib/libbsp/m68k/mcf5235/configure.ac	(revision 56e8ee4ebd4388832558b71d044584ee2b2b5ee0)
@@ -16,4 +16,6 @@
 RTEMS_PROG_CCAS
 
+RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION
+
 RTEMS_CHECK_NETWORKING
 
Index: c/src/lib/libbsp/m68k/mcf5235/include/bsp.h
===================================================================
--- c/src/lib/libbsp/m68k/mcf5235/include/bsp.h	(revision 288f1c33c916c88406b889d58b0e610539fc0931)
+++ c/src/lib/libbsp/m68k/mcf5235/include/bsp.h	(revision 56e8ee4ebd4388832558b71d044584ee2b2b5ee0)
@@ -10,4 +10,5 @@
 #endif
 
+#include <bspopts.h>
 #include <rtems.h>
 #include <rtems/iosupp.h>
Index: c/src/lib/libbsp/m68k/mcf5235/start/start.S
===================================================================
--- c/src/lib/libbsp/m68k/mcf5235/start/start.S	(revision 288f1c33c916c88406b889d58b0e610539fc0931)
+++ c/src/lib/libbsp/m68k/mcf5235/start/start.S	(revision 56e8ee4ebd4388832558b71d044584ee2b2b5ee0)
@@ -310,13 +310,17 @@
     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.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.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  #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
         
Index: c/src/lib/libbsp/m68k/mcf5235/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/m68k/mcf5235/startup/bspstart.c	(revision 288f1c33c916c88406b889d58b0e610539fc0931)
+++ c/src/lib/libbsp/m68k/mcf5235/startup/bspstart.c	(revision 56e8ee4ebd4388832558b71d044584ee2b2b5ee0)
@@ -135,10 +135,4 @@
 
 /*
- *  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
  *
@@ -147,26 +141,4 @@
 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
