This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: DP83816
Hi Nick,
Thank you very much for your valueble inputs.
in the same file(moab_eth_dp83816.inl) i am finding some functions
which are lookiing like Power PC specific. can u clarify me whether
those are Power PC specific or can be used for i386-PC also.
// Map a 32 bit host quantity to little endian
unsigned long
_h2le(unsigned long val)
{
unsigned long res;
#ifdef GGB
unsigned long *addr = &val;
__asm__ __volatile__ ("lwbrx %0,0,%1" : "=r" (res) : "r" (addr), "m"
(*addr));
#endif
return res;
}
// Map a 32 bit little endian quantity to host representation
unsigned long
_le2h(unsigned long val)
{
unsigned long res;
#ifdef GGB
unsigned long *addr = &val;
__asm__ __volatile__ ("lwbrx %0,0,%1" : "=r" (res) : "r" (addr), "m"
(*addr));
#endif
return res;
}
if above functions are Power PC specific can you please suggest me similar
functions for i386-PC
Thanks Regards
Giri
> "Giri" <giri@jntu.net> writes:
>
>> Hai Nick,
>> as you suggested for the Kevin i tried creating the new package for
>> DP83816. and one .cdl and one .inl for making it support for the
>> i386-PC target.
>> Still i am not able to initialize the network properly. i am facing
>> the following problem
>> 1. after starting the redboot it will go and initialize all the NIC's
>> 2. while initializing our NIC it is not finding the base address of the
>> NIC so it is returning with no device found.
>> in the code i found the place where it is failing.
>> that is in if_dp83816.c
>> dp83816_init()
>> {
>> .....
>> ........
>> if (!base) return false; // No device found
>>
>> }
>> 4. for other microcontrollers like i82559 this base address is assigned
>> as
>> follows
>> cyg_pci_configure_device(&dev_info);
>> p_i82559->io_address = dev_info.base_map[1];
>>
>>
>> here io_address is the base adderss.
>> 3. my doubght is how we are managing this problem in the PPC version
>
> The full version of the code in dp83816_init() is:
>
> CYGHWR_NS_DP83816_PLF_INIT(dp);
> base = dp->base;
> if (!base) return false; // No device found
>
> That macro CYGHWR_NS_DP83816_PLF_INIT() does all the hard work. It is
> in the MOAB board ethernet package and is just a call to a function
> defined there. There is nothing PowerPC specific about it, so you
> can probably just copy it over.
>
>
>
> --
> Nick Garnett eCos Kernel Architect
> http://www.ecoscentric.com The eCos and RedBoot experts
>
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss