[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL1qeaFRPcTVABoEbip=Fq0nHo6aKSR7bhTo3QQYcZq2k1S3Eg@mail.gmail.com>
Date: Tue, 18 Nov 2014 09:12:58 -0800
From: Andrew Bresticker <abrestic@...omium.org>
To: balbi@...com
Cc: Stephen Warren <swarren@...dotorg.org>,
Thierry Reding <thierry.reding@...il.com>,
Alexandre Courbot <gnurou@...il.com>,
"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
Russell King <linux@....linux.org.uk>,
Jassi Brar <jassisinghbrar@...il.com>,
Linus Walleij <linus.walleij@...aro.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Mathias Nyman <mathias.nyman@...el.com>,
Grant Likely <grant.likely@...aro.org>,
Alan Stern <stern@...land.harvard.edu>,
Arnd Bergmann <arnd@...db.de>, Olof Johansson <olof@...om.net>,
Kishon Vijay Abraham I <kishon@...com>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>
Subject: Re: [PATCH V5 09/12] usb: xhci: Add NVIDIA Tegra xHCI host-controller driver
On Mon, Nov 17, 2014 at 4:33 PM, Felipe Balbi <balbi@...com> wrote:
>> >> +static int tegra_xhci_load_firmware(struct tegra_xhci_hcd *tegra)
>> >> +{
>> >> + struct device *dev = tegra->dev;
>> >> + struct tegra_xhci_fw_cfgtbl *cfg_tbl;
>> >> + struct tm fw_tm;
>> >> + u32 val, code_tag_blocks, code_size_blocks;
>> >> + u64 fw_base;
>> >> + time_t fw_time;
>> >> + unsigned long timeout;
>> >> +
>> >> + if (csb_readl(tegra, XUSB_CSB_MP_ILOAD_BASE_LO) != 0) {
>> >> + dev_info(dev, "Firmware already loaded, Falcon state 0x%x\n",
>> >> + csb_readl(tegra, XUSB_FALC_CPUCTL));
>> >> + return 0;
>> >> + }
>> >
>> > won't this prevent rmmod && insmod from succeeding ? Maybe not, as you
>> > return 0 anyway, but if the firmware side craps out, it might be useful
>> > to reload the firmware and reset that block. I wonder if this prevents
>> > that.
>>
>> rmmod && insmod does work with the above since, as you mentioned, we
>> return successfully if the controller is already running. Attempting
>> to re-load the firmware if the controller is already running won't
>> work - it requires a full power-gate/ungate sequence of the
>> controller. Unfortunately, that sequence is rather complicated and I
>> haven't had a chance to implement it yet. it will hopefully be coming
>> later, though.
>
> Alright, could you add a comment on the source code stating that ?
> Perhaps a REVISIT note or FIXME ?
Sure, will do.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists