diff options
author | Simon Guinot <sguinot@lacie.com> | 2010-10-21 11:42:28 +0200 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2010-10-21 14:09:52 -0400 |
commit | 2fa0f93915eacf758da800e2c67b3b9adef1c5c5 (patch) | |
tree | bd99ab4599ff84e25b91b90c687ef9fd0aaf83a7 /arch/arm | |
parent | af9a2d006611124eb1de9d7fee160b25b252ad98 (diff) | |
download | kernel_samsung_espresso10-2fa0f93915eacf758da800e2c67b3b9adef1c5c5.zip kernel_samsung_espresso10-2fa0f93915eacf758da800e2c67b3b9adef1c5c5.tar.gz kernel_samsung_espresso10-2fa0f93915eacf758da800e2c67b3b9adef1c5c5.tar.bz2 |
[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: Simon Guinot <sguinot@lacie.com>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-kirkwood/common.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 1c82d42..ee99a5a 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c @@ -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; } |