summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Add distributed binary buildBenjamin Herrenschmidt2018-06-071-0/+0
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Add GPIO arbitration testBenjamin Herrenschmidt2018-06-071-1/+110
| | | | | | Needs to be explicitely enabled Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Fix problems with GPIO usageBenjamin Herrenschmidt2018-06-073-23/+42
| | | | | | | | | | | | | | | | | The "value" register doesn't return the last data written when read but returns the value sampled on the line, which may or may not be the value written for an output GPIO. For example it can be delayed by the synchronizers. So whenever the CF reads the value to adjust its caches it needs to use the "data read" register intead, otherwise it can clobber values set by Linux when doing handshaking. Also don't use %d0 for DTRA, use %d1 to avoid interrupts clobber and do read/modify/write cycles on it as it's not a permanent cached value, just a temporary. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Fix commentBenjamin Herrenschmidt2018-06-061-1/+1
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Header cleanupsBenjamin Herrenschmidt2018-06-063-4/+6
|
* Fix bug when clocking out 64-bit commandsBenjamin Herrenschmidt2018-06-061-3/+3
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Cleanup GPIO configBenjamin Herrenschmidt2018-06-061-5/+11
|
* Remove TODO comments in clock_out_bit and document optimisationBenjamin Herrenschmidt2018-06-041-2/+5
| | | | | | | | | | The send path isn't the most critical and optimizing here is hard for little return. Also on systems like Romulus where both clk and data are in the same GPIO register, we already don't need the test for value change since we use a single write to write both value and clock. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Cache clock GPIO bit number in a registerBenjamin Herrenschmidt2018-06-041-6/+9
| | | | | | | bset/bclk instructions are shorter when using a register, this results in a small perf. improvement. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Cleanup starting up, add trace flags to API versionBenjamin Herrenschmidt2018-06-033-27/+44
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Add arbitration mechanismBenjamin Herrenschmidt2018-06-033-9/+54
| | | | | | | This will be used by the kernel GPIO driver to synchronize with the CF when accessing GPIO shared with FSI. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Use 6 for echo/send delayBenjamin Herrenschmidt2018-06-031-1/+3
| | | | | | seems to be the best value for performance Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Add break support and change tSendDelay/tEchoDelayBenjamin Herrenschmidt2018-06-031-0/+61
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Fix problems with write commands (CRC incorrect and endian issues)Benjamin Herrenschmidt2018-06-031-4/+7
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Move command processing to a helperBenjamin Herrenschmidt2018-06-031-18/+45
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Shrink trace dumpBenjamin Herrenschmidt2018-06-031-1/+1
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Add API version, FW version and system signature registersBenjamin Herrenschmidt2018-06-035-1/+22
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Add break and "idle clocks" commandsBenjamin Herrenschmidt2018-06-032-0/+39
| | | | | | | | | | | | | Break sends a break command. It has 16000 recovery cycles as per the existing GPIO based driver, though that might be unnecessary in practice. "idle clocks" sends up to 255 clocks with data line held high, and can be used to flush things out for example after changing the send delay, or before sending a DPOLL command as some CFAMs seem to require extra clocks there. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Add (untested) write supportBenjamin Herrenschmidt2018-06-031-10/+14
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Fix a number of problems with the test codeBenjamin Herrenschmidt2018-06-031-71/+25
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Configure send/echo delayBenjamin Herrenschmidt2018-06-033-2/+11
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Move SRAM layout to a common .h fileBenjamin Herrenschmidt2018-06-034-100/+83
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Add witherspoon definitionsBenjamin Herrenschmidt2018-06-031-0/+6
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Fix makefileBenjamin Herrenschmidt2018-06-031-2/+2
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Add -Werror to test caseBenjamin Herrenschmidt2018-06-031-1/+1
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Fix variable aliasing in test caseBenjamin Herrenschmidt2018-06-031-5/+5
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Don't write GPIO data right before clocking if using same regBenjamin Herrenschmidt2018-06-031-1/+6
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Switch GPIOs to output after send delay to match other driverBenjamin Herrenschmidt2018-06-031-3/+5
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Tracing fixesBenjamin Herrenschmidt2018-06-031-5/+6
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Update some commentsBenjamin Herrenschmidt2018-06-031-1/+6
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Deal with bank collision between clk/data and trans GPIOsBenjamin Herrenschmidt2018-06-031-7/+19
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Use a1 for sram, keep a0 as scratchBenjamin Herrenschmidt2018-06-031-23/+31
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Move code/vectors to after definitionsBenjamin Herrenschmidt2018-06-031-22/+28
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Changes to be able to build multiple firmwaresBenjamin Herrenschmidt2018-06-034-108/+144
| | | | | | | | | | | Change to use the C preprocessor (use the ARM one for that) for asm files so we can force-include a per-machine GPIO definition file and use some preprocessor macros to define the cache registers. This allows us to deal with the cases where the clock and data use a different cache vs. the same cache. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Initial importBenjamin Herrenschmidt2018-06-024-0/+1138
OpenPOWER on IntegriCloud