1. 29 Jan, 2009 6 commits
    • Trent Piepho's avatar
      powerpc/fsl-booke: Make CAM entries used for lowmem configurable · 96051465
      Trent Piepho authored
      On booke processors, the code that maps low memory only uses up to three
      CAM entries, even though there are sixteen and nothing else uses them.
      
      Make this number configurable in the advanced options menu along with max
      low memory size.  If one wants 1 GB of lowmem, then it's typically
      necessary to have four CAM entries.
      Signed-off-by: default avatarTrent Piepho <tpiepho@freescale.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      96051465
    • Trent Piepho's avatar
      powerpc/fsl-booke: Allow larger CAM sizes than 256 MB · c8f3570b
      Trent Piepho authored
      The code that maps kernel low memory would only use page sizes up to 256
      MB.  On E500v2 pages up to 4 GB are supported.
      
      However, a page must be aligned to a multiple of the page's size.  I.e.
      256 MB pages must aligned to a 256 MB boundary.  This was enforced by a
      requirement that the physical and virtual addresses of the start of lowmem
      be aligned to 256 MB.  Clearly requiring 1GB or 4GB alignment to allow
      pages of that size isn't acceptable.
      
      To solve this, I simply have adjust_total_lowmem() take alignment into
      account when it decides what size pages to use.  Give it PAGE_OFFSET =
      0x7000_0000, PHYSICAL_START = 0x3000_0000, and 2GB of RAM, and it will map
      pages like this:
      PA 0x3000_0000 VA 0x7000_0000 Size 256 MB
      PA 0x4000_0000 VA 0x8000_0000 Size 1 GB
      PA 0x8000_0000 VA 0xC000_0000 Size 256 MB
      PA 0x9000_0000 VA 0xD000_0000 Size 256 MB
      PA 0xA000_0000 VA 0xE000_0000 Size 256 MB
      
      Because the lowmem mapping code now takes alignment into account,
      PHYSICAL_ALIGN can be lowered from 256 MB to 64 MB.  Even lower might be
      possible.  The lowmem code will work down to 4 kB but it's possible some of
      the boot code will fail before then.  Poor alignment will force small pages
      to be used, which combined with the limited number of TLB1 pages available,
      will result in very little memory getting mapped.  So alignments less than
      64 MB probably aren't very useful anyway.
      Signed-off-by: default avatarTrent Piepho <tpiepho@freescale.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      c8f3570b
    • Trent Piepho's avatar
      powerpc/fsl-booke: Remove code duplication in lowmem mapping · f88747e7
      Trent Piepho authored
      The code to map lowmem uses three CAM aka TLB[1] entries to cover it.  The
      size of each is stored in three globals named __cam0, __cam1, and __cam2.
      All the code that uses them is duplicated three times for each of the three
      variables.
      
      We have these things called arrays and loops....
      
      Once converted to use an array, it will be easier to make the number of
      CAMs configurable.
      Signed-off-by: default avatarTrent Piepho <tpiepho@freescale.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      f88747e7
    • Kumar Gala's avatar
      powerpc/fsl-booke: Cleanup init/exception setup to be runtime · 105c31df
      Kumar Gala authored
      We currently have a few variants of fsl-booke processors (e500v1, e500v2,
      e500mc, and e200).  They all have minor differences that we had previously
      been handling via ifdefs.
      
      To move towards having this support the following changes have been made:
      
      * PID1, PID2 only exist on e500v1 & e500v2 and should not be accessed on
        e500mc or e200.  We use MMUCFG[NPIDS] to determine which case we are
        since we only touch PID1/2 in extremely early init code.
      
      * Not all IVORs exist on all the processors so introduce cpu_setup
        functions for each variant to setup the proper IVORs that are either
        unique or exist but have some variations between the processors
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      105c31df
    • Anton Vorontsov's avatar
      powerpc/83xx: Add PCI-E support for all MPC83xx boards with PCI-E · 0585a155
      Anton Vorontsov authored
      This patch adds pcie nodes to the appropriate dts files, plus adds
      some probing code for the boards.
      
      Also, remove of_device_is_avaliable() check from the mpc837x_mds.c
      board file, as mpc83xx_add_bridge() has the same check now.
      Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      0585a155
    • Anton Vorontsov's avatar
      powerpc/fsl_pci: Add MPC83xx PCI-E controller RC mode support · 598804cd
      Anton Vorontsov authored
      This patch adds support for PCI-Express controllers as found on the
      newer MPC83xx chips.
      
      The work is loosely based on the Tony Li's patch[1], but unlike the
      original patch, this patch implements sliding window for the Type 1
      transactions using outbound window translations, so we don't have to
      ioremap the whole PCI-E configuration space.
      
      [1] http://ozlabs.org/pipermail/linuxppc-dev/2008-January/049028.htmlSigned-off-by: default avatarTony Li <tony.li@freescale.com>
      Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      598804cd
  2. 28 Jan, 2009 34 commits