Skip to contentSkip to conversation

sh: LANDISK and R2Dplus convert to device tree

PATCH Superseded Yoshinori Sato 6 participants 37 messages Jun 29, 2016 – Jul 4, 2016

Subsystems (7)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Yoshinori Sato

author maintainer
#0 lore raw

v4 cover sh: LANDISK and R2Dplus convert to device tree

SH get devicetree support. But it not working on existing H/W.

IO-DATA HDL-U (aka landisk) currentry supported.
This H/W like SH7751 evalution board. It's a best to use this as a change base H/W.
RTS7751R2Dplus is QEMU-SH4 target. So easy trying.

Changes V4
- split board depend patch.
- dts cleanup.

Changes V3
- PCI driver update for v4.7.
- New Clock driver. Unified PLL/Divider.
- R2Dplus support.
- Split DTS.
- Some cleanup.

Changes V2
- split DeviceTree suppoty update.
- PCI driver update.
- Some cleanup.

Yoshinori Sato (22):
sh: Add sh-specific early_init_dt_reserve_memory_arch
sh: More early unflatten device tree
sh: set preset_lpj
sh: Use P1SEGADDR
sh: command line passing chosen/bootargs in devicetree
sh: FDT address save before bank change
sh: Passing FDT address on zImage
sh: Disable board specific code on device tree mode
sh: Use GENERIC_IOMAP on device tree mode
sh: Add board specific initialize of of-generic
sh: SH7750/51 CPG Driver
sh: Add PCI host bridge driver for SH7751
sh: irqchip: SH7751 IRQCHIP Driver
sh: SH7751 core dtsi
sh: Move common PCI stuff to arch/sh/kernel
pci: pci_config_window move to linux/pci.h
pci: PCI_HOST_GENERIC enable for SH
sh: Add separate DTB build rule
sh: IO-DATA HDL-U (a,k.a landisk) IRQCHIP driver
sh: IO-DATA HDL-U (a,k.a landisk) DeviceTree
sh: Renesas RTS7751R2Dplus (a,k.a R2Dplus) IRQCHIP Driver
sh: Renesas RTS7751R2Dplus (a,k.a R2Dplus) DeviceTree

 .../bindings/clock/renesas,sh7750-cpg.txt          |  25 ++
 .../interrupt-controller/iodata-landisk.txt        |  31 ++
 .../interrupt-controller/renesas,sh7751-intc.txt   |  25 ++
 .../interrupt-controller/renesas-r2dplus.txt       |  38 +++
 .../devicetree/bindings/pci/sh7751-pci.txt         |  37 +++
 arch/sh/Kconfig                                    |   6 +-
 arch/sh/Makefile                                   |   9 +
 arch/sh/boards/Kconfig                             |   4 +
 arch/sh/boards/of-generic.c                        |  88 +++++-
 arch/sh/boot/compressed/head_32.S                  |   5 +-
 arch/sh/boot/dts/Makefile                          |   5 +
 arch/sh/boot/dts/include/dt-bindings               |   1 +
 arch/sh/boot/dts/landisk.dts                       |  61 ++++
 arch/sh/boot/dts/r2dplus.dts                       |  83 +++++
 arch/sh/boot/dts/sh7751.dtsi                       |  83 +++++
 arch/sh/drivers/Makefile                           |   2 +
 arch/sh/drivers/pci/Makefile                       |   2 -
 arch/sh/drivers/pci/common.c                       | 162 ----------
 arch/sh/drivers/pci/pci.c                          | 320 -------------------
 arch/sh/include/asm/io.h                           |   6 +
 arch/sh/kernel/Makefile                            |   2 +
 arch/sh/kernel/cpu/Makefile                        |   8 +-
 arch/sh/kernel/cpu/clock.c                         |   6 +-
 arch/sh/kernel/cpu/sh4/Makefile                    |   2 +
 arch/sh/kernel/head_32.S                           |   7 +-
 arch/sh/kernel/pci-common.c                        | 162 ++++++++++
 arch/sh/kernel/pci.c                               | 342 ++++++++++++++++++++
 arch/sh/kernel/setup.c                             |  15 +-
 drivers/clk/Kconfig                                |   1 +
 drivers/clk/Makefile                               |   3 +-
 drivers/clk/sh/Kconfig                             |   2 +
 drivers/clk/sh/Makefile                            |   1 +
 drivers/clk/sh/clk-sh7750cpg.c                     | 344 +++++++++++++++++++++
 drivers/irqchip/Kconfig                            |   5 +
 drivers/irqchip/Makefile                           |   1 +
 drivers/irqchip/irq-io-landisk.c                   |  72 +++++
 drivers/irqchip/irq-renesas-r2dplus.c              |  88 ++++++
 drivers/irqchip/irq-renesas-sh7751.c               | 141 +++++++++
 drivers/pci/ecam.h                                 |  17 +-
 drivers/pci/host/Kconfig                           |   9 +-
 drivers/pci/host/Makefile                          |   1 +
 drivers/pci/host/pci-sh7751.c                      | 326 +++++++++++++++++++
 include/dt-bindings/clock/renesas-sh7750.h         |  26 ++
 include/dt-bindings/interrupt-controller/sh_intc.h |   2 +
 include/linux/pci.h                                |  18 ++
 45 files changed, 2073 insertions(+), 521 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/renesas,sh7750-cpg.txt
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/iodata-landisk.txt
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/renesas,sh7751-intc.txt
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/renesas-r2dplus.txt
 create mode 100644 Documentation/devicetree/bindings/pci/sh7751-pci.txt
 create mode 120000 arch/sh/boot/dts/include/dt-bindings
 create mode 100644 arch/sh/boot/dts/landisk.dts
 create mode 100644 arch/sh/boot/dts/r2dplus.dts
 create mode 100644 arch/sh/boot/dts/sh7751.dtsi
 delete mode 100644 arch/sh/drivers/pci/common.c
 delete mode 100644 arch/sh/drivers/pci/pci.c
 create mode 100644 arch/sh/kernel/pci-common.c
 create mode 100644 arch/sh/kernel/pci.c
 create mode 100644 drivers/clk/sh/Kconfig
 create mode 100644 drivers/clk/sh/Makefile
 create mode 100644 drivers/clk/sh/clk-sh7750cpg.c
 create mode 100644 drivers/irqchip/irq-io-landisk.c
 create mode 100644 drivers/irqchip/irq-renesas-r2dplus.c
 create mode 100644 drivers/irqchip/irq-renesas-sh7751.c
 create mode 100644 drivers/pci/host/pci-sh7751.c
 create mode 100644 include/dt-bindings/clock/renesas-sh7750.h
 create mode 100644 include/dt-bindings/interrupt-controller/sh_intc.h
Signature · 1 line
2.7.0
author maintainer
#1 lore raw

PATCH v4 1/22 sh: Add sh-specific early_init_dt_reserve_memory_arch

sh used P1 address space in early device tree.
So need convert P1 to physical address before reserve memory.

Changes v4
none

---
 arch/sh/boards/of-generic.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/sh/boards/of-generic.c +12 -0
index 57d45dc..8dbf978 100644
@@ -15,6 +15,7 @@
 #include <linux/clocksource.h>
 #include <linux/irqchip.h>
 #include <linux/clk-provider.h>
+#include <linux/memblock.h>
 #include <asm/machvec.h>
 #include <asm/rtc.h>
 
@@ -203,3 +204,14 @@ static int __init sh_of_device_init(void)
 	return 0;
 }
 arch_initcall_sync(sh_of_device_init);
+
+int __init early_init_dt_reserve_memory_arch(phys_addr_t base,
+					     phys_addr_t size, bool nomap)
+{
+	if (nomap)
+		return memblock_remove(base, size);
+
+	if (base >= P1SEG)
+		base &= ~P1SEG;
+	return memblock_reserve(base, size);
+}
Signature · 1 line
2.7.0
author maintainer
#2 lore raw

PATCH v4 2/22 sh: More early unflatten device tree

In reply to Yoshinori Sato

unflatten required MMU disabled.

Changes v4
none

---
 arch/sh/boards/of-generic.c | 6 ------
 arch/sh/kernel/setup.c      | 7 +++++++
 2 files changed, 7 insertions(+), 6 deletions(-)
arch/sh/boards/of-generic.c +0 -6
index 8dbf978..3db4294 100644
@@ -129,12 +129,6 @@ static void __init sh_of_setup(char **cmdline_p)
 {
 	struct device_node *root;
 
-#ifdef CONFIG_USE_BUILTIN_DTB
-	unflatten_and_copy_device_tree();
-#else
-	unflatten_device_tree();
-#endif
-
 	board_time_init = sh_of_time_init;
 
 	sh_mv.mv_name = "Unknown SH model";
arch/sh/kernel/setup.c +7 -0
index 5b9eb70..86f2792 100644
@@ -271,6 +271,13 @@ void __ref sh_fdt_init(phys_addr_t dt_phys)
 
 void __init setup_arch(char **cmdline_p)
 {
+#ifdef CONFIG_OF
+#ifdef CONFIG_USE_BUILTIN_DTB
+	unflatten_and_copy_device_tree();
+#else
+	unflatten_device_tree();
+#endif
+#endif
 	enable_mmu();
 
 	ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
Signature · 1 line
2.7.0
author maintainer
#3 lore raw

PATCH v4 3/22 sh: set preset_lpj

In reply to Yoshinori Sato

Generic callibrate delay required this value.

Changes v4
none

---
 arch/sh/boards/of-generic.c | 6 ++++++
 1 file changed, 6 insertions(+)
arch/sh/boards/of-generic.c +6 -0
index 3db4294..2d3cda3 100644
@@ -128,6 +128,8 @@ static void __init sh_of_time_init(void)
 static void __init sh_of_setup(char **cmdline_p)
 {
 	struct device_node *root;
+	struct device_node *cpu;
+	u32 freq;
 
 	board_time_init = sh_of_time_init;
 
@@ -139,6 +141,10 @@ static void __init sh_of_setup(char **cmdline_p)
 	}
 
 	sh_of_smp_probe();
+
+	cpu = of_find_node_by_name(NULL, "cpu");
+	if (!of_property_read_u32(cpu, "clock-frequency", &freq))
+		preset_lpj = freq / CONFIG_HZ / 2;
 }
 
 static int sh_of_irq_demux(int irq)
Signature · 1 line
2.7.0
author maintainer
#4 lore raw

PATCH v4 4/22 sh: Use P1SEGADDR

In reply to Yoshinori Sato

FDT address is P1SEG. So not virtual address.

Changes v4
none

---
 arch/sh/kernel/setup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sh/kernel/setup.c +1 -1
index 86f2792..8e3b099 100644
@@ -254,7 +254,7 @@ void __ref sh_fdt_init(phys_addr_t dt_phys)
 #ifdef CONFIG_USE_BUILTIN_DTB
 	dt_virt = __dtb_start;
 #else
-	dt_virt = phys_to_virt(dt_phys);
+	dt_virt = (void *)P1SEGADDR(dt_phys);
 #endif
 
 	if (!dt_virt || !early_init_dt_scan(dt_virt)) {
Signature · 1 line
2.7.0
author maintainer
#5 lore raw

PATCH v4 5/22 sh: command line passing chosen/bootargs in devicetree

In reply to Yoshinori Sato

Changes v4
none

---
 arch/sh/kernel/setup.c | 6 ++++++
 1 file changed, 6 insertions(+)
arch/sh/kernel/setup.c +6 -0
index 8e3b099..bdf57e5 100644
@@ -280,6 +280,7 @@ void __init setup_arch(char **cmdline_p)
 #endif
 	enable_mmu();
 
+#ifndef CONFIG_OF
 	ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
 
 	printk(KERN_NOTICE "Boot params:\n"
@@ -301,6 +302,7 @@ void __init setup_arch(char **cmdline_p)
 
 	if (!MOUNT_ROOT_RDONLY)
 		root_mountflags &= ~MS_RDONLY;
+#endif
 	init_mm.start_code = (unsigned long) _text;
 	init_mm.end_code = (unsigned long) _etext;
 	init_mm.end_data = (unsigned long) _edata;
@@ -323,9 +325,13 @@ void __init setup_arch(char **cmdline_p)
 #endif
 #endif
 
+#if !defined(CONFIG_OF) || defined(CONFIG_USE_BUILTIN_DTB)
 	/* Save unparsed command line copy for /proc/cmdline */
 	memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE);
 	*cmdline_p = command_line;
+#else
+	*cmdline_p = boot_command_line;
+#endif
 
 	parse_early_param();
 
Signature · 1 line
2.7.0
author maintainer
#6 lore raw

PATCH v4 6/22 sh: FDT address save before bank change

In reply to Yoshinori Sato

SH3/4 have register bank of R0-R7.
Preset FDT address assigned bank depend on boot loader.
Before setting a bank because we don't depend on a boot loader, it's evacuated.

Changes v4
none

---
 arch/sh/kernel/head_32.S | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
arch/sh/kernel/head_32.S +3 -4
index 974bc15..ef44fe8 100644
@@ -58,6 +58,9 @@ ENTRY(empty_zero_page)
  *
  */
 ENTRY(_stext)
+#ifdef CONFIG_OF
+	mov	r4, r12		! Store device tree blob pointer
+#endif
 	!			Initialize Status Register
 	mov.l	1f, r0		! MD=1, RB=0, BL=0, IMASK=0xF
 	ldc	r0, sr
@@ -67,10 +70,6 @@ ENTRY(_stext)
 	ldc	r0, r6_bank
 #endif
 
-#ifdef CONFIG_OF
-	mov	r4, r12		! Store device tree blob pointer in r12
-#endif
-	
 	/*
 	 * Prefetch if possible to reduce cache miss penalty.
 	 *
Signature · 1 line
2.7.0
author maintainer
#7 lore raw

PATCH v4 7/22 sh: Passing FDT address on zImage

In reply to Yoshinori Sato

Changes v4
none

---
 arch/sh/boot/compressed/head_32.S | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/sh/boot/compressed/head_32.S +3 -2
index 3e15032..a980c48 100644
@@ -11,10 +11,11 @@
 
 	.global	startup
 startup:
+	/* Save FDT address */
+	mov	r4, r13
 	/* Load initial status register */
 	mov.l   init_sr, r1
 	ldc     r1, sr
-
 	/* Move myself to proper location if necessary */
 	mova	1f, r0
 	mov.l	1f, r2
@@ -83,7 +84,7 @@ l1:
 	/* Jump to the start of the decompressed kernel */
 	mov.l	kernel_start_addr, r0
 	jmp	@r0
-	nop
+	 mov	r13,r4
 	
 	.align	2
 bss_start_addr:
Signature · 1 line
2.7.0
author maintainer
#8 lore raw

PATCH v4 8/22 sh: Disable board specific code on device tree mode

In reply to Yoshinori Sato

Changes v4
none

---
 arch/sh/Makefile                | 2 ++
 arch/sh/kernel/cpu/sh4/Makefile | 2 ++
 2 files changed, 4 insertions(+)
arch/sh/Makefile +2 -0
index 3b2c8b4..8adffa8 100644
@@ -132,6 +132,7 @@ core-$(CONFIG_SH_FPU_EMU)	+= arch/sh/math-emu/
 
 core-$(CONFIG_USE_BUILTIN_DTB)	+= arch/sh/boot/dts/
 
+ifneq ($(CONFIG_SH_DEVICE_TREE),y)
 # Mach groups
 machdir-$(CONFIG_SOLUTION_ENGINE)		+= mach-se
 machdir-$(CONFIG_SH_HP6XX)			+= mach-hp6xx
@@ -152,6 +153,7 @@ machdir-$(CONFIG_SH_LANDISK)			+= mach-landisk
 machdir-$(CONFIG_SH_LBOX_RE2)			+= mach-lboxre2
 machdir-$(CONFIG_SH_CAYMAN)			+= mach-cayman
 machdir-$(CONFIG_SH_RSK)			+= mach-rsk
+endif
 
 ifneq ($(machdir-y),)
 core-y	+= $(addprefix arch/sh/boards/, \
arch/sh/kernel/cpu/sh4/Makefile +2 -0
index 3a1dbc7..b822c0c 100644
@@ -14,6 +14,7 @@ perf-$(CONFIG_CPU_SUBTYPE_SH7750)	:= perf_event.o
 perf-$(CONFIG_CPU_SUBTYPE_SH7750S)	:= perf_event.o
 perf-$(CONFIG_CPU_SUBTYPE_SH7091)	:= perf_event.o
 
+ifndef CONFIG_OF
 # CPU subtype setup
 obj-$(CONFIG_CPU_SUBTYPE_SH7750)	+= setup-sh7750.o
 obj-$(CONFIG_CPU_SUBTYPE_SH7750R)	+= setup-sh7750.o
@@ -31,6 +32,7 @@ endif
 
 # Additional clocks by subtype
 clock-$(CONFIG_CPU_SUBTYPE_SH4_202)	+= clock-sh4-202.o
+endif
 
 obj-y					+= $(clock-y)
 obj-$(CONFIG_PERF_EVENTS)		+= $(perf-y)
Signature · 1 line
2.7.0
author maintainer
#9 lore raw

PATCH v4 9/22 sh: Use GENERIC_IOMAP on device tree mode

In reply to Yoshinori Sato

Changes v4
none

---
 arch/sh/boards/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/sh/boards/Kconfig +1 -0
index 5e52d53..9e4ccd0 100644
@@ -12,6 +12,7 @@ config SH_DEVICE_TREE
 	select OF_EARLY_FLATTREE
 	select CLKSRC_OF
 	select GENERIC_CALIBRATE_DELAY
+	select GENERIC_IOMAP
 	help
 	  Select Board Described by Device Tree to build a kernel that
 	  does not hard-code any board-specific knowledge but instead uses
Signature · 1 line
2.7.0
author maintainer
#10 lore raw

PATCH v4 10/22 sh: Add board specific initialize of of-generic

In reply to Yoshinori Sato

Changes v4
none

---
 arch/sh/boards/of-generic.c | 64 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)
arch/sh/boards/of-generic.c +64 -0
index 2d3cda3..709006a 100644
@@ -16,9 +16,15 @@
 #include <linux/irqchip.h>
 #include <linux/clk-provider.h>
 #include <linux/memblock.h>
+#include <linux/sm501-regs.h>
 #include <asm/machvec.h>
 #include <asm/rtc.h>
 
+struct model_setup {
+	char *name;
+	void (*fn)(void);
+};
+
 #ifdef CONFIG_SMP
 
 static void dummy_smp_setup(void)
@@ -125,10 +131,61 @@ static void __init sh_of_time_init(void)
 	clocksource_probe();
 }
 
+#define PA_LED		0xb0000001	/* LED Control Register */
+#define PA_SHUTDOWN	0xb0000003	/* Shutdown Control Register */
+static void landisk_power_off(void)
+{
+	__raw_writeb(0x01, PA_SHUTDOWN);
+}
+
+static void __init landisk_setup(void)
+{
+	/* LED ON */
+	__raw_writeb(__raw_readb(PA_LED) | 0x03, PA_LED);
+	pm_power_off = landisk_power_off;
+}
+
+#define PA_POWOFF	0xa4000030	/* Board Power OFF control */
+#define PA_OUTPORT	0xa4000036	/* LED control */
+static void rts7751r2d_power_off(void)
+{
+	__raw_writew(0x0001, PA_POWOFF);
+}
+
+static void __init r2dplus_setup(void)
+{
+	void __iomem *sm501_reg;
+
+	__raw_writew(0x0000, PA_OUTPORT);
+	pm_power_off = rts7751r2d_power_off;
+
+	/* sm501 dram configuration:
+	 * ColSizeX = 11 - External Memory Column Size: 256 words.
+	 * APX = 1 - External Memory Active to Pre-Charge Delay: 7 clocks.
+	 * RstX = 1 - External Memory Reset: Normal.
+	 * Rfsh = 1 - Local Memory Refresh to Command Delay: 12 clocks.
+	 * BwC =  1 - Local Memory Block Write Cycle Time: 2 clocks.
+	 * BwP =  1 - Local Memory Block Write to Pre-Charge Delay: 1 clock.
+	 * AP = 1 - Internal Memory Active to Pre-Charge Delay: 7 clocks.
+	 * Rst = 1 - Internal Memory Reset: Normal.
+	 * RA = 1 - Internal Memory Remain in Active State: Do not remain.
+	 */
+
+	sm501_reg = (void __iomem *)0xb3e00000 + SM501_DRAM_CONTROL;
+	writel(readl(sm501_reg) | 0x00f107c0, sm501_reg);
+}
+
+static const struct model_setup model_setup_table[] __initconst = {
+	{ .name = "I/O DATA HDL-U", .fn = landisk_setup, },
+	{ .name = "Renesas RTS7751R2D+", .fn = r2dplus_setup, },
+	{},
+};
+
 static void __init sh_of_setup(char **cmdline_p)
 {
 	struct device_node *root;
 	struct device_node *cpu;
+	const struct model_setup *setup;
 	u32 freq;
 
 	board_time_init = sh_of_time_init;
@@ -145,6 +202,13 @@ static void __init sh_of_setup(char **cmdline_p)
 	cpu = of_find_node_by_name(NULL, "cpu");
 	if (!of_property_read_u32(cpu, "clock-frequency", &freq))
 		preset_lpj = freq / CONFIG_HZ / 2;
+
+	for (setup = model_setup_table; setup->name; setup++) {
+		if (strcmp(setup->name, sh_mv.mv_name) = 0) {
+			setup->fn();
+			break;
+		}
+	}
 }
 
 static int sh_of_irq_demux(int irq)
Signature · 1 line
2.7.0
author maintainer
#11 lore raw

PATCH v4 11/22 sh: SH7750/51 CPG Driver

In reply to Yoshinori Sato

Convert SH specific clock framework to CCF.

Changes v4
Add acked-by

---
 .../bindings/clock/renesas,sh7750-cpg.txt          |  25 ++
 arch/sh/boards/Kconfig                             |   1 +
 arch/sh/kernel/cpu/Makefile                        |   8 +-
 arch/sh/kernel/cpu/clock.c                         |   6 +-
 drivers/clk/Kconfig                                |   1 +
 drivers/clk/Makefile                               |   3 +-
 drivers/clk/sh/Kconfig                             |   2 +
 drivers/clk/sh/Makefile                            |   1 +
 drivers/clk/sh/clk-sh7750cpg.c                     | 344 +++++++++++++++++++++
 9 files changed, 387 insertions(+), 4 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/renesas,sh7750-cpg.txt
 create mode 100644 drivers/clk/sh/Kconfig
 create mode 100644 drivers/clk/sh/Makefile
 create mode 100644 drivers/clk/sh/clk-sh7750cpg.c
Documentation/devicetree/bindings/clock/renesas,sh7750-cpg.txt new file +25 -0
new file mode 100644
index 0000000..e763e2c
@@ -0,0 +1,25 @@
+* Renesas SH7750/51 CPG
+
+Required Properties:
+
+  - compatible: Must be "renesas,sh7750-cpg"
+
+  - clocks: Reference to the parent clocks (xtal or external)
+
+  - #clock-cells: Must be 1
+
+  - reg: Base address and length of the FREQCR
+         and Base address and length of the CLKSTP00 (optional)
+
+  - renesas,mult: PLL1 multiply rate
+
+Example
+-------
+
+        cpg: cpg@ffc00000 {
+                compatible = "renesas,sh7750-cpg";
+                clocks = <&oclk>;
+                #clock-cells = <1>;
+                renesas,mult = <12>;
+                reg = <0xffc00000 32>, <0xfe0a0000 16>;
+        };
arch/sh/boards/Kconfig +1 -0
index 9e4ccd0..b6ff9df 100644
@@ -13,6 +13,7 @@ config SH_DEVICE_TREE
 	select CLKSRC_OF
 	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_IOMAP
+	select COMMON_CLK
 	help
 	  Select Board Described by Device Tree to build a kernel that
 	  does not hard-code any board-specific knowledge but instead uses
arch/sh/kernel/cpu/Makefile +6 -2
index accc7ca..22ad0ee 100644
@@ -16,6 +16,10 @@ obj-$(CONFIG_ARCH_SHMOBILE)	+= shmobile/
 # Common interfaces.
 
 obj-$(CONFIG_SH_ADC)		+= adc.o
+ifndef CONFIG_COMMON_CLK
 obj-$(CONFIG_SH_CLK_CPG_LEGACY)	+= clock-cpg.o
-
-obj-y	+= irq/ init.o clock.o fpu.o pfc.o proc.o
+endif
+ifndef CONFIG_GENERIC_IRQ_CHIP
+obj-y	+= irq/
+endif
+obj-y	+= init.o clock.o fpu.o pfc.o proc.o
arch/sh/kernel/cpu/clock.c +5 -1
index 4187cf4..8e66e23 100644
@@ -22,13 +22,15 @@
 
 int __init clk_init(void)
 {
-	int ret;
+	int ret = 0;
 
+#ifndef CONFIG_COMMON_CLK
 	ret = arch_clk_init();
 	if (unlikely(ret)) {
 		pr_err("%s: CPU clock registration failed.\n", __func__);
 		return ret;
 	}
+#endif
 
 	if (sh_mv.mv_clk_init) {
 		ret = sh_mv.mv_clk_init();
@@ -39,11 +41,13 @@ int __init clk_init(void)
 		}
 	}
 
+#ifndef CONFIG_COMMON_CLK
 	/* Kick the child clocks.. */
 	recalculate_root_clocks();
 
 	/* Enable the necessary init clocks */
 	clk_enable_init_clocks();
+#endif
 
 	return ret;
 }
drivers/clk/Kconfig +1 -0
index 98efbfc..60d19d0 100644
@@ -213,6 +213,7 @@ source "drivers/clk/mvebu/Kconfig"
 source "drivers/clk/qcom/Kconfig"
 source "drivers/clk/renesas/Kconfig"
 source "drivers/clk/samsung/Kconfig"
+source "drivers/clk/sh/Kconfig"
 source "drivers/clk/tegra/Kconfig"
 source "drivers/clk/ti/Kconfig"
 
drivers/clk/Makefile +2 -1
index dcc5e69..c4bfbb9 100644
@@ -86,5 +86,6 @@ obj-$(CONFIG_COMMON_CLK_VERSATILE)	+= versatile/
 obj-$(CONFIG_X86)			+= x86/
 obj-$(CONFIG_ARCH_ZX)			+= zte/
 obj-$(CONFIG_ARCH_ZYNQ)			+= zynq/
-obj-$(CONFIG_H8300)		+= h8300/
+obj-$(CONFIG_H8300)			+= h8300/
 obj-$(CONFIG_ARC_PLAT_AXS10X)		+= axs10x/
+obj-$(CONFIG_SUPERH)			+= sh/
drivers/clk/sh/Kconfig new file +2 -0
new file mode 100644
index 0000000..2090415
@@ -0,0 +1,2 @@
+config COMMON_CLK_SH7750
+	bool "CPG driver for SH7750/SH7751"
drivers/clk/sh/Makefile new file +1 -0
new file mode 100644
index 0000000..7ce4da3
@@ -0,0 +1 @@
+obj-$(CONFIG_COMMON_CLK_SH7750) += clk-sh7750cpg.o
drivers/clk/sh/clk-sh7750cpg.c new file +344 -0

344 lines not on this page · raw message

Signature · 1 line
2.7.0
author maintainer
#12 lore raw

PATCH v4 12/22 sh: Add PCI host bridge driver for SH7751

In reply to Yoshinori Sato

This is an alternative SH7751 PCI driver.
Existing driver (arch/sh/drivers/pci/pci-sh7751) uses SH specific interface. But this driver uses common PCI interface. It is more modern and generic.

Changes v4
Add reg description.

---
 .../devicetree/bindings/pci/sh7751-pci.txt         |  37 +++
 arch/sh/boards/Kconfig                             |   1 +
 arch/sh/drivers/Makefile                           |   2 +
 arch/sh/include/asm/io.h                           |   6 +
 drivers/pci/host/Kconfig                           |   7 +
 drivers/pci/host/Makefile                          |   1 +
 drivers/pci/host/pci-sh7751.c                      | 326 +++++++++++++++++++++
 7 files changed, 380 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pci/sh7751-pci.txt
 create mode 100644 drivers/pci/host/pci-sh7751.c
Documentation/devicetree/bindings/pci/sh7751-pci.txt new file +37 -0
new file mode 100644
index 0000000..2df9af6
@@ -0,0 +1,37 @@
+* Renesas SH7751 PCI host interfaces
+
+Required properties:
+  - compatible: "renesas,sh7751-pci" is required.
+    And board specific compatible if fixup required.
+  - reg: contain two entries.
+        first entry: PCI controller register base address and length.
+        second entry: BUS controller register base address and length.
+  - #address-cells: set to <2>
+  - #size-cells: set to <1>
+  - bus-range: PCI bus numbers covered
+  - device_type: set to "pci"
+  - ranges: ranges for the PCI memory and I/O regions.
+  - interrupt-map-mask and interrupt-map: standard PCI properties
+	to define the mapping of the PCI interface to interrupt
+	numbers.
+
+Example:
+	pci: pci-controller@fe200000 {
+		compatible = "renesas,sh7751-pci", "iodata,landisk";
+		device_type = "pci";
+		bus-range = <0 0>;
+		#address-cells = <2>;
+		#size-cells = <1>;
+		ranges = <0x02000000 0x00000000 0xfd000000 0xfd000000 0x00000000 0x01000000>,
+		         <0x01000000 0x00000000 0xfe240000 0x00000000 0x00000000 0x00040000>;
+		reg = <0xfe200000 0x0400>,
+		      <0xff800000 0x0030>;
+		#interrupt-cells = <1>;
+		interrupt-map-mask = <0x1800 0 7>;
+		interrupt-map = <0x0000 0 1 &cpldintc 0 0>,
+		                 0x0800 0 1 &cpldintc 1 0>,
+		                 0x1000 0 1 &cpldintc 2 0>,
+		                 0x1800 0 1 &cpldintc 3 0>,
+		                 0x1800 0 2 &cpldintc 0 0>;
+	};
+};
arch/sh/boards/Kconfig +1 -0
index b6ff9df..cfde921 100644
@@ -14,6 +14,7 @@ config SH_DEVICE_TREE
 	select GENERIC_CALIBRATE_DELAY
 	select GENERIC_IOMAP
 	select COMMON_CLK
+	select SYS_SUPPORTS_PCI
 	help
 	  Select Board Described by Device Tree to build a kernel that
 	  does not hard-code any board-specific knowledge but instead uses
arch/sh/drivers/Makefile +2 -0
index e13f06b..382e86f 100644
@@ -4,7 +4,9 @@
 
 obj-y		+= dma/
 
+ifndef CONFIG_SH_DEVICE_TREE
 obj-$(CONFIG_PCI)		+= pci/
+endif
 obj-$(CONFIG_SUPERHYWAY)	+= superhyway/
 obj-$(CONFIG_PUSH_SWITCH)	+= push-switch.o
 obj-$(CONFIG_HEARTBEAT)		+= heartbeat.o
arch/sh/include/asm/io.h +6 -0
index 3280a6b..df62a9f 100644
@@ -387,6 +387,12 @@ static inline int iounmap_fixed(void __iomem *addr) { return -EINVAL; }
 int valid_phys_addr_range(phys_addr_t addr, size_t size);
 int valid_mmap_phys_addr_range(unsigned long pfn, size_t size);
 
+#define PCI_IOBASE	0xfe240000UL
+
+#define HAVE_ARCH_PIO_SIZE
+#define PIO_OFFSET	PCI_IOBASE
+#define PIO_MASK	0x3ffffUL
+#define PIO_RESERVED	0x40000UL
 #endif /* __KERNEL__ */
 
 #endif /* __ASM_SH_IO_H */
drivers/pci/host/Kconfig +7 -0
index 5d2374e..df60505 100644
@@ -245,4 +245,11 @@ config PCIE_ARMADA_8K
 	  Designware hardware and therefore the driver re-uses the
 	  Designware core functions to implement the driver.
 
+config PCI_SH7751
+	bool "Renesas SH7751 On-Chip PCI controller"
+	depends on OF && SUPERH
+	select PCI_HOST_COMMON
+	help
+	  Say Y here if you want PCI support on SH7751.
+
 endmenu
drivers/pci/host/Makefile +1 -0
index 9c8698e..4681e49 100644
@@ -29,3 +29,4 @@ obj-$(CONFIG_PCIE_QCOM) += pcie-qcom.o
 obj-$(CONFIG_PCI_HOST_THUNDER_ECAM) += pci-thunder-ecam.o
 obj-$(CONFIG_PCI_HOST_THUNDER_PEM) += pci-thunder-pem.o
 obj-$(CONFIG_PCIE_ARMADA_8K) += pcie-armada8k.o
+obj-$(CONFIG_PCI_SH7751) += pci-sh7751.o
drivers/pci/host/pci-sh7751.c new file +326 -0

326 lines not on this page · raw message

Signature · 1 line
2.7.0
#13 lore raw

Re: [PATCH v4 12/22] sh: Add PCI host bridge driver for SH7751

Documentation/devicetree/bindings/pci/sh7751-pci.txt line 35

Quoted 5 lines · CEST Yoshinori Sato
Documentation/devicetree/bindings/pci/sh7751-pci.txt new file +5 -0
+               interrupt-map = <0x0000 0 1 &cpldintc 0 0>,
+                                0x0800 0 1 &cpldintc 1 0>,
+                                0x1000 0 1 &cpldintc 2 0>,
+                                0x1800 0 1 &cpldintc 3 0>,
+                                0x1800 0 2 &cpldintc 0 0>;

I just noticed the typo: you have more closing '>' than opening '<' here, so this is not valid syntax.

drivers/pci/host/pci-sh7751.c line 326

Quoted 9 lines
drivers/pci/host/pci-sh7751.c new file +9 -0
+
+static __refdata struct platform_driver sh7751_pci_driver = {
+       .driver = {
+               .name = "sh7751-pci",
+               .of_match_table = sh7751_pci_of_match,
+       },
+       .probe = sh7751_pci_probe,
+};
+builtin_platform_driver(sh7751_pci_driver);

I think you need to add '.suppress_bind_attrs = true' to prevent the device to be unbound and rebound through sysfs, otherwise the __init annotation on the probe function is wrong.

Everything else looks fine to me now.

Arnd

author maintainer
#14 lore raw

Re: [PATCH v4 12/22] sh: Add PCI host bridge driver for SH7751

Quoted 10 lines · Arnd Bergmann

Documentation/devicetree/bindings/pci/sh7751-pci.txt line 35

Quoted 5 lines · CEST Yoshinori Sato
Documentation/devicetree/bindings/pci/sh7751-pci.txt new file +5 -0
+               interrupt-map = <0x0000 0 1 &cpldintc 0 0>,
+                                0x0800 0 1 &cpldintc 1 0>,
+                                0x1000 0 1 &cpldintc 2 0>,
+                                0x1800 0 1 &cpldintc 3 0>,
+                                0x1800 0 2 &cpldintc 0 0>;

I just noticed the typo: you have more closing '>' than opening '<' here, so this is not valid syntax.

Oh.
It too old files. I mistake commit.

Quoted 5 lines
Quoted 5 lines
drivers/pci/host/pci-sh7751.c new file +5 -0
+
+static __refdata struct platform_driver sh7751_pci_driver = {
+       .driver = {
+               .name = "sh7751-pci",
+               .of_match_table = sh7751_pci_of_match,
Quoted 8 lines

drivers/pci/host/pci-sh7751.c line 326

Quoted 4 lines
drivers/pci/host/pci-sh7751.c new file +4 -0
+       },
+       .probe = sh7751_pci_probe,
+};
+builtin_platform_driver(sh7751_pci_driver);

I think you need to add '.suppress_bind_attrs = true' to prevent the device to be unbound and rebound through sysfs, otherwise the __init annotation on the probe function is wrong.

Yes. This target hot add don't use.
It flag required.

Quoted 1 line

Everything else looks fine to me now.

OK.
Thanks.

Quoted 2 lines

Arnd

Signature · 2 lines
Yoshinori Sato
<[email protected]>
maintainer Acked-by on v4 12/22
#15 lore raw

Re: [PATCH v4 12/22] sh: Add PCI host bridge driver for SH7751

In reply to Yoshinori Sato
Quoted 10 lines · Yoshinori Sato

This is an alternative SH7751 PCI driver.
Existing driver (arch/sh/drivers/pci/pci-sh7751) uses SH specific interface. But this driver uses common PCI interface. It is more modern and generic.

Changes v4
Add reg description.

---
 .../devicetree/bindings/pci/sh7751-pci.txt         |  37 +++
Quoted 9 lines
 arch/sh/boards/Kconfig                             |   1 +
 arch/sh/drivers/Makefile                           |   2 +
 arch/sh/include/asm/io.h                           |   6 +
 drivers/pci/host/Kconfig                           |   7 +
 drivers/pci/host/Makefile                          |   1 +
 drivers/pci/host/pci-sh7751.c                      | 326 +++++++++++++++++++++
 7 files changed, 380 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pci/sh7751-pci.txt
 create mode 100644 drivers/pci/host/pci-sh7751.c
author maintainer
#16 lore raw

PATCH v4 13/22 sh: irqchip: SH7751 IRQCHIP Driver

In reply to Yoshinori Sato

Changes v4
- update example

---
 .../interrupt-controller/renesas,sh7751-intc.txt   |  25 ++++
 arch/sh/Kconfig                                    |   6 +-
 arch/sh/boards/Kconfig                             |   1 +
 drivers/irqchip/Kconfig                            |   5 +
 drivers/irqchip/Makefile                           |   1 +
 drivers/irqchip/irq-renesas-sh7751.c               | 141 +++++++++++++++++++++
 6 files changed, 176 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/renesas,sh7751-intc.txt
 create mode 100644 drivers/irqchip/irq-renesas-sh7751.c
Documentation/devicetree/bindings/interrupt-controller/renesas,sh7751-intc.txt new file +23 -0
new file mode 100644
index 0000000..2bc6f22f
@@ -0,0 +1,23 @@
+DT bindings for the SH7751 interrupt controller
+
+Required properties:
+
+  - compatible: has to be "renesas,sh7751-intc".
+
+  - reg: Base address and length of interrupt controller register
+         and extend register.
+
+  - interrupt-controller: Identifies the node as an interrupt controller.
+
+  - #interrupt-cells: has to be <2>: an interrupt index and flags, as defined
+    in interrupts.txt in this directory.
+
+Example
+-------
+
+	shintc: interrupt-controller@ffd00000 {
+		compatible = "renesas,sh7751-intc";
+		#interrupt-cells = <2>;
+		interrupt-controller;
+		reg = <0xffd00000 14>, <0xfe080000 128>;
+	};
arch/sh/Kconfig +3 -3
index d06cac1..fee4333 100644
@@ -29,7 +29,7 @@ config SUPERH
 	select ARCH_WANT_IPC_PARSE_VERSION
 	select HAVE_SYSCALL_TRACEPOINTS
 	select HAVE_REGS_AND_STACK_ACCESS_API
-	select MAY_HAVE_SPARSE_IRQ
+	select MAY_HAVE_SPARSE_IRQ if !SH_DEVICE_TREE
 	select IRQ_FORCED_THREADING
 	select RTC_LIB
 	select GENERIC_ATOMIC64
@@ -69,7 +69,7 @@ config SUPERH32
 	select HAVE_MIXED_BREAKPOINTS_REGS
 	select PERF_EVENTS
 	select ARCH_HIBERNATION_POSSIBLE if MMU
-	select SPARSE_IRQ
+	select SPARSE_IRQ if !SH_DEVICE_TREE
 	select HAVE_CC_STACKPROTECTOR
 
 config SUPERH64
@@ -863,7 +863,7 @@ config PCI
 	depends on SYS_SUPPORTS_PCI
 	select PCI_DOMAINS
 	select GENERIC_PCI_IOMAP
-	select NO_GENERIC_PCI_IOPORT_MAP
+	select NO_GENERIC_PCI_IOPORT_MAP if !SH_DEVICE_TREE
 	help
 	  Find out whether you have a PCI motherboard. PCI is the name of a
 	  bus system, i.e. the way the CPU talks to the other stuff inside
arch/sh/boards/Kconfig +1 -0
index cfde921..d33ae46 100644
@@ -15,6 +15,7 @@ config SH_DEVICE_TREE
 	select GENERIC_IOMAP
 	select COMMON_CLK
 	select SYS_SUPPORTS_PCI
+	select GENERIC_IRQ_CHIP
 	help
 	  Select Board Described by Device Tree to build a kernel that
 	  does not hard-code any board-specific knowledge but instead uses
drivers/irqchip/Kconfig +5 -0
index fa33c50..fd7f842 100644
@@ -251,6 +251,11 @@ config LS_SCFG_MSI
 	depends on PCI && PCI_MSI
 	select PCI_MSI_IRQ_DOMAIN
 
+config RENESAS_SH_INTC
+	def_bool y if SH_DEVICE_TREE
+	select IRQ_DOMAIN
+	select IRQ_DOMAIN_HIERARCHY
+
 config PARTITION_PERCPU
 	bool
 
drivers/irqchip/Makefile +1 -0
index 38853a1..2ab5735 100644
@@ -69,3 +69,4 @@ obj-$(CONFIG_PIC32_EVIC)		+= irq-pic32-evic.o
 obj-$(CONFIG_MVEBU_ODMI)		+= irq-mvebu-odmi.o
 obj-$(CONFIG_LS_SCFG_MSI)		+= irq-ls-scfg-msi.o
 obj-$(CONFIG_EZNPS_GIC)			+= irq-eznps.o
+obj-$(CONFIG_RENESAS_SH_INTC)		+= irq-renesas-sh7751.o
drivers/irqchip/irq-renesas-sh7751.c new file +141 -0

141 lines not on this page · raw message

Signature · 1 line
2.7.0
author maintainer
#17 lore raw

PATCH v4 14/22 sh: SH7751 core dtsi

In reply to Yoshinori Sato

SH7751 core and internal peripheral define.

Changes v4
- remove unneeded #address-cells and #size-cells
- add missing dt-binding link

---
 arch/sh/boot/dts/include/dt-bindings               |  1 +
 arch/sh/boot/dts/sh7751.dtsi                       | 83 ++++++++++++++++++++++
 include/dt-bindings/clock/renesas-sh7750.h         | 26 +++++++
 include/dt-bindings/interrupt-controller/sh_intc.h |  2 +
 4 files changed, 112 insertions(+)
 create mode 120000 arch/sh/boot/dts/include/dt-bindings
 create mode 100644 arch/sh/boot/dts/sh7751.dtsi
 create mode 100644 include/dt-bindings/clock/renesas-sh7750.h
 create mode 100644 include/dt-bindings/interrupt-controller/sh_intc.h
arch/sh/boot/dts/include/dt-bindings new file +1 -0
new file mode 120000
index 0000000..08c00e4
@@ -0,0 +1 @@
+../../../../../include/dt-bindings
\ No newline at end of file
arch/sh/boot/dts/sh7751.dtsi new file +83 -0

84 lines not on this page · raw message

include/dt-bindings/clock/renesas-sh7750.h new file +26 -0
new file mode 100644
index 0000000..546c0b1
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2016 Yoshinori Sato
+ *
+ * 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.
+ */
+#ifndef __DT_BINDINGS_CLOCK_RENESAS_SH7750_H__
+#define __DT_BINDINGS_CLOCK_RENESAS_SH7750_H__
+
+#define SH7750_CLK_SCI	0
+#define SH7750_CLK_RTC	1
+#define SH7750_CLK_TMU0	2
+#define SH7750_CLK_TMU1	3
+#define SH7750_CLK_TMU2	4
+#define SH7750_CLK_SCIF	5
+#define SH7750_CLK_DMAC	6
+#define SH7750_CLK_UBC	7
+#define SH7750_CLK_SQ	8
+#define SH7750_CLK_INTC 9
+#define SH7750_CLK_TMU3	10
+#define SH7750_CLK_TMU4	11
+#define SH7750_CLK_PCIC	12
+
+#endif /* __DT_BINDINGS_CLOCK_RENESAS_CPG_MSSR_H__ */
include/dt-bindings/interrupt-controller/sh_intc.h new file +2 -0
new file mode 100644
index 0000000..8c9dcdc
@@ -0,0 +1,2 @@
+#define evt2irq(evt)		(((evt) >> 5) - 16)
+#define irq2evt(irq)		(((irq) + 16) << 5)
Signature · 1 line
2.7.0
#18 lore raw

Re: [PATCH v4 14/22] sh: SH7751 core dtsi

Hi Sato-san,

Quoted 1 line · Yoshinori Sato

SH7751 core and internal peripheral define.

Thanks for your patch!

Quoted 3 lines

Changes v4
- remove unneeded #address-cells and #size-cells
- add missing dt-binding link

Please move changelog information below the three dashes...

Quoted 3 lines

---

... i.e. here.

arch/sh/boot/dts/include/dt-bindings line 1

Quoted 5 lines
arch/sh/boot/dts/include/dt-bindings new file +1 -0
@@ -0,0 +1 @@
+../../../../../include/dt-bindings
\ No newline at end of file

Missing newline.

arch/sh/boot/dts/sh7751.dtsi line 16

Quoted 9 lines
arch/sh/boot/dts/sh7751.dtsi new file +6 -0
 
+       oclk: oscillator {
+                #clock-cells = <0>;
+                compatible = "fixed-clock";
+                clock-frequency = <0>;
+        };
+       cpg: cpg@ffc00000 {

clock-controller@ffc00000

Quoted 1 line

\ No newline at end of file

Missing newline.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

author maintainer
#19 lore raw

Re: [PATCH v4 14/22] sh: SH7751 core dtsi

Quoted 13 lines · Geert Uytterhoeven

Hi Sato-san,

Quoted 1 line · Yoshinori Sato

SH7751 core and internal peripheral define.

Thanks for your patch!

Quoted 3 lines

Changes v4
- remove unneeded #address-cells and #size-cells
- add missing dt-binding link

Quoted 7 lines

Please move changelog information below the three dashes...

Quoted 3 lines

---

... i.e. here.

OK.

Quoted 7 lines

arch/sh/boot/dts/include/dt-bindings line 1

Quoted 5 lines
arch/sh/boot/dts/include/dt-bindings new file +1 -0
@@ -0,0 +1 @@
+../../../../../include/dt-bindings
\ No newline at end of file

Missing newline.

This file is symbolic link.
I think not need newline.

Quoted 11 lines

arch/sh/boot/dts/sh7751.dtsi line 16

Quoted 9 lines
arch/sh/boot/dts/sh7751.dtsi new file +6 -0
 
+       oclk: oscillator {
+                #clock-cells = <0>;
+                compatible = "fixed-clock";
+                clock-frequency = <0>;
+        };
+       cpg: cpg@ffc00000 {

clock-controller@ffc00000

OK.

Quoted 3 lines
Quoted 1 line

\ No newline at end of file

Missing newline.

OK.

Quoted 10 lines

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

Signature · 2 lines
Yoshinori Sato
<[email protected]>
#20 lore raw

Re: [PATCH v4 14/22] sh: SH7751 core dtsi

In reply to Yoshinori Sato

Hi Sato-san,

Quoted 17 lines · Yoshinori Sato
include/dt-bindings/clock/renesas-sh7750.h new file +14 -0
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2016 Yoshinori Sato
+ *
+ * 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.
+ */
+#ifndef __DT_BINDINGS_CLOCK_RENESAS_SH7750_H__
+#define __DT_BINDINGS_CLOCK_RENESAS_SH7750_H__
+
+#define SH7750_CLK_SCI 0
+#define SH7750_CLK_RTC 1
+#define SH7750_CLK_TMU0        2

include/dt-bindings/clock/renesas-sh7750.h line 24

Quoted 10 lines
include/dt-bindings/clock/renesas-sh7750.h new file +10 -0
+#define SH7750_CLK_TMU1        3
+#define SH7750_CLK_TMU2        4
+#define SH7750_CLK_SCIF        5
+#define SH7750_CLK_DMAC        6
+#define SH7750_CLK_UBC 7
+#define SH7750_CLK_SQ  8
+#define SH7750_CLK_INTC 9
+#define SH7750_CLK_TMU3        10
+#define SH7750_CLK_TMU4        11
+#define SH7750_CLK_PCIC        12

Looking at the table in drivers/clk/sh/clk-sh7750cpg.c, SH7750_CLK_CORE seems to be missing?

include/dt-bindings/clock/renesas-sh7750.h line 26

Quoted 2 lines
include/dt-bindings/clock/renesas-sh7750.h new file +2 -0
+
+#endif /* __DT_BINDINGS_CLOCK_RENESAS_CPG_MSSR_H__ */

Relic from the Renesas CPG/MSSR driver.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

author maintainer
#21 lore raw

Re: [PATCH v4 14/22] sh: SH7751 core dtsi

Quoted 27 lines · Geert Uytterhoeven

Hi Sato-san,

Quoted 22 lines · Yoshinori Sato
include/dt-bindings/clock/renesas-sh7750.h new file +19 -0
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2016 Yoshinori Sato
+ *
+ * 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.
+ */
+#ifndef __DT_BINDINGS_CLOCK_RENESAS_SH7750_H__
+#define __DT_BINDINGS_CLOCK_RENESAS_SH7750_H__
+
+#define SH7750_CLK_SCI 0
+#define SH7750_CLK_RTC 1
+#define SH7750_CLK_TMU0        2
+#define SH7750_CLK_TMU1        3
+#define SH7750_CLK_TMU2        4
+#define SH7750_CLK_SCIF        5
+#define SH7750_CLK_DMAC        6
+#define SH7750_CLK_UBC 7
Quoted 8 lines

include/dt-bindings/clock/renesas-sh7750.h line 24

Quoted 5 lines
include/dt-bindings/clock/renesas-sh7750.h new file +5 -0
+#define SH7750_CLK_SQ  8
+#define SH7750_CLK_INTC 9
+#define SH7750_CLK_TMU3        10
+#define SH7750_CLK_TMU4        11
+#define SH7750_CLK_PCIC        12

Looking at the table in drivers/clk/sh/clk-sh7750cpg.c, SH7750_CLK_CORE seems to be missing?

Yes.
I forgot it.

Quoted 4 lines

include/dt-bindings/clock/renesas-sh7750.h line 26

Quoted 2 lines
include/dt-bindings/clock/renesas-sh7750.h new file +2 -0
+
+#endif /* __DT_BINDINGS_CLOCK_RENESAS_CPG_MSSR_H__ */

Relic from the Renesas CPG/MSSR driver.

OK.

Quoted 10 lines

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

Signature · 6 lines
Yoshinori Sato
<[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author maintainer
#22 lore raw

PATCH v4 15/22 sh: Move common PCI stuff to arch/sh/kernel

In reply to Yoshinori Sato

Changes v4
none

---
 arch/sh/drivers/pci/Makefile |   2 -
 arch/sh/drivers/pci/common.c | 162 --------------------
 arch/sh/drivers/pci/pci.c    | 320 ----------------------------------------
 arch/sh/kernel/Makefile      |   2 +
 arch/sh/kernel/pci-common.c  | 162 ++++++++++++++++++++
 arch/sh/kernel/pci.c         | 342 +++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 506 insertions(+), 484 deletions(-)
 delete mode 100644 arch/sh/drivers/pci/common.c
 delete mode 100644 arch/sh/drivers/pci/pci.c
 create mode 100644 arch/sh/kernel/pci-common.c
 create mode 100644 arch/sh/kernel/pci.c
arch/sh/drivers/pci/Makefile +0 -2
index 82f0a33..fffbede 100644
@@ -1,8 +1,6 @@
 #
 # Makefile for the PCI specific kernel interface routines under Linux.
 #
-obj-y					+= common.o pci.o
-
 obj-$(CONFIG_CPU_SUBTYPE_SH7751)	+= pci-sh7751.o ops-sh4.o
 obj-$(CONFIG_CPU_SUBTYPE_SH7751R)	+= pci-sh7751.o ops-sh4.o
 obj-$(CONFIG_CPU_SUBTYPE_SH7763)	+= pci-sh7780.o ops-sh4.o
arch/sh/drivers/pci/common.c deleted +0 -161

161 lines not on this page · raw message

arch/sh/drivers/pci/pci.c deleted +0 -320

320 lines not on this page · raw message

arch/sh/kernel/Makefile +2 -0
index 09040fd..a9a54c2 100644
@@ -46,5 +46,7 @@ obj-$(CONFIG_DWARF_UNWINDER)	+= dwarf.o
 obj-$(CONFIG_PERF_EVENTS)	+= perf_event.o perf_callchain.o
 
 obj-$(CONFIG_HAVE_HW_BREAKPOINT)		+= hw_breakpoint.o
+obj-$(CONFIG_PCI)		+= pci.o pci-common.o
 
 ccflags-y := -Werror
+CFLAGS_pci.o := -O0
arch/sh/kernel/pci-common.c new file +161 -0

161 lines not on this page · raw message

arch/sh/kernel/pci.c new file +342 -0

342 lines not on this page · raw message

Signature · 1 line
2.7.0
author maintainer
#23 lore raw

PATCH v4 16/22 pci: pci_config_window move to linux/pci.h

In reply to Yoshinori Sato

Chanegs v4
none

---
 drivers/pci/ecam.h  | 17 +----------------
 include/linux/pci.h | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+), 16 deletions(-)
drivers/pci/ecam.h +1 -16
index 9878beb..f110091 100644
@@ -18,6 +18,7 @@
 
 #include <linux/kernel.h>
 #include <linux/platform_device.h>
+#include <linux/pci.h>
 
 /*
  * struct to hold pci ops and bus shift of the config window
@@ -31,22 +32,6 @@ struct pci_ecam_ops {
 						struct pci_config_window *);
 };
 
-/*
- * struct to hold the mappings of a config space window. This
- * is expected to be used as sysdata for PCI controllers that
- * use ECAM.
- */
-struct pci_config_window {
-	struct resource			res;
-	struct resource			busr;
-	void				*priv;
-	struct pci_ecam_ops		*ops;
-	union {
-		void __iomem		*win;	/* 64-bit single mapping */
-		void __iomem		**winp; /* 32-bit per-bus mapping */
-	};
-};
-
 /* create and free pci_config_window */
 struct pci_config_window *pci_ecam_create(struct device *dev,
 		struct resource *cfgres, struct resource *busr,
include/linux/pci.h +18 -0
index b67e4df..398896f 100644
@@ -2026,6 +2026,24 @@ static inline bool pci_ari_enabled(struct pci_bus *bus)
 	return bus->self && bus->self->ari_enabled;
 }
 
+/*
+ * struct to hold the mappings of a config space window. This
+ * is expected to be used as sysdata for PCI controllers that
+ * use ECAM.
+ */
+struct pci_ecam_ops;
+
+struct pci_config_window {
+	struct resource			res;
+	struct resource			busr;
+	void				*priv;
+	struct pci_ecam_ops		*ops;
+	union {
+		void __iomem		*win;	/* 64-bit single mapping */
+		void __iomem		**winp; /* 32-bit per-bus mapping */
+	};
+};
+
 /* provide the legacy pci_dma_* API */
 #include <linux/pci-dma-compat.h>
 
Signature · 1 line
2.7.0
author maintainer
#24 lore raw

PATCH v4 17/22 pci: PCI_HOST_GENERIC enable for SH

In reply to Yoshinori Sato

Changes v4
none

---
 drivers/pci/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/host/Kconfig +1 -1
index df60505..83184eb 100644
@@ -83,7 +83,7 @@ config PCI_HOST_COMMON
 
 config PCI_HOST_GENERIC
 	bool "Generic PCI host controller"
-	depends on (ARM || ARM64) && OF
+	depends on (ARM || ARM64 || SUPERH) && OF
 	select PCI_HOST_COMMON
 	help
 	  Say Y here if you want to support a simple generic PCI host
Signature · 1 line
2.7.0
author maintainer
#25 lore raw

PATCH v4 18/22 sh: Add separate DTB build rule

In reply to Yoshinori Sato

Changes v4
none

---
 arch/sh/Makefile          | 7 +++++++
 arch/sh/boot/dts/Makefile | 2 ++
 2 files changed, 9 insertions(+)
arch/sh/Makefile +7 -0
index 8adffa8..a44e630 100644
@@ -189,6 +189,13 @@ drivers-$(CONFIG_OPROFILE)	+= arch/sh/oprofile/
 
 boot := arch/sh/boot
 
+%.dtb %.dtb.S %.dtb.o: | scripts
+	$(Q)$(MAKE) $(build)=arch/sh/boot/dts arch/sh/boot/dts/$@
+
+PHONY += dtbs
+dtbs: scripts
+	$(Q)$(MAKE) $(build)=arch/sh/boot/dts
+
 cflags-y	+= $(foreach d, $(cpuincdir-y), -Iarch/sh/include/$(d)) \
 		   $(foreach d, $(machdir-y), -Iarch/sh/include/$(d))
 
arch/sh/boot/dts/Makefile +2 -0
index e5ce3a0..38fdc38 100644
@@ -1,3 +1,5 @@
 obj-$(CONFIG_USE_BUILTIN_DTB) += $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_SOURCE)).dtb.o
 
+dtstree		:= $(srctree)/$(src)
 clean-files := *.dtb.S
+always	    := $(dtb-y)
Signature · 1 line
2.7.0
author maintainer
#26 lore raw

PATCH v4 19/22 sh: IO-DATA HDL-U (a,k.a landisk) IRQCHIP driver

In reply to Yoshinori Sato

Changes v4
- split patches
- remove unneeded line
- example update

---
 .../interrupt-controller/iodata-landisk.txt        | 31 ++++++++++
 drivers/irqchip/Makefile                           |  2 +-
 drivers/irqchip/irq-io-landisk.c                   | 72 ++++++++++++++++++++++
 3 files changed, 104 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/iodata-landisk.txt
 create mode 100644 drivers/irqchip/irq-io-landisk.c
Documentation/devicetree/bindings/interrupt-controller/iodata-landisk.txt new file +31 -0
new file mode 100644
index 0000000..cf461dc
@@ -0,0 +1,31 @@
+DT bindings for the I/O DATA HDL-U interrupt controller
+
+Required properties:
+
+  - compatible: has to be "iodata,landisk-intc".
+
+  - reg: Base address and length of interrupt controller register.
+
+  - interrupt-controller: Identifies the node as an interrupt controller.
+
+  - #interrupt-cells: has to be <1>: an interrupt index.
+
+  - interrupt-map: Interrupt mapping on parent controller.
+
+Example
+-------
+
+	cpldintc: cpld@b0000000 {
+		compatible = "iodata,landisk-intc";
+		#interrupt-cells = <1>;
+		interrupt-controller;
+		reg = <0xb0000000 8>;
+		interrupt-map=<0 &shintc evt2irq(0x2a0)>,
+		              <1 &shintc evt2irq(0x2c0)>,
+		              <2 &shintc evt2irq(0x2e0)>,
+			      <3 &shintc evt2irq(0x300)>,
+		              <4 &shintc evt2irq(0x320)>,
+			      <5 &shintc evt2irq(0x340)>,
+		              <6 &shintc evt2irq(0x360)>,
+			      <7 &shintc evt2irq(0x380)>;
+	};
drivers/irqchip/Makefile +1 -1
index 2ab5735..5e225cf 100644
@@ -69,4 +69,4 @@ obj-$(CONFIG_PIC32_EVIC)		+= irq-pic32-evic.o
 obj-$(CONFIG_MVEBU_ODMI)		+= irq-mvebu-odmi.o
 obj-$(CONFIG_LS_SCFG_MSI)		+= irq-ls-scfg-msi.o
 obj-$(CONFIG_EZNPS_GIC)			+= irq-eznps.o
-obj-$(CONFIG_RENESAS_SH_INTC)		+= irq-renesas-sh7751.o
+obj-$(CONFIG_RENESAS_SH_INTC)		+= irq-renesas-sh7751.o irq-io-landisk.o
drivers/irqchip/irq-io-landisk.c new file +72 -0

72 lines not on this page · raw message

Signature · 1 line
2.7.0
#27 lore raw

Re: [PATCH v4 19/22] sh: IO-DATA HDL-U (a,k.a landisk) IRQCHIP driver

Could you fix the typo "a,k.a" => "a.k.a."?

Signature · 4 lines
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [email protected]
`. `'   Freie Universitaet Berlin - [email protected]
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
maintainer
#28 lore raw

Re: [PATCH v4 19/22] sh: IO-DATA HDL-U (a,k.a landisk) IRQCHIP driver

In reply to Yoshinori Sato
Quoted 23 lines · Yoshinori Sato

Changes v4
- split patches
- remove unneeded line
- example update

---
 .../interrupt-controller/iodata-landisk.txt        | 31 ++++++++++
 drivers/irqchip/Makefile                           |  2 +-
 drivers/irqchip/irq-io-landisk.c                   | 72 ++++++++++++++++++++++
 3 files changed, 104 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/iodata-landisk.txt
 create mode 100644 drivers/irqchip/irq-io-landisk.c
Documentation/devicetree/bindings/interrupt-controller/iodata-landisk.txt new file +3 -0
new file mode 100644
index 0000000..cf461dc
@@ -0,0 +1,31 @@
+DT bindings for the I/O DATA HDL-U interrupt controller
+
+Required properties:

Documentation/devicetree/bindings/interrupt-controller/iodata-landisk.txt line 13

Quoted 10 lines
Documentation/devicetree/bindings/interrupt-controller/iodata-landisk.txt new file +10 -0
+
+  - compatible: has to be "iodata,landisk-intc".
+
+  - reg: Base address and length of interrupt controller register.
+
+  - interrupt-controller: Identifies the node as an interrupt controller.
+
+  - #interrupt-cells: has to be <1>: an interrupt index.
+
+  - interrupt-map: Interrupt mapping on parent controller.

interrupt-controller and interrupt-map are supposed to be mutually exclusive, so you should probably drop interrupt-controller.

Rob

author maintainer
#29 lore raw

Re: [PATCH v4 19/22] sh: IO-DATA HDL-U (a,k.a landisk) IRQCHIP driver

Quoted 30 lines · Rob Herring
Quoted 28 lines · Yoshinori Sato

Changes v4
- split patches
- remove unneeded line
- example update

---
 .../interrupt-controller/iodata-landisk.txt        | 31 ++++++++++
 drivers/irqchip/Makefile                           |  2 +-
 drivers/irqchip/irq-io-landisk.c                   | 72 ++++++++++++++++++++++
 3 files changed, 104 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/iodata-landisk.txt
 create mode 100644 drivers/irqchip/irq-io-landisk.c
Documentation/devicetree/bindings/interrupt-controller/iodata-landisk.txt new file +8 -0
new file mode 100644
index 0000000..cf461dc
@@ -0,0 +1,31 @@
+DT bindings for the I/O DATA HDL-U interrupt controller
+
+Required properties:
+
+  - compatible: has to be "iodata,landisk-intc".
+
+  - reg: Base address and length of interrupt controller register.
+
Quoted 8 lines

Documentation/devicetree/bindings/interrupt-controller/iodata-landisk.txt line 13

Quoted 5 lines
Documentation/devicetree/bindings/interrupt-controller/iodata-landisk.txt new file +5 -0
+  - interrupt-controller: Identifies the node as an interrupt controller.
+
+  - #interrupt-cells: has to be <1>: an interrupt index.
+
+  - interrupt-map: Interrupt mapping on parent controller.

interrupt-controller and interrupt-map are supposed to be mutually exclusive, so you should probably drop interrupt-controller.

Yes. This logic is not interrupt controller.
Remove this line.

Quoted 5 lines

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 2 lines
Yoshinori Sato
<[email protected]>
author maintainer
#30 lore raw

PATCH v4 20/22 sh: IO-DATA HDL-U (a,k.a landisk) DeviceTree

In reply to Yoshinori Sato

Changes v4
- separate patch.

---
 arch/sh/boot/dts/Makefile    |  2 ++
 arch/sh/boot/dts/landisk.dts | 61 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+)
 create mode 100644 arch/sh/boot/dts/landisk.dts
arch/sh/boot/dts/Makefile +2 -0
index 38fdc38..cf5aec4 100644
@@ -1,5 +1,7 @@
 obj-$(CONFIG_USE_BUILTIN_DTB) += $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_SOURCE)).dtb.o
 
+dtb-y += landisk.dtb
+
 dtstree		:= $(srctree)/$(src)
 clean-files := *.dtb.S
 always	    := $(dtb-y)
arch/sh/boot/dts/landisk.dts new file +61 -0

61 lines not on this page · raw message

Signature · 1 line
2.7.0
author maintainer
#31 lore raw

PATCH v4 21/22 sh: Renesas RTS7751R2Dplus (a,k.a R2Dplus) IRQCHIP Driver

In reply to Yoshinori Sato

Changes v4
- split patch.
- remove unneeded #address
- update example

---
 .../interrupt-controller/renesas-r2dplus.txt       | 38 ++++++++++
 drivers/irqchip/Makefile                           |  2 +-
 drivers/irqchip/irq-renesas-r2dplus.c              | 88 ++++++++++++++++++++++
 3 files changed, 127 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/renesas-r2dplus.txt
 create mode 100644 drivers/irqchip/irq-renesas-r2dplus.c
Documentation/devicetree/bindings/interrupt-controller/renesas-r2dplus.txt new file +38 -0
new file mode 100644
index 0000000..5b74da4
@@ -0,0 +1,38 @@
+DT bindings for the Renesas R0P751RLC0011RL (R2Dplus) interrupt controller
+
+Required properties:
+
+  - compatible: has to be "renesas,r2dplus-intc".
+
+  - reg: Base address and length of interrupt controller register.
+
+  - interrupt-controller: Identifies the node as an interrupt controller.
+
+  - #interrupt-cells: has to be <1>: an interrupt index.
+
+  - interrupt-map: Interrupt mapping on parent controller.
+
+Example
+-------
+
+	fpgaintc: fpga@a4000000 {
+		compatible = "renesas,r2dplus-intc";
+		#interrupt-cells = <1>;
+		interrupt-controller;
+		reg = <0xa4000000 0x40>;
+		interrupt-map=<0 &shintc evt2irq(0x200)>,
+		              <1 &shintc evt2irq(0x220)>,
+		              <2 &shintc evt2irq(0x240)>,
+			      <3 &shintc evt2irq(0x260)>,
+		              <4 &shintc evt2irq(0x280)>,
+			      <5 &shintc evt2irq(0x2a0)>,
+		              <6 &shintc evt2irq(0x2c0)>,
+			      <7 &shintc evt2irq(0x2e0)>,
+		              <8 &shintc evt2irq(0x300)>,
+		              <9 &shintc evt2irq(0x320)>,
+			      <10 &shintc evt2irq(0x340)>,
+		              <11 &shintc evt2irq(0x360)>,
+			      <12 &shintc evt2irq(0x380)>,
+		              <13 &shintc evt2irq(0x3a0)>,
+			      <14 &shintc evt2irq(0x3c0)>,
+	};
drivers/irqchip/Makefile +1 -1
index 5e225cf..1e0f1c3 100644
@@ -69,4 +69,4 @@ obj-$(CONFIG_PIC32_EVIC)		+= irq-pic32-evic.o
 obj-$(CONFIG_MVEBU_ODMI)		+= irq-mvebu-odmi.o
 obj-$(CONFIG_LS_SCFG_MSI)		+= irq-ls-scfg-msi.o
 obj-$(CONFIG_EZNPS_GIC)			+= irq-eznps.o
-obj-$(CONFIG_RENESAS_SH_INTC)		+= irq-renesas-sh7751.o irq-io-landisk.o
+obj-$(CONFIG_RENESAS_SH_INTC)		+= irq-renesas-sh7751.o irq-io-landisk.o irq-renesas-r2dplus.o
drivers/irqchip/irq-renesas-r2dplus.c new file +88 -0

88 lines not on this page · raw message

Signature · 1 line
2.7.0
maintainer
#32 lore raw

Re: [PATCH v4 21/22] sh: Renesas RTS7751R2Dplus (a,k.a R2Dplus) IRQCHIP Driver

Quoted 3 lines · Yoshinori Sato

Changes v4
- split patch.
- remove unneeded #address

Actually, I think #address-cells is supposed to be set for interrupt-map. It defines the size of the first field.

Rob

author maintainer
#33 lore raw

Re: [PATCH v4 21/22] sh: Renesas RTS7751R2Dplus (a,k.a R2Dplus) IRQCHIP Driver

Quoted 8 lines · Rob Herring
Quoted 3 lines · Yoshinori Sato

Changes v4
- split patch.
- remove unneeded #address

Actually, I think #address-cells is supposed to be set for interrupt-map. It defines the size of the first field.

OK. reverted it.
Thanks.

Quoted 1 line

Rob

Signature · 2 lines
Yoshinori Sato
<[email protected]>
author maintainer
#34 lore raw

PATCH v4 22/22 sh: Renesas RTS7751R2Dplus (a,k.a R2Dplus) DeviceTree

In reply to Yoshinori Sato

Changes v4
- split patch

---
 arch/sh/boot/dts/Makefile    |  1 +
 arch/sh/boot/dts/r2dplus.dts | 83 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 84 insertions(+)
 create mode 100644 arch/sh/boot/dts/r2dplus.dts
arch/sh/boot/dts/Makefile +1 -0
index cf5aec4..e059ce2b 100644
@@ -1,6 +1,7 @@
 obj-$(CONFIG_USE_BUILTIN_DTB) += $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_SOURCE)).dtb.o
 
 dtb-y += landisk.dtb
+otb-y += r2dplus.dtb
 
 dtstree		:= $(srctree)/$(src)
 clean-files := *.dtb.S
arch/sh/boot/dts/r2dplus.dts new file +83 -0

83 lines not on this page · raw message

Signature · 1 line
2.7.0
#35 lore raw

Re: [PATCH v4 22/22] sh: Renesas RTS7751R2Dplus (a,k.a R2Dplus) DeviceTree

Quoted 4 lines · Yoshinori Sato

Changes v4
- split patch

[...]

arch/sh/boot/dts/r2dplus.dts line 6

Quoted 12 lines
arch/sh/boot/dts/r2dplus.dts new file +6 -0
new file mode 100644
index 0000000..a1a0745
@@ -0,0 +1,83 @@
+/dts-v1/;
+
+#include "sh7751.dtsi"
+
+/ {
+	model = "Renesas RTS7751R2D+";

The ePAPR standard says:

The recommended format is: “manufacturer,model”, where manufacturer is a string describing the name of the manufacturer (such as a stock ticker symbol), and model specifies the model number.

Quoted 6 lines
arch/sh/boot/dts/r2dplus.dts new file +6 -0
+	compatible = "renesas,r2dplus";
+	#address-cells = <1>;
+	#size-cells = <1>;
+	interrupt-parent = <&shintc>;
+	chosen {
+		stdout-path = &sci1;

arch/sh/boot/dts/r2dplus.dts line 22

Quoted 10 lines
arch/sh/boot/dts/r2dplus.dts new file +10 -0
+		bootargs = "console=ttySC1,115200";
+	};
+	aliases {
+		serial1 = &sci1;
+	};
+
+	memory@0c000000 {
+		device_type = "memory";
+		reg = <0x0c000000 0x4000000>;
+	};

Need empty line here...

Quoted 12 lines
arch/sh/boot/dts/r2dplus.dts new file +12 -0
+	fpgaintc: fpga@a4000000 {
+		compatible = "renesas,r2dplus-intc";
+		#interrupt-cells = <1>;
+		interrupt-controller;
+		reg = <0xa4000000 0x40>;
+		interrupt-map=<0 &shintc evt2irq(0x200)>,
+		              <1 &shintc evt2irq(0x220)>,
+		              <2 &shintc evt2irq(0x240)>,
+			      <3 &shintc evt2irq(0x260)>,
+		              <4 &shintc evt2irq(0x280)>,
+			      <5 &shintc evt2irq(0x2a0)>,
+		              <6 &shintc evt2irq(0x2c0)>,

arch/sh/boot/dts/r2dplus.dts line 44

Quoted 10 lines
arch/sh/boot/dts/r2dplus.dts new file +10 -0
+			      <7 &shintc evt2irq(0x2e0)>,
+		              <8 &shintc evt2irq(0x300)>,
+			      <9 &shintc evt2irq(0x320)>,
+		              <10 &shintc evt2irq(0x340)>,
+			      <11 &shintc evt2irq(0x360)>,
+		              <12 &shintc evt2irq(0x380)>,
+			      <13 &shintc evt2irq(0x3a0)>,
+		              <14 &shintc evt2irq(0x3c0)>;
+	};
+	pata: pata@b4001000 {

This node should be named "ide@..." to comply with ePAPR.

MBR, Sergei

author maintainer
#36 lore raw

Re: [PATCH v4 22/22] sh: Renesas RTS7751R2Dplus (a,k.a R2Dplus) DeviceTree

Quoted 25 lines · Sergei Shtylyov
Quoted 4 lines · Yoshinori Sato

Changes v4
- split patch

[...]

arch/sh/boot/dts/r2dplus.dts line 6

Quoted 12 lines
arch/sh/boot/dts/r2dplus.dts new file +6 -0
new file mode 100644
index 0000000..a1a0745
@@ -0,0 +1,83 @@
+/dts-v1/;
+
+#include "sh7751.dtsi"
+
+/ {
+	model = "Renesas RTS7751R2D+";

The ePAPR standard says:

Quoted 3 lines

The recommended format is: “manufacturer,model”, where manufacturer is a string describing the name of the manufacturer (such as a stock ticker symbol), and model specifies the model number.

OK.
I lookd ePAPR standard.

Quoted 35 lines
Quoted 6 lines
arch/sh/boot/dts/r2dplus.dts new file +6 -0
+	compatible = "renesas,r2dplus";
+	#address-cells = <1>;
+	#size-cells = <1>;
+	interrupt-parent = <&shintc>;
+	chosen {
+		stdout-path = &sci1;

arch/sh/boot/dts/r2dplus.dts line 22

Quoted 10 lines
arch/sh/boot/dts/r2dplus.dts new file +10 -0
+		bootargs = "console=ttySC1,115200";
+	};
+	aliases {
+		serial1 = &sci1;
+	};
+
+	memory@0c000000 {
+		device_type = "memory";
+		reg = <0x0c000000 0x4000000>;
+	};

Need empty line here...

Quoted 16 lines
arch/sh/boot/dts/r2dplus.dts new file +16 -0
+	fpgaintc: fpga@a4000000 {
+		compatible = "renesas,r2dplus-intc";
+		#interrupt-cells = <1>;
+		interrupt-controller;
+		reg = <0xa4000000 0x40>;
+		interrupt-map=<0 &shintc evt2irq(0x200)>,
+		              <1 &shintc evt2irq(0x220)>,
+		              <2 &shintc evt2irq(0x240)>,
+			      <3 &shintc evt2irq(0x260)>,
+		              <4 &shintc evt2irq(0x280)>,
+			      <5 &shintc evt2irq(0x2a0)>,
+		              <6 &shintc evt2irq(0x2c0)>,
+			      <7 &shintc evt2irq(0x2e0)>,
+		              <8 &shintc evt2irq(0x300)>,
+			      <9 &shintc evt2irq(0x320)>,
+		              <10 &shintc evt2irq(0x340)>,
Quoted 8 lines

arch/sh/boot/dts/r2dplus.dts line 44

Quoted 6 lines
arch/sh/boot/dts/r2dplus.dts new file +6 -0
+			      <11 &shintc evt2irq(0x360)>,
+		              <12 &shintc evt2irq(0x380)>,
+			      <13 &shintc evt2irq(0x3a0)>,
+		              <14 &shintc evt2irq(0x3c0)>;
+	};
+	pata: pata@b4001000 {

This node should be named "ide@..." to comply with ePAPR.

OK.
Thanks.

Quoted 2 lines

MBR, Sergei

Signature · 2 lines
Yoshinori Sato
<[email protected]>