Re: [Uclinux-dist-devel] [PATCH 2/3] USB: musb: workaround Blackfin FIFO anomalies

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

 



On Mon, Dec 21, 2009 at 12:04, Sergei Shtylyov wrote:
> Mike Frysinger wrote:
>> diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
>> index fe4934d..ad26e65 100644
>> --- a/drivers/usb/musb/blackfin.c
>> +++ b/drivers/usb/musb/blackfin.c
>> +    if (!ANOMALY_05000380 && epnum != 0) {
>> +        flush_dcache_range((unsigned int)src,
>> +            (unsigned int)(src + len));
>> +
>> +        /* Setup DMA address register */
>> +        dma_reg = (u16) ((u32) src & 0xFFFF);
>>
>
>  Hm, virtual address has the same value as a physical one?

Blackfin has no virtual memory hardware

>> +        bfin_write16(USB_DMA_REG(epnum, USB_DMAx_ADDR_LOW), dma_reg);
>> +        SSYNC();
>> +
>> +        dma_reg = (u16) (((u32) src >> 16) & 0xFFFF);
>>
>
>  Masking with 0xFFFF is not needed after shift...

the u16 cast isnt either

>> +    } else {
>> +        SSYNC();
>> +
>> +        if (unlikely((unsigned long)src & 0x01))
>> +            outsw_8((unsigned long)fifo, src,
>> +                len & 0x01 ? (len >> 1) + 1 : len >> 1);
>>
>
>  Why not simply (len + 1) >> 1, without ?: at all?

should be OK
-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