change log for rtems (2010-04-25)

rtems-vc at rtems.org rtems-vc at rtems.org
Sun Apr 25 22:10:54 UTC 2010


 *joel*:
2010-04-25	Joel Sherrill <joel.sherrilL at OARcorp.com>

	* libchip/rtc/ds1375-rtc.h, libchip/rtc/ds1375.c,
	libchip/rtc/icm7170.c, libchip/rtc/icm7170_reg.c,
	libchip/rtc/m48t08_reg.c, libchip/rtc/rtc.h: Use uintptr_t instead of
	uint32_t.

M  1.509  c/src/ChangeLog
M    1.6  c/src/libchip/rtc/ds1375-rtc.h
M    1.9  c/src/libchip/rtc/ds1375.c
M    1.9  c/src/libchip/rtc/icm7170.c
M    1.7  c/src/libchip/rtc/icm7170_reg.c
M    1.7  c/src/libchip/rtc/m48t08_reg.c
M   1.12  c/src/libchip/rtc/rtc.h

diff -u rtems/c/src/ChangeLog:1.508 rtems/c/src/ChangeLog:1.509
--- rtems/c/src/ChangeLog:1.508	Fri Apr  9 21:35:59 2010
+++ rtems/c/src/ChangeLog	Sun Apr 25 16:18:05 2010
@@ -1,3 +1,10 @@
+2010-04-25	Joel Sherrill <joel.sherrilL at OARcorp.com>
+
+	* libchip/rtc/ds1375-rtc.h, libchip/rtc/ds1375.c,
+	libchip/rtc/icm7170.c, libchip/rtc/icm7170_reg.c,
+	libchip/rtc/m48t08_reg.c, libchip/rtc/rtc.h: Use uintptr_t instead of
+	uint32_t.
+
 2010-04-10	Ralf Corsépius <ralf.corsepius at rtems.org>
 
 	* libchip/serial/serial.h: Add extern "C".

diff -u rtems/c/src/libchip/rtc/ds1375-rtc.h:1.5 rtems/c/src/libchip/rtc/ds1375-rtc.h:1.6
--- rtems/c/src/libchip/rtc/ds1375-rtc.h:1.5	Sun Nov 29 21:42:53 2009
+++ rtems/c/src/libchip/rtc/ds1375-rtc.h	Sun Apr 25 16:18:05 2010
@@ -64,10 +64,10 @@
 rtc_ds1375_device_probe( int minor );
 
 uint32_t
-rtc_ds1375_get_register( uint32_t port, uint8_t reg );
+rtc_ds1375_get_register( uintptr_t port, uint8_t reg );
 
 void
-rtc_ds1375_set_register( uint32_t port, uint8_t reg, uint32_t value );
+rtc_ds1375_set_register( uintptr_t port, uint8_t reg, uint32_t value );
 
 /*
  * BSP must supply string constant argument 'i2cname' which matches
@@ -84,11 +84,11 @@
 #define DS1375_RTC_TBL_ENTRY(i2cname) \
 {                                              	      \
 	sDeviceName:	"/dev/rtc",                       \
-	deviceType:		RTC_CUSTOM,                       \
-	pDeviceFns:		&rtc_ds1375_fns,                  \
+	deviceType:	RTC_CUSTOM,                       \
+	pDeviceFns:	&rtc_ds1375_fns,                  \
 	deviceProbe:	rtc_ds1375_device_probe,          \
-	ulCtrlPort1:	(uint32_t)(i2cname),              \
-	ulDataPort:		0,                                \
+	ulCtrlPort1:	(uintptr_t)(i2cname),             \
+	ulDataPort:	0,                                \
 	getRegister:	rtc_ds1375_get_register,          \
 	setRegister:	rtc_ds1375_set_register,          \
 }

diff -u rtems/c/src/libchip/rtc/ds1375.c:1.8 rtems/c/src/libchip/rtc/ds1375.c:1.9
--- rtems/c/src/libchip/rtc/ds1375.c:1.8	Fri Apr  2 01:46:48 2010
+++ rtems/c/src/libchip/rtc/ds1375.c	Sun Apr 25 16:18:06 2010
@@ -397,7 +397,7 @@
 
 
 uint32_t
-rtc_ds1375_get_register( uint32_t port, uint8_t reg )
+rtc_ds1375_get_register( uintptr_t port, uint8_t reg )
 {
 int      fd;
 uint8_t  v;
@@ -415,7 +415,7 @@
 }
 
 void
-rtc_ds1375_set_register( uint32_t port, uint8_t reg, uint32_t value )
+rtc_ds1375_set_register( uintptr_t port, uint8_t reg, uint32_t value )
 {
 int     fd;
 uint8_t v = value;
@@ -454,7 +454,7 @@
 }
 
 rtc_fns rtc_ds1375_fns = {
-  deviceInitialize:  ds1375_initialize,
+  deviceInitialize: ds1375_initialize,
   deviceGetTime:    ds1375_get_time,
   deviceSetTime:    ds1375_set_time,
 };

diff -u rtems/c/src/libchip/rtc/icm7170.c:1.8 rtems/c/src/libchip/rtc/icm7170.c:1.9
--- rtems/c/src/libchip/rtc/icm7170.c:1.8	Mon Sep 22 06:45:25 2008
+++ rtems/c/src/libchip/rtc/icm7170.c	Sun Apr 25 16:18:06 2010
@@ -41,9 +41,9 @@
   int minor
 )
 {
-  uint32_t       icm7170;
+  uintptr_t      icm7170;
   setRegister_f  setReg;
-  uint32_t       clock;
+  uintptr_t      clock;
 
   icm7170 = RTC_Table[ minor ].ulCtrlPort1;
   setReg = RTC_Table[ minor ].setRegister;
@@ -52,7 +52,7 @@
    *  Initialize the RTC with the proper clock frequency
    */
 
-  clock = (uint32_t) RTC_Table[ minor ].pDeviceParams;
+  clock = (uintptr_t) RTC_Table[ minor ].pDeviceParams;
   (*setReg)( icm7170, ICM7170_CONTROL, 0x0c | clock );
 }
 
@@ -118,16 +118,16 @@
   const rtems_time_of_day *time
 )
 {
-  uint32_t       icm7170;
+  uintptr_t      icm7170;
   getRegister_f  getReg;
   setRegister_f  setReg;
   uint32_t       year;
-  uint32_t       clock;
+  uintptr_t      clock;
 
   icm7170 = RTC_Table[ minor ].ulCtrlPort1;
   getReg = RTC_Table[ minor ].getRegister;
   setReg = RTC_Table[ minor ].setRegister;
-  clock = (uint32_t) RTC_Table[ minor ].pDeviceParams;
+  clock = (uintptr_t) RTC_Table[ minor ].pDeviceParams;
 
   year = time->year;
 

diff -u rtems/c/src/libchip/rtc/icm7170_reg.c:1.6 rtems/c/src/libchip/rtc/icm7170_reg.c:1.7
--- rtems/c/src/libchip/rtc/icm7170_reg.c:1.6	Tue Apr 20 05:43:39 2004
+++ rtems/c/src/libchip/rtc/icm7170_reg.c	Sun Apr 25 16:18:06 2010
@@ -31,7 +31,7 @@
  */
 
 uint32_t   _ICM7170_NAME(icm7170_get_register)(
-  uint32_t    ulCtrlPort,
+  uintptr_t   ulCtrlPort,
   uint8_t     ucRegNum
 )
 {
@@ -47,7 +47,7 @@
  */
 
 void  _ICM7170_NAME(icm7170_set_register)(
-  uint32_t    ulCtrlPort,
+  uintptr_t   ulCtrlPort,
   uint8_t     ucRegNum,
   uint32_t    ucData
 )

diff -u rtems/c/src/libchip/rtc/m48t08_reg.c:1.6 rtems/c/src/libchip/rtc/m48t08_reg.c:1.7
--- rtems/c/src/libchip/rtc/m48t08_reg.c:1.6	Tue Apr 20 05:43:39 2004
+++ rtems/c/src/libchip/rtc/m48t08_reg.c	Sun Apr 25 16:18:06 2010
@@ -31,7 +31,7 @@
  */
 
 uint32_t   _M48T08_NAME(m48t08_get_register)(
-  uint32_t    ulCtrlPort,
+  uintptr_t   ulCtrlPort,
   uint8_t     ucRegNum
 )
 {
@@ -47,7 +47,7 @@
  */
 
 void  _M48T08_NAME(m48t08_set_register)(
-  uint32_t    ulCtrlPort,
+  uintptr_t   ulCtrlPort,
   uint8_t     ucRegNum,
   uint32_t    ucData
 )

diff -u rtems/c/src/libchip/rtc/rtc.h:1.11 rtems/c/src/libchip/rtc/rtc.h:1.12
--- rtems/c/src/libchip/rtc/rtc.h:1.11	Mon Sep 22 06:45:25 2008
+++ rtems/c/src/libchip/rtc/rtc.h	Sun Apr 25 16:18:06 2010
@@ -24,9 +24,8 @@
  *  Types for get and set register routines
  */
 
-typedef uint32_t   (*getRegister_f)(uint32_t   port, uint8_t   register);
-typedef void       (*setRegister_f)(
-                            uint32_t   port, uint8_t   reg, uint32_t   value);
+typedef uint32_t (*getRegister_f)(uintptr_t  port, uint8_t reg);
+typedef void     (*setRegister_f)(uintptr_t  port, uint8_t reg, uint32_t value);
 
 typedef struct _rtc_fns {
   void    (*deviceInitialize)(int minor);
@@ -68,8 +67,8 @@
   const rtc_fns *pDeviceFns;
   bool           (*deviceProbe)(int minor);
   void          *pDeviceParams;
-  uint32_t       ulCtrlPort1;
-  uint32_t       ulDataPort;
+  uintptr_t      ulCtrlPort1;
+  uintptr_t      ulDataPort;
   getRegister_f  getRegister;
   setRegister_f  setRegister;
 } rtc_tbl;


 *joel*:
2010-04-25	Joel Sherrill <joel.sherrilL at OARcorp.com>

	* cpu.c, rtems/score/cpu.h: Move _CPU_Context_Initialize() to cpu.c so
	it is easier to make warning free.

M  1.137  cpukit/score/cpu/mips/ChangeLog
M   1.35  cpukit/score/cpu/mips/cpu.c
M   1.56  cpukit/score/cpu/mips/rtems/score/cpu.h

diff -u rtems/cpukit/score/cpu/mips/ChangeLog:1.136 rtems/cpukit/score/cpu/mips/ChangeLog:1.137
--- rtems/cpukit/score/cpu/mips/ChangeLog:1.136	Sun Apr 25 09:56:05 2010
+++ rtems/cpukit/score/cpu/mips/ChangeLog	Sun Apr 25 16:37:45 2010
@@ -1,5 +1,10 @@
 2010-04-25	Joel Sherrill <joel.sherrilL at OARcorp.com>
 
+	* cpu.c, rtems/score/cpu.h: Move _CPU_Context_Initialize() to cpu.c so
+	it is easier to make warning free.
+
+2010-04-25	Joel Sherrill <joel.sherrilL at OARcorp.com>
+
 	* rtems/score/cpu.h: Remove warning in _CPU_Context_Initialize.
 
 2010-03-27	Joel Sherrill <joel.sherrill at oarcorp.com>

diff -u rtems/cpukit/score/cpu/mips/cpu.c:1.34 rtems/cpukit/score/cpu/mips/cpu.c:1.35
--- rtems/cpukit/score/cpu/mips/cpu.c:1.34	Sat Mar 27 10:02:15 2010
+++ rtems/cpukit/score/cpu/mips/cpu.c	Sun Apr 25 16:37:46 2010
@@ -251,6 +251,49 @@
 /* we don't support this yet */
 }
 
+/*
+ *  _CPU_Context_Initialize
+ *
+ *  This kernel routine initializes the basic non-FP context area associated
+ *  with each thread.
+ *
+ *  Input parameters:
+ *    the_context  - pointer to the context area
+ *    stack_base   - address of memory for the SPARC
+ *    size         - size in bytes of the stack area
+ *    new_level    - interrupt level for this context area
+ *    entry_point  - the starting execution point for this this context
+ *    is_fp        - TRUE if this context is associated with an FP thread
+ *
+ *  Output parameters: NONE
+ */
+void _CPU_Context_Initialize(
+  Context_Control  *the_context,
+  uintptr_t        *stack_base,
+  uint32_t          size,
+  uint32_t          new_level,
+  void             *entry_point,
+  bool              is_fp
+)
+{
+  uintptr_t             stack_tmp;
+  __MIPS_REGISTER_TYPE  intlvl = new_level & 0xff;
+
+  stack_tmp  = (uintptr_t)stack_base;
+  stack_tmp += ((size) - CPU_STACK_ALIGNMENT);
+  stack_tmp &= (__MIPS_REGISTER_TYPE) ~(CPU_STACK_ALIGNMENT - 1);
+
+  the_context->sp = (__MIPS_REGISTER_TYPE) stack_tmp;
+  the_context->fp = (__MIPS_REGISTER_TYPE) stack_tmp;
+  the_context->ra = (__MIPS_REGISTER_TYPE) (uintptr_t)entry_point;
+  the_context->c0_sr =
+    ((intlvl==0)? (mips_interrupt_mask() | 0x300 | _INTON):
+      ( ((intlvl<<9) & mips_interrupt_mask()) | 0x300 |
+      ((intlvl & 1)?_INTON:0)) ) |
+      SR_CU0 | ((is_fp)?SR_CU1:0) | _EXTRABITS;
+}
+
+
 /*PAGE
  *
  *  _CPU_Internal_threads_Idle_thread_body

diff -u rtems/cpukit/score/cpu/mips/rtems/score/cpu.h:1.55 rtems/cpukit/score/cpu/mips/rtems/score/cpu.h:1.56
--- rtems/cpukit/score/cpu/mips/rtems/score/cpu.h:1.55	Sun Apr 25 09:56:05 2010
+++ rtems/cpukit/score/cpu/mips/rtems/score/cpu.h	Sun Apr 25 16:37:46 2010
@@ -416,7 +416,7 @@
 } Context_Control;
 
 #define _CPU_Context_Get_SP( _context ) \
-  (_context)->sp
+  (uintptr_t) (_context)->sp
 
 /* WARNING: If this structure is modified, the constants in cpu.h
  *          must also be updated.
@@ -851,20 +851,15 @@
 #define _EXTRABITS      0  /* make sure we're in user mode on MIPS1 processors */
 #endif /* __mips == 1 */
 
-#define _CPU_Context_Initialize( _the_context, _stack_base, _size, _isr, _entry_point, _is_fp ) \
-  { \
- 	uintptr_t  _stack_tmp = \
-           (uintptr_t)(_stack_base) + (_size) - CPU_STACK_ALIGNMENT; \
-        uintptr_t  _intlvl = _isr & 0xff; \
-  	_stack_tmp &= ~(CPU_STACK_ALIGNMENT - 1); \
-  	(_the_context)->sp = (__MIPS_REGISTER_TYPE) _stack_tmp; \
-  	(_the_context)->fp = (__MIPS_REGISTER_TYPE) _stack_tmp; \
-	(_the_context)->ra = (__MIPS_REGISTER_TYPE)_entry_point; \
-	(_the_context)->c0_sr = ((_intlvl==0)?(mips_interrupt_mask() | 0x300 | _INTON): \
-		( ((_intlvl<<9) & mips_interrupt_mask()) | 0x300 | ((_intlvl & 1)?_INTON:0)) ) | \
-				SR_CU0 | ((_is_fp)?SR_CU1:0) | _EXTRABITS; \
-  }
 
+void _CPU_Context_Initialize(
+  Context_Control  *the_context,
+  uintptr_t        *stack_base,
+  uint32_t          size,
+  uint32_t          new_level,
+  void             *entry_point,
+  bool              is_fp
+);
 
 
 /*



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20100425/52d01ed2/attachment-0001.html>


More information about the vc mailing list