1. 08 1月, 2009 4 次提交
    • T
      powerpc/fsl-booke: Remove num_tlbcam_entries · 6fd8be4b
      Trent Piepho 提交于
      This is a global variable defined in fsl_booke_mmu.c with a value that gets
      initialized in assembly code in head_fsl_booke.S.
      
      It's never used.
      
      If some code ever does want to know the number of entries in TLB1, then
      "numcams = mfspr(SPRN_TLB1CFG) & 0xfff", is a whole lot simpler than a
      global initialized during kernel boot from assembly.
      Signed-off-by: NTrent Piepho <tpiepho@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      6fd8be4b
    • T
      powerpc/fsl-booke: Don't hard-code size of struct tlbcam · 19f5465e
      Trent Piepho 提交于
      Some assembly code in head_fsl_booke.S hard-coded the size of struct tlbcam
      to 20 when it indexed the TLBCAM table.  Anyone changing the size of struct
      tlbcam would not know to expect that.
      
      The kernel already has a system to get the size of C structures into
      assembly language files, asm-offsets, so let's use it.
      
      The definition of the struct gets moved to a header, so that asm-offsets.c
      can include it.
      Signed-off-by: NTrent Piepho <tpiepho@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      19f5465e
    • T
      powerpc/fsl-pci: Set relaxed ordering on prefetchable ranges · 565f3764
      Trent Piepho 提交于
      Provides a small speedup when accessing pefetchable ranges.  To indicate
      that a memory range is prefetchable, mark it in the dts file with 42000000
      instead of 02000000.
      
      A powepc pci_controller is allowed three memory ranges, any of which may be
      prefetchable.  However, the PCI-PCI bridge configuration space only has one
      field for "non-prefetchable memory behind bridge", which has a 32 bit
      address, and one field for "prefetchable memory behind bridge", which may
      have a 64 bit address.  These are PCI bus addresses, not CPU physical
      addresses.
      
      So really you're only allowed one memory range of each type.  And if you
      want the range at a PCI address above 32 bits you must make it
      prefetchable.
      Signed-off-by: NTrent Piepho <tpiepho@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      565f3764
    • T
      powerpc/fsl-pci: Better ATMU setup for 85xx/86xx · a097a78c
      Trent Piepho 提交于
      The code that sets up the outbound ATMU windows, which is used to map CPU
      physical addresses into PCI bus addresses where BARs will be mapped, didn't
      work so well.
      
      For one, it leaked the ioremap() of the ATMU registers.  Another small bug
      was the high 20 bits of the PCI bus address were left as zero.  It's legal
      for prefetchable memory regions to be above 32 bits, so the high 20 bits
      might not be zero.
      
      Mainly, it couldn't handle ranges that were not a power of two in size or
      were not naturally aligned.  The ATMU windows have these requirements (size
      & alignment), but the code didn't bother to check if the ranges it was
      programming met them.  If they didn't, the windows would silently be
      programmed incorrectly.
      
      This new code can handle ranges which are not power of two sized nor
      naturally aligned.  It simply splits the ranges into multiple valid ATMU
      windows.  As there are only four windows, pooly aligned or sized ranges
      (which didn't even work before) may run out of windows.  In this case an
      error is printed and an effort is made to disable the unmapped resources.
      
      An improvement that could be made would be to make use of the default
      outbound window.  Iff hose->pci_mem_offset is zero, then it's possible that
      some or all of the ranges might not need an outbound window and could just
      use the default window.
      
      The default ATMU window can support a pci_mem_offset less than zero too,
      but pci_mem_offset is unsigned.  One could say the abilities allowed a
      powerpc pci_controller is neither subset nor a superset of the abilities of
      a Freescale PCIe controller.  Thankfully, the most useful bits are in the
      intersection of the two abilities.
      Signed-off-by: NTrent Piepho <tpiepho@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      a097a78c
  2. 07 1月, 2009 3 次提交
  3. 05 1月, 2009 1 次提交
  4. 01 1月, 2009 32 次提交