This is the mail archive of the ecos-discuss@sourceware.org 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]

Re: networking on redboot


On Fri, Mar 13, 2009 at 4:49 PM, Mark Salter <msalter@redhat.com> wrote:
>
> On Fri, 2009-03-13 at 16:27 +0200, Atilay Yilmaz wrote:
>> On Fri, Mar 13, 2009 at 3:28 PM, Mark Salter <msalter@redhat.com> wrote:
>> > On Fri, 2009-03-13 at 15:07 +0200, Atilay Yilmaz wrote:
>> >> >
>> >> I compiled it again to print 'val', Gary:
>> >> smsc_lan91cxx_init: No 91Cxx signature found e59f
>> >
>> > The e59f looks suspiciously like the upper 16 bits of an arm opcode.
>> > Maybe check that the base address being used is correct.
>> >
>> > --Mark
>> >
>> thanks, I will check it. somehow, the signature is 0xe5 instead of 0x33
>
> I suspect your base address is incorrectly set to 0 or maybe there is a
> memory mapping problem. The e59f makes me think you are reading from
> memory, not the lan chip.
>
> --Mark
>
I've checked the board manual and entered the correct base address. As
you guessed correctly, it was zero before:)
However, still I got the same error:
smsc_lan91cxx_init: No 91Cxx signature found 0xffff
LAN91CXX - supposed BankReg @ 3340000e = ffff
No network interfaces found

Here is the data structure that I enter base address in inl file:

static lan91cxx_priv_data lan91cxx_eth0_priv_data =
{
  base : (unsigned short *) 0x33400000,

  #ifdef CYGSEM_DEVS_ETH_ARM_ERTEC_ETH0_SET_ESA
  enaddr : CYGDAT_DEVS_ETH_ARM_ERTEC_ETH0_ESA,
  hardwired_esa : true,
  #else
  hardwired_esa : false,
  provide_esa   : &_ertec_arm9_provide_eth0_esa,
  #endif
};

are there any other configuration files that I have to update except
cdl and inl?

the driver source code:
    // probe chip by reading the signature in BS register
    val = get_banksel(sc);

    if ((0xff00 & val) !=  0x3300) {
        CYG_FAIL("No 91Cxx signature" );
        diag_printf("smsc_lan91cxx_init: No 91Cxx signature found
0x%04x\n", val);
        diag_printf("LAN91CXX - supposed BankReg @ %04x =
%04x\n",cpd->base+LAN91CXX_BS, val);
        return false;
    }

and get_banksel() is defined in driver header:
// Read the bank register (this one is bank-independent)
#ifndef SMSC_PLATFORM_DEFINED_GET_BANKSEL
static __inline__ unsigned short
get_banksel(struct eth_drv_sc *sc)
{
    struct lan91cxx_priv_data *cpd =
        (struct lan91cxx_priv_data *)sc->driver_private;
    unsigned short val;

    HAL_READ_UINT16(cpd->base+(LAN91CXX_BS << cpd->addrsh), val);
    val = CYG_LE16_TO_CPU(val);
    return val;
}
#endif

do you think it reads 'val' from memory, not the lan chip? how can I test it?

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


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