aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/include
AgeCommit message (Collapse)AuthorFilesLines
2009-06-01sh: shared mstp32 clock codeMagnus Damm1-0/+13
Add shared 32-bit module stop bit clock support. Processor specific code can use SH_CLK_MSTP32() to initialize module stop bit clocks, and then use sh_clk_mstp32() for registration. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-06-01sh: sh7785 mode pin definitionsMagnus Damm1-0/+24
This patch adds sh7785 mode pin definitions. Mode pins and pin function controller comments are added as well. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-06-01sh: boot word / mode pin support V2Magnus Damm2-0/+5
Add mode pin support for the SuperH architecture V2. With this patch applied the board code can add their own function to export the cpu mode pin configuration. In most cases this will be a constant bitmap, but boards that allow reading this from a register can instead read out the pin state from hardware. The code warns if a pin is tested but no board specific mode pin function has been provided. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-05-29flat: fix data sections alignmentOskar Schirmer1-1/+0
The flat loader uses an architecture's flat_stack_align() to align the stack but assumes word-alignment is enough for the data sections. However, on the Xtensa S6000 we have registers up to 128bit width which can be used from userspace and therefor need userspace stack and data-section alignment of at least this size. This patch drops flat_stack_align() and uses the same alignment that is required for slab caches, ARCH_SLAB_MINALIGN, or wordsize if it's not defined by the architecture. It also fixes m32r which was obviously kaput, aligning an uninitialized stack entry instead of the stack pointer. [[email protected]: coding-style fixes] Signed-off-by: Oskar Schirmer <[email protected]> Cc: David Howells <[email protected]> Cc: Russell King <[email protected]> Cc: Bryan Wu <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Acked-by: Paul Mundt <[email protected]> Cc: Greg Ungerer <[email protected]> Signed-off-by: Johannes Weiner <[email protected]> Acked-by: Mike Frysinger <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-05-26Merge branch 'sh/clkfwk'Paul Mundt2-24/+47
2009-05-26sh: pci: Disable MWI and make pci_dma_burst_advice() a bit more accurate.Paul Mundt1-2/+18
None of the SH PCI controllers support MWI, it is always treated as a direct memory write, so simply disable it outright. In the case of the PCI cache line size, consult that for the pci_dma_burst_advice() strategy, and switch over to PCI_DMA_BURST_MULTIPLE, as PPC64. Signed-off-by: Paul Mundt <[email protected]>
2009-05-26sh: remove clk_ops->build_rate_table()Magnus Damm1-1/+0
This patch removes the ->build_rate_table() callback, ->recalc() may instead be used for this purpose. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-05-26sh: add shared clock framework frequency table codeMagnus Damm1-0/+18
Add SuperH-specific clock framework helper functions: - clk_rate_table_build() - build cpufreq table from divisors/multipliers - clk_rate_table_round() - use cpufreq table to find matching frequency Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-05-26sh: Add ms7724se (SH7724) board supportKuninori Morimoto1-0/+67
This adds preliminary support for the ms7724se solution engine board. Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-05-22sh: Add a NR_IRQS_LEGACY for external IRQ0-7.Paul Mundt1-1/+2
This adds a NR_IRQS_LEGACY definition, which will be used by sparse irq. Signed-off-by: Paul Mundt <[email protected]>
2009-05-20sh: mach-hp6xx: Fix up the hp6xx build for hd64461 changes.Paul Mundt1-1/+1
Fixes several compile errors due to the recent hd64461 I/O base changes. Signed-off-by: Paul Mundt <[email protected]>
2009-05-15sh: hd64461: Fix up I/O base register offsets.Paul Mundt1-72/+74
hd64461 is mapped in a fixed location, so the I/O base itself is fairly meaningless as a configuration item. Additionally, this makes it impossible to share hd64461 code alongside generic drivers (in the case of sh_dac_audio), so simply make it commonly defined and permit the mach_is_foo() logic to work out the proper semantics. Signed-off-by: Paul Mundt <[email protected]>
2009-05-14sh: clkfwk: Add MSTP bits to SH7785 clock framework.Paul Mundt1-0/+3
This plugs in all of the MSTP functions in to the clock framework, and hands them off to the platform devices that want them. Signed-off-by: Paul Mundt <[email protected]>
2009-05-13sh: clkfwk: Map tree hierarchy in debugfs.Paul Mundt1-0/+1
This adopts the OMAP clock framework debugfs bits and replaces the aging procfs bits. The procfs clocks entry was primarily a debugging aid, and used to be tied in to cpuinfo before the clock list grew too unweildly. Signed-off-by: Paul Mundt <[email protected]>
2009-05-13sh: clkfwk: rate table construction and rounding for SH7785.Paul Mundt1-0/+1
This adds support for constructing a rate table by looking at potential divisors for a specified clock. Each FQRMR clock is given its own table. Presently each table is rebuilt when the parent propagates down a new rate, so some more logic needs to be added to do this more intelligently. Additionally, a fairly generic round_rate() implementation is then layered on top of it, which subsequently provides us with cpufreq support. Signed-off-by: Paul Mundt <[email protected]>
2009-05-13sh: clkfwk: Update SH7785 for refactored clock framework.Paul Mundt1-0/+2
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 <[email protected]>
2009-05-13sh: clkfwk: Rework legacy CPG clock handling.Paul Mundt2-1/+6
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 <[email protected]>
2009-05-12Merge branch 'master' into sh/clkfwkPaul Mundt3-156/+0
2009-05-12sh: Kill off the remnants of the old timer code.Paul Mundt1-28/+0
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 <[email protected]>
2009-05-12sh: remove old TMU driverMagnus Damm3-128/+0
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 <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-05-12sh: clkfwk: Wire up clk_get_sys() support.Paul Mundt1-0/+7
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 <[email protected]>
2009-05-12sh: clkfwk: Kill off clk_recalc_rate().Paul Mundt1-1/+0
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 <[email protected]>
2009-05-12sh: clkfwk: Improve the generic clk_set_parent() implementation.Paul Mundt1-0/+1
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 <[email protected]>
2009-05-12sh: clkfwk: Fix up the clk_enable() error path.Paul Mundt1-1/+1
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 <[email protected]>
2009-05-12sh: clkfwk: Convert SH-Mobile CPUs to use CLK_ENABLE_ON_INIT.Paul Mundt1-16/+0
Kill off all of the clk_always_enabled leftovers and use the new flag directly. Signed-off-by: Paul Mundt <[email protected]>
2009-05-12sh: clkfwk: Consolidate the ALWAYS_ENABLED / NEEDS_INIT mess.Paul Mundt1-2/+1
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 <[email protected]>
2009-05-12sh: clkfwk: refactor rate propagation.Paul Mundt1-3/+6
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 <[email protected]>
2009-05-12sh: clkfwk: Add a followparent_recalc() helper.Paul Mundt1-1/+1
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 <[email protected]>
2009-05-12sh: clkfwk: Make recalc return an unsigned long.Paul Mundt1-1/+2
This is prep work for cleaning up some of the rate propagation bits. Trivial conversion. Signed-off-by: Paul Mundt <[email protected]>
2009-05-11sh: sh7785lcr: fix I2C device address map for 32-bit modeYoshihiro Shimoda1-5/+5
This fixes up the broken I2C offset in 32-bit mode. The cause is because the board datasheet had a mistake. Signed-off-by: Yoshihiro Shimoda <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-05-10sh: Fix up R0 dependence in __arch_swab16/32.Paul Mundt1-6/+6
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 <[email protected]>
2009-05-09sh: Rename opcode_t to insn_size_t.Paul Mundt3-4/+4
This is now clashing with a driver, so just rename it. Signed-off-by: Paul Mundt <[email protected]>
2009-05-09sh: Provide __read_{read,write}sl() definitions for sh64.Paul Mundt1-1/+6
These are presently only defined for sh32, use the plain unoptimized versions for sh64. Fixes up smsc911x build. Signed-off-by: Paul Mundt <[email protected]>
2009-05-09sh: Fix UBC setup and registers for SH2AKieran Bingham2-1/+39
Signed-off-by: Kieran Bingham <[email protected]> Signed-off-by: Peter Griffin <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-05-09sh: Add in some ptrace definitions from GDB.Kieran Bingham1-0/+5
Plugs in PT_TEXT_END_ADDR/PT_TEXT_ADDR/PT_DATA_ADDR/PT_TEXT_LEN definitions. Signed-off-by: Kieran Bingham <[email protected]> Signed-off-by: Peter Griffin <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-05-08sh: clock framework update, fix count and kill off krefMagnus Damm1-2/+2
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 <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-05-08sh: Kill off dead handle_timer_tick() code.Paul Mundt1-5/+0
Nothing is using this anymore now that we have fully converted to generic time, so kill it off completely. Signed-off-by: Paul Mundt <[email protected]>
2009-05-07sh: Kill off unused SH-5 irq_describe cruft.Paul Mundt1-1/+0
Signed-off-by: Paul Mundt <[email protected]>
2009-05-07sh: Integrate the SH-5 onchip_remap() more coherently.Paul Mundt1-7/+0
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 <[email protected]>
2009-05-07sh: Handle shm_align_mask also for HAVE_ARCH_UNMAPPED_AREA_TOPDOWN.Paul Mundt2-2/+4
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 <[email protected]>
2009-05-03sh: Kill off the now unused ARCH_USES_GETTIMEOFFSET code.Paul Mundt1-10/+0
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 <[email protected]>
2009-05-03sh: remove old MTU2 driverMagnus Damm1-1/+1
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 <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-05-03time: sh: convert to use arch_getoffset() infrastructurejohn stultz1-2/+2
Convert sh to use GENERIC_TIME via the arch_getoffset() infrastructure. Signed-off-by: John Stultz <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-05-03Merge branch 'timers/clocksource' of ↵Paul Mundt1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip
2009-04-30sh: remove old CMT driverMagnus Damm1-1/+1
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 <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-04-30sh: pass through ioremap() for non-mmu processors.Magnus Damm1-6/+6
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 <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-04-27sh: rtc-generic support.Paul Mundt1-0/+11
This adds rtc-generic support for SUPERH32. Signed-off-by: Paul Mundt <[email protected]>
2009-04-27sh: Fix up unsigned syscall_nr in SH-5 pt_regs.Paul Mundt1-1/+1
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 <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-04-27Merge branches 'sh/stable-updates' and 'sh/pci-rework'Paul Mundt2-47/+53
2009-04-24sh: pci: Fix up the build for CONFIG_PCI=n.Paul Mundt1-0/+2
Signed-off-by: Paul Mundt <[email protected]>