tqm5200: Correct comment and code in post_hotkeys_pressed.
PATCH 1/1 tqm5200: Correct comment and code in post_hotkeys_pressed.
This fixes the code and the comment according to the original intent of doing an intensive memory test when PSC6_3 is pulled low on the STK52xx. Notably PORT_CONFIG will be overridden with this correct code now, so beware.
The original code only worked by coincidence depending on the PORT_CONFIG setting from the header file. The new code was tested to ensure that the (undocumented) memory test still works on the STK52x.
--- board/tqc/tqm5200/tqm5200.c | 6 ++---- include/configs/TQM5200.h | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-)
board/tqc/tqm5200/tqm5200.c +2 -4
@@ -358,11 +358,9 @@ int post_hotkeys_pressed(void) gpio = (struct mpc5xxx_gpio *)MPC5XXX_GPIO ;/* -* Configure PSC6_1 and PSC6_3 as GPIO. PSC6 then couldn't be used in -* CODEC or UART mode. Consumer IrDA should still be possible. +* Configure PSC6_0 through PSC6_3 as GPIO. */ - gpio->port_config &= ~(0x07000000 ); - gpio->port_config |=0x03000000 ; + gpio->port_config &= ~(0x00700000 );/* Enable GPIO for GPIO_IRDA_1 (IR_USB_CLK pin) = PSC6_3 */ gpio->simple_gpioe |=0x20000000 ;
include/configs/TQM5200.h +2 -0
@@ -566,6 +566,8 @@* 101 -> use PSC6 as UART. Pins PSC6_0 to PSC6_3 are used. * Extended POST test is not available. * Use for STK52xx, FO300 and CAM5200 boards. +* WARNING: When the extended POST is enabled, these bits will +* be overridden by this code as GPIOs! * use PCI_DIS: Bit 16 (mask 0x00008000): * 1 -> disable PCI controller (on CAM5200 board). * use USB: Bits 18-19 (mask 0x00003000):
Signature · 1 line
1.6.0.6
PATCH 1/1 tqm5200: Correct comment and code in post_hotkeys_pressed.
Dear Detlev Zundel,
Quoted 9 lines · In message <[email protected]> you wrote:
This fixes the code and the comment according to the original intent of doing an intensive memory test when
PSC6_3is pulled low on the STK52xx. NotablyPORT_CONFIGwill be overridden with this correct code now, so beware.The original code only worked by coincidence depending on the
PORT_CONFIGsetting from the header file. The new code was tested to ensure that the (undocumented) memory test still works on the STK52x.
Quoted 6 lines
Signed-off-by Detlev Zundel <[email protected]>CC Martin Krause <[email protected]>--- board/tqc/tqm5200/tqm5200.c | 6 ++---- include/configs/TQM5200.h | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-)
Applied (after WS cleanup). Thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de A woman should have compassion. -- Kirk, "Catspaw", stardate 3018.2
PATCH 1/1 tqm5200: Correct comment and code in post_hotkeys_pressed.
In reply to Detlev ZundelHi Detlev,
Detlev Zundel wrote on Wednesday, October 07, 2009 4:38 PM:
Quoted 45 lines
This fixes the code and the comment according to the original intent of doing an intensive memory test when
PSC6_3is pulled low on the STK52xx. NotablyPORT_CONFIGwill be overridden with this correct code now,
so beware.The original code only worked by coincidence depending on the
PORT_CONFIGsetting from the header file. The new code was tested to ensure that the (undocumented) memory test still works on the STK52x.Signed-off-by Detlev Zundel <[email protected]>CC Martin Krause <[email protected]>--- board/tqc/tqm5200/tqm5200.c | 6 ++---- include/configs/TQM5200.h | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-)board/tqc/tqm5200/tqm5200.c +0
-1@@ -358,11 +358,9 @@ int post_hotkeys_pressed(void) gpio = (struct mpc5xxx_gpio *)MPC5XXX_GPIO ;/* -* Configure PSC6_1 and PSC6_3 as GPIO. PSC6 then couldn't be used in
board/tqc/tqm5200/tqm5200.c +2
-3-* CODEC or UART mode. Consumer IrDA should still be possible. +* Configure PSC6_0 through PSC6_3 as GPIO. */ - gpio->port_config &= ~(0x07000000 ); - gpio->port_config |=0x03000000 ; + gpio->port_config &= ~(0x00700000 );/* Enable GPIO for GPIO_IRDA_1 (IR_USB_CLK pin) = PSC6_3 */ gpio->simple_gpioe |=0x20000000 ;include/configs/TQM5200.h +1
-0@@ -566,6 +566,8 @@* 101 -> use PSC6 as UART. Pins PSC6_0 to PSC6_3 are used. * Extended POST test is not available. * Use for STK52xx, FO300 and CAM5200 boards. +* WARNING: When the extended POST is enabled, these
Quoted 5 lines
bits will + * be overridden by this code as
GPIOs!
* usePCI_DIS: Bit 16 (mask0x00008000):
* 1 -> disable PCI controller (on CAM5200 board).
* use USB: Bits 18-19 (mask0x00003000):
Thanks!
Best Regards,
Martin