This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
MPC8xx - improve 852 support
- From: Gary Thomas <gary at mlbassoc dot com>
- To: eCos patches <ecos-patches at sources dot redhat dot com>
- Date: 16 Apr 2003 10:22:22 -0600
- Subject: MPC8xx - improve 852 support
Index: hal/powerpc/adder/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/adder/current/ChangeLog,v
retrieving revision 1.9
diff -u -5 -p -r1.9 ChangeLog
--- hal/powerpc/adder/current/ChangeLog 31 Mar 2003 15:50:48 -0000 1.9
+++ hal/powerpc/adder/current/ChangeLog 16 Apr 2003 16:02:42 -0000
@@ -1,5 +1,10 @@
+2003-04-16 Gary Thomas <gary at mlbassoc dot com>
+
+ * src/hal_aux.c (hal_platform_init): Set up GPIO bits according
+ to platform type.
+
2003-03-31 Gary Thomas <gary at mlbassoc dot com>
* cdl/hal_powerpc_adder.cdl: Enable use of SCC3 on AdderII.
2003-03-24 Gary Thomas <gary at mlbassoc dot com>
Index: hal/powerpc/adder/current/src/hal_aux.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/adder/current/src/hal_aux.c,v
retrieving revision 1.3
diff -u -5 -p -r1.3 hal_aux.c
--- hal/powerpc/adder/current/src/hal_aux.c 24 Mar 2003 21:59:29 -0000 1.3
+++ hal/powerpc/adder/current/src/hal_aux.c 16 Apr 2003 16:03:38 -0000
@@ -84,13 +84,21 @@ hal_platform_init(void)
// Special routing information for CICR
eppc->cpmi_cicr &= ~0xFF0000; // Routing bits
eppc->cpmi_cicr |= 0x240000; // SCC2, SCC3 on "normal" bit positions
+#if defined(CYGHWR_HAL_POWERPC_ADDER_I)
eppc->pip_pbpar &= ~0x0000400E; // PB29..30 AS GPIO
eppc->pip_pbdir |= 0x0000400E;
eppc->pip_pbdat = 0x00004000;
+#endif
+
+#if defined(CYGHWR_HAL_POWERPC_ADDER_II)
+ eppc->pip_pbpar &= ~0x00000007; // PB29..31 AS GPIO for LEDS
+ eppc->pip_pbdir |= 0x00000007;
+ eppc->pip_pbdat |= 0x00000007;
+#endif
hal_if_init();
_adder_set_leds(0x1);
}
Index: hal/powerpc/mpc8xx/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/mpc8xx/current/ChangeLog,v
retrieving revision 1.28
diff -u -5 -p -r1.28 ChangeLog
--- hal/powerpc/mpc8xx/current/ChangeLog 23 Mar 2003 16:22:14 -0000 1.28
+++ hal/powerpc/mpc8xx/current/ChangeLog 16 Apr 2003 16:03:11 -0000
@@ -1,5 +1,9 @@
+2003-04-16 Gary Thomas <gary at mlbassoc dot com>
+
+ * src/var_misc.c (hal_variant_init): Errata setup for MPC852T
+
2003-03-23 Gary Thomas <gary at mlbassoc dot com>
* src/var_intr.c:
* include/var_intr.h: Clean up for new CDL (processor type) layout.
Index: hal/powerpc/mpc8xx/current/src/var_misc.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/mpc8xx/current/src/var_misc.c,v
retrieving revision 1.14
diff -u -5 -p -r1.14 var_misc.c
--- hal/powerpc/mpc8xx/current/src/var_misc.c 23 Mar 2003 16:22:14 -0000 1.14
+++ hal/powerpc/mpc8xx/current/src/var_misc.c 16 Apr 2003 15:02:23 -0000
@@ -54,26 +54,43 @@
#include <pkgconf/hal.h>
#define CYGARC_HAL_COMMON_EXPORT_CPU_MACROS
#include <cyg/hal/ppc_regs.h>
+#include <cyg/hal/quicc/ppc8xx.h>
#include <cyg/infra/cyg_type.h> // types
#include <cyg/infra/diag.h> // diag_printf
#include <cyg/hal/hal_mem.h> // some of the functions defined here
//--------------------------------------------------------------------------
void
hal_variant_init(void)
{
+#if defined(CYGHWR_HAL_POWERPC_MPC8XX_852T)
+ volatile EPPC *eppc = (volatile EPPC *)eppc_base();
+#endif
// Disable serialization
{
cyg_uint32 ictrl;
CYGARC_MFSPR (ICTRL, ictrl);
ictrl |= ICTRL_NOSERSHOW;
CYGARC_MTSPR (ICTRL, ictrl);
}
+
+#if defined(CYGHWR_HAL_POWERPC_MPC8XX_852T)
+ // Special settings - according to manual errata
+ eppc->pio_papar &= ~0xffffffff; // PA manatory settings
+ eppc->pio_padir |= 0xffffffff;
+
+ eppc->pip_pbpar &= ~0x0003ff07; // PB29..31 AS GPIO
+ eppc->pip_pbdir |= 0x0003ff07;
+ eppc->pip_pbdat = 0x00010007;
+
+ eppc->pio_pcpar &= ~0xffffffff; // PC manatory settings
+ eppc->pio_pcdir |= 0xffffffff;
+#endif
#ifndef CYGSEM_HAL_USE_ROM_MONITOR
// Reset CPM
_mpc8xx_reset_cpm();
#endif
--
------------------------------------------------------------
Gary Thomas |
MLB Associates | Consulting for the
+1 (970) 229-1963 | Embedded world
http://www.mlbassoc.com/ |
email: <gary at mlbassoc dot com> |
gpg: http://www.chez-thomas.org/gary/gpg_key.asc
------------------------------------------------------------