io_device.hh (2685:a0821abe7132) | io_device.hh (2738:5d7a31c7fa29) |
---|---|
1/* 2 * Copyright (c) 2004-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 233 unchanged lines hidden (view full) --- 242 : MemObject(p->name), platform(p->platform), pioPort(NULL), 243 _params(p) 244 {} 245 246 virtual ~PioDevice(); 247 248 virtual void init(); 249 | 1/* 2 * Copyright (c) 2004-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 233 unchanged lines hidden (view full) --- 242 : MemObject(p->name), platform(p->platform), pioPort(NULL), 243 _params(p) 244 {} 245 246 virtual ~PioDevice(); 247 248 virtual void init(); 249 |
250 virtual Port *getPort(const std::string &if_name) | 250 virtual Port *getPort(const std::string &if_name, int idx = -1) |
251 { 252 if (if_name == "pio") { 253 if (pioPort != NULL) 254 panic("pio port already connected to."); 255 pioPort = new PioPort(this, params()->platform); 256 return pioPort; 257 } else 258 return NULL; --- 45 unchanged lines hidden (view full) --- 304 void dmaWrite(Addr addr, int size, Event *event, uint8_t *data) 305 { dmaPort->dmaAction(Packet::WriteReq, addr, size, event, data) ; } 306 307 void dmaRead(Addr addr, int size, Event *event, uint8_t *data = NULL) 308 { dmaPort->dmaAction(Packet::ReadReq, addr, size, event, data); } 309 310 bool dmaPending() { return dmaPort->dmaPending(); } 311 | 251 { 252 if (if_name == "pio") { 253 if (pioPort != NULL) 254 panic("pio port already connected to."); 255 pioPort = new PioPort(this, params()->platform); 256 return pioPort; 257 } else 258 return NULL; --- 45 unchanged lines hidden (view full) --- 304 void dmaWrite(Addr addr, int size, Event *event, uint8_t *data) 305 { dmaPort->dmaAction(Packet::WriteReq, addr, size, event, data) ; } 306 307 void dmaRead(Addr addr, int size, Event *event, uint8_t *data = NULL) 308 { dmaPort->dmaAction(Packet::ReadReq, addr, size, event, data); } 309 310 bool dmaPending() { return dmaPort->dmaPending(); } 311 |
312 virtual Port *getPort(const std::string &if_name) | 312 virtual Port *getPort(const std::string &if_name, int idx = -1) |
313 { 314 if (if_name == "pio") { 315 if (pioPort != NULL) 316 panic("pio port already connected to."); 317 pioPort = new PioPort(this, params()->platform); 318 return pioPort; 319 } else if (if_name == "dma") { 320 if (dmaPort != NULL) --- 12 unchanged lines hidden --- | 313 { 314 if (if_name == "pio") { 315 if (pioPort != NULL) 316 panic("pio port already connected to."); 317 pioPort = new PioPort(this, params()->platform); 318 return pioPort; 319 } else if (if_name == "dma") { 320 if (dmaPort != NULL) --- 12 unchanged lines hidden --- |