From: santosh.shilimkar@ti•com (Santosh Shilimkar)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v3 1/2] usb: dwc3: Add Keystone specific glue layer
Date: Tue, 10 Dec 2013 10:11:36 -0500 [thread overview]
Message-ID: <52A72F28.10909@ti.com> (raw)
In-Reply-To: <20131210025110.GA20090@saruman.home>
On Monday 09 December 2013 09:51 PM, Balbi, Felipe wrote:
> Hi,
>
> On Mon, Dec 09, 2013 at 05:17:03PM -0500, WingMan Kwok wrote:
>> +static void kdwc3_enable_irqs(struct dwc3_keystone *kdwc)
>> +{
>> + u32 val;
>> +
>> + val = kdwc3_readl(kdwc->usbss, USBSS_IRQENABLE_SET_0);
>> + val = USBSS_IRQ_COREIRQ_EN;
>
> this misses the | in |=. I can fix it up while applying, this time only.
>
>> +static int kdwc3_probe(struct platform_device *pdev)
>> +{
>> + struct device *dev = &pdev->dev;
>> + struct device_node *node = pdev->dev.of_node;
>> + struct dwc3_keystone *kdwc;
>> + struct resource *res;
>> + int error, irq;
>> +
>> + kdwc = devm_kzalloc(dev, sizeof(*kdwc), GFP_KERNEL);
>> + if (!kdwc)
>> + return -ENOMEM;
>> +
>> + platform_set_drvdata(pdev, kdwc);
>> +
>> + kdwc->dev = dev;
>> +
>> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> + if (!res) {
>> + dev_err(dev, "missing usbss resource\n");
>> + return -EINVAL;
>> + }
>> +
>> + kdwc->usbss = devm_ioremap_resource(dev, res);
>> + if (IS_ERR(kdwc->usbss))
>> + return PTR_ERR(kdwc->usbss);
>> +
>> + kdwc3_dma_mask = dma_get_mask(dev);
>> + dev->dma_mask = &kdwc3_dma_mask;
>> +
>> + kdwc->clk = devm_clk_get(kdwc->dev, "usb");
>> + if (IS_ERR_OR_NULL(kdwc->clk)) {
>
> clk_get() will never return NULL. This time, I'll fix it while applying.
>
>> +static int kdwc3_remove(struct platform_device *pdev)
>> +{
>> + struct dwc3_keystone *kdwc = platform_get_drvdata(pdev);
>> +
>> + kdwc3_disable_irqs(kdwc);
>> + clk_disable_unprepare(kdwc->clk);
>
> I hope the clock isn't shared between core and wrapper, otherwise you
> could run into some troubles here. Can you confirm ?
>
Yes. the clock isn't shared. Thanks for taking care of other parts.
next prev parent reply other threads:[~2013-12-10 15:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-09 22:17 [PATCH v3 0/2] Kesytone II USB host and PHY drivers WingMan Kwok
2013-12-09 22:17 ` [PATCH v3 1/2] usb: dwc3: Add Keystone specific glue layer WingMan Kwok
2013-12-10 2:51 ` Felipe Balbi
2013-12-10 15:11 ` Santosh Shilimkar [this message]
2013-12-12 17:48 ` Felipe Balbi
2013-12-12 19:36 ` Santosh Shilimkar
2013-12-12 19:41 ` Felipe Balbi
2013-12-12 19:52 ` Santosh Shilimkar
2013-12-09 22:17 ` [PATCH v3 2/2] usb: phy: Add keystone usb phy driver WingMan Kwok
2013-12-10 2:54 ` Felipe Balbi
2013-12-10 15:14 ` Santosh Shilimkar
2013-12-12 17:20 ` Kwok, WingMan
2013-12-12 17:47 ` Felipe Balbi
2013-12-10 3:09 ` Roger Quadros
2013-12-12 17:24 ` Kwok, WingMan
2013-12-10 4:47 ` Felipe Balbi
2013-12-10 15:17 ` Santosh Shilimkar
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=52A72F28.10909@ti.com \
--to=santosh.shilimkar@ti$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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