All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 03/34] musb: sunxi: Use simple way to fill musb_hdrc pdata
Date: Sun, 11 Feb 2018 12:25:28 +0100	[thread overview]
Message-ID: <3617d55e-2455-c0ae-2f88-cbf732ca46a4@denx.de> (raw)
In-Reply-To: <CAMty3ZC89uedEGqDQ8-n+uN2Urx+wVDy+MCkUewWrSkQRBaoog@mail.gmail.com>

On 02/11/2018 11:44 AM, Jagan Teki wrote:
> On Tue, Feb 6, 2018 at 8:09 PM, Marek Vasut <marex@denx.de> wrote:
>> On 02/06/2018 03:25 PM, Jagan Teki wrote:
>>> Filling musb_hdrc pdata using structure will unnecessary
>>> add extra ifdefs, so fill them inside probe call for
>>> better code understanding and get rid ifdefs using
>>> devicetree compatible.
>>>
>>> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>>> ---
>>>  drivers/usb/musb-new/sunxi.c | 22 +++++++++-------------
>>>  1 file changed, 9 insertions(+), 13 deletions(-)
>>>
>>> diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
>>> index 3f3b898..0b7ff9f 100644
>>> --- a/drivers/usb/musb-new/sunxi.c
>>> +++ b/drivers/usb/musb-new/sunxi.c
>>> @@ -308,22 +308,12 @@ static struct musb_hdrc_config musb_config = {
>>>       .ram_bits       = SUNXI_MUSB_RAM_BITS,
>>>  };
>>>
>>> -static struct musb_hdrc_platform_data musb_plat = {
>>> -#if defined(CONFIG_USB_MUSB_HOST)
>>> -     .mode           = MUSB_HOST,
>>> -#else
>>> -     .mode           = MUSB_PERIPHERAL,
>>> -#endif
>>> -     .config         = &musb_config,
>>> -     .power          = 250,
>>> -     .platform_ops   = &sunxi_musb_ops,
>>> -};
>>> -
>>>  static int musb_usb_probe(struct udevice *dev)
>>>  {
>>>       struct sunxi_glue *glue = dev_get_priv(dev);
>>>       struct musb_host_data *host = &glue->mdata;
>>>       struct usb_bus_priv *priv = dev_get_uclass_priv(dev);
>>> +     struct musb_hdrc_platform_data pdata;
>>
>> Make this pdata = musb_plat and then tweak pdata down below to avoid
>> assigning all the values there.
> 
> Thought the same, but we have hardly two members power and
> platform_ops and reaming mode and other need to assign with SOC basic
> and CONFIG_

Three, but OK

-- 
Best regards,
Marek Vasut

  reply	other threads:[~2018-02-11 11:25 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-06 14:25 [U-Boot] [PATCH v4 00/34] phy: sunxi: Add Allwinner sun4i USB PHY Jagan Teki
2018-02-06 14:25 ` [U-Boot] [PATCH v4 01/34] usb: sunxi: Simplify ccm reg base code Jagan Teki
2018-02-06 14:37   ` Marek Vasut
2018-02-11 10:39     ` Jagan Teki
2018-02-11 11:24       ` Marek Vasut
2018-02-06 14:25 ` [U-Boot] [PATCH v4 02/34] musb: sunxi: Add proper macros instead of numericals Jagan Teki
2018-02-06 14:25 ` [U-Boot] [PATCH v4 03/34] musb: sunxi: Use simple way to fill musb_hdrc pdata Jagan Teki
2018-02-06 14:39   ` Marek Vasut
2018-02-11 10:44     ` Jagan Teki
2018-02-11 11:25       ` Marek Vasut [this message]
2018-02-06 14:25 ` [U-Boot] [PATCH v4 04/34] musb: sunxi: Add fifo config Jagan Teki
2018-02-06 14:41   ` Marek Vasut
2018-02-11 10:59     ` Jagan Teki
2018-02-11 11:29       ` Marek Vasut
2018-02-06 14:25 ` [U-Boot] [PATCH v4 05/34] sunxi: clock: Fix clock gating for H3/H5/A64 Jagan Teki
2018-02-06 14:25 ` [U-Boot] [PATCH v4 06/34] musb: sunxi: Add OTG device clkgate and reset for H3/H5 Jagan Teki
2018-02-06 14:43   ` Marek Vasut
2018-02-06 14:25 ` [U-Boot] [PATCH v4 07/34] sunxi: clock: Fix OHCI clock gating " Jagan Teki
2018-02-06 14:25 ` [U-Boot] [PATCH v4 08/34] musb: sunxi: Add support for H3/H5A64 Jagan Teki
2018-02-06 14:44   ` Marek Vasut
2018-02-06 14:25 ` [U-Boot] [PATCH v4 09/34] phy: Add Allwinner A64 USB PHY driver Jagan Teki
2018-02-06 14:47   ` Marek Vasut
2018-02-06 14:25 ` [U-Boot] [PATCH v4 10/34] phy: sun4i-usb: Add id_detect and vbus_detect ops Jagan Teki
2018-02-06 14:25 ` [U-Boot] [PATCH v4 11/34] phy: sun4i-usb: Add H3/H5 PHY config Jagan Teki
2018-02-06 14:25 ` [U-Boot] [PATCH v4 12/34] phy: sun4i-usb: Add V3S " Jagan Teki
2018-02-06 14:25 ` [U-Boot] [PATCH v4 13/34] phy: sun4i-usb: Add A83T USB " Jagan Teki
2018-02-06 14:25 ` [U-Boot] [PATCH v4 14/34] phy: sun4i-usb: Add A10/A13/A20 " Jagan Teki
2018-02-06 14:25 ` [U-Boot] [PATCH v4 15/34] phy: sun4i-usb: Add A31 " Jagan Teki
2018-02-06 14:25 ` [U-Boot] [PATCH v4 16/34] phy: sun4i-usb: Add A33 USB " Jagan Teki
2018-02-06 14:25 ` [U-Boot] [PATCH v4 17/34] phy: sun4i-usb: Add A23 " Jagan Teki
2018-02-06 14:25 ` [U-Boot] [PATCH v4 18/34] device-tree-bindings: phy: Sync sun4i-usb-phy bindings Jagan Teki
2018-02-06 14:49   ` Marek Vasut
2018-02-06 14:25 ` [U-Boot] [PATCH v4 19/34] board: sunxi: Use generic-phy for board_usb_cable_connected Jagan Teki
2018-02-06 14:25 ` [U-Boot] [PATCH v4 20/34] phy: sun4i-usb: Add a sunxi specific function for setting squelch-detect Jagan Teki
2018-02-06 14:25 ` [U-Boot] [PATCH v4 21/34] usb: sunxi: Switch to use generic-phy Jagan Teki
2018-02-06 14:51   ` Marek Vasut
2018-02-06 14:25 ` [U-Boot] [PATCH v4 22/34] sunxi: Drop legacy usb_phy.c Jagan Teki
2018-02-06 14:25 ` [U-Boot] [PATCH v4 23/34] sunxi: h3: Sync OTG and HCI nodes from Linux DT Jagan Teki
2018-02-06 14:25 ` [U-Boot] [PATCH v4 24/34] arm64: allwinner: a64: bananapi-m64: Sync usb_otg node from Linux Jagan Teki
2018-02-06 14:25 ` [U-Boot] [PATCH v4 25/34] configs: bananapi-m64: Enable USB OTG peripheral mode Jagan Teki
2018-02-06 15:47   ` Maxime Ripard
2018-02-06 14:25 ` [U-Boot] [PATCH v4 26/34] ARM: dts: sun8i: a83t: Sync usbphy node from Linux Jagan Teki
2018-02-06 14:25 ` [U-Boot] [PATCH v4 27/34] arm64: allwinner: a64: bananapi-m64: Sync usb host nodes " Jagan Teki
2018-02-06 14:25 ` [U-Boot] [PATCH v4 28/34] ARM: dts: sun8i-h3: bananapi-m2-plus: Sync usb otg " Jagan Teki
2018-02-06 14:25 ` [U-Boot] [PATCH v4 29/34] configs: bananapi-m2-plus: Enable USB OTG peripheral mode Jagan Teki
2018-02-06 14:26 ` [U-Boot] [PATCH v4 30/34] arm64: allwinner: h5: orangepi-pc2: Order nodes in alphabetic Jagan Teki
2018-02-06 14:26 ` [U-Boot] [PATCH v4 31/34] arm64: allwinner: h5: orangepi-pc2: Sync usb otg nodes from Linux Jagan Teki
2018-02-06 14:26 ` [U-Boot] [PATCH v4 32/34] configs: orangepi-pc2: Enable USB OTG peripheral mode Jagan Teki
2018-02-06 14:26 ` [U-Boot] [PATCH v4 33/34] arm64: allwinner: h5: orangepi-prime: Sync usb otg nodes from Linux Jagan Teki
2018-02-06 14:26 ` [U-Boot] [PATCH v4 34/34] configs: orangepi-prime: Enable USB OTG peripheral mode Jagan Teki

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=3617d55e-2455-c0ae-2f88-cbf732ca46a4@denx.de \
    --to=marex@denx.de \
    --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.