Can anyone give suggestion on the following:
-
emu_phy usage related to switch attached to the MDIO Interface.
-
Is that any possible to get mpc85xx_dev_t structure other than ifunit function from separate driver. Since we are getting crash on accessing mpc85xx mdi structure read/write.
-
How to access MDI utilities/library (Ex: MDI_FindPhy, MDI_AutoNegotiate) for tsec0 from separate driver
Below is the sample code, which will access the mpc85xx mdi read/write function. (Registered via MDI_Register_Extended mpc85xx/mii.c).
int mpc85xxphy_attach(struct device *parent, struct device *self, void *aux){
struct ifnet *ifp = NULL;
uint16_t id2,phyid;
mpc85xx_dev_t *mpc85xx = NULL;
int status = 0;
phyid = 0x00;
ifp = ifunit("tsec0");
mpc85xx = ifp->if_softc;
id1 = mpc85xx->mdi->Read(mpc85xx, phyid, MDI_PHYID_2);
printf( "mdi Phy value :[%x]\n",id2);
}
Error message is
mount -T io-pkt /tmp/devnp-mpc85xx_mii.so
Process 806926 (io-pkt-v4-hc) terminated SIGSEGV code=1 fltno=11 ip=480d1a3c(io-pkt-v4-hc@main+0x7c0) ref=00000000
mount: Can’t mount / (type io-pkt)
mount: Possible reason: No such process