Skip to content

Commit

Permalink
[ARM] Kirkwood: enhance TCLK detection
Browse files Browse the repository at this point in the history
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: Simon Guinot <sguinot@lacie.com>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
  • Loading branch information
Simon Guinot authored and Nicolas Pitre committed Oct 21, 2010
1 parent af9a2d0 commit 2fa0f93
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions arch/arm/mach-kirkwood/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -854,10 +854,9 @@ 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))
return 200000000;
if (dev == MV88F6281_DEV_ID || dev == MV88F6282_DEV_ID)
if (((readl(SAMPLE_AT_RESET) >> 21) & 1) == 0)
return 200000000;

return 166666667;
}
Expand Down

0 comments on commit 2fa0f93

Please sign in to comment.