public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: York Sun <yorksun@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] powerpc/c29xpcie: Getting DDR SPD image from 16-bit sub-address EEPROM
Date: Fri, 20 Sep 2013 12:03:03 -0700	[thread overview]
Message-ID: <523C9BE7.6050501@freescale.com> (raw)
In-Reply-To: <1377066389-17646-1-git-send-email-Po.Liu@freescale.com>

On 08/20/2013 11:26 PM, Po Liu wrote:
> Currently, there is only one EEPROM on c29xpcie board which isAT24C1024.
> We program the SPD data at beginning of the AT24C1024.But the AT24C1024
> has a 16-bit sub-address mode. This patch is tomake it work when getting
> SPD in a 16-bit sub-address EEPROM.
> 
> Signed-off-by: Po Liu <Po.Liu@freescale.com>
> ---
>  board/freescale/c29xpcie/ddr.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/board/freescale/c29xpcie/ddr.c b/board/freescale/c29xpcie/ddr.c
> index 3337d6c..28f1bd2 100644
> --- a/board/freescale/c29xpcie/ddr.c
> +++ b/board/freescale/c29xpcie/ddr.c
> @@ -84,3 +84,15 @@ void fsl_ddr_board_options(memctl_options_t *popts,
>  		popts->cs_local_opts[i].odt_wr_cfg = FSL_DDR_ODT_CS;
>  	}
>  }
> +
> +void get_spd(generic_spd_eeprom_t *spd, u8 i2c_address)
> +{
> +	int ret = i2c_read(i2c_address, 0, 2, (uchar *)spd,
> +				sizeof(generic_spd_eeprom_t));
> +
> +	if (ret) {
> +		printf("DDR: failed to read SPD from address %u\n",
> +				i2c_address);
> +		memset(spd, 0, sizeof(generic_spd_eeprom_t));
> +	}
> +}
> 

Please fix the compiling warning. You need to include i2c.h, per
internal review.

York

  reply	other threads:[~2013-09-20 19:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-21  6:26 [U-Boot] [PATCH] powerpc/c29xpcie: Getting DDR SPD image from 16-bit sub-address EEPROM Po Liu
2013-09-20 19:03 ` York Sun [this message]
2013-09-22  1:31 ` [U-Boot] [PATCH v2] " Po Liu
2013-09-22 12:55   ` Timur Tabi
2013-11-26  6:34   ` [U-Boot] [PATCH v3] " Po Liu
2013-12-04 23:39     ` York Sun

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=523C9BE7.6050501@freescale.com \
    --to=yorksun@freescale.com \
    --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