Commit graph android_kernel_sony_sdm845/arch/sh/include/cpu-sh4
Message SHA1
sh: Tidy up some of the cpu legacy dma header mess.
This has turned in to quite a mess, and with CPUs that care using
dmaengine now it's about time to start cleaning up after the legacy DMA
code. For starters, kill off the stubs for the CPUs that don't do
anything, as well as all of the unused definitions. This leaves us with a
set of IRQs and base addresses we can deal with later.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Paul Mundt   commited 2012-05-19 18:30:31 +09:00
2ff9f317f1
sh: Move sh4a dma header from cpu-sh4 to cpu-sh4a.
cpu-sh4a headers take priority over cpu-sh4 ones by virtue of the build
system, there's no need to try and mingle sh4a stuff in cpu-sh4.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Paul Mundt   commited 2012-05-19 18:06:12 +09:00
0c6012313c
Merge branch 'sh/evt2irq-migration' into sh-latest
Conflicts:
	arch/sh/kernel/cpu/sh3/setup-sh770x.c
	arch/sh/kernel/cpu/sh3/setup-sh7710.c
	arch/sh/kernel/cpu/sh3/setup-sh7720.c
	arch/sh/kernel/cpu/sh4/setup-sh7750.c
	arch/sh/kernel/cpu/sh4a/setup-sh7343.c
	arch/sh/kernel/cpu/sh4a/setup-sh7366.c
	arch/sh/kernel/cpu/sh4a/setup-sh7722.c
	arch/sh/kernel/cpu/sh4a/setup-sh7723.c
	arch/sh/kernel/cpu/sh4a/setup-sh7724.c
	arch/sh/kernel/cpu/sh4a/setup-sh7757.c
	arch/sh/kernel/cpu/sh4a/setup-sh7763.c
	arch/sh/kernel/cpu/sh4a/setup-sh7770.c
	arch/sh/kernel/cpu/sh4a/setup-sh7785.c
	arch/sh/kernel/cpu/sh4a/setup-sh7786.c

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Paul Mundt   commited 2012-05-18 18:13:27 +09:00
c1dbccc3c7
sh: cpu dma evt2irq migration.
This migrates the cpu-family relative DMA IRQ definitions over to
evt2irq() backed hwirq lookups.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Paul Mundt   commited 2012-05-18 17:27:28 +09:00
9f38045643
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>

Nobuhiro Iwamatsu   authored and   Paul Mundt   commited 2012-04-17 16:20:23 +09:00
fea88a0c02
sh: dma: Collect up CHCR of SH7763, SH7764, SH7780 and SH7785
CHCR of SH7763, SH7764, SH7780 and SH7785 is constitution same as SH7757.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Nobuhiro Iwamatsu   authored and   Paul Mundt   commited 2012-03-28 14:21:36 +09:00
ffe0e190f6
sh: dma: Collect up CHCR of SH7723 and SH7730
CHCR of SH7723 and SH7730 is constitution same as SH7724.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Nobuhiro Iwamatsu   authored and   Paul Mundt   commited 2012-03-28 14:21:35 +09:00
9cdb81c7fa
Merge branch 'sh/hwblk' into sh-latest
Paul Mundt   commited 2012-01-12 12:57:41 +09:00
9d14070f65
sh: clkfwk: clock-sh7724: all div6_clks use SH_CLK_DIV6_EXT()
Current div6 clocks can specify their current parent clocks
from its register value if it is registered
by sh_clk_div6_reparent_register().
This patch modifies all div6 clocks into SH_CLK_DIV6_EXT().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Kuninori Morimoto   authored and   Paul Mundt   commited 2011-12-06 15:58:03 +09:00
171f1bc77c
sh: sh7722: fix Oops: remove empty clock entries
Unused indices produce empty entries in the clock array, which then lead to
Oopses at boot-time.

Reported-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Guennadi Liakhovetski   authored and   Paul Mundt   commited 2011-11-24 16:00:03 +09:00
a319add1e2
sh: sh7723.h: bugfix: remove unused clock index
Current sh clocks are using pm_runtime frame work instead of old hwblk.
So, HWBLK_UNKNOWN, HWBLK_DBG and HWBLK_SUBC are not needed for now.

Now mstp32 clocks are registered by sh_clk_mstp32_register(),
but the clock which isn't defined by SH_CLK_MSTP32() macro
will be crash. because it doesn't have enable_reg.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Kuninori Morimoto   authored and   Paul Mundt   commited 2011-11-24 16:00:02 +09:00
544089a9f6
sh: sh7724.h: bugfix: remove unused clock index
Current sh clocks are using pm_runtime frame work instead of old hwblk.
So, HWBLK_UNKNOWN and HWBLK_DBG are not needed for now.

Now mstp32 clocks are registered by sh_clk_mstp32_register(),
but the clock which isn't defined by SH_CLK_MSTP32() macro
will be crash. because it doesn't have enable_reg.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Kuninori Morimoto   authored and   Paul Mundt   commited 2011-11-24 16:00:01 +09:00
615c36f535
sh: sh7724: Add USBHS DMAEngine support
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Kuninori Morimoto   authored and   Paul Mundt   commited 2011-06-16 15:05:46 +09:00
261a9af671
sh: mark DMA slave ID 0 as invalid
This makes it possible to leave DMA slave IDs in the platform data
at default 0 value without hitting DMA channel allocation error paths.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Guennadi Liakhovetski   authored and   Paul Mundt   commited 2011-05-25 11:57:23 +09:00
54525552c6
sh: dmaengine support for SH7757
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Yoshihiro Shimoda   authored and   Paul Mundt   commited 2011-03-11 12:36:29 +09:00
8ac53ed537
sh: Add div6_reparent_clks to clock framework for FSI
Current clk_ops doesn't support .init which
is used to select external clock on ecovec
without CONFIG_SH_CLK_CPG_LEGACY.
To solve this problem, this patch add div6_reparent_clks
to clock-sh7724.
This patch solve compile error too.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Kuninori Morimoto   authored and   Paul Mundt   commited 2010-11-29 12:59:22 +09:00
4bd5d259e4
sh: pinmux support for SH-X3 proto CPUs.
This adds in support for GPIO/pinmux on the SH-X3 proto CPUs. This will
subsequently be used by the x3proto board.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Paul Mundt   commited 2010-10-02 19:20:51 +09:00
720a6bd785
sh: Update SH-X3 subtype for clkdev lookups.
Rewrite the SH-X3 proto CPU clock framework for clkdev.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Paul Mundt   commited 2010-10-01 23:49:56 +09:00
5924ad0d86
sh: modify pinmux for SH7757 2nd cut
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Yoshihiro Shimoda   authored and   Paul Mundt   commited 2010-07-06 17:38:29 +09:00
3810e96056
sh: add romImage MMCIF boot for sh7724 and Ecovec V2
This patch is V2 of the MMCIF romImage boot support
for sh7724 and the Ecovec board. With this patch
applied and CONFIG_ROMIMAGE_MMCIF selected the
romImage kernel image can be written to a MMC card
and booted directly by the sh7724 cpu.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Magnus Damm   authored and   Paul Mundt   commited 2010-05-31 13:11:54 +09:00
4705b2e804
sh: define DMA slaves per CPU type, remove now redundant header
Now that DMA slave IDs are only used used in platform specific code and have
become opaque cookies for the rest of the code, we can make the, CPU specific
too.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Guennadi Liakhovetski   authored and   Paul Mundt   commited 2010-05-22 16:51:17 +09:00
10440af1bc
Merge branch 'sh/stable-updates'
Conflicts:
	arch/sh/kernel/dwarf.c
	drivers/dma/shdma.c

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Paul Mundt   commited 2010-04-26 16:08:27 +09:00
e19553427c
SH: fix TS field shift calculation for DMA drivers
CHCR_TS_HIGH_SHIFT is defined as a shift of TS high bits in CHCR register,
relative to low bits. The TS_INDEX2VAL() macro has to take this into account.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Guennadi Liakhovetski   authored and   Paul Mundt   commited 2010-04-26 16:02:09 +09:00
c2fe3092e5
sh: dmaengine support for SH7786 DMAC0.
Hook up DMAC0 on SH7786.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Paul Mundt   commited 2010-04-13 10:15:56 +09:00
050d4cc702
sh: Disable MMUCR_AT for SH-4 nommu.
Presently address translation is default-enabled regardless of whether
CONFIG_MMU is set or not in the SH-4 case, this fixes it up, and also
makes the control init word a bit more readable in the process.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Paul Mundt   commited 2010-04-07 17:08:32 +09:00
99dc5c0ca9
sh: tlb debugfs support.
Export the status of the utlb and itlb entries through debugfs.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Matt Fleming   authored and   Paul Mundt   commited 2010-03-29 15:24:54 +09:00
6ae6650232
sh: update the TLB replacement counter for entry wiring.
Presently the TLB wiring code depends on MMUCR.URB for working out where
to place the wired entry, but fails to take the replacment counter in to
consideration. This fixes up the wiring logic and ensures that wired
entries remain so.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Matt Fleming   authored and   Paul Mundt   commited 2010-03-26 11:37:16 +09:00
4539282dbc
sh: Flush ITLB too in PTEAEX's flush_tlb_page()
flush_tlb_page() can be used to flush TLB entries that map executable
pages. Therefore, we need to ensure that the ITLB is also flushed in
local_flush_tlb_page().

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Matt Fleming   authored and   Paul Mundt   commited 2010-03-23 13:36:15 +09:00
a9eb4f6d1a
sh: Add watch-dog register address for SH7722/SH7723/SH7724
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Kuninori Morimoto   authored and   Paul Mundt   commited 2010-03-23 13:19:36 +09:00
67eaa3e4fb
sh: merge sh7722 and sh7724 DMA register definitions
DMA CHCR register layout is equal on sh7722 and sh7724, reuse definitions.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Guennadi Liakhovetski   authored and   Paul Mundt   commited 2010-03-02 11:10:52 +09:00
c8e3149ba7
dmaengine: shdma: separate DMA headers.
Separate SH DMA headers into ones, commonly used by both drivers, and ones,
specific to each of them. This will make the future development of the
dmaengine driver easier.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Guennadi Liakhovetski   authored and   Paul Mundt   commited 2010-03-02 11:09:04 +09:00
8b1935e6a3
sh: Fix up more 64-bit pgprot truncation on SH-X2 TLB.
Both the store queue API and the PMB remapping take unsigned long for
their pgprot flags, which cuts off the extended protection bits. In the
case of the PMB this isn't really a problem since the cache attribute
bits that we care about are all in the lower 32-bits, but we do it just
to be safe. The store queue remapping on the other hand depends on the
extended prot bits for enabling userspace access to the mappings.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Paul Mundt   commited 2010-02-17 13:23:00 +09:00
7bdda6209f
Merge branch 'sh/dmaengine'
Conflicts:
	arch/sh/drivers/dma/dma-sh.c

Paul Mundt   commited 2010-02-08 11:34:03 +09:00
2e18e04798
sh: implement DMA_SLAVE capability in SH dmaengine driver
Tested to work with a SIU ASoC driver on sh7722 (migor).

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Guennadi Liakhovetski   authored and   Paul Mundt   commited 2010-02-08 09:40:26 +09:00
cfefe99795
sh: fix Transfer Size calculation in both DMA drivers
Both the original arch/sh/drivers/dma/dma-sh.c and the new SH dmaengine drivers
do not take into account bits 3:2 of the Transfer Size field in the CHCR
register, besides, bit-field defines set bit 2, but the mask only passes bits
1:0 through. TS_16BLK and TS_32BLK macros are bogus too. This patch fixes all
these issues for sh7722 and sh7724, other CPUs stay unchanged and might need to
be fixed too.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Guennadi Liakhovetski   authored and   Paul Mundt   commited 2010-02-08 09:40:24 +09:00
623b4ac4bf
sh: mach-sdk7786: Probe system FPGA area mapping.
This implements dynamic probing for the system FPGA. The system reset
controller contains a fixed magic read word in order to identify the
FPGA. This just utilizes a simple loop that scans across all of the fixed
physical areas (area 0 through area 6) to locate the FPGA.

The FPGA also contains register information detailing the area mappings
and chip select settings for all of the other blocks, so this needs to be
done before we can set up anything else.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Paul Mundt   commited 2010-01-20 18:25:19 +09:00
d9116d07f6
sh: New extended page flag to wire/unwire TLB entries
Provide a new extended page flag, _PAGE_WIRED and an SH4 implementation
for wiring TLB entries and use it in the fixmap code path so that we can
wire the fixmap TLB entry.

Signed-off-by: Matt Fleming <matt@console-pimps.org>

Matt Fleming   commited 2010-01-16 14:28:57 +00:00
8eda551420
sh: Kill off dead UBC headers.
Nothing is using these now, so kill them all off.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Paul Mundt   commited 2010-01-05 19:16:35 +09:00
7025bec912
sh: dmaengine support for sh7724.
Add a dmaengine platform device to sh7724, fix DMA channel interrupt numbers.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Guennadi Liakhovetski   authored and   Paul Mundt   commited 2009-12-17 14:18:27 +09:00
39b27f4cc3
sh: fix watchdog timer for sh7780/sh7785
Signed-off-by: Valentin Sitdikov <valentin.sitdikov@siemens.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Valentin R Sitsikov   authored and   Paul Mundt   commited 2009-10-27 07:34:29 +09:00
f72f7876ae
Merge branch 'master' into sh/smp
Conflicts:
	arch/sh/mm/cache-sh4.c

Paul Mundt   commited 2009-09-01 13:54:14 +09:00
ac6a0cf671
sh: Add initial support for SH7757 CPU subtype
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Yoshihiro Shimoda   authored and   Paul Mundt   commited 2009-08-21 17:25:47 +09:00
c01f0f1a4a
sh: Migrate SH-4 cacheflush ops to function pointers.
This paves the way for allowing individual CPUs to overload the
individual flushing routines that they care about without having to
depend on weak aliases. SH-4 is converted over initially, as it wires
up pretty much everything. The majority of the other CPUs will simply use
the default no-op implementation with their own region flushers wired up.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Paul Mundt   commited 2009-08-15 12:29:49 +09:00
37443ef3f0
sh: Kill off unused flush_icache_user_range().
We use flush_cache_page() outright in copy_to_user_page(), and nothing
else needs it, so just kill it off. SH-5 still defines its own version,
but that too will go away in the same fashion once it converts over.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Paul Mundt   commited 2009-08-15 11:38:05 +09:00
916e97834e
sh: consolidate flush_dcache_mmap_lock/unlock() definitions.
All of the flush_dcache_mmap_lock()/flush_dcache_mmap_unlock()
definitions are identical across all CPUs, so just provide them
generically in asm/cacheflush.h.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Paul Mundt   commited 2009-08-15 11:25:32 +09:00
7fbb2d3bdd
sh: Don't export flush_dcache_all().
flush_dcache_all() is used internally by the SH-4 cache code, it is not
part of the exported cache API, so make it static and don't export it.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Paul Mundt   commited 2009-08-15 11:22:50 +09:00
0b445dcaf3
sh: Centralize the CPU cache initialization routines.
This provides a central point for CPU cache initialization routines.
This replaces the antiquated p3_cache_init() method, which the vast
majority of CPUs never cared about.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Paul Mundt   commited 2009-08-15 11:05:42 +09:00
ecba106058
sh: rework nommu for generic cache.c use.
This does a bit of reorganizing for allowing nommu to use the new
and generic cache.c, no functional changes.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Paul Mundt   commited 2009-08-15 09:49:32 +09:00
dde5e3ffb7
Merge branch 'master' into sh/cachetlb
Paul Mundt   commited 2009-08-15 05:58:45 +09:00
d2dcd9101b
sh: Add SH7724 DMAC support.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Kuninori Morimoto   authored and   Paul Mundt   commited 2009-08-04 14:41:49 +09:00
edc67b2942