mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Hans de Goede <hdegoede@redhat.com>, <icenowy@aosc.xyz>,
	Maxime Ripard <maxime.ripard@free-electrons.com>,
	Chen-Yu Tsai <wens@csie.org>
Cc: <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-sunxi@googlegroups.com>
Subject: Re: [PATCH v2] phy: sun4i: check PMU presence when poking unknown bit of pmu
Date: Sat, 5 Nov 2016 11:18:37 +0530	[thread overview]
Message-ID: <f46bb951-021d-21eb-3b5b-467dd182b2c6@ti.com> (raw)
In-Reply-To: <41f43381-c1bb-2f69-5f99-ac5cebf651ea@redhat.com>



On Friday 28 October 2016 11:45 PM, Hans de Goede wrote:
> Hi,
> 
> On 28-10-16 18:27, Icenowy Zheng wrote:
>> Allwinner SoC's PHY 0, when used as OTG controller, have no pmu part.
>> The code that poke some unknown bit of PMU for H3/A64 didn't check
>> the PHY, and will cause kernel oops when PHY 0 is used.
>>
>> This patch will check whether the pmu is not NULL before poking.
>>
>> Fixes: b3e0d141ca9f (phy: sun4i: add support for A64 usb phy)
>>
>> Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
>> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> 
> Patch LGTM too:
> 
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>

merged, thanks.

-Kishon
> 
> Regards,
> 
> Hans
> 
> 
>> ---
>>  drivers/phy/phy-sun4i-usb.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c
>> index b9342a2..fec34f5 100644
>> --- a/drivers/phy/phy-sun4i-usb.c
>> +++ b/drivers/phy/phy-sun4i-usb.c
>> @@ -264,7 +264,7 @@ static int sun4i_usb_phy_init(struct phy *_phy)
>>          return ret;
>>      }
>>
>> -    if (data->cfg->enable_pmu_unk1) {
>> +    if (phy->pmu && data->cfg->enable_pmu_unk1) {
>>          val = readl(phy->pmu + REG_PMU_UNK1);
>>          writel(val & ~2, phy->pmu + REG_PMU_UNK1);
>>      }
>>

      reply	other threads:[~2016-11-05  5:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20161028162701.4531-1-icenowy@aosc.xyz>
2016-10-28 18:15 ` Hans de Goede
2016-11-05  5:48   ` Kishon Vijay Abraham I [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=f46bb951-021d-21eb-3b5b-467dd182b2c6@ti.com \
    --to=kishon@ti.com \
    --cc=hdegoede@redhat.com \
    --cc=icenowy@aosc.xyz \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=wens@csie.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®