Re: [PATCH] usb: dwc3: convert TRBs into bitshifts

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

 



* Felipe Balbi | 2012-02-06 14:47:00 [+0200]:

>> you getting rid of the __lew32 in the trb_hw structure together convert
>> function here as well and I don't see a replacement. I haven't looked at
>
>there's no need for a replacement anymore. There's only dwc3_trb_hw
>(which I renamed to dwc3_trb).
Okay.

>> it in detail but does dwc3_trb point directly into memory which accessed
>> by dwc3? If so it has to be __l32 and not u32 and you have to use proper
>> le32_to_cpu() macros and those for the other way around.
>
>Is it really needed now that I'm using play bitshifts ? The IP will be
>running at the same endianness as the cpu, no ?

That is tricky. Take a look at ch 6.19.
Assume that your pci-e is stuffed into a powerpc. So once you prepare
the TRB & such in memory they end up BE in host memory. The dwc3 will
grab via PCIE and expect little endian format. So this is broken.
However you have a DWC_USB3_GSBU register which you could set to 1 in
such case. If this works well then you _could_ leave all descriptors in
host-native mode. Only register access will remain in LE mode. To avoid
confusion for the TRB descriptors (event buffers probably as well) I
would denote it as such.

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