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 v2] arm: socfpga: Move Stratix 10 SDRAM driver to DM
Date: Thu, 2 May 2019 12:17:33 +0200	[thread overview]
Message-ID: <7c57c94a-6f9a-a860-c18d-d8991d10c621@denx.de> (raw)
In-Reply-To: <CAFiDJ5_b5FrNKRrR=g+WTUe-e_ZxJ+3UO+t6LfqiNaoxPvWLVw@mail.gmail.com>

On 5/2/19 5:46 AM, Ley Foon Tan wrote:
> On Tue, Apr 30, 2019 at 5:56 PM Marek Vasut <marex@denx.de> wrote:
>>
>> On 4/30/19 9:40 AM, Ley Foon Tan wrote:
>> [...]
>>>>>>> +static int altera_sdram_probe(struct udevice *dev)
>>>>>>> +{
>>>>>>> +     int ret;
>>>>>>> +     struct reset_ctl_bulk resets;
>>>>>>> +
>>>>>>> +     ret = reset_get_bulk(dev, &resets);
>>>>>>> +     if (ret) {
>>>>>>> +             dev_err(dev, "Can't get reset: %d\n", ret);
>>>>>>> +             return -ENODEV;
>>>>>>> +     }
>>>>>>> +     reset_deassert_bulk(&resets);
>>>>>>> +
>>>>>>> +     if (sdram_mmr_init_full(dev) != 0) {
>>>>>>> +             puts("SDRAM init failed.\n");
>>>>>>> +             goto failed;
>>>>>>> +     }
>>>>>>> +
>>>>>>> +     return 0;
>>>>>>> +
>>>>>>> +failed:
>>>>>>> +     reset_release_bulk(&resets);
>>>>>>> +     return -ENODEV;
>>>>>>>  }
>>>>>> Are you missing altera_sdram_remove() , which would assert reset here ?
>>>>> Will add it.
>>>>
>>>> But won't that prevent the DRAM controller from working ?
>>> Added assert reset in _remove, SDRAM controller still can work after
>>> boot to Uboot.
>>> Seem _remove is not called when boot to Uboot.
>>
>> Look at DM_FLAG_OS_PREPARE
> Tested add DM_FLAG_OS_PREPARE flag, but still didn't see it call to _remove().
> 
> BTW, I think we shouldn't assert SDRAM controller. Otherwise, SDRAM is
> not working in next boot stage.

Hence my question above -- "But won't that prevent the DRAM controller
from working ?"

I think you're right.

-- 
Best regards,
Marek Vasut

      reply	other threads:[~2019-05-02 10:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-24  6:21 [U-Boot] [PATCH v2] arm: socfpga: Move Stratix 10 SDRAM driver to DM Ley Foon Tan
2019-04-24 14:43 ` Marek Vasut
2019-04-26  8:23   ` Ley Foon Tan
2019-04-29  8:32     ` Marek Vasut
2019-04-30  7:40       ` Ley Foon Tan
2019-04-30  9:56         ` Marek Vasut
2019-05-02  3:46           ` Ley Foon Tan
2019-05-02 10:17             ` Marek Vasut [this message]

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=7c57c94a-6f9a-a860-c18d-d8991d10c621@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.