net{space,xbig} TCLK determination
Subsystems (2)
Hi,
The net{space,xbig} board support files have this:
static void netspace_v2_timer_init(void)
{
kirkwood_tclk = 166666667;
orion_time_init(IRQ_KIRKWOOD_BRIDGE, kirkwood_tclk);
}This is a pretty ugly hack -- if kirkwood_find_tclk() is not determining the right TCLK on these boards, then that would be the real bug, and it should be fixed there, and not by putting hacks like these in board support files.
thanks,
Lennert
Hi Lennert,
Quoted 10 lines · Lennert Buytenhek
Hi,
The net{space,xbig} board support files have this:
static void netspace_v2_timer_init(void) { kirkwood_tclk = 166666667; orion_time_init(IRQ_KIRKWOOD_BRIDGE, kirkwood_tclk); }
Quoted 4 lines
This is a pretty ugly hack -- if
kirkwood_find_tclk()is not determining the right TCLK on these boards, then that would be the real bug, and it should be fixed there, and not by putting hacks like these in board support files.
In the Marvell LSP, TCLK detection is based on the Sample at Reset Register bit 21. There is no description about this bit usage in the Kirkwood functional specification document.
The given result _seems_ to be correct for the boards on my desk, but I have no idea how this way is reliable...
I simply don't have the needed platform knowledge to solve this issue. So, if you want me to fix kirkwood_find_tclk(), you will have to give more hints.
The lacie_v2_timer_init() function is maybe a ugly hack but that is the only I found. My concern was to avoid breaking TCLK detection for other boards.
Thanks,
Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20101020/a2471756/attachment.sig>
Quoted 1 line · Simon Guinot
Hi Lennert,
Hi Simon,
Quoted 19 lines
Quoted 8 lines
The net{space,xbig} board support files have this:
static void netspace_v2_timer_init(void) { kirkwood_tclk = 166666667; orion_time_init(IRQ_KIRKWOOD_BRIDGE, kirkwood_tclk); }Quoted 4 lines
This is a pretty ugly hack -- if
kirkwood_find_tclk()is not determining the right TCLK on these boards, then that would be the real bug, and it should be fixed there, and not by putting hacks like these in board support files.In the Marvell LSP, TCLK detection is based on the Sample at Reset Register bit 21. There is no description about this bit usage in the Kirkwood functional specification document.
The given result _seems_ to be correct for the boards on my desk, but I have no idea how this way is reliable...
Quoted 3 lines
I simply don't have the needed platform knowledge to solve this issue. So, if you want me to fix
kirkwood_find_tclk(), you will have to give more hints.
This came up when the upstream kirkwood port was initially done, and the reliable method of detecting TCLK is based on a register that is internal use only, so what kirkwood_find_tclk() currently does is an approximation of that using other registers that _are_ public.
If the LSP uses the SaR register, then I don't see why the upstream kernel shouldn't be doing that as well. The mv78xx0 port in the upstream kernel uses that method too (see mach-mv78xx0/common.c, get_*clk() functions).
Quoted 3 lines
The
lacie_v2_timer_init()function is maybe a ugly hack but that is the only I found. My concern was to avoid breaking TCLK detection for other boards.
Makes sense.
thanks,
Lennert
PATCH 1/2 Kirkwood: enhance TLCK detection
From: Simon Guinot <[email protected]>
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.
--- arch/arm/mach-kirkwood/common.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
arch/arm/mach-kirkwood/common.c +3 -4
@@ -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 ; }
Signature · 1 line
1.6.3.1
PATCH 2/2 Kirkwood: fix timer initialization for LaCie boards
From: Simon Guinot <[email protected]>
--- arch/arm/mach-kirkwood/d2net_v2-setup.c | 2 +- arch/arm/mach-kirkwood/lacie_v2-common.c | 14 -------------- arch/arm/mach-kirkwood/lacie_v2-common.h | 2 -- arch/arm/mach-kirkwood/netspace_v2-setup.c | 6 +++--- arch/arm/mach-kirkwood/netxbig_v2-setup.c | 4 ++-- 5 files changed, 6 insertions(+), 22 deletions(-)
arch/arm/mach-kirkwood/d2net_v2-setup.c +1 -1
@@ -227,5 +227,5 @@ MACHINE_START(D2NET_V2, "LaCie d2 Network v2") .init_machine = d2net_v2_init, .map_io = kirkwood_map_io, .init_irq = kirkwood_init_irq, - .timer = &lacie_v2_timer, + .timer = &kirkwood_timer,MACHINE_END
arch/arm/mach-kirkwood/lacie_v2-common.c +0 -14
@@ -111,17 +111,3 @@ void __init lacie_v2_hdd_power_init(int hdd_num)pr_err ("Failed to power up HDD%d\n" , i +1 ); } } - -/***************************************************************************** -* Timer -****************************************************************************/ - -static void lacie_v2_timer_init (void ) -{ - kirkwood_tclk =166666667 ; -orion_time_init (IRQ_KIRKWOOD_BRIDGE , kirkwood_tclk); -} - -struct sys_timer lacie_v2_timer = { - .init = lacie_v2_timer_init, -};
arch/arm/mach-kirkwood/lacie_v2-common.h +0 -2
@@ -13,6 +13,4 @@ void lacie_v2_register_flash(void);void lacie_v2_register_i2c_devices (void );void lacie_v2_hdd_power_init (int hdd_num); -extern struct sys_timer lacie_v2_timer; -#endif
arch/arm/mach-kirkwood/netspace_v2-setup.c +3 -3
@@ -221,7 +221,7 @@ MACHINE_START(NETSPACE_V2, "LaCie Network Space v2") .init_machine = netspace_v2_init, .map_io = kirkwood_map_io, .init_irq = kirkwood_init_irq, - .timer = &lacie_v2_timer, + .timer = &kirkwood_timer, MACHINE_END#endif
@@ -233,7 +233,7 @@ MACHINE_START(INETSPACE_V2, "LaCie Internet Space v2") .init_machine = netspace_v2_init, .map_io = kirkwood_map_io, .init_irq = kirkwood_init_irq, - .timer = &lacie_v2_timer, + .timer = &kirkwood_timer, MACHINE_END#endif
@@ -245,6 +245,6 @@ MACHINE_START(NETSPACE_MAX_V2, "LaCie Network Space Max v2") .init_machine = netspace_v2_init, .map_io = kirkwood_map_io, .init_irq = kirkwood_init_irq, - .timer = &lacie_v2_timer, + .timer = &kirkwood_timer, MACHINE_END#endif
arch/arm/mach-kirkwood/netxbig_v2-setup.c +2 -2
@@ -405,7 +405,7 @@ MACHINE_START(NET2BIG_V2, "LaCie 2Big Network v2") .init_machine = netxbig_v2_init, .map_io = kirkwood_map_io, .init_irq = kirkwood_init_irq, - .timer = &lacie_v2_timer, + .timer = &kirkwood_timer, MACHINE_END#endif
@@ -417,6 +417,6 @@ MACHINE_START(NET5BIG_V2, "LaCie 5Big Network v2") .init_machine = netxbig_v2_init, .map_io = kirkwood_map_io, .init_irq = kirkwood_init_irq, - .timer = &lacie_v2_timer, + .timer = &kirkwood_timer, MACHINE_END#endif
Signature · 1 line
1.6.3.1
PATCH 2/2 Kirkwood: fix timer initialization for LaCie boards
Quoted 3 lines · Simon Guinot
From: Simon Guinot <[email protected]>
Signed-off-by Simon Guinot <[email protected]>
PATCH 1/2 Kirkwood: enhance TLCK detection
In reply to Simon GuinotIn the patch title:
Quoted 1 line
[PATCH 1/2] [ARM] Kirkwood: enhance TLCK detection
s/TLCK/TCLK/
Quoted 9 lines · Simon Guinot
From: Simon Guinot <[email protected]>
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.
[snip]
arch/arm/mach-kirkwood/common.c int __init kirkwood_find_tclk(void) · line 862
Quoted 10 lines
arch/arm/mach-kirkwood/common.c +3
-4-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 ; }
Can we not just make this:
if ((readl(SAMPLE_AT_RESET) >> 21 & 1) == 0) return 200000000; else return 166666667;
(I don't have the necessary docs, Saeed might have to answer this one.)
thanks,
Lennert
PATCH 1/2 Kirkwood: enhance TLCK detection
Quoted 43 lines
-----Original Message-----
From: Lennert Buytenhek [mailto:buytenh at wantstofly.org]
Sent: Thursday, October 21, 2010 9:53 AM
To: Simon Guinot
Cc: Nicolas Pitre; linux-arm-kernel at lists.infradead.org; Benoit Canet; Saeed Bishara; Simon Guinot
Subject: Re: [PATCH 1/2] [ARM] Kirkwood: enhance TLCK detectionIn the patch title:
Quoted 1 line
[PATCH 1/2] [ARM] Kirkwood: enhance TLCK detection
s/TLCK/TCLK/
Quoted 3 lines · Simon Guinot
From: Simon Guinot <[email protected]>
According to the Marvell LSP, the Sample at Reset regiter
bit 21 can be
Quoted 6 lines
used to detect TCLK on 6281 and 6282 devices.
This patch has only been tested on LaCie boards.
[snip]
arch/arm/mach-kirkwood/common.c int __init kirkwood_find_tclk(void) · line 862
Quoted 10 lines
arch/arm/mach-kirkwood/common.c +3
-4-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 ; }Can we not just make this:
Quoted 6 lines
if ((readl(SAMPLE_AT_RESET) >> 21 & 1) == 0) return 200000000; else return 166666667;(I don't have the necessary docs, Saeed might have to answer this one.)
Lennert, the docs and our reference code shows that the original code of Simor is correct,s o I suggest to do :
if ((dev == MV88F6281_DEV_ID || dev == MV88F6282_DEV_ID) && ((readl(SAMPLE_AT_RESET) & BIT(21)) == 0)) return 200000000; else return 166666667;
Quoted 5 lines
thanks,
Lennert
PATCH 1/2 Kirkwood: enhance TLCK detection
Quoted 13 lines · Saeed Bishara
Quoted 13 lines
arch/arm/mach-kirkwood/common.c int __init kirkwood_find_tclk(void) · line 862
Quoted 10 lines
arch/arm/mach-kirkwood/common.c +3
-4-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 ; }Can we not just make this:
Quoted 8 lines
Quoted 6 lines
if ((readl(SAMPLE_AT_RESET) >> 21 & 1) == 0) return 200000000; else return 166666667;(I don't have the necessary docs, Saeed might have to answer this one.)
Lennert, the docs and our reference code shows that the original code of Simor is correct
So what does it mean if bit 21 is 0 on 6180/6192?
If [21] == 0 is not supported on 6180/6192 because those parts officially only support 166 MHz TCLK operation, then that doesn't need a test for the part number, I think.
PATCH 1/2 Kirkwood: enhance TLCK detection
Quoted 33 lines
-----Original Message-----
From: Lennert Buytenhek [mailto:buytenh at wantstofly.org]
Sent: Thursday, October 21, 2010 11:58 AM
To: Saeed Bishara
Cc: Simon Guinot; Nicolas Pitre;
linux-arm-kernel at lists.infradead.org; Benoit Canet; Simon Guinot
Subject: Re: [PATCH 1/2] [ARM] Kirkwood: enhance TLCK detectionQuoted 13 lines · Saeed Bishara
Quoted 13 lines
arch/arm/mach-kirkwood/common.c int __init kirkwood_find_tclk(void) · line 862
Quoted 10 lines
arch/arm/mach-kirkwood/common.c +3
-4-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 ; }Can we not just make this:
Quoted 6 lines
Quoted 6 lines
if ((readl(SAMPLE_AT_RESET) >> 21 & 1) == 0) return 200000000; else return 166666667;(I don't have the necessary docs, Saeed might have to
answer this one.)
Quoted 1 line
Quoted 8 lines
Quoted 1 line
Lennert, the docs and our reference code shows that the
original code of Simor is correct
So what does it mean if bit 21 is 0 on 6180/6192?
If [21] == 0 is not supported on 6180/6192 because those parts officially only support 166 MHz TCLK operation, then that doesn't need a test for the part number, I think.
The spec says that bit 21 for 6180 is for internal testing, so lets don't assume any thing about it. saeed
Quoted 1 line
PATCH 1/2 Kirkwood: enhance TLCK detection
Quoted 24 lines · Saeed Bishara
Quoted 24 lines
Quoted 13 lines
Quoted 13 lines
arch/arm/mach-kirkwood/common.c int __init kirkwood_find_tclk(void) · line 862
Quoted 10 lines
arch/arm/mach-kirkwood/common.c +3
-4-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 ; }Can we not just make this:
Quoted 6 lines
Quoted 6 lines
if ((readl(SAMPLE_AT_RESET) >> 21 & 1) == 0) return 200000000; else return 166666667;(I don't have the necessary docs, Saeed might have to
answer this one.)
Quoted 2 lines
Lennert, the docs and our reference code shows that the
original code of Simor is correct
Quoted 8 lines
Quoted 5 lines
So what does it mean if bit 21 is 0 on 6180/6192?
If [21] == 0 is not supported on 6180/6192 because those parts officially only support 166 MHz TCLK operation, then that doesn't need a test for the part number, I think.
The spec says that bit 21 for 6180 is for internal testing, so lets don't assume any thing about it.
OK, I agree.
PATCH 1/2 Kirkwood: enhance TLCK detection
In reply to Simon GuinotQuoted 28 lines
-----Original Message-----
From: Simon Guinot [mailto:simon at sequanux.org]
Sent: Thursday, October 21, 2010 9:45 AM
To: Lennert Buytenhek; Nicolas Pitre
Cc: linux-arm-kernel at lists.infradead.org; Benoit Canet; Saeed Bishara; Simon Guinot
Subject: [PATCH 1/2] [ARM] Kirkwood: enhance TLCK detectionFrom: Simon Guinot <[email protected]>
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 <[email protected]>---
arch/arm/mach-kirkwood/common.c| 7 +++----1 files changed, 3 insertions(+), 4 deletions(-)arch/arm/mach-kirkwood/common.c +0
-0
arch/arm/mach-kirkwood/common.c int __init kirkwood_find_tclk(void) · line 859
Quoted 10 lines
arch/arm/mach-kirkwood/common.c +3
-4@@ -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 ;
The flow is ok, but the code doesn't look correct, the & precedence is higher thatn >>. saeed
Quoted 7 lines
arch/arm/mach-kirkwood/common.c +0
-0return 166666667 ; }Signature · 1 line
1.6.3.1
PATCH 1/2 Kirkwood: enhance TLCK detection
Quoted 31 lines · Saeed Bishara
Quoted 31 lines
-----Original Message-----
From: Simon Guinot [mailto:simon at sequanux.org]
Sent: Thursday, October 21, 2010 9:45 AM
To: Lennert Buytenhek; Nicolas Pitre
Cc: linux-arm-kernel at lists.infradead.org; Benoit Canet; Saeed Bishara; Simon Guinot
Subject: [PATCH 1/2] [ARM] Kirkwood: enhance TLCK detectionFrom: Simon Guinot <[email protected]>
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 <[email protected]>---
arch/arm/mach-kirkwood/common.c| 7 +++----1 files changed, 3 insertions(+), 4 deletions(-)arch/arm/mach-kirkwood/common.c +0
-0@@ -854,10 +854,9 @@ int __init kirkwood_find_tclk(void)kirkwood_pcie_id (&dev, &rev);
Quoted 8 lines
arch/arm/mach-kirkwood/common.c int __init kirkwood_find_tclk(void) · line 859
Quoted 7 lines
arch/arm/mach-kirkwood/common.c +3
-4-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 ;The flow is ok, but the code doesn't look correct, the & precedence is higher thatn >>.
Sorry for missing that. The compiler optimize in the way with and without parenthesis.
Thanks,
Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20101021/d82303ea/attachment.sig>
PATCH v2 1/2 Kirkwood: enhance TCLK detection
In reply to Lennert BuytenhekFrom: Simon Guinot <[email protected]>
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.
--- arch/arm/mach-kirkwood/common.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
arch/arm/mach-kirkwood/common.c +3 -4
@@ -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 ; }
Signature · 1 line
1.6.3.1
PATCH v2 1/2 Kirkwood: enhance TCLK detection
Hi Lennert and Nicolas,
This patch is my best attempt to fix the tclk detection. Unfortunately, I can't test it on machines I don't have.
Let me know if I can do something else.
Simon
Quoted 38 lines · Simon Guinot
From: Simon Guinot <[email protected]>
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 <[email protected]>--- arch/arm/mach-kirkwood/common.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)arch/arm/mach-kirkwood/common.c +3
-4@@ -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 ; }Signature · 7 lines
1.6.3.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20101021/40fea5a5/attachment.sig>
PATCH v2 2/2 Kirkwood: fix timer initialization for LaCie boards
In reply to Simon GuinotFrom: Simon Guinot <[email protected]>
--- arch/arm/mach-kirkwood/d2net_v2-setup.c | 2 +- arch/arm/mach-kirkwood/lacie_v2-common.c | 14 -------------- arch/arm/mach-kirkwood/lacie_v2-common.h | 2 -- arch/arm/mach-kirkwood/netspace_v2-setup.c | 6 +++--- arch/arm/mach-kirkwood/netxbig_v2-setup.c | 4 ++-- 5 files changed, 6 insertions(+), 22 deletions(-)
arch/arm/mach-kirkwood/d2net_v2-setup.c +1 -1
@@ -227,5 +227,5 @@ MACHINE_START(D2NET_V2, "LaCie d2 Network v2") .init_machine = d2net_v2_init, .map_io = kirkwood_map_io, .init_irq = kirkwood_init_irq, - .timer = &lacie_v2_timer, + .timer = &kirkwood_timer,MACHINE_END
arch/arm/mach-kirkwood/lacie_v2-common.c +0 -14
@@ -111,17 +111,3 @@ void __init lacie_v2_hdd_power_init(int hdd_num)pr_err ("Failed to power up HDD%d\n" , i +1 ); } } - -/***************************************************************************** -* Timer -****************************************************************************/ - -static void lacie_v2_timer_init (void ) -{ - kirkwood_tclk =166666667 ; -orion_time_init (IRQ_KIRKWOOD_BRIDGE , kirkwood_tclk); -} - -struct sys_timer lacie_v2_timer = { - .init = lacie_v2_timer_init, -};
arch/arm/mach-kirkwood/lacie_v2-common.h +0 -2
@@ -13,6 +13,4 @@ void lacie_v2_register_flash(void);void lacie_v2_register_i2c_devices (void );void lacie_v2_hdd_power_init (int hdd_num); -extern struct sys_timer lacie_v2_timer; -#endif
arch/arm/mach-kirkwood/netspace_v2-setup.c +3 -3
@@ -221,7 +221,7 @@ MACHINE_START(NETSPACE_V2, "LaCie Network Space v2") .init_machine = netspace_v2_init, .map_io = kirkwood_map_io, .init_irq = kirkwood_init_irq, - .timer = &lacie_v2_timer, + .timer = &kirkwood_timer, MACHINE_END#endif
@@ -233,7 +233,7 @@ MACHINE_START(INETSPACE_V2, "LaCie Internet Space v2") .init_machine = netspace_v2_init, .map_io = kirkwood_map_io, .init_irq = kirkwood_init_irq, - .timer = &lacie_v2_timer, + .timer = &kirkwood_timer, MACHINE_END#endif
@@ -245,6 +245,6 @@ MACHINE_START(NETSPACE_MAX_V2, "LaCie Network Space Max v2") .init_machine = netspace_v2_init, .map_io = kirkwood_map_io, .init_irq = kirkwood_init_irq, - .timer = &lacie_v2_timer, + .timer = &kirkwood_timer, MACHINE_END#endif
arch/arm/mach-kirkwood/netxbig_v2-setup.c +2 -2
@@ -405,7 +405,7 @@ MACHINE_START(NET2BIG_V2, "LaCie 2Big Network v2") .init_machine = netxbig_v2_init, .map_io = kirkwood_map_io, .init_irq = kirkwood_init_irq, - .timer = &lacie_v2_timer, + .timer = &kirkwood_timer, MACHINE_END#endif
@@ -417,6 +417,6 @@ MACHINE_START(NET5BIG_V2, "LaCie 5Big Network v2") .init_machine = netxbig_v2_init, .map_io = kirkwood_map_io, .init_irq = kirkwood_init_irq, - .timer = &lacie_v2_timer, + .timer = &kirkwood_timer, MACHINE_END#endif
Signature · 1 line
1.6.3.1
PATCH v2 1/2 Kirkwood: enhance TCLK detection
In reply to Simon GuinotQuoted 8 lines · Simon Guinot
From: Simon Guinot <[email protected]>
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 <[email protected]>