OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [stable_0_2_0_rc3/] [or1ksim/] [peripheral/] [eth.c] - Diff between revs 1359 and 1366

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 1359 Rev 1366
Line 52... Line 52...
 
 
static struct eth_device eths[MAX_ETHERNETS];
static struct eth_device eths[MAX_ETHERNETS];
 
 
/* simulator interface */
/* simulator interface */
static void eth_reset_controller( struct eth_device *eth);
static void eth_reset_controller( struct eth_device *eth);
static void eth_vapi_read( unsigned long id, unsigned long data);
static void eth_vapi_read( unsigned long id, unsigned long data, void *dat);
/* register interface */
/* register interface */
static void eth_write32( oraddr_t addr, uint32_t value, void *dat );
static void eth_write32( oraddr_t addr, uint32_t value, void *dat );
static uint32_t eth_read32( oraddr_t addr, void *dat );
static uint32_t eth_read32( oraddr_t addr, void *dat );
/* clock */
/* clock */
static void eth_controller_tx_clock( struct eth_device * );
static void eth_controller_tx_clock( struct eth_device * );
Line 642... Line 642...
        eth->rx.bd_index = eth->regs.tx_bd_num << 1;
        eth->rx.bd_index = eth->regs.tx_bd_num << 1;
 
 
        /* Initialize VAPI */
        /* Initialize VAPI */
        if (config.ethernets[i].base_vapi_id) {
        if (config.ethernets[i].base_vapi_id) {
            eth->base_vapi_id = config.ethernets[i].base_vapi_id;
            eth->base_vapi_id = config.ethernets[i].base_vapi_id;
            vapi_install_multi_handler( eth->base_vapi_id, ETH_NUM_VAPI_IDS, eth_vapi_read );
            vapi_install_multi_handler( eth->base_vapi_id, ETH_NUM_VAPI_IDS, eth_vapi_read, NULL );
        }
        }
    }
    }
}
}
/* ========================================================================= */
/* ========================================================================= */
 
 
Line 814... Line 814...
 
 
 
 
/*
/*
 *   VAPI connection to outside
 *   VAPI connection to outside
 */
 */
static void eth_vapi_read (unsigned long id, unsigned long data)
static void eth_vapi_read (unsigned long id, unsigned long data, void *dat)
{
{
    unsigned long which;
    unsigned long which;
    struct eth_device *eth = eth_find_vapi_device( id, &which );
    struct eth_device *eth = eth_find_vapi_device( id, &which );
 
 
    debug( 5, "ETH: id %08lx, data %08lx\n", id, data );
    debug( 5, "ETH: id %08lx, data %08lx\n", id, data );

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.