All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/6] ARM: hi6220: Add register and bitfield definition header files.
Date: Sat, 18 Jul 2015 08:37:55 -0600	[thread overview]
Message-ID: <CAPnjgZ0GW6cnN_XOFVq7d6AY6rYUCOXerRs=F_aHfvAUUwNPzQ@mail.gmail.com> (raw)
In-Reply-To: <1436371040-26620-3-git-send-email-peter.griffin@linaro.org>

Hi Peter,

On 8 July 2015 at 09:57, Peter Griffin <peter.griffin@linaro.org> wrote:
> This patch adds the header files which will be used in the subsquent
> board / drivers to enable support for hi6220 hikey board.
>
> Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
> ---
>  arch/arm/include/asm/arch-hi6220/hi6220.h          | 324 +++++++++++++++++++
>  .../include/asm/arch-hi6220/hi6220_regs_alwayson.h | 349 +++++++++++++++++++++
>  2 files changed, 673 insertions(+)
>  create mode 100644 arch/arm/include/asm/arch-hi6220/hi6220.h
>  create mode 100644 arch/arm/include/asm/arch-hi6220/hi6220_regs_alwayson.h
>
> diff --git a/arch/arm/include/asm/arch-hi6220/hi6220.h b/arch/arm/include/asm/arch-hi6220/hi6220.h
> new file mode 100644
> index 0000000..3ddec91
> --- /dev/null
> +++ b/arch/arm/include/asm/arch-hi6220/hi6220.h
> @@ -0,0 +1,324 @@
> +/*
> + * (C) Copyright 2015 Linaro
> + * Peter Griffin <peter.griffin@linaro.org>
> + *
> + * SPDX-License-Identifier:    GPL-2.0+
> + */
> +
> +#ifndef __HI6220_H__
> +#define __HI6220_H__
> +
> +#include "hi6220_regs_alwayson.h"
> +
> +#define HI6220_MMC0_BASE                       0xF723D000
> +#define HI6220_MMC1_BASE                       0xF723E000
> +
> +#define HI6220_PMUSSI_BASE                     0xF8000000
> +
> +#define HI6220_PERI_BASE                       0xF7030000
> +
> +#define PERI_SC_PERIPH_CTRL1                   (HI6220_PERI_BASE + 0x000)
> +

I think you should have:

struct peri_sc_regs {
   u32 ctrl1;
   u32 ctrl2;
...
};

U-Boot uses structs for I/O access.

> +#define PERI_CTRL1_ETR_AXI_CSYSREQ_N                   (1 << 0)
> +#define PERI_CTRL1_HIFI_INT_MASK                       (1 << 1)
> +#define PERI_CTRL1_HIFI_ALL_INT_MASK                   (1 << 2)
> +#define PERI_CTRL1_ETR_AXI_CSYSREQ_N_MSK               (1 << 16)
> +#define PERI_CTRL1_HIFI_INT_MASK_MSK                   (1 << 17)
> +#define PERI_CTRL1_HIFI_ALL_INT_MASK_MSK               (1 << 18)
> +
> +
> +#define PERI_SC_PERIPH_CTRL2                   (HI6220_PERI_BASE + 0x004)
> +
> +#define PERI_CTRL2_MMC_CLK_PHASE_BYPASS_EN_MMC0                (1 << 0)
> +#define PERI_CTRL2_MMC_CLK_PHASE_BYPASS_EN_MMC1                (1 << 2)
> +#define PERI_CTRL2_NAND_SYS_MEM_SEL                    (1 << 6)
> +#define PERI_CTRL2_G3D_DDRT_AXI_SEL                    (1 << 7)
> +#define PERI_CTRL2_GU_MDM_BBP_TESTPIN_SEL              (1 << 8)
> +#define PERI_CTRL2_CODEC_SSI_MASTER_CHECK              (1 << 9)
> +#define PERI_CTRL2_FUNC_TEST_SOFT                      (1 << 12)
> +#define PERI_CTRL2_CSSYS_TS_ENABLE                     (1 << 15)
> +#define PERI_CTRL2_HIFI_RAMCTRL_S_EMA                  (1 << 16)
> +#define PERI_CTRL2_HIFI_RAMCTRL_S_EMAW                 (1 << 20)
> +#define PERI_CTRL2_HIFI_RAMCTRL_S_EMAS                 (1 << 22)
> +#define PERI_CTRL2_HIFI_RAMCTRL_S_RET1N                        (1 << 26)
> +#define PERI_CTRL2_HIFI_RAMCTRL_S_RET2N                        (1 << 27)
> +#define PERI_CTRL2_HIFI_RAMCTRL_S_PGEN                 (1 << 28)
> +
> +#define PERI_SC_PERIPH_CTRL3                   (HI6220_PERI_BASE + 0x008)
> +
> +#define PERI_CTRL3_HIFI_DDR_HARQMEM_ADDR               (1 << 0)
> +#define PERI_CTRL3_HIFI_HARQMEMRMP_EN                  (1 << 12)
> +#define PERI_CTRL3_HARQMEM_SYS_MED_SEL                 (1 << 13)
> +#define PERI_CTRL3_SOC_AP_OCCUPY_GRP1                  (1 << 14)
> +#define PERI_CTRL3_SOC_AP_OCCUPY_GRP2                  (1 << 16)
> +#define PERI_CTRL3_SOC_AP_OCCUPY_GRP3                  (1 << 18)
> +#define PERI_CTRL3_SOC_AP_OCCUPY_GRP4                  (1 << 20)
> +#define PERI_CTRL3_SOC_AP_OCCUPY_GRP5                  (1 << 22)
> +#define PERI_CTRL3_SOC_AP_OCCUPY_GRP6                  (1 << 24)
> +
> +#define PERI_SC_PERIPH_CTRL4                   (HI6220_PERI_BASE + 0x00c)

[snip]

Regards,
Simon

  reply	other threads:[~2015-07-18 14:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-08 15:57 [U-Boot] [PATCH v2 0/6] Add support for hi6220 SoC and HiKey 96boards CE board Peter Griffin
2015-07-08 15:57 ` [U-Boot] [PATCH v2 1/6] dm: gpio: hi6220: Add a hi6220 GPIO driver model driver Peter Griffin
2015-07-18 14:37   ` Simon Glass
2015-07-08 15:57 ` [U-Boot] [PATCH v2 2/6] ARM: hi6220: Add register and bitfield definition header files Peter Griffin
2015-07-18 14:37   ` Simon Glass [this message]
2015-07-29 21:07     ` Peter Griffin
2015-07-08 15:57 ` [U-Boot] [PATCH v2 3/6] hi6553: Add register definition and bitfield header for 6553 pmic Peter Griffin
2015-07-18 14:37   ` Simon Glass
2015-07-29 21:04     ` Peter Griffin
2015-07-08 15:57 ` [U-Boot] [PATCH v2 4/6] mmc: hi6220_dw_mmc: Add hi6220 glue code for dw_mmc controller Peter Griffin
2015-07-09  4:30   ` Jaehoon Chung
2015-07-18 14:38   ` Simon Glass
2015-07-19  9:39     ` Peter Griffin
2015-07-20  2:17       ` Simon Glass
2015-07-08 15:57 ` [U-Boot] [PATCH v2 5/6] ARM64: hikey: hi6220: Add u-boot support for the 96boards CE HiKey board Peter Griffin
2015-07-10 18:36   ` Rob Herring
2015-07-16  0:41     ` Peter Griffin
2015-07-16 13:28       ` Rob Herring
2015-07-16 13:39         ` Tom Rini
2015-07-29 20:59         ` Peter Griffin
2015-07-18 14:38   ` Simon Glass
2015-07-28 17:37     ` Peter Griffin
2015-07-08 15:57 ` [U-Boot] [PATCH v2 6/6] ARM64: hikey: Add a README for this board Peter Griffin

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='CAPnjgZ0GW6cnN_XOFVq7d6AY6rYUCOXerRs=F_aHfvAUUwNPzQ@mail.gmail.com' \
    --to=sjg@chromium.org \
    --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 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.