From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 4/5] ppc: DA923RC: add board support
Date: Thu, 31 Oct 2013 08:48:33 +0100 [thread overview]
Message-ID: <20131031074833.GI24559@pengutronix.de> (raw)
In-Reply-To: <20131030113452.GG26639@ns203013.ovh.net>
On Wed, Oct 30, 2013 at 12:34:52PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > +
> > +static int checkboard(void)
> > +{
> > + void __iomem *lbc = LBC_BASE_ADDR;
> > + void __iomem *ecm = IOMEM(MPC85xx_ECM_ADDR);
> > + void __iomem *i2c = IOMEM(I2C1_BASE_ADDR);
> > + int ret, board_type;
> > + uint8_t id, rev;
> > +
> > + /* Clear LBC error interrupts */
> > + out_be32(lbc + FSL_LBC_LTESR_OFFSET, 0xffffffff);
> > + /* Enable LBC error interrupts */
> > + out_be32(lbc + FSL_LBC_LTEIR_OFFSET, 0xffffffff);
> > + /* Clear ecm errors */
> > + out_be32(ecm + MPC85xx_ECM_EEDR_OFFSET, 0xffffffff);
> > + /* Enable ecm errors */
> > + out_be32(ecm + MPC85xx_ECM_EEER_OFFSET, 0xffffffff);
> > +
> > + fsl_i2c_init(0, 400000, 0x7f);
> > + /* Read board id from offset 0. */
> > + ret = fsl_i2c_read(i2c, 0x3b, 0, 1, &id, sizeof(uint8_t));
> > + fsl_i2c_stop(i2c);
> > +
> > + if (ret == -1) {
> > + /* Enable I2C bus on GBX460. */
> > + out_be16(IOMEM(0xfc010020), 0);
> > + ret = fsl_i2c_read(i2c, 0x3b, 0, 1, &id, sizeof(uint8_t));
> > + fsl_i2c_stop(i2c);
> why you do not simly use the standdard i2c AP?
I think because the machine is still running from SRAM or flash here and
I2C is needed to read out the SPD EEPROM for setting up SDRAM.
> > +
> > +core_initcall(da923rc_board_init_r);
I just wonder that this function is called from initcall context. I
would assume the initcalls start running from SDRAM. I wonder how this
works.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-10-31 7:48 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-30 10:22 [PATCH v2 0/5] GEIP DA923RC board support Renaud Barbier
2013-10-30 10:22 ` [PATCH 1/5] ppc: mpc85xx: mpc8544 support Renaud Barbier
2013-10-30 10:22 ` [PATCH 2/5] ppc: mpc85xx: define Ethernet port count Renaud Barbier
2013-10-30 10:22 ` [PATCH 3/5] ppc: mpc85xx: enable DDR driver Renaud Barbier
2013-10-30 10:22 ` [PATCH 4/5] ppc: DA923RC: add board support Renaud Barbier
2013-10-30 11:34 ` Jean-Christophe PLAGNIOL-VILLARD
2013-10-31 7:48 ` Sascha Hauer [this message]
2013-10-31 13:15 ` Renaud Barbier
2013-10-31 20:10 ` Renaud Barbier
2013-11-01 11:58 ` Sascha Hauer
2013-11-01 12:56 ` Renaud Barbier
2013-11-01 13:02 ` Renaud Barbier
2013-11-01 15:03 ` Renaud Barbier
2013-11-01 20:28 ` Sascha Hauer
2013-11-04 18:06 ` Renaud Barbier
2013-11-05 7:35 ` Sascha Hauer
2013-10-31 14:41 ` Renaud Barbier
2013-10-31 16:01 ` Jean-Christophe PLAGNIOL-VILLARD
2013-10-31 18:59 ` Renaud Barbier
2013-10-30 10:22 ` [PATCH 5/5] ppc: mpc85xx: build directives Renaud Barbier
-- strict thread matches above, loose matches on Subject: below --
2013-11-05 15:36 [PATCH v3 0/5] GEIP DA923RC board support Renaud Barbier
2013-11-05 15:36 ` [PATCH 4/5] ppc: DA923RC: add " Renaud Barbier
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=20131031074833.GI24559@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=plagnioj@jcrosoft.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.