All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dannenberg <dannenberg@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 12/16] ARM: omap4/5: Add device type to CPU string
Date: Tue, 19 Apr 2016 11:26:30 -0500	[thread overview]
Message-ID: <20160419162630.GJ13405@borg.dal.design.ti.com> (raw)
In-Reply-To: <1460417838-22343-13-git-send-email-d-allred@ti.com>

On Mon, Apr 11, 2016 at 06:37:14PM -0500, Daniel Allred wrote:
> Update the CPU string output so that the device
> type is now included as part of the CPU string that
> is printed as the SPL or u-boot comes up. This update
> adds a suffix of the form "-GP" or "-HS" for production
> devices, so that general purpose (GP) and high security
> (HS) can be distiguished. Applies to all OMAP5 variants.

When I'm building for AM437x HS and running on the device I don't see
that output. It seems like there is something funny going on with
CONFIG_SPL_DISPLAY_PRINT. Even though this definition is activated in
ti_omap4_common.h and ti_omap5_common.h it is not seen by
preloader_console_init() in spl.c, hence the function that prints the
chip-type/rev specifics never gets invoked.

Madan,
can you please confirm that behavior on your end?

Thanks,

--
Andreas Dannenberg
Texas Instruments Inc



> 
> Signed-off-by: Daniel Allred <d-allred@ti.com>
> Signed-off-by: Madan Srinivas <madans@ti.com>
> ---
>  arch/arm/cpu/armv7/omap-common/hwinit-common.c | 22 ++++++++++++++++++++--
>  arch/arm/include/asm/arch-omap4/cpu.h          |  7 +++++++
>  arch/arm/include/asm/arch-omap5/cpu.h          |  7 +++++++
>  3 files changed, 34 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/omap-common/hwinit-common.c b/arch/arm/cpu/armv7/omap-common/hwinit-common.c
> index 01c2d57..078bdd8 100644
> --- a/arch/arm/cpu/armv7/omap-common/hwinit-common.c
> +++ b/arch/arm/cpu/armv7/omap-common/hwinit-common.c
> @@ -65,12 +65,30 @@ static void omap_rev_string(void)
>  	u32 major_rev = (omap_rev & 0x00000F00) >> 8;
>  	u32 minor_rev = (omap_rev & 0x000000F0) >> 4;
>  
> +	const char *sec_s;
> +
> +	switch (get_device_type()) {
> +	case TST_DEVICE:
> +		sec_s = "TST";
> +		break;
> +	case EMU_DEVICE:
> +		sec_s = "EMU";
> +		break;
> +	case HS_DEVICE:
> +		sec_s = "HS";
> +		break;
> +	case GP_DEVICE:
> +		sec_s = "GP";
> +		break;
> +	default:
> +		sec_s = "?";
> +	}
> +
>  	if (soc_variant)
>  		printf("OMAP");
>  	else
>  		printf("DRA");
> -	printf("%x ES%x.%x\n", omap_variant, major_rev,
> -	       minor_rev);
> +	printf("%x-%s ES%x.%x\n", omap_variant, sec_s, major_rev, minor_rev);
>  }
>  
>  #ifdef CONFIG_SPL_BUILD
> diff --git a/arch/arm/include/asm/arch-omap4/cpu.h b/arch/arm/include/asm/arch-omap4/cpu.h
> index f7595ae..34609b9 100644
> --- a/arch/arm/include/asm/arch-omap4/cpu.h
> +++ b/arch/arm/include/asm/arch-omap4/cpu.h
> @@ -59,6 +59,13 @@ struct watchdog {
>  #define TCLR_AR			(0x1 << 1)
>  #define TCLR_PRE		(0x1 << 5)
>  
> +/* device type */
> +#define DEVICE_MASK         (BIT(8) | BIT(9) | BIT(10))
> +#define TST_DEVICE          0x0
> +#define EMU_DEVICE          0x1
> +#define HS_DEVICE           0x2
> +#define GP_DEVICE           0x3
> +
>  /* I2C base */
>  #define I2C_BASE1		(OMAP44XX_L4_PER_BASE + 0x70000)
>  #define I2C_BASE2		(OMAP44XX_L4_PER_BASE + 0x72000)
> diff --git a/arch/arm/include/asm/arch-omap5/cpu.h b/arch/arm/include/asm/arch-omap5/cpu.h
> index b1513e9..1d53da6 100644
> --- a/arch/arm/include/asm/arch-omap5/cpu.h
> +++ b/arch/arm/include/asm/arch-omap5/cpu.h
> @@ -63,6 +63,13 @@ struct watchdog {
>  #define TCLR_AR			(0x1 << 1)
>  #define TCLR_PRE		(0x1 << 5)
>  
> +/* device type */
> +#define DEVICE_MASK         (BIT(8) | BIT(9) | BIT(10))
> +#define TST_DEVICE          0x0
> +#define EMU_DEVICE          0x1
> +#define HS_DEVICE           0x2
> +#define GP_DEVICE           0x3
> +
>  /* I2C base */
>  #define I2C_BASE1		(OMAP54XX_L4_PER_BASE + 0x70000)
>  #define I2C_BASE2		(OMAP54XX_L4_PER_BASE + 0x72000)
> -- 
> 1.9.1
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

  parent reply	other threads:[~2016-04-19 16:26 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-11 23:37 [U-Boot] [PATCH 00/16] Support for boot image creation for TI secure devices Daniel Allred
2016-04-11 23:37 ` [U-Boot] [PATCH 01/16] doc: Add info on using secure devices from TI Daniel Allred
2016-04-15  9:47   ` Lokesh Vutla
2016-04-19 15:21   ` Andreas Dannenberg
2016-04-21 13:38   ` Tom Rini
2016-04-11 23:37 ` [U-Boot] [PATCH 02/16] arm: am33xx: Kconfig: Add secure device definitions Daniel Allred
2016-04-15  9:47   ` Lokesh Vutla
2016-04-19 15:13   ` Andreas Dannenberg
2016-04-21 13:39   ` Tom Rini
2016-04-11 23:37 ` [U-Boot] [PATCH 03/16] arm: Kconfig: Add support for AM43xx SoC specific Kconfig Daniel Allred
2016-04-15  9:48   ` Lokesh Vutla
2016-04-15 10:57   ` Lokesh Vutla
2016-04-18 21:03     ` Andreas Dannenberg
2016-04-18 23:04       ` Andreas Dannenberg
2016-04-11 23:37 ` [U-Boot] [PATCH 04/16] ti: omap-common: Add Kconfig file for secure device support Daniel Allred
2016-04-15  9:48   ` Lokesh Vutla
2016-04-20 22:48   ` Andreas Dannenberg
2016-04-21 13:39   ` Tom Rini
2016-04-11 23:37 ` [U-Boot] [PATCH 05/16] ti: omap-common: Add commands for generating secure SPL images Daniel Allred
2016-04-15  9:48   ` Lokesh Vutla
2016-04-20 22:47   ` Andreas Dannenberg
2016-04-21 13:39   ` Tom Rini
2016-04-11 23:37 ` [U-Boot] [PATCH 06/16] ti: AM43xx: config.mk: Add support for generating secure boot images Daniel Allred
2016-04-15  9:49   ` Lokesh Vutla
2016-04-19 15:12   ` Andreas Dannenberg
2016-04-21 13:39   ` Tom Rini
2016-04-11 23:37 ` [U-Boot] [PATCH 07/16] ti: AM43xx: Use CONFIG options from SOC Kconfig Daniel Allred
2016-04-15  9:54   ` Lokesh Vutla
2016-04-19 15:10   ` Andreas Dannenberg
2016-04-21 13:39   ` Tom Rini
2016-04-11 23:37 ` [U-Boot] [PATCH 08/16] ti: AM43xx: board: Detect AM43xx HS EVM Daniel Allred
2016-04-15  9:55   ` Lokesh Vutla
2016-04-21 13:39   ` Tom Rini
2016-04-11 23:37 ` [U-Boot] [PATCH 09/16] defconfig: Add configs for AM43xx secure parts Daniel Allred
2016-04-15  9:58   ` Lokesh Vutla
2016-04-21 13:40     ` Tom Rini
2016-04-21 18:24       ` Allred, Daniel
2016-04-21 19:04         ` Tom Rini
2016-04-11 23:37 ` [U-Boot] [PATCH 10/16] ti_omap5_common: Update SPL start address on " Daniel Allred
2016-04-15  9:58   ` Lokesh Vutla
2016-04-20 22:50   ` Andreas Dannenberg
2016-04-21 13:39   ` Tom Rini
2016-04-11 23:37 ` [U-Boot] [PATCH 11/16] spl: build: ti: add support for secure boot images Daniel Allred
2016-04-15  9:59   ` Lokesh Vutla
2016-04-21 13:39   ` Tom Rini
2016-04-21 17:27   ` Andreas Dannenberg
2016-04-11 23:37 ` [U-Boot] [PATCH 12/16] ARM: omap4/5: Add device type to CPU string Daniel Allred
2016-04-15  9:59   ` Lokesh Vutla
2016-04-19 16:26   ` Andreas Dannenberg [this message]
2016-04-21 17:55     ` Andreas Dannenberg
2016-04-21 18:01       ` Allred, Daniel
2016-04-21 18:59         ` Andreas Dannenberg
2016-04-21 20:27           ` Tom Rini
2016-04-21 22:56             ` Andreas Dannenberg
2016-04-21 23:38               ` Tom Rini
2016-04-22 15:50                 ` Andreas Dannenberg
2016-04-21 13:39   ` Tom Rini
2016-04-11 23:37 ` [U-Boot] [PATCH 13/16] ARM: omap5: add hooks for cpu/SoC fdt fixups Daniel Allred
2016-04-15 10:03   ` Lokesh Vutla
2016-04-20 22:53   ` Andreas Dannenberg
2016-04-21 13:39   ` Tom Rini
2016-04-11 23:37 ` [U-Boot] [PATCH 14/16] ARM: omap5: add ft_board_setup for dra7xx/am57xx Daniel Allred
2016-04-15 10:03   ` Lokesh Vutla
2016-04-20 22:55   ` Andreas Dannenberg
2016-04-21 13:39   ` Tom Rini
2016-04-11 23:37 ` [U-Boot] [PATCH 15/16] ARM: omap5: Add config for board/cpu fdt fixups Daniel Allred
2016-04-15 10:05   ` Lokesh Vutla
2016-04-20 22:55   ` Andreas Dannenberg
2016-04-21 13:39   ` Tom Rini
2016-04-11 23:37 ` [U-Boot] [PATCH 16/16] defconfig: ti: Add configs for OMAP5-class secure parts Daniel Allred
2016-04-15 10:05   ` Lokesh Vutla
2016-04-20 22:57   ` Andreas Dannenberg
2016-04-21 13:40   ` Tom Rini

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=20160419162630.GJ13405@borg.dal.design.ti.com \
    --to=dannenberg@ti.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 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.