platform/adaptation/renesas_rcar/renesas_kernel.git
9 years agoARM: shmobile: kzm9g: Use shmobile_init_delay()
Magnus Damm [Wed, 20 Aug 2014 13:03:30 +0000 (22:03 +0900)]
ARM: shmobile: kzm9g: Use shmobile_init_delay()

Adjust the KZM9G board support code to use shmobile_init_delay()
together with CPU Frequency settings from the DTS.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit fc35ca258c079411b64ed94e517eb04e7d89bc44)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: bockw: Use shmobile_init_delay()
Magnus Damm [Wed, 20 Aug 2014 13:03:21 +0000 (22:03 +0900)]
ARM: shmobile: bockw: Use shmobile_init_delay()

Adjust the BockW board support code to use shmobile_init_delay()
together with CPU Frequency settings from the DTS.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit ca609e666c47cceb64610ad703dda1bebafef605)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7778: Use shmobile_init_delay()
Magnus Damm [Wed, 20 Aug 2014 13:02:54 +0000 (22:02 +0900)]
ARM: shmobile: r8a7778: Use shmobile_init_delay()

Adjust the r8a7778 SoC support code to use shmobile_init_delay()
together with CPU Frequency settings from the DTS. Get rid of the
C code version.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 6fe950ebfd3a374c78ce66a335fce258648426a1)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: sh73a0: Use shmobile_init_delay()
Magnus Damm [Wed, 20 Aug 2014 13:02:45 +0000 (22:02 +0900)]
ARM: shmobile: sh73a0: Use shmobile_init_delay()

Adjust the sh73a0 SoC support code to use shmobile_init_delay()
together with CPU Frequency settings from the DTS. Get rid of the
C code version.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 5df622a56b7da3c54609f26cc6221ab3382efaaf)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: Remove shmobile_setup_delay()
Magnus Damm [Wed, 20 Aug 2014 13:03:12 +0000 (22:03 +0900)]
ARM: shmobile: Remove shmobile_setup_delay()

All ARM mach-shmobile SoCs and boards now rely on DTS for
CPU Frequency information, so remove the unused function
shmobile_setup_delay(). While at it, make the function
shmobile_setup_delay_hz() static.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 7dd4cfd7f8c2976a8d65022146386480474501ca)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a73a4: Use shmobile_init_delay()
Magnus Damm [Wed, 20 Aug 2014 13:03:03 +0000 (22:03 +0900)]
ARM: shmobile: r8a73a4: Use shmobile_init_delay()

Adjust the r8a73a4 SoC support code to use shmobile_init_delay()
together with CPU Frequency settings from the DTS. Get rid of the
C code version and r8a73a4_init_early() that now are unused.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit f5720080b51d61c33dc559fedab9a601930e95c1)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: sh7372: Use shmobile_init_delay()
Magnus Damm [Wed, 20 Aug 2014 13:02:36 +0000 (22:02 +0900)]
ARM: shmobile: sh7372: Use shmobile_init_delay()

Adjust the sh7372 SoC support code to use shmobile_init_delay()
together with CPU Frequency settings from the DTS. Get rid of the
C code version.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 39b22e20a3086002c5abe0c569cf11a71bc17faf)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7778: Update DTS to include CPU frequency
Magnus Damm [Wed, 20 Aug 2014 13:02:27 +0000 (22:02 +0900)]
ARM: shmobile: r8a7778: Update DTS to include CPU frequency

Add CPU Frequency information to the r8a7778 DTS file. This
will allow us to use the shared C code on r8a7778 and BockW
which reads out the clock frequency from DT and calculates the
delay settings from there.

Also add other missing CPU information to the r8a7778 DTS.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 869f92aed207f2f6e595ea41c841bd9ad0c0d0d4)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: sh73a0: Update DTS to include CPU frequency
Magnus Damm [Wed, 20 Aug 2014 13:02:19 +0000 (22:02 +0900)]
ARM: shmobile: sh73a0: Update DTS to include CPU frequency

Add CPU Frequency information to the sh73a0 DTS file. This
will allow us to use the shared C code on sh73a0 and KZM9G
which reads out the clock frequency from DT and calculates the
delay settings from there.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 13bd825bdd5c087d156d294b427d05dcf9bff281)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: sh7372: Update DTS to include CPU frequency
Magnus Damm [Wed, 20 Aug 2014 13:02:10 +0000 (22:02 +0900)]
ARM: shmobile: sh7372: Update DTS to include CPU frequency

Add CPU Frequency information to the sh7372 DTS file. This
will allow us to use the shared C code on sh7372 and Mackerel
which reads out the clock frequency from DT and calculates the
delay settings from there.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 2340cd112933ee837aa83017a6da23c72565d501)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7791: Add JPU clock dt and CPG define.
Mikhail Ulyanov [Tue, 19 Aug 2014 12:50:51 +0000 (16:50 +0400)]
ARM: shmobile: r8a7791: Add JPU clock dt and CPG define.

Signed-off-by: Mikhail Ulyanov <mikhail.ulyanov@cogentembedded.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit ed48b5d6fd339d145df5a6a1e48cf56ef265cf4f)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7790: Add JPU clock dt and CPG define.
Mikhail Ulyanov [Tue, 19 Aug 2014 12:50:49 +0000 (16:50 +0400)]
ARM: shmobile: r8a7790: Add JPU clock dt and CPG define.

Signed-off-by: Mikhail Ulyanov <mikhail.ulyanov@cogentembedded.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit da076a888ab19f13816372796ed231e7d6ff5fed)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: bockw: Do not disable SUSPEND in defconfig
Simon Horman [Thu, 14 Aug 2014 21:36:28 +0000 (06:36 +0900)]
ARM: shmobile: bockw: Do not disable SUSPEND in defconfig

As of "ARM: shmobile: r8a7778: Add missing call to shmobile_init_late()"
suspend-to-ram is now supported on the r8a7778 SoC and thus the bockw
board.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 99923753e7c17a9c9d46bfe4d7fa543e426ec647)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: sh73a0: Remove unneeded nr_irqs initialization
Geert Uytterhoeven [Wed, 13 Aug 2014 11:56:57 +0000 (13:56 +0200)]
ARM: shmobile: sh73a0: Remove unneeded nr_irqs initialization

As per arch_probe_nr_irqs(), the default value is NR_IRQS, which maps to
NR_IRQS_LEGACY if CONFIG_SPARSE_IRQ=y.

Since SPARSE_IRQ is selected by both ARCH_MULTIPLATFORM and
ARCH_SHMOBILE_LEGACY, it's always enabled on shmobile.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 5ac9e7f35db00e630c9f95a1f73ac329371cdbbf)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: sh7372: Remove unneeded nr_irqs initialization
Geert Uytterhoeven [Wed, 13 Aug 2014 11:56:56 +0000 (13:56 +0200)]
ARM: shmobile: sh7372: Remove unneeded nr_irqs initialization

As per arch_probe_nr_irqs(), the default value is NR_IRQS, which maps to
NR_IRQS_LEGACY if CONFIG_SPARSE_IRQ=y.

Since SPARSE_IRQ is selected by both ARCH_MULTIPLATFORM and
ARCH_SHMOBILE_LEGACY, it's always enabled on shmobile.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit ea2e46086969e11b759a8f2c111c9b007d1b35c9)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7779: Remove NR_IRQS_LEGACY
Magnus Damm [Fri, 8 Aug 2014 11:49:04 +0000 (20:49 +0900)]
ARM: shmobile: r8a7779: Remove NR_IRQS_LEGACY

Remove NR_IRQS_LEGACY from the r8a7779 generic machine
vector. The generic r8a7779 machine vector requires use
of Multiplatform, and in such case SPARSE_IRQ is enabled
by default. This in turns means that the default value
of .nr_irqs equals NR_IRQS and NR_IRQS_LEGACY. Because
of this we can simply remove NR_IRQS_LEGACY and move one
step closer to a cruft-free environment.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 93f05252514a8c7b6bf5a132f6b20f10215cb59c)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: dma: Use defines instead of hardcoded numbers
Geert Uytterhoeven [Tue, 5 Aug 2014 13:21:29 +0000 (15:21 +0200)]
ARM: shmobile: dma: Use defines instead of hardcoded numbers

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit fe8abe0bc2afb20b126e7e0759081dc0df2cd60d)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: Rework multiplatform include workaround
Magnus Damm [Thu, 31 Jul 2014 00:25:15 +0000 (09:25 +0900)]
ARM: shmobile: Rework multiplatform include workaround

Now when the majority of the include files have moved from
arch/arm/mach-shmobile/include/mach/ to arch/arm/mach-shmobile/
remove the header include file workaround in the Makefile...

... and add another workaround in irqs.h to cope with the fact
that <mach/irqs.h> needs to be where it is until the PFC code
has been updated to remove legacy non-DT interfaces.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit f2acab52e77650044b0772a6d7abbfef1eb4cede)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r7s72100: Add shmobile_init_late()
Magnus Damm [Wed, 30 Jul 2014 23:33:26 +0000 (08:33 +0900)]
ARM: shmobile: r7s72100: Add shmobile_init_late()

Extend r7s72100 SoC machine vector to include shmobile_init_late()
so Suspend-to-RAM and CPUIdle are setup as expected.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 9b0fd79af38cb1d68f5faf4fb528713116480e9f)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a73a4: Add shmobile_init_late()
Magnus Damm [Wed, 30 Jul 2014 23:33:08 +0000 (08:33 +0900)]
ARM: shmobile: r8a73a4: Add shmobile_init_late()

Extend r8a73a4 SoC machine vector to include shmobile_init_late()
so Suspend-to-RAM and CPUIdle are setup as expected.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 0592d1b5d296b0b6a24b7e48b7b48662164d3117)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7778: Fix shmobile_init_late()
Magnus Damm [Wed, 30 Jul 2014 23:32:50 +0000 (08:32 +0900)]
ARM: shmobile: r8a7778: Fix shmobile_init_late()

Fix r8a7778 SoC machine vector to include shmobile_init_late()
so Suspend-to-RAM and CPUIdle are setup and platform devices
are omitted as expected.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 7759a7a8e9b07a9046c1bdb2cd4c9ce197280392)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7779: Fix shmobile_init_late()
Magnus Damm [Wed, 30 Jul 2014 23:32:33 +0000 (08:32 +0900)]
ARM: shmobile: r8a7779: Fix shmobile_init_late()

Fix r8a7779 SoC machine vector to include shmobile_init_late()
so Suspend-to-RAM and CPUIdle are setup and platform devices
are omitted as expected.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit d5b00b90705d5fff53f611ba4746d79fedbb52be)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Conflicts:
arch/arm/mach-shmobile/setup-r8a7779.c

9 years agoARM: shmobile: sh73a0: Add shmobile_init_late()
Magnus Damm [Wed, 30 Jul 2014 23:32:15 +0000 (08:32 +0900)]
ARM: shmobile: sh73a0: Add shmobile_init_late()

Extend sh73a0 SoC machine vector to include shmobile_init_late()
so Suspend-to-RAM and CPUIdle are setup as expected.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit e604d80971e65c7ae895a4b38caed3838cf07554)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: kzm9g-reference: Remove unneeded nr_irqs initialization
Geert Uytterhoeven [Wed, 13 Aug 2014 11:56:58 +0000 (13:56 +0200)]
ARM: shmobile: kzm9g-reference: Remove unneeded nr_irqs initialization

As per arch_probe_nr_irqs(), the default value is NR_IRQS, which maps to
NR_IRQS_LEGACY if CONFIG_SPARSE_IRQ=y.

Since SPARSE_IRQ is selected by both ARCH_MULTIPLATFORM and
ARCH_SHMOBILE_LEGACY, it's always enabled on shmobile.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 3969d6490ba35b01f84bb12472c29c6029f7298b)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: kzm9g: Remove unneeded nr_irqs initialization
Geert Uytterhoeven [Wed, 13 Aug 2014 11:56:59 +0000 (13:56 +0200)]
ARM: shmobile: kzm9g: Remove unneeded nr_irqs initialization

As per arch_probe_nr_irqs(), the default value is NR_IRQS, which maps to
NR_IRQS_LEGACY if CONFIG_SPARSE_IRQ=y.

Since SPARSE_IRQ is selected by both ARCH_MULTIPLATFORM and
ARCH_SHMOBILE_LEGACY, it's always enabled on shmobile.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit f185a01b3877880135ea73ddfcec52bd9a4d4864)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: marzen: Remove NR_IRQS_LEGACY
Magnus Damm [Fri, 8 Aug 2014 11:49:13 +0000 (20:49 +0900)]
ARM: shmobile: marzen: Remove NR_IRQS_LEGACY

Remove NR_IRQS_LEGACY from the Marzen Reference code.
The Marzen Reference machine vector requires use of
Multiplatform, and in such case SPARSE_IRQ is enabled
by default. This in turns means that the default value
of .nr_irqs equals NR_IRQS and NR_IRQS_LEGACY. Because
of this we can simply remove NR_IRQS_LEGACY and move one
step closer to a cruft-free environment.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 322163c437b200b70ecb87ab102dfedce0ba0e91)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: ape6evm: Use shmobile_init_delay()
Magnus Damm [Wed, 30 Jul 2014 23:45:00 +0000 (08:45 +0900)]
ARM: shmobile: ape6evm: Use shmobile_init_delay()

The r8a73a4 DTS includes CPU Frequency information so
adjust the APE6EVM board code to use shmobile_init_delay()
instead of relying on CPU Frequency information included
in r8a73a4_init_delay() that is specified in C.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 911f7cec78af1445d4b0f5f79907cb5bd4522ce5)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: ape6evm: Add shmobile_init_late()
Magnus Damm [Wed, 30 Jul 2014 23:33:17 +0000 (08:33 +0900)]
ARM: shmobile: ape6evm: Add shmobile_init_late()

Extend board specific APE6EVM reference machine vectors to include
shmobile_init_late() so Suspend-to-RAM and CPUIdle are setup as expected.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 509c42a5fce00f8769f68847580ba3c4dc884218)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: bockw: Add shmobile_init_late()
Magnus Damm [Wed, 30 Jul 2014 23:32:59 +0000 (08:32 +0900)]
ARM: shmobile: bockw: Add shmobile_init_late()

Extend board specific Bock-W DT reference machine vector to include
shmobile_init_late() so Suspend-to-RAM and CPUIdle are setup as expected.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 6e15a3873aa9b4ab2980f781b05bfc5c99bf4b99)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: marzen: Add shmobile_init_late()
Magnus Damm [Wed, 30 Jul 2014 23:32:41 +0000 (08:32 +0900)]
ARM: shmobile: marzen: Add shmobile_init_late()

Extend board specific Marzen DT reference machine vector to include
shmobile_init_late() so Suspend-to-RAM and CPUIdle are setup as expected.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit b9c9281339376521d0feb78c9051fedfbb3cf111)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: kzm9g: Add shmobile_init_late()
Magnus Damm [Wed, 30 Jul 2014 23:32:24 +0000 (08:32 +0900)]
ARM: shmobile: kzm9g: Add shmobile_init_late()

Extend board specific KZM9D DT reference machine vector to include
shmobile_init_late() so Suspend-to-RAM and CPUIdle are setup as expected.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit eeed09e8116f9932b55aa284d109bdea1e2ddc46)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: defconfig: enable initrd
Kevin Hilman [Thu, 14 Aug 2014 00:07:15 +0000 (17:07 -0700)]
ARM: shmobile: defconfig: enable initrd

Enable initrd support.

Signed-off-by: Kevin Hilman <khilman@linaro.org>
[horms+renesas@verge.net.au: dropped enabling atag dtb compat]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 874ee23c83d888f8824305c277e047c7799f30b9)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r7s72100: Remove legacy board support
Laurent Pinchart [Wed, 2 Jul 2014 16:23:38 +0000 (18:23 +0200)]
ARM: shmobile: r7s72100: Remove legacy board support

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@verge.net.au: squashed in patch containing
 Makefile.boot change]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit ad8c3af8b75ff26c5c887f2101da653bdcd53a38)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r7s72100: genmai: Remove legacy board file
Laurent Pinchart [Wed, 2 Jul 2014 16:23:37 +0000 (18:23 +0200)]
ARM: shmobile: r7s72100: genmai: Remove legacy board file

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>
(cherry picked from commit 05104c266ae9a1673d92a068e2eeb0059db8c075)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Conflicts:
arch/arm/mach-shmobile/board-genmai.c

9 years agoARM: shmobile: r7s72100: genmai: Remove reference board file
Laurent Pinchart [Wed, 2 Jul 2014 16:23:36 +0000 (18:23 +0200)]
ARM: shmobile: r7s72100: genmai: Remove reference board file

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>
(cherry picked from commit 71d03dabd6d3141872e23effd00345afe2ea2dab)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: lager: add VIN1/ADV7180 device nodes
Ben Dooks [Tue, 12 Aug 2014 20:18:26 +0000 (00:18 +0400)]
ARM: shmobile: lager: add VIN1/ADV7180 device nodes

Add the Lager board specific device node part for VIN1 (composite video in);
add the device node for Analog Devices ADV7180 video decoder to IIC2 bus.
Add the necessary subnodes to interconnect VIN1 and ADV7180 devices.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
[Sergei: rebased, edited changelog and summary]
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit d594c9775409a4276133db5e34dbd791329c5eae)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7790: add VIN device nodes
Ben Dooks [Tue, 12 Aug 2014 20:16:18 +0000 (00:16 +0400)]
ARM: shmobile: r8a7790: add VIN device nodes

Add device nodes for the four video input controllers on the R8A7790.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
[Sergei: renamed VIN device nodes, edited changelog]
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 9f685bfc30edb4cba5d5ae142a9967cd0d74c40a)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7790 dtsi: Enable DMA for MSIOF
Geert Uytterhoeven [Wed, 6 Aug 2014 12:59:09 +0000 (14:59 +0200)]
ARM: shmobile: r8a7790 dtsi: Enable DMA for MSIOF

Add register sets used for access by the DMA engine, and DMA properties to
the MSIOF nodes.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit fbff66886b9c5f657b6649a264551ac572fae0b7)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7790 dtsi: Enable DMA for QSPI
Geert Uytterhoeven [Wed, 6 Aug 2014 12:59:08 +0000 (14:59 +0200)]
ARM: shmobile: r8a7790 dtsi: Enable DMA for QSPI

Add a DMA property to the QSPI node

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 37cf3d61a94790c6f12c6e6e7a28640b8531a8af)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7791 dtsi: Enable DMA for MSIOF
Geert Uytterhoeven [Wed, 6 Aug 2014 12:59:07 +0000 (14:59 +0200)]
ARM: shmobile: r8a7791 dtsi: Enable DMA for MSIOF

Add register sets used for access by the DMA engine, and DMA properties to
the MSIOF nodes.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit a5ce27f5f3285520496af0fe5282395ac07c4138)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7791 dtsi: Enable DMA for QSPI
Geert Uytterhoeven [Wed, 6 Aug 2014 12:59:06 +0000 (14:59 +0200)]
ARM: shmobile: r8a7791 dtsi: Enable DMA for QSPI

Add a DMA property to the QSPI node

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 591f2fa4eb0aae09cd76d276bb59e25824a7d408)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7791: Add DMAC devices to DT
Laurent Pinchart [Fri, 18 Jul 2014 23:50:25 +0000 (01:50 +0200)]
ARM: shmobile: r8a7791: Add DMAC devices to DT

Instantiate the two system DMA controllers in the r8a7791 device tree.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit fde8feefc489652749920f18123ad9e48b427c5e)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7790: Add DMAC devices to DT
Laurent Pinchart [Fri, 18 Jul 2014 23:50:24 +0000 (01:50 +0200)]
ARM: shmobile: r8a7790: Add DMAC devices to DT

Instantiate the two system DMA controllers in the r8a7790 device tree.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit b9fea49c79f23212ff21ef2f305ea4ae865db860)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7790: Add DMAC clocks to DT
Laurent Pinchart [Fri, 18 Jul 2014 23:50:23 +0000 (01:50 +0200)]
ARM: shmobile: r8a7790: Add DMAC clocks to DT

Add the SYS-DMAC0 and SYS-DMAC1 clocks to the MSTP2 clock node. They
will be used by the upcoming DMAC DT nodes.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit c819acdab3bf02795db6d16a17426e21c99c3c28)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: koelsch: add VIN1/ADV7180 DT support
sergei.shtylyov@cogentembedded.com [Wed, 6 Aug 2014 18:38:22 +0000 (22:38 +0400)]
ARM: shmobile: koelsch: add VIN1/ADV7180 DT support

Define the Koelsch board dependent part of the VIN1 device node. Add the device
node for Analog  Devices ADV7180  video decoder to  I2C2 bus. Add the necessary
subnodes to interconnect VIN1 and ADV7180 devices.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 2cf088105db14c00ad69df09b9b4a37c2370ff44)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: henninger: add VIN0/ADV7180 DT support
Sergei Shtylyov [Sat, 2 Aug 2014 00:05:54 +0000 (04:05 +0400)]
ARM: shmobile: henninger: add VIN0/ADV7180 DT support

Define the Henninger board dependent part of the VIN0 device node. Add the
device node for Analog Devices ADV7180 video decoder to I2C2  bus. Add the
necessary subnodes to interconnect VIN0 and ADV7180 devices.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 8d62f4f75320db5e95d3610547a26e4487c30742)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7791: add VIN DT support
Sergei Shtylyov [Sat, 2 Aug 2014 00:04:21 +0000 (04:04 +0400)]
ARM: shmobile: r8a7791: add VIN DT support

Define the generic R8A7791 parts of the VIN[0-2] device nodes. Add aliases for
the VIN[0-2] device nodes.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 0b8d1d579b4130f33a8776691453238839cb1973)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: marzen_defconfig: Enable missing hardware support
Geert Uytterhoeven [Thu, 14 Aug 2014 16:57:28 +0000 (18:57 +0200)]
ARM: shmobile: marzen_defconfig: Enable missing hardware support

Based on the DTS

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 6e3a4b191ee6db512c17197130b4e5170b3dabc3)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: lager_defconfig: Enable missing hardware support
Geert Uytterhoeven [Thu, 14 Aug 2014 16:57:27 +0000 (18:57 +0200)]
ARM: shmobile: lager_defconfig: Enable missing hardware support

Based on the DTS

Notes:
  - MTD_SPI_NOR is a dependency for MTD_M25P80 since commit
    03e296f613affcc2671c1e86d8c25ecad867204e ("mtd: m25p80: use the SPI
    nor framework") and commit e43b20619bdb6c851dd7b49cbd15e52875a785d4
    ("mtd: spi-nor: shorten Kconfig naming").

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 387ded8e60bcb6190492f90a3ef25e2bcb0a97a1)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: kzm9g_defconfig: Enable missing hardware support
Geert Uytterhoeven [Thu, 14 Aug 2014 16:57:26 +0000 (18:57 +0200)]
ARM: shmobile: kzm9g_defconfig: Enable missing hardware support

Based on the DTS

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 489610f3324dc1f94c816f4053215d7540871875)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: koelsch_defconfig: Enable missing hardware support
Geert Uytterhoeven [Thu, 14 Aug 2014 16:57:25 +0000 (18:57 +0200)]
ARM: shmobile: koelsch_defconfig: Enable missing hardware support

Based on the DTS

Notes:
  - MTD_SPI_NOR is a dependency for MTD_M25P80 since commit
    03e296f613affcc2671c1e86d8c25ecad867204e ("mtd: m25p80: use the SPI
    nor framework") and commit e43b20619bdb6c851dd7b49cbd15e52875a785d4
    ("mtd: spi-nor: shorten Kconfig naming").

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 1a194078571a0d060a230949cd1b4da259117ef0)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: bockw_defconfig: Enable missing hardware support
Geert Uytterhoeven [Thu, 14 Aug 2014 16:57:24 +0000 (18:57 +0200)]
ARM: shmobile: bockw_defconfig: Enable missing hardware support

Based on the DTS

Notes:
  - MTD_SPI_NOR is a dependency for MTD_M25P80 since commit
    03e296f613affcc2671c1e86d8c25ecad867204e ("mtd: m25p80: use the SPI
    nor framework") and commit e43b20619bdb6c851dd7b49cbd15e52875a785d4
    ("mtd: spi-nor: shorten Kconfig naming").

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 4f0c320be6164ab39af42867aa1ccf69475850b7)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: ape6evm_defconfig: Enable missing hardware support
Geert Uytterhoeven [Thu, 14 Aug 2014 16:57:23 +0000 (18:57 +0200)]
ARM: shmobile: ape6evm_defconfig: Enable missing hardware support

Based on the DTS

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 2815d447f6538d11d0fbe88a2f3418905922ca0d)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: shmobile_defconfig: Enable missing hardware support
Geert Uytterhoeven [Thu, 14 Aug 2014 16:57:22 +0000 (18:57 +0200)]
ARM: shmobile: shmobile_defconfig: Enable missing hardware support

Based on the DTSes

Notes:
  - MTD_SPI_NOR is a dependency for MTD_M25P80 since commit
    03e296f613affcc2671c1e86d8c25ecad867204e ("mtd: m25p80: use the SPI
    nor framework") and commit e43b20619bdb6c851dd7b49cbd15e52875a785d4
    ("mtd: spi-nor: shorten Kconfig naming"),
  - I2C_RIIC was enabled in the old genmai_defconfig.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 0f6442bef67d7f543d65d12e27006ceda8932b81)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7778: Add missing call to shmobile_init_late()
Geert Uytterhoeven [Wed, 13 Aug 2014 11:45:00 +0000 (13:45 +0200)]
ARM: shmobile: r8a7778: Add missing call to shmobile_init_late()

Add the missing call to shmobile_init_late() to r8a7778_init_late().
This should make sure Suspend-to-RAM and CPUIdle are setup as expected
on bockw.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 54a06dde40f6a01e323d49390d78b8c9f1dfacc0)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: genmai-reference: Enable MTU2 in device tree
Laurent Pinchart [Wed, 9 Jul 2014 13:12:44 +0000 (15:12 +0200)]
ARM: shmobile: genmai-reference: Enable MTU2 in device tree

No more device needs to be added from platform code when booting the
reference platform, move MTU2 registration from setup-r7s72100.c to
board-genmai.c and remove the now empty r7s72100_add_dt_devices()
function.

As the genmai_add_standard_devices() function is now identical to the
default init_machine implementation, remove it as well.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 9dddfcfacaadb5491b62233b893b510fa00da4e0)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Conflicts:
arch/arm/mach-shmobile/setup-r7s72100.c

9 years agoARM: shmobile: r7s72100: Add MTU2 device to DT
Laurent Pinchart [Wed, 9 Jul 2014 13:12:40 +0000 (15:12 +0200)]
ARM: shmobile: r7s72100: Add MTU2 device to DT

Add the MTU2 counter to the r7s72100 device tree and make it disabled by
default.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
[horms+renesas@verge.net.au correct irq number]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 9162d39ccb9400bfaed85630cf517c85861faa6f)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: marzen-reference: Enable TMU0 in device tree
Laurent Pinchart [Wed, 9 Jul 2014 13:12:43 +0000 (15:12 +0200)]
ARM: shmobile: marzen-reference: Enable TMU0 in device tree

No more device needs to be added from platform code when booting the
reference platform, remove the now empty
r8a7779_add_standard_devices_dt() function completely.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 5ecd7a5185008723056a4b70815aa017272ca751)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: koelsch-reference: Enable CMT0 in device tree
Laurent Pinchart [Wed, 9 Jul 2014 13:12:42 +0000 (15:12 +0200)]
ARM: shmobile: koelsch-reference: Enable CMT0 in device tree

No more device needs to be added from platform code when booting the
reference platform, remove the now empty r8a7791_add_dt_devices()
function completely.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 6a1d9460df90f96e31922ad5c891c5c54a4c7f4e)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: lager-reference: Enable CMT0 in device tree
Laurent Pinchart [Wed, 9 Jul 2014 13:12:41 +0000 (15:12 +0200)]
ARM: shmobile: lager-reference: Enable CMT0 in device tree

No more device needs to be added from platform code when booting the
reference platform, remove the now empty r8a7790_add_dt_devices()
function completely.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 247fd5ec6e9a41f9299df27be82104efc56e622b)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7779: Add TMU devices to DT
Laurent Pinchart [Wed, 9 Jul 2014 13:12:39 +0000 (15:12 +0200)]
ARM: shmobile: r8a7779: Add TMU devices to DT

Add the TMU0, TMU1 and TMU2 counters to the r8a7779 device tree and make
them disabled by default.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit ef890ea26a37884a21f592c3feccadb019e8a11b)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7791: Add CMT devices to DT
Laurent Pinchart [Wed, 9 Jul 2014 13:12:38 +0000 (15:12 +0200)]
ARM: shmobile: r8a7791: Add CMT devices to DT

Add the CMT0 and CMT1 counters to the r8a7791 device tree and make them
disabled by default.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit ceaa18949a190cf335408751cac0de2a0de0b9e7)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: r8a7790: Add CMT devices to DT
Laurent Pinchart [Wed, 9 Jul 2014 13:12:37 +0000 (15:12 +0200)]
ARM: shmobile: r8a7790: Add CMT devices to DT

Add the CMT0 and CMT1 counters to the r8a7790 device tree and make them
disabled by default.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
(cherry picked from commit 39cf6d73dc1ed11c7d5d2c96a0ccbbb868a7f3ce)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agowatchdog: iTCO_wdt: Fix the parent device
Jean Delvare [Wed, 5 Nov 2014 01:39:21 +0000 (09:39 +0800)]
watchdog: iTCO_wdt: Fix the parent device

The watchdog's parent is iTCO_wdt (the platform device) not lpc_ich
(the PCI device.) Setting the parent right makes it much easier for
the user to figure out which driver/module is handling the watchdog
device node.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
(cherry picked from commit c90789baa8cec363093c5ec292c989b6f22d8f32)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agowatchdog: fix checkpatch warnings and error
Jingoo Han [Wed, 5 Nov 2014 01:39:20 +0000 (09:39 +0800)]
watchdog: fix checkpatch warnings and error

Fix the following checkpatch warnings and error:
  WARNING: quoted string split across lines
  WARNING: braces {} are not necessary for single statement blocks
  WARNING: __initdata should be placed after ibmasr_id_table[]
  WARNING: please, no space before tabs
  ERROR: do not initialise statics to 0 or NULL

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
(cherry picked from commit 5f5e19093b2fa592720810154f15ffe51aa9277f)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agowatchdog: iTCO_wdt: Add support for v3 silicon
Peter Tyser [Wed, 5 Nov 2014 01:39:19 +0000 (09:39 +0800)]
watchdog: iTCO_wdt: Add support for v3 silicon

Some new Atom's, eg Avoton and Bay Trail, have slightly different iTCO
functionality:
- The watchdog timer ticks at 1 second instead of .6 seconds

- Some 8 and 16-bit registers were combined into 32-bit registers

- Some registers were removed (DAT_IN, DAT_OUT, MESSAGE)

- The BOOT_STS field in TCO_STS was removed

- The NO_REBOOT bit is in the PMC area instead of GCS

Update the driver to support the above changes and bump the version to
1.11.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit 24b3a1670b47e75be633ae0b5c07945c446f9d29)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Add Device IDs for Intel 9 Series PCH
James Ralston [Wed, 5 Nov 2014 01:39:18 +0000 (09:39 +0800)]
mfd: lpc_ich: Add Device IDs for Intel 9 Series PCH

This patch adds the LPC Device IDs for the Intel 9 Series PCH.

Signed-off-by: James Ralston <james.d.ralston@intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit fea31042ff613145c7784e2ce454bf3c151b97ba)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Add PCI ID for Intel Braswell
Alan Cox [Wed, 5 Nov 2014 01:39:17 +0000 (09:39 +0800)]
mfd: lpc_ich: Add PCI ID for Intel Braswell

This is the same as used in Baytrail so add the new PCI ID to the driver's
list of supported IDs.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit ff0c9da013d2c9f1ec232926a54e536ab48c6678)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Enable GPIO for Panther Point
Guenter Roeck [Wed, 5 Nov 2014 01:39:16 +0000 (09:39 +0800)]
mfd: lpc_ich: Enable GPIO for Panther Point

Panther Point PCH GPIO configuration is similar to V5 PCHs.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit 62cf2cdb99c7e870ab857bdd617e728790f8c43c)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Add support for Intel Bay Trail SoC
Peter Tyser [Wed, 5 Nov 2014 01:39:15 +0000 (09:39 +0800)]
mfd: lpc_ich: Add support for Intel Bay Trail SoC

This patch adds the LPC Controller Device IDs for Watchdog and GPIO for
the Intel Bay Trail Atom SoC.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit 6111ec70357022ccd037399c13f69900431850b4)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Add support for NM10 GPIO
Peter Tyser [Wed, 5 Nov 2014 01:39:14 +0000 (09:39 +0800)]
mfd: lpc_ich: Add support for NM10 GPIO

The NM10's GPIO is compatible with ICH v7 GPIO.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Dan Weinlader <danw@vs-networks.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit 117bbfe25cfc2e968be1f7976ac460a5cd3d734e)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Change Avoton to iTCO v3
Peter Tyser [Wed, 5 Nov 2014 01:39:13 +0000 (09:39 +0800)]
mfd: lpc_ich: Change Avoton to iTCO v3

The register layout of the Avoton is compatible with the iTCO v3
register layout.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit c48cf59878685cc06b71bb2a3ca17b61103c8de7)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Add support for iTCO v3
Peter Tyser [Wed, 5 Nov 2014 01:39:12 +0000 (09:39 +0800)]
mfd: lpc_ich: Add support for iTCO v3

Some newer Atom CPUs, eg Avoton and Bay Trail, use slightly different
register layouts for the iTCO than the current v1 and v2 iTCO.
Differences from previous iTCO versions include:
- The ACPI space is enabled in the "ACPI base address" register instead
  of the "ACPI control register"

- The "no reboot" functionality is set in the "Power Management
  Configuration" register instead of the "General Control and Status"
  (GCS) register or PCI configuration space.

- The "ACPI Control Register" is not present on v3.  The "Power
  Management Configuration Base Address" register resides at the same
  address is Avoton/Bay Trail.

To differentiate these newer chipsets create a new v3 iTCO version and
update the MFD driver to support them.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit eb71d4dec4a5e010e34b9d7afdb5af41884c388e)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Remove lpc_ich_cfg struct use
Peter Tyser [Wed, 5 Nov 2014 01:39:11 +0000 (09:39 +0800)]
mfd: lpc_ich: Remove lpc_ich_cfg struct use

Future chipsets will use different register layouts that don't map
cleanly to the lpc_ich_cfg fields.  Remove the lpc_ich_cfg struct and
add explicit fields to the higher level lpc_ich_priv structure.

This change should have no functional impact.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit 429b941abd503c8936e116c819362323aafdbd50)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Only configure watchdog or GPIO when present
Peter Tyser [Wed, 5 Nov 2014 01:39:10 +0000 (09:39 +0800)]
mfd: lpc_ich: Only configure watchdog or GPIO when present

Some chipsets don't currently have GPIO support enabled.  For these
chipsets don't go through the process of initializing the GPIO region.

Make the same change for the watchdog initialization for chipsets which
may not enable the WDT in the future.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit f0776b8ce03ceb638c51b62f324844c71c446600)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Fix ACPI enable bitmask
Peter Tyser [Wed, 5 Nov 2014 01:39:09 +0000 (09:39 +0800)]
mfd: lpc_ich: Fix ACPI enable bitmask

The original bitmask of 0x10 was incorrect and would result in a write
to a reserved read-only bit instead of enabling the ACPI I/O
region.  Update it to the proper value of 0x80.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Rajat Jain <rajatjain@juniper.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit f5dccb15877b82a40950c6f752d5345c86189fc9)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Add support for Intel Avoton GPIOs
Vincent Donnefort [Wed, 5 Nov 2014 01:39:08 +0000 (09:39 +0800)]
mfd: lpc_ich: Add support for Intel Avoton GPIOs

Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit facd9939403cb5769190054a600474399e776e3a)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: lpc_ich: Convert ICH GPIOs IDs to enum
Vincent Donnefort [Wed, 5 Nov 2014 01:39:07 +0000 (09:39 +0800)]
mfd: lpc_ich: Convert ICH GPIOs IDs to enum

All those IDs are arbitrary and so can be encapsulated into an enumeration.

Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit 6cec365e3eba3dd8c864056d8d3fd9e73ab8dd7a)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agomfd: Delete non-required instances of include <linux/init.h>
Paul Gortmaker [Wed, 5 Nov 2014 01:39:06 +0000 (09:39 +0800)]
mfd: Delete non-required instances of include <linux/init.h>

None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit 3c699105d0376c14940ce7cf561754a94cdff8dd)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agoi2c: i801: Add PCI ID for Intel Braswell
Alan Cox [Tue, 4 Nov 2014 08:55:25 +0000 (16:55 +0800)]
i2c: i801: Add PCI ID for Intel Braswell

The SMBus host controller is the same as used in Baytrail so add the new
PCI ID to the driver's list of supported IDs.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit 39e8e30ee544a62c148033d64a979028b958ca05)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agoi2c: i801: Add device ID for Intel Wildcat Point PCH
Jean Delvare [Tue, 4 Nov 2014 08:55:24 +0000 (16:55 +0800)]
i2c: i801: Add device ID for Intel Wildcat Point PCH

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit b299de839157852c563b9f133c8b7e630545a9c3)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agoi2c: i801: Fix the alignment of the device table
Jean Delvare [Tue, 4 Nov 2014 08:55:23 +0000 (16:55 +0800)]
i2c: i801: Fix the alignment of the device table

A long name broke the alignment, shift the columns a bit to fix it and
make the table look nice again. While we're here, switch to the
standard comment style to make checkpatch happy, and use tabs instead
of spaces for column alignment.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit ce3161106ab57afbfbe1c33d95bf4a569405983a)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agoi2c: remove DEFINE_PCI_DEVICE_TABLE macro
Jingoo Han [Tue, 4 Nov 2014 08:55:22 +0000 (16:55 +0800)]
i2c: remove DEFINE_PCI_DEVICE_TABLE macro

Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is not preferred.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit 392debf11656dedd79da44416747d5b2b1747f5e)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agopwm: lpss: use c99 initializers in structures
Julia Lawall [Wed, 29 Oct 2014 00:52:58 +0000 (08:52 +0800)]
pwm: lpss: use c99 initializers in structures

Use c99 initializers for structures.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@decl@
identifier i1,fld;
type T;
field list[n] fs;
@@

struct i1 {
 fs
 T fld;
 ...};

@bad@
identifier decl.i1,i2;
expression e;
initializer list[decl.n] is;
@@

struct i1 i2 = { is,
+ .fld = e
- e
 ,...};
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
[thierry.reding: rebased and applied same fix for Braswell]
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit b2b7adeb21745266326d453b95e5d0b1b9cb1d4e)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agopwm: lpss: Fix build failure on PowerPC
Thierry Reding [Wed, 29 Oct 2014 00:52:57 +0000 (08:52 +0800)]
pwm: lpss: Fix build failure on PowerPC

An x86 build seems to pull in the linux/io.h include indirectly. On
PowerPC that doesn't happen and the build breaks due to the readl() and
writel() functions not being declared. Fix this by explicitly including
linux/io.h.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit e0c86a3b63e948e51a47d17382c7cd8711d19750)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agopwm: lpss: Properly split driver to parts
Andy Shevchenko [Wed, 29 Oct 2014 00:52:56 +0000 (08:52 +0800)]
pwm: lpss: Properly split driver to parts

The driver consists of core, PCI, and platform parts. It would be better
to split them into separate files.

The platform driver is now called pwm-lpss-platform. Thus, previously
set CONFIG_PWM_LPSS=m is not enough to build it. But we are on the safe
side since it seems no one from outside Intel is using it for now.

While here, move to use macros module_pci_driver() and
module_platform_driver().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Alan Cox <alan@linux.intel.com>
[thierry.reding: change select to depends on PWM_LPSS, cleanup]
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit c558e39e14c2372394f49e07fbe94e9708b615cb)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agopwm: lpss: Add ACPI and PCI IDs for Intel Braswell
Alan Cox [Wed, 29 Oct 2014 00:52:55 +0000 (08:52 +0800)]
pwm: lpss: Add ACPI and PCI IDs for Intel Braswell

This is pretty much the same as Baytrail PWM. Only difference is that the
input clock runs on different frequency.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit 373c57829a3f9da1405b1fbd3d17e50f8e1f476e)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agopwm: lpss: remove dependency on clk framework
Heikki Krogerus [Wed, 29 Oct 2014 00:52:54 +0000 (08:52 +0800)]
pwm: lpss: remove dependency on clk framework

Unlike other Intel LPSS devices, the PWM does not have the
clock dividers or the gate. All we get from the clock is the
rate. Since PCI case uses the driver data to get the rate,
we can drop the clk and use the same data also in case of
ACPI. The frequency is the same.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Chew, Chiau Ee <chiau.ee.chew@intel.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit 65accd87381ed96bf8893124b149bae08edd2740)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agopwm: lpss: Fix const qualifier and sparse warnings
Thierry Reding [Wed, 29 Oct 2014 00:52:53 +0000 (08:52 +0800)]
pwm: lpss: Fix const qualifier and sparse warnings

Fixes the following warnings reported by the 0-DAY kernel build testing
backend:

   drivers/pwm/pwm-lpss.c: In function 'pwm_lpss_probe_pci':
>> drivers/pwm/pwm-lpss.c:192:2: warning: passing argument 3 of 'pwm_lpss_probe' discards 'const' qualifier from pointer target type [enabled by default]
     lpwm = pwm_lpss_probe(&pdev->dev, &pdev->resource[0], info);
     ^
   drivers/pwm/pwm-lpss.c:130:30: note: expected 'struct pwm_lpss_boardinfo *' but argument is of type 'const struct pwm_lpss_boardinfo *'
    static struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev,
                                 ^
>> drivers/pwm/pwm-lpss.c:143:28: sparse: incorrect type in return expression (different address spaces)
   drivers/pwm/pwm-lpss.c:143:28:    expected struct pwm_lpss_chip *
   drivers/pwm/pwm-lpss.c:143:28:    got void [noderef] <asn:2>*regs
>> drivers/pwm/pwm-lpss.c:192:63: sparse: incorrect type in argument 3 (different modifiers)
   drivers/pwm/pwm-lpss.c:192:63:    expected struct pwm_lpss_boardinfo *info
   drivers/pwm/pwm-lpss.c:192:63:    got struct pwm_lpss_boardinfo const *[assigned] info
   drivers/pwm/pwm-lpss.c: In function 'pwm_lpss_probe_pci':
   drivers/pwm/pwm-lpss.c:192:2: warning: passing argument 3 of 'pwm_lpss_probe' discards 'const' qualifier from pointer target type [enabled by default]
     lpwm = pwm_lpss_probe(&pdev->dev, &pdev->resource[0], info);
     ^
   drivers/pwm/pwm-lpss.c:130:30: note: expected 'struct pwm_lpss_boardinfo *' but argument is of type 'const struct pwm_lpss_boardinfo *'
    static struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev,
                                 ^

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit 89c0339e0aa097384b3efed894b23820814c21d3)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agopwm: lpss: Add support for PCI devices
Alan Cox [Wed, 29 Oct 2014 00:52:52 +0000 (08:52 +0800)]
pwm: lpss: Add support for PCI devices

Not all systems enumerate the PWM devices via ACPI. They can also be
exposed via the PCI interface.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Chew, Chiau Ee <chiau.ee.chew@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit 093e00bb3f82f3c67e2d1682e316fc012bcd0d92)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agopwm: add support for Intel Low Power Subsystem PWM
Mika Westerberg [Wed, 29 Oct 2014 00:52:51 +0000 (08:52 +0800)]
pwm: add support for Intel Low Power Subsystem PWM

Add support for Intel Low Power I/O subsystem PWM controllers found on
Intel BayTrail SoC.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Chew, Kean Ho <kean.ho.chew@intel.com>
Signed-off-by: Chang, Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Signed-off-by: Chew, Chiau Ee <chiau.ee.chew@intel.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit d16a5aa9e821633a3095d7a88cd1d2cd108bf966)

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
9 years agoof/fdt: update of_get_flat_dt_prop in prep for libfdt
Rob Herring [Wed, 2 Apr 2014 04:49:03 +0000 (23:49 -0500)]
of/fdt: update of_get_flat_dt_prop in prep for libfdt

Make of_get_flat_dt_prop arguments compatible with libfdt fdt_getprop
call in preparation to convert FDT code to use libfdt. Make the return
value const and the property length ptr type an int.

Signed-off-by: Rob Herring <robh@kernel.org>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Stephen Chivers <schivers@csc.com>
(cherry picked from commit 9d0c4dfedd96ee54fc075b16d02f82499c8cc3a6)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Conflicts:
arch/arm/plat-samsung/s5p-dev-mfc.c
arch/powerpc/platforms/powernv/opal.c
drivers/of/fdt.c
drivers/of/of_reserved_mem.c

9 years agoclk: add clock-indices support
Ben Dooks [Thu, 13 Feb 2014 18:02:49 +0000 (18:02 +0000)]
clk: add clock-indices support

Add a property called clock-indices to allow clock-output-names
to be used where the index used to lookup a clock is not a 1:1
mapping to the array position in the clock-output-names

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
(cherry picked from commit 7a0fc1a3df82d29e00b4c9f88a6b37450d6711f1)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoi2c: rcar: fix RCAR_IRQ_ACK_{RECV|SEND}
Sergei Shtylyov [Fri, 5 Sep 2014 23:34:32 +0000 (03:34 +0400)]
i2c: rcar: fix RCAR_IRQ_ACK_{RECV|SEND}

Bits 8-31 of all registers reflect the value of bits 0-7 on reads and should be
0 on writes, according to the manuals. RCAR_IRQ_ACK_{RECV|SEND} macros have all
1's in bits 8-31, thus going against the manuals, so fix them.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: stable@vger.kernel.org
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit 938916fbb8e8cb67eacb784f4eda17e2950c16c5)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agousb: renesas_usbhs: fix the usb_pkt_pop()
Yoshihiro Shimoda [Fri, 22 Aug 2014 11:14:28 +0000 (20:14 +0900)]
usb: renesas_usbhs: fix the usb_pkt_pop()

This patch fixes the usb_pkt_pop(). If a gadget driver calls
usb_ep_dequeue(), this driver will call the usb_pkt_pop().
So, the usb_pkt_pop() should cancel the transaction.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit 2743e7f90dc08282d027dbc2f6486f5cb85aa493)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agousb: renesas_usbhs: fix the condition of is_done in usbhsf_dma_push_done
Yoshihiro Shimoda [Fri, 22 Aug 2014 11:14:10 +0000 (20:14 +0900)]
usb: renesas_usbhs: fix the condition of is_done in usbhsf_dma_push_done

This patch fixes the condition of is_done in usbhsf_dma_push_done().
This function will be called after a transmission finished by DMAC.
So, the function should check if the transmission packet is short packet
or not. Also the function should call try_run to send the zero packet
by the pio handler if the "*is_done" is not set. Otherwize, the
transaction will not finish if a gadget driver sets the "zero" flag
in a transmission.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit c0ed8b23b257a84d103764cdbd490ee5e2749da3)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agousb: renesas_usbhs: protect mod->irq_{bemp,brdy}sts by spin lock
Yoshihiro Shimoda [Fri, 22 Aug 2014 11:14:00 +0000 (20:14 +0900)]
usb: renesas_usbhs: protect mod->irq_{bemp,brdy}sts by spin lock

This patch protects the mod->irq_bempsts and mod->irq_brdysts by
spin lock in the usbhs_status_get_each_irq() because other functions
will write them during spin lock. Otherwise, the driver will clears
the BRDYSTS and/or BEMPSTS wrongly, and then, the transaction will not
finish.
Also since the driver should use the INTSTS0 and BRDYSTS and BEMPSTS
as the same timing, the patch protects them.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit c4d8199ba1a7aa390b06db23f4532e2c1875aefb)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agousb: renesas_usbhs: fix the behavior of some usbhs_pkt_handle
Yoshihiro Shimoda [Fri, 22 Aug 2014 11:13:50 +0000 (20:13 +0900)]
usb: renesas_usbhs: fix the behavior of some usbhs_pkt_handle

Some gadget drivers will call usb_ep_queue() more than once before
the first queue doesn't finish. However, this driver didn't handle
it correctly. So, this patch fixes the behavior of some
usbhs_pkt_handle using the "running" flag. Otherwise, the oops below
happens if we use g_ncm driver and when the "iperf -u -c host -b 200M"
is running.

Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 80000007 [#1] SMP ARM
Modules linked in: usb_f_ncm g_ncm libcomposite u_ether
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W      3.17.0-rc1-00008-g8b2be8a-dirty #20
task: c051c7e0 ti: c0512000 task.ti: c0512000
PC is at 0x0
LR is at usbhsf_pkt_handler+0xa8/0x114
pc : [<00000000>]    lr : [<c0278fb4>]    psr: 60000193
sp : c0513ce8  ip : c0513c58  fp : c0513d24
r10: 00000001  r9 : 00000193  r8 : eebec4a0
r7 : eebec410  r6 : eebe0c6c  r5 : 00000000  r4 : ee4a2774
r3 : 00000000  r2 : ee251e00  r1 : c0513cf4  r0 : ee4a2774

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit 8355b2b3082d302091506703d2e4e239f7deed7f)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agonet: sh_eth: fix driver dependencies
Bartlomiej Zolnierkiewicz [Mon, 1 Sep 2014 14:25:35 +0000 (16:25 +0200)]
net: sh_eth: fix driver dependencies

Renesas SuperH Ethernet support should be available only on
Renesas ARM SoCs and SuperH architecture.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit f6ec9c335b502d8011971d07508589d212cb3c93)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoASoC: rcar: Use && instead of & for boolean expressions
Lars-Peter Clausen [Sun, 17 Aug 2014 14:18:19 +0000 (16:18 +0200)]
ASoC: rcar: Use && instead of & for boolean expressions

Sparse spits out the following warning:
sound/soc/sh/rcar/gen.c:250:21: warning: dubious: x & !y

It does this because sometimes mixing boolean and bit-wise logic has not the
intended result. In this case we are fine, but replacing the bit-wise '&' with
the boolean '&&' silences the sparse warning. The generated code for both cases
is the same.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit c8e6e960733f4a5835265c15429fced4d2f1595e)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>