From: Peter Tyser <ptyser@xes-inc.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 02/16] FSL DDR: Rewrite the FSL mpc8xxx DDR controller setup code.
Date: Fri, 29 Aug 2008 17:16:28 -0500 [thread overview]
Message-ID: <1220048188.11226.269.camel@localhost.localdomain> (raw)
In-Reply-To: <1219274578-30322-2-git-send-email-galak@kernel.crashing.org>
Hello,
[snip]
> +
> +/* DDR SDRAM control configuration 2 (DDR_SDRAM_CFG_2) */
> +static void set_ddr_sdram_cfg_2(fsl_memctl_config_regs_t *ddr,
> + const memctl_options_t *popts)
> +{
> + unsigned int frc_sr = 0; /* Force self refresh */
> + unsigned int sr_ie = 0; /* Self-refresh interrupt enable */
> + unsigned int dll_rst_dis; /* DLL reset disable */
> + unsigned int dqs_cfg; /* DQS configuration */
> + unsigned int odt_cfg; /* ODT configuration */
> + unsigned int num_pr; /* Number of posted refreshes */
> + unsigned int obc_cfg; /* On-The-Fly Burst Chop Cfg */
> + unsigned int ap_en; /* Address Parity Enable */
> + unsigned int d_init; /* DRAM data initialization */
> + unsigned int rcw_en = 0; /* Register Control Word Enable */
> + unsigned int md_en = 0; /* Mirrored DIMM Enable */
> +
> + dll_rst_dis = 1; /* Make this configurable */
> + dqs_cfg = popts->DQS_config;
> + if (popts->cs_local_opts[0].odt_rd_cfg
> + || popts->cs_local_opts[0].odt_wr_cfg) {
> + /* FIXME */
> + odt_cfg = 2;
> + } else {
> + odt_cfg = 0;
> + }
> +
> + num_pr = 1; /* Make this configurable */
> +
> + /*
> + * 8572 manual says
> + * {TIMING_CFG_1[PRETOACT]
> + * + [DDR_SDRAM_CFG_2[NUM_PR]
> + * * ({EXT_REFREC || REFREC} + 8 + 2)]}
> + * << DDR_SDRAM_INTERVAL[REFINT]
> + */
> +
> + obc_cfg = 0; /* Make this configurable? */
> + ap_en = 0; /* Make this configurable? */
> +
> +#if defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)
> + /* Use the DDR controller to auto initialize memory. */
> + d_init = 1;
> + ddr->ddr_data_init = CONFIG_MEM_INIT_VALUE;
> + debug("DDR: ddr_data_init = 0x%08x\n", ddr->ddr_data_init);
> +#else
> + /* Memory will be initialized via DMA, or not at all. */
> + d_init = 0;
> +#endif
> +
I'm using the current head (33aa4eac66b71c797bbc13b3afe432a2132947d4) on
a mpc8572-based board. It uses DDR2 and has support for ECC. While
enabling ECC support, I noticed that the "old"
CONFIG_ECC_INIT_VIA_DDRCONTROLLER define is still being used to enable
memory initialization on bootup while a new ECC_init_using_memctl field
in the memctl_options_s structure is also present.
Currently it looks like ECC_init_using_memctl doesn't do anything and is
only referenced in one location below:
> + /* Pick ECC modes */
> +#ifdef CONFIG_DDR_ECC
> + popts->ECC_mode = 1; /* 0 = disabled, 1 = enabled */
> +#else
> + popts->ECC_mode = 0; /* 0 = disabled, 1 = enabled */
> +#endif
> + popts->ECC_init_using_memctl = 1; /* 0 = use DMA, 1 = use memctl */
The intended functionality of CONFIG_ECC_INIT_VIA_DDRCONTROLLER and
ECC_init_using_memctl seem to be the same, but only one of them is being
used, and they currently are unrelated which is a bit confusing.
Should the ECC_init_using_memctl field be removed, or is the intention
to replace CONFIG_ECC_INIT_VIA_DDRCONTROLLER functionality with
ECC_init_using_memctl as some point?
Thanks for any insight,
Peter
next prev parent reply other threads:[~2008-08-29 22:16 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-20 23:22 [U-Boot] [PATCH v3 01/16] Add proper SPD definitions for DDR1/2/3 Kumar Gala
2008-08-20 23:22 ` [U-Boot] [PATCH v3 02/16] FSL DDR: Rewrite the FSL mpc8xxx DDR controller setup code Kumar Gala
2008-08-20 23:22 ` [U-Boot] [PATCH v3 03/16] FSL DDR: Add DDR1 support Kumar Gala
2008-08-20 23:22 ` [U-Boot] [PATCH v3 04/16] FSL DDR: Add DDR2 support Kumar Gala
2008-08-20 23:22 ` [U-Boot] [PATCH v3 05/16] FSL DDR: Add interactive DDR config support Kumar Gala
2008-08-20 23:22 ` [U-Boot] [PATCH v3 06/16] FSL DDR: Provide a generic fsl_ddr_sdram_set_lawbar() Kumar Gala
2008-08-20 23:22 ` [U-Boot] [PATCH v3 07/16] FSL DDR: Add e500 TLB helper for DDR code Kumar Gala
2008-08-20 23:22 ` [U-Boot] [PATCH v3 08/16] FSL DDR: Convert MPC8641HPCN to new " Kumar Gala
2008-08-20 23:22 ` [U-Boot] [PATCH v3 09/16] FSL DDR: Convert MPC8610HPCD " Kumar Gala
2008-08-20 23:22 ` [U-Boot] [PATCH v3 10/16] FSL DDR: Convert MPC8544DS " Kumar Gala
2008-08-20 23:22 ` [U-Boot] [PATCH v3 11/16] FSL DDR: Convert MPC8540ADS " Kumar Gala
2008-08-20 23:22 ` [U-Boot] [PATCH v3 12/16] FSL DDR: Convert MPC8560ADS " Kumar Gala
2008-08-20 23:22 ` [U-Boot] [PATCH v3 13/16] FSL DDR: Convert MPC8555ADS " Kumar Gala
2008-08-20 23:22 ` [U-Boot] [PATCH v3 14/16] FSL DDR: Convert MPC8541CDS " Kumar Gala
2008-08-20 23:22 ` [U-Boot] [PATCH v3 15/16] FSL DDR: Convert MPC8568MDS " Kumar Gala
2008-08-20 23:22 ` [U-Boot] [PATCH v3 16/16] FSL DDR: Convert MPC8548CDS " Kumar Gala
2008-08-26 23:13 ` Wolfgang Denk
2008-08-26 23:13 ` [U-Boot] [PATCH v3 15/16] FSL DDR: Convert MPC8568MDS " Wolfgang Denk
2008-08-26 23:13 ` [U-Boot] [PATCH v3 14/16] FSL DDR: Convert MPC8541CDS " Wolfgang Denk
2008-08-26 23:12 ` [U-Boot] [PATCH v3 13/16] FSL DDR: Convert MPC8555ADS " Wolfgang Denk
2008-08-26 23:12 ` [U-Boot] [PATCH v3 12/16] FSL DDR: Convert MPC8560ADS " Wolfgang Denk
2008-08-26 23:12 ` [U-Boot] [PATCH v3 11/16] FSL DDR: Convert MPC8540ADS " Wolfgang Denk
2008-08-26 23:11 ` [U-Boot] [PATCH v3 10/16] FSL DDR: Convert MPC8544DS " Wolfgang Denk
2008-08-26 23:11 ` [U-Boot] [PATCH v3 09/16] FSL DDR: Convert MPC8610HPCD " Wolfgang Denk
2008-08-26 23:11 ` [U-Boot] [PATCH v3 08/16] FSL DDR: Convert MPC8641HPCN " Wolfgang Denk
2008-08-26 23:10 ` [U-Boot] [PATCH v3 07/16] FSL DDR: Add e500 TLB helper for " Wolfgang Denk
2008-08-26 23:10 ` [U-Boot] [PATCH v3 06/16] FSL DDR: Provide a generic fsl_ddr_sdram_set_lawbar() Wolfgang Denk
2008-08-26 23:09 ` [U-Boot] [PATCH v3 05/16] FSL DDR: Add interactive DDR config support Wolfgang Denk
2008-08-26 23:08 ` [U-Boot] [PATCH v3 04/16] FSL DDR: Add DDR2 support Wolfgang Denk
2008-08-26 23:08 ` [U-Boot] [PATCH v3 03/16] FSL DDR: Add DDR1 support Wolfgang Denk
2008-08-26 23:08 ` [U-Boot] [PATCH v3 02/16] FSL DDR: Rewrite the FSL mpc8xxx DDR controller setup code Wolfgang Denk
2008-08-29 22:16 ` Peter Tyser [this message]
2008-08-29 23:51 ` Kumar Gala
2008-08-26 23:07 ` [U-Boot] [PATCH v3 01/16] Add proper SPD definitions for DDR1/2/3 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=1220048188.11226.269.camel@localhost.localdomain \
--to=ptyser@xes-inc.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