]> git.ipfire.org Git - thirdparty/linux.git/commit
ata: ahci: mvebu: add Armada 3700 initialization needed for S2RAM
authorMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 4 Dec 2018 19:28:28 +0000 (20:28 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 11 Jan 2019 21:47:50 +0000 (14:47 -0700)
commit2f558bc3f33ca344489cec2218545741028b6a70
tree524c3d3067653b83a4d3bb89d7e3e1e8b785e666
parent96dbcb40e4b1a387cdb9b21f43638c759aebb5a4
ata: ahci: mvebu: add Armada 3700 initialization needed for S2RAM

A3700 comphy initialization is done in the firmware (TF-A). Looking at
the SATA PHY initialization routine, there is a comment about "vendor
specific" registers. Two registers are mentioned. They are not
initialized there in the firmware because they are AHCI related, while
the firmware at this location does only PHY configuration. The
solution to avoid doing such initialization is relying on U-Boot.

While this work at boot time, U-Boot is definitely not going to run
during a resume after suspending to RAM.

Two possible solutions were considered:
* Fixing the firmware.
* Fixing the kernel driver.

The first solution would take ages to propagate, while the second
solution is easy to implement as the driver as been a little bit
reworked to prepare for such platform configuration. Hence, this patch
adds an Armada 3700 configuration function to set these two registers
both at boot time (in the probe) and after a suspend (in the resume
path).

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/ata/ahci_mvebu.c