All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Harvey <tharvey@gateworks.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC] drivers: pci: imx: add imx_pcie_remove function
Date: Fri, 12 May 2017 12:39:54 -0700	[thread overview]
Message-ID: <CAJ+vNU0R0ie7b67_h2KAjTH0nLgx2CCo7tAbSFCP+Mkbn-O7qA@mail.gmail.com> (raw)
In-Reply-To: <4fbcb9d8-6e5b-064f-8628-1784bc757f10@web.de>

On Fri, May 12, 2017 at 12:27 PM, Soeren Moch <smoch@web.de> wrote:
>> Date: Thu, 11 May 2017 07:02:52 -0700
>> From: Tim Harvey <tharvey@gateworks.com>
>> To: Stefano Babic <sbabic@denx.de>
>> Cc: Marek Vasut <marex@denx.de>, U-Boot-Denx <u-boot@lists.denx.de>,
>>     Peter Senna Tschudin <peter.senna@collabora.com>, Lucas Stach
>>     <l.stach@pengutronix.de>
>> Subject: Re: [U-Boot] [RFC] drivers: pci: imx: add imx_pcie_remove
>>     function
>> Message-ID:
>>     <CAJ+vNU2MOp_1bsh5MusGauJPdASB7+KDPQGdg+YU4gfbtBSBhQ@mail.gmail.com>
>> Content-Type: text/plain; charset="UTF-8"
>>
>> On Thu, May 11, 2017 at 6:18 AM, Stefano Babic <sbabic@denx.de> wrote:
>> > Hi Fabio,
>> >
>> > On 11/05/2017 13:06, Fabio Estevam wrote:
>> >> On Thu, May 11, 2017 at 6:01 AM, Peter Senna Tschudin
>> >> <peter.senna@collabora.com> wrote:
>> >>
>> >>> Thank you for working on this! Your patch worked for me, but I
> needed to
>> >>> add an "extern void imx_pcie_remove(void);" before calling the
> function,
>> >>> which probably means I'm missing something.
>> >> The extern should be added into a header file.
>> >>
>> >>> After applying this patch to u-boot, u-boot can initialize PCI and
>> >>> 4.11.0-next-20170510 will boot. Without your patch
> 4.11.0-next-20170510
>> >>> do not boot if u-boot initialize the PCI bus.
>> >>>
>> >>> Thanks a lot!
>> >>>
>> >>> Here is the patch I'm using for our board:
>> >> Stefano,
>> >>
>> >> The patches that Tim/Peter posted solve a kernel hang with kernel 4.11
>> >> on mx6q when U-Boot has PCI support.
>> >>
>> >> Could you please take a look and let us know if there is a more
>> >> generic way to fix this issue, like fixing it for all mx6qdl boards
>> >> that have PCI support?
>> >>
>> >> I understand that ideally the imx6 pci driver should be converted to
>> >> driver model and then we add the .remove hook, like Lucas did for
>> >> Barebox:
>> >>
> https://git.pengutronix.de/cgit/barebox/commit/?id=f1da98da2760c21487bbba8f7fb957c843a22896
>> >>
>> >> While the imx pci driver is not converted to device model, would you
>> >> be willing to accept such per board patches for the time being?
>> >>
>> >> Please advise.
>> >
>> > Ok - let wait for Tim's answer, if he has enough time to work on this to
>> > move to DM. If not, it will be ok for now to fix it in this way, hoping
>> > to move soon to DM.
>> >
>> > Regards,
>> > Stefano
>> Stefano,
>>
>> I don't have enough time to work on the DM conversion currently but it
>> sounds like this would be a welcomed 'fix' that we should get in
>> sooner than later.
>>
>> I know the include is missing from a header but I didn't bother as I
>> though there would be a better arch-specific place to put the call to
>> the remove. I don't think putting it in ft_board_setup made sense. Do
>> you have any suggestions where it should go?
>>
>> Tim
>
> Tim,
>
> this patch in addition to your original drivers/pci/pcie_imx.c changes
> works for me on a tbs2910 board.
> Since I did not touch board-specific code, this should also work for
> all affected boards.
>

Soeren,

Perfect, that's what I was looking for 'arch_preboot_os' seems like a
good place for it!

I will put together a non-RFC patch.

Tim

      reply	other threads:[~2017-05-12 19:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-10 16:43 [U-Boot] [RFC] drivers: pci: imx: add imx_pcie_remove function Tim Harvey
2017-05-10 18:10 ` Fabio Estevam
2017-05-10 21:31   ` Tim Harvey
2017-05-11  9:01   ` Peter Senna Tschudin
2017-05-11 11:06     ` Fabio Estevam
2017-05-11 11:47       ` Marek Vasut
2017-05-11 13:08         ` Fabio Estevam
2017-05-11 13:13           ` Marek Vasut
2017-05-11 13:18       ` Stefano Babic
2017-05-11 13:32         ` Jagan Teki
2017-05-11 14:02         ` Tim Harvey
2017-05-12 19:27           ` Soeren Moch
2017-05-12 19:39             ` Tim Harvey [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=CAJ+vNU0R0ie7b67_h2KAjTH0nLgx2CCo7tAbSFCP+Mkbn-O7qA@mail.gmail.com \
    --to=tharvey@gateworks.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.