Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / Atom feed
From: Shawn Guo <shawnguo@kernel.org>
To: Alexander Shiyan <shc_work@mail.ru>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <fabio.estevam@nxp.com>,
	Russell King <linux@armlinux.org.uk>,
	linux-arm-kernel@lists.infradead.org,
	NXP Linux Team <linux-imx@nxp.com>
Subject: Re: [PATCH 2/6] ARM i.MX21: Add devicetree support
Date: Sat, 12 Jan 2019 10:53:03 +0800
Message-ID: <20190112025302.GQ32649@dragon> (raw)
In-Reply-To: <20181222105200.18502-2-shc_work@mail.ru>

On Sat, Dec 22, 2018 at 01:51:56PM +0300, Alexander Shiyan wrote:
> This patch adds basic devicetree support for i.MX21 based SoCs.
> 
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>

What i.MX21 board are you running devicetree support on?

Shawn

> ---
>  arch/arm/mach-imx/Kconfig      |  7 +++++++
>  arch/arm/mach-imx/Makefile     |  1 +
>  arch/arm/mach-imx/mach-imx21.c | 31 +++++++++++++++++++++++++++++++
>  3 files changed, 39 insertions(+)
>  create mode 100644 arch/arm/mach-imx/mach-imx21.c
> 
> diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
> index abc3371..abf3c0d 100644
> --- a/arch/arm/mach-imx/Kconfig
> +++ b/arch/arm/mach-imx/Kconfig
> @@ -91,6 +91,13 @@ config MACH_MX21ADS
>  	  Include support for MX21ADS platform. This includes specific
>  	  configurations for the board and its peripherals.
>  
> +config MACH_IMX21_DT
> +	bool "Support i.MX21 platforms from device tree"
> +	select SOC_IMX21
> +	help
> +	  Include support for Freescale i.MX21 based platforms
> +	  using the device tree for discovery
> +
>  comment "MX27 platforms:"
>  
>  config MACH_MX27ADS
> diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
> index bae179a..52a9138 100644
> --- a/arch/arm/mach-imx/Makefile
> +++ b/arch/arm/mach-imx/Makefile
> @@ -38,6 +38,7 @@ endif
>  
>  # i.MX21 based machines
>  obj-$(CONFIG_MACH_MX21ADS) += mach-mx21ads.o
> +obj-$(CONFIG_MACH_IMX21_DT) += mach-imx21.o
>  
>  # i.MX27 based machines
>  obj-$(CONFIG_MACH_MX27ADS) += mach-mx27ads.o
> diff --git a/arch/arm/mach-imx/mach-imx21.c b/arch/arm/mach-imx/mach-imx21.c
> new file mode 100644
> index 0000000..7eb7de0
> --- /dev/null
> +++ b/arch/arm/mach-imx/mach-imx21.c
> @@ -0,0 +1,31 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/* Author: Alexander Shiyan <shc_work@mail.ru> */
> +
> +#include <asm/mach/arch.h>
> +#include <asm/mach/map.h>
> +#include <linux/of_platform.h>
> +
> +#include "common.h"
> +#include "hardware.h"
> +
> +#define MX21_AVIC_ADDR	0x10040000
> +
> +static void __init imx21_init_irq(void)
> +{
> +	void __iomem *avic = ioremap(MX21_AVIC_ADDR, SZ_4K);
> +
> +	WARN_ON(!avic);
> +
> +	mxc_init_irq(avic);
> +}
> +
> +static const char * const imx21_dt_board_compat[] __initconst = {
> +	"fsl,imx21",
> +	NULL
> +};
> +
> +DT_MACHINE_START(IMX21_DT, "Freescale i.MX21 (Device Tree Support)")
> +	.init_early	= imx21_init_early,
> +	.init_irq	= imx21_init_irq,
> +	.dt_compat	= imx21_dt_board_compat,
> +MACHINE_END
> -- 
> 2.10.2
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-22 10:51 [PATCH 1/6] ARM: dts: imx21: add i.MX21 SoC device tree Alexander Shiyan
2018-12-22 10:51 ` [PATCH 2/6] ARM i.MX21: Add devicetree support Alexander Shiyan
2019-01-12  2:53   ` Shawn Guo [this message]
2019-01-12  5:17     ` Alexander Shiyan
2019-01-12  7:04       ` Shawn Guo
2018-12-22 10:51 ` [PATCH 3/6] ARM: dts: imx21: Add support for the i.MX21 Freescale ADS board Alexander Shiyan
2018-12-22 10:51 ` [PATCH 4/6] ARM: i.MX: Remove i.MX21 Freescale ADS board support Alexander Shiyan
2018-12-22 10:51 ` [PATCH 5/6] ARM: i.MX: Move SOC_IMX21 into 'Device tree only' Alexander Shiyan
2018-12-22 10:52 ` [PATCH 6/6] ARM: i.MX: Remove i.MX21 non-DT device registration helpers Alexander Shiyan

Reply instructions:

You may reply publically 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=20190112025302.GQ32649@dragon \
    --to=shawnguo@kernel.org \
    --cc=fabio.estevam@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux@armlinux.org.uk \
    --cc=shc_work@mail.ru \
    /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

Linux-ARM-Kernel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/0 linux-arm-kernel/git/0.git
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/1 linux-arm-kernel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-kernel linux-arm-kernel/ https://lore.kernel.org/linux-arm-kernel \
		linux-arm-kernel@lists.infradead.org infradead-linux-arm-kernel@archiver.kernel.org
	public-inbox-index linux-arm-kernel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-arm-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox