From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/4] Added initial support for PRTLVT2-based boards.
Date: Fri, 20 Aug 2010 11:30:34 +0200 [thread overview]
Message-ID: <4C6E4B3A.5040207@denx.de> (raw)
In-Reply-To: <20100819130354.D7D17157D71@gemini.denx.de>
Wolfgang Denk wrote:
Hi Wolfgang,
>> + pmic_reg_write(REG_POWER_MISC, GPO4ADIN);
>
> It would really be great if someone cold clean up this mess in
> "include/fsl_pmic.h"
>
> Using an "enum" for register definitions is just horrible.
>
> I am well aware that you did not introduce this code, but reading this
> feels is if my nails are rolling up.
Well, that's me ! I am aware it sounds crazy. However, the registers on
the pmic are not memory mapped and the access is done via SPI.
The pmic manuals (MC13783, MC13892,) describe the SPI frame (ok, frame
is probably a big word..it is only a 32 bit) and one of the field is the
internal register number.
Using a structure looks like to me even stranger. We have to use some
kind of offsetof() to get the index number back and put it inside the
SPI data.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
next prev parent reply other threads:[~2010-08-20 9:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-19 11:42 [U-Boot] [PATCH 0/4] Add support for PRTLVT2 boards David Jander
2010-08-19 11:42 ` [U-Boot] [PATCH 1/4] MX51: iomux: Added support for mxc_iomux_set_input() David Jander
2010-08-19 11:42 ` [U-Boot] [PATCH 2/4] MX51: Added missing pin definition David Jander
2010-08-19 11:42 ` [U-Boot] [PATCH 3/4] mc13982 driver: corrected/added some definitions according to latest user-manual David Jander
2010-08-19 11:42 ` [U-Boot] [PATCH 4/4] Added initial support for PRTLVT2-based boards David Jander
2010-08-19 13:03 ` Wolfgang Denk
2010-08-19 15:55 ` David Jander
2010-08-20 9:30 ` Stefano Babic [this message]
2010-08-20 9:51 ` Stefano Babic
2010-08-20 10:22 ` David Jander
2010-08-20 10:43 ` Stefano Babic
2010-08-20 8:12 ` [U-Boot] [PATCH 2/4] MX51: Added missing pin definition Stefano Babic
2010-08-20 8:41 ` David Jander
2010-08-20 8:10 ` [U-Boot] [PATCH 1/4] MX51: iomux: Added support for mxc_iomux_set_input() Stefano Babic
2010-08-20 8:40 ` [U-Boot] [PATCH 1/4] MX51: iomux: Added support for mxc_iomux_set_input () David Jander
2010-08-20 9:08 ` [U-Boot] [PATCH 1/4] MX51: iomux: Added support for mxc_iomux_set_input() Stefano Babic
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=4C6E4B3A.5040207@denx.de \
--to=sbabic@denx.de \
--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