Changeset 5039d92 in rtems
- Timestamp:
- 10/12/14 19:00:22 (9 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 11c1657a
- Parents:
- 5105833c
- git-author:
- Joel Sherrill <joel.sherrill@…> (10/12/14 19:00:22)
- git-committer:
- Joel Sherrill <joel.sherrill@…> (10/13/14 15:33:30)
- Location:
- c/src/lib/libcpu/powerpc/ppc403
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libcpu/powerpc/ppc403/clock/clock.c
r5105833c r5039d92 229 229 } 230 230 231 void Install_clock(void (*clock_isr)(void *))231 static void Install_clock(void (*clock_isr)(void *)) 232 232 { 233 233 rtems_irq_connect_data clockIrqConnData; … … 255 255 } 256 256 257 void ReInstall_clock(void (*new_clock_isr)(void *)) 258 { 259 uint32_t isrlevel = 0; 257 /* 258 * Called via atexit() 259 * Remove the clock interrupt handler by setting handler to NULL 260 * 261 * This will not work on the 405GP because 262 * when bit's are set in TCR they can only be unset by a reset 263 */ 264 void Clock_exit(void) 265 { 260 266 rtems_irq_connect_data clockIrqConnData; 261 262 rtems_interrupt_disable(isrlevel);263 267 264 268 clockIrqConnData.name = BSP_PIT; … … 269 273 270 274 BSP_remove_rtems_irq_handler (&clockIrqConnData); 271 272 clockIrqConnData.on = ClockOn;273 clockIrqConnData.off = ClockOff;274 clockIrqConnData.isOn = ClockIsOn;275 clockIrqConnData.name = BSP_PIT;276 clockIrqConnData.hdl = new_clock_isr;277 278 if (!BSP_install_rtems_irq_handler (&clockIrqConnData)) {279 printk("Unable to connect Clock Irq handler\n");280 rtems_fatal_error_occurred(1);281 }282 283 rtems_interrupt_enable(isrlevel);284 }285 286 /*287 * Called via atexit()288 * Remove the clock interrupt handler by setting handler to NULL289 *290 * This will not work on the 405GP because291 * when bit's are set in TCR they can only be unset by a reset292 */293 void Clock_exit(void)294 {295 rtems_irq_connect_data clockIrqConnData;296 297 clockIrqConnData.name = BSP_PIT;298 if (!BSP_get_current_rtems_irq_handler(&clockIrqConnData)) {299 printk("Unable to stop system clock\n");300 rtems_fatal_error_occurred(1);301 }302 303 BSP_remove_rtems_irq_handler (&clockIrqConnData);304 275 } 305 276 -
c/src/lib/libcpu/powerpc/ppc403/console/console405.c
r5105833c r5039d92 57 57 #include "../irq/ictrl.h" 58 58 #include <stdlib.h> /* for atexit() */ 59 60 59 #include <rtems/console.h> 61 60 62 61 struct async { -
c/src/lib/libcpu/powerpc/ppc403/tty_drv/tty_drv.c
r5105833c r5039d92 18 18 #include "../irq/ictrl.h" 19 19 #include <stdlib.h> /* for atexit() */ 20 #include <tty_drv.h> 20 21 21 22 extern uint32_t bsp_serial_per_sec; … … 150 151 151 152 152 int tty0_round(double x) 153 static int 154 tty0_round(double x) 153 155 { 154 156 return (int)((int)((x-(int)x)*1000)>500 ? x+1 : x); 155 157 } 156 158 157 void158 tty0BaudSet(uint32_t 159 static void 160 tty0BaudSet(uint32_t baudrate) 159 161 { 160 162 uint32_t tmp; … … 169 171 tty0port->LCR = tty0port->LCR & ~LCR_DL; 170 172 } 173 171 174 /* 172 175 * Hardware-dependent portion of tcsetattr(). … … 177 180 int baud; 178 181 179 /* FIXME: check c_cflag & CRTSCTS for hardware flow control */182 /* FIXME: check c_cflag & CRTSCTS for hardware flow control */ 180 183 /* FIXME: check and IMPLEMENT XON/XOFF */ 181 184 switch (t->c_cflag & CBAUD) { … … 324 327 * 325 328 */ 326 void 327 tty0DeInit(void) 329 static void tty0DeInit(void) 328 330 { 329 331 /* … … 344 346 * 345 347 */ 346 rtems_status_code348 static rtems_status_code 347 349 tty0Initialize(void) 348 350 { … … 371 373 /* Disable tty0port interrupts while changing hardware */ 372 374 _ier = tty0port->IER; 375 (void) _ier; /* avoid set but not used warning */ 373 376 tty0port->IER = 0; 374 377 … … 396 399 _tmp = tty0port->RBR; 397 400 _tmp = tty0port->MSR; 401 (void) _tmp; /* avoid set but not used warning */ 398 402 399 403 /* Enable recive interrupts, don't enable TxInt yet */
Note: See TracChangeset
for help on using the changeset viewer.