Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2fa0f939 authored by Simon Guinot's avatar Simon Guinot Committed by Nicolas Pitre
Browse files

[ARM] Kirkwood: enhance TCLK detection



According to the Marvell LSP, the Sample at Reset regiter bit 21 can be
used to detect TCLK on 6281 and 6282 devices.

This patch has only been tested on LaCie boards.

Signed-off-by: default avatarSimon Guinot <sguinot@lacie.com>
Acked-by: default avatarLennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: default avatarNicolas Pitre <nico@fluxnic.net>
parent af9a2d00
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -854,9 +854,8 @@ int __init kirkwood_find_tclk(void)

	kirkwood_pcie_id(&dev, &rev);

	if ((dev == MV88F6281_DEV_ID && (rev == MV88F6281_REV_A0 ||
					rev == MV88F6281_REV_A1)) ||
	    (dev == MV88F6282_DEV_ID))
	if (dev == MV88F6281_DEV_ID || dev == MV88F6282_DEV_ID)
		if (((readl(SAMPLE_AT_RESET) >> 21) & 1) == 0)
			return 200000000;

	return 166666667;