From: Ricardo Scop <scop@digitel•com.br>
To: gopi@india•tejasnetworks.com, linuxppc-embedded@lists•linuxppc.org
Subject: Re: Unable to write to SIMASK
Date: Wed, 20 Feb 2002 18:27:52 -0300 [thread overview]
Message-ID: <02022018275201.01017@scop.digitel.com.br> (raw)
In-Reply-To: <Pine.LNX.4.21.0202210030560.24106-100000@tn100build.india.tejasnetworks.com>
On Wednesday 20 February 2002 21:53, gopi@india•tejasnetworks.com wrote:
> hi..
>
> We have an MPC860T based custom board.
>
> We wanted to control interrupt on one of the irqs by writing to SIMASK
> register using a small driver with two ioctls which will will do
> the following:
>
> // WRITE_MASK_IOCTL
> simask_write_ioctl(mask) {
> cli();
better use save_flags(flags); cli();
> (volatile unsigned int *)(IMMR + simask_offset) = mask;
You're missing a * operator here (don't know about your actual source code,
though...)
> written_value = *(volatile unsigned int *)(IMMR + simask_offset);
> sti();
better use restore_flags(flags)... and flags must be defined as an unsigned
long.
> printk (written_value);
> }
>
> // READ_MASK_IOCTL
> simask_read_ioctl() {
> cli(); // Not really needed..
> read_value = *(volatile unsigned int *)(IMMR + simask_offset);
> sti();
> printk (read_value);
> }
>
>
<snip>
HTH,
R. Scop
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2002-02-20 21:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-30 12:14 kernel hang when machine_restart called from isr gopi
2002-01-31 20:58 ` why is tty->pgrp set to -1 for console? gopi
2002-01-31 17:09 ` Daniel Jacobowitz
2002-01-31 21:34 ` Scott Anderson
2002-02-01 19:12 ` gopi
2002-02-21 0:53 ` Unable to write to SIMASK gopi
2002-02-20 21:27 ` Ricardo Scop [this message]
2002-02-21 17:34 ` gopi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=02022018275201.01017@scop.digitel.com.br \
--to=scop@digitel$(echo .)com.br \
--cc=gopi@india$(echo .)tejasnetworks.com \
--cc=linuxppc-embedded@lists$(echo .)linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox