| 1 |
/* |
| 2 |
* Cisco Router Simulation platform. |
| 3 |
* Copyright (c) 2005,2006 Christophe Fillot ([email protected]) |
| 4 |
*/ |
| 5 |
|
| 6 |
#ifndef __DEV_MV64460_H__ |
| 7 |
#define __DEV_MV64460_H__ |
| 8 |
|
| 9 |
#include <sys/types.h> |
| 10 |
#include "utils.h" |
| 11 |
#include "mips64.h" |
| 12 |
#include "cpu.h" |
| 13 |
#include "device.h" |
| 14 |
#include "net_io.h" |
| 15 |
#include "vm.h" |
| 16 |
|
| 17 |
struct mv64460_data; |
| 18 |
|
| 19 |
/* Create a new MV64460 controller */ |
| 20 |
int dev_mv64460_init(vm_instance_t *vm,char *name, |
| 21 |
m_uint64_t paddr,m_uint32_t len); |
| 22 |
|
| 23 |
/* Bind a VTTY to a SDMA channel */ |
| 24 |
int mv64460_sdma_bind_vtty(struct mv64460_data *d,u_int chan_id,vtty_t *vtty); |
| 25 |
|
| 26 |
/* Bind a NIO to an Ethernet port */ |
| 27 |
int dev_mv64460_eth_set_nio(struct mv64460_data *d,u_int port_id, |
| 28 |
netio_desc_t *nio); |
| 29 |
|
| 30 |
/* Unbind a NIO from an Ethernet port */ |
| 31 |
int dev_mv64460_eth_unset_nio(struct mv64460_data *d,u_int port_id); |
| 32 |
|
| 33 |
/* Set value of GPP register */ |
| 34 |
void dev_mv64460_set_gpp_reg(struct mv64460_data *d,m_uint32_t val); |
| 35 |
|
| 36 |
/* Set a GPP interrupt */ |
| 37 |
void dev_mv64460_set_gpp_intr(struct mv64460_data *d,u_int irq); |
| 38 |
|
| 39 |
/* Clear a GPP interrupt */ |
| 40 |
void dev_mv64460_clear_gpp_intr(struct mv64460_data *d,u_int irq); |
| 41 |
|
| 42 |
#endif |