1. 25 10月, 2010 1 次提交
  2. 18 10月, 2010 3 次提交
  3. 15 10月, 2010 7 次提交
    • P
      sh: clkfwk: Fix fault in frequency iterator. · e5690e0d
      Paul Mundt 提交于
      When updating the iterator macro an old argument assignment was used on
      the initial assignment causing a fault on the table rounding. Fix it up.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      e5690e0d
    • P
      sh: clkfwk: Add a helper for rate rounding by divisor ranges. · 8e122db6
      Paul Mundt 提交于
      This adds a new clk_rate_div_range_round() for implementing rate rounding
      by divisor ranges. This can be used trivially by clocks that support
      arbitrary ranged divisors without the need for rate table construction.
      
      This should only be used by clocks that both have large divisor ranges in
      addition to clocks that will never be arbitrarily scaled, as the lack of
      a backing frequency table will prevent cpufreq from being able to do much
      of anything with them.
      
      Primarily intended for use as a ->recalc helper.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      8e122db6
    • P
      sh: clkfwk: Abstract rate rounding helper. · f586903d
      Paul Mundt 提交于
      Presently the only assisted rate rounding is frequency table backed, but
      there are cases where it's impractical to use a frequency table for
      certain clocks (such as the FSIDIV case, which supports 65535 divisors),
      and we wish to reuse the same rate rounding algorithm.
      
      This breaks out the core of the rate rounding logic in to its own helper
      routine and shuffles the frequency table logic around, switching to using
      an iterator for the generic helper routine.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      f586903d
    • P
      sh: clkfwk: support clock remapping. · 28085bc5
      Paul Mundt 提交于
      This implements support for ioremapping of register windows that
      encapsulate clock control registers used by a struct clk, with
      transparent sibling inheritance.
      
      Root clocks at the top of a given topology often encapsulate the entire
      register space of all of their sibling clocks, so this mapping can be
      done once and handed down. A given clock enable/disable case maps out to
      a single bit in a shared register, so this prevents creating multiple
      overlapping mappings.
      
      The mapping case breaks down in to a couple of different situations:
      
      	- Sibling clocks without a specific mapping.
      	- Root clocks without a specific mapping.
      	- Any of sibling/root clocks with a specific mapping.
      
      Sibling clocks with no specified mapping will grovel up the clock chain
      and install the root clock mapping unconditionally at registration time.
      
      Root clocks without their own mappings have a dummy BSS-initialized
      mapping inserted that is handed down the chain just like any other
      mapping. This permits all of the sibling clock ops to read/write using
      the mapping offsets without any special configuration, enabling them to
      not care whether access ultimately goes through translatable or
      untranslatable memory.
      
      Any clock with its own mapping will have the window initialized at
      registration time and be ready for use by its clock ops. Failure to
      establish the mapping will prevent registration, so no additional sanity
      checks are needed. Sibling clocks that double as parents for the moment
      will not propagate their mapping down, but this is easily tunable if the
      need arises.
      
      All clock mappings are kref refcounted, with each instance of mapping
      inheritance incrementing the refcount.
      Tested-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      28085bc5
    • P
      sh: pci: Convert to upper/lower_32_bits() helpers. · a80be168
      Paul Mundt 提交于
      Instead of hand-rolling our own, just use the generic ones instead.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      a80be168
    • P
      sh: mach-sdk7786: Add support for the FPGA SRAM. · d8d6b902
      Paul Mundt 提交于
      This ties in the 2KiB of FPGA SRAM in to the generic SRAM pool.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      d8d6b902
    • P
      sh: Provide a generic SRAM pool for tiny memories. · c993487e
      Paul Mundt 提交于
      This sets up a generic SRAM pool for CPUs and platform code to insert
      their otherwise unused memories into. A simple alloc/free interface is
      provided (lifed from avr32) for generic code.
      
      This only applies to tiny SRAMs that are otherwise unmanaged, and does
      not take in to account the more complex SRAMs sitting behind transfer
      engines, or that employ an I/D split.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      c993487e
  4. 14 10月, 2010 4 次提交
    • P
      sh: pci: Support secondary FPGA-driven PCIe clocks on SDK7786. · b6b77b2d
      Paul Mundt 提交于
      The SDK7786 FPGA has secondary control over the PCIe clocks, specifically
      relating to the slots and oscillator. This ties the FPGA clocks in to the
      clock framework and balances the refcounting similar to how the primary
      on-chip clocks are managed. While the on-chip clocks are per-port, the
      FPGA clock enable/disable is global for the entire block.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      b6b77b2d
    • P
      sh: pci: Support slot 4 routing on SDK7786. · 61a46766
      Paul Mundt 提交于
      SDK7786 supports connecting either slot3 or 4 to the same PCIe port by
      way of FPGA muxing. By default the vertical slot 3 on the baseboard is
      enabled, so this adds in a command line option for forcibly enabling the
      slot 4 edge connector.
      
      If nothing has been specified on the command line, we fall back to
      reading the resistor values for card presence to figure out where to
      route the port to.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      61a46766
    • P
      sh: Fix up PMB locking. · f7fcec93
      Paul Mundt 提交于
      This first converts the PMB locking over to raw spinlocks, and secondly
      fixes up a nested locking issue that was triggering lockdep early on:
      
       swapper/0 is trying to acquire lock:
        (&pmbe->lock){......}, at: [<806be9bc>] pmb_init+0xf4/0x4dc
      
       but task is already holding lock:
        (&pmbe->lock){......}, at: [<806be98e>] pmb_init+0xc6/0x4dc
      
       other info that might help us debug this:
       1 lock held by swapper/0:
        #0:  (&pmbe->lock){......}, at: [<806be98e>] pmb_init+0xc6/0x4dc
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      f7fcec93
    • P
      sh: mach-sdk7786: Add support for fpga gpios. · 47da88f3
      Paul Mundt 提交于
      The sdk7786 FPGA supports a number of user settable input switches that
      are otherwise unused. This wires up a dummy gpio chip for the switch bank
      to simply expose them to userspace.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      47da88f3
  5. 13 10月, 2010 6 次提交
  6. 11 10月, 2010 1 次提交
  7. 07 10月, 2010 1 次提交
    • P
      sh: Fix up the SH-3 build. · 06c7a489
      Paul Mundt 提交于
      SH-3 lacks an MMUCR_TI definition for global TLB flushes. As SH-3 parts
      lack a split TLB, the same global flush behaviour is accomplished
      through the flush bit, which just happens to be the same as on SH-4.
      
      This fixes up the build for all SH-3 MMU parts.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      06c7a489
  8. 06 10月, 2010 4 次提交
  9. 05 10月, 2010 5 次提交
    • P
      sh: Wire up INTC subgroup splitting for SH7786 SCIF1. · d91ddc25
      Paul Mundt 提交于
      SH7786 is the big user for subgroup splitting, mostly for the PCIe block,
      but those will follow later. For now we simply split up SCIF1, as used by
      the serial console on SDK7786 and others.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      d91ddc25
    • P
      sh: intc: Split up the INTC code. · 2be6bb0c
      Paul Mundt 提交于
      This splits up the sh intc core in to something more vaguely resembling
      a subsystem. Most of the functionality was alread fairly well
      compartmentalized, and there were only a handful of interdependencies
      that needed to be resolved in the process.
      
      This also serves as future-proofing for the genirq and sparseirq rework,
      which will make some of the split out functionality wholly generic,
      allowing things to be killed off in place with minimal migration pain.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      2be6bb0c
    • P
      sh: intc: Handle early lookups of subgroup IRQs. · d74310d3
      Paul Mundt 提交于
      If lookups happen while the radix node still points to a subgroup
      mapping, an IRQ hasn't yet been made available for the specified id, so
      error out accordingly. Once the slot is replaced with an IRQ mapping and
      the tag is discarded, lookup can commence as normal.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      d74310d3
    • P
      sh: intc: Support virtual mappings for IRQ subgroups. · c1e30ad9
      Paul Mundt 提交于
      Many interrupts that share a single mask source but are on different
      hardware vectors will have an associated register tied to an INTEVT that
      denotes the precise cause for the interrupt exception being triggered.
      
      This introduces the concept of IRQ subgroups in the intc core, where
      a virtual IRQ map is constructed for each of the pre-defined cause bits,
      and a higher level chained handler takes control of the parent INTEVT.
      This enables CPUs with heavily muxed IRQ vectors (especially across
      disjoint blocks) to break things out in to a series of managed chained
      handlers while being able to dynamically lookup and adopt the IRQs
      created for them.
      
      This is largely an opt-in interface, requiring CPUs to manually submit
      IRQs for subgroup splitting, in addition to providing identifiers in
      their enum maps that can be used for lazy lookup via the radix tree.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      c1e30ad9
    • P
      sh: intc: Implement reverse mapping for IRQs to per-controller IDs. · 44629f57
      Paul Mundt 提交于
      This implements a scheme roughly analogous to the PowerPC virtual to
      hardware IRQ mapping, which we use for IRQ to per-controller ID mapping.
      This makes it possible for drivers to use the IDs directly for lookup
      instead of hardcoding the vector.
      
      The main motivation for this work is as a building block for dynamically
      allocating virtual IRQs for demuxing INTC events sharing a single INTEVT
      in addition to a common masking source.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      44629f57
  10. 04 10月, 2010 7 次提交
  11. 03 10月, 2010 1 次提交