This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Viper - more system clock speeds


Index: hal/powerpc/viper/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/viper/current/ChangeLog,v
retrieving revision 1.12
diff -u -5 -p -r1.12 ChangeLog
--- hal/powerpc/viper/current/ChangeLog	22 Jul 2002 17:13:37 -0000	1.12
+++ hal/powerpc/viper/current/ChangeLog	24 Jul 2002 14:48:33 -0000
@@ -1,5 +1,10 @@
+2002-07-24  Gary Thomas  <gary@chez-thomas.org>
+
+	* src/viper.S: 
+	* cdl/hal_powerpc_viper.cdl: More choices for system clock.
+
 2002-07-22  Gary Thomas  <gary@chez-thomas.org>
 
 	* src/viper.S: 
 	* cdl/hal_powerpc_viper.cdl: 
 	Support choices of 47.9, 51.6 MHz for the system clock.
Index: hal/powerpc/viper/current/cdl/hal_powerpc_viper.cdl
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/viper/current/cdl/hal_powerpc_viper.cdl,v
retrieving revision 1.6
diff -u -5 -p -r1.6 hal_powerpc_viper.cdl
--- hal/powerpc/viper/current/cdl/hal_powerpc_viper.cdl	22 Jul 2002 17:13:38 -0000	1.6
+++ hal/powerpc/viper/current/cdl/hal_powerpc_viper.cdl	23 Jul 2002 15:08:02 -0000
@@ -91,11 +91,11 @@ cdl_package CYGPKG_HAL_POWERPC_VIPER {
     }
 
     cdl_option CYGHWR_HAL_POWERPC_BOARD_SPEED {
         display          "Development board clock speed (MHz)"
         flavor           data
-        legal_values     { 47 51 }
+        legal_values     { 47 51 55 59 63 }
         default_value    47
         description      "
            VIPER Development Boards have various system clock speeds
            depending on the processor fitted.  Select the clock speed
            appropriate for your board so that the system can set the serial
Index: hal/powerpc/viper/current/include/plf_intr.h
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/viper/current/include/plf_intr.h,v
retrieving revision 1.3
diff -u -5 -p -r1.3 plf_intr.h
--- hal/powerpc/viper/current/include/plf_intr.h	23 May 2002 23:04:34 -0000	1.3
+++ hal/powerpc/viper/current/include/plf_intr.h	22 Jul 2002 20:16:56 -0000
@@ -3,17 +3,18 @@
 
 //==========================================================================
 //
 //      plf_intr.h
 //
-//      MBX platform specific interrupt definitions
+//      A&M Viper platform specific interrupt definitions
 //
 //==========================================================================
 //####ECOSGPLCOPYRIGHTBEGIN####
 // -------------------------------------------
 // This file is part of eCos, the Embedded Configurable Operating System.
 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Gary Thomas
 //
 // eCos is free software; you can redistribute it and/or modify it under
 // the terms of the GNU General Public License as published by the Free
 // Software Foundation; either version 2 or (at your option) any later version.
 //
Index: hal/powerpc/viper/current/src/redboot_linux_exec.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/viper/current/src/redboot_linux_exec.c,v
retrieving revision 1.1
diff -u -5 -p -r1.1 redboot_linux_exec.c
--- hal/powerpc/viper/current/src/redboot_linux_exec.c	25 Jun 2002 23:20:47 -0000	1.1
+++ hal/powerpc/viper/current/src/redboot_linux_exec.c	22 Jul 2002 20:11:02 -0000
@@ -7,10 +7,11 @@
 //==========================================================================
 //####ECOSGPLCOPYRIGHTBEGIN####
 // -------------------------------------------
 // This file is part of eCos, the Embedded Configurable Operating System.
 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002 Gary Thomas
 //
 // eCos is free software; you can redistribute it and/or modify it under
 // the terms of the GNU General Public License as published by the Free
 // Software Foundation; either version 2 or (at your option) any later version.
 //
Index: hal/powerpc/viper/current/src/viper.S
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/viper/current/src/viper.S,v
retrieving revision 1.6
diff -u -5 -p -r1.6 viper.S
--- hal/powerpc/viper/current/src/viper.S	22 Jul 2002 17:13:39 -0000	1.6
+++ hal/powerpc/viper/current/src/viper.S	24 Jul 2002 13:27:26 -0000
@@ -7,10 +7,11 @@
 ##=============================================================================
 #####ECOSGPLCOPYRIGHTBEGIN####
 ## -------------------------------------------
 ## This file is part of eCos, the Embedded Configurable Operating System.
 ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+## Copyright (C) 2002 Gary Thomas
 ##
 ## eCos is free software; you can redistribute it and/or modify it under
 ## the terms of the GNU General Public License as published by the Free
 ## Software Foundation; either version 2 or (at your option) any later version.
 ##
@@ -256,19 +257,35 @@ FUNC_START( hal_hardware_init )
 // 	Field WLFA (bits 24-27) = 1
 // 	Field TLFA (bits 28-31) = 4
 	 */
 
 //        
-// PTX field is (System Clock in MHz * Refresh rate in us) / Prescale
+// PTA field is (System Clock in MHz * Refresh rate in us) / Prescale
 // e.g.  ((14*3.6864)*62.5)/32 => 100.8 => 101        
 //                
 #if (CYGHWR_HAL_POWERPC_BOARD_SPEED == 47)
-	lwi	r3,0x5E802114   // PTX = 94
+#define PLPRCR_PTX 0x00C // (47MHz/3.6864MHz)-1
+#define MAMR_PTA 94        
 #endif        
 #if (CYGHWR_HAL_POWERPC_BOARD_SPEED == 51)
-	lwi	r3,0x65802114   // PTX = 101
+#define PLPRCR_PTX 0x00D // (51.6MHz/3.6864MHz)-1
+#define MAMR_PTA 101
 #endif        
+#if (CYGHWR_HAL_POWERPC_BOARD_SPEED == 55)
+#define PLPRCR_PTX 0x00E // (55.3MHz/3.6864MHz)-1
+#define MAMR_PTA 108
+#endif        
+#if (CYGHWR_HAL_POWERPC_BOARD_SPEED == 59)
+#define PLPRCR_PTX 0x00F // (58.9MHz/3.6864MHz)-1
+#define MAMR_PTA 116
+#endif        
+#if (CYGHWR_HAL_POWERPC_BOARD_SPEED == 63)
+#define PLPRCR_PTX 0x010 // (62.7MHz/3.6864MHz)-1
+#define MAMR_PTA 123
+#endif        
+//#define MAMR_PTA (((((((PLPRCR_PTX+1)*3686400)*625)/10000000)+31)/32)&0xFF)
+        lwi     r3,0x00802114|(MAMR_PTA<<24)
         stw	r3,MAMR(r4)
         stw	r3,MBMR(r4)
 
 	/*
 	 * Base Register initialization.
@@ -364,18 +381,11 @@ FUNC_START( hal_hardware_init )
 // 	Field CSR (bit 24) = 0
 // 	Field LOLRE (bit 25) = 0
 // 	Field FIOPD (bit 26) = 0
 // 	Field Reserved (bits 27-31) = 0
 	 */
-#if (CYGHWR_HAL_POWERPC_BOARD_SPEED == 47)
-	/*  MF    (0:11)  = 0x00C = 12 = (47MHz/3.6864MHz)-1 */
-	lwi	r3,0x00C04000
-#endif        
-#if (CYGHWR_HAL_POWERPC_BOARD_SPEED == 51)
-	/*  MF    (0:11)  = 0x00D = 13 = (51.6MHz/3.6864MHz)-1 */
-	lwi	r3,0x00D04000
-#endif        
+	lwi	r3,0x04000|(PLPRCR_PTX<<20)
 	stw	r3,PLPRCR(r4)
 
 	LED(0xE0)
 	lwi	r3,0x40000
 	mtctr	r3




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]