All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Aren <aren@peacevolution.org>, John Watts <contact@jookia.org>
Cc: u-boot@lists.denx.de, Sam Edwards <cfsworks@gmail.com>,
	Samuel Holland <samuel@sholland.org>,
	Jagan Teki <jagan@amarulasolutions.com>,
	Andre Przywara <andre.przywara@arm.com>,
	Marek Vasut <marex@denx.de>
Subject: Re: [PATCH] usb: musb-new: sunxi: support usage with DM_USB_GADGET
Date: Tue, 16 Apr 2024 12:02:56 +0200	[thread overview]
Message-ID: <87cyqp4obz.fsf@baylibre.com> (raw)
In-Reply-To: <ewekir7xqzojtzn56vtv3tw5u7rdrywewmowbhrd6kjm7efdo5@wrin6nf5vmjc>

Hi,

On ven., avril 12, 2024 at 18:54, Aren <aren@peacevolution.org> wrote:

> On Thu, Apr 11, 2024 at 04:46:17PM +1000, John Watts wrote:
>> On Sun, Dec 31, 2023 at 03:38:37PM -0500, Aren Moynihan wrote:
>> > Add support for building the sunxi-musb driver with DM_USB_GADGET
>> > including adding a separate IRQ handling function and registering the
>> > driver with the musb system differently.
>> 
>> Hi there,
>> 
>> Were you aware of this similar patch?
>> 
>> https://lore.kernel.org/u-boot/20230608195631.55364-1-CFSworks@gmail.com/
>> 
>> If not you might want to test it and compare it.
>> 
>> John.
>
> I was not aware of that patch, it looks like it does the same thing as
> this one, but without some of the bugs. When comparing with it I
> realized that my dm_usb_gadget_handle_interrupts function is just plain
> wrong.
>
> I'll try to find time to test it soon.

Please keep me in the loop for both progress on this one and on testing:

https://lore.kernel.org/u-boot/20230608195631.55364-1-CFSworks@gmail.com/

>
> Thanks for the link
>  - Aren
>
>> > The implementation of usb_gadget_register_driver from
>> > musb-new/musb_uboot.c only works when the gadget driver for the device
>> > has already been probed and has called musb_register. On the pinephone
>> > (using a allwinner a64 processor) this causes issues when trying to use
>> > usb gadget mode (such as from the ums command) and CONFIG_USB_ETHER is
>> > disabled.
>> > 
>> > The implementation of usb_gadget_register_driver provided when
>> > DM_USB_GADGET is enabled will probe the necessary drivers when it's
>> > called.
>> > 
>> > Without the patch, this is what the error condition looks like:
>> > => ums 0 mmc 1
>> > UMS: LUN 0, dev mmc 1, hwpart 0, sector 0x0, count 0x3a3e000
>> > Controller uninitialized
>> > g_dnl_register: failed!, error: -6
>> > g_dnl_register failed
>> > 
>> > based on:
>> > commit 2e4865bc6486 ("musb-new: omap2430: fix compiling in DM_USB_GADGET config")
>> > 
>> > Signed-off-by: Aren Moynihan <aren@peacevolution.org>

  reply	other threads:[~2024-04-16 10:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-31 20:38 [PATCH] usb: musb-new: sunxi: support usage with DM_USB_GADGET Aren Moynihan
2024-04-11  6:46 ` John Watts
2024-04-12 22:54   ` Aren
2024-04-16 10:02     ` Mattijs Korpershoek [this message]
2024-04-12 13:06 ` Marek Vasut

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=87cyqp4obz.fsf@baylibre.com \
    --to=mkorpershoek@baylibre.com \
    --cc=andre.przywara@arm.com \
    --cc=aren@peacevolution.org \
    --cc=cfsworks@gmail.com \
    --cc=contact@jookia.org \
    --cc=jagan@amarulasolutions.com \
    --cc=marex@denx.de \
    --cc=samuel@sholland.org \
    --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.