eepro100: Add missing SCB register names
Some system control block registers were addressed using their offset value. Use symbolic names now and clean the documentation. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
		
							parent
							
								
									ce0e58b394
								
							
						
					
					
						commit
						0908bba157
					
				@ -125,16 +125,20 @@
 | 
				
			|||||||
/* Offsets to the various registers.
 | 
					/* Offsets to the various registers.
 | 
				
			||||||
   All accesses need not be longword aligned. */
 | 
					   All accesses need not be longword aligned. */
 | 
				
			||||||
enum speedo_offsets {
 | 
					enum speedo_offsets {
 | 
				
			||||||
    SCBStatus = 0,
 | 
					    SCBStatus = 0,              /* Status Word. */
 | 
				
			||||||
    SCBAck = 1,
 | 
					    SCBAck = 1,
 | 
				
			||||||
    SCBCmd = 2,                 /* Rx/Command Unit command and status. */
 | 
					    SCBCmd = 2,                 /* Rx/Command Unit command and status. */
 | 
				
			||||||
    SCBIntmask = 3,
 | 
					    SCBIntmask = 3,
 | 
				
			||||||
    SCBPointer = 4,             /* General purpose pointer. */
 | 
					    SCBPointer = 4,             /* General purpose pointer. */
 | 
				
			||||||
    SCBPort = 8,                /* Misc. commands and operands.  */
 | 
					    SCBPort = 8,                /* Misc. commands and operands.  */
 | 
				
			||||||
    SCBflash = 12, SCBeeprom = 14,      /* EEPROM and flash memory control. */
 | 
					    SCBflash = 12,              /* Flash memory control. */
 | 
				
			||||||
 | 
					    SCBeeprom = 14,             /* EEPROM control. */
 | 
				
			||||||
    SCBCtrlMDI = 16,            /* MDI interface control. */
 | 
					    SCBCtrlMDI = 16,            /* MDI interface control. */
 | 
				
			||||||
    SCBEarlyRx = 20,            /* Early receive byte count. */
 | 
					    SCBEarlyRx = 20,            /* Early receive byte count. */
 | 
				
			||||||
    SCBFlow = 24,
 | 
					    SCBFlow = 24,               /* Flow Control. */
 | 
				
			||||||
 | 
					    SCBpmdr = 27,               /* Power Management Driver. */
 | 
				
			||||||
 | 
					    SCBgctrl = 28,              /* General Control. */
 | 
				
			||||||
 | 
					    SCBgstat = 29,              /* General Status. */
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* A speedo3 transmit buffer descriptor with two buffers... */
 | 
					/* A speedo3 transmit buffer descriptor with two buffers... */
 | 
				
			||||||
@ -1333,11 +1337,11 @@ static uint8_t eepro100_read1(EEPRO100State * s, uint32_t addr)
 | 
				
			|||||||
    case SCBeeprom:
 | 
					    case SCBeeprom:
 | 
				
			||||||
        val = eepro100_read_eeprom(s);
 | 
					        val = eepro100_read_eeprom(s);
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
    case 0x1b:                 /* PMDR (power management driver register) */
 | 
					    case SCBpmdr:       /* Power Management Driver Register */
 | 
				
			||||||
        val = 0;
 | 
					        val = 0;
 | 
				
			||||||
        TRACE(OTHER, logout("addr=%s val=0x%02x\n", regname(addr), val));
 | 
					        TRACE(OTHER, logout("addr=%s val=0x%02x\n", regname(addr), val));
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
    case 0x1d:                 /* general status register */
 | 
					    case SCBgstat:      /* General Status Register */
 | 
				
			||||||
        /* 100 Mbps full duplex, valid link */
 | 
					        /* 100 Mbps full duplex, valid link */
 | 
				
			||||||
        val = 0x07;
 | 
					        val = 0x07;
 | 
				
			||||||
        TRACE(OTHER, logout("addr=General Status val=%02x\n", val));
 | 
					        TRACE(OTHER, logout("addr=General Status val=%02x\n", val));
 | 
				
			||||||
@ -1431,7 +1435,7 @@ static void eepro100_write1(EEPRO100State * s, uint32_t addr, uint8_t val)
 | 
				
			|||||||
    case SCBFlow:       /* does not exist on 82557 */
 | 
					    case SCBFlow:       /* does not exist on 82557 */
 | 
				
			||||||
    case SCBFlow + 1:
 | 
					    case SCBFlow + 1:
 | 
				
			||||||
    case SCBFlow + 2:
 | 
					    case SCBFlow + 2:
 | 
				
			||||||
    case SCBFlow + 3:
 | 
					    case SCBpmdr:       /* does not exist on 82557 */
 | 
				
			||||||
        TRACE(OTHER, logout("addr=%s val=0x%02x\n", regname(addr), val));
 | 
					        TRACE(OTHER, logout("addr=%s val=0x%02x\n", regname(addr), val));
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
    case SCBeeprom:
 | 
					    case SCBeeprom:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user