From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/4] mx6: add structs for mmdc and ddr iomux registers
Date: Tue, 12 Nov 2013 16:12:20 +0100 [thread overview]
Message-ID: <52824554.3060409@denx.de> (raw)
In-Reply-To: <1383903325.3157.493.camel@edward-x220-laptop>
Hi Edward,
On 08/11/2013 10:35, Edward Lin wrote:
> Signed-off-by: Edward Lin <edward.lin@technexion.com>
> ---
> arch/arm/include/asm/arch-mx6/mx6_ddr_regs.h | 167
> +++++++++++++++++++++++++++
> 1 file changed, 167 insertions(+)
> create mode 100644 arch/arm/include/asm/arch-mx6/mx6_ddr_regs.h
>
> diff --git a/arch/arm/include/asm/arch-mx6/mx6_ddr_regs.h
> b/arch/arm/include/asm/arch-mx6/mx6_ddr_regs.h
> new file mode 100644
> index 0000000..dd5e892
> --- /dev/null
> +++ b/arch/arm/include/asm/arch-mx6/mx6_ddr_regs.h
> @@ -0,0 +1,167 @@
> +/*
> + * Copyright (C) 2013 TechNexion Inc.
> + *
> + * Author: Edward Lin <edward.lin@technexion.com>
> + *
> + * SPDX-License-Identifier: GPL-2.0+
> + */
> +#ifndef __ASM_ARCH_MX6_DDR_REGS_H__
> +#define __ASM_ARCH_MX6_DDR_REGS_H__
> +
> +#define MX6_MMDC_P0_BASE 0x021b0000
> +#define MX6_MMDC_P1_BASE 0x021b4000
> +
> +/* MMDC P0/P1 Registers */
> +struct mmdc_p_regs {
> + u32 mdctl;
> + u32 mdpdc;
> + u32 mdotc;
> + u32 mdcfg0;
> + u32 mdcfg1;
> + u32 mdcfg2;
> + u32 mdmisc;
Ok - if these structure is to make it available for other components, it
should replace the structure esd_mmdc_regs in cpu.c. We cannot have both.
> + u32 res10[25];
> + u32 mpmur0;
> +}__attribute__((packed, aligned(4)));
> +
I am missing why the packed is needed.
> +#define MX6Q_IOM_DDR_BASE 0x020e0500
> +struct mx6q_iomux_ddr_regs {
> + u32 res1[3];
> + u32 dram_sdqs5;
> + u32 dram_dqm5;
> + u32 dram_dqm4;
> + u32 dram_sdqs4;
> + u32 dram_sdqs3;
> + u32 dram_dqm3;
> + u32 dram_sdqs2;
> + u32 dram_dqm2;
> + u32 res2[16];
> + u32 dram_cas;
> + u32 res3[2];
> + u32 dram_ras;
> + u32 dram_reset;
> + u32 res4[2];
> + u32 dram_sdclk_0;
> + u32 dram_sdba2;
> + u32 dram_sdcke0;
> + u32 dram_sdclk_1;
> + u32 dram_sdcke1;
> + u32 dram_sdodt0;
> + u32 dram_sdodt1;
> + u32 res5;
> + u32 dram_sdqs0;
> + u32 dram_dqm0;
> + u32 dram_sdqs1;
> + u32 dram_dqm1;
> + u32 dram_sdqs6;
> + u32 dram_dqm6;
> + u32 dram_sdqs7;
> + u32 dram_dqm7;
> +}__attribute__((packed, aligned(4)));
> +
> +#define MX6Q_IOM_GRP_BASE 0x020e0700
> +struct mx6q_iomux_grp_regs {
> + u32 res1[18];
> + u32 grp_b7ds;
> + u32 grp_addds;
> + u32 grp_ddrmode_ctl;
> + u32 res2;
> + u32 grp_ddrpke;
> + u32 res3[6];
> + u32 grp_ddrmode;
> + u32 res4[3];
> + u32 grp_b0ds;
> + u32 grp_b1ds;
> + u32 grp_ctlds;
> + u32 res5;
> + u32 grp_b2ds;
> + u32 grp_ddr_type;
> + u32 grp_b3ds;
> + u32 grp_b4ds;
> + u32 grp_b5ds;
> + u32 grp_b6ds;
> +}__attribute__((packed, aligned(4)));
> +
> +#define MX6DL_IOM_DDR_BASE 0x020e0400
> +struct mx6dl_iomux_ddr_regs {
> + u32 res1[25];
> + u32 dram_cas;
> + u32 res2[2];
> + u32 dram_dqm0;
> + u32 dram_dqm1;
> + u32 dram_dqm2;
> + u32 dram_dqm3;
> + u32 dram_dqm4;
> + u32 dram_dqm5;
> + u32 dram_dqm6;
> + u32 dram_dqm7;
> + u32 dram_ras;
> + u32 dram_reset;
> + u32 res3[2];
> + u32 dram_sdba2;
> + u32 dram_sdcke0;
> + u32 dram_sdcke1;
> + u32 dram_sdclk_0;
> + u32 dram_sdclk_1;
> + u32 dram_sdodt0;
> + u32 dram_sdodt1;
> + u32 dram_sdqs0;
> + u32 dram_sdqs1;
> + u32 dram_sdqs2;
> + u32 dram_sdqs3;
> + u32 dram_sdqs4;
> + u32 dram_sdqs5;
> + u32 dram_sdqs6;
> + u32 dram_sdqs7;
> +}__attribute__((packed, aligned(4)));
> +
> +#define MX6DL_IOM_GRP_BASE 0x020e0700
> +struct mx6dl_iomux_grp_regs {
> + u32 res1[18];
> + u32 grp_b7ds;
> + u32 grp_addds;
> + u32 grp_ddrmode_ctl;
> + u32 grp_ddrpke;
> + u32 res2[2];
> + u32 grp_ddrmode;
> + u32 grp_b0ds;
> + u32 res3;
> + u32 grp_ctlds;
> + u32 grp_b1ds;
> + u32 grp_ddr_type;
> + u32 grp_b2ds;
> + u32 grp_b3ds;
> + u32 grp_b4ds;
> + u32 grp_b5ds;
> + u32 res4;
> + u32 grp_b6ds;
> +}__attribute__((packed, aligned(4)));
> +
> +#endif
>
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-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
next prev parent reply other threads:[~2013-11-12 15:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1383902865.3157.485.camel@edward-x220-laptop>
2013-11-08 9:35 ` [U-Boot] [PATCH 2/4] mx6: add structs for mmdc and ddr iomux registers Edward Lin
2013-11-08 23:42 ` Eric Nelson
2013-11-12 9:55 ` Edward Lin
2013-11-12 15:12 ` Stefano Babic [this message]
2013-11-13 5:50 ` Tapani
2013-11-13 8:52 ` 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=52824554.3060409@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