Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1349019 > unrolled thread

[PATCH 12/17] arm: Add new mach-oxnas

Started byNeil Armstrong <narmstrong@baylibre.com>
First post2016-03-03 12:50 +0100
Last post2016-03-03 14:50 +0100
Articles 6 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 12/17] arm: Add new mach-oxnas Neil Armstrong <narmstrong@baylibre.com> - 2016-03-03 12:50 +0100
    Re: [PATCH 12/17] arm: Add new mach-oxnas Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-03-03 12:50 +0100
      Re: [PATCH 12/17] arm: Add new mach-oxnas Neil Armstrong <narmstrong@baylibre.com> - 2016-03-03 13:40 +0100
    Re: [PATCH 12/17] arm: Add new mach-oxnas Arnd Bergmann <arnd@arndb.de> - 2016-03-03 14:00 +0100
      Re: [PATCH 12/17] arm: Add new mach-oxnas Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-03-03 14:40 +0100
        Re: [PATCH 12/17] arm: Add new mach-oxnas Arnd Bergmann <arnd@arndb.de> - 2016-03-03 14:50 +0100

#1349019 — [PATCH 12/17] arm: Add new mach-oxnas

FromNeil Armstrong <narmstrong@baylibre.com>
Date2016-03-03 12:50 +0100
Subject[PATCH 12/17] arm: Add new mach-oxnas
Message-ID<r8zVw-6xi-29@gated-at.bofh.it>
Add mach-oxnas directory containing Kconfig and generic oxnas
handling for future SoC specific features like system reset.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 arch/arm/mach-oxnas/Kconfig  | 24 ++++++++++++++++++++++++
 arch/arm/mach-oxnas/Makefile |  1 +
 arch/arm/mach-oxnas/oxnas.c  | 34 ++++++++++++++++++++++++++++++++++
 3 files changed, 59 insertions(+)
 create mode 100644 arch/arm/mach-oxnas/Kconfig
 create mode 100644 arch/arm/mach-oxnas/Makefile
 create mode 100644 arch/arm/mach-oxnas/oxnas.c

diff --git a/arch/arm/mach-oxnas/Kconfig b/arch/arm/mach-oxnas/Kconfig
new file mode 100644
index 0000000..6a1f24c
--- /dev/null
+++ b/arch/arm/mach-oxnas/Kconfig
@@ -0,0 +1,24 @@
+menuconfig ARCH_OXNAS
+	bool "PLX Technology OXNAS Family SoCs"
+	select ARCH_REQUIRE_GPIOLIB
+	select ARCH_HAS_RESET_CONTROLLER
+	select PINCTRL
+	depends on ARCH_MULTI_V5
+	help
+	  Support for OxNas SoC family developed by PLX Technology.
+	  (Formely Oxford Semiconductor)
+
+if ARCH_OXNAS
+
+config MACH_OX810SE
+	bool "Support OX810SE Based Products"
+	select CPU_ARM926T
+	select PLXTECH_RPS
+	select CLKSRC_RPS_TIMER
+	select RESET_OXNAS
+	select COMMON_CLK_OXNAS
+	select PINCTRL_OXNAS
+	help
+	  Include Support for the PLX Technology OX810SE SoC Based Products.
+
+endif
diff --git a/arch/arm/mach-oxnas/Makefile b/arch/arm/mach-oxnas/Makefile
new file mode 100644
index 0000000..c54bec7
--- /dev/null
+++ b/arch/arm/mach-oxnas/Makefile
@@ -0,0 +1 @@
+obj-y			:= oxnas.o
diff --git a/arch/arm/mach-oxnas/oxnas.c b/arch/arm/mach-oxnas/oxnas.c
new file mode 100644
index 0000000..ebdcd9d
--- /dev/null
+++ b/arch/arm/mach-oxnas/oxnas.c
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2016 Neil Armstrong <narmstrong@baylibre.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 <asm/mach/arch.h>
+#include <linux/of.h>
+#include <linux/of_platform.h>
+
+static const char * const oxnas_dt_compat[] __initconst = {
+	"plxtech,ox810se",
+	NULL,
+};
+
+static void __init oxnas_init(void)
+{
+	pr_info("OXNAS Device Tree boot\n");
+
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+}
+
+DT_MACHINE_START(OXNAS, "PLX Technology OXNAS Family")
+	.dt_compat	= oxnas_dt_compat,
+	.init_machine	= oxnas_init,
+MACHINE_END
-- 
1.9.1

[toc] | [next] | [standalone]


#1349037

FromRussell King - ARM Linux <linux@arm.linux.org.uk>
Date2016-03-03 12:50 +0100
Message-ID<r8zVy-6xi-61@gated-at.bofh.it>
In reply to#1349019
On Thu, Mar 03, 2016 at 12:40:05PM +0100, Neil Armstrong wrote:
> Add mach-oxnas directory containing Kconfig and generic oxnas
> handling for future SoC specific features like system reset.

Looking at the current contents of oxnas.c, do you actually need it?
What happens if you boot your with your DT without this file being
built?

-- 
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

[toc] | [prev] | [next] | [standalone]


#1349099

FromNeil Armstrong <narmstrong@baylibre.com>
Date2016-03-03 13:40 +0100
Message-ID<r8AHU-77v-3@gated-at.bofh.it>
In reply to#1349037
On 03/03/2016 12:49 PM, Russell King - ARM Linux wrote:
> Looking at the current contents of oxnas.c, do you actually need it?
> What happens if you boot your with your DT without this file being
> built?
> 

No, it's useless for now, it boots perfectly without.
It was only a base for adding the reset management in a next patchset.

Neil

[toc] | [prev] | [next] | [standalone]


#1349129

FromArnd Bergmann <arnd@arndb.de>
Date2016-03-03 14:00 +0100
Message-ID<r8B1h-7eH-19@gated-at.bofh.it>
In reply to#1349019
On Thursday 03 March 2016 12:40:05 Neil Armstrong wrote:
> +
> +config MACH_OX810SE
> +	bool "Support OX810SE Based Products"
> +	select CPU_ARM926T
> +	select PLXTECH_RPS
> +	select CLKSRC_RPS_TIMER
> +	select RESET_OXNAS
> +	select COMMON_CLK_OXNAS
> +	select PINCTRL_OXNAS

Please sort these alphabetically

> +
> +static void __init oxnas_init(void)
> +{
> +	pr_info("OXNAS Device Tree boot\n");
> +
> +	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> +}

I think you should at least remove this function, as the pr_info is not
needed and the rest is the default.

As Russell mentioned, the entire file is not really needed either, but
so far we have left the trivial per-platform files in place generally.

	Arnd

[toc] | [prev] | [next] | [standalone]


#1349158

FromRussell King - ARM Linux <linux@arm.linux.org.uk>
Date2016-03-03 14:40 +0100
Message-ID<r8BDX-7Jt-5@gated-at.bofh.it>
In reply to#1349129
On Thu, Mar 03, 2016 at 01:56:56PM +0100, Arnd Bergmann wrote:
> As Russell mentioned, the entire file is not really needed either, but
> so far we have left the trivial per-platform files in place generally.

I think that's something we should be looking to remove: if the
per-platform files give no benefit, then there is no point in
having them, and they just increase the size of the code base.

-- 
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

[toc] | [prev] | [next] | [standalone]


#1349172

FromArnd Bergmann <arnd@arndb.de>
Date2016-03-03 14:50 +0100
Message-ID<r8BNF-7MX-31@gated-at.bofh.it>
In reply to#1349158
On Thursday 03 March 2016 13:29:56 Russell King - ARM Linux wrote:
> On Thu, Mar 03, 2016 at 01:56:56PM +0100, Arnd Bergmann wrote:
> > As Russell mentioned, the entire file is not really needed either, but
> > so far we have left the trivial per-platform files in place generally.
> 
> I think that's something we should be looking to remove: if the
> per-platform files give no benefit, then there is no point in
> having them, and they just increase the size of the code base.
> 

I agree, I think the main reason it hasn't been done yet is that
nobody has thought in detail about whether or how to keep
the last remaining piece of information (the machine name as
printed in /proc/cpuinfo) when removing the machine descriptors.

If we want to keep that around, we could probably have a global
lookup table of root node compatible strings, or we decide to
use the contents of the "model" property instead. This has been
discussed several times in the pasts, without any real consensus.

	Arnd

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web