Skip to contentSkip to conversation

Support for Fujitsu MB86S7X SoCs

PATCH New Vincent Yang 5 participants 18 messages Mar 4, 2015 – Apr 10, 2015

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

v7 cover Support for Fujitsu MB86S7X SoCs

Hello,

Fujitsu have a series of SoC already shipping based around
variations of 2xCA7+2xCA15 big.LITTLE architecture, and we would like to upstream the basic support in this series.

MB86S70 is a big.LITTLE platform with 2xCA7+2xCA15 and an additional
CM3 as the master. MB86S73 is a simple 2xCA7 and an additional CM3 master.

We will send a pull request for this series in the next few days
if there are no further issues.

Changes since v6:
* s/freqency/frequency in clock driver
* Macros for number of channels and register offset in MHU driver
* Added more comments in Documentation
* Removed unneeded amba_request_regions() from MHU driver

Changes since v5:
* Pass u32* instead of u32 value to/from mailbox api.
* devm_ioremap_resource() instead of devm_ioremap()
* Decrease verbosity of probe success print.

Changes since v4:
* Convert ARM MHU driver to be an AMBA driver

Changes since v3:
* Identify platform, by checking presence of DT node "fujitsu,mb86s70-scb-1.0" before populating cpu clocks and MCPM support.
* Disable clock upon gpio module remove
* Lower init level of gpio driver from subsys_initcall to module_init
* Use managed device resource allocation in MHU driver

Changes since v2:
* Minor cleanup of MCPM as suggested by Nicolas Pitre.

Changes since v1:
* Thanks to Arnd, modified clock driver to populate clocks only when some user need them. Node name changed from "fujitsu,mb86s70-clk" to "fujitsu,mb86s70-crg11" . Controller+Domain+Port of a clock are now three cells specified by the user node.
* aliases moved into board DTS files
* Voltage supply moved as per-board DT node.
* Removed default overly verbose loglevel=8
* Specify -march=armv7-a flag for mcpm.c and smc.S that contain ARMv7 specific code.
* Removed wrongly put outer_flush_all(), now using standard v7_exit_coherency_flush() instead of platform specific macro.
* Simplified GPIO offset calculations in gpio-mb86s70.c driver. And added .remove() for the driver
* ARM MHU driver provided a .remove() to enable module unloading.
* A few other misc cleanups suggested in v1 submission.

Thanks.

Jassi Brar (7):
ARM: Add platform support for Fujitsu MB86S7X SoCs
mailbox: arm_mhu: add driver for ARM MHU controller
ARM: MB86S7X: Add MCPM support
clk: Add clock driver for mb86s7x
dt: mb86s7x: add dt files for MB86S7x evbs
of: add Fujitsu vendor prefix
ARM: MB86S7x: Add configs

 Documentation/devicetree/bindings/arm/mb86s7x.txt  |   8 +
 .../bindings/clock/fujitsu,mb86s70-crg11.txt       |  26 +
 .../devicetree/bindings/mailbox/arm-mhu.txt        |  43 ++
 .../devicetree/bindings/soc/mb86s7x/scb_mhu.txt    |  35 ++
 .../devicetree/bindings/vendor-prefixes.txt        |   1 +
 MAINTAINERS                                        |   7 +
 arch/arm/Kconfig                                   |   2 +
 arch/arm/Makefile                                  |   1 +
 arch/arm/boot/dts/Makefile                         |   3 +
 arch/arm/boot/dts/mb86s70.dtsi                     |  91 ++++
 arch/arm/boot/dts/mb86s70eb.dts                    |  57 +++
 arch/arm/boot/dts/mb86s73.dtsi                     |  63 +++
 arch/arm/boot/dts/mb86s73eb.dts                    |  44 ++
 arch/arm/boot/dts/mb86s7x.dtsi                     | 142 ++++++
 arch/arm/configs/fujitsu_defconfig                 | 232 +++++++++
 arch/arm/configs/multi_v7_defconfig                |   5 +
 arch/arm/mach-mb86s7x/Kconfig                      |  19 +
 arch/arm/mach-mb86s7x/Makefile                     |   3 +
 arch/arm/mach-mb86s7x/board.c                      |  23 +
 arch/arm/mach-mb86s7x/mcpm.c                       | 318 ++++++++++++
 arch/arm/mach-mb86s7x/smc.S                        |  27 ++
 drivers/clk/Makefile                               |   1 +
 drivers/clk/clk-mb86s7x.c                          | 386 +++++++++++++++
 drivers/mailbox/Kconfig                            |   9 +
 drivers/mailbox/Makefile                           |   2 +
 drivers/mailbox/arm_mhu.c                          | 195 ++++++++
 drivers/soc/Makefile                               |   1 +
 drivers/soc/mb86s7x/Makefile                       |   4 +
 drivers/soc/mb86s7x/scb_mhu.c                      | 531 +++++++++++++++++++++
 include/soc/mb86s7x/scb_mhu.h                      | 105 ++++
 30 files changed, 2384 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/mb86s7x.txt
 create mode 100644 Documentation/devicetree/bindings/clock/fujitsu,mb86s70-crg11.txt
 create mode 100644 Documentation/devicetree/bindings/mailbox/arm-mhu.txt
 create mode 100644 Documentation/devicetree/bindings/soc/mb86s7x/scb_mhu.txt
 create mode 100644 arch/arm/boot/dts/mb86s70.dtsi
 create mode 100644 arch/arm/boot/dts/mb86s70eb.dts
 create mode 100644 arch/arm/boot/dts/mb86s73.dtsi
 create mode 100644 arch/arm/boot/dts/mb86s73eb.dts
 create mode 100644 arch/arm/boot/dts/mb86s7x.dtsi
 create mode 100644 arch/arm/configs/fujitsu_defconfig
 create mode 100644 arch/arm/mach-mb86s7x/Kconfig
 create mode 100644 arch/arm/mach-mb86s7x/Makefile
 create mode 100644 arch/arm/mach-mb86s7x/board.c
 create mode 100644 arch/arm/mach-mb86s7x/mcpm.c
 create mode 100644 arch/arm/mach-mb86s7x/smc.S
 create mode 100644 drivers/clk/clk-mb86s7x.c
 create mode 100644 drivers/mailbox/arm_mhu.c
 create mode 100644 drivers/soc/mb86s7x/Makefile
 create mode 100644 drivers/soc/mb86s7x/scb_mhu.c
 create mode 100644 include/soc/mb86s7x/scb_mhu.h
Signature · 1 line
1.9.0
#1 lore raw

PATCH v7 1/7 ARM: Add platform support for Fujitsu MB86S7X SoCs

From: Jassi Brar <[email protected]>

The MB86S7X is a bigLITTLE configuration of 2xCA7 & 2xCA15 under Linux. And the remote master firmware (called SCB) running on CM3. Linux asks for things to be done over Mailbox API, to SCB which controls most of the important things. variations S70 & S73 are supported.

---
 Documentation/devicetree/bindings/arm/mb86s7x.txt  |   8 +
 .../devicetree/bindings/soc/mb86s7x/scb_mhu.txt    |  35 ++
 MAINTAINERS                                        |   7 +
 arch/arm/Kconfig                                   |   2 +
 arch/arm/Makefile                                  |   1 +
 arch/arm/mach-mb86s7x/Kconfig                      |  19 +
 arch/arm/mach-mb86s7x/Makefile                     |   1 +
 arch/arm/mach-mb86s7x/board.c                      |  23 +
 drivers/soc/Makefile                               |   1 +
 drivers/soc/mb86s7x/Makefile                       |   4 +
 drivers/soc/mb86s7x/scb_mhu.c                      | 517 +++++++++++++++++++++
 include/soc/mb86s7x/scb_mhu.h                      |  97 ++++
 12 files changed, 715 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/mb86s7x.txt
 create mode 100644 Documentation/devicetree/bindings/soc/mb86s7x/scb_mhu.txt
 create mode 100644 arch/arm/mach-mb86s7x/Kconfig
 create mode 100644 arch/arm/mach-mb86s7x/Makefile
 create mode 100644 arch/arm/mach-mb86s7x/board.c
 create mode 100644 drivers/soc/mb86s7x/Makefile
 create mode 100644 drivers/soc/mb86s7x/scb_mhu.c
 create mode 100644 include/soc/mb86s7x/scb_mhu.h
Documentation/devicetree/bindings/arm/mb86s7x.txt new file +8 -0
new file mode 100644
index 0000000..fbaad20
@@ -0,0 +1,8 @@
+Fujitsu MB86S7X Device Tree Bindings
+
+Fujitsu has a few closely related platforms that are basically different
+configurations of each others. Like MB86S7{0,1,2,3}.
+
+The EVB boards with S70/S73 have the following property:
+Required root node property:
+	compatible: must contain "fujitsu,mb86s70-evb" or "fujitsu,mb86s73-evb"
Documentation/devicetree/bindings/soc/mb86s7x/scb_mhu.txt new file +35 -0
new file mode 100644
index 0000000..f466a05
@@ -0,0 +1,35 @@
+Fujitsu SCB (Mailbox's Remote Firmware) bindings
+------------------------------------------------
+
+The firmware (running of a remote Cortex-M3 master) on Fujitsu's MB86S7X
+platforms is named SCB. The SCB owns most of core h/w IPs like Clock,
+CPUFreq/DVFS, CPUIdle/SMP, Thermal, a recovery block device and even an
+I2C controller. Linux has to map all of these functionalities on to
+the Mailbox API and get things done by the remote master.
+ Let the current state of SCB firmware be versioned 1.0.
+
+Required properties :
+- compatible : Shall contain "fujitsu,mb86s70-scb-1.0"
+- reg : Point to SharedMemory used for Mailbox protocol.
+- mboxes : phandle to the mailbox controller:channel node.
+
+The consumer specifies the desired clock pointing to its phandle.
+
+Example:
+
+	mhu: mhu0 at 2b1f0000 {
+		#mbox-cells = <1>;
+		compatible = "arm,mhu";
+		reg = <0 0x2b1f0000 0x1000>;
+		interrupts = <0 36 4>, /* LP Non-Sec */
+			     <0 35 4>, /* HP Non-Sec */
+			     <0 37 4>; /* Secure */
+		clocks = <&clk 0 2 1>;
+		clock-names = "apb_pclk";
+	};
+
+	mhu_client: scb at 2e000000 {
+		compatible = "fujitsu,mb86s70-scb-1.0";
+		reg = <0 0x2e000000 0x4000>; /* SHM for IPC */
+		mboxes = <&mhu 1>;
+	};
MAINTAINERS +7 -0
index eaf9996..e8faa31 100644
@@ -1127,6 +1127,13 @@ M:	Lennert Buytenhek <[email protected]>
 L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
 S:	Maintained
 
+ARM/MB86S7X SOC SUPPORT
+M:	Vincent Yang <[email protected]>
+M:	Tetsuya Nuriya <[email protected]>
+L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
+S:	Supported
+F:	arch/arm/mach-mb86s7x/
+
 ARM/TEXAS INSTRUMENT KEYSTONE ARCHITECTURE
 M:	Santosh Shilimkar <[email protected]>
 L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
arch/arm/Kconfig +2 -0
index 9f1f09a..c2da7b1 100644
@@ -888,6 +888,8 @@ source "arch/arm/mach-keystone/Kconfig"
 
 source "arch/arm/mach-ks8695/Kconfig"
 
+source "arch/arm/mach-mb86s7x/Kconfig"
+
 source "arch/arm/mach-meson/Kconfig"
 
 source "arch/arm/mach-msm/Kconfig"
arch/arm/Makefile +1 -0
index 7f99cd6..159f678 100644
@@ -167,6 +167,7 @@ machine-$(CONFIG_ARCH_IXP4XX)		+= ixp4xx
 machine-$(CONFIG_ARCH_KEYSTONE)		+= keystone
 machine-$(CONFIG_ARCH_KS8695)		+= ks8695
 machine-$(CONFIG_ARCH_LPC32XX)		+= lpc32xx
+machine-$(CONFIG_ARCH_MB86S7X)		+= mb86s7x
 machine-$(CONFIG_ARCH_MESON)		+= meson
 machine-$(CONFIG_ARCH_MMP)		+= mmp
 machine-$(CONFIG_ARCH_MOXART)		+= moxart
arch/arm/mach-mb86s7x/Kconfig new file +19 -0
new file mode 100644
index 0000000..f58b104
@@ -0,0 +1,19 @@
+config ARCH_MB86S7X
+	bool "Fujitsu MB86S7x platforms" if ARCH_MULTI_V7
+	select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
+	select ARCH_HAS_CPUFREQ
+	select ARCH_HAS_OPP
+	select ARCH_REQUIRE_GPIOLIB
+	select ARM_AMBA
+	select ARM_CCI
+	select ARM_GIC
+	select ARM_TIMER_SP804
+	select BIG_LITTLE
+	select HAVE_ARM_ARCH_TIMER
+	select MAILBOX
+	select PINCTRL
+	select PINCTRL_MB86S7X
+	select PM_OPP
+	select ZONE_DMA if ARM_LPAE
+	help
+	  Support for Fujitsu MB86S7x based platforms
arch/arm/mach-mb86s7x/Makefile new file +1 -0
new file mode 100644
index 0000000..97640b6
@@ -0,0 +1 @@
+obj-$(CONFIG_ARCH_MB86S7X)	+= board.o
arch/arm/mach-mb86s7x/board.c new file +23 -0
new file mode 100644
index 0000000..222b63f
@@ -0,0 +1,23 @@
+/*
+ * Support for the Fujitsu's MB86S7x based devices.
+ *
+ * Copyright (C) 2015 Linaro, LTD
+ *
+ * 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, version 2 of the License.
+ *
+ */
+
+#include <linux/of.h>
+#include <asm/mach/arch.h>
+
+static const char *mb86s7x_dt_match[] __initconst = {
+	"fujitsu,mb86s70-evb",
+	"fujitsu,mb86s73-evb",
+	NULL,
+};
+
+DT_MACHINE_START(MB86S7X_DT, "Fujitsu MB86S7X-based board")
+	.dt_compat	= mb86s7x_dt_match,
+MACHINE_END
drivers/soc/Makefile +1 -0
index 063113d..fb64bf2 100644
@@ -2,6 +2,7 @@
 # Makefile for the Linux Kernel SOC specific device drivers.
 #
 
+obj-$(CONFIG_ARCH_MB86S7X)	+= mb86s7x/
 obj-$(CONFIG_ARCH_QCOM)		+= qcom/
 obj-$(CONFIG_ARCH_TEGRA)	+= tegra/
 obj-$(CONFIG_SOC_TI)		+= ti/
drivers/soc/mb86s7x/Makefile new file +4 -0
new file mode 100644
index 0000000..f6b96cf
@@ -0,0 +1,4 @@
+#
+# Fujitsu's MB86S7X drivers
+#
+obj-$(CONFIG_ARCH_MB86S7X)	+= scb_mhu.o
drivers/soc/mb86s7x/scb_mhu.c new file +517 -0

517 lines not on this page · raw message

include/soc/mb86s7x/scb_mhu.h new file +97 -0

97 lines not on this page · raw message

Signature · 1 line
1.9.0
#2 lore raw

PATCH v7 2/7 mailbox: arm_mhu: add driver for ARM MHU controller

In reply to Vincent Yang

From: Jassi Brar <[email protected]>

Add driver for the ARM Primecell Message-Handling-Unit(MHU) controller.

---
 .../devicetree/bindings/mailbox/arm-mhu.txt        |  43 +++++
 drivers/mailbox/Kconfig                            |   9 +
 drivers/mailbox/Makefile                           |   2 +
 drivers/mailbox/arm_mhu.c                          | 195 +++++++++++++++++++++
 4 files changed, 249 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mailbox/arm-mhu.txt
 create mode 100644 drivers/mailbox/arm_mhu.c
Documentation/devicetree/bindings/mailbox/arm-mhu.txt new file +43 -0
new file mode 100644
index 0000000..4971f03
@@ -0,0 +1,43 @@
+ARM MHU Mailbox Driver
+======================
+
+The ARM's Message-Handling-Unit (MHU) is a mailbox controller that has
+3 independent channels/links to communicate with remote processor(s).
+ MHU links are hardwired on a platform. A link raises interrupt for any
+received data. However, there is no specified way of knowing if the sent
+data has been read by the remote. This driver assumes the sender polls
+STAT register and the remote clears it after having read the data.
+The last channel is specified to be a 'Secure' resource, hence can't be
+used by Linux running NS.
+
+Mailbox Device Node:
+====================
+
+Required properties:
+--------------------
+- compatible:		Shall be "arm,mhu" & "arm,primecell"
+- reg:			Contains the mailbox register address range (base
+			address and length)
+- #mbox-cells		Shall be 1 - the index of the channel needed.
+- interrupts:		Contains the interrupt information corresponding to
+			each of the 3 links of MHU.
+
+Example:
+--------
+
+	mhu: mailbox at 2b1f0000 {
+		#mbox-cells = <1>;
+		compatible = "arm,mhu", "arm,primecell";
+		reg = <0 0x2b1f0000 0x1000>;
+		interrupts = <0 36 4>, /* LP-NonSecure */
+			     <0 35 4>, /* HP-NonSecure */
+			     <0 37 4>; /* Secure */
+		clocks = <&clock 0 2 1>;
+		clock-names = "apb_pclk";
+	};
+
+	mhu_client: scb at 2e000000 {
+		compatible = "fujitsu,mb86s70-scb-1.0";
+		reg = <0 0x2e000000 0x4000>;
+		mboxes = <&mhu 1>; /* HP-NonSecure */
+	};
drivers/mailbox/Kconfig +9 -0
index 84325f2..84b0a2d 100644
@@ -6,6 +6,15 @@ menuconfig MAILBOX
 	  signals. Say Y if your platform supports hardware mailboxes.
 
 if MAILBOX
+
+config ARM_MHU
+	tristate "ARM MHU Mailbox"
+	depends on ARM_AMBA
+	help
+	  Say Y here if you want to build the ARM MHU controller driver.
+	  The controller has 3 mailbox channels, the last of which can be
+	  used in Secure mode only.
+
 config PL320_MBOX
 	bool "ARM PL320 Mailbox"
 	depends on ARM_AMBA
drivers/mailbox/Makefile +2 -0
index 2e79231..b18201e 100644
@@ -2,6 +2,8 @@
 
 obj-$(CONFIG_MAILBOX)		+= mailbox.o
 
+obj-$(CONFIG_ARM_MHU)	+= arm_mhu.o
+
 obj-$(CONFIG_PL320_MBOX)	+= pl320-ipc.o
 
 obj-$(CONFIG_OMAP2PLUS_MBOX)	+= omap-mailbox.o
drivers/mailbox/arm_mhu.c new file +195 -0

195 lines not on this page · raw message

Signature · 1 line
1.9.0
#3 lore raw

PATCH v7 2/7 mailbox: arm_mhu: add driver for ARM MHU controller

Hi Vincent,

I see that this driver is queued but most of my earlier comments were not addressed. *No ACK from DT binding maintainers too*.

Quoted 23 lines · Vincent Yang

From: Jassi Brar <[email protected]>

Add driver for the ARM Primecell Message-Handling-Unit(MHU) controller.

---
  .../devicetree/bindings/mailbox/arm-mhu.txt        |  43 +++++
  drivers/mailbox/Kconfig                            |   9 +
  drivers/mailbox/Makefile                           |   2 +
  drivers/mailbox/arm_mhu.c                          | 195 +++++++++++++++++++++
  4 files changed, 249 insertions(+)

create mode 100644 Documentation/devicetree/bindings/mailbox/arm-mhu.txt create mode 100644 drivers/mailbox/arm_mhu.c

Documentation/devicetree/bindings/mailbox/arm-mhu.txt new file +0 -0
new file mode 100644
index 0000000..4971f03

Documentation/devicetree/bindings/mailbox/arm-mhu.txt line 6

Quoted 6 lines
Documentation/devicetree/bindings/mailbox/arm-mhu.txt new file +6 -0
@@ -0,0 +1,43 @@
+ARM MHU Mailbox Driver
+======================
+
+The ARM's Message-Handling-Unit (MHU) is a mailbox controller that has
+3 independent channels/links to communicate with remote processor(s).
+ MHU links are hardwired on a platform. A link raises interrupt for any

As I had mentioned before it's just one implementation, the IP had provision bi-directional interrupts and the binding *has to consider* that instead of having to workaround that later.

Documentation/devicetree/bindings/mailbox/arm-mhu.txt line 7

Quoted 1 line
Documentation/devicetree/bindings/mailbox/arm-mhu.txt new file +1 -0
+received data. However, there is no specified way of knowing if the sent

You can drop the above line or specify as you can still poll.

Documentation/devicetree/bindings/mailbox/arm-mhu.txt line 8

Quoted 1 line
Documentation/devicetree/bindings/mailbox/arm-mhu.txt new file +1 -0
+data has been read by the remote. This driver assumes the sender polls

Bindings not supposed have any details on how driver handle it. You can just mention that in absence of interrupt, we can know the status of transmission by polling STAT register.

Documentation/devicetree/bindings/mailbox/arm-mhu.txt line 12

Quoted 4 lines
Documentation/devicetree/bindings/mailbox/arm-mhu.txt new file +4 -0
+STAT register and the remote clears it after having read the data.
+The last channel is specified to be a 'Secure' resource, hence can't be
+used by Linux running NS.
+

Correct so drop the support for secure channel until the first user comes up. I am worried it might generate abort if someone tries to access it in ARM64 which always runs in non-secure.

Documentation/devicetree/bindings/mailbox/arm-mhu.txt line 24

Quoted 12 lines
Documentation/devicetree/bindings/mailbox/arm-mhu.txt new file +12 -0
+Mailbox Device Node:
+====================
+
+Required properties:
+--------------------
+- compatible:		Shall be "arm,mhu" & "arm,primecell"
+- reg:			Contains the mailbox register address range (base
+			address and length)
+- #mbox-cells		Shall be 1 - the index of the channel needed.
+- interrupts:		Contains the interrupt information corresponding to
+			each of the 3 links of MHU.
+

As mentioned multiple times before, please add interrupt-names to make sure we can handle bi-directional interrupt.

Quoted 19 lines
Documentation/devicetree/bindings/mailbox/arm-mhu.txt new file +19 -0
+Example:
+--------
+
+	mhu: mailbox at 2b1f0000 {
+		#mbox-cells = <1>;
+		compatible = "arm,mhu", "arm,primecell";
+		reg = <0 0x2b1f0000 0x1000>;
+		interrupts = <0 36 4>, /* LP-NonSecure */
+			     <0 35 4>, /* HP-NonSecure */
+			     <0 37 4>; /* Secure */
+		clocks = <&clock 0 2 1>;
+		clock-names = "apb_pclk";
+	};
+
+	mhu_client: scb at 2e000000 {
+		compatible = "fujitsu,mb86s70-scb-1.0";
+		reg = <0 0x2e000000 0x4000>;
+		mboxes = <&mhu 1>; /* HP-NonSecure */
+	};

[...]

Quoted 33 lines
drivers/mailbox/arm_mhu.c new file +27 -0
new file mode 100644
index 0000000..ac693c6
@@ -0,0 +1,195 @@
+/*
+ * Copyright (C) 2013-2015 Fujitsu Semiconductor Ltd.
+ * Copyright (C) 2015 Linaro Ltd.
+ * Author: Jassi Brar <[email protected]>
+ *
+ * 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, version 2 of the License.
+ *
+ * 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/interrupt.h>
+#include <linux/spinlock.h>
+#include <linux/mutex.h>
+#include <linux/delay.h>
+#include <linux/slab.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/amba/bus.h>
+#include <linux/mailbox_controller.h>
+
+#define INTR_STAT_OFS	0x0

drivers/mailbox/arm_mhu.c line 37

Quoted 10 lines
drivers/mailbox/arm_mhu.c new file +10 -0
+#define INTR_SET_OFS	0x8
+#define INTR_CLR_OFS	0x10
+
+#define MHU_LP_OFFSET	0x0
+#define MHU_HP_OFFSET	0x20
+#define MHU_SEC_OFFSET	0x200
+#define TX_REG_OFFSET	0x100
+
+#define MHU_CHANS	3
+

For now I prefer 2.

[...]

Quoted 22 lines
drivers/mailbox/arm_mhu.c new file +22 -0
+static int mhu_probe(struct amba_device *adev, const struct amba_id *id)
+{
+	int i, err;
+	struct arm_mhu *mhu;
+	struct device *dev = &adev->dev;
+	int mhu_reg[MHU_CHANS] = {MHU_LP_OFFSET, MHU_HP_OFFSET, MHU_SEC_OFFSET};
+
+	/* Allocate memory for device */
+	mhu = devm_kzalloc(dev, sizeof(*mhu), GFP_KERNEL);
+	if (!mhu)
+		return -ENOMEM;
+
+	mhu->base = devm_ioremap_resource(dev, &adev->res);
+	if (IS_ERR(mhu->base)) {
+		dev_err(dev, "ioremap failed\n");
+		return PTR_ERR(mhu->base);
+	}
+
+	for (i = 0; i < MHU_CHANS; i++) {
+		mhu->chan[i].con_priv = &mhu->mlink[i];
+		mhu->mlink[i].irq = adev->irq[i];
+		mhu->mlink[i].rx_reg = mhu->base + mhu_reg[i];

drivers/mailbox/arm_mhu.c line 151

Quoted 10 lines
drivers/mailbox/arm_mhu.c new file +10 -0
+		mhu->mlink[i].tx_reg = mhu->mlink[i].rx_reg + TX_REG_OFFSET;
+	}
+
+	mhu->mbox.dev = dev;
+	mhu->mbox.chans = &mhu->chan[0];
+	mhu->mbox.num_chans = MHU_CHANS;
+	mhu->mbox.ops = &mhu_ops;
+	mhu->mbox.txdone_irq = false;
+	mhu->mbox.txdone_poll = true;
+	mhu->mbox.txpoll_period = 10;

IMO too high value, as I mentioned you assume jiffy value. The kernel will take care of conversion.

[...]

drivers/mailbox/arm_mhu.c line 176

Quoted 4 lines
drivers/mailbox/arm_mhu.c new file +4 -0
+
+static struct amba_id mhu_ids[] = {
+	{
+		.id	= 0x1bb098,

As I mentioned couple of times this is broken. Please refer my earlier mail for details. You are skipping a field to compare which incorrect. You are just trying to get it working with existing AMBA driver without any changes matching the IDs partially.

Regards,
Sudeep

maintainer
#4 lore raw

PATCH v7 2/7 mailbox: arm_mhu: add driver for ARM MHU controller

Quoted 5 lines · Sudeep Holla

Hi Vincent,

I see that this driver is queued but most of my earlier comments were not addressed.

Some of your comments have been addressed as changes and some as replies.

Quoted 2 lines

*No ACK from DT binding maintainers too*.

Yeah it would have been great to have some ack. It has been many months now, but I see its not uncommon for bindings go in via maintainers. I assume folks find it just normal.

Quoted 5 lines
Quoted 5 lines

+++ b/Documentation/devicetree/bindings/mailbox/arm-mhu.txt

Documentation/devicetree/bindings/mailbox/arm-mhu.txt new file +3 -0
@@ -0,0 +1,43 @@
+ARM MHU Mailbox Driver
+======================
+
Quoted 9 lines

Documentation/devicetree/bindings/mailbox/arm-mhu.txt line 6

Quoted 3 lines
Documentation/devicetree/bindings/mailbox/arm-mhu.txt new file +3 -0
+The ARM's Message-Handling-Unit (MHU) is a mailbox controller that has
+3 independent channels/links to communicate with remote processor(s).
+ MHU links are hardwired on a platform. A link raises interrupt for any

As I had mentioned before it's just one implementation, the IP had provision bi-directional interrupts and the binding *has to consider* that instead of having to workaround that later.

I will reply in yet another way.... the spec I have don't mention that (and it makes sense) and your platform doesn't do that either. I would have had to do something about it, had there been such a weird setup, but there's none known.

So let us please avoid getting into bikeshedding discussion yet
again. Otherwise almost every binding is broken because there could always be some platform that does weird things with irqs.

Quoted 6 lines

Documentation/devicetree/bindings/mailbox/arm-mhu.txt line 11

Quoted 2 lines
Documentation/devicetree/bindings/mailbox/arm-mhu.txt new file +2 -0
+The last channel is specified to be a 'Secure' resource, hence can't be
+used by Linux running NS.

Correct so drop the support for secure channel until the first user comes up.

In your last post you said:
"Sorry my statement was not clear, I wanted to ask you to add that info
to the binding."
Not that it makes sense to say the obvious, I added it just to
address your comment.

Quoted 3 lines

I am worried it might generate abort if someone tries to access it in ARM64 which always runs in non-secure.

Abort should have happened years ago if someone _tries_ to access a secure resource from non-secure mode ;)
How do you protect such people from "trying to" dereference NULL pointers? (you made me repeat Nth time).

Quoted 11 lines

drivers/mailbox/arm_mhu.c line 176

Quoted 4 lines
drivers/mailbox/arm_mhu.c new file +4 -0
+
+static struct amba_id mhu_ids[] = {
+       {
+               .id     = 0x1bb098,

As I mentioned couple of times this is broken. Please refer my earlier mail for details. You are skipping a field to compare which incorrect. You are just trying to get it working with existing AMBA driver without any changes matching the IDs partially.

I did not miss your last mail. Let me try to reply in even simpler terms... PID[0,3] identification is fine grained enough. If/when we have some platform with non-ARM MHU, we could catch that in this driver. Most likely even then the reg-map won't change drastically, if at all. So we could ignore the PID4, otherwise we check PID4 in this driver and adapt the behavior.

-Jassi

#5 lore raw

PATCH v7 2/7 mailbox: arm_mhu: add driver for ARM MHU controller

Quoted 6 lines · Jassi Brar
Quoted 5 lines · Sudeep Holla

Hi Vincent,

I see that this driver is queued but most of my earlier comments were not addressed.

Quoted 8 lines

Some of your comments have been addressed as changes and some as replies.

Quoted 2 lines

*No ACK from DT binding maintainers too*.

Yeah it would have been great to have some ack. It has been many months now, but I see its not uncommon for bindings go in via maintainers. I assume folks find it just normal.

OK, but I have one concern in the binding as mentioned previous and again as below.

Quoted 14 lines
Quoted 5 lines
Quoted 5 lines

+++ b/Documentation/devicetree/bindings/mailbox/arm-mhu.txt

Documentation/devicetree/bindings/mailbox/arm-mhu.txt new file +3 -0
@@ -0,0 +1,43 @@
+ARM MHU Mailbox Driver
+======================
+
Quoted 9 lines

Documentation/devicetree/bindings/mailbox/arm-mhu.txt line 6

Quoted 3 lines
Documentation/devicetree/bindings/mailbox/arm-mhu.txt new file +3 -0
+The ARM's Message-Handling-Unit (MHU) is a mailbox controller that has
+3 independent channels/links to communicate with remote processor(s).
+ MHU links are hardwired on a platform. A link raises interrupt for any

As I had mentioned before it's just one implementation, the IP had provision bi-directional interrupts and the binding *has to consider* that instead of having to workaround that later.

Quoted 5 lines

I will reply in yet another way.... the spec I have don't mention that (and it makes sense) and your platform doesn't do that either. I would have had to do something about it, had there been such a weird setup, but there's none known.

Not just weird setup, even extending Tx support with this binding is not straight forward.

Simple example:
Today you have:

		interrupts = <0 36 4>, /* LP-NonSecure */
			     <0 35 4>, /* HP-NonSecure */
			     <0 37 4>; /* Secure */

I don't want to specify Secure IRQ on my platform, which should be fine. In future a variant of that platform gets Tx interrupts, then I will add something like below:

		interrupts = <0 36 4>, /* LP-NonSecure Rx */
			     <0 35 4>, /* HP-NonSecure Rx */
			     <0 39 4>, /* LP-NonSecure Tx */
			     <0 38 4>, /* HP-NonSecure Tx */

Now how will we handle this ?

I am just suggesting to use interrupt-names so that we don't depend on ordering in DT implicitly from first by fixing the binding.

Quoted 4 lines

So let us please avoid getting into bikeshedding discussion yet
again. Otherwise almost every binding is broken because there could always be some platform that does weird things with irqs.

Sorry I don't buy that given that using interrupt-names simplifies things and also helps to hand any such cases.

Quoted 12 lines
Quoted 6 lines

Documentation/devicetree/bindings/mailbox/arm-mhu.txt line 11

Quoted 2 lines
Documentation/devicetree/bindings/mailbox/arm-mhu.txt new file +2 -0
+The last channel is specified to be a 'Secure' resource, hence can't be
+used by Linux running NS.

Correct so drop the support for secure channel until the first user comes up.

In your last post you said:
"Sorry my statement was not clear, I wanted to ask you to add that info
to the binding."
Not that it makes sense to say the obvious, I added it just to
address your comment.

Quoted 8 lines
Quoted 3 lines

I am worried it might generate abort if someone tries to access it in ARM64 which always runs in non-secure.

Abort should have happened years ago if someone _tries_ to access a secure resource from non-secure mode ;)
How do you protect such people from "trying to" dereference NULL pointers? (you made me repeat Nth time).

When the general practice everywhere in the kernel is to avoid secure accesses *unless and until absolutely necessary*, I don't understand *why exactly we need the exception here* ? I am OK if you add that justification with the first user of that channel. We have seen several cases/issues around that and I am just looking for a strong reason to add secure channel support here.

Quoted 11 lines
Quoted 11 lines

drivers/mailbox/arm_mhu.c line 176

Quoted 4 lines
drivers/mailbox/arm_mhu.c new file +4 -0
+
+static struct amba_id mhu_ids[] = {
+       {
+               .id     = 0x1bb098,

As I mentioned couple of times this is broken. Please refer my earlier mail for details. You are skipping a field to compare which incorrect. You are just trying to get it working with existing AMBA driver without any changes matching the IDs partially.

Quoted 6 lines

I did not miss your last mail. Let me try to reply in even simpler terms... PID[0,3] identification is fine grained enough. If/when we have some platform with non-ARM MHU, we could catch that in this driver. Most likely even then the reg-map won't change drastically, if at all. So we could ignore the PID4, otherwise we check PID4 in this driver and adapt the behavior.

I am just looking for ARM MHU implementation, not any non-ARM MHU. If look at the MHU spec[1], excerpts below:

PID_4 Register

[31:8] - Reserved. Read as zero.
[7:4] SIZE Indicates the log2 of the number of 4KB blocks that the
interface occupies. Set to 0x0.
[3:0] DES_2 JEP106 continuation code that identifies the designer. Set
to 0x4 for ARM.

PID_1 Register

[31:8] - Reserved. Read as zero.
[7:4] DES_0 Bits [3:0] of the JEP Identity. Set to 0xB for ARM.
[3:0] PART_1 Bits [11:8] of the part number. Set to 0x0.

Now by skipping PID4 DES_2 part, you are not comparing the designer correctly. It may be OK to fix in the driver as you mentioned. Not sure if it's better to fix AMBA, or just don't use AMBA for IP with JEP106 code. I don't have any strong opinion there.

Regards,
Sudeep

[1]
http://infocenter.arm.com/help/topic/com.arm.doc.ddi0515b/CHDBFACE.html#id5278622

#6 lore raw

PATCH v7 2/7 mailbox: arm_mhu: add driver for ARM MHU controller

In reply to Vincent Yang

Hi Vincent,

Forgot couple of things earlier:

Quoted 17 lines · Vincent Yang

From: Jassi Brar <[email protected]>

Add driver for the ARM Primecell Message-Handling-Unit(MHU) controller.

---
  .../devicetree/bindings/mailbox/arm-mhu.txt        |  43 +++++
  drivers/mailbox/Kconfig                            |   9 +
  drivers/mailbox/Makefile                           |   2 +
  drivers/mailbox/arm_mhu.c                          | 195 +++++++++++++++++++++
  4 files changed, 249 insertions(+)

create mode 100644 Documentation/devicetree/bindings/mailbox/arm-mhu.txt create mode 100644 drivers/mailbox/arm_mhu.c

[...]

drivers/mailbox/arm_mhu.c line 80

Quoted 5 lines
drivers/mailbox/arm_mhu.c new file +5 -0
+static int mhu_send_data(struct mbox_chan *chan, void *data)
+{
+	struct mhu_link *mlink = chan->con_priv;
+	u32 *arg = data;
+

Arnd doesn't like this and had suggestions in some other thread.

Quoted 6 lines
drivers/mailbox/arm_mhu.c new file +6 -0
+	writel_relaxed(*arg, mlink->tx_reg + INTR_SET_OFS);
+
+	return 0;
+}
+
+static int mhu_startup(struct mbox_chan *chan)

drivers/mailbox/arm_mhu.c line 96

Quoted 10 lines
drivers/mailbox/arm_mhu.c new file +10 -0
+{
+	struct mhu_link *mlink = chan->con_priv;
+	u32 val;
+	int ret;
+
+	val = readl_relaxed(mlink->tx_reg + INTR_STAT_OFS);
+	writel_relaxed(val, mlink->tx_reg + INTR_CLR_OFS);
+
+	ret = request_irq(mlink->irq, mhu_rx_interrupt,
+			  IRQF_SHARED, "mhu_link", chan);

Any reason we can't move this to probe and have {en,dis}able_irq here if needed. I has seen it was too heavy to have these especially when sending small packets.

Regards,
Sudeep

maintainer
#7 lore raw

PATCH v7 2/7 mailbox: arm_mhu: add driver for ARM MHU controller

Quoted 8 lines · Sudeep Holla

drivers/mailbox/arm_mhu.c line 79

Quoted 5 lines
drivers/mailbox/arm_mhu.c new file +4 -0
+static int mhu_send_data(struct mbox_chan *chan, void *data)
+{
+       struct mhu_link *mlink = chan->con_priv;
+       u32 *arg = data;

Arnd doesn't like this and had suggestions in some other thread.

No, Arnd suggested doing it this way. And another platform's driver was made to do this way.

Quoted 13 lines
Quoted 13 lines
drivers/mailbox/arm_mhu.c new file +13 -0
+       writel_relaxed(*arg, mlink->tx_reg + INTR_SET_OFS);
+
+       return 0;
+}
+
+static int mhu_startup(struct mbox_chan *chan)
+{
+       struct mhu_link *mlink = chan->con_priv;
+       u32 val;
+       int ret;
+
+       val = readl_relaxed(mlink->tx_reg + INTR_STAT_OFS);
+       writel_relaxed(val, mlink->tx_reg + INTR_CLR_OFS);
Quoted 9 lines

drivers/mailbox/arm_mhu.c line 96

Quoted 3 lines
drivers/mailbox/arm_mhu.c new file +3 -0
+
+       ret = request_irq(mlink->irq, mhu_rx_interrupt,
+                         IRQF_SHARED, "mhu_link", chan);

Any reason we can't move this to probe and have {en,dis}able_irq here if needed. I has seen it was too heavy to have these especially when sending small packets.

I see you used to do memcpy in irq-handler
https://git.linaro.org/landing-teams/working/arm/kernel.git/blob/HEAD:/drivers/mailbox/arm_mhu.c
perhaps you were using your old driver?

If you use this new driver, and send packets so often that request-release irq has effect, maybe should hold the mailbox reference for lifetime. I remember suggesting you that already and I remember you said that's how it was.

-Jassi

#8 lore raw

PATCH v7 2/7 mailbox: arm_mhu: add driver for ARM MHU controller

Quoted 9 lines · Jassi Brar
Quoted 8 lines · Sudeep Holla

drivers/mailbox/arm_mhu.c line 79

Quoted 5 lines
drivers/mailbox/arm_mhu.c new file +4 -0
+static int mhu_send_data(struct mbox_chan *chan, void *data)
+{
+       struct mhu_link *mlink = chan->con_priv;
+       u32 *arg = data;

Arnd doesn't like this and had suggestions in some other thread.

Quoted 3 lines

No, Arnd suggested doing it this way. And another platform's driver was made to do this way.

IIUC he suggested that it's better to add another interface/API to pass fixed-length something like

inline int mbox_send_message_u32(struct mbox_chan *chan, u32 msg)

{
	mbox_send_message(chan, &msg, sizeof(msg));
}

and add a length argument to the existing mbox_send_message like:

int mbox_send_message(struct mbox_chan *chan, void *mssg, int length)

Am I missing something here ?

Quoted 22 lines
Quoted 13 lines
Quoted 13 lines
drivers/mailbox/arm_mhu.c new file +13 -0
+       writel_relaxed(*arg, mlink->tx_reg + INTR_SET_OFS);
+
+       return 0;
+}
+
+static int mhu_startup(struct mbox_chan *chan)
+{
+       struct mhu_link *mlink = chan->con_priv;
+       u32 val;
+       int ret;
+
+       val = readl_relaxed(mlink->tx_reg + INTR_STAT_OFS);
+       writel_relaxed(val, mlink->tx_reg + INTR_CLR_OFS);
Quoted 9 lines

drivers/mailbox/arm_mhu.c line 96

Quoted 3 lines
drivers/mailbox/arm_mhu.c new file +3 -0
+
+       ret = request_irq(mlink->irq, mhu_rx_interrupt,
+                         IRQF_SHARED, "mhu_link", chan);

Any reason we can't move this to probe and have {en,dis}able_irq here if needed. I has seen it was too heavy to have these especially when sending small packets.

Quoted 4 lines

I see you used to do memcpy in irq-handler
https://git.linaro.org/landing-teams/working/arm/kernel.git/blob/HEAD:/drivers/mailbox/arm_mhu.c
perhaps you were using your old driver?

That driver is too old and long abandoned. It mixes up the protocol details and was written when mailbox f/w was still under discussion. So you can forget that, it's out of scope of this discussion.

Quoted 5 lines

If you use this new driver, and send packets so often that request-release irq has effect, maybe should hold the mailbox reference for lifetime. I remember suggesting you that already and I remember you said that's how it was.

Ah right, I keep getting confused that ops->startup is called from mbox_send_message for no reason, sorry for the noise. However, I found threaded_irq is much better for large packets.

Regards,
Sudeep

#9 lore raw

PATCH v7 2/7 mailbox: arm_mhu: add driver for ARM MHU controller

In reply to Vincent Yang
Quoted 37 lines · Vincent Yang

From: Jassi Brar <[email protected]>

Add driver for the ARM Primecell Message-Handling-Unit(MHU) controller.

---
  .../devicetree/bindings/mailbox/arm-mhu.txt        |  43 +++++
  drivers/mailbox/Kconfig                            |   9 +
  drivers/mailbox/Makefile                           |   2 +
  drivers/mailbox/arm_mhu.c                          | 195 +++++++++++++++++++++
  4 files changed, 249 insertions(+)

create mode 100644 Documentation/devicetree/bindings/mailbox/arm-mhu.txt create mode 100644 drivers/mailbox/arm_mhu.c

Documentation/devicetree/bindings/mailbox/arm-mhu.txt new file +14 -0
new file mode 100644
index 0000000..4971f03
@@ -0,0 +1,43 @@
+ARM MHU Mailbox Driver
+======================
+
+The ARM's Message-Handling-Unit (MHU) is a mailbox controller that has
+3 independent channels/links to communicate with remote processor(s).
+ MHU links are hardwired on a platform. A link raises interrupt for any
+received data. However, there is no specified way of knowing if the sent
+data has been read by the remote. This driver assumes the sender polls
+STAT register and the remote clears it after having read the data.
+The last channel is specified to be a 'Secure' resource, hence can't be
+used by Linux running NS.
+
+Mailbox Device Node:
+====================

Documentation/devicetree/bindings/mailbox/arm-mhu.txt line 24

Quoted 10 lines
Documentation/devicetree/bindings/mailbox/arm-mhu.txt new file +10 -0
+
+Required properties:
+--------------------
+- compatible:		Shall be "arm,mhu" & "arm,primecell"
+- reg:			Contains the mailbox register address range (base
+			address and length)
+- #mbox-cells		Shall be 1 - the index of the channel needed.
+- interrupts:		Contains the interrupt information corresponding to
+			each of the 3 links of MHU.
+

I tried using this driver and found that AMBA driver expects apb_clk without which probe fails. Though your example have it, it's not explicit from the binding. Also AMBA binding expects the primecell id in the binding.

Regards,
Sudeep

#10 lore raw

PATCH v7 2/7 mailbox: arm_mhu: add driver for ARM MHU controller

Quoted 4 lines · Sudeep Holla

I tried using this driver and found that AMBA driver expects apb_clk without which probe fails. Though your example have it, it's not explicit from the binding. Also AMBA binding expects the primecell id in the binding.

That's optional:

Optional properties:

- arm,primecell-periphid : Value to override the h/w value with

It's only required when the hardware doesn't provide the correct value.

Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
#11 lore raw

PATCH v7 2/7 mailbox: arm_mhu: add driver for ARM MHU controller

Quoted 6 lines · Russell King - ARM Linux
Quoted 4 lines · Sudeep Holla

I tried using this driver and found that AMBA driver expects apb_clk without which probe fails. Though your example have it, it's not explicit from the binding. Also AMBA binding expects the primecell id in the binding.

Quoted 8 lines

That's optional:

Optional properties:

- arm,primecell-periphid : Value to override the h/w value with

It's only required when the hardware doesn't provide the correct value.

Ah sorry my bad, I meant the compatible(somehow left this word at the end of earlier email - it should have been" .. AMBA binding expects the primecell id in the binding compatible")

- compatible : should be a specific name for the peripheral and "arm,primecell". The specific name will match the ARM engineering name for the logic block in the form: "arm,pl???"

So I wanted to make sure either we follow that here(unlikely as ARM is not publishing this as standard primecell yet) or specify that it's exception here.

Regards,
Sudeep

#12 lore raw

PATCH v7 3/7 ARM: MB86S7X: Add MCPM support

In reply to Vincent Yang

From: Jassi Brar <[email protected]>

The remote firmware(SCB) owns the SMP control. This MCPM driver gets CPU/CLUSTER power up/down done by SCB over mailbox.

---
 arch/arm/mach-mb86s7x/Makefile |   4 +-
 arch/arm/mach-mb86s7x/mcpm.c   | 318 +++++++++++++++++++++++++++++++++++++++++
 arch/arm/mach-mb86s7x/smc.S    |  27 ++++
 drivers/soc/mb86s7x/scb_mhu.c  |  14 ++
 include/soc/mb86s7x/scb_mhu.h  |   8 ++
 5 files changed, 370 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/mach-mb86s7x/mcpm.c
 create mode 100644 arch/arm/mach-mb86s7x/smc.S
arch/arm/mach-mb86s7x/Makefile +3 -1
index 97640b6..00e843c 100644
@@ -1 +1,3 @@
-obj-$(CONFIG_ARCH_MB86S7X)	+= board.o
+obj-$(CONFIG_ARCH_MB86S7X)	+= board.o mcpm.o smc.o
+CFLAGS_smc.o			+= -march=armv7-a
+CFLAGS_mcpm.o			+= -march=armv7-a
arch/arm/mach-mb86s7x/mcpm.c new file +318 -0

318 lines not on this page · raw message

arch/arm/mach-mb86s7x/smc.S new file +27 -0
new file mode 100644
index 0000000..3ffe4f7
@@ -0,0 +1,27 @@
+/*
+ * SMC command interface to set secondary entry point
+ * Copyright: (C) 2013-2015 Fujitsu Semiconductor Limited
+ * Copyright: (C) 2015 Linaro Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/linkage.h>
+
+.arch_extension sec
+
+/* void mb86s7x_cpu_entry(unsigned long secondary_entry); */
+ENTRY(mb86s7x_cpu_entry)
+	stmfd   sp!, {r1-r11, lr}
+	mov r1, r0
+	ldr r0, =1
+	mrc p15, 0, r3, c1, c0, 0
+	mov r4, r3
+	and r3, #0xbfffffff
+	mcr p15, 0, r3, c1, c0, 0
+	smc #0
+	mcr p15, 0, r4, c1, c0, 0
+	ldmfd   sp!, {r1-r11, pc}
+ENDPROC(mb86s7x_cpu_entry)
drivers/soc/mb86s7x/scb_mhu.c +14 -0
index c1d66f4..7141287 100644
@@ -89,6 +89,20 @@ static struct mhu_xfer {
 	struct list_head node;
 } *ax; /* stages of xfer */
 
+#define WFI_COLOR_OFFSET	0x3f00
+
+void mb86s7x_set_wficolor(unsigned clstr, unsigned cpu, unsigned clr)
+{
+	u8 val;
+
+	val = readb_relaxed(mb86s7x_shm_base
+			    + WFI_COLOR_OFFSET + clstr * 2 + cpu);
+	val &= ~AT_WFI_COLOR_MASK;
+	val |= clr;
+	writeb_relaxed(val, mb86s7x_shm_base
+		       + WFI_COLOR_OFFSET + clstr * 2 + cpu);
+}
+
 static int mhu_alloc_xfers(int n, struct list_head *list)
 {
 	struct mhu_xfer *x = kcalloc(n, sizeof(struct mhu_xfer), GFP_ATOMIC);
include/soc/mb86s7x/scb_mhu.h +8 -0
index 42a1baa..8ee75f2 100644
@@ -87,6 +87,14 @@ enum {
 #define CMD_POWERDOMAIN_SET_REP		ENC_REP(CMD_POWERDOMAIN_SET_REQ)
 #define CMD_STG_BLOCK_ERASE_REP		ENC_REP(CMD_STG_BLOCK_ERASE_REQ)
 
+#define AT_WFI_DO_NOTHING	0x0
+#define AT_WFI_DO_SUSPEND	0x1
+#define AT_WFI_DO_POWEROFF	0x2
+#define AT_WFI_COLOR_MASK	0x3
+
+void mb86s7x_set_wficolor(unsigned clstr, unsigned cpu, unsigned clr);
+void mb86s7x_cpu_entry(unsigned long secondary_entry);
+
 /* Helper functions to talk to remote */
 int mb86s7x_send_packet(u32 code, void *buf, int len);
 
Signature · 1 line
1.9.0
#13 lore raw

PATCH v7 4/7 clk: Add clock driver for mb86s7x

In reply to Vincent Yang

From: Jassi Brar <[email protected]>

The CRG11 clock controller is managed by remote f/w.
This driver simply maps Linux CLK ops onto mailbox api.

---
 .../bindings/clock/fujitsu,mb86s70-crg11.txt       |  26 ++
 drivers/clk/Makefile                               |   1 +
 drivers/clk/clk-mb86s7x.c                          | 386 +++++++++++++++++++++
 3 files changed, 413 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/fujitsu,mb86s70-crg11.txt
 create mode 100644 drivers/clk/clk-mb86s7x.c
Documentation/devicetree/bindings/clock/fujitsu,mb86s70-crg11.txt new file +26 -0
new file mode 100644
index 0000000..3323962
@@ -0,0 +1,26 @@
+Fujitsu CRG11 clock driver bindings
+-----------------------------------
+
+Required properties :
+- compatible : Shall contain "fujitsu,mb86s70-crg11"
+- #clock-cells : Shall be 3 {cntrlr domain port}
+
+The consumer specifies the desired clock pointing to its phandle.
+
+Example:
+
+	clock: crg11 {
+		compatible = "fujitsu,mb86s70-crg11";
+		#clock-cells = <3>;
+	};
+
+	mhu: mhu0 at 2b1f0000 {
+		#mbox-cells = <1>;
+		compatible = "arm,mhu";
+		reg = <0 0x2B1F0000 0x1000>;
+		interrupts = <0 36 4>, /* LP Non-Sec */
+			     <0 35 4>, /* HP Non-Sec */
+			     <0 37 4>; /* Secure */
+		clocks = <&clock 0 2 1>; /* Cntrlr:0 Domain:2 Port:1 */
+		clock-names = "clk";
+	};
drivers/clk/Makefile +1 -0
index d478ceb..1d35f3b 100644
@@ -28,6 +28,7 @@ obj-$(CONFIG_MACH_LOONGSON1)		+= clk-ls1x.o
 obj-$(CONFIG_COMMON_CLK_MAX_GEN)	+= clk-max-gen.o
 obj-$(CONFIG_COMMON_CLK_MAX77686)	+= clk-max77686.o
 obj-$(CONFIG_COMMON_CLK_MAX77802)	+= clk-max77802.o
+obj-$(CONFIG_ARCH_MB86S7X)		+= clk-mb86s7x.o
 obj-$(CONFIG_ARCH_MOXART)		+= clk-moxart.o
 obj-$(CONFIG_ARCH_NOMADIK)		+= clk-nomadik.o
 obj-$(CONFIG_ARCH_NSPIRE)		+= clk-nspire.o
drivers/clk/clk-mb86s7x.c new file +386 -0

386 lines not on this page · raw message

Signature · 1 line
1.9.0
#14 lore raw

PATCH v7 4/7 clk: Add clock driver for mb86s7x

Quoting Vincent Yang (2015-03-04 03:04:03)

Quoted 8 lines

From: Jassi Brar <[email protected]>

The CRG11 clock controller is managed by remote f/w.
This driver simply maps Linux CLK ops onto mailbox api.

Patch looks OK to me. We might to replace that __clk_lookup in crg11_get with clk_get or something else like it someday if I ever get around to removing __clk_lookup.

Applied.

Regards,
Mike

Quoted 447 lines
---
 .../bindings/clock/fujitsu,mb86s70-crg11.txt       |  26 ++
 drivers/clk/Makefile                               |   1 +
 drivers/clk/clk-mb86s7x.c                          | 386 +++++++++++++++++++++
 3 files changed, 413 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/fujitsu,mb86s70-crg11.txt
 create mode 100644 drivers/clk/clk-mb86s7x.c
Documentation/devicetree/bindings/clock/fujitsu,mb86s70-crg11.txt new file +26 -0
new file mode 100644
index 0000000..3323962
@@ -0,0 +1,26 @@
+Fujitsu CRG11 clock driver bindings
+-----------------------------------
+
+Required properties :
+- compatible : Shall contain "fujitsu,mb86s70-crg11"
+- #clock-cells : Shall be 3 {cntrlr domain port}
+
+The consumer specifies the desired clock pointing to its phandle.
+
+Example:
+
+       clock: crg11 {
+               compatible = "fujitsu,mb86s70-crg11";
+               #clock-cells = <3>;
+       };
+
+       mhu: mhu0 at 2b1f0000 {
+               #mbox-cells = <1>;
+               compatible = "arm,mhu";
+               reg = <0 0x2B1F0000 0x1000>;
+               interrupts = <0 36 4>, /* LP Non-Sec */
+                            <0 35 4>, /* HP Non-Sec */
+                            <0 37 4>; /* Secure */
+               clocks = <&clock 0 2 1>; /* Cntrlr:0 Domain:2 Port:1 */
+               clock-names = "clk";
+       };
drivers/clk/Makefile +1 -0
index d478ceb..1d35f3b 100644
@@ -28,6 +28,7 @@ obj-$(CONFIG_MACH_LOONGSON1)          += clk-ls1x.o
 obj-$(CONFIG_COMMON_CLK_MAX_GEN)       += clk-max-gen.o
 obj-$(CONFIG_COMMON_CLK_MAX77686)      += clk-max77686.o
 obj-$(CONFIG_COMMON_CLK_MAX77802)      += clk-max77802.o
+obj-$(CONFIG_ARCH_MB86S7X)             += clk-mb86s7x.o
 obj-$(CONFIG_ARCH_MOXART)              += clk-moxart.o
 obj-$(CONFIG_ARCH_NOMADIK)             += clk-nomadik.o
 obj-$(CONFIG_ARCH_NSPIRE)              += clk-nspire.o
drivers/clk/clk-mb86s7x.c new file +386 -0
new file mode 100644
index 0000000..f39c25a
@@ -0,0 +1,386 @@
+/*
+ * Copyright (C) 2013-2015 FUJITSU SEMICONDUCTOR LIMITED
+ * Copyright (C) 2015 Linaro Ltd.
+ *
+ * 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, version 2 of the License.
+ *
+ * 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/clkdev.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/of.h>
+#include <linux/cpu.h>
+#include <linux/clk-provider.h>
+#include <linux/spinlock.h>
+#include <linux/module.h>
+#include <linux/topology.h>
+#include <linux/mailbox_client.h>
+#include <linux/platform_device.h>
+
+#include <soc/mb86s7x/scb_mhu.h>
+
+#define to_crg_clk(p) container_of(p, struct crg_clk, hw)
+#define to_clc_clk(p) container_of(p, struct cl_clk, hw)
+
+struct mb86s7x_peri_clk {
+       u32 payload_size;
+       u32 cntrlr;
+       u32 domain;
+       u32 port;
+       u32 en;
+       u64 frequency;
+} __packed __aligned(4);
+
+struct hack_rate {
+       unsigned clk_id;
+       unsigned long rate;
+       int gated;
+};
+
+struct crg_clk {
+       struct clk_hw hw;
+       u8 cntrlr, domain, port;
+};
+
+static int crg_gate_control(struct clk_hw *hw, int en)
+{
+       struct crg_clk *crgclk = to_crg_clk(hw);
+       struct mb86s7x_peri_clk cmd;
+       int ret;
+
+       cmd.payload_size = sizeof(cmd);
+       cmd.cntrlr = crgclk->cntrlr;
+       cmd.domain = crgclk->domain;
+       cmd.port = crgclk->port;
+       cmd.en = en;
+
+       /* Port is UngatedCLK */
+       if (cmd.port == 8)
+               return en ? 0 : -EINVAL;
+
+       pr_debug("%s:%d CMD Cntrlr-%u Dom-%u Port-%u En-%u}\n",
+                __func__, __LINE__, cmd.cntrlr,
+                cmd.domain, cmd.port, cmd.en);
+
+       ret = mb86s7x_send_packet(CMD_PERI_CLOCK_GATE_SET_REQ,
+                                 &cmd, sizeof(cmd));
+       if (ret < 0) {
+               pr_err("%s:%d failed!\n", __func__, __LINE__);
+               return ret;
+       }
+
+       pr_debug("%s:%d REP Cntrlr-%u Dom-%u Port-%u En-%u}\n",
+                __func__, __LINE__, cmd.cntrlr,
+                cmd.domain, cmd.port, cmd.en);
+
+       /* If the request was rejected */
+       if (cmd.en != en)
+               ret = -EINVAL;
+       else
+               ret = 0;
+
+       return ret;
+}
+
+static int crg_port_prepare(struct clk_hw *hw)
+{
+       return crg_gate_control(hw, 1);
+}
+
+static void crg_port_unprepare(struct clk_hw *hw)
+{
+       crg_gate_control(hw, 0);
+}
+
+static int
+crg_rate_control(struct clk_hw *hw, int set, unsigned long *rate)
+{
+       struct crg_clk *crgclk = to_crg_clk(hw);
+       struct mb86s7x_peri_clk cmd;
+       int code, ret;
+
+       cmd.payload_size = sizeof(cmd);
+       cmd.cntrlr = crgclk->cntrlr;
+       cmd.domain = crgclk->domain;
+       cmd.port = crgclk->port;
+       cmd.frequency = *rate;
+
+       if (set) {
+               code = CMD_PERI_CLOCK_RATE_SET_REQ;
+               pr_debug("%s:%d CMD Cntrlr-%u Dom-%u Port-%u Rate-SET %lluHz}\n",
+                        __func__, __LINE__, cmd.cntrlr,
+                        cmd.domain, cmd.port, cmd.frequency);
+       } else {
+               code = CMD_PERI_CLOCK_RATE_GET_REQ;
+               pr_debug("%s:%d CMD Cntrlr-%u Dom-%u Port-%u Rate-GET}\n",
+                        __func__, __LINE__, cmd.cntrlr,
+                        cmd.domain, cmd.port);
+       }
+
+       ret = mb86s7x_send_packet(code, &cmd, sizeof(cmd));
+       if (ret < 0) {
+               pr_err("%s:%d failed!\n", __func__, __LINE__);
+               return ret;
+       }
+
+       if (set)
+               pr_debug("%s:%d REP Cntrlr-%u Dom-%u Port-%u Rate-SET %lluHz}\n",
+                        __func__, __LINE__, cmd.cntrlr,
+                        cmd.domain, cmd.port, cmd.frequency);
+       else
+               pr_debug("%s:%d REP Cntrlr-%u Dom-%u Port-%u Rate-GOT %lluHz}\n",
+                        __func__, __LINE__, cmd.cntrlr,
+                        cmd.domain, cmd.port, cmd.frequency);
+
+       *rate = cmd.frequency;
+       return 0;
+}
+
+static unsigned long
+crg_port_recalc_rate(struct clk_hw *hw,        unsigned long parent_rate)
+{
+       unsigned long rate;
+
+       crg_rate_control(hw, 0, &rate);
+
+       return rate;
+}
+
+static long
+crg_port_round_rate(struct clk_hw *hw,
+                   unsigned long rate, unsigned long *pr)
+{
+       return rate;
+}
+
+static int
+crg_port_set_rate(struct clk_hw *hw,
+                 unsigned long rate, unsigned long parent_rate)
+{
+       return crg_rate_control(hw, 1, &rate);
+}
+
+const struct clk_ops crg_port_ops = {
+       .prepare = crg_port_prepare,
+       .unprepare = crg_port_unprepare,
+       .recalc_rate = crg_port_recalc_rate,
+       .round_rate = crg_port_round_rate,
+       .set_rate = crg_port_set_rate,
+};
+
+struct mb86s70_crg11 {
+       struct mutex lock; /* protects CLK populating and searching */
+};
+
+static struct clk *crg11_get(struct of_phandle_args *clkspec, void *data)
+{
+       struct mb86s70_crg11 *crg11 = data;
+       struct clk_init_data init;
+       u32 cntrlr, domain, port;
+       struct crg_clk *crgclk;
+       struct clk *clk;
+       char clkp[20];
+
+       if (clkspec->args_count != 3)
+               return ERR_PTR(-EINVAL);
+
+       cntrlr = clkspec->args[0];
+       domain = clkspec->args[1];
+       port = clkspec->args[2];
+
+       if (port > 7)
+               snprintf(clkp, 20, "UngatedCLK%d_%X", cntrlr, domain);
+       else
+               snprintf(clkp, 20, "CLK%d_%X_%d", cntrlr, domain, port);
+
+       mutex_lock(&crg11->lock);
+
+       clk = __clk_lookup(clkp);
+       if (clk) {
+               mutex_unlock(&crg11->lock);
+               return clk;
+       }
+
+       crgclk = kzalloc(sizeof(*crgclk), GFP_KERNEL);
+       if (!crgclk) {
+               mutex_unlock(&crg11->lock);
+               return ERR_PTR(-ENOMEM);
+       }
+
+       init.name = clkp;
+       init.num_parents = 0;
+       init.ops = &crg_port_ops;
+       init.flags = CLK_IS_ROOT;
+       crgclk->hw.init = &init;
+       crgclk->cntrlr = cntrlr;
+       crgclk->domain = domain;
+       crgclk->port = port;
+       clk = clk_register(NULL, &crgclk->hw);
+       if (IS_ERR(clk))
+               pr_err("%s:%d Error!\n", __func__, __LINE__);
+       else
+               pr_debug("Registered %s\n", clkp);
+
+       clk_register_clkdev(clk, clkp, NULL);
+       mutex_unlock(&crg11->lock);
+       return clk;
+}
+
+static void __init crg_port_init(struct device_node *node)
+{
+       struct mb86s70_crg11 *crg11;
+
+       crg11 = kzalloc(sizeof(*crg11), GFP_KERNEL);
+       if (!crg11)
+               return;
+
+       mutex_init(&crg11->lock);
+
+       of_clk_add_provider(node, crg11_get, crg11);
+}
+CLK_OF_DECLARE(crg11_gate, "fujitsu,mb86s70-crg11", crg_port_init);
+
+struct cl_clk {
+       struct clk_hw hw;
+       int cluster;
+};
+
+struct mb86s7x_cpu_freq {
+       u32 payload_size;
+       u32 cluster_class;
+       u32 cluster_id;
+       u32 cpu_id;
+       u64 frequency;
+};
+
+static void mhu_cluster_rate(struct clk_hw *hw, unsigned long *rate, int get)
+{
+       struct cl_clk *clc = to_clc_clk(hw);
+       struct mb86s7x_cpu_freq cmd;
+       int code, ret;
+
+       cmd.payload_size = sizeof(cmd);
+       cmd.cluster_class = 0;
+       cmd.cluster_id = clc->cluster;
+       cmd.cpu_id = 0;
+       cmd.frequency = *rate;
+
+       if (get)
+               code = CMD_CPU_CLOCK_RATE_GET_REQ;
+       else
+               code = CMD_CPU_CLOCK_RATE_SET_REQ;
+
+       pr_debug("%s:%d CMD Cl_Class-%u CL_ID-%u CPU_ID-%u Freq-%llu}\n",
+                __func__, __LINE__, cmd.cluster_class,
+                cmd.cluster_id, cmd.cpu_id, cmd.frequency);
+
+       ret = mb86s7x_send_packet(code, &cmd, sizeof(cmd));
+       if (ret < 0) {
+               pr_err("%s:%d failed!\n", __func__, __LINE__);
+               return;
+       }
+
+       pr_debug("%s:%d REP Cl_Class-%u CL_ID-%u CPU_ID-%u Freq-%llu}\n",
+                __func__, __LINE__, cmd.cluster_class,
+                cmd.cluster_id, cmd.cpu_id, cmd.frequency);
+
+       *rate = cmd.frequency;
+}
+
+static unsigned long
+clc_recalc_rate(struct clk_hw *hw, unsigned long unused)
+{
+       unsigned long rate;
+
+       mhu_cluster_rate(hw, &rate, 1);
+       return rate;
+}
+
+static long
+clc_round_rate(struct clk_hw *hw, unsigned long rate,
+              unsigned long *unused)
+{
+       return rate;
+}
+
+static int
+clc_set_rate(struct clk_hw *hw, unsigned long rate,
+            unsigned long unused)
+{
+       unsigned long res = rate;
+
+       mhu_cluster_rate(hw, &res, 0);
+
+       return (res == rate) ? 0 : -EINVAL;
+}
+
+static struct clk_ops clk_clc_ops = {
+       .recalc_rate = clc_recalc_rate,
+       .round_rate = clc_round_rate,
+       .set_rate = clc_set_rate,
+};
+
+struct clk *mb86s7x_clclk_register(struct device *cpu_dev)
+{
+       struct clk_init_data init;
+       struct cl_clk *clc;
+
+       clc = kzalloc(sizeof(*clc), GFP_KERNEL);
+       if (!clc)
+               return ERR_PTR(-ENOMEM);
+
+       clc->hw.init = &init;
+       clc->cluster = topology_physical_package_id(cpu_dev->id);
+
+       init.name = dev_name(cpu_dev);
+       init.ops = &clk_clc_ops;
+       init.flags = CLK_IS_ROOT | CLK_GET_RATE_NOCACHE;
+       init.num_parents = 0;
+
+       return devm_clk_register(cpu_dev, &clc->hw);
+}
+
+static int mb86s7x_clclk_of_init(void)
+{
+       int cpu, ret = -ENODEV;
+       struct device_node *np;
+       struct clk *clk;
+
+       np = of_find_compatible_node(NULL, NULL, "fujitsu,mb86s70-scb-1.0");
+       if (!np || !of_device_is_available(np))
+               goto exit;
+
+       for_each_possible_cpu(cpu) {
+               struct device *cpu_dev = get_cpu_device(cpu);
+
+               if (!cpu_dev) {
+                       pr_err("failed to get cpu%d device\n", cpu);
+                       continue;
+               }
+
+               clk = mb86s7x_clclk_register(cpu_dev);
+               if (IS_ERR(clk)) {
+                       pr_err("failed to register cpu%d clock\n", cpu);
+                       continue;
+               }
+               if (clk_register_clkdev(clk, NULL, dev_name(cpu_dev))) {
+                       pr_err("failed to register cpu%d clock lookup\n", cpu);
+                       continue;
+               }
+               pr_debug("registered clk for %s\n", dev_name(cpu_dev));
+       }
+       ret = 0;
+
+       platform_device_register_simple("arm-bL-cpufreq-dt", -1, NULL, 0);
+exit:
+       of_node_put(np);
+       return ret;
+}
+module_init(mb86s7x_clclk_of_init);
Signature · 1 line
1.9.0
#15 lore raw

PATCH v7 5/7 dt: mb86s7x: add dt files for MB86S7x evbs

In reply to Vincent Yang

From: Jassi Brar <[email protected]>

Add dt files for MB86S7x evb.

---
 arch/arm/boot/dts/Makefile      |   3 +
 arch/arm/boot/dts/mb86s70.dtsi  |  91 +++++++++++++++++++++++++
 arch/arm/boot/dts/mb86s70eb.dts |  57 ++++++++++++++++
 arch/arm/boot/dts/mb86s73.dtsi  |  63 ++++++++++++++++++
 arch/arm/boot/dts/mb86s73eb.dts |  44 +++++++++++++
 arch/arm/boot/dts/mb86s7x.dtsi  | 142 ++++++++++++++++++++++++++++++++++++++++
 6 files changed, 400 insertions(+)
 create mode 100644 arch/arm/boot/dts/mb86s70.dtsi
 create mode 100644 arch/arm/boot/dts/mb86s70eb.dts
 create mode 100644 arch/arm/boot/dts/mb86s73.dtsi
 create mode 100644 arch/arm/boot/dts/mb86s73eb.dts
 create mode 100644 arch/arm/boot/dts/mb86s7x.dtsi
arch/arm/boot/dts/Makefile +3 -0
index a1c776b..aa0e6d4 100644
@@ -197,6 +197,9 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \
 	kirkwood-ts419-6282.dtb
 dtb-$(CONFIG_ARCH_LPC32XX) += \
 	ea3250.dtb phy3250.dtb
+dtb-$(CONFIG_ARCH_MB86S7X) += \
+	mb86s70eb.dtb \
+	mb86s73eb.dtb
 dtb-$(CONFIG_MACH_MESON6) += \
 	meson6-atv1200.dtb
 dtb-$(CONFIG_ARCH_MMP) += \
arch/arm/boot/dts/mb86s70.dtsi new file +91 -0

91 lines not on this page · raw message

arch/arm/boot/dts/mb86s70eb.dts new file +57 -0

57 lines not on this page · raw message

arch/arm/boot/dts/mb86s73.dtsi new file +63 -0

63 lines not on this page · raw message

arch/arm/boot/dts/mb86s73eb.dts new file +44 -0

44 lines not on this page · raw message

arch/arm/boot/dts/mb86s7x.dtsi new file +142 -0

142 lines not on this page · raw message

Signature · 1 line
1.9.0
#16 lore raw

PATCH v7 6/7 of: add Fujitsu vendor prefix

In reply to Vincent Yang

From: Jassi Brar <[email protected]>

Add 'fujitsu' as the vendor prefix for Fujitsu Semiconductor Ltd.

---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
index 389ca13..00d6e71 100644
@@ -70,6 +70,7 @@ excito	Excito
 fcs	Fairchild Semiconductor
 firefly	Firefly
 fsl	Freescale Semiconductor
+fujitsu Fujitsu Semiconductor Ltd.
 GEFanuc	GE Fanuc Intelligent Platforms Embedded Systems, Inc.
 gef	GE Fanuc Intelligent Platforms Embedded Systems, Inc.
 geniatech	Geniatech, Inc.
Signature · 1 line
1.9.0
#17 lore raw

PATCH v7 7/7 ARM: MB86S7x: Add configs

In reply to Vincent Yang

From: Jassi Brar <[email protected]>

Fujitsu's ARCH_MB86S7X is multi_v7 compatible, so add options to multi_v7_defconfig. Also add a new defconfig for MB86S7X for those who want the kernel built specifically for ARCH_MB86S7X.

---
 arch/arm/configs/fujitsu_defconfig  | 232 ++++++++++++++++++++++++++++++++++++
 arch/arm/configs/multi_v7_defconfig |   5 +
 2 files changed, 237 insertions(+)
 create mode 100644 arch/arm/configs/fujitsu_defconfig
arch/arm/configs/fujitsu_defconfig new file +232 -0
new file mode 100644
index 0000000..2d922e4
@@ -0,0 +1,232 @@
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_DEFAULT_HOSTNAME="MB86S7x"
+CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_NAMESPACES=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_RD_BZIP2=y
+CONFIG_RD_LZMA=y
+CONFIG_RD_XZ=y
+CONFIG_RD_LZO=y
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_EXPERT=y
+# CONFIG_COMPAT_BRK is not set
+CONFIG_SLAB=y
+CONFIG_PROFILING=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_ARCH_MB86S7X=y
+CONFIG_ARM_LPAE=y
+CONFIG_ARM_ERRATA_754322=y
+CONFIG_ARM_ERRATA_754327=y
+CONFIG_ARM_ERRATA_764369=y
+CONFIG_ARM_ERRATA_775420=y
+CONFIG_ARM_ERRATA_798181=y
+CONFIG_PCI=y
+CONFIG_SMP=y
+CONFIG_SCHED_MC=y
+CONFIG_SCHED_SMT=y
+CONFIG_VMSPLIT_2G=y
+CONFIG_PREEMPT=y
+CONFIG_THUMB2_KERNEL=y
+CONFIG_HIGHMEM=y
+CONFIG_CMA=y
+CONFIG_CMA_AREAS=8
+# CONFIG_ATAGS is not set
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="mem=2048M console=ttyS0,115200 root=/dev/mmcblk1p1 rootfstype=ext4 rootwait rw"
+CONFIG_KEXEC=y
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
+CONFIG_CPUFREQ_DT=m
+CONFIG_CPU_IDLE=y
+CONFIG_VFP=y
+CONFIG_NEON=y
+CONFIG_PM_WAKELOCKS=y
+CONFIG_PM_RUNTIME=y
+CONFIG_PM_DEBUG=y
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+# CONFIG_IPV6 is not set
+# CONFIG_WIRELESS is not set
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+CONFIG_DMA_CMA=y
+CONFIG_CMA_SIZE_MBYTES=192
+CONFIG_MTD=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_BLOCK=y
+CONFIG_MTD_CFI=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_AMDSTD=y
+CONFIG_MTD_ROM=y
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_OF=y
+CONFIG_MTD_PLATRAM=y
+CONFIG_MTD_M25P80=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_BLK_DEV_LOOP=m
+CONFIG_BLK_DEV_CRYPTOLOOP=m
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=2
+CONFIG_BLK_DEV_RAM_SIZE=1024
+CONFIG_BLK_DEV_SD=m
+CONFIG_ATA=m
+# CONFIG_ATA_VERBOSE_ERROR is not set
+# CONFIG_SATA_PMP is not set
+CONFIG_SATA_AHCI_PLATFORM=m
+# CONFIG_ATA_SFF is not set
+CONFIG_NETDEVICES=y
+CONFIG_TUN=m
+# CONFIG_NET_CADENCE is not set
+# CONFIG_NET_VENDOR_BROADCOM is not set
+# CONFIG_NET_VENDOR_CIRRUS is not set
+# CONFIG_NET_VENDOR_FARADAY is not set
+# CONFIG_NET_VENDOR_INTEL is not set
+# CONFIG_NET_VENDOR_MARVELL is not set
+# CONFIG_NET_VENDOR_MICREL is not set
+# CONFIG_NET_VENDOR_MICROCHIP is not set
+# CONFIG_NET_VENDOR_NATSEMI is not set
+# CONFIG_NET_VENDOR_SEEQ is not set
+# CONFIG_NET_VENDOR_SMSC is not set
+# CONFIG_NET_VENDOR_STMICRO is not set
+# CONFIG_NET_VENDOR_WIZNET is not set
+CONFIG_PHYLIB=y
+# CONFIG_WLAN is not set
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=800
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+CONFIG_INPUT_EVDEV=m
+# CONFIG_KEYBOARD_ATKBD is not set
+CONFIG_KEYBOARD_GPIO_POLLED=y
+# CONFIG_MOUSE_PS2 is not set
+CONFIG_MOUSE_GPIO=m
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_EGALAX=m
+CONFIG_TOUCHSCREEN_ILI210X=m
+# CONFIG_SERIO_SERPORT is not set
+CONFIG_LEGACY_PTY_COUNT=16
+# CONFIG_DEVKMEM is not set
+CONFIG_SERIAL_8250=y
+# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_DW=y
+CONFIG_SERIAL_OF_PLATFORM=y
+# CONFIG_HW_RANDOM is not set
+# CONFIG_I2C_COMPAT is not set
+CONFIG_I2C_CHARDEV=m
+# CONFIG_I2C_HELPER_AUTO is not set
+CONFIG_SPI=y
+CONFIG_GPIO_SYSFS=y
+CONFIG_GPIO_MB86S7X=y
+CONFIG_GPIO_MCP23S08=m
+# CONFIG_HWMON is not set
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_GPIO=y
+# CONFIG_VGA_ARB is not set
+CONFIG_DRM=y
+CONFIG_FB=y
+CONFIG_FIRMWARE_EDID=y
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_TILEBLITTING=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_SOUND=m
+CONFIG_SND=m
+CONFIG_SND_DYNAMIC_MINORS=y
+# CONFIG_SND_SUPPORT_OLD_API is not set
+# CONFIG_SND_VERBOSE_PROCFS is not set
+# CONFIG_SND_ARM is not set
+# CONFIG_SND_SPI is not set
+CONFIG_SND_SOC=m
+CONFIG_HID=m
+CONFIG_HID_PID=y
+CONFIG_USB_HIDDEV=y
+CONFIG_USB=m
+CONFIG_USB_OTG=y
+CONFIG_USB_XHCI_HCD=m
+CONFIG_USB_EHCI_HCD=m
+CONFIG_USB_EHCI_HCD_PLATFORM=m
+CONFIG_USB_OHCI_HCD=m
+# CONFIG_USB_OHCI_HCD_PCI is not set
+CONFIG_USB_OHCI_HCD_PLATFORM=m
+CONFIG_USB_ACM=m
+CONFIG_USB_STORAGE=m
+CONFIG_USB_DWC3=m
+CONFIG_USB_DWC3_HOST=y
+CONFIG_USB_DWC3_DEBUG=y
+CONFIG_USB_GADGET=m
+CONFIG_USB_MASS_STORAGE=m
+CONFIG_USB_G_MULTI=m
+CONFIG_MMC=y
+CONFIG_MMC_CLKGATE=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMC_SDHCI_F_SDH30=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_LEDS_TRIGGER_BACKLIGHT=m
+CONFIG_LEDS_TRIGGER_CPU=y
+CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
+CONFIG_LEDS_TRIGGER_TRANSIENT=m
+CONFIG_DMADEVICES=y
+CONFIG_STAGING=y
+CONFIG_ANDROID=y
+CONFIG_ANDROID_BINDER_IPC=y
+CONFIG_ASHMEM=y
+CONFIG_ANDROID_LOGGER=m
+CONFIG_ANDROID_LOW_MEMORY_KILLER=y
+CONFIG_ION=y
+CONFIG_ARM_MHU=y
+CONFIG_ARM_SMMU=y
+CONFIG_EXT4_FS=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
+CONFIG_VFAT_FS=m
+CONFIG_TMPFS=y
+CONFIG_JFFS2_FS=m
+CONFIG_CRAMFS=y
+CONFIG_ROMFS_FS=y
+CONFIG_ROMFS_BACKED_BY_BOTH=y
+# CONFIG_NETWORK_FILESYSTEMS is not set
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_ISO8859_1=m
+CONFIG_PRINTK_TIME=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_FS=y
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_DEBUG_PREEMPT is not set
+# CONFIG_RCU_CPU_STALL_VERBOSE is not set
+# CONFIG_FTRACE is not set
+CONFIG_DEBUG_USER=y
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+# CONFIG_CRYPTO_HW is not set
+CONFIG_FONTS=y
+CONFIG_FONT_SUN8x16=y
arch/arm/configs/multi_v7_defconfig +5 -0
index b7e6b6fb..78e9149 100644
@@ -50,6 +50,7 @@ CONFIG_SOC_AM43XX=y
 CONFIG_SOC_DRA7XX=y
 CONFIG_ARCH_QCOM=y
 CONFIG_ARCH_MEDIATEK=y
+CONFIG_ARCH_MB86S7X=y
 CONFIG_ARCH_MSM8X60=y
 CONFIG_ARCH_MSM8960=y
 CONFIG_ARCH_MSM8974=y
@@ -304,6 +305,7 @@ CONFIG_GPIO_PALMAS=y
 CONFIG_GPIO_SYSCON=y
 CONFIG_GPIO_TPS6586X=y
 CONFIG_GPIO_TPS65910=y
+CONFIG_GPIO_MB86S7X=y
 CONFIG_BATTERY_SBS=y
 CONFIG_CHARGER_TPS65090=y
 CONFIG_POWER_RESET_AS3722=y
@@ -452,6 +454,7 @@ CONFIG_MMC_SDHCI_SPEAR=y
 CONFIG_MMC_SDHCI_S3C=y
 CONFIG_MMC_SDHCI_S3C_DMA=y
 CONFIG_MMC_SDHCI_BCM_KONA=y
+CONFIG_MMC_SDHCI_F_SDH30=y
 CONFIG_MMC_SDHCI_ST=y
 CONFIG_MMC_OMAP=y
 CONFIG_MMC_OMAP_HS=y
@@ -550,6 +553,8 @@ CONFIG_PHY_MIPHY365X=y
 CONFIG_PHY_STIH41X_USB=y
 CONFIG_PHY_STIH407_USB=y
 CONFIG_PHY_SUN4I_USB=y
+CONFIG_MAILBOX=y
+CONFIG_ARM_MHU=y
 CONFIG_EXT4_FS=y
 CONFIG_AUTOFS4_FS=y
 CONFIG_MSDOS_FS=y
Signature · 1 line
1.9.0