comparison packages/hal/common/current/src/hal_stub.c @ 10:d3fbcdfa1b2f ecos-sw-1999-05-29

Merge from eCos master repository on 1999-05-29-00:13:11-BST
author jlarmour
date Fri, 28 May 1999 16:43:09 +0000
parents ece80412419a
children 4cc3eff958ab
comparison
equal deleted inserted replaced
9:95cc44ea0068 10:d3fbcdfa1b2f
273 static int initialized = 0; 273 static int initialized = 0;
274 274
275 if (!initialized) { 275 if (!initialized) {
276 initialized = 1; 276 initialized = 1;
277 277
278 #ifdef HAL_STUB_PLATFORM_INIT
279 // If the platform defines any initialization code, call it here.
280 HAL_STUB_PLATFORM_INIT();
281 #endif
282
278 // Get serial port initialized. 283 // Get serial port initialized.
279 HAL_STUB_PLATFORM_INIT_SERIAL(); 284 HAL_STUB_PLATFORM_INIT_SERIAL();
280 285
281 #ifdef CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT 286 #ifdef CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
282 // Get interrupt handler initialized. 287 // Get interrupt handler initialized.
408 HAL_ICACHE_DISABLE(); 413 HAL_ICACHE_DISABLE();
409 state = 0; 414 state = 0;
410 break; 415 break;
411 case CACHE_FLUSH: 416 case CACHE_FLUSH:
412 HAL_ICACHE_SYNC(); 417 HAL_ICACHE_SYNC();
418 #ifndef CYGPKG_HAL_MIPS
419 // SYNC and INVALIDATE_ALL are the same on the MIPS,
420 // so avoid doing it twice.
413 HAL_ICACHE_INVALIDATE_ALL(); 421 HAL_ICACHE_INVALIDATE_ALL();
422 #endif
414 break; 423 break;
415 case CACHE_NOOP: 424 case CACHE_NOOP:
416 /* fall through */ 425 /* fall through */
417 default: 426 default:
418 break; 427 break;
440 HAL_DCACHE_DISABLE(); 449 HAL_DCACHE_DISABLE();
441 state = 0; 450 state = 0;
442 break; 451 break;
443 case CACHE_FLUSH: 452 case CACHE_FLUSH:
444 HAL_DCACHE_SYNC(); 453 HAL_DCACHE_SYNC();
454 #ifndef CYGPKG_HAL_MIPS
455 // SYNC and INVALIDATE_ALL are the same on the MIPS,
456 // so avoid doing it twice.
445 HAL_DCACHE_INVALIDATE_ALL(); 457 HAL_DCACHE_INVALIDATE_ALL();
458 #endif
446 break; 459 break;
447 case CACHE_NOOP: 460 case CACHE_NOOP:
448 /* fall through */ 461 /* fall through */
449 default: 462 default:
450 break; 463 break;
451 } 464 }
452
453 #ifdef HAL_DCACHE_IS_ENABLED 465 #ifdef HAL_DCACHE_IS_ENABLED
454 HAL_DCACHE_IS_ENABLED(state); 466 HAL_DCACHE_IS_ENABLED(state);
455 #endif 467 #endif
456 468
457 return state; 469 return state;