ARM: shmobile: r8a7778: cleanup registration of usb phy
usb phy driver which needs platform data at the time of
registration is used from BockW only.
Now, ARM/shmobile aims to support DT,
and the C code base board support will be removed
if DT support is completed.
Current driver registration method which needs platform data
and which is not shared complicates codes.
This means legacy C code cleanup after DT supporting
will be more complicated
This patch registers it on board code as cleanup C code
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: r8a7778: cleanup registration of mmcif
sh_mmcif driver which needs platform data at the time of
registration is used from BockW only.
Now, ARM/shmobile aims to support DT,
and the C code base board support will be removed
if DT support is completed.
Current driver registration method which needs platform data
and which is not shared complicates codes.
This means legacy C code cleanup after DT supporting
will be more complicated
This patch registers it on board code as cleanup C code
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Simon Horman [Tue, 6 Aug 2013 07:50:11 +0000 (16:50 +0900)]
ARM: shmobile: lager: enable nfsroot in DTS
Now that Ether support has been added to the lager board
it is possible to use nfsroot. This configuration is
in line with that of other shmobile boards.
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: Mount root file systems in r/w mode for all DT platforms
The shmobile DT files available in the kernel are reference
implementations intended to be used as sample code, as well as for
development. As such, it makes sense to mount the root file system in
read/write mode by default.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Magnus Damm [Wed, 24 Jul 2013 07:30:42 +0000 (16:30 +0900)]
ARM: shmobile: marzen: Switch to DT_MACHINE_START
Convert the marzen board to use DT_MACHINE_START. With this in
place all mach-shmobile boards use DT_MACHINE_START. Also, this
makes it possible for the r8a7779 SMP code to use DT for CPUs.
Signed-off-by: Magnus Damm <damm@opensource.se>
[horms+renesas@verge.net.au: Select USE_OF in Kconfig]
[horms+renesas@verge.net.au: Provide dt_compat in DT_MACHINE_START] Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: r8a7779: cleanup registration of usb phy
usb phy driver which needs platform data at the time of
registration is used from Marzen only.
Now, ARM/shmobile aims to support DT,
and the C code base board support will be removed
if DT support is completed.
Current driver registration method which needs platform data
and which is not shared complicates codes.
This means legacy C code cleanup after DT supporting
will be more complicated
This patch registers it on board code as cleanup C code
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
This patch adds a sample DT-based Bock-W "reference" implementation.
The use of platform-specific C-code should be avoided
with this configuration as much as possible.
This patch adds new r8a7778_add_dt_devices() which was same stance
of r8a7790_add_dt_devices()
Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Magnus Damm [Tue, 9 Jul 2013 10:39:52 +0000 (19:39 +0900)]
ARM: shmobile: No need to use INTC header on r8a7779
Now when the intc-irqpin driver is used for external
IRQ pins on r8a7779 it possible to get rid of unused
INTC headers mach/intc.h and linux/sh_intc.h.
Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Magnus Damm [Tue, 9 Jul 2013 10:40:08 +0000 (19:40 +0900)]
ARM: shmobile: No need to use INTC demux on r8a7740
Now when the r8a7740 code has been converted to make use of
GIC instead of INTC for root interrupt controller it is
possible to exclude the low level INTC demux function
shmobile_handle_irq_intc from linking.
Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Magnus Damm [Wed, 24 Jul 2013 03:53:15 +0000 (12:53 +0900)]
ARM: shmobile: r8a73a4: Remove ->init_machine() special case
No need to special case r8a73a4 ->init_machine(),
so get rid of undesired cpufreq platform device
from the generic long term r8a73a4 DT support code.
For short term support on APE6EVM the DT reference
implementation already adds a "cpufreq-cpu0" platform
device so that can be used for development.
Regarding more long term cpufreq support, perhaps
it makes sense to adjust the cpufreq driver to check
for DT information directly instead of using a
platform device for software configuration and DT
for hardware parameters.
Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Simon Horman [Fri, 28 Jun 2013 04:42:16 +0000 (13:42 +0900)]
ARM: shmobile: lager: Add DT reference
This is sufficient to allow boot of the Lager board with
a console without boards-lager.c compiled into the kernel.
This is an example of a minimal but still useful initialisation
of the board using DT as much as possible.
As such it is the same as the boot of Lager that can be achieved
without a board file. The intention of adding this file
is to facilitate further work to allow board specific devices to be
initialised via DT.
Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
This patch adds a sample DT-based APE6EVM "reference" implementation. The
use of platform-specific C-code should be avoided with this configuration
as much as possible.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Magnus Damm [Thu, 11 Jul 2013 16:22:29 +0000 (01:22 +0900)]
ARM: shmobile: Setup r8a7790 arch timer based on MD pins
Update the r8a7790 arch timer setup code to configure the
frequency dynamically at boot time. This means that the arch
timer driver will be able to detect a timer frequency that
has been calculated based on the MD pins instead of a fixed
and potentially incorrect 13 MHz.
With this patch applied the Linux kernel will correctly
support the r8a7790 Lager board that uses a 20 Mhz EXTAL.
The arch timer will operate on 10 MHz and the Linux arch
timer driver will be correctly configured to use 10 MHz.
Without this patch the 20 MHz EXTAL will be used to drive
the arch timer at 10 MHz, but the Linux arch timer driver
will believe it is counting at 13 Mhz.
Reported-by: Ulrich Hecht <ulrich.hecht@gmail.com> Signed-off-by: Magnus Damm <damm@opensource.se> Tested-by: Ulrich Hecht <ulrich.hecht@gmail.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Magnus Damm [Fri, 28 Jun 2013 11:27:04 +0000 (20:27 +0900)]
ARM: shmobile: Add r8a7790 CMT00 clock event
Add clock event support for CMT0 timer channel 0
to the r8a7790 SoC code. On most ARM mach-shmobile
the CMT is hooked up to a 32KHz clock but on r8a7790
a 31.7KHz clock is instead used.
Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Magnus Damm [Fri, 28 Jun 2013 10:13:27 +0000 (19:13 +0900)]
ARM: shmobile: Sort r8a7790 MSTP entries
The r8a7790 MSTP bits should be kept sorted in the same way
as on other mach-shmobile SoCs. Move the HSCIF and thermal
bits to clean up the current state.
Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
The Z2 clock on r8a73a4 is used to clock the 4 Cortex A7 cores on the SoC.
Add a definition for this clock to later use it from the arm_big_little
CPUFreq driver.
ARM: shmobile: r8a73a4: safeguard against wrong clk_set_rate() uses
clk_set_rate() should only be called with exact rates, returned by
clk_round_rate(). However, it is still good to verify, that the value,
passed to clock's .set_rate() method is at least valid. This patch adds
such a check for the Z-clock on r8a73a4.
ARM: shmobile: r8a73a4: implement CPU clock scaling for CPUFreq
This patch adds support for the Z-clock on r8a73a4 SoCs, which is driving
the Cortex A15 core, and a "cpufreq-cpu0" platform device. Adding an
"operating-points" property to the CPU0 DT node and a regulator, this
patch allows platforms to use the generic cpufreq-cpu0 driver to use
SoC's DVFS capabilities.
ARM: shmobile: r8a73a4: wait for completion when kicking the clock
To reconfigure clocks, controlled by FRQCRA and FRQCRB, a kick bit has to
be set and to make sure the setting has taken effect, it has to be read
back repeatedly until it is cleared by the hardware. This patch adds the
waiting part, that was missing until now.
Magnus Damm [Mon, 8 Jul 2013 06:00:30 +0000 (15:00 +0900)]
ARM: shmobile: KZM9D DT reference implementation
Add a DT reference implementation for the KZM9D board.
Only DT devices are used in this case. UART, STI, GPIO
and SMP / GIC are all provided by emev2.dtsi.
There is still a board specific C file used for enabling
legacy SH clocks. This file will be removed after we have
moved over to common clocks.
Signed-off-by: Magnus Damm <damm@opensource.se>
[horms+renesas@verge.net.au: Do not include trailing blank line in
board-kzm9d-reference.c ] Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: r8a7790: add MMCIF and SDHI DT templates
This adds DT templates for all MMCIF and SDHI controllers on r8a7790.
They are added with status="disabled". To use them platform-specific
DTs have to enable the required ones.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
ARM: shmobile: r8a73a4: add MMCIF and SDHI DT templates
This adds DT templates for all MMCIF and SDHI controllers on r8a73a4.
They are added with status="disabled". To use them platform-specific
DTs have to enable the required ones.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Magnus Damm [Tue, 2 Jul 2013 09:27:41 +0000 (18:27 +0900)]
ARM: shmobile: Update KZM9D dts command line
Update the KZM9D DTS command line to remove following cruft:
- console=tty0 - no graphic support upstream anyway
- earlyprintk= - not supported by the 8250-em driver anyway
- mem= - this is provided via DT anyway
Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
This patch removes r8a7778_init_irq(), since no-one is using it.
And now, there is no reason to have r8a7778_init_irq_common().
r8a7778_init_irq_dt() includes it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Magnus Damm [Tue, 2 Jul 2013 09:27:49 +0000 (18:27 +0900)]
ARM: shmobile: Make EMEV2 platform devices more compact
Convert the EMEV2 SoC device setup code from using very
verbose resources and static platform devices to the
same style as more recent boards. This reduces the size
of the code.
Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Magnus Damm [Tue, 2 Jul 2013 09:27:33 +0000 (18:27 +0900)]
ARM: shmobile: Remove unused EMEV2/KZM9D early console
Remove EMEV2 early console code from KZM9D and instead
rely on console setup during regular platform device
probe time. This makes the DT code and the KZM9D board
support behave the same.
Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Magnus Damm [Mon, 1 Jul 2013 06:01:40 +0000 (15:01 +0900)]
ARM: shmobile: kzm9g: Remove init_irq declaration in machine description
Remove redundant irqchip_init() callback. The default case
of NULL will result in invoking irqchip_init() anyway.
Signed-off-by: Magnus Damm <damm@opensource.se>
[ horms+renesas@verge.net.au: Trimmed patch to remove portion
that updates the sh73a0 SoC and altered the subject to
use the same format as the patch that updates the sh73a0. ] Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Maxime Ripard [Mon, 27 May 2013 09:00:49 +0000 (18:00 +0900)]
ARM: shmobile: sh73a0: Remove init_irq declaration in machine description
Commit ebafed7a ("ARM: irq: Call irqchip_init if no init_irq function is
specified") removed the need to explictly setup the init_irq field in
the machine description when using only irqchip_init. Remove that
declaration for shmobile as well.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Magnus Damm [Mon, 1 Jul 2013 06:01:31 +0000 (15:01 +0900)]
ARM: shmobile: lager: Remove init_irq declaration in machine description
Remove redundant irqchip_init() callback. The default case
of NULL will result in invoking irqchip_init() anyway.
Signed-off-by: Magnus Damm <damm@opensource.se>
[ horms+renesas@verge.net.au: Trimmed patch to remove portion
that updates the r8a7790 SoC and altered the subject to
use the same format as the patch that updates the r8a7790. ] Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Maxime Ripard [Mon, 27 May 2013 09:00:22 +0000 (18:00 +0900)]
ARM: shmobile: r8a7790: Remove init_irq declaration in machine description
Commit ebafed7a ("ARM: irq: Call irqchip_init if no init_irq function is
specified") removed the need to explictly setup the init_irq field in
the machine description when using only irqchip_init. Remove that
declaration for shmobile as well.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Magnus Damm [Mon, 1 Jul 2013 06:01:21 +0000 (15:01 +0900)]
ARM: shmobile: ape6evm: Remove init_irq declaration in machine description
Remove redundant irqchip_init() callback. The default case
of NULL will result in invoking irqchip_init() anyway.
Signed-off-by: Magnus Damm <damm@opensource.se>
[ horms+renesas@verge.net.au: Trimmed patch to remove portion
that updates the r8a73a4 SoC and altered the subject to
use the same format as the patch that updates the r8a73a4. ] Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Maxime Ripard [Sun, 26 May 2013 13:05:56 +0000 (22:05 +0900)]
ARM: shmobile: r8a73a4: Remove init_irq declaration in machine description
Commit ebafed7a ("ARM: irq: Call irqchip_init if no init_irq function is
specified") removed the need to explictly setup the init_irq field in
the machine description when using only irqchip_init. Remove that
declaration for shmobile as well.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Maxime Ripard [Sun, 26 May 2013 13:05:23 +0000 (22:05 +0900)]
ARM: shmobile: emev2: Remove init_irq declaration in machine description
Commit ebafed7a ("ARM: irq: Call irqchip_init if no init_irq function is
specified") removed the need to explictly setup the init_irq field in
the machine description when using only irqchip_init. Remove that
declaration for shmobile as well.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Merge branch 'slab/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux
Pull slab update from Pekka Enberg:
"Highlights:
- Fix for boot-time problems on some architectures due to
init_lock_keys() not respecting kmalloc_caches boundaries
(Christoph Lameter)
- CONFIG_SLUB_CPU_PARTIAL requested by RT folks (Joonsoo Kim)
- Fix for excessive slab freelist draining (Wanpeng Li)
- SLUB and SLOB cleanups and fixes (various people)"
I ended up editing the branch, and this avoids two commits at the end
that were immediately reverted, and I instead just applied the oneliner
fix in between myself.
* 'slab/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux
slub: Check for page NULL before doing the node_match check
mm/slab: Give s_next and s_stop slab-specific names
slob: Check for NULL pointer before calling ctor()
slub: Make cpu partial slab support configurable
slab: add kmalloc() to kernel API documentation
slab: fix init_lock_keys
slob: use DIV_ROUND_UP where possible
slub: do not put a slab to cpu partial list when cpu_partial is 0
mm/slub: Use node_nr_slabs and node_nr_objs in get_slabinfo
mm/slub: Drop unnecessary nr_partials
mm/slab: Fix /proc/slabinfo unwriteable for slab
mm/slab: Sharing s_next and s_stop between slab and slub
mm/slab: Fix drain freelist excessively
slob: Rework #ifdeffery in slab.h
mm, slab: moved kmem_cache_alloc_node comment to correct place
Now, this uses SLUB pretty much unmodified, but as it is the -rt kernel
with CONFIG_PREEMPT_RT set, spinlocks are mutexes, although they do
disable migration. But the SLUB code is relatively lockless, and the
spin_locks there are raw_spin_locks (not converted to mutexes), thus I
believe this bug can happen in mainline without -rt features. The -rt
patch is just good at triggering mainline bugs ;-)
Anyway, looking at where this crashed, it seems that the page variable
can be NULL when passed to the node_match() function (which does not
check if it is NULL). When this happens we get the above panic.
As page is only used in slab_alloc() to check if the node matches, if
it's NULL I'm assuming that we can say it doesn't and call the
__slab_alloc() code. Is this a correct assumption?
Acked-by: Christoph Lameter <cl@linux.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>