RE: [PATCH 4/7] usb: chipidea: add freescale imx28 special write register method

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

 



> From: Peter Chen
> 
> According to Freescale imx28 Errata, "ENGR119653 USB: ARM to USB
> register error issue", All USB register write operations must
> use the ARM SWP instruction. So, we implement special hw_write
> and hw_test_and_clear for imx28.
> 
> Discussion for it at below:
> http://marc.info/?l=linux-usb&m=137996395529294&w=2

Personally I think you should include the text of the errata
in one of the files.

I'm not suggesting you change the guts of the patch, but...

Having read the errata it isn't 100% clear to me that using SWP
is necessary for all register accesses.
Since SWP is a locked bus cycle it will have performance penalties,
depending on the number of write operations this might be measurable.

AFAICT the reason that SWP works is that does a read cycle prior
to the write that ensures that logic is all in the correct state
(I think the read returns garbage).
There is no requirement for a locked bus cycle, or for the cycles
to be adjacent (from the cpu's point of view). Just that there
can be no other cycles on what I assume is a peripheral bus.

So if the code can guarantee no other cycles on the same bus (the
ones that are documented in the errata to cause problems) then
there is no need to use the SWP instruction.
Typically this would be single cpu systems doing a series of
accesses (the first could be a read) with interrupts hard disabled.

	David



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