aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm
Commit message (Collapse)AuthorAge
* sh: clkfwk: Update SH7785 for refactored clock framework.Paul Mundt2009-05-13
| | | | | | | | | This updates the SH7785 CPU code as well as the SH7785LCR board support code for making use of the newly refactored clock framework. Support for the legacy CPG clocks is dropped at this point, with the extal frequency fed in from the board code. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: clkfwk: Rework legacy CPG clock handling.Paul Mundt2009-05-13
| | | | | | | | | This moves out the old legacy CPG clocks to their own file, and converts over the existing users. With these clocks going away and each CPU dealing with them on their own, CPUs can gradually move over to the new interface. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Merge branch 'master' into sh/clkfwkPaul Mundt2009-05-12
|\
| * sh: Kill off the remnants of the old timer code.Paul Mundt2009-05-12
| | | | | | | | | | | | | | | | Now with all of the TMU users moved over to the new TMU driver, and the old TMU driver killed off, the left-over infrastructure can go along with it. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: remove old TMU driverMagnus Damm2009-05-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the old TMU driver (CONFIG_SH_TMU/timer-tmu.c) As replacement, select the sh_tmu driver with CONFIG_SH_TIMER_TMU and configure timer channel using platform data. If multiple TMU channels are enabled using platform data, use the earlytimer parameter on the kernel command line to select channel. For instance, use "earlytimer=sh_tmu.0" to select the first channel. To verify which timer is being used, look at printouts or the timer irq count in /proc/interrupts. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: clkfwk: Wire up clk_get_sys() support.Paul Mundt2009-05-11
| | | | | | | | | | | | | | | | | | This stubs in clk_get_sys() from the ARM clkdev implementation. Tentatively conver the clk_get() lookup code to use this, and once the rest of the in-tree users are happy with this, it can replace the fallback lookups. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: clkfwk: Kill off clk_recalc_rate().Paul Mundt2009-05-11
| | | | | | | | | | | | | | | | | | The only user for this is the SH-Mobile r_clk, which is now added as a root clock and can be kicked via propagate_rate() as usual. Given that, there is no longer any need for the special clk_recalc_rate(), so we kill it off. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: clkfwk: Improve the generic clk_set_parent() implementation.Paul Mundt2009-05-11
| | | | | | | | | | | | | | | | | | | | This causes the generic clk_set_parent() implementation to be a bit more intelligent. A clk_reparent() is added to move the clock over to the new parent's sibling list, which then allows the generic rate propagation code to succeed. This also becomes a nop if the new and old parents are unchanged. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: clkfwk: Fix up the clk_enable() error path.Paul Mundt2009-05-11
| | | | | | | | | | | | | | | | | | | | | | | | There are a couple of instances where a clk_enable() can fail, which the SH-Mobile code presently handles, but doesn't get reported all the way back up. This fixes up the return type so the errors make it all the way down to the drivers. Additionally, we now also error out properly if the parent enable fails. Prep work for aggressively turning off unused clocks on boot. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: clkfwk: Convert SH-Mobile CPUs to use CLK_ENABLE_ON_INIT.Paul Mundt2009-05-11
| | | | | | | | | | | | | | Kill off all of the clk_always_enabled leftovers and use the new flag directly. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: clkfwk: Consolidate the ALWAYS_ENABLED / NEEDS_INIT mess.Paul Mundt2009-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no real distinction here in behaviour, either a clock needs to be enabled on initialiation or not. The ALWAYS_ENABLED flag was always intended to only apply to clocks that were physically always on and could simply not be disabled at all from software. Unfortunately over time this was abused and the meaning became a bit blurry. So, we kill off both of all of those paths now, as well as the newer NEEDS_INIT flag, and consolidate on a CLK_ENABLE_ON_INIT. Clocks that need to be enabled on initialization can set this, and it will purposely enable them and bump the refcount up. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: clkfwk: refactor rate propagation.Paul Mundt2009-05-11
| | | | | | | | | | | | | | | | | | This resyncs the rate propagation strategy with the scheme used by the OMAP clock framework. Child clocks are tracked on a list under each parent and propagation happens there specifically rather than constantly iterating over the global clock list. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: clkfwk: Add a followparent_recalc() helper.Paul Mundt2009-05-11
| | | | | | | | | | | | | | | | This adds a followparent_recalc() helper for clocks that just follow the parent's rate. Switch over the few CPUs that use this scheme for some of their clocks. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: clkfwk: Make recalc return an unsigned long.Paul Mundt2009-05-11
|/ | | | | | | This is prep work for cleaning up some of the rate propagation bits. Trivial conversion. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix up R0 dependence in __arch_swab16/32.Paul Mundt2009-05-10
| | | | | | | | | | | | | | | | | | | | | | | There is nothing in these routines that inherently depends on R0 use. Given that these routines are inlined, it is rather easy to blow up the compiler by exhausting the spill class when performing a 64-bit swab. This presently manifests itself as the following: CC fs/ocfs2/suballoc.o fs/ocfs2/suballoc.c: In function 'ocfs2_reserve_suballoc_bits': fs/ocfs2/suballoc.c:638: error: unrecognizable insn: (insn 2793 1230 1231 103 arch/sh/include/asm/swab.h:33 (set (reg:HI 853) (subreg:HI (reg:SI 149 macl) 2)) -1 (expr_list:REG_DEAD (reg:SI 149 macl) (nil))) fs/ocfs2/suballoc.c:638: internal compiler error: in extract_insn, at recog.c:1991 This patch switches over to using an arbitrarily assigned register instead. While the same issue does not exist in the SH-5 case, there is likewise no harm in having an alternate register used for the byterev/shari pair. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Rename opcode_t to insn_size_t.Paul Mundt2009-05-09
| | | | | | This is now clashing with a driver, so just rename it. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Provide __read_{read,write}sl() definitions for sh64.Paul Mundt2009-05-09
| | | | | | | These are presently only defined for sh32, use the plain unoptimized versions for sh64. Fixes up smsc911x build. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix UBC setup and registers for SH2AKieran Bingham2009-05-08
| | | | | | Signed-off-by: Kieran Bingham <kieranbingham@gmail.com> Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Add in some ptrace definitions from GDB.Kieran Bingham2009-05-08
| | | | | | | | | Plugs in PT_TEXT_END_ADDR/PT_TEXT_ADDR/PT_DATA_ADDR/PT_TEXT_LEN definitions. Signed-off-by: Kieran Bingham <kieranbingham@gmail.com> Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: clock framework update, fix count and kill off krefMagnus Damm2009-05-08
| | | | | | | | | | This patch updates the clock framework use count code. With this patch the enable() and disable() callbacks only get called when counting from and to zero. While at it the kref stuff gets replaced with an int. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Kill off dead handle_timer_tick() code.Paul Mundt2009-05-08
| | | | | | | Nothing is using this anymore now that we have fully converted to generic time, so kill it off completely. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Integrate the SH-5 onchip_remap() more coherently.Paul Mundt2009-05-07
| | | | | | | | | | | Presently this is special-cased for early initialization. While there are situations where these static early initializations are still necessary, with minor changes it is possible to use this for the regular ioremap implementation as well. This allows us to kill off the special-casing for the remap completely and to start tidying up all of the SH-5 special-casing in drivers. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Handle shm_align_mask also for HAVE_ARCH_UNMAPPED_AREA_TOPDOWN.Paul Mundt2009-05-07
| | | | | | | Presently shm_align_mask is only looked at for the bottom up case, but we still want this for proper colouring constraints in the topdown case. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Kill off the now unused ARCH_USES_GETTIMEOFFSET code.Paul Mundt2009-05-03
| | | | | | | | | Now that the stragglers (MTU2/CMT/etc.) have been rewritten and we are selecting both GENERIC_TIME and GENERIC_CLOCKEVENTS, the get_offset() timer op is completely unused. As a result, we are now able to kill off the ARCH_USES_GETTIMEOFFSET references. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: remove old MTU2 driverMagnus Damm2009-05-03
| | | | | | | | | | | | | | | | | This patch removes the old MTU2 driver (CONFIG_SH_MTU2/timer-mtu2.c) As replacement, select the sh_cmt driver with CONFIG_SH_TIMER_MTU2 and configure timer channel using platform data. If multiple MTU channels are enabled using platform data, use the earlytimer parameter on the kernel command line to select channel. For instance, use "earlytimer=sh_mtu2.0" to select the first channel. To verify which timer is being used, look at printouts or the timer irq count in /proc/interrupts. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* time: sh: convert to use arch_getoffset() infrastructurejohn stultz2009-05-03
| | | | | | | | Convert sh to use GENERIC_TIME via the arch_getoffset() infrastructure. Signed-off-by: John Stultz <johnstul@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Merge branch 'timers/clocksource' of ↵Paul Mundt2009-05-03
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip
| * sh: Fix up unsigned syscall_nr in SH-5 pt_regs.Paul Mundt2009-04-27
| | | | | | | | | | | | | | | | | | syscall_nr is presently defined as unsigned in the SH-5 pt_regs, while the syscall restarting code wants it to be signed. Fix this up, and bring it in line with the other SH parts. Reported-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: remove old CMT driverMagnus Damm2009-04-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the old CMT driver (CONFIG_SH_CMT/timer-cmt.c) As replacement, select the sh_cmt driver with CONFIG_SH_TIMER_CMT and configure timer channel using platform data. If multiple CMT channels are enabled using platform data, use the earlytimer parameter on the kernel command line to select channel. For instance, use "earlytimer=sh_cmt.0" to select the first channel. To verify which timer is being used, look at printouts or the timer irq count in /proc/interrupts. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: pass through ioremap() for non-mmu processors.Magnus Damm2009-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | All 32-bit SuperH processors currently go through __ioremap_mode() and check for IO_TRAPPED and directly mapped segments. With this patch we simplify the MMU less case with a pass through version of __ioremap_mode() which just returns the physical address. The effects of this is change are: - fix non-MMU ioremap() of high address hardware blocks (sh7203 CMT) - make sure IO_TRAPPED is not selected Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: rtc-generic support.Paul Mundt2009-04-27
| | | | | | | | | | | | This adds rtc-generic support for SUPERH32. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| |
| \
*-. \ Merge branches 'sh/stable-updates' and 'sh/pci-rework'Paul Mundt2009-04-26
|\ \ \ | | |/ | |/|
| | * sh: pci: Fix up the build for CONFIG_PCI=n.Paul Mundt2009-04-24
| | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: pci: Kill off the last remnants of the now unused pci-auto code.Paul Mundt2009-04-20
| | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: pci: Kill off the now unused hose->io_base.Paul Mundt2009-04-20
| | | | | | | | | | | | | | | | | | Nothing is using this any more, so kill it off. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: pci: Track io and mem_offset per-channel.Paul Mundt2009-04-20
| | | | | | | | | | | | | | | | | | This implements a per-hose offset for I/O and mem resources. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: pci: New-style controller registration.Paul Mundt2009-04-20
| | | | | | | | | | | | | | | | | | | | | | | | This moves off of the board_pci_channels[] approach for bus registration and over to a cleaner register_pci_controller(), all derived from the MIPS code. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: pci: Rework fixed region checks in ioremap().Paul Mundt2009-04-20
| | | | | | | | | | | | | | | | | | | | | | | | Not all PCI channels have non-translatable memory windows, this is a special property of the on-chip PCIC with its 0xfd00... mapping, handle this explicitly. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: pci: Consolidate pci_iomap() and use the generic I/O base.Paul Mundt2009-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This consolidates the pci_iomap() definitions and reworks how the I/O port base is handled. PCI channels can register their own I/O map base, or if none is provided, the system-wide generic I/O base is used instead. Functionally nothing changes, while this allows us to kill off lots of I/O address special casing and lookups. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: pci: Kill off unused pcibios_fixup().Paul Mundt2009-04-20
| | | | | | | | | | | | | | | | | | | | | This is left over cruft that hasn't been used by anything in a long time, kill off bits that weren't purged previously. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: pci: Consolidate pcibios_align_resource() definitions.Paul Mundt2009-04-20
| | | | | | | | | | | | | | | | | | | | | | | | This introduces a saner pcibios_align_resource() that can be used regardless of whether pci-auto or pci-new are being used, and consolidates it in pci-lib.c. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: pci: HAVE_PCI_MMAP support.Paul Mundt2009-04-20
| | | | | | | | | | | | | | | | | | Derived from the MIPS version, now uses pgprot_noncached(). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: pci: Drop asm-generic/pci.h, so we can use our own fixups.Paul Mundt2009-04-20
| | | | | | | | | | | | | | | | | | | | | The new PCI code wants its own bus<->resource mappings instead of the generic equivalents, so drop the asm-generic include in preparation. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: pci io port base address codeMagnus Damm2009-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a __get_pci_io_base() function which is used to match a port range against struct pci_channel. This allows us to detect if a port range is assigned to pci or happens to be legacy port io. While at it, remove unused cpu-specific cruft. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: pci memory range checking codeMagnus Damm2009-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the code to use __is_pci_memory() instead of is_pci_memaddr(). __is_pci_memory() loops through all the pci channels on the system to match memory windows. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: add io_base member to pci_channelMagnus Damm2009-04-16
| | | | | | | | | | | | | | | | | | | | | | | | Store the io window base address in struct pci_channel and use that one instead of SH77xx_PCI_IO_BASE. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: add reg_base member to pci_channelMagnus Damm2009-04-16
| | | | | | | | | | | | | | | | | | | | | | | | Store the base address of the pci host controller registers in struct pci_channel and use the address in pci_read_reg() and pci_write_reg(). Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: hook in struct pci_channel in sysdataMagnus Damm2009-04-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store a struct pci_channel pointer in bus->sysdata. This makes whatever struct pci_channel assigned to a bus available for sh4_pci_read() and sh4_pci_write(). We also modify PCIBIOS_MIN_IO and PCIBIOS_MIN_MEM to use bus->sysdata - this to gives us support for multiple pci channels. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: add init member to pci_channel dataMagnus Damm2009-04-16
| |/ | | | | | | | | | | | | | | | | | | This patch adds an init callback to struct pci_channel and makes sure it is initialized properly. Code is added to call this init function from pcibios_init(). Return values are adjusted and a warning is is printed if init fails. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| |
| \
*-. \ Merge branches 'sh/earlytimer' and 'sh/shmobile-r2r-staging'Paul Mundt2009-04-19
|\ \ \ | |_|/ |/| |