Archived
14
0
Fork 0
Commit graph

167827 commits

Author SHA1 Message Date
Magnus Damm
8b431a7e66 sh: Add SDHI1 support to the AP325RXA board
Update the SDHI platform data for the AP325RXA board
to include support for the CN7 Micro SD Card slot.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-11-02 14:19:28 +09:00
Paul Mundt
1ce7b039b5 sh: intc: dynamic IRQ support.
This adds support for dynamic IRQ allocation/deallocation for all parts
using the SH-style vectored IRQs. While this is not inherently
INTC-specific, the INTC code is the main tie-in for vectored IRQ
registration, and is the only place that a full view of the utilized
vector map is possible.

The implementation is fairly straightforward, implementing a flat IRQ map
where each registered vector is reserved, allowing us to scan for holes
and dynamically wire up IRQs lazily later on in the boot stage. This
piggybacks on top of sparseirq in order to make the best use of the
available vector space.

Dynamic IRQs can be used for any number of things, ranging from MSI in
the SH-X3 PCIe case down to demux vectors for board FPGAs and system
controllers that presently allocate an arbitrary range. In the latter
case, this also allows those platforms to use sparseirq without blowing
up, which brings us one step closer to enabling sparseirq as the default
for all platform and CPU combinations.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-11-02 10:30:26 +09:00
Magnus Damm
58ee987e2f sh: Add KFR2R09 specific memory pre/post R-standby code
Add R-standby support to the KFR2R09 sdram code.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-30 14:38:49 +09:00
Magnus Damm
bb3e0eed9d sh: Add R-standby sleep mode support
Add R-standby specific bits to the SuperH Mobile sleep code.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-30 14:38:45 +09:00
Magnus Damm
03625e7107 sh: Use RSMEM for sleep code on sh7724
Use RSMEM instead of ILMEM for sleep mode code storage on SH7724.
This allows us to use R-standby mode on SH7724.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-30 14:38:33 +09:00
Magnus Damm
99675a7a45 sh: Add MMU and Cache handling sleep mode code
Add MMU and cache handling functionality to the SuperH Mobile
sleep code. The MMU and cache registers are saved and restored.
The MMU is disabled and the cache is flushed and disabled before
entering sleep modes if the SUSP_SH_MMU flag is set. This flag
should be set in the case of R-standby and most likely for future
U-standby support as well.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-30 14:37:56 +09:00
Magnus Damm
02bf89347c sh: Keep track of allowed sleep modes
Add code to keep track of supported sleep modes. This to
only export cpuidle modes that are backed by board support
code. Also, do not allow suspend-to-ram if sdram board code
is missing.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-30 14:37:42 +09:00
Magnus Damm
323ef8dba6 sh: Rework SuperH Mobile sleep mode code
Rework the SuperH Mobile sleep code from including
board specific code to allowing each board to provide
pre/post code snippets. These snippets should contain
sdram management code to enter and leave self-refresh.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-30 14:36:52 +09:00
Magnus Damm
eb0cd9e88c sh: Add Ecovec24 specific memory pre/post sleep code
Add self-refresh handling code for the Ecovec24 board.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-30 14:33:46 +09:00
Magnus Damm
86c7d03a0f sh: Add ap325rxa specific memory pre/post sleep code
Add self-refresh handling code for the AP325RXA board.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-30 14:33:44 +09:00
Magnus Damm
53528928d1 sh: Move ap325rxa board code into separate directory
Move the AP325RXA board code from a single board file
to a separate directory. This to make it easy to add
support for sdram sleep mode code.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-30 14:33:43 +09:00
Magnus Damm
13fa551b5e sh: Add migor specific memory pre/post sleep code
Add self-refresh handling code for the Migo-R board.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-30 11:59:27 +09:00
Magnus Damm
3b9f2952a3 sh: Add ms7724se specific memory pre/post sleep code
Add self-refresh handling code for the MS7724SE board.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-30 11:59:26 +09:00
Magnus Damm
67e522d0f9 sh: Add kfr2r09 specific memory pre/post sleep code
Add self-refresh handling code for the KFR2R09 board.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-30 11:59:26 +09:00
Magnus Damm
159f8cd99e sh: Allow boards to register memory pre/post sleep code
Add code to allow boards registering self-contained
functions for going to/from self-refresh. At this
point the board code is unused. When all supported
boards have been converted then the new sleep code
will make use of these functions.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-30 11:55:24 +09:00
Magnus Damm
da14909eb0 sh: Add sh7724 notifier for R-standby save/restore
Make use of the recently added notifier chains for sh7724
r-standby register save/restore handling. At this point
only the BSC and INTC are handled.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-30 11:55:14 +09:00
Magnus Damm
49f42644fd sh: Add notifiers chains for cpu/board code
This patch adds atomic notifier chains for pre/post
sleep events. Useful for cpu code and boards that
need to save and restore register state before and
after entering a sleep mode.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-30 11:54:59 +09:00
Matt Fleming
eb3118f652 sh: Do not apply virt_to_phys() to a physical address
The variable 'phys' already contains the physical address to flush. It
is not a virtual address and should not be passed to virt_to_phys().

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-30 11:53:22 +09:00
Paul Mundt
1d317f90d9 sh: perf events: Kill off left over debugging cruft.
num_events should be compared > MAX_HWEVENTS and not >=. The latter was
used as a debugging test which accidentally slipped in.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-28 18:02:15 +09:00
Paul Mundt
ac44e66947 sh: perf events: Add preliminary support for SH-4A counters.
This adds in preliminary support for the SH-4A performance counters.
Presently only the first 2 counters are supported, as these are the ones
of the most interest to the perf tool and end users. Counter chaining is
not presently handled, so these are simply implemented as 32-bit
counters.

This also establishes a perf event support framework for other hardware
counters, which the existing SH-4 oprofile code will migrate over to as
the SH-4A support evolves.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-28 17:57:54 +09:00
Kuninori Morimoto
3714a9a026 sh: mach-ecovec24: Add USB1 gadget support
USB1 can change to host/function by checking PTB3.
This patch add USB1 gadget support and check PTB3 when boot,
and change name to usb1_common_XXX from usb1_host_XXX.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-28 16:07:19 +09:00
Magnus Damm
5b380ec11d sh: add SDHI1 support to ms7724se
Add support for cn8 and SDHI1 to the ms7724se board.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-28 09:18:24 +09:00
Magnus Damm
8013cc9a5d sh: mac address through private data for sh_eth on ms7724se
Convert the ms7724se board code to pass the mac
address to the sh_eth driver using platform data.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-28 09:18:24 +09:00
Paul Mundt
9b3b21f788 Merge branch 'sh/stable-updates' 2009-10-27 17:10:24 +09:00
Paul Mundt
72f0c137a5 sh: enable PERF_USE_VMALLOC across the board.
The vast majority of SH platforms want this, and the few that don't
aren't going to care one way or the other. Enable it across the board.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-27 17:08:55 +09:00
Paul Mundt
94c285108e sh: Bump up dma_ops initialization far earlier in the boot process.
Presently this was tacked on to the dma debug init bits from
fs_initcall(), which is far too late for devices setting up their own
per-device coherent areas.

Throw this in the beginning of mem_init(), as per the x86 iommu
allocation.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-27 17:07:45 +09:00
Paul Mundt
4c978ca319 sh: Clean up more superfluous symbol exports.
Many of these symbols went away completely, or we just never cared about
them in the first place. Trim the exports down to the essential set.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-27 11:51:19 +09:00
Paul Mundt
9b798d50df sh: intc: Make ack_regs generally available.
Currently this is ifdef'ed under SH-3 and SH-4A, but there are other CPUs
that will need this as well. Given the size of the existing data
structures, this doesn't cause any additional cacheline utilization for
the existing users, so has no direct impact on the data structures.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-27 11:36:43 +09:00
Paul Mundt
0a993b0a29 sh64: cache flush symbol exports.
These were previously hidden in sh_ksyms_32, despite also being needed
for sh64 now that the cache.c code is shared.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-27 10:51:35 +09:00
Paul Mundt
478fb15800 sh: Fix up dma_is_consistent().
This fixes up the dma_is_consistent() definition for the various
coherence options.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-27 10:41:58 +09:00
Paul Mundt
7693465d81 sh: Kill off superfluous arch/sh/drivers/pci/Kconfig.
Now that this contains a grand total of 1 Kconfig option, it's hardly
worth keeping split out. Roll CONFIG_PCI back in to the top-level
architecture Kconfig, along with the other bus types.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-27 10:36:55 +09:00
Paul Mundt
01be5d63fd sh: Revamp PCI DMA coherence Kconfig bits.
Leaving this configurable caused more trouble than it was ever worth, so
just make it explicit. Boards that are verified one way or the other can
fix up their selects accordingly. We presently default to non-coherent
for most platforms.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-27 10:35:02 +09:00
Matt Fleming
3f375f12ec sh: Annotate irq functions with "notrace"
Now that SH's irqflags functions are out of line it becomes necessary to
mark them as "notrace" so that we don't try to trace them.

[ Do the same for irq_64.c -- PFM. ]

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-27 07:37:10 +09:00
Valentin R Sitsikov
f72f7876ae 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>
2009-10-27 07:34:29 +09:00
Paul Mundt
ffb4a73d89 sh: Fix hugetlbfs dependencies for SH-3 && MMU configurations.
The hugetlb dependencies presently depend on SUPERH && MMU while the
hugetlb page size definitions depend on CPU_SH4 or CPU_SH5. This
unfortunately allows SH-3 + MMU configurations to enable hugetlbfs
without a corresponding HPAGE_SHIFT definition, resulting in the build
blowing up.

As SH-3 doesn't support variable page sizes, we tighten up the
dependenies a bit to prevent hugetlbfs from being enabled. These days
we also have a shiny new SYS_SUPPORTS_HUGETLBFS, so switch to using
that rather than adding to the list of corner cases in fs/Kconfig.

Reported-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-27 07:22:37 +09:00
Paul Mundt
a5c461bb3f sh: Document uImage.bin target in archhelp.
This was missing from the previous patch.

Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-27 07:17:12 +09:00
Magnus Damm
376abbb4b3 sh: mac address through private data for sh_eth on ecovec24
Convert the ecovec24 board code to pass the mac
address to the sh_eth driver using platform data.
Also, remove the static clock to allow Runtime PM.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-26 19:50:47 +09:00
Magnus Damm
40e4231809 sh: add hwblk_id to sh_eth on ecovec24
Add HWBLK_ETHER to the sh_eth platform device
to allow Runtime PM of the ethernet hardware.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-26 19:47:36 +09:00
Paul Mundt
a384fe55c2 Merge branch 'sh/stable-updates' 2009-10-26 19:46:59 +09:00
Magnus Damm
9e24c7e2ac sh: add uImage.bin target
Add an uImage.bin target to allow uncompressed uImages.
Useful for boards with busted u-boot decompression like
the rsk7203 on my desk.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-26 19:46:25 +09:00
Magnus Damm
88345411df sh: rsk7203 CONFIG_MTD=n fix
Fix the rsk7203 board code to build with CONFIG_MTD=n.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-26 19:46:24 +09:00
Magnus Damm
ef01b9a06d sh: fix kexec by removing check for old kexec-tools
This unbreaks kexec support. Without this fix all
cases of kexec fails since __pa() does not behave
like PHYSADDR(). The downside is that we also kill
the code blocking users running old kexec-tools.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-26 19:45:45 +09:00
Paul Mundt
6253195b67 Merge branch 'sh/stable-updates'
Conflicts:
	arch/sh/kernel/dwarf.c
2009-10-26 10:48:18 +09:00
Paul Mundt
15893fb565 Merge branch 'sh/sdhi-mfd'
Conflicts:
	arch/sh/boards/mach-ecovec24/setup.c
	arch/sh/boards/mach-kfr2r09/setup.c
2009-10-26 10:47:44 +09:00
Kuninori Morimoto
96987d96f0 sh: mach-ecevec24: Add SDHI support
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-26 10:37:27 +09:00
Magnus Damm
d2a2fb97d1 sh: SDHI platform data to the kfr2r09 board
Add SD Card support to the kfr2r09 board using the
sh_mobile_sdhi driver hooked up to SDHI0 and yc304.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-26 10:37:06 +09:00
Magnus Damm
0f79af6009 sh: SDHI platform data to the SE7724 board
Add SD Card support to the se7724 board using the
sh_mobile_sdhi driver hooked up to SDHI0 and CN7.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-26 10:37:05 +09:00
Magnus Damm
17f81473d1 sh: SDHI platform data to the AP325RXA board
Convert the AP325 board to use sh_mobile_sdhi for the
SD Card connected to CN3 instead of mmc_spi.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-26 10:37:05 +09:00
Magnus Damm
2e3fc56c8d sh: SDHI platform data to the Migo-R board
Convert the Migo-R board to use sh_mobile_sdhi for the
SD Card connected to CN9 instead of mmc_spi.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-26 10:37:05 +09:00
Magnus Damm
6d522b0598 mmc: Add SuperH to the tmio-mmc Kconfig
Add SUPERH to the Kconfig dependencies for tmio_mmc.

This change allows us to drive the SDHI hardware blocks
found in SuperH Mobile with tmio_mmc.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-26 10:37:04 +09:00