linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* immap_8260.h: volatile missing in immr definition
@ 2002-09-06 11:49 Hans dot Feldt at uab.ericsson.se
  2002-09-06 14:30 ` Dan Malek
  0 siblings, 1 reply; 2+ messages in thread
From: Hans dot Feldt at uab.ericsson.se @ 2002-09-06 11:49 UTC (permalink / raw)
  To: linuxppc-embedded


I've been trying to get the watchdog timer to run in a 2.4.18 kernel
on our custom 750/8260 board. Finally I realised what was the problem
by disassembling with objdump. Due to the missing volatile declaration,
the dog kicking code

	immr->im_siu_conf.sc_swsr = 0x556c;
	immr->im_siu_conf.sc_swsr = 0xaa39;

gets optimised into this by gcc:
	immr->im_siu_conf.sc_swsr = 0xaa39;

which don't make the dog happy.

Sorry if this is an old issue, I searched for it and couldn't find
anything. The patches for 2.4.18 does not contain this fix.

I don't know how it works but could someone who feel responsible change
the original source please?

Change from: extern immap_t *immr:
to: extern volatile immap_t *immr;

The actual variable declaration in 8260_io/commproc.c should probably
be volatiled to.

The system now boots with a 1.8s watchdog timer!

Cheers,
Hans


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-09-06 14:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-06 11:49 immap_8260.h: volatile missing in immr definition Hans dot Feldt at uab.ericsson.se
2002-09-06 14:30 ` Dan Malek

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).