Changeset 85c005f3 in rtems
- Timestamp:
- 01/12/06 00:15:16 (18 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 1827c35f
- Parents:
- c2fc65b
- Location:
- c/src/lib/libbsp/shared
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/shared/ChangeLog
rc2fc65b r85c005f3 1 2006-01-11 Till Straumann <strauman@slac.stanford.edu> 2 * vmeUniverse/vmeTsi148.c, vmeUniverse/vmeTsi148.h, 3 vmeUniverse/vmeUniverse.c, vmeUniverse/vmeUniverse.h, 4 vmeUniverse/vme_amd_defs.h: No longer enable posted-writes 5 on master windows (creates race-condition on memory-mapped 6 devices). A new flag allows for signalling that a window 7 maps 'ordinary memory'. Disable VME IRQ level if no 8 handler is registered with interrupting vector. 9 1 10 2006-01-11 Till Straumann <strauman@slac.stanford.edu> 2 11 -
c/src/lib/libbsp/shared/vmeUniverse/vmeTsi148.c
rc2fc65b r85c005f3 1148 1148 if ( !(ip=irqHdlTbl[vector])) { 1149 1149 /* TODO: log error message - RTEMS has no logger :-( */ 1150 printk("vmeTsi148 ISR: ERROR: no handler registered (level %i) IACK 0x%08x\n", 1151 lvl, vector); 1150 vmeTsi148IntDisable(lvl); 1151 printk("vmeTsi148 ISR: ERROR: no handler registered (level %i) IACK 0x%08x -- DISABING level %i\n", 1152 lvl, vector, lvl); 1152 1153 } else { 1153 1154 /* dispatch handler, it must clear the IRQ at the device */ -
c/src/lib/libbsp/shared/vmeUniverse/vmeUniverse.c
rc2fc65b r85c005f3 291 291 { 292 292 unsigned long mode=0; 293 294 /* NOTE: reading the CY961 (Echotek ECDR814) with VDW32 295 * generated bus errors when reading 32-bit words 296 * - very weird, because the registers are 16-bit 297 * AFAIK. 298 * - 32-bit accesses worked fine on vxWorks which 299 * has the port set to 64-bit. 300 * ???????? 301 */ 302 293 303 if (!ismaster) { 294 304 mode |= UNIV_SCTL_DAT | UNIV_SCTL_PGM; 295 305 mode |= UNIV_SCTL_USER; 296 } 306 if ( VME_AM_IS_MEMORY & address_space ) 307 mode |= UNIV_SCTL_PWEN | UNIV_SCTL_PREN; 308 mode |= UNIV_SCTL_EN; 309 } else { 310 mode |= UNIV_MCTL_VDW64 | UNIV_MCTL_VCT /* enable block transfers */; 311 if ( VME_AM_IS_MEMORY & address_space ) 312 mode |= UNIV_MCTL_PWEN; 313 mode |= UNIV_MCTL_EN; 314 } 315 316 address_space &= ~VME_AM_IS_MEMORY; 317 297 318 switch (address_space) { 298 319 case VME_AM_STD_SUP_PGM: … … 457 478 WRITE_LE(offst,preg,12); 458 479 #endif 459 /* calculate configuration word and enable the port */460 /* NOTE: reading the CY961 (Echotek ECDR814) with VDW32461 * generated bus errors when reading 32-bit words462 * - very weird, because the registers are 16-bit463 * AFAIK.464 * - 32-bit accesses worked fine on vxWorks which465 * has the port set to 64-bit.466 * ????????467 */468 if (ismaster)469 mode |= UNIV_MCTL_EN | UNIV_MCTL_PWEN | UNIV_MCTL_VDW64 | UNIV_MCTL_VCT;470 else471 mode |= UNIV_SCTL_EN | UNIV_SCTL_PWEN | UNIV_SCTL_PREN;472 480 473 481 #ifdef TSILL … … 546 554 cntrl&UNIV_MCTL_PGM ? "Pgm" : "Dat", 547 555 cntrl&UNIV_MCTL_SUPER ? "Sup" : "Usr"); 556 if ( cntrl & UNIV_MCTL_PWEN ) 557 uprintf(f,", PWEN"); 548 558 } else { 549 559 uprintf(f,"%s %s %s %s", … … 552 562 cntrl&UNIV_SCTL_SUPER ? "Sup," : " ", 553 563 cntrl&UNIV_SCTL_USER ? "Usr" : ""); 564 if ( cntrl & UNIV_SCTL_PWEN ) 565 uprintf(f,", PWEN"); 566 if ( cntrl & UNIV_SCTL_PREN ) 567 uprintf(f,", PREN"); 554 568 } 555 569 uprintf(f,"\n"); … … 591 605 return -1; 592 606 } 593 if ( (cntrl & (ismaster ? UNIV_MCTL_AM_MASK : UNIV_SCTL_AM_MASK)) 594 != offst ) 607 608 if ( ! (VME_MODE_EXACT_MATCH & l->aspace) ) { 609 cntrl &= (ismaster ? UNIV_MCTL_AM_MASK : UNIV_SCTL_AM_MASK); 610 offst &= (ismaster ? UNIV_MCTL_AM_MASK : UNIV_SCTL_AM_MASK); 611 } 612 613 if ( cntrl != offst ) 595 614 return 0; /* mode doesn't match requested AM */ 596 615 … … 1306 1325 if (status & UNIV_VIRQ_ERR) { 1307 1326 /* TODO: log error message - RTEMS has no logger :-( */ 1308 printk("vmeUniverse ISR: error read from STATID register; (level: %i) STATID: 0x%08x\n", lvl, status); 1327 #ifdef BSP_PIC_DO_EOI 1328 linten &= ~msk; 1329 #else 1330 vmeUniverseIntDisable(lvl); 1331 #endif 1332 printk("vmeUniverse ISR: error read from STATID register; (level: %i) STATID: 0x%08x -- DISABLING\n", lvl, status); 1309 1333 } else if (!(ip=universeHdlTbl[status & UNIV_VIRQ_STATID_MASK])) { 1334 #ifdef BSP_PIC_DO_EOI 1335 linten &= ~msk; 1336 #else 1337 vmeUniverseIntDisable(lvl); 1338 #endif 1310 1339 /* TODO: log error message - RTEMS has no logger :-( */ 1311 printk("vmeUniverse ISR: no handler installed for this vector; (level: %i) STATID: 0x%08x \n", lvl, status);1340 printk("vmeUniverse ISR: no handler installed for this vector; (level: %i) STATID: 0x%08x -- DISABLING\n", lvl, status); 1312 1341 } else { 1313 1342 /* dispatch handler, it must clear the IRQ at the device */ -
c/src/lib/libbsp/shared/vmeUniverse/vmeUniverse.h
rc2fc65b r85c005f3 75 75 #endif 76 76 77 #endif 77 /* Enables posted writes (and on a VME slave: prefetched reads, too) */ 78 #ifndef VME_AM_IS_MEMORY 79 #define VME_AM_IS_MEMORY (1<<8) 80 #endif 81 82 #endif 83 84 85 86 /* When looking for an address translation, ask for a match of VME_MODE_PWEN etc., too */ 87 #define VME_MODE_EXACT_MATCH (1<<31) 78 88 79 89 #include <stdarg.h> -
c/src/lib/libbsp/shared/vmeUniverse/vme_am_defs.h
rc2fc65b r85c005f3 59 59 #endif 60 60 61 /* Higher order bits are driver specific*/61 /* Mask for standard address modifiers */ 62 62 63 63 #ifndef VME_AM_MASK … … 65 65 #endif 66 66 67 /* Hint that the a window is mapping memory; the 68 * driver may assume it to be safe to enable decoupled 69 * cycles, caching and the like... 70 */ 71 #ifndef VME_AM_IS_MEMORY 72 #define VME_AM_IS_MEMORY (1<<8) 67 73 #endif 74 75 /* Flags 1<<11 .. 1<<8 are reserved 76 * Flags 1<<12 .. 1<<31 are for driver specific options 77 */ 78 79 #endif
Note: See TracChangeset
for help on using the changeset viewer.