summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove obsolete TODO listBenjamin Herrenschmidt2018-06-121-10/+0
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Improve dependency in MakefileBenjamin Herrenschmidt2018-06-121-5/+5
| | | | | | It was missing the dependency on the cf-fsi-fw.h file Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Add licenceBenjamin Herrenschmidt2018-06-126-0/+363
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Update binary distributionBenjamin Herrenschmidt2018-06-121-0/+0
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Export CF boot time configBenjamin Herrenschmidt2018-06-122-0/+8
| | | | | | For diagnostics purposes Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Read back irq ack register before returningBenjamin Herrenschmidt2018-06-121-0/+1
| | | | | | | Stores may be asynchronous, I'm not entirely certain what ordering the CF provides with the subsequent read of the command in SRAM, so ensure the store did make it by reading back first.
* Update binary distributionBenjamin Herrenschmidt2018-06-121-0/+0
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Fix interrupt raceBenjamin Herrenschmidt2018-06-121-16/+7
| | | | | | | | | | | | | | | | | | | | The current sequence is possible in the main command loop and in the arbitration sequence: - STOP enables interrupt and stops execution - Interrupt occurs (stale from previous command) - No command (or arbitration response) - Command is written - Interrupt occurs again, is taken, does nothing - STOP executes, doesn't wake up We need to ensure that we only take the interrupt on STOP, so we need to re-mask after every STOP. (We could alternatively modify the SR in the interrupt stack to return from the handler with IRQs disabled but this is easier). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Update binary distributionBenjamin Herrenschmidt2018-06-121-0/+0
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Don't clobber d0 in interruptsBenjamin Herrenschmidt2018-06-121-0/+5
| | | | | | And keep them masked during breaks Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Update binary distributionBenjamin Herrenschmidt2018-06-111-0/+0
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* When GPIO trans is cached, we need to reload after arbitrationBenjamin Herrenschmidt2018-06-111-1/+3
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Update binary distributionBenjamin Herrenschmidt2018-06-111-0/+0
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Use a separate "started" flagBenjamin Herrenschmidt2018-06-113-3/+4
| | | | | | | Relying on the command-status is dicey, the GPIO arbitration code needs a more reliable way to know we are actually running Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Add marker at end of tracesBenjamin Herrenschmidt2018-06-113-2/+19
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Update binary distributionBenjamin Herrenschmidt2018-06-111-0/+0
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Fix tag extractionBenjamin Herrenschmidt2018-06-111-1/+1
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Rework interfacesBenjamin Herrenschmidt2018-06-113-77/+122
| | | | | | | | | | | | | | | We now use a portion of the ucode itself for version information and to configure the base of SRAM, this will allow the driver to use a pool allocator with less constraints. We put the status register as part of the command register, this speeds things up a bit and remove the need to clear it from the host. We also turn some SRAM stores from byte to long stores, they seem to be faster (still room for improvement) Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Fixup some commentsBenjamin Herrenschmidt2018-06-111-2/+2
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Don't reload trans GPIO when cachedBenjamin Herrenschmidt2018-06-111-3/+10
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Make sure we are fully PC relativeBenjamin Herrenschmidt2018-06-112-2/+2
| | | | | | | | With of course the notable exception of the exception vectors, but this will make it easier should we want to relocate the code. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Rework/shrink the "bad exceptions" stubsBenjamin Herrenschmidt2018-06-111-7/+12
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Move stack down into the code sectionBenjamin Herrenschmidt2018-06-111-2/+9
| | | | | | | This will make it easier to share the reserved memory from Linux as the ucode is now fully self contained. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* More TODOBenjamin Herrenschmidt2018-06-101-0/+2
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Update distributed binaryBenjamin Herrenschmidt2018-06-101-0/+0
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Add TODO listBenjamin Herrenschmidt2018-06-101-0/+8
|
* sync with kernel codeBenjamin Herrenschmidt2018-06-101-3/+7
|
* Fix typo breaking RomulusBenjamin Herrenschmidt2018-06-101-1/+1
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Deal with arbitration at startupBenjamin Herrenschmidt2018-06-081-3/+15
| | | | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* 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>
OpenPOWER on IntegriCloud