public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: rogerq@ti•com (Roger Quadros)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 02/13] ARM: OMAP5: Add minimal support for OMAP5430 SOC
Date: Thu, 10 May 2012 14:58:02 +0300	[thread overview]
Message-ID: <4FABAD4A.5090502@ti.com> (raw)
In-Reply-To: <1336029982-31898-3-git-send-email-r.sricharan@ti.com>

Hi,

On 05/03/2012 10:26 AM, R Sricharan wrote:
> OMAP5430 is Texas Instrument's SOC based on ARM Cortex-A15 SMP
> architecture. It's a dual core SOC with GIC used for interrupt
> handling and with an integrated L2 cache controller.
> 
> OMAP5432 is another variant of OMAP5430, with a
> memory controller supporting DDR3 and SATA.
> 
> Patch includes:
>  - The machine specific headers and sources updates.
>  - Platform header updates.
>  - Minimum initialisation support for serial.
>  - IO table init
> 
> Signed-off-by: R Sricharan <r.sricharan@ti•com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti•com>
> ---
>  arch/arm/mach-omap2/Makefile                   |   26 ++++++++++----
>  arch/arm/mach-omap2/clock.c                    |    3 +-
>  arch/arm/mach-omap2/cminst44xx.h               |    2 +-
>  arch/arm/mach-omap2/common.c                   |   24 +++++++++++++
>  arch/arm/mach-omap2/common.h                   |   11 ++++++
>  arch/arm/mach-omap2/include/mach/debug-macro.S |    8 ++--
>  arch/arm/mach-omap2/io.c                       |   44 ++++++++++++++++++++++++
>  arch/arm/mach-omap2/iomap.h                    |   27 ++++++++++++++
>  arch/arm/mach-omap2/prcm.c                     |    2 +-
>  arch/arm/mach-omap2/prm2xxx_3xxx.h             |    5 ++-
>  arch/arm/plat-omap/Makefile                    |    4 +--
>  arch/arm/plat-omap/include/plat/clkdev_omap.h  |    1 +
>  arch/arm/plat-omap/include/plat/clock.h        |    4 ++-
>  arch/arm/plat-omap/include/plat/hardware.h     |    1 +
>  arch/arm/plat-omap/include/plat/multi.h        |    9 +++++
>  arch/arm/plat-omap/include/plat/omap54xx.h     |   32 +++++++++++++++++
>  arch/arm/plat-omap/include/plat/serial.h       |   10 +++++
>  arch/arm/plat-omap/include/plat/uncompress.h   |    6 +++
>  arch/arm/plat-omap/sram.c                      |   11 +++++-
>  19 files changed, 208 insertions(+), 22 deletions(-)
>  create mode 100644 arch/arm/plat-omap/include/plat/omap54xx.h
> 
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> index 669e2b1..fbb6b3d 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -16,6 +16,7 @@ secure-common				= omap-smc.o omap-secure.o
>  obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(hwmod-common)
>  obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(hwmod-common) $(secure-common)
>  obj-$(CONFIG_ARCH_OMAP4) += prm44xx.o $(hwmod-common) $(secure-common)
> +obj-$(CONFIG_ARCH_OMAP5) += prm44xx.o $(hwmod-common) $(secure-common)
>  
>  ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),)
>  obj-y += mcbsp.o
> @@ -27,8 +28,10 @@ obj-$(CONFIG_TWL4030_CORE) += omap_twl.o
>  
>  obj-$(CONFIG_SMP)			+= omap-smp.o omap-headsmp.o
>  obj-$(CONFIG_HOTPLUG_CPU)		+= omap-hotplug.o
> -obj-$(CONFIG_ARCH_OMAP4)		+= omap4-common.o omap-wakeupgen.o
> -obj-$(CONFIG_ARCH_OMAP4)		+= sleep44xx.o
> +omap-4-5-common				=  omap4-common.o omap-wakeupgen.o \
> +					   sleep44xx.o		
> +obj-$(CONFIG_ARCH_OMAP4)		+= $(omap-4-5-common)
> +obj-$(CONFIG_ARCH_OMAP5)                += $(omap-4-5-common)
>  
>  plus_sec := $(call as-instr,.arch_extension sec,+sec)
>  AFLAGS_omap-headsmp.o			:=-Wa,-march=armv7-a$(plus_sec)
> @@ -68,6 +71,7 @@ obj-$(CONFIG_ARCH_OMAP2)		+= sleep24xx.o
>  obj-$(CONFIG_ARCH_OMAP3)		+= pm34xx.o sleep34xx.o
>  obj-$(CONFIG_ARCH_OMAP3)		+= cpuidle34xx.o
>  obj-$(CONFIG_ARCH_OMAP4)		+= pm44xx.o omap-mpuss-lowpower.o
> +obj-$(CONFIG_ARCH_OMAP5)		+= omap-mpuss-lowpower.o
>  obj-$(CONFIG_ARCH_OMAP4)		+= cpuidle44xx.o
>  obj-$(CONFIG_PM_DEBUG)			+= pm-debug.o
>  obj-$(CONFIG_OMAP_SMARTREFLEX)          += sr_device.o smartreflex.o
> @@ -87,9 +91,11 @@ obj-y					+= prm_common.o
>  obj-$(CONFIG_ARCH_OMAP2)		+= prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o
>  obj-$(CONFIG_ARCH_OMAP3)		+= prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o
>  obj-$(CONFIG_ARCH_OMAP3)		+= vc3xxx_data.o vp3xxx_data.o
> -obj-$(CONFIG_ARCH_OMAP4)		+= prcm.o cminst44xx.o cm44xx.o
> -obj-$(CONFIG_ARCH_OMAP4)		+= prcm_mpu44xx.o prminst44xx.o
> -obj-$(CONFIG_ARCH_OMAP4)		+= vc44xx_data.o vp44xx_data.o prm44xx.o
> +omap-prcm-4-5-common			=  prcm.o cminst44xx.o cm44xx.o \
> +					   prcm_mpu44xx.o prminst44xx.o \
> +					   vc44xx_data.o vp44xx_data.o
> +obj-$(CONFIG_ARCH_OMAP4)		+= $(omap-prcm-4-5-common) prm44xx.o
> +obj-$(CONFIG_ARCH_OMAP5)                += $(omap-prcm-4-5-common)
>  
>  # OMAP voltage domains
>  voltagedomain-common			:= voltage.o vc.o vp.o
> @@ -99,6 +105,7 @@ obj-$(CONFIG_ARCH_OMAP3)		+= $(voltagedomain-common)
>  obj-$(CONFIG_ARCH_OMAP3)		+= voltagedomains3xxx_data.o
>  obj-$(CONFIG_ARCH_OMAP4)		+= $(voltagedomain-common)
>  obj-$(CONFIG_ARCH_OMAP4)		+= voltagedomains44xx_data.o
> +obj-$(CONFIG_ARCH_OMAP5)		+= $(voltagedomain-common)
>  
>  # OMAP powerdomain framework
>  powerdomain-common			+= powerdomain.o powerdomain-common.o
> @@ -113,6 +120,7 @@ obj-$(CONFIG_ARCH_OMAP3)		+= powerdomains2xxx_3xxx_data.o
>  obj-$(CONFIG_ARCH_OMAP4)		+= $(powerdomain-common)
>  obj-$(CONFIG_ARCH_OMAP4)		+= powerdomain44xx.o
>  obj-$(CONFIG_ARCH_OMAP4)		+= powerdomains44xx_data.o
> +obj-$(CONFIG_ARCH_OMAP5)                += $(powerdomain-common) powerdomain44xx.o
>  
>  # PRCM clockdomain control
>  obj-$(CONFIG_ARCH_OMAP2)		+= clockdomain.o
> @@ -124,9 +132,11 @@ obj-$(CONFIG_ARCH_OMAP3)		+= clockdomain.o
>  obj-$(CONFIG_ARCH_OMAP3)		+= clockdomain2xxx_3xxx.o
>  obj-$(CONFIG_ARCH_OMAP3)		+= clockdomains2xxx_3xxx_data.o
>  obj-$(CONFIG_ARCH_OMAP3)		+= clockdomains3xxx_data.o
> -obj-$(CONFIG_ARCH_OMAP4)		+= clockdomain.o
> -obj-$(CONFIG_ARCH_OMAP4)		+= clockdomain44xx.o
> +omap-clock-4-5-common			= clockdomain.o \
> +					  clockdomain44xx.o
> +obj-$(CONFIG_ARCH_OMAP4)		+= $(omap-clock-4-5-common)
>  obj-$(CONFIG_ARCH_OMAP4)		+= clockdomains44xx_data.o
> +obj-$(CONFIG_ARCH_OMAP5)		+= $(omap-clock-4-5-common)
>  
>  # Clock framework
>  obj-$(CONFIG_ARCH_OMAP2)		+= $(clock-common) clock2xxx.o
> @@ -144,6 +154,8 @@ obj-$(CONFIG_ARCH_OMAP3)		+= dpll3xxx.o clock3xxx_data.o
>  obj-$(CONFIG_ARCH_OMAP3)		+= clkt_iclk.o
>  obj-$(CONFIG_ARCH_OMAP4)		+= $(clock-common) clock44xx_data.o
>  obj-$(CONFIG_ARCH_OMAP4)		+= dpll3xxx.o dpll44xx.o
> +obj-$(CONFIG_ARCH_OMAP5)		+= $(clock-common)
> +obj-$(CONFIG_ARCH_OMAP5)		+= dpll3xxx.o dpll44xx.o
>  
>  # OMAP2 clock rate set data (old "OPP" data)
>  obj-$(CONFIG_SOC_OMAP2420)		+= opp2420_data.o
> diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
> index d9f4931..c589bb8 100644
> --- a/arch/arm/mach-omap2/clock.c
> +++ b/arch/arm/mach-omap2/clock.c
> @@ -400,7 +400,8 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent)
>  
>  /* OMAP3/4 non-CORE DPLL clkops */
>  
> -#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
> +#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) || \
> +				defined(CONFIG_ARCH_OMAP5)
>  
>  const struct clkops clkops_omap3_noncore_dpll_ops = {
>  	.enable		= omap3_noncore_dpll_enable,
> diff --git a/arch/arm/mach-omap2/cminst44xx.h b/arch/arm/mach-omap2/cminst44xx.h
> index a018a73..da67e08 100644
> --- a/arch/arm/mach-omap2/cminst44xx.h
> +++ b/arch/arm/mach-omap2/cminst44xx.h
> @@ -19,7 +19,7 @@ extern void omap4_cminst_clkdm_force_wakeup(u8 part, s16 inst, u16 cdoffs);
>  
>  extern int omap4_cminst_wait_module_ready(u8 part, u16 inst, s16 cdoffs, u16 clkctrl_offs);
>  
> -# ifdef CONFIG_ARCH_OMAP4
> +#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_ARCH_OMAP5)
>  extern int omap4_cminst_wait_module_idle(u8 part, u16 inst, s16 cdoffs,
>  					 u16 clkctrl_offs);
>  
> diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c
> index 8a6953a..a0e74b9 100644
> --- a/arch/arm/mach-omap2/common.c
> +++ b/arch/arm/mach-omap2/common.c
> @@ -182,3 +182,27 @@ void __init omap4_map_io(void)
>  }
>  #endif
>  
> +#if defined(CONFIG_ARCH_OMAP5)
> +static struct omap_globals omap5_globals = {
> +	.class	= OMAP54XX_CLASS,
> +	.tap	= OMAP2_L4_IO_ADDRESS(OMAP543x_SCM_BASE),
> +	.ctrl	= OMAP2_L4_IO_ADDRESS(OMAP543x_SCM_BASE),
> +	.ctrl_pad	= OMAP2_L4_IO_ADDRESS(OMAP543x_CTRL_BASE),
> +	.prm	= OMAP2_L4_IO_ADDRESS(OMAP54XX_PRM_BASE),
> +	.cm	= OMAP2_L4_IO_ADDRESS(OMAP54XX_CM_CORE_AON_BASE),
> +	.cm2	= OMAP2_L4_IO_ADDRESS(OMAP54XX_CM_CORE_BASE),
> +	.prcm_mpu = OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE),

Might not be for this patch but just wondering why some register names
are prefixed with OMAP543x whereas others are OMAP54XX.

e.g. will SCM_BASE be different for a different OMAP5 device?

> +};
> +
> +void __init omap2_set_globals_543x(void)
> +{
> +	omap2_set_globals_tap(&omap5_globals);
> +	omap2_set_globals_control(&omap5_globals);
> +	omap2_set_globals_prcm(&omap5_globals);
> +}
> +
> +void __init omap5_map_io(void)
> +{
> +	omap5_map_common_io();
> +}
> +#endif
> diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
> index 0672fc5..797dda7 100644
> --- a/arch/arm/mach-omap2/common.h
> +++ b/arch/arm/mach-omap2/common.h
> @@ -78,6 +78,14 @@ static inline void omap44xx_map_common_io(void)
>  }
>  #endif
>  
> +#ifdef CONFIG_ARCH_OMAP5
> +extern void omap5_map_common_io(void);
> +#else
> +static inline void omap5_map_common_io(void)
> +{
> +}

nit-pick

static inline void omap5_map_common_io(void) {}

> +#endif
> +
>  extern void omap2_init_common_infrastructure(void);
>  
>  extern struct sys_timer omap2_timer;
> @@ -94,6 +102,7 @@ void omap3_init_early(void);	/* Do not use this one */
>  void am35xx_init_early(void);
>  void ti81xx_init_early(void);
>  void omap4430_init_early(void);
> +void omap5_init_early(void);
>  void omap_prcm_restart(char, const char *);
>  
>  /*
> @@ -118,6 +127,7 @@ void omap2_set_globals_242x(void);
>  void omap2_set_globals_243x(void);
>  void omap2_set_globals_3xxx(void);
>  void omap2_set_globals_443x(void);
> +void omap2_set_globals_543x(void);

It might be better to use 5xxx in the naming scheme instead of 543x as
it would be used for all OMAP5 devices.


>  void omap2_set_globals_ti81xx(void);
>  void omap2_set_globals_am33xx(void);
>  
> @@ -132,6 +142,7 @@ void omap243x_map_io(void);
>  void omap3_map_io(void);
>  void am33xx_map_io(void);
>  void omap4_map_io(void);
> +void omap5_map_io(void);
>  void ti81xx_map_io(void);
>  void omap_barriers_init(void);

<snip>

regards,
-roger

  parent reply	other threads:[~2012-05-10 11:58 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-03  7:26 [PATCH 00/13] ARM: OMAP5: Add minimal OMAP5 SOC support R Sricharan
2012-05-03  7:26 ` [PATCH 01/13] ARM: OMAP5: id: Add cpu id for ES versions R Sricharan
2012-05-10 11:18   ` Roger Quadros
2012-05-10 11:22     ` R, Sricharan
2012-05-10 13:06   ` Jean-Christophe PLAGNIOL-VILLARD
2012-05-10 13:15     ` R, Sricharan
2012-05-03  7:26 ` [PATCH 02/13] ARM: OMAP5: Add minimal support for OMAP5430 SOC R Sricharan
2012-05-04 22:39   ` Tony Lindgren
2012-05-04 22:47     ` Tony Lindgren
2012-05-06  7:36     ` R, Sricharan
2012-05-07 17:33       ` Tony Lindgren
2012-05-09  9:06         ` R, Sricharan
2012-05-09 16:00           ` Tony Lindgren
2012-05-10  9:49             ` R, Sricharan
2012-05-07 19:07     ` Paul Walmsley
2012-05-07 19:18       ` Tony Lindgren
2012-05-07 19:35         ` Tony Lindgren
2012-05-08  5:32           ` Paul Walmsley
2012-05-08  5:49           ` Hiremath, Vaibhav
2012-05-08 15:48             ` Tony Lindgren
2012-05-08 17:00               ` Hiremath, Vaibhav
2012-05-08 19:07                 ` Tony Lindgren
2012-05-08  5:31         ` Paul Walmsley
2012-05-08 15:47           ` Tony Lindgren
2012-05-10 11:58   ` Roger Quadros [this message]
2012-05-03  7:26 ` [PATCH 03/13] TEMP: ARM: OMAP5: Add cpu_is_omap54xx() checks R Sricharan
2012-05-03  7:26 ` [PATCH 04/13] ARM: OMAP5: timer: Add clocksource, clockevent support R Sricharan
2012-05-03  7:26 ` [PATCH 05/13] TEMP: ARM: OMAP5: Update the base address of the 32k-counter R Sricharan
2012-05-03  7:26 ` [PATCH 06/13] ARM: OMAP5: gpmc: Update gpmc_init() R Sricharan
2012-05-03  7:26 ` [PATCH 07/13] ARM: OMAP5: l3: Add l3 error handler support for omap5 R Sricharan
2012-05-04 22:51   ` Tony Lindgren
2012-05-06  7:38     ` R, Sricharan
2012-05-07 17:34       ` Tony Lindgren
2012-05-08  6:04         ` R, Sricharan
2012-05-03  7:26 ` [PATCH 08/13] ARM: OMAP5: Add the WakeupGen IP updates R Sricharan
2012-05-04 22:55   ` Tony Lindgren
2012-05-07  9:06     ` Santosh Shilimkar
2012-05-10 11:36   ` Roger Quadros
2012-05-10 11:42     ` Shilimkar, Santosh
2012-05-10 11:48       ` Roger Quadros
2012-05-10 11:52         ` Santosh Shilimkar
2012-05-03  7:26 ` [PATCH 09/13] ARM: OMAP5: Add SMP support R Sricharan
2012-05-08 12:47   ` Will Deacon
2012-05-08 13:00     ` Santosh Shilimkar
2012-05-03  7:26 ` [PATCH 10/13] ARM: OMAP5: board-generic: Add device tree support R Sricharan
2012-05-07 13:27   ` Cousson, Benoit
2012-05-07 14:08     ` R, Sricharan
2012-05-07 17:35       ` Tony Lindgren
2012-05-03  7:26 ` [PATCH 11/13] arm/dts: OMAP5: Add omap5 dts files R Sricharan
2012-05-03  7:26 ` [PATCH 12/13] ARM: OMAP5: Add the build support R Sricharan
2012-05-04 22:58   ` Tony Lindgren
2012-05-07  3:35     ` R, Sricharan
2012-05-07 17:37       ` Tony Lindgren
2012-05-08  9:19         ` Cousson, Benoit
2012-05-08 15:57           ` Tony Lindgren
2012-05-03  7:26 ` [PATCH 13/13] ARM: Kconfig update to support additional GPIOs in OMAP5 R Sricharan
2012-05-07  9:49 ` [PATCH 00/13] ARM: OMAP5: Add minimal OMAP5 SOC support Santosh Shilimkar
2012-05-07 22:26   ` Tony Lindgren
2012-05-08  7:24     ` Santosh Shilimkar
2012-05-08 15:58       ` Tony Lindgren
2012-05-10 17:43 ` Sricharan R
2012-05-11 20:11   ` Tony Lindgren
2012-05-14  4:50     ` R, Sricharan

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=4FABAD4A.5090502@ti.com \
    --to=rogerq@ti$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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