* 8270 & Watchdog - early start
@ 2007-09-20 8:19 Matias Sundman
2007-09-20 8:54 ` Laurent Pinchart
2007-09-20 10:06 ` 8270 & Watchdog - early start - II Matias Sundman
0 siblings, 2 replies; 6+ messages in thread
From: Matias Sundman @ 2007-09-20 8:19 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 775 bytes --]
Hi,
I have a custom MPC8270 board running Linux and u-boot.
Now, I enabled the watchdog on the 8270 and need to kick it regularly by
writing ;
0x556c
0xaa39
To the internal register @ 0x0x1000e.
When I am coming out from head.S to start_kernel I was thinking of
kicking
it a couple times "manually"
before a timer interrupt is inserted which will take care of it until a
"superdaemon" is taking over.
I tried to serve the register as follows;
*((volatile unsigned int*)(0xf001000e))=0x556c;
*((volatile unsigned int*)(0xf001000e))=0xaa39;
But it does not take effect. I thought that since u-boot had set up the
IMMR
to 0xf000'0000 I could
directly write to the register as above.
Any clues why this does not work?
Thx // Matias
[-- Attachment #2: Type: text/html, Size: 2068 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 8270 & Watchdog - early start
2007-09-20 8:19 8270 & Watchdog - early start Matias Sundman
@ 2007-09-20 8:54 ` Laurent Pinchart
2007-09-20 10:06 ` 8270 & Watchdog - early start - II Matias Sundman
1 sibling, 0 replies; 6+ messages in thread
From: Laurent Pinchart @ 2007-09-20 8:54 UTC (permalink / raw)
To: linuxppc-embedded
Hi Matias,
On Thursday 20 September 2007 10:19, Matias Sundman wrote:
> Hi,
> I have a custom MPC8270 board running Linux and u-boot.
> Now, I enabled the watchdog on the 8270 and need to kick it regularly by
> writing ;
>
> 0x556c
> 0xaa39
>
> To the internal register @ 0x0x1000e.
>
> When I am coming out from head.S to start_kernel I was thinking of
> kicking it a couple times "manually" before a timer interrupt is inserted
> which will take care of it until a "superdaemon" is taking over.
>
> I tried to serve the register as follows;
>
> *((volatile unsigned int*)(0xf001000e))=3D0x556c;
> *((volatile unsigned int*)(0xf001000e))=3D0xaa39;
>
> But it does not take effect. I thought that since u-boot had set up the
> IMMR to 0xf000'0000 I could directly write to the register as above.
>
> Any clues why this does not work?
The Software Service Register (SWSR) is 16-bit wide. Unsigned int on the 82=
70=20
is 32-bit wide.
You must not reference physical addresses directly after the MMU has been=20
turned on. Use ioremap/iounmap to map/unmaap the CPM registers. If you're=20
using ARCH=3Dppc, you can also use the global CPM mapping cpm2_immr.
Use the out_* macros/functions to write to I/O space.
out_be16(&cpm2_immr->im_siu_conf.siu_82xx.sc_swsr, 0x556c);
out_be16(&cpm2_immr->im_siu_conf.siu_82xx.sc_swsr, 0xaa39);
Best regards,
=2D-=20
Laurent Pinchart
CSE Semaphore Belgium
Chauss=C3=A9e de Bruxelles, 732A
B-1410 Waterloo
Belgium
T +32 (2) 387 42 59
=46 +32 (2) 387 42 75
^ permalink raw reply [flat|nested] 6+ messages in thread
* 8270 & Watchdog - early start - II
2007-09-20 8:19 8270 & Watchdog - early start Matias Sundman
2007-09-20 8:54 ` Laurent Pinchart
@ 2007-09-20 10:06 ` Matias Sundman
2007-09-20 11:22 ` Laurent Pinchart
1 sibling, 1 reply; 6+ messages in thread
From: Matias Sundman @ 2007-09-20 10:06 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1430 bytes --]
Hi Guys,
The Software Service Register (SWSR) is 16-bit wide which Laurent
Pinchart [laurentp@cse-semaphore.com] so nicely pointed out for me.
So it actually works with;
*((volatile unsigned short*)(0xf001000e))=0x556c;
*((volatile unsigned short*)(0xf001000e))=0xaa39;
Thx // Matias
________________________________
From: linuxppc-embedded-bounces+matias.sundman=ericsson.com@ozlabs.org
[mailto:linuxppc-embedded-bounces+matias.sundman=ericsson.com@ozlabs.org
] On Behalf Of Matias Sundman
Sent: den 20 september 2007 10:19
To: linuxppc-embedded@ozlabs.org
Subject: 8270 & Watchdog - early start
Hi,
I have a custom MPC8270 board running Linux and u-boot.
Now, I enabled the watchdog on the 8270 and need to kick it regularly by
writing ;
0x556c
0xaa39
To the internal register @ 0x0x1000e.
When I am coming out from head.S to start_kernel I was thinking of
kicking
it a couple times "manually"
before a timer interrupt is inserted which will take care of it until a
"superdaemon" is taking over.
I tried to serve the register as follows;
*((volatile unsigned int*)(0xf001000e))=0x556c;
*((volatile unsigned int*)(0xf001000e))=0xaa39;
But it does not take effect. I thought that since u-boot had set up the
IMMR
to 0xf000'0000 I could
directly write to the register as above.
Any clues why this does not work?
Thx // Matias
[-- Attachment #2: Type: text/html, Size: 3550 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 8270 & Watchdog - early start - II
2007-09-20 11:22 ` Laurent Pinchart
@ 2007-09-20 11:11 ` samppa
2007-09-20 11:44 ` Laurent Pinchart
0 siblings, 1 reply; 6+ messages in thread
From: samppa @ 2007-09-20 11:11 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: linuxppc-embedded
>>> You still shouldn't use direct access with MMU enabled. Use the global
CPM
> mapping and the I/O access macros.
I understand, but I need to kick on the WDT before "cpm2_immr"
is initialized dur to timing constraints.
Cheers // Matias
> On Thursday 20 September 2007 12:06, Matias Sundman wrote:
>> Hi Guys,
>> The Software Service Register (SWSR) is 16-bit wide which Laurent
>> Pinchart [laurentp@cse-semaphore.com] so nicely pointed out for me.
>> So it actually works with;
>> *((volatile unsigned short*)(0xf001000e))=0x556c;
>> *((volatile unsigned short*)(0xf001000e))=0xaa39;
>
> You still shouldn't use direct access with MMU enabled. Use the global CPM
> mapping and the I/O access macros.
>
> out_be16(&cpm2_immr->im_siu_conf.siu_82xx.sc_swsr, 0x556c);
> out_be16(&cpm2_immr->im_siu_conf.siu_82xx.sc_swsr, 0xaa39);
>
> Best regards,
>
> --
> Laurent Pinchart
> CSE Semaphore Belgium
>
> Chaussée de Bruxelles, 732A
> B-1410 Waterloo
> Belgium
>
> T +32 (2) 387 42 59
> F +32 (2) 387 42 75
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 8270 & Watchdog - early start - II
2007-09-20 10:06 ` 8270 & Watchdog - early start - II Matias Sundman
@ 2007-09-20 11:22 ` Laurent Pinchart
2007-09-20 11:11 ` samppa
0 siblings, 1 reply; 6+ messages in thread
From: Laurent Pinchart @ 2007-09-20 11:22 UTC (permalink / raw)
To: linuxppc-embedded
On Thursday 20 September 2007 12:06, Matias Sundman wrote:
> Hi Guys,
> The Software Service Register (SWSR) is 16-bit wide which Laurent
> Pinchart [laurentp@cse-semaphore.com] so nicely pointed out for me.
> So it actually works with;
> *((volatile unsigned short*)(0xf001000e))=3D0x556c;
> *((volatile unsigned short*)(0xf001000e))=3D0xaa39;
You still shouldn't use direct access with MMU enabled. Use the global CPM=
=20
mapping and the I/O access macros.
out_be16(&cpm2_immr->im_siu_conf.siu_82xx.sc_swsr, 0x556c);
out_be16(&cpm2_immr->im_siu_conf.siu_82xx.sc_swsr, 0xaa39);
Best regards,
=2D-=20
Laurent Pinchart
CSE Semaphore Belgium
Chauss=C3=A9e de Bruxelles, 732A
B-1410 Waterloo
Belgium
T +32 (2) 387 42 59
=46 +32 (2) 387 42 75
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 8270 & Watchdog - early start - II
2007-09-20 11:11 ` samppa
@ 2007-09-20 11:44 ` Laurent Pinchart
0 siblings, 0 replies; 6+ messages in thread
From: Laurent Pinchart @ 2007-09-20 11:44 UTC (permalink / raw)
To: samppa; +Cc: linuxppc-embedded
On Thursday 20 September 2007 13:11, samppa@sundmangroup.com wrote:
> > You still shouldn't use direct access with MMU enabled. Use the global
> > CPM mapping and the I/O access macros.
>
> I understand, but I need to kick on the WDT before "cpm2_immr"
> is initialized dur to timing constraints.
You can then probably get away with the BAT mapping. However you should sti=
ll=20
use the I/O access macro out_be16.
Best regards,
=2D-=20
Laurent Pinchart
CSE Semaphore Belgium
Chauss=E9e de Bruxelles, 732A
B-1410 Waterloo
Belgium
T +32 (2) 387 42 59
=46 +32 (2) 387 42 75
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-09-20 11:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-20 8:19 8270 & Watchdog - early start Matias Sundman
2007-09-20 8:54 ` Laurent Pinchart
2007-09-20 10:06 ` 8270 & Watchdog - early start - II Matias Sundman
2007-09-20 11:22 ` Laurent Pinchart
2007-09-20 11:11 ` samppa
2007-09-20 11:44 ` Laurent Pinchart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).