package/boot/uboot-ar71xx/src/drivers/net/phy/rtl8366_mii.c
//-------------------------------------------------------------------
// Switch register read / write functions
//-------------------------------------------------------------------
Switch register read / write functions
Switch register read / write functions
static int rtl8366_readRegister(uint32_t reg, uint16_t *data)
{
    uint32_t regData;
    DBG("rtl8366: read register=%#04x, data=", reg);
    if (smi_read(reg, &regData)) {
        printf("\nrtl8366 smi read failed!\n");
        return -1;
    }
    if (data)
        *data = regData;
    DBG("%#04x\n", regData);
    return 0;
}
static int rtl8366_readRegister ( uint32_t reg , uint16_t * data ) { uint32_t regData ; DBG ( " " , reg ) ; if ( smi_read ( reg , & regData ) ) { printf ( " \n \n " ) ; return -1 ; } if ( data ) * data = regData ; DBG ( " \n " , regData ) ; return 0 ; }
Switch register read / write functions
Switch register read / write functions