public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: andrew@lunn•ch (Andrew Lunn)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v4 3/9] arm: mach-mvebu: add source files
Date: Tue, 26 Jun 2012 10:47:15 +0200	[thread overview]
Message-ID: <20120626084715.GC25625@lunn.ch> (raw)
In-Reply-To: <1340699313-29331-4-git-send-email-gregory.clement@free-electrons.com>

> diff --git a/arch/arm/mach-mvebu/system-controller.c b/arch/arm/mach-mvebu/system-controller.c
> new file mode 100644
> index 0000000..2e98cd4
> --- /dev/null
> +++ b/arch/arm/mach-mvebu/system-controller.c
> @@ -0,0 +1,103 @@
> +/*
> + * System controller support for Armada 370 and XP platforms.
> + *
> + * Copyright (C) 2012 Marvell
> + *
> + * Lior Amsalem <alior@marvell•com>
> + * Gregory CLEMENT <gregory.clement@free-electrons•com>
> + * Thomas Petazzoni <thomas.petazzoni@free-electrons•com>
> + *
> + * This file is licensed under the terms of the GNU General Public
> + * License version 2.  This program is licensed "as is" without any
> + * warranty of any kind, whether express or implied.
> + *
> + * The Armada 370 and Armada XP SoCs both have a range of
> + * miscellaneous registers, that do not belong to a particular device,
> + * but rather provide system-level features. This basic
> + * system-controller driver provides a device tree binding for those
> + * registers, and implements utility functions offering various
> + * features related to those registers.
> + *
> + * For now, the feature set is limited to restarting the platform by a
> + * soft-reset, but it might be extended in the future.
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +#include <linux/of_address.h>
> +#include <linux/io.h>
> +
> +static void __iomem *system_controller_base;
> +static void __iomem *reset_base;
> +static unsigned long rstoutn_mask_reset_out_en;
> +
> +/* System controller registers */
> +#define ARMADA_370_XP_RESET_OFFSET		  0x60
> +#define OTHER_MVEBU_RESET_OFFSET		 0x108
> +#define MVEBU_RSTOUTN_MASK_OFFSET		   0x0
> +#define   OTHER_MVEBU_RSTOUTN_MASK_RESET_OUT_EN	   0x4
> +#define   ARMADA_370_XP_RSTOUTN_MASK_RESET_OUT_EN  0x1
> +#define MVEBU_SYSTEM_SOFT_RESET_OFFSET		   0x4
> +#define   MVEBU_SYSTEM_SOFT_RESET		   0x1
> +
> +#define OTHER_MVEBU_VARIANT	1
> +#define ARMADA_370_XP_VARIANT	2

Hi Gregory

Rather than OTHER, could you call this ORION?

I think it will then work on Orion5x, dove, kirkwood and mv78xx0.

I will try to test this on Orion5x and Kirkwood.

  Thanks
	Andrew

  reply	other threads:[~2012-06-26  8:47 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-26  8:28 [PATCH v4] arm: Add basic support for new Marvell Armada 370 and Armada XP SoC Gregory Clement
2012-06-26  8:28 ` [PATCH v4 1/9] clocksource: time-armada-370-xp: Marvell Armada 370/XP SoC timer driver Gregory Clement
2012-06-26  8:28 ` [PATCH v4 2/9] arm: mach-mvebu: add header Gregory Clement
2012-06-26  8:28 ` [PATCH v4 3/9] arm: mach-mvebu: add source files Gregory Clement
2012-06-26  8:47   ` Andrew Lunn [this message]
2012-06-26 10:05     ` Gregory CLEMENT
2012-06-26 10:21       ` Andrew Lunn
2012-06-26 16:17   ` Arnd Bergmann
2012-06-27  7:52     ` Gregory CLEMENT
2012-06-27  9:02     ` Ben Dooks
2012-06-26  8:28 ` [PATCH v4 4/9] arm: mach-mvebu: add support for Armada 370 and Armada XP with DT Gregory Clement
2012-06-26  8:28 ` [PATCH v4 5/9] arm: mach-mvebu: add documentation for new device tree bindings Gregory Clement
2012-06-26  8:53   ` Andrew Lunn
2012-06-26  9:42     ` Gregory CLEMENT
2012-06-26  8:28 ` [PATCH v4 6/9] arm: mach-mvebu: add defconfig Gregory Clement
2012-06-26  8:28 ` [PATCH v4 7/9] arm: mach-mvebu: add compilation/configuration change Gregory Clement
2012-06-26  8:28 ` [PATCH v4 8/9] arm: mach-mvebu: add entry to MAINTAINERS Gregory Clement
2012-06-26  8:28 ` [PATCH v4 9/9] ARM: mvebu: MPIC: read number of interrupts from control register Gregory Clement
2012-06-27  8:57 ` [PATCH v4] arm: Add basic support for new Marvell Armada 370 and Armada XP SoC Ben Dooks
2012-06-27  9:03   ` Gregory CLEMENT

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=20120626084715.GC25625@lunn.ch \
    --to=andrew@lunn$(echo .)ch \
    --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