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 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.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
--
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