From: jamie@jamieiles.com (Jamie Iles)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V4 1/4] ARM: Xilinx: Adding Xilinx board support
Date: Mon, 28 Feb 2011 11:06:18 +0000 [thread overview]
Message-ID: <20110228110618.GA8751@pulham.picochip.com> (raw)
In-Reply-To: <b8e72ca5-de48-41ec-89b9-95bb90e18826@VA3EHSMHS013.ehs.local>
Hi John,
A couple of very pedantic nitpicks below, sorry I didn't spot them
before!
On Fri, Feb 18, 2011 at 11:14:38AM -0700, John Linn wrote:
> The 1st board support is minimal to get a system up and running
> on the Xilinx platform.
>
> Signed-off-by: John Linn <john.linn@xilinx.com>
> ---
>
> V4 Changes
> Minor cleanup based on input from Jamie Iles.
>
> V3 Changes
>
> Updates based on Russell Kings' comments
> Changed headers to update the license info and remove
> the address
>
> Changed the name of functions to include "xilinx" in
> common.c and common.h
>
> Changed the Kconfig and Makefile to use MACH_XILINX which
> matches the machine registered.
>
> V2 Changes
>
> Updates based on Russell King's comments
> minor cleanups
> cleaned up physical/virtual addresses in early i/o table
>
> arch/arm/mach-xilinx/Kconfig | 14 +++++
> arch/arm/mach-xilinx/Makefile | 7 ++
> arch/arm/mach-xilinx/Makefile.boot | 3 +
> arch/arm/mach-xilinx/board_ep107.c | 82 ++++++++++++++++++++++++++
> arch/arm/mach-xilinx/common.c | 113 ++++++++++++++++++++++++++++++++++++
> arch/arm/mach-xilinx/common.h | 30 ++++++++++
> 6 files changed, 249 insertions(+), 0 deletions(-)
> create mode 100644 arch/arm/mach-xilinx/Kconfig
> create mode 100644 arch/arm/mach-xilinx/Makefile
> create mode 100644 arch/arm/mach-xilinx/Makefile.boot
> create mode 100644 arch/arm/mach-xilinx/board_ep107.c
> create mode 100644 arch/arm/mach-xilinx/common.c
> create mode 100644 arch/arm/mach-xilinx/common.h
>
> diff --git a/arch/arm/mach-xilinx/Kconfig b/arch/arm/mach-xilinx/Kconfig
> new file mode 100644
> index 0000000..61532af
> --- /dev/null
> +++ b/arch/arm/mach-xilinx/Kconfig
> @@ -0,0 +1,14 @@
> +if ARCH_XILINX
> +
> +choice
> + prompt "Board Selection"
> + default MACH_XILINX
> +
> +config MACH_XILINX
> + bool "Xilinx EP107 Board"
> + help
> + Select if you are using a Xilinx EP107 board.
> +
> +endchoice
> +
> +endif
> diff --git a/arch/arm/mach-xilinx/Makefile b/arch/arm/mach-xilinx/Makefile
> new file mode 100644
> index 0000000..76e9e55
> --- /dev/null
> +++ b/arch/arm/mach-xilinx/Makefile
> @@ -0,0 +1,7 @@
> +#
> +# Makefile for the linux kernel.
> +#
> +
> +# Common support
> +obj-y := common.o
> +obj-$(CONFIG_MACH_XILINX) += board_ep107.o
> diff --git a/arch/arm/mach-xilinx/Makefile.boot b/arch/arm/mach-xilinx/Makefile.boot
> new file mode 100644
> index 0000000..67039c3
> --- /dev/null
> +++ b/arch/arm/mach-xilinx/Makefile.boot
> @@ -0,0 +1,3 @@
> + zreladdr-y := 0x00008000
> +params_phys-y := 0x00000100
> +initrd_phys-y := 0x00800000
> diff --git a/arch/arm/mach-xilinx/board_ep107.c b/arch/arm/mach-xilinx/board_ep107.c
> new file mode 100644
> index 0000000..a1635b5
> --- /dev/null
> +++ b/arch/arm/mach-xilinx/board_ep107.c
> @@ -0,0 +1,82 @@
> +/* arch/arm/mach-xilinx/board_ep107.c
> + *
> + * This file contains code specific to the Xilinx EP107 board.
> + *
> + * Copyright (C) 2011 Xilinx
> + *
> + * based on /arch/arm/mach-realview/core.c
> + *
> + * Copyright (C) 1999 - 2003 ARM Limited
> + * Copyright (C) 2000 Deep Blue Solutions Ltd
> + *
> + * This software is licensed under the terms of the GNU General Public
> + * License version 2, as published by the Free Software Foundation, and
> + * may be copied, distributed, and modified under those terms.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + */
> +
> +#include <linux/platform_device.h>
> +#include <asm/mach-types.h>
> +#include <asm/mach/arch.h>
> +#include <mach/xilinx_soc.h>
> +#include <mach/irqs.h>
> +#include <linux/clkdev.h>
> +#include "common.h"
Usual convention is to order these as the linux, then the asm, then the
mach includes.
> +
> +/*
> + * Fixed clocks for now
> + */
> +
> +static struct clk ref50_clk = {
> + .rate = 50000000,
> +};
> +
> +/* Create all the platform devices for the board */
> +
> +static struct resource uart0[] = {
> + {
> + .start = UART0_PHYS,
> + .end = UART0_PHYS + 0xFFF,
> + .flags = IORESOURCE_MEM,
> + }, {
> + .start = IRQ_UART0,
> + .end = IRQ_UART0,
> + .flags = IORESOURCE_IRQ,
> + },
> +};
> +
> +static struct platform_device uart_device0 = {
> + .name = "xuartpss",
> + .id = 0,
> + .dev = {
> + .platform_data = &ref50_clk.rate,
> + },
> + .resource = uart0,
> + .num_resources = ARRAY_SIZE(uart0),
> +};
> +
> +static struct platform_device *xilinx_pdevices[] __initdata = {
> + &uart_device0,
> +};
> +
> +/**
> + * board_ep107_init - Board specific initialization for the Xilinx EP107 board.
> + *
> + **/
> +static void __init board_ep107_init(void)
> +{
> + xilinx_system_init();
> + platform_add_devices(&xilinx_pdevices[0], ARRAY_SIZE(xilinx_pdevices));
> +}
> +
> +MACHINE_START(XILINX_EP107, "Xilinx EP107")
> + .boot_params = PHYS_OFFSET + 0x00000100,
Should this use PLAT_PHYS_OFFSET?
Jamie
WARNING: multiple messages have this Message-ID (diff)
From: Jamie Iles <jamie@jamieiles.com>
To: John Linn <john.linn@xilinx.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux@arm.linux.org.uk,
catalin.marinas@arm.com, glikely@secretlab.ca,
jamie@jamieiles.com, arnd@arndb.de
Subject: Re: [PATCH V4 1/4] ARM: Xilinx: Adding Xilinx board support
Date: Mon, 28 Feb 2011 11:06:18 +0000 [thread overview]
Message-ID: <20110228110618.GA8751@pulham.picochip.com> (raw)
In-Reply-To: <b8e72ca5-de48-41ec-89b9-95bb90e18826@VA3EHSMHS013.ehs.local>
Hi John,
A couple of very pedantic nitpicks below, sorry I didn't spot them
before!
On Fri, Feb 18, 2011 at 11:14:38AM -0700, John Linn wrote:
> The 1st board support is minimal to get a system up and running
> on the Xilinx platform.
>
> Signed-off-by: John Linn <john.linn@xilinx.com>
> ---
>
> V4 Changes
> Minor cleanup based on input from Jamie Iles.
>
> V3 Changes
>
> Updates based on Russell Kings' comments
> Changed headers to update the license info and remove
> the address
>
> Changed the name of functions to include "xilinx" in
> common.c and common.h
>
> Changed the Kconfig and Makefile to use MACH_XILINX which
> matches the machine registered.
>
> V2 Changes
>
> Updates based on Russell King's comments
> minor cleanups
> cleaned up physical/virtual addresses in early i/o table
>
> arch/arm/mach-xilinx/Kconfig | 14 +++++
> arch/arm/mach-xilinx/Makefile | 7 ++
> arch/arm/mach-xilinx/Makefile.boot | 3 +
> arch/arm/mach-xilinx/board_ep107.c | 82 ++++++++++++++++++++++++++
> arch/arm/mach-xilinx/common.c | 113 ++++++++++++++++++++++++++++++++++++
> arch/arm/mach-xilinx/common.h | 30 ++++++++++
> 6 files changed, 249 insertions(+), 0 deletions(-)
> create mode 100644 arch/arm/mach-xilinx/Kconfig
> create mode 100644 arch/arm/mach-xilinx/Makefile
> create mode 100644 arch/arm/mach-xilinx/Makefile.boot
> create mode 100644 arch/arm/mach-xilinx/board_ep107.c
> create mode 100644 arch/arm/mach-xilinx/common.c
> create mode 100644 arch/arm/mach-xilinx/common.h
>
> diff --git a/arch/arm/mach-xilinx/Kconfig b/arch/arm/mach-xilinx/Kconfig
> new file mode 100644
> index 0000000..61532af
> --- /dev/null
> +++ b/arch/arm/mach-xilinx/Kconfig
> @@ -0,0 +1,14 @@
> +if ARCH_XILINX
> +
> +choice
> + prompt "Board Selection"
> + default MACH_XILINX
> +
> +config MACH_XILINX
> + bool "Xilinx EP107 Board"
> + help
> + Select if you are using a Xilinx EP107 board.
> +
> +endchoice
> +
> +endif
> diff --git a/arch/arm/mach-xilinx/Makefile b/arch/arm/mach-xilinx/Makefile
> new file mode 100644
> index 0000000..76e9e55
> --- /dev/null
> +++ b/arch/arm/mach-xilinx/Makefile
> @@ -0,0 +1,7 @@
> +#
> +# Makefile for the linux kernel.
> +#
> +
> +# Common support
> +obj-y := common.o
> +obj-$(CONFIG_MACH_XILINX) += board_ep107.o
> diff --git a/arch/arm/mach-xilinx/Makefile.boot b/arch/arm/mach-xilinx/Makefile.boot
> new file mode 100644
> index 0000000..67039c3
> --- /dev/null
> +++ b/arch/arm/mach-xilinx/Makefile.boot
> @@ -0,0 +1,3 @@
> + zreladdr-y := 0x00008000
> +params_phys-y := 0x00000100
> +initrd_phys-y := 0x00800000
> diff --git a/arch/arm/mach-xilinx/board_ep107.c b/arch/arm/mach-xilinx/board_ep107.c
> new file mode 100644
> index 0000000..a1635b5
> --- /dev/null
> +++ b/arch/arm/mach-xilinx/board_ep107.c
> @@ -0,0 +1,82 @@
> +/* arch/arm/mach-xilinx/board_ep107.c
> + *
> + * This file contains code specific to the Xilinx EP107 board.
> + *
> + * Copyright (C) 2011 Xilinx
> + *
> + * based on /arch/arm/mach-realview/core.c
> + *
> + * Copyright (C) 1999 - 2003 ARM Limited
> + * Copyright (C) 2000 Deep Blue Solutions Ltd
> + *
> + * This software is licensed under the terms of the GNU General Public
> + * License version 2, as published by the Free Software Foundation, and
> + * may be copied, distributed, and modified under those terms.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + */
> +
> +#include <linux/platform_device.h>
> +#include <asm/mach-types.h>
> +#include <asm/mach/arch.h>
> +#include <mach/xilinx_soc.h>
> +#include <mach/irqs.h>
> +#include <linux/clkdev.h>
> +#include "common.h"
Usual convention is to order these as the linux, then the asm, then the
mach includes.
> +
> +/*
> + * Fixed clocks for now
> + */
> +
> +static struct clk ref50_clk = {
> + .rate = 50000000,
> +};
> +
> +/* Create all the platform devices for the board */
> +
> +static struct resource uart0[] = {
> + {
> + .start = UART0_PHYS,
> + .end = UART0_PHYS + 0xFFF,
> + .flags = IORESOURCE_MEM,
> + }, {
> + .start = IRQ_UART0,
> + .end = IRQ_UART0,
> + .flags = IORESOURCE_IRQ,
> + },
> +};
> +
> +static struct platform_device uart_device0 = {
> + .name = "xuartpss",
> + .id = 0,
> + .dev = {
> + .platform_data = &ref50_clk.rate,
> + },
> + .resource = uart0,
> + .num_resources = ARRAY_SIZE(uart0),
> +};
> +
> +static struct platform_device *xilinx_pdevices[] __initdata = {
> + &uart_device0,
> +};
> +
> +/**
> + * board_ep107_init - Board specific initialization for the Xilinx EP107 board.
> + *
> + **/
> +static void __init board_ep107_init(void)
> +{
> + xilinx_system_init();
> + platform_add_devices(&xilinx_pdevices[0], ARRAY_SIZE(xilinx_pdevices));
> +}
> +
> +MACHINE_START(XILINX_EP107, "Xilinx EP107")
> + .boot_params = PHYS_OFFSET + 0x00000100,
Should this use PLAT_PHYS_OFFSET?
Jamie
next prev parent reply other threads:[~2011-02-28 11:06 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1298052881-14591-1-git-send-email-john.linn@xilinx.com>
2011-02-18 18:14 ` [PATCH V4 1/4] ARM: Xilinx: Adding Xilinx board support John Linn
2011-02-18 18:14 ` John Linn
2011-02-28 11:06 ` Jamie Iles [this message]
2011-02-28 11:06 ` Jamie Iles
2011-02-28 14:13 ` John Linn
2011-02-28 14:13 ` John Linn
[not found] ` <1298052881-14591-2-git-send-email-john.linn@xilinx.com>
2011-02-18 18:14 ` [PATCH V4 2/4] ARM: Xilinx: Adding timer support to the platform John Linn
2011-02-18 18:14 ` John Linn
2011-02-28 11:11 ` Jamie Iles
2011-02-28 11:11 ` Jamie Iles
2011-02-28 14:14 ` John Linn
2011-02-28 14:14 ` John Linn
[not found] ` <1298052881-14591-3-git-send-email-john.linn@xilinx.com>
2011-02-18 18:14 ` [PATCH V4 3/4] ARM: Xilinx: base header files and assembly macros John Linn
2011-02-18 18:14 ` John Linn
2011-02-20 21:37 ` Arnd Bergmann
2011-02-20 21:37 ` Arnd Bergmann
2011-02-21 0:18 ` John Linn
2011-02-21 0:18 ` John Linn
2011-02-21 8:36 ` Arnd Bergmann
2011-02-21 8:36 ` Arnd Bergmann
2011-02-21 14:36 ` John Linn
2011-02-21 14:36 ` John Linn
2011-02-21 14:48 ` Arnd Bergmann
2011-02-21 14:48 ` Arnd Bergmann
2011-02-21 15:04 ` John Linn
2011-02-21 15:04 ` John Linn
2011-02-21 15:17 ` Russell King - ARM Linux
2011-02-21 15:17 ` Russell King - ARM Linux
2011-02-21 21:08 ` CLOCK_TICK_RATE, was: " Arnd Bergmann
2011-02-21 21:08 ` Arnd Bergmann
2011-02-21 21:51 ` Thomas Gleixner
2011-02-21 21:51 ` Thomas Gleixner
2011-02-28 11:18 ` Jamie Iles
2011-02-28 11:18 ` Jamie Iles
2011-02-28 14:20 ` John Linn
2011-02-28 14:20 ` John Linn
2011-02-28 15:01 ` Jamie Iles
2011-02-28 15:01 ` Jamie Iles
2011-02-28 11:20 ` Russell King - ARM Linux
2011-02-28 11:20 ` Russell King - ARM Linux
2011-02-28 14:22 ` [PATCH V4 3/4] ARM: Xilinx: base header files and assemblymacros John Linn
2011-02-28 14:22 ` John Linn
[not found] ` <1298052881-14591-4-git-send-email-john.linn@xilinx.com>
2011-02-18 18:14 ` [PATCH V4 4/4] ARM: Xilinx: Adding Xilinx platform infrastructure support John Linn
2011-02-18 18:14 ` John Linn
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=20110228110618.GA8751@pulham.picochip.com \
--to=jamie@jamieiles.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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.