Loopback configurations for SCC, FCC in MPC8247

srideep.devireddy at wipro.com srideep.devireddy at wipro.com
Sat Mar 18 03:42:50 EST 2006


 Hi all,

I am using MPC8247. I am using FCC0, FCC1, SCC3 and SCC4 in Ethernet mode. I want to enable local loopback in FCC and SCC. I tried in the following combinations of registers for SCC

   case ETH_LOOPBK_ENBL:
        printk("%s, ETH_LOOPBK_ENBL\n",__FUNCTION__);
                                                                                                                            

        /* ENABLE the LOOP back by setting the 24th and 25th bits
         * as 0 and 1 in GSMRL */
        cep->sccp->scc_gsmrl |= SCC_GSMRL_DIAG_LOOP;
        cpm2_immr->im_cpmux.cmx_scr &= ~CMX_CLK_MASK;
        cpm2_immr->im_cpmux.cmx_scr |= CMX_LPCLK_ROUTE;
        //cep->sccp->scc_gsmrh |= (SCC_GSMRH_CDS | SCC_GSMRH_CTSS);
                                                                                                                            

        /* Configure PSMR for enabling- Promiscuos mode, simultaneous Tx, Rx
         * and Full duplex mode */
        //cep->sccp->scc_psmr |= (SCC_PSMR_PRO | SCC_PSMR_LPB | SCC_PSMR_FDE);
        cep->sccp->scc_psmr |= (SCC_PSMR_PRO | SCC_PSMR_FDE);
        return 0;
                                                                                                                            

      case ETH_LOOPBK_DSBL:
        printk("%s, ETH_LOOPBK_DSBL\n",__FUNCTION__);
        /* Disable the LOOP back and revert back to normal operation by
         * setting the 24th and 25th bits as 0 and 0 in GSMRL */
        cep->sccp->scc_gsmrl &= ~SCC_GSMRL_DIAG_LOOP;
        cpm2_immr->im_cpmux.cmx_scr &= ~CMX_CLK_MASK;
        cpm2_immr->im_cpmux.cmx_scr |= CMX_CLK_ROUTE;

   //cep->sccp->scc_gsmrh &= ~(SCC_GSMRH_CDS | SCC_GSMRH_CTSS);
                                                                                                                            

        /* Revert PSMR settings */
//      cep->sccp->scc_psmr &= ~(SCC_PSMR_PRO | SCC_PSMR_LPB | SCC_PSMR_FDE);
        cep->sccp->scc_psmr &= ~(SCC_PSMR_PRO | SCC_PSMR_FDE);
        return 0;

Following combinations for FCC

       case ETH_LOOPBK_ENBL:
        /* Enable loop back by setting the diag bits in GFMR. Promiscus mode is
         * enabled by setting the FPSMR bit */
        cep->fccp->fcc_gfmr  |= FCC_GFMR_DIAG_LE;
        cep->fccp->fcc_fpsmr |= (FCC_PSMR_PRO | FCC_PSMR_FDE | FCC_PSMR_LPB);
        printk("%s[FCC %2d]: Local Loopback Enabled  [GFMR - 0x%08x, FPSMR - 0x%08x]\n", dev->name, cep->fip->fc_fccnum, cep->fccp->fcc_gfmr, cep->fccp->fcc_fpsmr);

        return 0;
                                                                                                                            

      case ETH_LOOPBK_DSBL:
        /* Disable loopback and promiscus mode */
        cep->fccp->fcc_gfmr  &= ~FCC_GFMR_DIAG_ALE;
        cep->fccp->fcc_fpsmr &= ~(FCC_PSMR_PRO | FCC_PSMR_FDE | FCC_PSMR_LPB);
        printk("%s[FCC %2d]: Local Loopback Disabled [GFMR - 0x%08x, FPSMR - 0x%08x]\n", dev->name, cep->fip->fc_fccnum, cep->fccp->fcc_gfmr, cep->fccp->fcc_fpsmr);

        return 0;



With the above cases the loopback is not enabling. Can any one suggest me the register configurations for eabling loopback in FCC and SCC.

Thanks in advance

srideep




The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20060317/a6d801a2/attachment.htm 


More information about the Linuxppc-embedded mailing list