Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/2] i2c: add DMA support for freescale i2c driver
From: Marek Vasut @ 2014-07-24  4:16 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <e5547e015bf6447e9b4fc18e82ddce74@BL2PR03MB338.namprd03.prod.outlook.com>

On Thursday, July 24, 2014 at 05:36:34 AM, Yao Yuan wrote:
> Hi,
> 
> Marek Vasut wrote:
> > On Wednesday, July 23, 2014 at 10:24:41 AM, Yuan Yao wrote:
> > > Changed in v5:
> > > - add "*chan_dev = dma->chan_using->device->dev" for reduce the call
> > > time.
> > 
> > Did you check if the compiler generates different code ?
> 
> Sorry, I didn't compare the assembly code. It's a subtle change.
> As you mentioned the "noodle" before.
> 
> Old:
> dma_map_single(dma->chan_using->device->dev, ...);
> dma_mapping_error(dma->chan_using->device->dev, ...);
> dma_unmap_single(dma->chan_using->device->dev, ...);
> 
> New:
> struct device *chan_dev = dma->chan_using->device->dev;
> dma_map_single(chan_dev, ...);
> dma_mapping_error(chan_dev, ...);
> dma_unmap_single(chan_dev, ...);

You should not use optimization and code cleanup interchangably. Thanks for 
clarifying what this is.

Best regards,
Marek Vasut

^ permalink raw reply

* [PATCH] ARM: dts: imx: Add alias for ethernet controller
From: Marek Vasut @ 2014-07-24  4:15 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20140724031753.GA6827@dragon>

On Thursday, July 24, 2014 at 05:17:55 AM, Shawn Guo wrote:
> On Thu, Jul 24, 2014 at 04:07:19AM +0200, Marek Vasut wrote:
> > commit 22970070e027cbbb9b2878f8f7c31d0d7f29e94d upstream.
> > 
> > Add alias for FEC ethernet on i.MX25, i.MX27, i.MX51 and i.MX53 to allow
> > bootloaders (like U-Boot) patch-in the MAC address for FEC using this
> > alias.
> > 
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > Cc: <stable@vger.kernel.org> # 3.14.x
> 
> Since the patch is already on mainline, and the submitting target is
> 3.14.x stable kernel, you should really send it to Greg.

So this is not enough to add this "# 3.14.x" ? I followed the stable submissing 
guidelines, but I probably missed something then ?

Best regards,
Marek Vasut

^ permalink raw reply

* [PATCH v4 1/2] i2c: add DMA support for freescale i2c driver
From: Marek Vasut @ 2014-07-24  4:14 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <e97f086de6e9427f96ca5ac582031f86@BL2PR03MB338.namprd03.prod.outlook.com>

On Thursday, July 24, 2014 at 05:19:27 AM, Yao Yuan wrote:
> On Fri, May 21, 2014 at 4:01 PM +0200, Wolfram Sang wrote:
> > Ping. Any updates? I think this was pretty close to inclusion?
> 
> Hi, Wolfram
> 	Thanks for your concern. Sorry for my reply so late. I had on a business
> trip for months. At that time I have no device to debug it. Now, I'm come
> back and I will try my best to finish it. I have sent the patch for V5.
> Thanks for your review.

So you have no means to test this ? Can this be tested on MX5 ? MX6 ?

Best regards,
Marek Vasut

^ permalink raw reply

* [PATCH 2/2] ARM: mvebu: Added dts defintion for Lenovo Iomega ix4-300d NAS
From: Baruch Siach @ 2014-07-24  4:00 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1406155973-13657-1-git-send-email-yahoo@perenite.com>

Hi Benoit,

On Wed, Jul 23, 2014 at 03:52:53PM -0700, Benoit Masson wrote:
> The Lenovo Iomega ix4-300d is a 4-Bay sata NAS with dual Gb,
>  USB2.0 & 3.0, powered by a Marvell Armada XP MV78230 dual core CPU.
> 
> http://shop.lenovo.com/fr/fr/servers/network-storage/lenovoemc/ix4-300d/

I guess most users would prefer an English URL:
http://shop.lenovo.com/us/en/servers/network-storage/lenovoemc/ix4-300d/

Also, the accepted convention is to add a blank line between the commit log 
body and the Signed-off-by line.

> Signed-off-by: Benoit Masson <yahoo@perenite.com>

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply

* [PATCH v5 1/3] arm64: ptrace: reload a syscall number after ptrace operations
From: Andy Lutomirski @ 2014-07-24  3:54 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1406020499-5537-2-git-send-email-takahiro.akashi@linaro.org>

On 07/22/2014 02:14 AM, AKASHI Takahiro wrote:
> Arm64 holds a syscall number in w8(x8) register. Ptrace tracer may change
> its value either to:
>    * any valid syscall number to alter a system call, or
>    * -1 to skip a system call
>
> This patch implements this behavior by reloading that value into syscallno
> in struct pt_regs after tracehook_report_syscall_entry() or
> secure_computing(). In case of '-1', a return value of system call can also
> be changed by the tracer setting the value to x0 register, and so
> sys_ni_nosyscall() should not be called.
>
> See also:
>      42309ab4, ARM: 8087/1: ptrace: reload syscall number after
> 	      secure_computing() check
>
> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> ---
>   arch/arm64/kernel/entry.S  |    2 ++
>   arch/arm64/kernel/ptrace.c |   13 +++++++++++++
>   2 files changed, 15 insertions(+)
>
> diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
> index 5141e79..de8bdbc 100644
> --- a/arch/arm64/kernel/entry.S
> +++ b/arch/arm64/kernel/entry.S
> @@ -628,6 +628,8 @@ ENDPROC(el0_svc)
>   __sys_trace:
>   	mov	x0, sp
>   	bl	syscall_trace_enter
> +	cmp	w0, #-1				// skip syscall?
> +	b.eq	ret_to_user

Does this mean that skipped syscalls will cause exit tracing to be 
skipped?  If so, then you risk (at least) introducing a nice 
user-triggerable OOPS if audit is enabled.  This bug existed for *years* 
on x86_32, and it amazes me that no one ever triggered it by accident. 
(Grr, audit.)

--Andy

^ permalink raw reply

* [PATCH] ARM: dts: imx: Add alias for ethernet controller
From: Greg KH @ 2014-07-24  3:52 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20140724031753.GA6827@dragon>

On Thu, Jul 24, 2014 at 11:17:55AM +0800, Shawn Guo wrote:
> On Thu, Jul 24, 2014 at 04:07:19AM +0200, Marek Vasut wrote:
> > commit 22970070e027cbbb9b2878f8f7c31d0d7f29e94d upstream.
> > 
> > Add alias for FEC ethernet on i.MX25, i.MX27, i.MX51 and i.MX53 to allow
> > bootloaders (like U-Boot) patch-in the MAC address for FEC using this
> > alias.
> > 
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > Cc: <stable@vger.kernel.org> # 3.14.x
> 
> Since the patch is already on mainline, and the submitting target is
> 3.14.x stable kernel, you should really send it to Greg.

No, Marek did the right thing here by sending it to the stable at vger
mailing list, never send stable patches only to me.

greg k-h

^ permalink raw reply

* [PATCH v5 3/3] arm64: Add seccomp support
From: Andy Lutomirski @ 2014-07-24  3:52 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1406020499-5537-4-git-send-email-takahiro.akashi@linaro.org>

On 07/22/2014 02:14 AM, AKASHI Takahiro wrote:
> secure_computing() should always be called first in syscall_trace_enter().
>
> If secure_computing() returns -1, we should stop further handling. Then
> that system call may eventually fail with a specified return value (errno),
> be trapped or the process itself be killed depending on loaded rules.
> In these cases, syscall_trace_enter() also returns -1, that results in
> skiping a normal syscall handling as well as syscall_trace_exit().
>
> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> ---
>   arch/arm64/Kconfig               |   14 ++++++++++++++
>   arch/arm64/include/asm/seccomp.h |   25 +++++++++++++++++++++++++
>   arch/arm64/include/asm/unistd.h  |    3 +++
>   arch/arm64/kernel/ptrace.c       |    5 +++++
>   4 files changed, 47 insertions(+)
>   create mode 100644 arch/arm64/include/asm/seccomp.h
>
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 3a18571..eeac003 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -32,6 +32,7 @@ config ARM64
>   	select HAVE_ARCH_AUDITSYSCALL
>   	select HAVE_ARCH_JUMP_LABEL
>   	select HAVE_ARCH_KGDB
> +	select HAVE_ARCH_SECCOMP_FILTER
>   	select HAVE_ARCH_TRACEHOOK
>   	select HAVE_C_RECORDMCOUNT
>   	select HAVE_DEBUG_BUGVERBOSE
> @@ -259,6 +260,19 @@ config ARCH_HAS_CACHE_LINE_SIZE
>
>   source "mm/Kconfig"
>
> +config SECCOMP
> +	bool "Enable seccomp to safely compute untrusted bytecode"
> +	---help---
> +	  This kernel feature is useful for number crunching applications
> +	  that may need to compute untrusted bytecode during their
> +	  execution. By using pipes or other transports made available to
> +	  the process as file descriptors supporting the read/write
> +	  syscalls, it's possible to isolate those applications in
> +	  their own address space using seccomp. Once seccomp is
> +	  enabled via prctl(PR_SET_SECCOMP), it cannot be disabled
> +	  and the task is only allowed to execute a few safe syscalls
> +	  defined by each seccomp mode.
> +
>   config XEN_DOM0
>   	def_bool y
>   	depends on XEN
> diff --git a/arch/arm64/include/asm/seccomp.h b/arch/arm64/include/asm/seccomp.h
> new file mode 100644
> index 0000000..c76fac9
> --- /dev/null
> +++ b/arch/arm64/include/asm/seccomp.h
> @@ -0,0 +1,25 @@
> +/*
> + * arch/arm64/include/asm/seccomp.h
> + *
> + * Copyright (C) 2014 Linaro Limited
> + * Author: AKASHI Takahiro <takahiro.akashi@linaro.org>
> + *
> + * 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.
> + */
> +#ifndef _ASM_SECCOMP_H
> +#define _ASM_SECCOMP_H
> +
> +#include <asm/unistd.h>
> +
> +#ifdef CONFIG_COMPAT
> +#define __NR_seccomp_read_32		__NR_compat_read
> +#define __NR_seccomp_write_32		__NR_compat_write
> +#define __NR_seccomp_exit_32		__NR_compat_exit
> +#define __NR_seccomp_sigreturn_32	__NR_compat_rt_sigreturn
> +#endif /* CONFIG_COMPAT */
> +
> +#include <asm-generic/seccomp.h>
> +
> +#endif /* _ASM_SECCOMP_H */
> diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h
> index c980ab7..729c155 100644
> --- a/arch/arm64/include/asm/unistd.h
> +++ b/arch/arm64/include/asm/unistd.h
> @@ -31,6 +31,9 @@
>    * Compat syscall numbers used by the AArch64 kernel.
>    */
>   #define __NR_compat_restart_syscall	0
> +#define __NR_compat_exit		1
> +#define __NR_compat_read		3
> +#define __NR_compat_write		4
>   #define __NR_compat_sigreturn		119
>   #define __NR_compat_rt_sigreturn	173
>
> diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c
> index 100d7d1..e477f6f 100644
> --- a/arch/arm64/kernel/ptrace.c
> +++ b/arch/arm64/kernel/ptrace.c
> @@ -28,6 +28,7 @@
>   #include <linux/smp.h>
>   #include <linux/ptrace.h>
>   #include <linux/user.h>
> +#include <linux/seccomp.h>
>   #include <linux/security.h>
>   #include <linux/init.h>
>   #include <linux/signal.h>
> @@ -1115,6 +1116,10 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs)
>   	saved_x0 = regs->regs[0];
>   	saved_x8 = regs->regs[8];
>
> +	if (secure_computing(regs->syscallno) == -1)
> +		/* seccomp failures shouldn't expose any additional code. */
> +		return -1;
> +

This will conflict with the fastpath stuff in Kees' tree.  (Actually, 
it's likely to apply cleanly, but fail to compile.)  The fix is trivial, 
but, given that the fastpath stuff is new, can you take a look and see 
if arm64 can use it effectively?

I suspect that the performance considerations are rather different on 
arm64 as compared to x86 (I really hope that x86 is the only 
architecture with the absurd sysret vs. iret distinction), but at least 
the seccomp_data stuff ought to help anywhere.  (It looks like there's a 
distinct fast path, too, so the two-phase thing might also be a fairly 
large win if it's supportable.)

See:

https://git.kernel.org/cgit/linux/kernel/git/kees/linux.git/log/?h=seccomp/fastpath

Also, I'll ask the usual question?  What are all of the factors other 
than nr and args that affect syscall execution?  What are the audit arch 
values?  Do they match correctly?

For example, it looks like, if arm64 adds OABI support, you'll have a 
problem.  (Note that arm currently disables audit and seccomp if OABI is 
enabled for exactly this reason.)

Do any syscall implementations care whether the user code is LE or BE? 
Are the arguments encoded the same way?

An arm-specific question: will there be any confusion as a result of the 
fact that compat syscalls seems to stick nr in w7, but arm64 puts them 
somewhere else?

--Andy

^ permalink raw reply

* [PATCH v5 2/3] asm-generic: Add generic seccomp.h for secure computing mode 1
From: Andy Lutomirski @ 2014-07-24  3:40 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1406020499-5537-3-git-send-email-takahiro.akashi@linaro.org>

On 07/22/2014 02:14 AM, AKASHI Takahiro wrote:
> Those values (__NR_seccomp_*) are used solely in secure_computing()
> to identify mode 1 system calls. If compat system calls have different
> syscall numbers, asm/seccomp.h may override them.
>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> ---
>   include/asm-generic/seccomp.h |   28 ++++++++++++++++++++++++++++
>   1 file changed, 28 insertions(+)
>   create mode 100644 include/asm-generic/seccomp.h
>
> diff --git a/include/asm-generic/seccomp.h b/include/asm-generic/seccomp.h
> new file mode 100644
> index 0000000..5e97022
> --- /dev/null
> +++ b/include/asm-generic/seccomp.h
> @@ -0,0 +1,28 @@
> +/*
> + * include/asm-generic/seccomp.h
> + *
> + * Copyright (C) 2014 Linaro Limited
> + * Author: AKASHI Takahiro <takahiro.akashi@linaro.org>
> + *
> + * 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.
> + */
> +#ifndef _ASM_GENERIC_SECCOMP_H
> +#define _ASM_GENERIC_SECCOMP_H
> +
> +#include <asm-generic/unistd.h>
> +
> +#if defined(CONFIG_COMPAT) && !defined(__NR_seccomp_read_32)
> +#define __NR_seccomp_read_32		__NR_read
> +#define __NR_seccomp_write_32		__NR_write
> +#define __NR_seccomp_exit_32		__NR_exit
> +#define __NR_seccomp_sigreturn_32	__NR_rt_sigreturn
> +#endif /* CONFIG_COMPAT && ! already defined */
> +
> +#define __NR_seccomp_read		__NR_read
> +#define __NR_seccomp_write		__NR_write
> +#define __NR_seccomp_exit		__NR_exit
> +#define __NR_seccomp_sigreturn		__NR_rt_sigreturn

I don't like these names.  __NR_seccomp_read sounds like the number of a 
syscall called seccomp_read.

Also, shouldn't something be including this header?  I'm confused.

--Andy

^ permalink raw reply

* [PATCH v5 0/2] i2c: add DMA support for freescale i2c driver
From: Yao Yuan @ 2014-07-24  3:36 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <201407231428.01278.marex@denx.de>

Hi,

Marek Vasut wrote:
> On Wednesday, July 23, 2014 at 10:24:41 AM, Yuan Yao wrote:
> > Changed in v5:
> > - add "*chan_dev = dma->chan_using->device->dev" for reduce the call time.
> 
> Did you check if the compiler generates different code ?
> 

Sorry, I didn't compare the assembly code. It's a subtle change. 
As you mentioned the "noodle" before.

Old:
dma_map_single(dma->chan_using->device->dev, ...);
dma_mapping_error(dma->chan_using->device->dev, ...);
dma_unmap_single(dma->chan_using->device->dev, ...);
	
New:
struct device *chan_dev = dma->chan_using->device->dev;
dma_map_single(chan_dev, ...);
dma_mapping_error(chan_dev, ...);
dma_unmap_single(chan_dev, ...);

> > - add the test logs.
> 
> [...]
> 
> Best regards,
> Marek Vasut

^ permalink raw reply

* [PATCH v4 1/2] i2c: add DMA support for freescale i2c driver
From: Yao Yuan @ 2014-07-24  3:19 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20140521080047.GC2708@katana>

On Fri, May 21, 2014 at 4:01 PM +0200, Wolfram Sang wrote:
> 
> Ping. Any updates? I think this was pretty close to inclusion?

Hi, Wolfram
	Thanks for your concern. Sorry for my reply so late. I had on a business trip for months.
At that time I have no device to debug it. Now, I'm come back and I will try my best to finish it.
I have sent the patch for V5. Thanks for your review.

Best regards,
Yuan Yao

^ permalink raw reply

* [PATCH] ARM: dts: imx: Add alias for ethernet controller
From: Shawn Guo @ 2014-07-24  3:17 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1406167639-6911-1-git-send-email-marex@denx.de>

On Thu, Jul 24, 2014 at 04:07:19AM +0200, Marek Vasut wrote:
> commit 22970070e027cbbb9b2878f8f7c31d0d7f29e94d upstream.
> 
> Add alias for FEC ethernet on i.MX25, i.MX27, i.MX51 and i.MX53 to allow
> bootloaders (like U-Boot) patch-in the MAC address for FEC using this
> alias.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> Cc: <stable@vger.kernel.org> # 3.14.x

Since the patch is already on mainline, and the submitting target is
3.14.x stable kernel, you should really send it to Greg.

Shawn

> ---
>  arch/arm/boot/dts/imx25.dtsi | 1 +
>  arch/arm/boot/dts/imx27.dtsi | 1 +
>  arch/arm/boot/dts/imx51.dtsi | 1 +
>  arch/arm/boot/dts/imx53.dtsi | 1 +
>  4 files changed, 4 insertions(+)
> 
> NOTE: Without this backport, the ethernet adapter on most of the boards
>       with the i.MX CPUs does not know it's MAC address (the controller
>       does not have an EEPROM). Without MAC address, the ethernet cannot
>       be brought up and this makes such board unusable when booting from
>       NFS. This patch lets the bootloader pass the MAC address via DT to
>       the kernel properly, thus letting me boot from NFS again.
> 
> diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi
> index 737ed5d..de16119 100644
> --- a/arch/arm/boot/dts/imx25.dtsi
> +++ b/arch/arm/boot/dts/imx25.dtsi
> @@ -30,6 +30,7 @@
>  		spi2 = &spi3;
>  		usb0 = &usbotg;
>  		usb1 = &usbhost1;
> +		ethernet0 = &fec;
>  	};
>  
>  	cpus {
> diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi
> index 826231e..da2eb7f 100644
> --- a/arch/arm/boot/dts/imx27.dtsi
> +++ b/arch/arm/boot/dts/imx27.dtsi
> @@ -30,6 +30,7 @@
>  		spi0 = &cspi1;
>  		spi1 = &cspi2;
>  		spi2 = &cspi3;
> +		ethernet0 = &fec;
>  	};
>  
>  	aitc: aitc-interrupt-controller at e0000000 {
> diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi
> index 4bcdd3a..e1b6015 100644
> --- a/arch/arm/boot/dts/imx51.dtsi
> +++ b/arch/arm/boot/dts/imx51.dtsi
> @@ -27,6 +27,7 @@
>  		spi0 = &ecspi1;
>  		spi1 = &ecspi2;
>  		spi2 = &cspi;
> +		ethernet0 = &fec;
>  	};
>  
>  	tzic: tz-interrupt-controller at e0000000 {
> diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
> index 7abe6c4..86df3f5 100644
> --- a/arch/arm/boot/dts/imx53.dtsi
> +++ b/arch/arm/boot/dts/imx53.dtsi
> @@ -34,6 +34,7 @@
>  		spi0 = &ecspi1;
>  		spi1 = &ecspi2;
>  		spi2 = &cspi;
> +		ethernet0 = &fec;
>  	};
>  
>  	cpus {
> -- 
> 2.0.1
> 

^ permalink raw reply

* [PATCH] cpufreq: Don't destroy/realloc policy/sysfs on hotplug/suspend
From: Saravana Kannan @ 2014-07-24  3:02 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <16164926.ZsJxe6UV3e@vostro.rjw.lan>

On 07/16/2014 03:02 PM, Rafael J. Wysocki wrote:
> On Wednesday, July 09, 2014 07:37:30 PM Saravana Kannan wrote:
>> Preliminary patch. Not tested. Just sending out to give an idea of what I'm
>> looking to do. Expect a lot more simplification when it's done.
>>
>> Benefits:
>> * A lot more simpler code.
>> * Less stability issues.
>> * Suspend/resume time would improve.
>> * Hotplug time would improve.
>> * Sysfs file permissions would be maintained.
>> * More policy settings would be maintained across suspend/resume.
>> * cpufreq stats would be maintained across hotplug for all CPUs.
>
> One problem.  The real hotplug (when the CPU actually goes away) depends on
> offline removing all that stuff for it.  How are you going to address that?
>

Ok, I think I've figured this out. But one question. Is it possible to 
physically remove one CPU in a bunch of "related cpus" without also 
unplugging the rest? Put another way, can you unplug one core from a 
cluster?

It's not too hard to support that too, but if it's not a realistic case, 
I would rather not write code for that.

-Saravana

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

^ permalink raw reply

* [PATCH v4 1/2] platform: Remove most references to platform_bus device
From: Olof Johansson @ 2014-07-24  2:48 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20140724021457.GA31573@kroah.com>

On Wed, Jul 23, 2014 at 7:14 PM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Wed, Jul 23, 2014 at 10:49:01AM -0700, Olof Johansson wrote:
>> On Wed, Jul 23, 2014 at 10:41 AM, Greg Kroah-Hartman
>> <gregkh@linuxfoundation.org> wrote:
>> > On Wed, Jul 23, 2014 at 06:07:18PM +0100, Pawel Moll wrote:
>> >> A number of board files in arch/arm and arch/unicore32
>> >> explicitly reference platform_bus device as a parent
>> >> for new platform devices.
>> >>
>> >> This is unnecessary, as platform device API guarantees
>> >> that devices with NULL parent are going to by adopted
>> >> by the mentioned "root" device.
>> >>
>> >> This patch removes or replaces with NULL such references.
>> >>
>> >> Signed-off-by: Pawel Moll <pawel.moll@arm.com>
>> >> ---
>> >>  arch/arm/mach-bcm/board_bcm21664.c      |  3 +--
>> >>  arch/arm/mach-bcm/board_bcm281xx.c      |  3 +--
>> >>  arch/arm/mach-clps711x/board-edb7211.c  |  6 +++---
>> >>  arch/arm/mach-clps711x/board-p720t.c    |  6 +++---
>> >>  arch/arm/mach-imx/mach-mx27ads.c        |  2 +-
>> >>  arch/arm/mach-shmobile/board-ape6evm.c  | 14 +++++++-------
>> >>  arch/arm/mach-shmobile/board-bockw.c    | 19 ++++++++----------
>> >>  arch/arm/mach-shmobile/board-genmai.c   |  5 ++---
>> >>  arch/arm/mach-shmobile/board-koelsch.c  | 26 ++++++++++++-------------
>> >>  arch/arm/mach-shmobile/board-lager.c    | 34 ++++++++++++++-------------------
>> >>  arch/arm/mach-shmobile/board-marzen.c   |  1 -
>> >>  arch/arm/mach-shmobile/setup-r7s72100.c |  2 +-
>> >>  arch/arm/mach-shmobile/setup-r8a73a4.c  |  8 ++++----
>> >>  arch/arm/mach-shmobile/setup-r8a7778.c  | 13 ++++++-------
>> >>  arch/arm/mach-shmobile/setup-r8a7779.c  |  6 +++---
>> >>  arch/arm/mach-shmobile/setup-r8a7790.c  | 10 +++++-----
>> >>  arch/arm/mach-shmobile/setup-r8a7791.c  |  8 ++++----
>> >>  arch/unicore32/kernel/puv3-core.c       |  2 +-
>> >>  arch/unicore32/kernel/puv3-nb0916.c     |  6 +++---
>> >>  19 files changed, 79 insertions(+), 95 deletions(-)
>> >
>> > Looks good, if there are no objections, I'll take this through my
>> > driver-core tree, so that your follow-on patches that change things will
>> > still apply.
>>
>> Acked-by: Olof Johansson <olof@lixom.net>
>>
>> Just in case we end up having dependent patches and/or lots of
>> conflicts, can you stick these on a short topic branch that we can
>> also pull in?
>
> Hm, I don't normally do "short topic branches", so I've just stuck it
> into my driver-core-next branch of my driver-core.git tree on
> kernel.org.  I doubt the "make platform_bus static" or "make it a
> platform device" will happen soon, given my questions on the other patch
> in this series.

Ok. Hopefully this doesn't cause too many conflicts before the merge
window. None right now. And if it does, driver-core-next is only 30
patches so we could merge it as a dependency if needed (I'll let you
know if it comes to that).


-Olof

^ permalink raw reply

* [PATCH v5 00/14] Clock support for rk3066,rk3188 and rk3288
From: Mike Turquette @ 2014-07-24  2:44 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <14804456.X61YuWlsJQ@diego>

Quoting Heiko St?bner (2014-07-22 08:45:00)
> Hi Mike,
> 
> Am Montag, 14. Juli 2014, 10:07:01 schrieb Heiko St?bner:
> > Hi Olof,
> > 
> > Am Sonntag, 13. Juli 2014, 20:12:07 schrieb Olof Johansson:
> > > Hi,
> > > 
> > > On Sun, Jul 13, 2014 at 12:46 PM, Mike Turquette <mturquette@linaro.org>
> > 
> > wrote:
> > > > Quoting Heiko St?bner (2014-07-02 16:53:24)
> > > > 
> > > >> This series adds a clock driver infrastructure for Rockchip SoCs in
> > > >> general and clock-definitions for the RK3188 and RK3288 in particular.
> > > >> 
> > > >> Apart from the arch/arm patches included here, there are some more
> > > >> in the waiting line, like adding the i2c nodes and possibly the pwm,
> > > >> i2s
> > > >> and spi nodes if the relevant drivers get accepted, where the ids
> > > >> defined in the dt-binding headers are needed.
> > > >> 
> > > >> So if the whole thing is acceptable could we either offer a branch
> > > >> from the clk-tree that can get merged or take the whole series through
> > > >> the arm tree?
> > > > 
> > > > Heiko,
> > > > 
> > > > This version looks good. I've pushed a branch with all 14 of these
> > > > patches based on 3.16-rc3 to the clk tree. See:
> > > > 
> > > > git://git.linaro.org/people/mike.turquette/linux.git clk-rockchip
> > > > 
> > > > If everyone is OK to merge that stable branch then I will merge
> > > > clk-rockchip into clk-next and we're all good. If the arm-soc guys want
> > > > to carve it up a bit further or handle it in a different way then we can
> > > > do that. I've Cc'd arm-soc for clarification.
> > > 
> > > Traditionally we usually take the DT changes through arm-soc, but as
> > > long as we share the branch we might be ok. We tend to stick them in
> > > different branches in our tree though, so rockchip will be a little
> > > mis-sorted this release. Not a big deal, and we can deal with it.
> > > 
> > > So, I'll leave it to Heiko to choose here, he knows best what other DT
> > > changes are coming this release. If he wants to carry the DT changes
> > > separately, then patches 1-10 would be for the clk tree, so it should
> > > be easy to reset the branch back a bit (and 11-14 would be for
> > > arm-soc).
> > 
> > hmm, there are essentially two changeset/branches upcoming:
> > - the collected dts changes for rk3066 and rk3188 I posted saturday
> >   These essentially extend patches 12-14
> > - rk3288 support which would start off patch 11 (the reset controller)
> > 
> > So if we were to separate the series I would say patches 1-11 in the shared
> > branch and patch 12-14 as the first ones for a rk3066/rk3188 specific
> > branch.
> 
> are you ok with simply resetting the clk-rockchip branch to
>         "ARM: rockchip: Select ARCH_HAS_RESET_CONTROLLER"
> being the last commit and the last 3 patches going through arm-soc?
> 
> As we're already at -rc6 now, it would be very cool if we could get this 
> sorted soon.

Done! My apologies on the delay but I was traveling for business for a
week, and then relocated my apartment the next week and only just now
have the internet tubes been hooked up to my new home.

I've pushed the truncated branch to my linaro tree and merged the same
into clk-next.

Regards,
Mike

> 
> 
> Thanks
> Heiko

^ permalink raw reply

* [RFC] cpufreq: Add bindings for CPU clock sharing topology
From: Rob Herring @ 2014-07-24  2:24 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20140724003314.6419.51564@quantum>

On Wed, Jul 23, 2014 at 7:33 PM, Mike Turquette
<mike.turquette@linaro.org> wrote:
> Quoting Viresh Kumar (2014-07-20 05:07:32)
>> On 19 July 2014 20:54, Santosh Shilimkar <santosh.shilimkar@ti.com> wrote:
>> > Sorry for jumping late
>>
>> No, you aren't late. Its just 2 days old thread :)
>>
>> > but one of the point I was raising as part of your
>> > other series was to extend the CPU topology bindings to cover the voltage
>> > domain information which is probably what is really needed to let the
>> > CPUfreq extract the information. Not sure if it was already discussed.
>>
>> Not it wasn't.
>>
>> > After all the CPU clocks, cluster, clock-gating, power domains are pretty much
>> > related. So instead of having new binding for CPUFreq, I was wondering whether
>> > we can extend the CPU topology binding information to include missing information.
>> > Scheduler work anyway needs that information.
>> >
>> > Ref: Documentation/devicetree/bindings/arm/topology.txt
>> >
>> > Does that make sense ?
>>
>> Yeah it does, but I am not sure what exactly the bindings should look then.
>> So, the most basic step could be moving the new bindings to topology.txt
>> and name clock-master to dvfs-master.
>>
>> What else?
>
> If we're going to model the hardware then the binding should not use the
> CPU phandles in "clock-master" or "dvfs-master". The correct thing to
> model for a given CPU is which clock consumes. It's not accurate to say
> that one CPU is the "master", at least not in this context.
>
> A previous approach tried to compare struct clk pointers, which is a bad
> idea since those are just cookies and should not be deref'd by drivers.
> However a similar approach would be to compare the phandle, right?

I think there needs to be a way to query whether a rate change for a
clock affects other children. As pointed out previously, the clock to
a core may not be shared, but it's parent that can change rates could
be shared. This could be done with functions
clk_get_parent_rate_change to return the clock in heirarchy which can
change rates, and clk_is_parent_clk which tells if one clock is a
child of another clock. It's been a while since I've looked at the
clock api. It could also be done by experiment. Change the rate for
core 0 and see if core 1's rate is changed and still equal. There's
probably some ordering issue with doing that though.

Rob

^ permalink raw reply

* [PATCH v4 1/2] platform: Remove most references to platform_bus device
From: Greg Kroah-Hartman @ 2014-07-24  2:14 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <CAOesGMiGzfwLZvkxzzQQ0k4M7i2VukrCHGXCrFhZ6A3mkjVbiw@mail.gmail.com>

On Wed, Jul 23, 2014 at 10:49:01AM -0700, Olof Johansson wrote:
> On Wed, Jul 23, 2014 at 10:41 AM, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> > On Wed, Jul 23, 2014 at 06:07:18PM +0100, Pawel Moll wrote:
> >> A number of board files in arch/arm and arch/unicore32
> >> explicitly reference platform_bus device as a parent
> >> for new platform devices.
> >>
> >> This is unnecessary, as platform device API guarantees
> >> that devices with NULL parent are going to by adopted
> >> by the mentioned "root" device.
> >>
> >> This patch removes or replaces with NULL such references.
> >>
> >> Signed-off-by: Pawel Moll <pawel.moll@arm.com>
> >> ---
> >>  arch/arm/mach-bcm/board_bcm21664.c      |  3 +--
> >>  arch/arm/mach-bcm/board_bcm281xx.c      |  3 +--
> >>  arch/arm/mach-clps711x/board-edb7211.c  |  6 +++---
> >>  arch/arm/mach-clps711x/board-p720t.c    |  6 +++---
> >>  arch/arm/mach-imx/mach-mx27ads.c        |  2 +-
> >>  arch/arm/mach-shmobile/board-ape6evm.c  | 14 +++++++-------
> >>  arch/arm/mach-shmobile/board-bockw.c    | 19 ++++++++----------
> >>  arch/arm/mach-shmobile/board-genmai.c   |  5 ++---
> >>  arch/arm/mach-shmobile/board-koelsch.c  | 26 ++++++++++++-------------
> >>  arch/arm/mach-shmobile/board-lager.c    | 34 ++++++++++++++-------------------
> >>  arch/arm/mach-shmobile/board-marzen.c   |  1 -
> >>  arch/arm/mach-shmobile/setup-r7s72100.c |  2 +-
> >>  arch/arm/mach-shmobile/setup-r8a73a4.c  |  8 ++++----
> >>  arch/arm/mach-shmobile/setup-r8a7778.c  | 13 ++++++-------
> >>  arch/arm/mach-shmobile/setup-r8a7779.c  |  6 +++---
> >>  arch/arm/mach-shmobile/setup-r8a7790.c  | 10 +++++-----
> >>  arch/arm/mach-shmobile/setup-r8a7791.c  |  8 ++++----
> >>  arch/unicore32/kernel/puv3-core.c       |  2 +-
> >>  arch/unicore32/kernel/puv3-nb0916.c     |  6 +++---
> >>  19 files changed, 79 insertions(+), 95 deletions(-)
> >
> > Looks good, if there are no objections, I'll take this through my
> > driver-core tree, so that your follow-on patches that change things will
> > still apply.
> 
> Acked-by: Olof Johansson <olof@lixom.net>
> 
> Just in case we end up having dependent patches and/or lots of
> conflicts, can you stick these on a short topic branch that we can
> also pull in?

Hm, I don't normally do "short topic branches", so I've just stuck it
into my driver-core-next branch of my driver-core.git tree on
kernel.org.  I doubt the "make platform_bus static" or "make it a
platform device" will happen soon, given my questions on the other patch
in this series.

thanks,

greg k-h

^ permalink raw reply

* [PATCH v3 2/2] pwm: rockchip: Added to support for RK3288 SoC
From: caesar @ 2014-07-24  2:13 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1648580.P46ct6rREY@diego>

Hi Heiko & thierry,

Thank you for your suggestion.

? 2014?07?24? 00:01, Heiko St?bner ??:
> Hi Caesar.
>
> Am Mittwoch, 23. Juli 2014, 14:38:41 schrieb Caesar Wang:
>> This patch added to support the PWM controller found on
>> RK3288 SoC.
>>
>> Signed-off-by: Caesar Wang <caesar.wang@rock-chips.com>
>> ---
>>   drivers/pwm/pwm-rockchip.c | 141
>> +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 122
>> insertions(+), 19 deletions(-)
>>
>> diff --git a/drivers/pwm/pwm-rockchip.c b/drivers/pwm/pwm-rockchip.c
>> index eec2145..8d72a98 100644
>> --- a/drivers/pwm/pwm-rockchip.c
>> +++ b/drivers/pwm/pwm-rockchip.c
>> @@ -2,6 +2,7 @@
>>    * PWM driver for Rockchip SoCs
>>    *
>>    * Copyright (C) 2014 Beniamino Galvani <b.galvani@gmail.com>
>> + * Copyright (C) 2014 Caesar Wang <caesar.wang@rock-chips.com>
> you might want to check who actually holds the copyright for your
> contributions, I guess a "Copyright (C) 2014 Rockchip"-something would be more
> appropriate?
>
Yes,you are right.
>>    *
>>    * This program is free software; you can redistribute it and/or
>>    * modify it under the terms of the GNU General Public License
>> @@ -12,6 +13,7 @@
>>   #include <linux/io.h>
>>   #include <linux/module.h>
>>   #include <linux/of.h>
>> +#include <linux/of_device.h>
>>   #include <linux/platform_device.h>
>>   #include <linux/pwm.h>
>>   #include <linux/time.h>
>> @@ -25,17 +27,89 @@
>>
>>   #define PRESCALER		2
>>
>> +#define PWM_ENABLE		(1 << 0)
>> +#define PWM_CONTINUOUS		(1 << 1)
>> +#define PWM_DUTY_POSITIVE	(1 << 3)
>> +#define PWM_INACTIVE_NEGATIVE	(0 << 4)
>> +#define PWM_OUTPUT_LEFT		(0 << 5)
>> +#define PWM_LP_DISABLE		(0 << 8)
>> +
>>   struct rockchip_pwm_chip {
>>   	struct pwm_chip chip;
>>   	struct clk *clk;
>> +	const struct rockchip_pwm_data *data;
>>   	void __iomem *base;
>>   };
>>
>> +struct rockchip_pwm_regs {
>> +	unsigned long duty;
>> +	unsigned long period;
>> +	unsigned long cntr;
>> +	unsigned long ctrl;
>> +};
>> +
>> +struct rockchip_pwm_data {
>> +	struct rockchip_pwm_regs regs;
>> +	unsigned int prescaler;
>> +
>> +	void (*set_enable)(struct pwm_chip *chip, bool enable);
>> +};
>> +
>>   static inline struct rockchip_pwm_chip *to_rockchip_pwm_chip(struct
>> pwm_chip *c) {
>>   	return container_of(c, struct rockchip_pwm_chip, chip);
>>   }
>>
>> +static void rockchip_pwm_set_enable_v1(struct pwm_chip *chip, bool enable)
>> +{
>> +	struct rockchip_pwm_chip *pc = to_rockchip_pwm_chip(chip);
>> +	u32 val = 0;
>> +	u32 enable_conf = PWM_CTRL_OUTPUT_EN | PWM_CTRL_TIMER_EN;
>> +
>> +	val = readl_relaxed(pc->base + pc->data->regs.ctrl);
>> +
>> +	if (enable)
>> +		val |= enable_conf;
>> +	else
>> +		val &= ~enable_conf;
>> +
>> +	writel_relaxed(val, pc->base + pc->data->regs.ctrl);
>> +}
>> +
>> +static void rockchip_pwm_set_enable_v2(struct pwm_chip *chip, bool enable)
>> +{
>> +	struct rockchip_pwm_chip *pc = to_rockchip_pwm_chip(chip);
>> +	u32 val = 0;
>> +	u32 enable_conf = PWM_OUTPUT_LEFT | PWM_LP_DISABLE | PWM_ENABLE |
>> +		PWM_CONTINUOUS | PWM_DUTY_POSITIVE | PWM_INACTIVE_NEGATIVE;
>> +
>> +	val = readl_relaxed(pc->base + pc->data->regs.ctrl);
>> +
>> +	if (enable)
>> +		val |= enable_conf;
>> +	else
>> +		val &= ~enable_conf;
>> +
>> +	writel_relaxed(val, pc->base + pc->data->regs.ctrl);
>> +}
>> +
>> +static void rockchip_pwm_set_enable_vop(struct pwm_chip *chip, bool enable)
>> +{
>> +	struct rockchip_pwm_chip *pc = to_rockchip_pwm_chip(chip);
>> +	u32 val = 0;
>> +	u32 enable_conf = PWM_OUTPUT_LEFT | PWM_LP_DISABLE | PWM_ENABLE |
>> +		PWM_CONTINUOUS | PWM_DUTY_POSITIVE | PWM_INACTIVE_NEGATIVE;
>> +
>> +	val = readl_relaxed(pc->base + pc->data->regs.ctrl);
>> +
>> +	if (enable)
>> +		val |= enable_conf;
>> +	else
>> +		val &= ~enable_conf;
>> +
>> +	writel_relaxed(val, pc->base + pc->data->regs.ctrl);
>> +}
> not sure if I'm just blind ... do rockchip_pwm_set_enable_v2 and
> rockchip_pwm_set_enable_vop differ at all?
>
> If they don't differ, I guess pwm_data_vop should just use
> rockchip_pwm_set_enable_v2 instead of duplicating it.
>
>
> Heiko
Yes, the rockchip_pwm_set_enable_v1 & v2 & vop is similar.

So my v2 patch use "u32 enable_conf" instead of it .
+struct rockchip_pwm_data {
 > + .........
 > + u32 enable_conf;
 > +};


The thierry has suggested it [1] in my v2 patch:

For this I think it would be more readable to provide function pointers
rather than a variable. That is:

	struct rockchip_pwm_data {
		...
		int (*enable)(struct pwm_chip *chip, struct pwm_device *pwm);
		int (*disable)(struct pwm_chip *chip, struct pwm_device *pwm);
	};
Then you can implement these for each variant of the chip and call them
from the common rockchip_pwm_enable(), somewhat like this.


Perhaps,thierry's suggestion I got it wrong.

Hi thierry& Heiko :-)
Maybe,could you suggest solve it reasonable? thanks.

[1]: https://lkml.org/lkml/2014/7/21/113
>> +
>>   static int rockchip_pwm_config(struct pwm_chip *chip, struct pwm_device
>> *pwm, int duty_ns, int period_ns)
>>   {
>> @@ -52,20 +126,20 @@ static int rockchip_pwm_config(struct pwm_chip *chip,
>> struct pwm_device *pwm, * default prescaler value for all practical clock
>> rate values.
>>   	 */
>>   	div = clk_rate * period_ns;
>> -	do_div(div, PRESCALER * NSEC_PER_SEC);
>> +	do_div(div, pc->data->prescaler * NSEC_PER_SEC);
>>   	period = div;
>>
>>   	div = clk_rate * duty_ns;
>> -	do_div(div, PRESCALER * NSEC_PER_SEC);
>> +	do_div(div, pc->data->prescaler * NSEC_PER_SEC);
>>   	duty = div;
>>
>>   	ret = clk_enable(pc->clk);
>>   	if (ret)
>>   		return ret;
>>
>> -	writel(period, pc->base + PWM_LRC);
>> -	writel(duty, pc->base + PWM_HRC);
>> -	writel(0, pc->base + PWM_CNTR);
>> +	writel(period, pc->base + pc->data->regs.period);
>> +	writel(duty, pc->base + pc->data->regs.duty);
>> +	writel(0, pc->base + pc->data->regs.cntr);
>>
>>   	clk_disable(pc->clk);
>>
>> @@ -76,15 +150,12 @@ static int rockchip_pwm_enable(struct pwm_chip *chip,
>> struct pwm_device *pwm) {
>>   	struct rockchip_pwm_chip *pc = to_rockchip_pwm_chip(chip);
>>   	int ret;
>> -	u32 val;
>>
>>   	ret = clk_enable(pc->clk);
>>   	if (ret)
>>   		return ret;
>>
>> -	val = readl_relaxed(pc->base + PWM_CTRL);
>> -	val |= PWM_CTRL_OUTPUT_EN | PWM_CTRL_TIMER_EN;
>> -	writel_relaxed(val, pc->base + PWM_CTRL);
>> +	pc->data->set_enable(chip, true);
>>
>>   	return 0;
>>   }
>> @@ -92,11 +163,8 @@ static int rockchip_pwm_enable(struct pwm_chip *chip,
>> struct pwm_device *pwm) static void rockchip_pwm_disable(struct pwm_chip
>> *chip, struct pwm_device *pwm) {
>>   	struct rockchip_pwm_chip *pc = to_rockchip_pwm_chip(chip);
>> -	u32 val;
>>
>> -	val = readl_relaxed(pc->base + PWM_CTRL);
>> -	val &= ~(PWM_CTRL_OUTPUT_EN | PWM_CTRL_TIMER_EN);
>> -	writel_relaxed(val, pc->base + PWM_CTRL);
>> +	pc->data->set_enable(chip, false);
>>
>>   	clk_disable(pc->clk);
>>   }
>> @@ -108,12 +176,52 @@ static const struct pwm_ops rockchip_pwm_ops = {
>>   	.owner = THIS_MODULE,
>>   };
>>
>> +static const struct rockchip_pwm_data pwm_data_v1 = {
>> +	.regs.duty = PWM_HRC,
>> +	.regs.period = PWM_LRC,
>> +	.regs.cntr = PWM_CNTR,
>> +	.regs.ctrl = PWM_CTRL,
>> +	.prescaler = PRESCALER,
>> +	.set_enable = rockchip_pwm_set_enable_v1,
>> +};
>> +
>> +static const struct rockchip_pwm_data pwm_data_v2 = {
>> +	.regs.duty = PWM_LRC,
>> +	.regs.period = PWM_HRC,
>> +	.regs.cntr = PWM_CNTR,
>> +	.regs.ctrl = PWM_CTRL,
>> +	.prescaler = PRESCALER-1,
>> +	.set_enable = rockchip_pwm_set_enable_v2,
>> +};
>> +
>> +static const struct rockchip_pwm_data pwm_data_vop = {
>> +	.regs.duty = PWM_LRC,
>> +	.regs.period = PWM_HRC,
>> +	.regs.cntr = PWM_CTRL,
>> +	.regs.ctrl = PWM_CNTR,
>> +	.prescaler = PRESCALER-1,
>> +	.set_enable = rockchip_pwm_set_enable_vop,
>> +};
>> +
>> +static const struct of_device_id rockchip_pwm_dt_ids[] = {
>> +	{ .compatible = "rockchip,rk2928-pwm", .data = &pwm_data_v1},
>> +	{ .compatible = "rockchip,rk3288-pwm", .data = &pwm_data_v2},
>> +	{ .compatible = "rockchip,vop-pwm", .data = &pwm_data_vop},
>> +	{ /* sentinel */ }
>> +};
>> +MODULE_DEVICE_TABLE(of, rockchip_pwm_dt_ids);
>> +
>>   static int rockchip_pwm_probe(struct platform_device *pdev)
>>   {
>> +	const struct of_device_id *id;
>>   	struct rockchip_pwm_chip *pc;
>>   	struct resource *r;
>>   	int ret;
>>
>> +	id = of_match_device(rockchip_pwm_dt_ids, &pdev->dev);
>> +	if (!id)
>> +		return -EINVAL;
>> +
>>   	pc = devm_kzalloc(&pdev->dev, sizeof(*pc), GFP_KERNEL);
>>   	if (!pc)
>>   		return -ENOMEM;
>> @@ -133,6 +241,7 @@ static int rockchip_pwm_probe(struct platform_device
>> *pdev)
>>
>>   	platform_set_drvdata(pdev, pc);
>>
>> +	pc->data = id->data;
>>   	pc->chip.dev = &pdev->dev;
>>   	pc->chip.ops = &rockchip_pwm_ops;
>>   	pc->chip.base = -1;
>> @@ -156,12 +265,6 @@ static int rockchip_pwm_remove(struct platform_device
>> *pdev) return pwmchip_remove(&pc->chip);
>>   }
>>
>> -static const struct of_device_id rockchip_pwm_dt_ids[] = {
>> -	{ .compatible = "rockchip,rk2928-pwm" },
>> -	{ /* sentinel */ }
>> -};
>> -MODULE_DEVICE_TABLE(of, rockchip_pwm_dt_ids);
>> -
>>   static struct platform_driver rockchip_pwm_driver = {
>>   	.driver = {
>>   		.name = "rockchip-pwm",
>
>
>

^ permalink raw reply

* [PATCH] ARM: dts: mxs: Fix the RTC compatible prop on M28EVK
From: Marek Vasut @ 2014-07-24  2:08 UTC (permalink / raw)
  To: linux-arm-kernel

commit 3048fa3fc5b6c641a06e959925dfbc31649528e9 upstream.

The compatible property should be m41t62, not mt41t62, so fix this.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: <stable@vger.kernel.org> # 3.14.x
---
 arch/arm/boot/dts/imx28-m28evk.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

NOTE: Without this backport, the RTC clock on this device is not available
      and the system time is completely random upon each boot.

diff --git a/arch/arm/boot/dts/imx28-m28evk.dts b/arch/arm/boot/dts/imx28-m28evk.dts
index e6d0fa6..f3e58f1 100644
--- a/arch/arm/boot/dts/imx28-m28evk.dts
+++ b/arch/arm/boot/dts/imx28-m28evk.dts
@@ -194,7 +194,7 @@
 				};
 
 				rtc: rtc at 68 {
-					compatible = "stm,mt41t62";
+					compatible = "stm,m41t62";
 					reg = <0x68>;
 				};
 			};
-- 
2.0.1

^ permalink raw reply related

* [PATCH] ARM: dts: imx: Add alias for ethernet controller
From: Marek Vasut @ 2014-07-24  2:07 UTC (permalink / raw)
  To: linux-arm-kernel

commit 22970070e027cbbb9b2878f8f7c31d0d7f29e94d upstream.

Add alias for FEC ethernet on i.MX25, i.MX27, i.MX51 and i.MX53 to allow
bootloaders (like U-Boot) patch-in the MAC address for FEC using this
alias.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: <stable@vger.kernel.org> # 3.14.x
---
 arch/arm/boot/dts/imx25.dtsi | 1 +
 arch/arm/boot/dts/imx27.dtsi | 1 +
 arch/arm/boot/dts/imx51.dtsi | 1 +
 arch/arm/boot/dts/imx53.dtsi | 1 +
 4 files changed, 4 insertions(+)

NOTE: Without this backport, the ethernet adapter on most of the boards
      with the i.MX CPUs does not know it's MAC address (the controller
      does not have an EEPROM). Without MAC address, the ethernet cannot
      be brought up and this makes such board unusable when booting from
      NFS. This patch lets the bootloader pass the MAC address via DT to
      the kernel properly, thus letting me boot from NFS again.

diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi
index 737ed5d..de16119 100644
--- a/arch/arm/boot/dts/imx25.dtsi
+++ b/arch/arm/boot/dts/imx25.dtsi
@@ -30,6 +30,7 @@
 		spi2 = &spi3;
 		usb0 = &usbotg;
 		usb1 = &usbhost1;
+		ethernet0 = &fec;
 	};
 
 	cpus {
diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi
index 826231e..da2eb7f 100644
--- a/arch/arm/boot/dts/imx27.dtsi
+++ b/arch/arm/boot/dts/imx27.dtsi
@@ -30,6 +30,7 @@
 		spi0 = &cspi1;
 		spi1 = &cspi2;
 		spi2 = &cspi3;
+		ethernet0 = &fec;
 	};
 
 	aitc: aitc-interrupt-controller at e0000000 {
diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi
index 4bcdd3a..e1b6015 100644
--- a/arch/arm/boot/dts/imx51.dtsi
+++ b/arch/arm/boot/dts/imx51.dtsi
@@ -27,6 +27,7 @@
 		spi0 = &ecspi1;
 		spi1 = &ecspi2;
 		spi2 = &cspi;
+		ethernet0 = &fec;
 	};
 
 	tzic: tz-interrupt-controller at e0000000 {
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index 7abe6c4..86df3f5 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -34,6 +34,7 @@
 		spi0 = &ecspi1;
 		spi1 = &ecspi2;
 		spi2 = &cspi;
+		ethernet0 = &fec;
 	};
 
 	cpus {
-- 
2.0.1

^ permalink raw reply related

* [PATCHv4 4/5] of/mtd/nand: add generic binding and helper for NAND_BBT_NO_OOB_BBM
From: Brian Norris @ 2014-07-24  2:06 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1402579245-13377-5-git-send-email-LW@KARO-electronics.de>

(BTW, that's a mighty CC list you have! I'm not sure all CC'd parties
are interested in this series; e.g., Russel and the ARM list seem
unrelated)

Hi Lothar,

Sorry for the delay on this. I get busy enough that I can't/don't reply
to everything quickly...

On Thu, Jun 12, 2014 at 03:20:44PM +0200, Lothar Wa?mann wrote:
> add a boolean property 'nand-no-oob-bbm' and helper function to be
> able to set the NAND_BBT_NO_OOB_BBM flag in DT capable NAND drivers
> and use it for i.MX and MXS nand drivers.

If I'm understanding your previous conversations with Huang correctly,
you *must* use NAND_BBT_NO_OOB_BBM if you're going to use the
fsl,no-blockmark-swap option. Correct? If so, then you might not need
a separate 'nand-no-oob-bbm' binding; your driver should imply from
'fsl,no-blockmark-swap' that it must also enable NAND_BBT_NO_OOB_BBM.

Also, as I noted in [1], I don't really like exposing a ton of
individual boolean DT properties like this. (At least this property is
orthogonal to the bad block table; I was a little off-base in [1].)

Brian

[1] http://lists.infradead.org/pipermail/linux-mtd/2014-July/054764.html

> Signed-off-by: Lothar Wa?mann <LW@KARO-electronics.de>
> ---
>  Documentation/devicetree/bindings/mtd/nand.txt |    1 +
>  drivers/mtd/nand/gpmi-nand/gpmi-nand.c         |    3 +++
>  drivers/mtd/nand/mxc_nand.c                    |    2 ++
>  drivers/of/of_mtd.c                            |   12 ++++++++++++
>  include/linux/of_mtd.h                         |    6 ++++++
>  5 files changed, 24 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mtd/nand.txt b/Documentation/devicetree/bindings/mtd/nand.txt
> index b53f92e..e46bfbe 100644
> --- a/Documentation/devicetree/bindings/mtd/nand.txt
> +++ b/Documentation/devicetree/bindings/mtd/nand.txt
> @@ -5,6 +5,7 @@
>    "soft_bch".
>  - nand-bus-width : 8 or 16 bus width if not present 8
>  - nand-on-flash-bbt: boolean to enable on flash bbt option if not present false
> +- nand-no-oob-bbm: boolean to disable writing bad block markers to flash
>  
>  - nand-ecc-strength: integer representing the number of bits to correct
>  		     per ECC step.
> diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> index 959cb9b..37537b4 100644
> --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> @@ -1724,6 +1724,9 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
>  	if (of_get_nand_on_flash_bbt(this->dev->of_node)) {
>  		chip->bbt_options |= NAND_BBT_USE_FLASH | NAND_BBT_NO_OOB;
>  
> +		if (of_get_nand_no_oob_bbm(this->dev->of_node))
> +			chip->bbt_options |= NAND_BBT_NO_OOB_BBM;
> +
>  		if (of_property_read_bool(this->dev->of_node,
>  						"fsl,no-blockmark-swap"))
>  			this->swap_block_mark = false;
> diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
> index dba262b..bb54a2a 100644
> --- a/drivers/mtd/nand/mxc_nand.c
> +++ b/drivers/mtd/nand/mxc_nand.c
> @@ -1496,6 +1496,8 @@ static int mxcnd_probe(struct platform_device *pdev)
>  		this->bbt_md = &bbt_mirror_descr;
>  		/* update flash based bbt */
>  		this->bbt_options |= NAND_BBT_USE_FLASH;
> +		if (of_get_nand_no_oob_bbm(pdev->dev.of_node))
> +			this->bbt_options |= NAND_BBT_NO_OOB_BBM;
>  	}
>  
>  	init_completion(&host->op_completion);
> diff --git a/drivers/of/of_mtd.c b/drivers/of/of_mtd.c
> index b7361ed..d947acc 100644
> --- a/drivers/of/of_mtd.c
> +++ b/drivers/of/of_mtd.c
> @@ -117,3 +117,15 @@ bool of_get_nand_on_flash_bbt(struct device_node *np)
>  	return of_property_read_bool(np, "nand-on-flash-bbt");
>  }
>  EXPORT_SYMBOL_GPL(of_get_nand_on_flash_bbt);
> +
> +/**
> + * of_get_nand_no_oob_bbm - Get nand no oob bbm for given device_node
> + * @np:	Pointer to the given device_node
> + *
> + * return true if present, false otherwise
> + */
> +bool of_get_nand_no_oob_bbm(struct device_node *np)
> +{
> +	return of_property_read_bool(np, "nand-no-oob-bbm");
> +}
> +EXPORT_SYMBOL_GPL(of_get_nand_no_oob_bbm);
> diff --git a/include/linux/of_mtd.h b/include/linux/of_mtd.h
> index e266caa..6ece1a9 100644
> --- a/include/linux/of_mtd.h
> +++ b/include/linux/of_mtd.h
> @@ -17,6 +17,7 @@ int of_get_nand_ecc_step_size(struct device_node *np);
>  int of_get_nand_ecc_strength(struct device_node *np);
>  int of_get_nand_bus_width(struct device_node *np);
>  bool of_get_nand_on_flash_bbt(struct device_node *np);
> +bool of_get_nand_no_oob_bbm(struct device_node *np);
>  
>  #else /* CONFIG_OF_MTD */
>  
> @@ -45,6 +46,11 @@ static inline bool of_get_nand_on_flash_bbt(struct device_node *np)
>  	return false;
>  }
>  
> +static inline bool of_get_nand_no_oob_bbm(struct device_node *np)
> +{
> +	return false;
> +}
> +
>  #endif /* CONFIG_OF_MTD */
>  
>  #endif /* __LINUX_OF_MTD_H */

^ permalink raw reply

* [GIT PULL] Renesas ARM Based SoC DT Timers Updates for v3.17
From: Simon Horman @ 2014-07-24  2:05 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <CAOesGMjWBEK3=4um3p3iGZbwXUDw2hxTYQPXAtcG3MF2ZibwyQ@mail.gmail.com>

Hi Arnd,

I understand from Olof that you are handling pull-requests at this time.
I would like you to consider this one in light of the extra
information that I have provided below.

On Wed, Jul 23, 2014 at 05:00:21PM -0700, Olof Johansson wrote:
> Ah, sorry. Got lost in the other pull requests.
> 
> On Wed, Jul 23, 2014 at 4:54 PM, Simon Horman <horms@verge.net.au> wrote:
> > Hi Olof,
> >
> > I'd value your feedback on this if you have a moment.
> >
> > On Sun, Jul 20, 2014 at 10:51:25PM +0900, Simon Horman wrote:
> >> On Fri, Jul 18, 2014 at 10:27:58PM -0700, Olof Johansson wrote:
> >> > On Thu, Jul 17, 2014 at 09:40:20AM +0900, Simon Horman wrote:
> >> > > Hi Olof, Hi Kevin, Hi Arnd,
> >> > >
> >> > > Please consider these Renesas ARM based SoC DT Timers updates for v3.17.
> >> > >
> >> > > This pull request is based on a merge of the following to provide
> >> > > all dependencies and try to eliminate conflicts. It turns out the changes
> >> > > in this pull requests are a nexus for dependencies due to modifying DT,
> >> > > SoC, board and recently moved header files as well as requiring driver
> >> > > changes.
> >> > >
> >> > > * The clockevents/renesas-timers-dt branch of Daniel Lezcano's tree.
> >> > >   He has indicated that this branch has stable commit ids and will
> >> > >   be included in v3.17. Olof and arm at kernel.org were CCed on the
> >> > >   thread where he, Laurent Pinchart and I discussed the use of that branch.
> >> > >
> >> > >   The clockevents/renesas-timers-dt's branch is in turn based on v3.16-rc3.
> >> > >
> >> > > * "Third Round of Renesas ARM Based SoC DT Updates for v3.17",
> >> > >   tagged as renesas-dt3-for-v3.17, which I have sent a pull request for.
> >> > >
> >> > > * "Renesas ARM Based SoC Clock Updates for v3.17",
> >> > >   tagged as renesas-clock-for-v3.17, which you have merged
> >> > >   into next/soc

This should have been :

         * "Third Round of Renesas ARM Based SoC Clock Updates for v3.17",
	   tagged as renesas-clock3-for-v3.17.

	   I somehow forgot to tag that branch and send a pull-request.
	   I have done so now.

> >> > > * "Second Round of Renesas ARM Based SoC soc-cleanup Updates for v3.17",
> >> > >   tagged as renesas-soc-cleanup2-for-v3.17, which you have merged
> >> > >   into next/cleanup.
> >> > >
> >> > > * "Third Round of Renesas ARM Based SoC r8a7779 Multiplatform Updates for
> >> > >   v3.17", tagged as renesas-r8a7779-multiplatform3-for-v3.17, which
> >> > >   you have merged into next/soc
> >> > >
> >> > > * "Renesas ARM Based SoC Boards Updates for v3.17",
> >> > >   tagged as renesas-boards-for-v3.17, which you have merged
> >> > >   into next/boards
> >> > >
> >> > > * "Third Round of Renesas ARM Based SoC Updates for v3.17",
> >> > >   tagged as renesas-soc3-for-v3.17, which you have merged
> >> > >   into next/soc
> >> > >
> >> > >
> >> > > The following changes since commit 5c174afd407acc7a90701900b279578151bc007f:
> >> > >
> >> > >   Merge branch 'clockevents/renesas-timers-dt' of git://git.linaro.org/people/daniel.lezcano/linux into dt-timers-for-v3.17.base (2014-07-15 16:31:45 +0900)
> >> > >
> >> > > are available in the git repository at:
> >> > >
> >> > >
> >> > >   git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-dt-timers-for-v3.17
> >> > >
> >> > > for you to fetch changes up to 9394af4314554d15762585a3464cefaa2e6d0420:
> >> > >
> >> > >   ARM: shmobile: genmai-reference: Enable MTU2 in device tree (2014-07-15 21:26:42 +0900)
> >> > >
> >> > > ----------------------------------------------------------------
> >> > > Renesas ARM Based SoC DT Timers Updates for v3.17
> >> > >
> >> > > * Enable timers using DT when booting boards without Legacy-C code
> >> > >
> >> > > ----------------------------------------------------------------
> >> > > Laurent Pinchart (8):
> >> > >       ARM: shmobile: r8a7790: Add CMT devices to DT
> >> > >       ARM: shmobile: r8a7791: Add CMT devices to DT
> >> > >       ARM: shmobile: r8a7779: Add TMU devices to DT
> >> > >       ARM: shmobile: lager-reference: Enable CMT0 in device tree
> >> > >       ARM: shmobile: koelsch-reference: Enable CMT0 in device tree
> >> > >       ARM: shmobile: marzen-reference: Enable TMU0 in device tree
> >> > >       ARM: shmobile: r7s72100: Add MTU2 device to DT
> >> > >       ARM: shmobile: genmai-reference: Enable MTU2 in device tree
> >> >
> >> > Ok, this branch definitely contains a lot more than this. For dependent
> >> > external branches such as clocksource, we still prefer to see a pull request so
> >> > that we can merge in the dependency and get a clean diffstat when we do the
> >> > merge of your branch, otherwise it gets awkward to compare that what we're
> >> > getting is what you thought you sent (which is one of the things we check on
> >> > merges).
> >> >
> >> > Please regenerate this pull request as appropriate.
> >>
> >> Hi Olof,
> >>
> >> FWIW, I believe that that the diffstat between
> >> 5c174afd407acc7a90701900b279578151bc007f and
> >> 9394af4314554d15762585a3464cefaa2e6d0420 is what was included in the
> >> pull-request. But I guess that all the merged-in branches are hampering
> >> your verification process.
> >>
> >> Would it help if things were arranged as follows?
> >>
> >> 1. Use the clocksource branch as a base and then;
> >> 2. Merge in each of my branches (the ones listed above) and then;
> >> 3. Add the patches on top
> 
> So there's nothing wrong per se with the way you arranged it, even
> though it is more convenient for us from a review perspective to get
> merges of branches at the tips of previous branch heads (i.e.
> tags/merge requests). It just makes it easier to spot "Oh, that side
> of the merge is from this branch that we've already reviewed", etc.
> 
> For generating pull requests for these complex merges, what we do when
> sending stuff upstream is that we generate a dummy merge and
> "manually" (through a script) generate the diffstat and shortlog from
> that. Git can get confused about what is actually the merge-base
> otherwise, which is what happened in this case for you.

Thanks. I believe that the cause of this problem is the missing
renesas-clocks3-for-v3.17 pull-request that I noted above.

As discussed off-list, I think that with that taken into account this
pull-request should match its description.

^ permalink raw reply

* [PATCH 3/3] ARM: shmobile: r7s72100: Remove legacy board support
From: Simon Horman @ 2014-07-24  1:58 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <cover.1406166426.git.horms+renesas@verge.net.au>

From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

There's no legacy board anymore, genmai now boots with multiplatform
support only. Remove the leftovers.

Makefile.boot portion pointed out by Paul Bolle.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Wolfram Sang <wsa@sang-engineering.com>
Cc: Paul Bolle <pebolle@tiscali.nl>
[horms+renesas at verge.net.au: squashed in patch containing
 Makefile.boot change]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/mach-shmobile/Kconfig          |   8 --
 arch/arm/mach-shmobile/Makefile         |   1 -
 arch/arm/mach-shmobile/Makefile.boot    |   1 -
 arch/arm/mach-shmobile/clock-r7s72100.c | 231 --------------------------------
 arch/arm/mach-shmobile/r7s72100.h       |   6 -
 arch/arm/mach-shmobile/setup-r7s72100.c |   2 -
 6 files changed, 249 deletions(-)
 delete mode 100644 arch/arm/mach-shmobile/clock-r7s72100.c
 delete mode 100644 arch/arm/mach-shmobile/r7s72100.h

diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 85f55e8..384221d 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -146,14 +146,6 @@ config ARCH_R8A7791
 	select SYS_SUPPORTS_SH_CMT
 	select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
 
-config ARCH_R7S72100
-	bool "RZ/A1H (R7S72100)"
-	select ARCH_WANT_OPTIONAL_GPIOLIB
-	select ARM_GIC
-	select CPU_V7
-	select SH_CLK_CPG
-	select SYS_SUPPORTS_SH_MTU2
-
 comment "Renesas ARM SoCs Board Type"
 
 config MACH_APE6EVM
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index 411e236..dc9446f 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -31,7 +31,6 @@ obj-$(CONFIG_ARCH_R8A7778)	+= clock-r8a7778.o
 obj-$(CONFIG_ARCH_R8A7779)	+= clock-r8a7779.o
 obj-$(CONFIG_ARCH_R8A7790)	+= clock-r8a7790.o
 obj-$(CONFIG_ARCH_R8A7791)	+= clock-r8a7791.o
-obj-$(CONFIG_ARCH_R7S72100)	+= clock-r7s72100.o
 endif
 
 # CPU reset vector handling objects
diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot
index ebf97d4..a23e155 100644
--- a/arch/arm/mach-shmobile/Makefile.boot
+++ b/arch/arm/mach-shmobile/Makefile.boot
@@ -6,7 +6,6 @@ loadaddr-$(CONFIG_MACH_ARMADILLO800EVA) += 0x40008000
 loadaddr-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += 0x40008000
 loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000
 loadaddr-$(CONFIG_MACH_BOCKW_REFERENCE) += 0x60008000
-loadaddr-$(CONFIG_MACH_GENMAI) += 0x08008000
 loadaddr-$(CONFIG_MACH_KOELSCH) += 0x40008000
 loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000
 loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000
diff --git a/arch/arm/mach-shmobile/clock-r7s72100.c b/arch/arm/mach-shmobile/clock-r7s72100.c
deleted file mode 100644
index 3eb2ec4..0000000
--- a/arch/arm/mach-shmobile/clock-r7s72100.c
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * r7a72100 clock framework support
- *
- * Copyright (C) 2013  Renesas Solutions Corp.
- * Copyright (C) 2012  Phil Edworthy
- * Copyright (C) 2011  Magnus Damm
- *
- * 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/init.h>
-#include <linux/kernel.h>
-#include <linux/io.h>
-#include <linux/sh_clk.h>
-#include <linux/clkdev.h>
-
-#include "common.h"
-#include "r7s72100.h"
-
-/* Frequency Control Registers */
-#define FRQCR		0xfcfe0010
-#define FRQCR2		0xfcfe0014
-/* Standby Control Registers */
-#define STBCR3		0xfcfe0420
-#define STBCR4		0xfcfe0424
-#define STBCR7		0xfcfe0430
-#define STBCR9		0xfcfe0438
-#define STBCR10		0xfcfe043c
-
-#define PLL_RATE 30
-
-static struct clk_mapping cpg_mapping = {
-	.phys	= 0xfcfe0000,
-	.len	= 0x1000,
-};
-
-/* Fixed 32 KHz root clock for RTC */
-static struct clk r_clk = {
-	.rate           = 32768,
-};
-
-/*
- * Default rate for the root input clock, reset this with clk_set_rate()
- * from the platform code.
- */
-static struct clk extal_clk = {
-	.rate		= 13330000,
-	.mapping	= &cpg_mapping,
-};
-
-static unsigned long pll_recalc(struct clk *clk)
-{
-	return clk->parent->rate * PLL_RATE;
-}
-
-static struct sh_clk_ops pll_clk_ops = {
-	.recalc		= pll_recalc,
-};
-
-static struct clk pll_clk = {
-	.ops		= &pll_clk_ops,
-	.parent		= &extal_clk,
-	.flags		= CLK_ENABLE_ON_INIT,
-};
-
-static unsigned long bus_recalc(struct clk *clk)
-{
-	return clk->parent->rate / 3;
-}
-
-static struct sh_clk_ops bus_clk_ops = {
-	.recalc		= bus_recalc,
-};
-
-static struct clk bus_clk = {
-	.ops		= &bus_clk_ops,
-	.parent		= &pll_clk,
-	.flags		= CLK_ENABLE_ON_INIT,
-};
-
-static unsigned long peripheral0_recalc(struct clk *clk)
-{
-	return clk->parent->rate / 12;
-}
-
-static struct sh_clk_ops peripheral0_clk_ops = {
-	.recalc		= peripheral0_recalc,
-};
-
-static struct clk peripheral0_clk = {
-	.ops		= &peripheral0_clk_ops,
-	.parent		= &pll_clk,
-	.flags		= CLK_ENABLE_ON_INIT,
-};
-
-static unsigned long peripheral1_recalc(struct clk *clk)
-{
-	return clk->parent->rate / 6;
-}
-
-static struct sh_clk_ops peripheral1_clk_ops = {
-	.recalc		= peripheral1_recalc,
-};
-
-static struct clk peripheral1_clk = {
-	.ops		= &peripheral1_clk_ops,
-	.parent		= &pll_clk,
-	.flags		= CLK_ENABLE_ON_INIT,
-};
-
-struct clk *main_clks[] = {
-	&r_clk,
-	&extal_clk,
-	&pll_clk,
-	&bus_clk,
-	&peripheral0_clk,
-	&peripheral1_clk,
-};
-
-static int div2[] = { 1, 3, 0, 3 }; /* 1, 2/3, reserve, 1/3 */
-static int multipliers[] = { 1, 2, 1, 1 };
-
-static struct clk_div_mult_table div4_div_mult_table = {
-	.divisors = div2,
-	.nr_divisors = ARRAY_SIZE(div2),
-	.multipliers = multipliers,
-	.nr_multipliers = ARRAY_SIZE(multipliers),
-};
-
-static struct clk_div4_table div4_table = {
-	.div_mult_table = &div4_div_mult_table,
-};
-
-enum { DIV4_I,
-	DIV4_NR };
-
-#define DIV4(_reg, _bit, _mask, _flags) \
-	SH_CLK_DIV4(&pll_clk, _reg, _bit, _mask, _flags)
-
-/* The mask field specifies the div2 entries that are valid */
-struct clk div4_clks[DIV4_NR] = {
-	[DIV4_I]  = DIV4(FRQCR, 8, 0xB, CLK_ENABLE_REG_16BIT
-					| CLK_ENABLE_ON_INIT),
-};
-
-enum {
-	MSTP107, MSTP106, MSTP105, MSTP104, MSTP103,
-	MSTP97, MSTP96, MSTP95, MSTP94,
-	MSTP74,
-	MSTP47, MSTP46, MSTP45, MSTP44, MSTP43, MSTP42, MSTP41, MSTP40,
-	MSTP33,	MSTP_NR
-};
-
-static struct clk mstp_clks[MSTP_NR] = {
-	[MSTP107] = SH_CLK_MSTP8(&peripheral1_clk, STBCR10, 7, 0), /* RSPI0 */
-	[MSTP106] = SH_CLK_MSTP8(&peripheral1_clk, STBCR10, 6, 0), /* RSPI1 */
-	[MSTP105] = SH_CLK_MSTP8(&peripheral1_clk, STBCR10, 5, 0), /* RSPI2 */
-	[MSTP104] = SH_CLK_MSTP8(&peripheral1_clk, STBCR10, 4, 0), /* RSPI3 */
-	[MSTP103] = SH_CLK_MSTP8(&peripheral1_clk, STBCR10, 3, 0), /* RSPI4 */
-	[MSTP97] = SH_CLK_MSTP8(&peripheral0_clk, STBCR9, 7, 0), /* RIIC0 */
-	[MSTP96] = SH_CLK_MSTP8(&peripheral0_clk, STBCR9, 6, 0), /* RIIC1 */
-	[MSTP95] = SH_CLK_MSTP8(&peripheral0_clk, STBCR9, 5, 0), /* RIIC2 */
-	[MSTP94] = SH_CLK_MSTP8(&peripheral0_clk, STBCR9, 4, 0), /* RIIC3 */
-	[MSTP74] = SH_CLK_MSTP8(&peripheral1_clk, STBCR7, 4, 0), /* Ether */
-	[MSTP47] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 7, 0), /* SCIF0 */
-	[MSTP46] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 6, 0), /* SCIF1 */
-	[MSTP45] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 5, 0), /* SCIF2 */
-	[MSTP44] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 4, 0), /* SCIF3 */
-	[MSTP43] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 3, 0), /* SCIF4 */
-	[MSTP42] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 2, 0), /* SCIF5 */
-	[MSTP41] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 1, 0), /* SCIF6 */
-	[MSTP40] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 0, 0), /* SCIF7 */
-	[MSTP33] = SH_CLK_MSTP8(&peripheral0_clk, STBCR3, 3, 0), /* MTU2 */
-};
-
-static struct clk_lookup lookups[] = {
-	/* main clocks */
-	CLKDEV_CON_ID("rclk", &r_clk),
-	CLKDEV_CON_ID("extal", &extal_clk),
-	CLKDEV_CON_ID("pll_clk", &pll_clk),
-	CLKDEV_CON_ID("peripheral_clk", &peripheral1_clk),
-
-	/* DIV4 clocks */
-	CLKDEV_CON_ID("cpu_clk", &div4_clks[DIV4_I]),
-
-	/* MSTP clocks */
-	CLKDEV_DEV_ID("rspi-rz.0", &mstp_clks[MSTP107]),
-	CLKDEV_DEV_ID("rspi-rz.1", &mstp_clks[MSTP106]),
-	CLKDEV_DEV_ID("rspi-rz.2", &mstp_clks[MSTP105]),
-	CLKDEV_DEV_ID("rspi-rz.3", &mstp_clks[MSTP104]),
-	CLKDEV_DEV_ID("rspi-rz.4", &mstp_clks[MSTP103]),
-	CLKDEV_DEV_ID("r7s72100-ether", &mstp_clks[MSTP74]),
-
-	/* ICK */
-	CLKDEV_ICK_ID("sci_fck", "sh-sci.0", &mstp_clks[MSTP47]),
-	CLKDEV_ICK_ID("sci_fck", "sh-sci.1", &mstp_clks[MSTP46]),
-	CLKDEV_ICK_ID("sci_fck", "sh-sci.2", &mstp_clks[MSTP45]),
-	CLKDEV_ICK_ID("sci_fck", "sh-sci.3", &mstp_clks[MSTP44]),
-	CLKDEV_ICK_ID("sci_fck", "sh-sci.4", &mstp_clks[MSTP43]),
-	CLKDEV_ICK_ID("sci_fck", "sh-sci.5", &mstp_clks[MSTP42]),
-	CLKDEV_ICK_ID("sci_fck", "sh-sci.6", &mstp_clks[MSTP41]),
-	CLKDEV_ICK_ID("sci_fck", "sh-sci.7", &mstp_clks[MSTP40]),
-	CLKDEV_ICK_ID("fck", "sh-mtu2", &mstp_clks[MSTP33]),
-};
-
-void __init r7s72100_clock_init(void)
-{
-	int k, ret = 0;
-
-	for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++)
-		ret = clk_register(main_clks[k]);
-
-	clkdev_add_table(lookups, ARRAY_SIZE(lookups));
-
-	if (!ret)
-		ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table);
-
-	if (!ret)
-		ret = sh_clk_mstp_register(mstp_clks, MSTP_NR);
-
-	if (!ret)
-		shmobile_clk_init();
-	else
-		panic("failed to setup rza1 clocks\n");
-}
diff --git a/arch/arm/mach-shmobile/r7s72100.h b/arch/arm/mach-shmobile/r7s72100.h
deleted file mode 100644
index 321ae4e..0000000
--- a/arch/arm/mach-shmobile/r7s72100.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef __ASM_R7S72100_H__
-#define __ASM_R7S72100_H__
-
-void r7s72100_clock_init(void);
-
-#endif /* __ASM_R7S72100_H__ */
diff --git a/arch/arm/mach-shmobile/setup-r7s72100.c b/arch/arm/mach-shmobile/setup-r7s72100.c
index d898cef..111437d 100644
--- a/arch/arm/mach-shmobile/setup-r7s72100.c
+++ b/arch/arm/mach-shmobile/setup-r7s72100.c
@@ -24,7 +24,6 @@
 
 #include "common.h"
 
-#ifdef CONFIG_USE_OF
 static const char *r7s72100_boards_compat_dt[] __initdata = {
 	"renesas,r7s72100",
 	NULL,
@@ -34,4 +33,3 @@ DT_MACHINE_START(R7S72100_DT, "Generic R7S72100 (Flattened Device Tree)")
 	.init_early	= shmobile_init_delay,
 	.dt_compat	= r7s72100_boards_compat_dt,
 MACHINE_END
-#endif /* CONFIG_USE_OF */
-- 
2.0.1

^ permalink raw reply related

* [PATCH 2/3] ARM: shmobile: r7s72100: genmai: Remove legacy board file
From: Simon Horman @ 2014-07-24  1:58 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <cover.1406166426.git.horms+renesas@verge.net.au>

From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

The genmai board now boots using DT and multiplatform kernel with the
same feature set as the legacy board. Remove the legacy board file and
the board Kconfig option.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Wolfram Sang <wsa@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/mach-shmobile/Kconfig        |   9 --
 arch/arm/mach-shmobile/Makefile       |   1 -
 arch/arm/mach-shmobile/board-genmai.c | 174 ----------------------------------
 3 files changed, 184 deletions(-)
 delete mode 100644 arch/arm/mach-shmobile/board-genmai.c

diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 4508643..85f55e8 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -43,10 +43,6 @@ config ARCH_R8A7791
 
 comment "Renesas ARM SoCs Board Type"
 
-config MACH_GENMAI
-	bool "Genmai board"
-	depends on ARCH_R7S72100
-
 config MACH_KOELSCH
 	bool "Koelsch board"
 	depends on ARCH_R8A7791
@@ -233,11 +229,6 @@ config MACH_BOCKW_REFERENCE
 
 	   This is intended to aid developers
 
-config MACH_GENMAI
-	bool "Genmai board"
-	depends on ARCH_R7S72100
-	select USE_OF
-
 config MACH_MARZEN
 	bool "MARZEN board"
 	depends on ARCH_R8A7779
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index 18b05a8..411e236 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -71,7 +71,6 @@ obj-$(CONFIG_MACH_APE6EVM_REFERENCE)	+= board-ape6evm-reference.o
 obj-$(CONFIG_MACH_MACKEREL)	+= board-mackerel.o
 obj-$(CONFIG_MACH_BOCKW)	+= board-bockw.o
 obj-$(CONFIG_MACH_BOCKW_REFERENCE)	+= board-bockw-reference.o
-obj-$(CONFIG_MACH_GENMAI)	+= board-genmai.o
 obj-$(CONFIG_MACH_MARZEN)	+= board-marzen.o
 obj-$(CONFIG_MACH_LAGER)	+= board-lager.o
 obj-$(CONFIG_MACH_ARMADILLO800EVA)	+= board-armadillo800eva.o
diff --git a/arch/arm/mach-shmobile/board-genmai.c b/arch/arm/mach-shmobile/board-genmai.c
deleted file mode 100644
index b5dee53..0000000
--- a/arch/arm/mach-shmobile/board-genmai.c
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Genmai board support
- *
- * Copyright (C) 2013-2014  Renesas Solutions Corp.
- * Copyright (C) 2013  Magnus Damm
- * Copyright (C) 2014  Cogent Embedded, Inc.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include <linux/kernel.h>
-#include <linux/platform_device.h>
-#include <linux/serial_sci.h>
-#include <linux/sh_eth.h>
-#include <linux/sh_timer.h>
-#include <linux/spi/rspi.h>
-#include <linux/spi/spi.h>
-
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-
-#include "common.h"
-#include "irqs.h"
-#include "r7s72100.h"
-
-/* Ether */
-static const struct sh_eth_plat_data ether_pdata __initconst = {
-	.phy			= 0x00, /* PD60610 */
-	.edmac_endian		= EDMAC_LITTLE_ENDIAN,
-	.phy_interface		= PHY_INTERFACE_MODE_MII,
-	.no_ether_link		= 1
-};
-
-static const struct resource ether_resources[] __initconst = {
-	DEFINE_RES_MEM(0xe8203000, 0x800),
-	DEFINE_RES_MEM(0xe8204800, 0x200),
-	DEFINE_RES_IRQ(gic_iid(359)),
-};
-
-static const struct platform_device_info ether_info __initconst = {
-	.parent		= &platform_bus,
-	.name		= "r7s72100-ether",
-	.id		= -1,
-	.res		= ether_resources,
-	.num_res	= ARRAY_SIZE(ether_resources),
-	.data		= &ether_pdata,
-	.size_data	= sizeof(ether_pdata),
-	.dma_mask	= DMA_BIT_MASK(32),
-};
-
-/* RSPI */
-#define RSPI_RESOURCE(idx, baseaddr, irq)				\
-static const struct resource rspi##idx##_resources[] __initconst = {	\
-	DEFINE_RES_MEM(baseaddr, 0x24),					\
-	DEFINE_RES_IRQ_NAMED(irq, "error"),				\
-	DEFINE_RES_IRQ_NAMED(irq + 1, "rx"),				\
-	DEFINE_RES_IRQ_NAMED(irq + 2, "tx"),				\
-}
-
-RSPI_RESOURCE(0, 0xe800c800, gic_iid(270));
-RSPI_RESOURCE(1, 0xe800d000, gic_iid(273));
-RSPI_RESOURCE(2, 0xe800d800, gic_iid(276));
-RSPI_RESOURCE(3, 0xe800e000, gic_iid(279));
-RSPI_RESOURCE(4, 0xe800e800, gic_iid(282));
-
-static const struct rspi_plat_data rspi_pdata __initconst = {
-	.num_chipselect	= 1,
-};
-
-#define r7s72100_register_rspi(idx)					   \
-	platform_device_register_resndata(&platform_bus, "rspi-rz", idx,   \
-					rspi##idx##_resources,		   \
-					ARRAY_SIZE(rspi##idx##_resources), \
-					&rspi_pdata, sizeof(rspi_pdata))
-
-static const struct spi_board_info spi_info[] __initconst = {
-	{
-		.modalias               = "wm8978",
-		.max_speed_hz           = 5000000,
-		.bus_num                = 4,
-		.chip_select            = 0,
-	},
-};
-
-/* SCIF */
-#define R7S72100_SCIF(index, baseaddr, irq)				\
-static const struct plat_sci_port scif##index##_platform_data = {	\
-	.type		= PORT_SCIF,					\
-	.regtype	= SCIx_SH2_SCIF_FIFODATA_REGTYPE,		\
-	.flags		= UPF_BOOT_AUTOCONF | UPF_IOREMAP,		\
-	.scscr		= SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |	\
-			  SCSCR_REIE,					\
-};									\
-									\
-static struct resource scif##index##_resources[] = {			\
-	DEFINE_RES_MEM(baseaddr, 0x100),				\
-	DEFINE_RES_IRQ(irq + 1),					\
-	DEFINE_RES_IRQ(irq + 2),					\
-	DEFINE_RES_IRQ(irq + 3),					\
-	DEFINE_RES_IRQ(irq),						\
-}									\
-
-R7S72100_SCIF(0, 0xe8007000, gic_iid(221));
-R7S72100_SCIF(1, 0xe8007800, gic_iid(225));
-R7S72100_SCIF(2, 0xe8008000, gic_iid(229));
-R7S72100_SCIF(3, 0xe8008800, gic_iid(233));
-R7S72100_SCIF(4, 0xe8009000, gic_iid(237));
-R7S72100_SCIF(5, 0xe8009800, gic_iid(241));
-R7S72100_SCIF(6, 0xe800a000, gic_iid(245));
-R7S72100_SCIF(7, 0xe800a800, gic_iid(249));
-
-#define r7s72100_register_scif(index)					       \
-	platform_device_register_resndata(&platform_bus, "sh-sci", index,      \
-					  scif##index##_resources,	       \
-					  ARRAY_SIZE(scif##index##_resources), \
-					  &scif##index##_platform_data,	       \
-					  sizeof(scif##index##_platform_data))
-
-static struct resource mtu2_resources[] __initdata = {
-	DEFINE_RES_MEM(0xfcff0000, 0x400),
-	DEFINE_RES_IRQ_NAMED(gic_iid(139), "tgi0a"),
-};
-
-#define r7s72100_register_mtu2()					\
-	platform_device_register_resndata(&platform_bus, "sh-mtu2",	\
-					  -1, mtu2_resources,		\
-					  ARRAY_SIZE(mtu2_resources),	\
-					  NULL, 0)
-
-static void __init genmai_add_standard_devices(void)
-{
-	r7s72100_clock_init();
-	r7s72100_register_mtu2();
-
-	platform_device_register_full(&ether_info);
-
-	r7s72100_register_rspi(0);
-	r7s72100_register_rspi(1);
-	r7s72100_register_rspi(2);
-	r7s72100_register_rspi(3);
-	r7s72100_register_rspi(4);
-	spi_register_board_info(spi_info, ARRAY_SIZE(spi_info));
-
-	r7s72100_register_scif(0);
-	r7s72100_register_scif(1);
-	r7s72100_register_scif(2);
-	r7s72100_register_scif(3);
-	r7s72100_register_scif(4);
-	r7s72100_register_scif(5);
-	r7s72100_register_scif(6);
-	r7s72100_register_scif(7);
-}
-
-static const char * const genmai_boards_compat_dt[] __initconst = {
-	"renesas,genmai",
-	NULL,
-};
-
-DT_MACHINE_START(GENMAI_DT, "genmai")
-	.init_early	= shmobile_init_delay,
-	.init_machine	= genmai_add_standard_devices,
-	.dt_compat	= genmai_boards_compat_dt,
-MACHINE_END
-- 
2.0.1

^ permalink raw reply related

* [PATCH 1/3] ARM: shmobile: r7s72100: genmai: Remove reference board file
From: Simon Horman @ 2014-07-24  1:58 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <cover.1406166426.git.horms+renesas@verge.net.au>

From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

The genmai board now boots using the generic R7S72100 DT machine with
the same feature set as the board file. Remove the board file.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Wolfram Sang <wsa@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/mach-shmobile/Makefile                 |  1 -
 arch/arm/mach-shmobile/board-genmai-reference.c | 35 -------------------------
 2 files changed, 36 deletions(-)
 delete mode 100644 arch/arm/mach-shmobile/board-genmai-reference.c

diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index dd542e7..18b05a8 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -62,7 +62,6 @@ obj-$(CONFIG_ARCH_SH7372)	+= entry-intc.o
 
 # Board objects
 ifdef CONFIG_ARCH_SHMOBILE_MULTI
-obj-$(CONFIG_MACH_GENMAI)	+= board-genmai-reference.o
 obj-$(CONFIG_MACH_KOELSCH)	+= board-koelsch-reference.o
 obj-$(CONFIG_MACH_LAGER)	+= board-lager-reference.o
 obj-$(CONFIG_MACH_MARZEN)	+= board-marzen-reference.o
diff --git a/arch/arm/mach-shmobile/board-genmai-reference.c b/arch/arm/mach-shmobile/board-genmai-reference.c
deleted file mode 100644
index bc52677..0000000
--- a/arch/arm/mach-shmobile/board-genmai-reference.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Genmai board support
- *
- * Copyright (C) 2013  Renesas Solutions Corp.
- * Copyright (C) 2013  Magnus Damm
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include <linux/kernel.h>
-
-#include <asm/mach/arch.h>
-
-#include "common.h"
-
-static const char * const genmai_boards_compat_dt[] __initconst = {
-	"renesas,genmai",
-	NULL,
-};
-
-DT_MACHINE_START(GENMAI_DT, "genmai")
-	.init_early	= shmobile_init_delay,
-	.dt_compat	= genmai_boards_compat_dt,
-MACHINE_END
-- 
2.0.1

^ permalink raw reply related

* [GIT PULL v2] Renesas ARM Based SoC Boards Cleanups for v3.17
From: Simon Horman @ 2014-07-24  1:57 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Olof, Hi Kevin, Hi Arnd,

Please consider these Renesas ARM based SoC boards cleanups for v3.17.


This pull request is based on
"Renesas ARM Based SoC DT Timers Updates for v3.17",
tagged as renesas-dt-timers-for-v3.17,
which I have sent a pull request for.

In this pull-request cleanups are added on top of new development
due to the order in which the code was developed. In general
we prefer the reverse ordering.


v2 of this pull request is a rebase of v1 removing
a merge of defconfig changes at the base of the pull-request.
The motivation for that was to avoid attempts to use
genmai_defconfig after the board code it relies on has been removed.
Olof indicated he would prefer not to add that dependency.


The following changes since commit 9394af4314554d15762585a3464cefaa2e6d0420:

  ARM: shmobile: genmai-reference: Enable MTU2 in device tree (2014-07-15 21:26:42 +0900)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-cleanup-boards-for-v3.17

for you to fetch changes up to d2904bb7cd21844ff5e720083b59a344487fcc9b:

  ARM: shmobile: r7s72100: Remove legacy board support (2014-07-24 10:32:53 +0900)

----------------------------------------------------------------
Renesas ARM Based SoC Boards Cleanups for v3.17

d2904bb ARM: shmobile: r7s72100: Remove legacy board support
6f86033 ARM: shmobile: r7s72100: genmai: Remove legacy board file
5cebb8e ARM: shmobile: r7s72100: genmai: Remove reference board file

----------------------------------------------------------------
Laurent Pinchart (3):
      ARM: shmobile: r7s72100: genmai: Remove reference board file
      ARM: shmobile: r7s72100: genmai: Remove legacy board file
      ARM: shmobile: r7s72100: Remove legacy board support

 arch/arm/mach-shmobile/Kconfig                  |  17 --
 arch/arm/mach-shmobile/Makefile                 |   3 -
 arch/arm/mach-shmobile/Makefile.boot            |   1 -
 arch/arm/mach-shmobile/board-genmai-reference.c |  35 ----
 arch/arm/mach-shmobile/board-genmai.c           | 174 ------------------
 arch/arm/mach-shmobile/clock-r7s72100.c         | 231 ------------------------
 arch/arm/mach-shmobile/r7s72100.h               |   6 -
 arch/arm/mach-shmobile/setup-r7s72100.c         |   2 -
 8 files changed, 469 deletions(-)
 delete mode 100644 arch/arm/mach-shmobile/board-genmai-reference.c
 delete mode 100644 arch/arm/mach-shmobile/board-genmai.c
 delete mode 100644 arch/arm/mach-shmobile/clock-r7s72100.c
 delete mode 100644 arch/arm/mach-shmobile/r7s72100.h

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox