sh: kgdb: Fix up basic SMP support.

kgdb needs a kgdb_roundup_cpus() definition in the architecture backend,
so just copy over the MIPS version, which already does what we want.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh: kgdb: Individual register get/set support.

This updates sh following the generic kgdb changes adding support
for individual register get/set for kgdb/kdb use.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh: kgdb: Fill out sleeping_thread_to_gdb_regs() state.

Presently we're using a pretty dumbed-down implementation that copies
over register state visible from the thread info, leaving the bulk of the
switch_to state uncopied.

Given that we're also depending on register bank toggling for switch_to
optimization we ought to also explicitly zero out the GP regs that reside
in an alternate bank in order to prevent handing back garbage.

There are a few extra registers that we have state for in switch_to, so
copy those over while we're at it.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh: kgdb: Fix up NULL pointer deref by kgdb_nmicallback.

kgdb_nmicallback expects valid register state, so just fetch the register
state with get_irq_regs() as on other platforms.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh: kgdb: Unset CACHE_FLUSH_IS_SAFE for SMP.

Our SMP cache flush ops use CPU cross calls to deal with things
like I-cache accesses not being broadcast in hardware, so ensure that
the CACHE_FLUSH_IS_SAFE reflects this.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh: sh4a: Change the specification method of IRQ to SCIx_IRQ_MUXED

Some SCIF devices specify the same IRQ. We can use SCIx_IRQ_MUXED for this.
And change use to evt2irq(), without specifying the value of IRQ directly.
This is correction to the SH4A series.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh: sh4: Change the specification method of IRQ to SCIx_IRQ_MUXED

Some SCIF devices specify the same IRQ. We can use SCIx_IRQ_MUXED for this.
And change use to evt2irq(), without specifying the value of IRQ directly.
This is correction to the SH4 series.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh: sh3: Change the specification method of IRQ to SCIx_IRQ_MUXED

Some SCIF devices specify the same IRQ. We can use SCIx_IRQ_MUXED for this.
And change use to evt2irq(), without specifying the value of IRQ directly.
This is correction to the SH3 series.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh: sh2: Change the specification method of IRQ to SCIx_IRQ_MUXED

Some SCIF devices specify the same IRQ. We can use SCIx_IRQ_MUXED for this.
This is correction to the SH2/SH2A series.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh: Add initial support for SH7734 CPU subtype

This implements initial support for the SH7734.
This adds support SCIF, TMU and RTC.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
sh: Add support pinmux for SH7734

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Merge branch 'sh/kgdb' into sh-latest