Changeset 21dd4cf8 in rtems


Ignore:
Timestamp:
Oct 26, 2005, 2:56:58 PM (14 years ago)
Author:
Eric Norum <WENorum@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
d2970aae
Parents:
a6c027cc
Message:

Allow network to be locked at 100/Full.

Location:
c/src/lib/libbsp/m68k/uC5282
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/uC5282/ChangeLog

    ra6c027cc r21dd4cf8  
     12005-10-26  Eric Norum <norume@aps.anl.gov>
     2
     3    * README, network/network.c: Add support for forcing link parameters.
     4
    152005-09-16  Eric Norum <norume@aps.anl.gov>
    26
  • c/src/lib/libbsp/m68k/uC5282/README

    ra6c027cc r21dd4cf8  
    8282
    83833) Type 'tftp<CR>'
     84   This forces the network link to half-duplex.  If your network link is
     85   locked at full duplex you'll have to find another port!
     86   The RTEMS network driver can be forced to 100 Mbs/full-duplex by setting
     87   the bootstrap environment variable IPADDR0_100FULL to Y.
    8488
    85894) Run 'tftp' on your host machine:
  • c/src/lib/libbsp/m68k/uC5282/network/network.c

    ra6c027cc r21dd4cf8  
    106106    unsigned long   txRealign;
    107107    unsigned long   txRealignDrop;
     108
     109    /*
     110     * Link parameters
     111     */
     112    int             force100Full;
    108113    uint16_t        mii_sr2;
    109114};
     
    294299     *  Turn off auto-negotiate
    295300     *  Enable speed-change, duplex-change and link-status-change interrupts
    296      *  Start auto-negotiate
     301     *  Set 100/full and perhaps auto-negotiate
    297302     */
    298303    setMII(1, 20, 0x42F2);
    299304    setMII(1,  4, 0x0181);
    300     setMII(1,  0, 0x0000);
     305    setMII(1,  0, 0x2100);
    301306    rtems_task_wake_after(2);
    302307    sc->mii_sr2 = getMII(1, 17);
    303308    setMII(1, 18, 0x0072);
    304     setMII(1,  0, 0x1000);
     309    if (!sc->force100Full)
     310        setMII(1, 0, 0x3100);
    305311
    306312    /*
     
    876882    char *unitName;
    877883    unsigned char *hwaddr;
     884    const char *env;
    878885
    879886    /*
     
    947954
    948955    /*
     956     * Check for environment overrides
     957     */
     958    if (((env = bsp_getbenv("IPADDR0_100FULL")) != NULL)
     959     && ((*env == 'y') || (*env == 'Y')))
     960        sc->force100Full = 1;
     961
     962    /*
    949963     * Attach the interface
    950964     */
     
    953967    return 1;
    954968};
    955 
Note: See TracChangeset for help on using the changeset viewer.