Re: [PATCH 1/1] usb: chipidea: imx: include usbmisc_imx.c in ci_hdrc_imx.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 07, 2013 at 11:11:10AM +0200, Sascha Hauer wrote:
> On Wed, Aug 07, 2013 at 01:34:37PM +0800, Peter Chen wrote:
> > -
> > -	reg = usbmisc->base + MX25_USB_PHY_CTRL_OFFSET;
> > -
> > -	if (usbdev->evdo) {
> > -		spin_lock_irqsave(&usbmisc->lock, flags);
> > -		val = readl(reg);
> > -		writel(val | MX25_BM_EXTERNAL_VBUS_DIVIDER, reg);
> > -		spin_unlock_irqrestore(&usbmisc->lock, flags);
> > +	if (data->evdo) {
> > +		spin_lock_irqsave(&data->lock, flags);
> > +		regmap_read(data->non_core_base_addr,
> > +				MX25_USB_PHY_CTRL_OFFSET, &val);
> > +		regmap_write(data->non_core_base_addr,
> > +				MX25_USB_PHY_CTRL_OFFSET,
> > +					val | MX25_BM_EXTERNAL_VBUS_DIVIDER);
> > +		spin_unlock_irqrestore(&data->lock, flags);
> 
> Have a look at regmap_update_bits. You won't need this spinlock anymore.

Thanks.

-- 

Best Regards,
Peter Chen

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux