public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Where set SMSC-LAN91C111 registers for availing interrupt ?
@ 2007-08-29  6:25 ariga masahiro
  2007-08-29  7:49 ` Andrew Lunn
  2007-08-29  8:11 ` Andrew Lunn
  0 siblings, 2 replies; 3+ messages in thread
From: ariga masahiro @ 2007-08-29  6:25 UTC (permalink / raw)
  To: ecos-discuss

Hi everyone,

Please help me next problem.

My target-board uses SMSC-LAN91C111 LAN chip.
I'm still struggling to connect(i.e.light LINK-LED) using net template.

Andrew wrote,
> The net template will use interrupt driven Ethernet drivers. Only the
> redboot template uses polled io. So you don't need to change anything
> like CYGPKG_IO_ETH_DRIVERS_STAND_ALONE.
Very Good.

> It is better to enable CYGPKG_NET_BUILD_HW_TESTS and then just do
I enabled CYGPKG_NET_BUILD_HW_TESTS.

According to SMSC's FAQ,in order to enable interrupt, PHY Register 19's MINT 
bit should be set to '0',
and MAC Bank 2 Offset D Interrupt Mask Register's  MDINT should be set to 
'1'.

I traced program but appeares to me,never set these register bits.
I list trace logs in both cases of RedBoot(StandAlone) and net 
template(interrupt).

In case of RedBoot,
\opt\ecos\ecos-2.0\packages\io\eth\v2_0\src\stand_alone\eth_drv.c
eth_drv_ini()
eth_drv_start()
lan91cxx_start(), and here do PHY initialization.

In case of net template,
\opt\ecos\ecos-2.0\packages\io\eth\v2_0\src\net\eth_drv.c
eth_drv_ini()
after that nowhere set PHY Register or Interrupt Mask Register.

I wonder I made mistakes in configuration,
or there really is not setting Registers code.

I also wonder if there is not PHY register or Interrupt Mask Register
setting code,is it possible to correctly run ethernet using interrupt ?
Is there any technical tricks to enable interrupt ?

Please enlighten me.

Also if there should be regisiter setting code,
do you think I should amend it ?

I mean,
Could you recommend where and how I should insert them ?

Masahiro Ariga


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] Where set SMSC-LAN91C111 registers for availing  interrupt ?
  2007-08-29  6:25 [ECOS] Where set SMSC-LAN91C111 registers for availing interrupt ? ariga masahiro
@ 2007-08-29  7:49 ` Andrew Lunn
  2007-08-29  8:11 ` Andrew Lunn
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2007-08-29  7:49 UTC (permalink / raw)
  To: ariga masahiro; +Cc: ecos-discuss

> I list trace logs in both cases of RedBoot(StandAlone) and net 
> template(interrupt).

Redboot is polled IO, so i don't expect to see interrupts enabled.

> In case of RedBoot,
> \opt\ecos\ecos-2.0\packages\io\eth\v2_0\src\stand_alone\eth_drv.c
            ^^^^^^^^

Version 2.0 is very old. Please use anoncvs. See the eCos website for
getting the code from CVS.

        Andrew

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] Where set SMSC-LAN91C111 registers for availing  interrupt ?
  2007-08-29  6:25 [ECOS] Where set SMSC-LAN91C111 registers for availing interrupt ? ariga masahiro
  2007-08-29  7:49 ` Andrew Lunn
@ 2007-08-29  8:11 ` Andrew Lunn
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2007-08-29  8:11 UTC (permalink / raw)
  To: ariga masahiro; +Cc: ecos-discuss

> According to SMSC's FAQ,in order to enable interrupt, PHY Register 19's 
> MINT bit should be set to '0',

I've not read the data sheet/FAQ, so i need to ask maybe some dumb
questions. This is a PHY register. So does this interrupt tell you
about change in Link status? Cable in, cable out, etc? If so, eCos
does not use this information. There is no need to generate such
interrupts.

> and MAC Bank 2 Offset D Interrupt Mask Register's  MDINT should be set to 
> '1'.

What about the code at line 520 of version 1.20 of
/packages/devs/eth/smsc/lan91cxx/current/src/if_lan91cxx.c. Does the
set all the necessary bits?

Ah, i just took a very quick look at the datasheet. MDINT is also for
PHY interrupts. MD probably stands for Media Detect. eCos is not
interests in these interrupts. eCos just wants to know when a packet
has been received, when a packet has been sent etc. These are the MAC
interrupts which do see to be configured at the line is said in my
last email.

    Andrew

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-08-29  8:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-29  6:25 [ECOS] Where set SMSC-LAN91C111 registers for availing interrupt ? ariga masahiro
2007-08-29  7:49 ` Andrew Lunn
2007-08-29  8:11 ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).