From: jacopo mondi <j.mondi@voltaelectronics.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] building enc28j60 for omap3: (omap3_spi rxtx)
Date: Wed, 2 Mar 2011 15:08:51 +0100 [thread overview]
Message-ID: <20110302150851.1fa661f4@BlackBox> (raw)
In-Reply-To: <20110223233201.09aee7e4@wker>
On Wed, 23 Feb 2011 23:32:01 +0100
Anatolij Gustschin <agust@denx.de> wrote:
> Hi,
>
> On Tue, 22 Feb 2011 17:34:30 +0100
> jacopo mondi <j.mondi@voltaelectronics.com> wrote:
> ...
> > Second issue is related to enc identification.
> > The following code section:
> >
> > phid1 = phy_read(enc, PHY_REG_PHID1);
> > phid2 = phy_read(enc, PHY_REG_PHID2) & ENC_PHID2_MASK;
> > if (phid1 != ENC_PHID1_VALUE || phid2 != ENC_PHID2_VALUE) {
> > printf("%s: failed to identify PHY. Found
> > %04x:%04x\n", enc->dev->name,
> > phid1, phid2);
> > return -1;
> > }
> >
> > fails because phy_read instructions return 0 or random values
> > (0xB0B0 or 0xB000).
> > Linux driver does not perform such tests, so I've tried removing
> > them.
>
> No, please do not remove them. Fix the register access
> problem instead.
>
Anatolj,
how could the single register access work if all the spi setup and
startup is done in the spi_claim_bus function? (which is a bad design
in my opinion, since if I claim bus, it does not mean I want to start
the communication).
Anyway I've implemented the Transmit Receive mode, and verified it
works issuing a ping, that initialize enc and spi bus, and now I can
successfully read phy identifiers and the CLKRDY bit (which means that
read and write are now correct).
I'm still unable to ping because "`ethaddr' not set", maybe because
actually the transmit and receive mode is used only if txp and rxp are
not NULL (tx only or rx only methods are used either).
I can change that, but that means changing the omap_spi interface.
Also, the whole omap3_spi implementation has to be reworked, because
several things need to be added (turbo mode for 3 bytes transfers) and
some initialization work has to be moved from the claim_bus function to
the spi_xfer one...
I'll submit the receive-transmit mode patch only for now...
thank you
j
prev parent reply other threads:[~2011-03-02 14:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-16 16:29 [U-Boot] building enc28j60 for omap3: undefined references jacopo mondi
2011-02-16 17:31 ` Reinhard Meyer
2011-02-17 5:48 ` Mike Frysinger
2011-02-17 9:35 ` jacopo mondi
2011-02-17 10:09 ` Stefano Babic
2011-02-17 10:48 ` jacopo mondi
2011-02-17 12:37 ` Stefano Babic
2011-02-18 13:12 ` jacopo mondi
2011-02-22 16:34 ` [U-Boot] building enc28j60 for omap3: SILICON ERRATA jacopo mondi
2011-02-23 22:32 ` Anatolij Gustschin
2011-02-23 23:32 ` Wolfgang Denk
2011-02-25 8:37 ` jacopo mondi
2011-03-02 14:08 ` jacopo mondi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110302150851.1fa661f4@BlackBox \
--to=j.mondi@voltaelectronics.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox