Re: [PATCH] usb: musb: hsdma: change back to use musb_read/writew

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

 



On Thu, Jan 6, 2011 at 07:27, Sergei Shtylyov wrote:
> On 06-01-2011 5:55, Bob Liu wrote:
>>>>>> Blackfin platform doesn't support 32bits musbdma registers, so change
>>>>>> back to
>>>>>> use musb_read/writew instead of musb_read/writel and simply some
>>>>>> format casts.
>
>>>>> Instead, patch the definition of musb_readl()/writel() for blackfin.
>>>>> Other archs _do_ support 32 bit reads/writes and this patch will pose
>>>>> an
>>>>> impact on those.
>
>>>> Â ÂHow -- if it only patches the defintion under #ifdef CONFIG_BLACKFIN?
>
>>> aa, my bad, I read it wrongly. Still, it'd be better to patch
>>> musb_readl/writel() instead of patching all uses of musb_readl() on
>>> every Blackfin code.
>
>> If patched to musb_readl/writel() itself, I am afraid there maybe or
>> will have some other blackfin musb registers which can do 32bits read
>> and write correctly,
>
> Â If you look at the actual defintiotions of musb_readl()/musb_writel() for
> Blackfin, you'll see that they do 16-bit accesses ISO 32-bit. Yes, they just
> truncate 32-bit value on writes. :-/

yeah, we dont have any MUSB regs which can do 32bit accesses, so we do
this.  unfortunately, i dont think it's possible to detect the
caller's intention when it tries to write two 16bit registers at the
same time as it would assume the register map of devices are the same
everywhere.  the musb_writel() API would have to take two arguments
(the two 16bits intended to be written at once).

then again, as Sergei pointed out, this patch is for Blackfin-specific
code only, and thus far this is the only musb_writel() we've had in
common code.  so can we merge this change and delay the academic
discussion of musb_writel() rewriting to a day when it is necessary ?
-mike
--
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