All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bodonoghue@codehermit.ie>
To: u-boot@lists.denx.de
Subject: [U-Boot] how to support usbtty
Date: Wed, 27 Aug 2008 18:09:35 +0100	[thread overview]
Message-ID: <20080827180935.623d0ebc@neuromancer.mindspace> (raw)
In-Reply-To: <5c9cd53b0808270720t795e1586r91d47a1fa917bebb@mail.gmail.com>

On Wed, 27 Aug 2008 10:20:58 -0400
"mike zheng" <mail4mz@gmail.com> wrote:

> I am using an embedded system with MPC8567 as processor and ISP1561 as
> USB PCI host controller. There is USB port on this board. A sealevel
> USB/RS232 cable is connect to the USB port on the board, and it
> converts USB port into RS232 port. A PC is connected to the RS232 end
> of the cable.
> 
> With "CONFIG_USB_SERIAL_FTDI_SIO" flag enabled, I compiled the Linux
> kernel. Everything works fine, I am able to launch the hyperterminal
> on PC and have the console running for Linux.
> 
> Now I need make things working for Uboot. I've already have the EHCI
> host controller running well on the board.
> 
> Please correct me if my understanding is incorrect. What I need to do
> is to port the FTDI_SIO driver from Linux to Uboot, which replace
> those "udc" calls in usbtty.c. With the ported FTDI_SIO code and
> existing usbtty.c. It shall work fine after correct setup of the
> environment variables - "setenv stdin usbtty, setenv stdout usbtty".


That really depends on what you mean by "replace".

usbtty at this moment in time is slave only. What you are describing is having
u-boot be a USB host, and control a usbserial device attached to the
u-boot/host.

usbtty - is basically analogous to the firmware that would run inside of your
USB-2-RS232 cable, in that it - uboot- is a USB slave, at the usbtty layer.

Not that I've looked in detail but, whatever way USB sticks are controlled by
USB hosts in u-boot would be closer to what you'd need to do to support having
a USB-slave tty device attached to your board, then subsequently you'd plug
this into the serial layer of u-boot.

Possibly you could add the usbserial and cdc-acm protocols supported in
usbtty.. depending .. but, it's important to be aware that usbtty in u-boot is
a slave oriented thing.

For the case above - you'd need to implement drivers/usbdcore_isp1561.c -
but .. this would have to be a USB host... not a slave.

Since a USB host model already exists in u-boot - I'm not sure making
usbdcore_isp1561.c would be a wise or acceptable choice.

For example usbdcore_mpc8xx.c and it's sibling usbdcore_omap1510.c - enumerate
a USB host... - they're completely slave oriented... whereas - you need for
u-boot to be the host like drivers/usb/isp116x-hcd.c (perhaps a isp1516-hcd.c is
required), then you need to plug your FTDI stuff on top of that, then you need
to plug that into the u-boot serial layer, somehow...

Sure it might be possible and appropriate to have
[usbtty.c=>fdti]=>isp1516-hdc.c but, the low-level USB twiddling you need to
do at the host controller level will be quite different for the host - which is
what I think you need to do... in comparison to the slave - which is what
usbdcore_mpc8xx.c and usbdcore_omap1510.c are.


Greetings,
Bryan

  reply	other threads:[~2008-08-27 17:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-23  3:26 [U-Boot-Users] how to support usbtty zhuzhenhua
2005-09-23  6:11 ` Wolfgang Denk
2008-08-26 18:37   ` [U-Boot] " mikezh
2008-08-26 18:56     ` Wolfgang Denk
2008-08-27 14:20       ` mike zheng
2008-08-27 17:09         ` Bryan O'Donoghue [this message]
2008-08-27 17:11         ` Bryan O'Donoghue
2008-08-29 15:53           ` mike zheng
2008-08-30 23:24             ` Bryan O'Donoghue
2008-08-31 15:59               ` mike zheng
2008-08-31 17:13                 ` Bryan O'Donoghue

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=20080827180935.623d0ebc@neuromancer.mindspace \
    --to=bodonoghue@codehermit.ie \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.