From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ulpi: add generic ULPI functionality
Date: Sun, 6 Nov 2011 00:35:18 +0100 [thread overview]
Message-ID: <201111060035.19007.marek.vasut@gmail.com> (raw)
In-Reply-To: <CAB+7RbF6ArQRPey3iVaUHg3hyTFG_O+WE78Vbxq2kkZS-Wy_uA@mail.gmail.com>
> 2011/11/6 Marek Vasut <marek.vasut@gmail.com>
>
> > > 2011/11/5 Marek Vasut <marek.vasut@gmail.com>
> > >
> > > > > +int ulpi_wait(struct usb_ehci *ehci, u32 ulpi_value, u32
> > > > > ulpi_mask)
> > > >
> > > > So this works only with EHCI? How generic is it then ?
> > >
> > > I thought until now that ULPI is EHCI-dependent, but isn't... Ok, what
> >
> > else
> >
> > > should be supported? OHCI? I haven't any hardware to test it, but I
> > > could give it a try.
> >
> > What about xHCI? I have no idea about OHCI, but why won't you be able to
> > have
> > OHCI and ULPI PHY?
>
> I'll look at it.
>
> > > > > +void ulpi_iface_ctrl_flags
> > > > > + (struct usb_ehci *ehci, struct ulpi_regs *ulpi, int
> >
> > access_mode,
> >
> > > > u32
> > > >
> > > > > flags) +{
> > > > > + switch (access_mode) {
> > > > > + case WRITE:
> > > > > + ulpi_write(ehci, (u32)&ulpi->iface_ctrl_write,
> > > > > flags); + break;
> > > > > + case SET:
> > > > > + ulpi_write(ehci, (u32)&ulpi->iface_ctrl_set, flags);
> > > > > + break;
> > > > > + case CLEAR:
> > > > > + ulpi_write(ehci, (u32)&ulpi->iface_ctrl_clear,
> > > > > flags); + break;
> > > > > + }
> > > > > +
> > > > > +}
> > > >
> > > > Is this crap from linux or something?
> > >
> > > No, Linux has offset-based access to ULPI registers, some structure
> > > otg_transceiver, where the driver sets the bits which it wants to be
> > > set
> >
> > in
> >
> > > ULPI registers (if I understand it well) and family of functions, which
> >
> > set
> >
> > > bits according to informations in otg_transceiver.
> >
> > Ok, you have writel() functions, why do you need this switch stuff ?
>
> I tried to design some interface, which would allow its user care only
> about register, access mode and flags and not about the exact way this huge
> bunch od u8 fields called "ulpi_regs" is implemented.
I'd assume the interface will expose something like:
* ULPI power up port
* ULPI power down power
maybe something else, no?
next prev parent reply other threads:[~2011-11-05 23:35 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-05 20:50 [U-Boot] [PATCH] ulpi: add generic ULPI functionality Jana Rapava
2011-11-05 21:37 ` Marek Vasut
2011-11-05 23:08 ` Jana Rapava
2011-11-05 23:13 ` Marek Vasut
2011-11-05 23:32 ` Jana Rapava
2011-11-05 23:35 ` Marek Vasut [this message]
2011-11-08 11:08 ` Igor Grinberg
2011-11-08 11:33 ` Igor Grinberg
2011-11-12 1:09 ` Jana Rapava
2011-11-14 7:40 ` Igor Grinberg
2011-11-12 17:29 ` [U-Boot] [PATCH v2] " Jana Rapava
2011-11-14 8:13 ` Igor Grinberg
2011-11-24 12:22 ` [U-Boot] [PATCH v3]ulpi: " Jana Rapava
2011-11-24 13:26 ` Igor Grinberg
2011-11-24 14:21 ` Marek Vasut
2011-11-25 18:39 ` Jana Rapava
2011-11-27 7:50 ` Igor Grinberg
2011-11-25 20:05 ` [U-Boot] [PATCH v4] ulpi: " Jana Rapava
2011-11-27 4:00 ` Simon Glass
2011-11-27 8:08 ` Igor Grinberg
2011-11-27 22:37 ` Jana Rapava
2011-11-27 23:34 ` Simon Glass
2011-11-27 22:30 ` Jana Rapava
2011-11-28 0:19 ` [U-Boot] [PATCH v5] " Jana Rapava
2011-11-28 7:39 ` Igor Grinberg
2011-11-28 17:06 ` Simon Glass
2011-11-28 19:43 ` [U-Boot] [PATCH v6] " Jana Rapava
2011-11-28 20:56 ` Simon Glass
2011-12-01 11:12 ` Igor Grinberg
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=201111060035.19007.marek.vasut@gmail.com \
--to=marek.vasut@gmail.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