public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/5] Tegra2: Add bitfield access macros
Date: Tue, 7 Jun 2011 11:06:19 -0400	[thread overview]
Message-ID: <201106071106.20421.vapier@gentoo.org> (raw)
In-Reply-To: <20110607100623.01E351EA347@gemini.denx.de>

On Tuesday, June 07, 2011 06:06:23 Wolfgang Denk wrote:
> 	#define FIELD_VAL(x)	(x << 16)
> 	#define FIELD_MASK	FIELD_VAL(0xF)

this is basically what we do in the blackfin port.  we keep most of the logic 
in the defines so that we can use the simpler i/o logic without too much 
hassle.

the only additional thing we do is add a define for the shift in case we need 
to do something the macros cant provide.
#define FIELD_SHIFT	16
#define FIELD_VAL(x)	((x) << FIELD_SHIFT)
#define FIELD_MASK	FIELD_FAL(0xF)
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110607/464a9d1d/attachment.pgp 

  reply	other threads:[~2011-06-07 15:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-02  0:14 [U-Boot] [PATCH 0/5] Add bitfields, clock and pinmux functions to simplify code Simon Glass
2011-06-02  0:14 ` [U-Boot] [PATCH 1/5] Tegra2: Add bitfield access macros Simon Glass
2011-06-06 18:50   ` Wolfgang Denk
2011-06-07  0:38     ` Simon Glass
2011-06-07  6:28       ` Wolfgang Denk
2011-06-07  6:46         ` Simon Glass
2011-06-07 10:06           ` Wolfgang Denk
2011-06-07 15:06             ` Mike Frysinger [this message]
2011-06-07 15:12             ` Simon Glass
2011-06-07 15:51               ` Wolfgang Denk
2011-06-07 20:00               ` Wolfgang Denk
2011-06-08  7:37                 ` Detlev Zundel
2011-06-08 16:10                 ` Simon Glass
2011-06-08 19:21                   ` Wolfgang Denk
2011-06-08 19:48                     ` Simon Glass
2011-06-08 20:46                       ` Wolfgang Denk
2011-06-02  0:14 ` [U-Boot] [PATCH 2/5] Tegra2: Add microsecond timer functions Simon Glass
2011-06-02  0:14 ` [U-Boot] [PATCH 3/5] Tegra2: Add more clock support Simon Glass
2011-06-02  0:14 ` [U-Boot] [PATCH 4/5] Tegra2: add additional pin multiplexing features Simon Glass
2011-06-02  0:14 ` [U-Boot] [PATCH 5/5] Tegra2: Use clock and pinmux functions to simplify code Simon Glass
2011-06-06 18:59 ` [U-Boot] [PATCH 0/5] Add bitfields, " Wolfgang Denk

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=201106071106.20421.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=u-boot@lists.denx.de \
    /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