All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] A20-OLinuXino-Lime2: Enable USB gadget support
Date: Mon, 19 Sep 2016 17:44:09 +0200	[thread overview]
Message-ID: <50ee54c8-cdba-fdce-3bc2-eb51394dcf53@redhat.com> (raw)
In-Reply-To: <20160919150037.GW29602@bill-the-cat>

Hi,

On 19-09-16 17:00, Tom Rini wrote:
> On Mon, Sep 19, 2016 at 04:53:04PM +0200, Hans de Goede wrote:
>> Hi,
>>
>> On 19-09-16 16:03, Tom Rini wrote:
>>> Based on A13-OLinuXino, enable DFU and UMS support.
>>>
>>> Signed-off-by: Tom Rini <trini@konsulko.com>
>>> ---
>>> With this change I've added DFU to my tests on this board, and assuming a
>>> follow up test with the SD image that kicks the board into FEL works, I'll
>>> then enable the UMS tests on this board (and add DFU to SD, not just DFU to
>>> RAM).
>>>
>>> configs/A20-OLinuXino-Lime2_defconfig | 8 ++++++++
>>> 1 file changed, 8 insertions(+)
>>>
>>> diff --git a/configs/A20-OLinuXino-Lime2_defconfig b/configs/A20-OLinuXino-Lime2_defconfig
>>> index 23db07380624..54343de7f351 100644
>>> --- a/configs/A20-OLinuXino-Lime2_defconfig
>>> +++ b/configs/A20-OLinuXino-Lime2_defconfig
>>> @@ -12,9 +12,17 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPC(3)"
>>> CONFIG_SPL=y
>>> # CONFIG_CMD_IMLS is not set
>>> # CONFIG_CMD_FLASH is not set
>>> +CONFIG_CMD_DFU=y
>>> +CONFIG_CMD_USB_MASS_STORAGE=y
>>
>> Do you need CMD_USB_MASS_STORAGE for your tests ? Enabling
>> CMD_USB_MASS_STORAGE really seems orthogonal to enabling GADGET
>> mode to me, esp. since it is only useful in host mode AFAICT.
>
> Ah, no, things have bad names perhaps.  CMD_USB_MASS_STORAGE enables
> "ums" as a command which is what in turn will export MMC (or something
> else) as a USB mass storage gadget over to the host.

Ah, I thought this enabled the (destructive) low level usb mass storage
block read/write test commands, but I guess I'm wrong.

I wonder why Chen-Yu put it in the usb host enabling patch for
an A33 board then...


>> Chen-Yu did something similar in a patch enabling host mode for a
>> different sunxi board and here is what I replied:
>>
>> "
>> If we want to enable CONFIG_CMD_USB_MASS_STORAGE on sunxi, we really
>> should do so on all boards (feel free to submit a patch for this).
>>
>> e.g. add something like this to board/sunxi/Kconfig:
>>
>> config CMD_USB_MASS_STORAGE
>>     default y

Given the above, that should probably be:

config CMD_USB_MASS_STORAGE
        default y if USB_GADGET


Hmm, I guess we may want to have a bunch of those, so that
simply adding:

CONFIG_USB_MUSB_GADGET=y

To a defconfig enables the relevant related options...

Regards,

Hans



>>
>> So that we can still disable it in case there are space constraints,
>> but normally we enable it on all sunxi boards offering a
>> consistent set of available commands.
>> "
>
> I think it's a useful command that should be more widely exposed, yes.
> IIRC, it's how the Tegra platforms support flashing their dev boards
> with official images, and can be a handy "rescue" type option too.
>
>>
>> The same goes for this patch, otherwise this patch is:
>>
>> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
>>
>> Ig you want to feel free to apply this directly
>> (given that I've send out a sunxi pull-req recently).
>
> OK, thanks.  I just might since I really want to move on to grabbing
> some fs patches and before I do that I really want to have as much
> testing of them as possible.
>

  reply	other threads:[~2016-09-19 15:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-19 14:03 [U-Boot] [PATCH] A20-OLinuXino-Lime2: Enable USB gadget support Tom Rini
2016-09-19 14:53 ` Hans de Goede
2016-09-19 15:00   ` Tom Rini
2016-09-19 15:44     ` Hans de Goede [this message]
2016-09-19 16:36       ` Tom Rini
2016-09-19 23:26       ` Chen-Yu Tsai
2016-09-19 16:54 ` [U-Boot] " Tom Rini

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=50ee54c8-cdba-fdce-3bc2-eb51394dcf53@redhat.com \
    --to=hdegoede@redhat.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 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.