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 v1 2/4] arm: socfpga: fix compiling with OF_PLATDATA
Date: Tue, 8 Jan 2019 13:23:38 +0100	[thread overview]
Message-ID: <5ccade4b-86a4-1218-c2e9-1958f30706fb@denx.de> (raw)
In-Reply-To: <CAAh8qsze_tnOCr0BHU1Y=ua=2Nm40cmR1ZDwoS0+ZkJXXRonrA@mail.gmail.com>

On 1/8/19 1:14 PM, Simon Goldschmidt wrote:
> On Tue, Jan 8, 2019 at 1:05 PM Marek Vasut <marex@denx.de> wrote:
>>
>> On 1/8/19 7:32 AM, Simon Goldschmidt wrote:
>>> On Mon, Jan 7, 2019 at 11:58 PM Marek Vasut <marex@denx.de> wrote:
>>>>
>>>> On 1/7/19 10:14 PM, Simon Goldschmidt wrote:
>>>>> 'socfpga_eth_reset_common' must not be compiled when OF_PLATDATA is enabled
>>>>> since it uses functions accessing the devicetree.
>>>>>
>>>>> Since this function is not used in SPL anyway, change the compile guard
>>>>> to reflect this and fix compiling SPL with OF_PLATDATA.
>>>>
>>>> Doesn't this break ethernet in SPL ? I think it does. The real fix is to
>>>> move this PHY mode configuration into the driver.
>>>
>>> Hmm, ethernet in SPL. Haven't thought of that :-)
>>>
>>> While it could be easy to move the DTS part of  PHY mode configuration into
>>> the driver, moving the reset portion of that code into the driver would be ugly
>>> unless using proper reset management?
>>
>> Well, it's still better than having it live in arch/arm/ , which was at
>> that point the best option, but right now it's no longer. And I think
>> Joyce ran into similar topic with some other Altera IP.
> 
> Hmm, ok, I could search for that.
> 
>>>>> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
>>>>> ---
>>>>>
>>>>>  arch/arm/mach-socfpga/misc.c | 2 +-
>>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c
>>>>> index 78fbe28724..30f74d9940 100644
>>>>> --- a/arch/arm/mach-socfpga/misc.c
>>>>> +++ b/arch/arm/mach-socfpga/misc.c
>>>>> @@ -120,7 +120,7 @@ int arch_cpu_init(void)
>>>>>       return 0;
>>>>>  }
>>>>>
>>>>> -#ifdef CONFIG_ETH_DESIGNWARE
>>>>> +#if defined CONFIG_ETH_DESIGNWARE && !defined CONFIG_SPL_BUILD
>>>
>>> Would it work for you to change this into:
>>>
>>> #if defined CONFIG_ETH_DESIGNWARE && !CONFIG_IS_ENABLED(OF_PLATDATA)
>>>
>>> We could still fix the reset code when actually using OF_PLATDATA with
>>> ethernet...
>>
>> Is it too much work to fix it properly ?
> 
> Well, just moving the functions I commented out into the eth driver would mean
> it would at some point call back into arch/arm/mach-socfpga code.
> 
> If that is acceptable, it wouldn't be too much work and I could certainly do it.
> But the question remains whether such a change would "fix it properly". In my
> opinion, it wouldn't. But it would probably still be better than the
> current state
> where some code in arch/arm parses ETH DTS nodes...

Right. I think you can just pull that info from the DT node associated
with the DWMAC driver.

-- 
Best regards,
Marek Vasut

  reply	other threads:[~2019-01-08 12:23 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-07 21:14 [U-Boot] [PATCH v1 0/4] arm: socfgpa: support of-platdata Simon Goldschmidt
2019-01-07 21:14 ` [U-Boot] [PATCH v1 1/4] arm: socfpga: imply SPL config instead of select Simon Goldschmidt
2019-01-07 22:53   ` Marek Vasut
2019-01-08  6:24     ` Simon Goldschmidt
2019-01-08 11:22       ` Marek Vasut
2019-01-08 12:09         ` Simon Goldschmidt
2019-01-08 12:22           ` Marek Vasut
2019-01-08 12:46             ` Simon Goldschmidt
2019-01-08 12:49               ` Marek Vasut
2019-01-08 14:48                 ` Tom Rini
2019-01-08 14:50                   ` Marek Vasut
2019-01-08 14:58                     ` Tom Rini
2019-01-08 15:04                       ` Simon Goldschmidt
2019-01-08 15:11                         ` Tom Rini
2019-01-08 15:05                       ` Marek Vasut
2019-01-08 15:01                     ` Simon Goldschmidt
2019-01-08 20:52                       ` Simon Goldschmidt
2019-01-08 20:54                         ` Marek Vasut
2019-01-11 20:39     ` Simon Goldschmidt
2019-01-11 22:02       ` Marek Vasut
2019-01-14 15:50         ` Simon Goldschmidt
2019-01-14 15:58           ` Dinh Nguyen
2019-01-14 16:05             ` Simon Goldschmidt
2019-01-14 18:31               ` Marek Vasut
2019-01-14 18:58                 ` Simon Goldschmidt
2019-01-14 19:33                   ` Marek Vasut
2019-01-14 19:43                     ` Simon Goldschmidt
2019-01-14 20:01                       ` Marek Vasut
2019-01-14 20:12                         ` Simon Goldschmidt
2019-01-14 20:23                           ` Marek Vasut
2019-01-14 20:30                             ` Simon Goldschmidt
2019-01-14 20:49                               ` Marek Vasut
2019-01-14 20:59                                 ` Simon Goldschmidt
2019-01-14 21:28                 ` Tom Rini
2019-01-14 21:30                   ` Marek Vasut
2019-01-14 21:35                     ` Simon Goldschmidt
2019-01-14 21:50                     ` Tom Rini
2019-01-14 21:53                       ` Simon Goldschmidt
2019-01-14 21:57                         ` Marek Vasut
2019-01-14 22:26               ` Dinh Nguyen
2019-01-15  6:59                 ` Simon Goldschmidt
2019-01-07 21:14 ` [U-Boot] [PATCH v1 2/4] arm: socfpga: fix compiling with OF_PLATDATA Simon Goldschmidt
2019-01-07 22:53   ` Marek Vasut
2019-01-08  6:32     ` Simon Goldschmidt
2019-01-08 11:46       ` Marek Vasut
2019-01-08 12:14         ` Simon Goldschmidt
2019-01-08 12:23           ` Marek Vasut [this message]
2019-01-07 21:14 ` [U-Boot] [PATCH v1 3/4] serial: add an of-platdata driver for "snps, dw-apb-uart" Simon Goldschmidt
2019-01-07 22:12   ` Lukasz Majewski
2019-01-08  6:06     ` Simon Goldschmidt
2019-01-08  7:30       ` Lukasz Majewski
2019-01-08  7:41         ` Simon Goldschmidt
2019-01-08  8:49           ` Lukasz Majewski
2019-01-09  8:35   ` Alexey Brodkin
2019-01-09 11:33     ` Simon Goldschmidt
2019-01-09 18:43     ` Simon Goldschmidt
2019-01-11  8:33       ` Alexey Brodkin
2019-01-11  8:41         ` Simon Goldschmidt
2019-01-11  9:03           ` Alexey Brodkin
2019-01-11 10:00             ` Simon Goldschmidt
2019-01-11  9:22     ` Andy Shevchenko
2019-01-11 10:01       ` Simon Goldschmidt
2019-01-16 21:35         ` Simon Glass
2019-01-10 12:56   ` Simon Glass
2019-01-07 21:14 ` [U-Boot] [PATCH v1 4/4] mmc: socfpga: support of-platdata Simon Goldschmidt
2019-01-07 21:59 ` [U-Boot] [PATCH v1 0/4] arm: socfgpa: " Lukasz Majewski
2019-01-08  6:53   ` Simon Goldschmidt
2019-01-07 22:57 ` Marek Vasut
2019-01-08  6:56   ` Simon Goldschmidt
2019-01-08 11:49     ` Marek Vasut
2019-01-08 12:38       ` Simon Goldschmidt
2019-01-08 12:57         ` Marek Vasut
2019-01-08 13:07           ` Simon Goldschmidt
2019-01-08 13:38             ` Marek Vasut
2019-01-08 13:51               ` Simon Goldschmidt
2019-01-08 14:43                 ` Marek Vasut
2019-02-01 18:58                   ` Simon Goldschmidt

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=5ccade4b-86a4-1218-c2e9-1958f30706fb@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.