All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3 1/4] usb: rockchip: add the rockusb gadget
Date: Mon, 8 May 2017 10:38:10 -0600	[thread overview]
Message-ID: <CAPnjgZ1vxiTUOKjZSjGt6wRRWhQv+A-vcNe+=dzHS2C2TAYhUQ@mail.gmail.com> (raw)
In-Reply-To: <CAJrj+DMAkiqy6qnwvruifbc0xAbyJEb76xFV42_PxD4rBO8z7w@mail.gmail.com>

Hi Eddie,

On 2 May 2017 at 02:47, Eddie Cai <eddie.cai.linux@gmail.com> wrote:
>
> Hi Simon
>
> 2017-04-30 11:49 GMT+08:00 Simon Glass <sjg@chromium.org>:
> > Hi Eddie,
> >
> > On 28 April 2017 at 18:41, Eddie Cai <eddie.cai.linux@gmail.com> wrote:
> >> this patch implement rockusb protocol on the device side. this is based on USB
> >> download gadget infrastructure. the rockusb function implements the rd, wl, rid
> >> commands. it can work with rkdeveloptool.
> >>
> >> Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
> >>
> >> Changes in v3:
> >> -split the macro to f_rockusb.h
> >> -use ALLOC_CACHE_ALIGN_BUFFER to define cache safe struct inside the function.
> >> -fix checkpatch error
> >>
> >> ---
> >>  arch/arm/include/asm/arch-rockchip/f_rockusb.h | 104 ++++
> >>  drivers/usb/gadget/Makefile                    |   1 +
> >>  drivers/usb/gadget/f_rockusb.c                 | 724 +++++++++++++++++++++++++
> >>  3 files changed, 829 insertions(+)
> >>  create mode 100644 arch/arm/include/asm/arch-rockchip/f_rockusb.h
> >>  create mode 100644 drivers/usb/gadget/f_rockusb.c

[..]


> >> +char *rockusb_dev_type = 0;
> >> +int rockusb_dev_index = 0;
> >
> > Move to top
> OK
> >
> > I wonder if you should group all your data in a struct?
> this data is useless if we just want to talk to cpu, get cpu info etc.
> So no need to group
> it in a struct. i will make it static to avoid other module use it

The thing is that we should convert USB gadgets to driver model at
some point. When we do, we cannot have static local data - it all
needs to go into a driver-model struct.

So I think it is better to do this now, and have a single static
struct locally, then pass it around between the functions in this
file. That way we have less work to do with DM conversion.

Regards,
Simon

  reply	other threads:[~2017-05-08 16:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-29  0:41 [U-Boot] [PATCH V3 0/4] introduce Rockchip rockusb Eddie Cai
2017-04-29  0:41 ` [U-Boot] [PATCH V3 1/4] usb: rockchip: add the rockusb gadget Eddie Cai
2017-04-30  3:49   ` Simon Glass
2017-05-02  8:47     ` Eddie Cai
2017-05-08 16:38       ` Simon Glass [this message]
2017-05-09  3:13         ` Eddie Cai
2017-04-29  0:41 ` [U-Boot] [PATCH V3 2/4] usb: rockchip: add rockusb command Eddie Cai
2017-04-30  3:49   ` Simon Glass
2017-05-02  8:35     ` Eddie Cai
2017-04-29  0:41 ` [U-Boot] [PATCH V3 3/4] rockchip:usb: add a simple readme for rockusb Eddie Cai
2017-04-30  3:49   ` Simon Glass
2017-05-02  8:32     ` Eddie Cai
2017-04-29  0:41 ` [U-Boot] [PATCH V3 4/4] rockchip: usb: enable rockusb on rk3288 based board Eddie Cai
2017-04-30  3:49   ` Simon Glass
2017-05-02  8:28     ` Eddie Cai
2017-04-29 21:46 ` [U-Boot] [PATCH V3 0/4] introduce Rockchip rockusb Lukasz Majewski
2017-05-02  9:22   ` Eddie Cai
2017-05-02 10:47     ` Lukasz Majewski
2017-05-03  1:59       ` Eddie Cai

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='CAPnjgZ1vxiTUOKjZSjGt6wRRWhQv+A-vcNe+=dzHS2C2TAYhUQ@mail.gmail.com' \
    --to=sjg@chromium.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.