1. 29 5月, 2008 1 次提交
    • S
      [POWERPC] Refactor DCR code · b786af11
      Stephen Neuendorffer 提交于
      Previously, DCR support was configured at compile time to either use
      MMIO or native dcr instructions.  Although this works for most
      platforms, it fails on FPGA platforms:
      
      1) Systems may include more than one DCR bus.
      2) Systems may be native DCR capable and still use memory mapped DCR interface.
      
      This patch provides runtime support based on the device trees for the
      case where CONFIG_PPC_DCR_MMIO and CONFIG_PPC_DCR_NATIVE are both
      selected.  Previously, this was a poorly defined configuration, which
      happened to provide NATIVE support.  The runtime selection is made
      based on the dcr-controller having a 'dcr-access-method' attribute
      in the device tree.  If only one of the above options is selected,
      then the code uses #defines to select only the used code in order to
      avoid introducing overhead in existing usage.
      Signed-off-by: NStephen Neuendorffer <stephen.neuendorffer@xilinx.com>
      Signed-off-by: NJosh Boyer <jwboyer@linux.vnet.ibm.com>
      b786af11
  2. 16 10月, 2007 2 次提交
    • M
      Use dcr_host_t.base in dcr_unmap() · cdbd3865
      Michael Ellerman 提交于
      With the base stored in dcr_host_t, there's no need for callers to pass
      the dcr_n into dcr_unmap(). In fact this removes the possibility of them
      passing the incorrect value, which would then be iounmap()'ed.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      cdbd3865
    • M
      Add dcr_host_t.base in dcr_read()/dcr_write() · 83f34df4
      Michael Ellerman 提交于
      Now that all users of dcr_read()/dcr_write() add the dcr_host_t.base, we
      can save them the trouble and do it in dcr_read()/dcr_write().
      
      As some background to why we just went through all this jiggery-pokery,
      benh sayeth:
      
       Initially the goal of the dcr_read/dcr_write routines was to operate like
       mfdcr/mtdcr which take absolute DCR numbers. The reason is that on 4xx
       hardware, indirect DCR access is a pain (goes through a table of
       instructions) and it's useful to have the compiler resolve an absolute DCR
       inline.
      
       We decided that wasn't worth the API bastardisation since most places
       where absolute DCR values are used are low level 4xx-only code which may
       as well continue using mfdcr/mtdcr, while the new API is designed for
       device "instances" that can exist on 4xx and Axon type platforms and may
       be located at variable DCR offsets.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      83f34df4
  3. 03 10月, 2007 1 次提交
  4. 04 12月, 2006 1 次提交