public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
Cc: Andrew Lunn <andrew@lunn.ch>, ecos-discuss@ecos.sourceware.org
Subject: [ECOS] Re: LPC2xxx patch for support of vectored interrupt controller
Date: Wed, 22 Aug 2007 10:06:00 -0000	[thread overview]
Message-ID: <20070822100626.GJ31057@lunn.ch> (raw)
In-Reply-To: <20070822095228.GD2126@grumpf.hope-2000.org>

On Wed, Aug 22, 2007 at 11:52:28AM +0200, Hans Rosenfeld wrote:
> On Wed, Aug 22, 2007 at 11:18:03AM +0200, Andrew Lunn wrote:
> > I think much better way to do this is:
> > 
> >             cdl_option CYGNUM_KERNEL_INTR_TEST_PRIO_A {
> >                 display       "interrupt priority used by intr0/kintr0 test"
> >                 flavor        data
> >                 default_value 0
> >                 legal_values  0 to 16
> >                 description   "The intr0 and kintr0 tests create several interrupts.
> >                                This option selects the interrupt priority to be used
> >                                for these interrupts."
> >             }
> > 
> >             cdl_option CYGNUM_KERNEL_INTR_TEST_PRIO_B {
> >                 display       "interrupt priority used by intr0/kintr0 test"
> >                 flavor        data
> >                 default_value 1
> >                 legal_values  0 to 16
> >                 description   "The intr0 and kintr0 tests create several interrupts.
> >                                This option selects the interrupt priority to be used
> >                                for these interrupts."
> >             }
> > 
> > and then in the LPC2XXX hal statements like
> > 
> >     requires { is_active(CYGNUM_KERNEL_INTR_TEST_PRIO_A) 
> >                implies { CYGNUM_KERNEL_INTR_TEST_PRIO_A == 16 } }
> > 
> >     requires { is_active(CYGNUM_KERNEL_INTR_TEST_PRIO_B) 
> >                implies { CYGNUM_KERNEL_INTR_TEST_PRIO_B == 16 } }
> > 
> > It makes the test more flexible. You can how for example use vectors 5
> > and 15 which was not possible before.
> 
> Looks good, but I'm unsure about PRIO_A and PRIO_B vs. PRIO_0 and
> PRIO_1. I used PRIO_0 where the test used a hardcoded 0, and PRIO_1
> where test used a hardcoded 1 (twice). How will PRIO_A and PRIO_B map to
> this?

I wanted to avoid _0 and _1 because it may make reader of the code
think they have the value of 0 and 1! If a reading is interested in
the value, using A and B makes the reader go looking for the actual
value, rather than assume they are 0 and 1. 

In the code i would replace 0 with CYGNUM_KERNEL_INTR_TEST_PRIO_A and
1 with CYGNUM_KERNEL_INTR_TEST_PRIO_B, since the defaults set them to
these values.

  Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

  reply	other threads:[~2007-08-22 10:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <21907044.603801184047861289.JavaMail.servlet@kundenserver>
     [not found] ` <20070817140209.GA26081@grumpf.hope-2000.org>
     [not found]   ` <20070817171322.GB26081@grumpf.hope-2000.org>
     [not found]     ` <20070820151336.GA1125@grumpf.hope-2000.org>
     [not found]       ` <20070822082451.GF31057@lunn.ch>
     [not found]         ` <20070822084026.GA2126@grumpf.hope-2000.org>
2007-08-22  9:18           ` Andrew Lunn
2007-08-22  9:53             ` Hans Rosenfeld
2007-08-22 10:06               ` Andrew Lunn [this message]
2007-08-22 10:52                 ` Hans Rosenfeld
2007-08-22 11:12                   ` Andrew Lunn
2007-08-22 13:47                     ` Hans Rosenfeld
2007-08-22 18:14                       ` [ECOS] Getting started with ecos Scott Moore
2007-08-22 18:23                         ` Andrew Lunn
2007-08-22 18:49                           ` Scott Moore
2007-08-22 19:32                             ` Andrew Lunn
2007-08-22 19:41                               ` Scott Moore

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=20070822100626.GJ31057@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=rosenfeld@grumpf.hope-2000.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).