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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [bootloaders/] [orpmon/] [cmds/] [eth.c] - Diff between revs 406 and 796

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

Rev 406 Rev 796
Line 41... Line 41...
void show_rx_bd(int start, int max)
void show_rx_bd(int start, int max)
{
{
        int i;
        int i;
        unsigned long rx_bd_base, rx_bd_num;
        unsigned long rx_bd_base, rx_bd_num;
 
 
        rx_bd_num = REG32(ETH_REG_BASE + ETH_RXBD_NUM);
        rx_bd_num = REG32(ETH_REG_BASE + ETH_TX_BD_NUM);
        rx_bd_base = ETH_BD_BASE + (rx_bd_num << 2);
        rx_bd_base = ETH_BD_BASE + (rx_bd_num << 3);
 
 
        for (i = start; i <= max; i++) {
        for (i = start; i <= max; i++) {
                /* Read Rx BD */
                /* Read Rx BD */
                printf("LEN:%04lx", REG32(rx_bd_base + (i << 3)) >> 16);
                printf("LEN:%04lx", REG32(rx_bd_base + (i << 3)) >> 16);
                printf(" E:%04lx", (REG32(rx_bd_base + (i << 3)) >> 15) & 0x1);
                printf(" E:%04lx", (REG32(rx_bd_base + (i << 3)) >> 15) & 0x1);
Line 75... Line 75...
{
{
 
 
        int i;
        int i;
        unsigned long rx_bd_base, rx_bd_num;
        unsigned long rx_bd_base, rx_bd_num;
 
 
        rx_bd_num = REG32(ETH_REG_BASE + ETH_RXBD_NUM);
        rx_bd_num = REG32(ETH_REG_BASE + ETH_TX_BD_NUM);
        rx_bd_base = ETH_BD_BASE + (rx_bd_num << 2);
        rx_bd_base = ETH_BD_BASE + (rx_bd_num << 3);
 
 
        for (i = 0; i <= max; i++) {
        for (i = 0; i <= max; i++) {
                if (!(REG32(rx_bd_base + (i << 3)) & ETH_RX_BD_EMPTY)
                if (!(REG32(rx_bd_base + (i << 3)) & ETH_RX_BD_EMPTY)
                    || show_all) {
                    || show_all) {
                        printf("Rx BD No. %04x located at %08lx\n", i,
                        printf("Rx BD No. %04x located at %08lx\n", i,
Line 320... Line 320...
        printf(" PACKETLEN: %08lx", REG32(ETH_REG_BASE + ETH_PACKETLEN));
        printf(" PACKETLEN: %08lx", REG32(ETH_REG_BASE + ETH_PACKETLEN));
 
 
        printf("\n %08x", ETH_REG_BASE + ETH_COLLCONF);
        printf("\n %08x", ETH_REG_BASE + ETH_COLLCONF);
        printf(" COLLCONF: %08lx", REG32(ETH_REG_BASE + ETH_COLLCONF));
        printf(" COLLCONF: %08lx", REG32(ETH_REG_BASE + ETH_COLLCONF));
 
 
        printf("\n %08x", ETH_REG_BASE + ETH_RXBD_NUM);
        printf("\n %08x", ETH_REG_BASE + ETH_TX_BD_NUM);
        printf(" RX_BD_NUM: %08lx", REG32(ETH_REG_BASE + ETH_RXBD_NUM));
        printf(" TX_BD_NUM: %08lx", REG32(ETH_REG_BASE + ETH_TX_BD_NUM));
 
 
        printf("\n %08x", ETH_REG_BASE + ETH_CTRLMODER);
        printf("\n %08x", ETH_REG_BASE + ETH_CTRLMODER);
        printf(" CTRLMODER: %08lx", REG32(ETH_REG_BASE + ETH_CTRLMODER));
        printf(" CTRLMODER: %08lx", REG32(ETH_REG_BASE + ETH_CTRLMODER));
 
 
        printf("\n %08x", ETH_REG_BASE + ETH_MIIMODER);
        printf("\n %08x", ETH_REG_BASE + ETH_MIIMODER);

powered by: WebSVN 2.1.0

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