aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6Linus Torvalds2010-02-26
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (187 commits) sh: remove dead LED code for migo-r and ms7724se sh: ecovec build fix for CONFIG_I2C=n sh: ecovec r-standby support sh: ms7724se r-standby support sh: SH-Mobile R-standby register save/restore clocksource: Fix up a registration/IRQ race in the sh drivers. sh: ms7724: modify scan_timing for KEYSC sh: ms7724: Add sh_sir support sh: mach-ecovec24: Add sh_sir support sh: wire up SET/GET_UNALIGN_CTL. sh: allow alignment fault mode to be configured at kernel boot. sh: sh7724: Update FSI/SPU2 clock sh: always enable sh7724 vpu_clk and set to 166MHz on Ecovec sh: add sh7724 kick callback to clk_div4_table sh: introduce struct clk_div4_table sh: clock-cpg div4 set_rate() shift fix sh: Turn on speculative return for SH7785 and SH7786 sh: Merge legacy and dynamic PMB modes. sh: Use uncached I/O helpers in PMB setup. sh: Provide uncached I/O helpers. ...
| * sh: remove dead LED code for migo-r and ms7724seMagnus Damm2010-02-26
| | | | | | | | | | | | | | | | CONFIG_PM is always set on SH-Mobile these days so get rid of the unused LED setup code. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: ecovec build fix for CONFIG_I2C=nMagnus Damm2010-02-26
| | | | | | | | | | | | | | | | Allow building the ecovec board support code even though I2C support is disabled. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: ecovec r-standby supportMagnus Damm2010-02-26
| | | | | | | | | | | | | | | | This patch adds board specific r-standby resume code for ecovec. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: ms7724se r-standby supportMagnus Damm2010-02-26
| | | | | | | | | | | | | | | | This patch adds board specific r-standby resume code for ms7724se. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: SH-Mobile R-standby register save/restoreMagnus Damm2010-02-26
| | | | | | | | | | | | | | | | Add code to save/restore registers during R-standby sleep on SH-Mobile processors. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * clocksource: Fix up a registration/IRQ race in the sh drivers.Paul Mundt2010-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All of the SH clocksource drivers follow the scheme that the IRQ is setup prior to registering the clockevent. The interrupt handler in the clockevent cases looks to the event handler function pointer being filled in by the registration code, permitting us to get in to situations where asserted IRQs step in to the handler before registration has had a chance to complete and hitting a NULL pointer deref. In practice this is not an issue for most platforms, but some of them with fairly special loaders (or that are chain-loading from another kernel) may enter in to this situation. This fixes up the oops reported by Rafael on hp6xx. Reported-and-tested-by: Rafael Ignacio Zurita <rafaelignacio.zurita@gmail.com> Cc: stable@kernel.org Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: ms7724: modify scan_timing for KEYSCKuninori Morimoto2010-02-25
| | | | | | | | | | | | | | | | KEYSC::SCN register of SH7724 is 3bit. Thus, scan_timing should be 0 - 7 here. Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: ms7724: Add sh_sir supportKuninori Morimoto2010-02-25
| | | | | | | | | | Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: mach-ecovec24: Add sh_sir supportKuninori Morimoto2010-02-25
| | | | | | | | | | Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: wire up SET/GET_UNALIGN_CTL.Paul Mundt2010-02-22
| | | | | | | | | | | | | | | | | | | | This hooks up the SET/GET_UNALIGN_CTL knobs cribbing the bulk of it from the PPC and ia64 implementations. The thread flags happen to be the logical inverse of what the global fault mode is set to, so this works out pretty cleanly. By default the global fault mode is used, with tasks now being able to override their own settings via prctl(). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: allow alignment fault mode to be configured at kernel boot.Paul Mundt2010-02-22
| | | | | | | | | | | | | | Follow the ARM change, which is what our alignment helpers are based on in the first place. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: sh7724: Update FSI/SPU2 clockKuninori Morimoto2010-02-22
| | | | | | | | | | | | | | | | | | | | When FSI and Network (= NFS file system) were used at the same time, the I/O of FSI was unstable. This patch updates the SPU2 clock (which is used for FSI) to solve this issue. Special thanks to Jeremy. Signed-off-by: Jeremy Baker <Jeremy.Baker@renesas.com> Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: always enable sh7724 vpu_clk and set to 166MHz on EcovecMagnus Damm2010-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | Update the sh7724 processor code to always enable vpu_clk. On the Ecovec board, set the vpu_clk to 166 Mhz. The 166MHz setting results in a divide-by-6 setup for vpu_clk and improves the VPU performance compared to the power-on-reset/bootloader configuration. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: add sh7724 kick callback to clk_div4_tableMagnus Damm2010-02-22
| | | | | | | | | | | | | | | | | | | | | | This patch adds a ->kick() callback to clk_div4_table and ties it into sh_clk_div4_set_rate(). A sh7724 specific kick function is also added that updates the KICK bit whenever div4 clocks in FRQCRA and FRQCRB have been set. Allows us to set the VPU clock. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: introduce struct clk_div4_tableMagnus Damm2010-02-22
| | | | | | | | | | | | | | | | | | | | This patch introduces struct clk_div4_table. The structure will be used to keep div4 specific data, and is with this patch replacing the struct clk_div_mult_table pointer arg used by the sh_clk_div4_register() functions. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: clock-cpg div4 set_rate() shift fixMagnus Damm2010-02-22
| | | | | | | | | | | | | | | | Make sure the div4 bitfield is shifted according to the enable_bit value in sh_clk_div4_set_rate(). Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Turn on speculative return for SH7785 and SH7786Matt Fleming2010-02-18
| | | | | | | | | | Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * Merge branch 'sh/pmb-dynamic'Paul Mundt2010-02-18
| |\
| | * sh: Merge legacy and dynamic PMB modes.Paul Mundt2010-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements a bit of rework for the PMB code, which permits us to kill off the legacy PMB mode completely. Rather than trusting the boot loader to do the right thing, we do a quick verification of the PMB contents to determine whether to have the kernel setup the initial mappings or whether it needs to mangle them later on instead. If we're booting from legacy mappings, the kernel will now take control of them and make them match the kernel's initial mapping configuration. This is accomplished by breaking the initialization phase out in to multiple steps: synchronization, merging, and resizing. With the recent rework, the synchronization code establishes page links for compound mappings already, so we build on top of this for promoting mappings and reclaiming unused slots. At the same time, the changes introduced for the uncached helpers also permit us to dynamically resize the uncached mapping without any particular headaches. The smallest page size is more than sufficient for mapping all of kernel text, and as we're careful not to jump to any far off locations in the setup code the mapping can safely be resized regardless of whether we are executing from it or not. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: Use uncached I/O helpers in PMB setup.Paul Mundt2010-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PMB code is an example of something that spends an absurd amount of time running uncached when only a couple of operations really need to be. This switches over to the shiny new uncached helpers, permitting us to spend far more time running cached. Additionally, MMUCR twiddling is perfectly safe from cached space given that it's paired with a control register barrier, so fix that up, too. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: Provide uncached I/O helpers.Paul Mundt2010-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | There are lots of registers that can only be updated from the uncached mapping, so we add some helpers for those cases in order to make it easier to ensure that we only make the jump when it's absolutely necessary. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: PMB locking overhaul.Paul Mundt2010-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | This implements some locking for the PMB code. A high level rwlock is added for dealing with rw accesses on the entry map while a per-entry data structure spinlock is added to deal with the PMB entry changing out from underneath us. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: Fix up dynamically created write-through PMB mappings.Paul Mundt2010-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Write-through PMB mappings still require the cache bit to be set, even if they're to be flagged with a different cache policy and bufferability bit. To reduce some of the confusion surrounding the flag encoding we centralize the cache mask based on the system cache policy while we're at it. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: Build PMB entry links for existing contiguous multi-page mappings.Paul Mundt2010-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | This plugs in entry sizing support for existing mappings and then builds on top of that for linking together entries that are mapping contiguous areas. This will ultimately permit us to coalesce mappings and promote head pages while reclaiming PMB slots for dynamic remapping. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: uncached mapping helpers.Paul Mundt2010-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | This adds some helper routines for uncached mapping support. This simplifies some of the cases where we need to check the uncached mapping boundaries in addition to giving us a centralized location for building more complex manipulation on top of. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: PMB tidying.Paul Mundt2010-02-17
| | | | | | | | | | | | | | | | | | | | | Some overdue cleanup of the PMB code, killing off unused functionality and duplication sprinkled about the tree. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: Fix up more 64-bit pgprot truncation on SH-X2 TLB.Paul Mundt2010-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * sh: Setup boot CPU VBR early to enable early page faults.Paul Mundt2010-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | vmemmap and the vmsplit code amongst others need to be able to take page faults much earlier than trap_init() time, so move this in to the early CPU initialization. VBR setup for secondary CPUs is already handled through start_secondary(), so we only need to do this for the boot CPU. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: Kill off some superfluous legacy PMB special casing.Paul Mundt2010-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | The __va()/__pa() offsets and the boot memory offsets are consistent for all PMB users, so there is no need to special case these for legacy PMB. Kill the special casing off and depend on CONFIG_PMB across the board. This also fixes up yet another addressing bug for sh64. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: Merge the legacy PMB mapping and entry synchronization code.Paul Mundt2010-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | This merges the code for iterating over the legacy PMB mappings and the code for synchronizing software state with the hardware mappings. There's really no reason to do the same iteration twice, and this also buys us the legacy entry logging facility for the dynamic PMB case. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: Prevent fixed slot PMB remapping from clobbering boot entries.Paul Mundt2010-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PMB initialization code walks the entries and synchronizes the software PMB state with the hardware mappings, preserving the slot index. Unfortunately pmb_alloc() only tested the bit position in the entry map and failed to set it, resulting in subsequent remaps being able to be dynamically assigned a slot that trampled an existing boot mapping with general badness ensuing. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: fix sh7723 SDHI support using INTC force_disableMagnus Damm2010-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the sh7723 INTC tables with force_enable support to mask out pending unsupported SDHI interrupt sources. Without this patch the kernel locks up due to a pending SDHI interrupt that the tmio_mmc driver cannot handle. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: fix sh7722 SDHI support using INTC force_disableMagnus Damm2010-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the sh7722 INTC tables with force_enable support to mask out pending unsupported SDHI interrupt sources. Without this patch the kernel locks up due to a pending SDHI interrupt that the tmio_mmc driver cannot handle. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Use dummy_irq_chip for INTC redirect vectors.Paul Mundt2010-02-16
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Presently there's an ordering issue with the chained handler change which places the set_irq_chip() after set_irq_chained_handler(). This causes a warning to be emitted as the IRQ chip needs to be set first. However, there is the caveat that redirect IRQs can't use the parent IRQ's irq chip as they are just dummy redirects, resulting in intc_enable() blowing up when set_irq_chained_handler() attempts to start up the redirect IRQ. In these cases we can just use dummy_irq_chip directly, as we already extract the parent IRQ and chip from the redirect handler. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Fix zImage boot using fixed PMB.Nobuhiro Iwamatsu2010-02-15
| | | | | | | | | | | | Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com> Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: fix sh7724 SDHI support using INTC force_disableMagnus Damm2010-02-15
| | | | | | | | | | | | | | | | | | | | | | Update the sh7724 INTC tables with force_enable support to mask out pending unsupported SDHI interrupt sources. Without this patch the kernel locks up due to a pending SDHI interrupt that the tmio_mmc driver cannot handle. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: extend INTC with force_disableMagnus Damm2010-02-15
| | | | | | | | | | | | | | | | | | Extend the shared INTC code with force_disable support to allow keeping mask bits statically disabled. Needed for SDHI support to mask out unsupported interrupt sources. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * video: sh_mobile_lcdcfb: Fix panning.Phil Edworthy2010-02-15
| | | | | | | | | | | | | | | | | | | | | | | | Fixed SH-Mobile panning. Previously the address of the frame to be displayed was updated in the VSync end interrupt. This meant there was a minimum of 1 frame bewteen calling FBIOPAN_DISPLAY ioctl and the pan occuring. This meant that apps were not able to use the FBIO_WAITFORVSYNC ioctl to wait for the pan to complete. This patch moves the write to LDSA1R mirror reg into the pan ioctl. Tested on MS7724 board against 2.6.33-rc7 Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * video: sh_mobile_lcdcfb: Add wait for vsync.Phil Edworthy2010-02-15
| | | | | | | | | | | | | | | | Added FBIO_WAITFORVSYNC ioctl for SH-Mobile devices. Tested on MS7724 and MigoR boards against 2.6.33-rc7. Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Fix up legacy PMB mode offset calculation.Paul Mundt2010-02-15
| | | | | | | | | | | | | | The change for fixing up sh64 inadvertently inverted the logic for legacy PMB, fix that back up. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * Merge branch 'sh/stable-updates'Paul Mundt2010-02-15
| |\
| * | sh64: fix up memory offset calculation.Paul Mundt2010-02-12
| | | | | | | | | | | | | | | | | | | | | The linker script offsets were broken by the recent 29/32-bit integration, so this fixes it up for sh64. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Isolate uncached mapping support.Paul Mundt2010-02-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | This splits out the uncached mapping support under its own config option, presently only used by 29-bit mode and 32-bit + PMB. This will make it possible to optionally add an uncached mapping on sh64 as well as booting without an uncached mapping for 32-bit. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: update sdk7786 defconfig.Paul Mundt2010-02-10
| | | | | | | | | | | | | | | | | | This plugs in USB and PCI and other bits for SDK7786. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Fix up multi-resource mapping for SH7786 PCIe.Paul Mundt2010-02-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reworks some of the SH7786 PCIe initialization code to dynamically setup and size the various resource windows, as opposed to the original code that simply wired in a couple of them statically. At the same time, we tidy up the initialization code a bit, kill off some read-only register twiddling that was gleaned from the bus analyzer, and also propagate the physical slot/channel mapping. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: break out enable/reparent div4 clocks on sh7723Magnus Damm2010-02-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | Break out sh7723 div4 clocks for SIU and IRDA as reparent / enable clocks. Similar to the SIU clock patch for sh7722 by Guennadi. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: fix INTC to use set_irq_chained_handler() for redirectsMagnus Damm2010-02-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch updates the shared INTC code to use set_irq_chained_handler() for intc_redirect_irq(). With this in place request_irq() on a merged irq which has been redirected will now return -EINVAL instead of 0 together with a crash. This thanks to the protection of the IRQ_NOREQUEST flag set for chained interrupt handlers. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: sh7724/Ecovec24/KFR2R09/MS7724SE SDHI vector mergeMagnus Damm2010-02-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | Merge the SDHI vectors in the sh7724 INTC table and update the SDHI platform data for Ecovec24, KFR2R09 and MS7724SE. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: sh7723/AP325 SDHI vector mergeMagnus Damm2010-02-09
| | | | | | | | | | | | | | | | | | | | | | | | Merge the SDHI vectors in the sh7723 INTC table and update the SDHI platform data for AP325. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>