This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

i82559_reset quaries !!


I have been working with ARM Integrator/AP board with ARM920t core module. I
have some queries regarding fucntion i82559_reset.

1. This is one sorce line from above function
     cyg_uint32 ioaddr = p_i82559->io_address;
My question is what should variable ioaddr have? I think it should have PCI
address if p_i82559 is properly initialised but I am getting 0. Any idea
why?

2. Later in function wait_for_cmd_done (called from i82559_reset only) the
device times out and control goes to "if ( wait <= 0)". This happens five to
six times and finally comes out (I think without initializing properly).
Does it mean I am not querying device properly (at proper address)? This is
code snippet from wait_for_cmd_done.

wait = 0x100000;
    do status = INW(scb_ioaddr + SCBCmd) /* nothing */ ;
    while( (0 != ((CU_CMD_MASK | RU_CMD_MASK) & status)) && --wait >= 0);

    if ( wait <= 0 ) {
        // Then we timed out; reset the device and try again...
        OUTL(I82559_SELECTIVE_RESET, scb_ioaddr + SCBPort);
#ifdef CYGDBG_USE_ASSERTS
        missed_interrupt.waitcmd_timeouts++;
#endif
        wait = 0x100000;
        do status = INW(scb_ioaddr + SCBCmd) /* nothing */;
        while( (0 != ((CU_CMD_MASK | RU_CMD_MASK) & status)) && --wait >=
0);
    }


3. Finally if I call build_boot_record for eth0, I get "SIOCIFADDR: Device
not configured", which seems because of above problems. Am I right?

Regards
Mohanlal

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]