1. 08 1月, 2009 1 次提交
    • 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. 01 1月, 2009 2 次提交
    • A
      take init_fs to saner place · 18d8fda7
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      18d8fda7
    • N
      shrink struct dentry · c2452f32
      Nick Piggin 提交于
      struct dentry is one of the most critical structures in the kernel. So it's
      sad to see it going neglected.
      
      With CONFIG_PROFILING turned on (which is probably the common case at least
      for distros and kernel developers), sizeof(struct dcache) == 208 here
      (64-bit). This gives 19 objects per slab.
      
      I packed d_mounted into a hole, and took another 4 bytes off the inline
      name length to take the padding out from the end of the structure. This
      shinks it to 200 bytes. I could have gone the other way and increased the
      length to 40, but I'm aiming for a magic number, read on...
      
      I then got rid of the d_cookie pointer. This shrinks it to 192 bytes. Rant:
      why was this ever a good idea? The cookie system should increase its hash
      size or use a tree or something if lookups are a problem. Also the "fast
      dcookie lookups" in oprofile should be moved into the dcookie code -- how
      can oprofile possibly care about the dcookie_mutex? It gets dropped after
      get_dcookie() returns so it can't be providing any sort of protection.
      
      At 192 bytes, 21 objects fit into a 4K page, saving about 3MB on my system
      with ~140 000 entries allocated. 192 is also a multiple of 64, so we get
      nice cacheline alignment on 64 and 32 byte line systems -- any given dentry
      will now require 3 cachelines to touch all fields wheras previously it
      would require 4.
      
      I know the inline name size was chosen quite carefully, however with the
      reduction in cacheline footprint, it should actually be just about as fast
      to do a name lookup for a 36 character name as it was before the patch (and
      faster for other sizes). The memory footprint savings for names which are
      <= 32 or > 36 bytes long should more than make up for the memory cost for
      33-36 byte names.
      
      Performance is a feature...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      c2452f32
  4. 31 12月, 2008 15 次提交
    • A
      powerpc/qe: Select QE_USB with USB_GADGET_FSL_QE · 068e8c9d
      Anton Vorontsov 提交于
      Boards should know when QE_USB is used, so that they can configure USB
      clocks and pins.
      
      Another option would be to add 'select QE_USB' into USB_GADGET_FSL_QE,
      but selects are evil since they don't support dependencies.
      
      While at it, also remove 'host' from the symbol description, since the
      QE_USB code is used to support the gadget driver as well.
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      068e8c9d
    • J
      powerpc/85xx: Add local_irq_restore in error handling code · 870029a6
      Julia Lawall 提交于
      There is a call to local_irq_restore in the normal exit case, so it would
      seem that there should be one on an error return as well.
      
      The semantic patch that makes this change is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @@
      expression l;
      expression E,E1,E2;
      @@
      
      local_irq_save(l);
      ... when != local_irq_restore(l)
          when != spin_unlock_irqrestore(E,l)
          when any
          when strict
      (
      if (...) { ... when != local_irq_restore(l)
                     when != spin_unlock_irqrestore(E1,l)
      +   local_irq_restore(l);
          return ...;
      }
      |
      if (...)
      +   {local_irq_restore(l);
          return ...;
      +   }
      |
      spin_unlock_irqrestore(E2,l);
      |
      local_irq_restore(l);
      )
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      870029a6
    • K
      powerpc/85xx: Add SMP support to MPC8572 DS · 8bd3947a
      Kumar Gala 提交于
      Enable SMP support on the MPC8572 DS reference board.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      8bd3947a
    • K
      powerpc/85xx: Enable SMP support · 00c4b95c
      Kumar Gala 提交于
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      00c4b95c
    • B
      powerpc/86xx: Update 8641hpcn dts file to match latest u-boot · 47f80a32
      Becky Bruce 提交于
      The newest revision of uboot reworks the memory map for this
      board to look more like the 85xx boards.  Also, some regions
      which were far larger than the actual hardware have been scaled
      back to match the board, and the imaginary second flash bank has
      been removed. Rapidio and PCI are mutually exclusive in the hardware,
      and they now are occupying the same space in the address map.
      The Rapidio node is commented out of the .dts since PCI is the
      common use case.
      Signed-off-by: NBecky Bruce <beckyb@kernel.crashing.org>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      47f80a32
    • A
      powerpc/qe: Fix few build errors with CONFIG_QUICC_ENGINE=n · be11d3b3
      Anton Vorontsov 提交于
      Some 83xx boards were not ready for the optional QUICC Engine support.
      
      This patch fixes following build errors:
      
      arch/powerpc/platforms/built-in.o: In function `flush_disable_caches':
      (.text+0xb308): undefined reference to `par_io_data_set'
      arch/powerpc/platforms/built-in.o: In function `flush_disable_caches':
      (.text+0xb334): undefined reference to `par_io_data_set'
      arch/powerpc/platforms/built-in.o: In function `flush_disable_caches':
      (.text+0xb408): undefined reference to `qe_ic_get_high_irq'
      arch/powerpc/platforms/built-in.o: In function `flush_disable_caches':
      (.text+0xb478): undefined reference to `qe_ic_get_low_irq'
      arch/powerpc/platforms/built-in.o: In function `mpc832x_spi_init':
      mpc832x_rdb.c:(.init.text+0x574c): undefined reference to `par_io_config_pin'
      mpc832x_rdb.c:(.init.text+0x5768): undefined reference to `par_io_config_pin'
      mpc832x_rdb.c:(.init.text+0x5784): undefined reference to `par_io_config_pin'
      mpc832x_rdb.c:(.init.text+0x57a0): undefined reference to `par_io_config_pin'
      mpc832x_rdb.c:(.init.text+0x57bc): undefined reference to `par_io_config_pin'
      arch/powerpc/platforms/built-in.o:mpc832x_rdb.c:(.init.text+0x57d8): more undefined references to `par_io_config_pin' follow
      arch/powerpc/platforms/built-in.o: In function `mpc836x_rdk_init_IRQ':
      mpc836x_rdk.c:(.init.text+0x5e84): undefined reference to `qe_ic_init'
      arch/powerpc/platforms/built-in.o: In function `mpc836x_rdk_setup_arch':
      mpc836x_rdk.c:(.init.text+0x5f10): undefined reference to `qe_reset'
      make: *** [.tmp_vmlinux1] Error 1
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      be11d3b3
    • A
      powerpc/83xx: Fix few build errors with CONFIG_QUICC_ENGINE=n · 20cfb41b
      Anton Vorontsov 提交于
      Some 83xx boards were not ready for the optional QUICC Engine support.
      
      This patch fixes following build errors:
      
      arch/powerpc/platforms/built-in.o: In function `flush_disable_caches':
      (.text+0xb308): undefined reference to `par_io_data_set'
      arch/powerpc/platforms/built-in.o: In function `flush_disable_caches':
      (.text+0xb334): undefined reference to `par_io_data_set'
      arch/powerpc/platforms/built-in.o: In function `flush_disable_caches':
      (.text+0xb408): undefined reference to `qe_ic_get_high_irq'
      arch/powerpc/platforms/built-in.o: In function `flush_disable_caches':
      (.text+0xb478): undefined reference to `qe_ic_get_low_irq'
      arch/powerpc/platforms/built-in.o: In function `mpc832x_spi_init':
      mpc832x_rdb.c:(.init.text+0x574c): undefined reference to `par_io_config_pin'
      mpc832x_rdb.c:(.init.text+0x5768): undefined reference to `par_io_config_pin'
      mpc832x_rdb.c:(.init.text+0x5784): undefined reference to `par_io_config_pin'
      mpc832x_rdb.c:(.init.text+0x57a0): undefined reference to `par_io_config_pin'
      mpc832x_rdb.c:(.init.text+0x57bc): undefined reference to `par_io_config_pin'
      arch/powerpc/platforms/built-in.o:mpc832x_rdb.c:(.init.text+0x57d8): more undefined references to `par_io_config_pin' follow
      arch/powerpc/platforms/built-in.o: In function `mpc836x_rdk_init_IRQ':
      mpc836x_rdk.c:(.init.text+0x5e84): undefined reference to `qe_ic_init'
      arch/powerpc/platforms/built-in.o: In function `mpc836x_rdk_setup_arch':
      mpc836x_rdk.c:(.init.text+0x5f10): undefined reference to `qe_reset'
      make: *** [.tmp_vmlinux1] Error 1
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      20cfb41b
    • A
      powerpc/fsl_pci: Fix sparse warnings · c9dadffb
      Anton Vorontsov 提交于
      This patch fixes following sparse warnings:
      
        CHECK   fsl_pci.c
      fsl_pci.c:32:13: warning: symbol 'setup_pci_atmu' was not declared. Should it be static?
      fsl_pci.c:89:13: warning: symbol 'setup_pci_cmd' was not declared. Should it be static?
      fsl_pci.c:133:12: warning: symbol 'fsl_pcie_check_link' was not declared. Should it be static?
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      c9dadffb
    • A
      powerpc/83xx: Add USB Host support for MPC8360E-RDK boards · 25adde18
      Anton Vorontsov 提交于
      Simply add the usb node to support USB host on the MPC8360E-RDK
      boards.
      
      Currently U-Boot doesn't fill the clock-frequency property for
      timer nodes, so for now we have to fill it manually.
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      25adde18
    • A
      powerpc/83xx: Add USB Host/Gadget support for MPC8360E-MDS boards · c9c5e52d
      Anton Vorontsov 提交于
      - Update the device tree per QE USB bindings;
      - Add timer (FSL GTM) node;
      - Add gpio-controller node for BCSR13 bank (GPIOs on that bank
        are used to control the USB transceiver);
      - Set up other BCSR registers;
      - Configure the QE Par IO.
      
      The work is loosely based on Li Yang's patch[1], which was used
      to support peripheral mode only.
      
      [1] http://ozlabs.org/pipermail/linuxppc-dev/2008-August/061357.html
      
      The s-o-b line of the original patch preserved here.
      Signed-off-by: NLi Yang <leoli@freescale.com>
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      c9c5e52d
    • A
      powerpc: Implement GPIO driver for simple memory-mapped banks · 3d64de9c
      Anton Vorontsov 提交于
      The driver supports very simple GPIO controllers, that is, when a
      controller provides just a 'data' register. Such controllers may be
      found in various BCSRs (Board's FPGAs used to control board's
      switches, LEDs, chip-selects, Ethernet/USB PHY power, etc).
      
      So far we support only 1-byte GPIO banks. Support for other widths may
      be implemented when/if needed.
      
      p.s.
      To avoid "made up" compatible entries (like compatible = "simple-gpio"),
      boards must call simple_gpiochip_init() to pass the compatible string.
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      3d64de9c
    • A
      powerpc/qe: Implement QE Pin Multiplexing API · 1b9e8904
      Anton Vorontsov 提交于
      With this API we're able to set a QE pin to the GPIO mode or a dedicated
      peripheral function.
      
      The API relies on the fact that QE gpio controllers are registered. If
      they aren't, the API won't work (gracefully though).
      
      There is one caveat though: if anybody occupied the node->data before us,
      or overwrote it, then bad things will happen. Luckily this is all in the
      platform code that we fully control, so this should never happen.
      
      I could implement more checks (for example we could create a list of
      successfully registered QE controllers, and compare the node->data in the
      qe_pin_request()), but this is unneeded if nobody is going to do silly
      things behind our back.
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      1b9e8904
    • A
      powerpc/83xx: Fix sparse warnings in mpc836x_mds.c · 78c77050
      Anton Vorontsov 提交于
      This patch fixes following sparse warnings:
      
        CHECK   mpc836x_mds.c
      mpc836x_mds.c:75:12: warning: Using plain integer as NULL pointer
      mpc836x_mds.c:79:13: warning: incorrect type in assignment (different address spaces)
      mpc836x_mds.c:79:13:    expected unsigned char [usertype] *static [toplevel] bcsr_regs
      mpc836x_mds.c:79:13:    got void [noderef] <asn:2>*
      mpc836x_mds.c:105:3: warning: incorrect type in argument 1 (different address spaces)
      mpc836x_mds.c:105:3:    expected unsigned char volatile [noderef] [usertype] <asn:2>*addr
      mpc836x_mds.c:105:3:    got unsigned char [usertype] *
      mpc836x_mds.c:105:3: warning: incorrect type in argument 1 (different address spaces)
      mpc836x_mds.c:105:3:    expected unsigned char const volatile [noderef] [usertype] <asn:2>*addr
      mpc836x_mds.c:105:3:    got unsigned char [usertype] *
      mpc836x_mds.c:107:3: warning: incorrect type in argument 1 (different address spaces)
      mpc836x_mds.c:107:3:    expected unsigned char volatile [noderef] [usertype] <asn:2>*addr
      mpc836x_mds.c:107:3:    got unsigned char [usertype] *
      mpc836x_mds.c:107:3: warning: incorrect type in argument 1 (different address spaces)
      mpc836x_mds.c:107:3:    expected unsigned char const volatile [noderef] [usertype] <asn:2>*addr
      mpc836x_mds.c:107:3:    got unsigned char [usertype] *
      mpc836x_mds.c:131:11: warning: incorrect type in argument 1 (different address spaces)
      mpc836x_mds.c:131:11:    expected void volatile [noderef] <asn:2>*addr
      mpc836x_mds.c:131:11:    got unsigned char [usertype] *static [toplevel] bcsr_regs
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      78c77050
    • A
      powerpc/83xx: Fix sparse warnings in board files · 81b36a0b
      Anton Vorontsov 提交于
      This patch fixes following sparse warnings:
      
        CHECK   83xx/usb.c
      83xx/usb.c:205:5: warning: symbol 'mpc837x_usb_cfg' was not declared. Should it be static?
        CHECK   83xx/mpc831x_rdb.c
      83xx/mpc831x_rdb.c:45:13: warning: symbol 'mpc831x_rdb_init_IRQ' was not declared. Should it be static?
        CHECK   83xx/mpc832x_rdb.c
      83xx/mpc832x_rdb.c:133:13: warning: symbol 'mpc832x_rdb_init_IRQ' was not declared. Should it be static?
        CHECK   83xx/mpc832x_mds.c
      83xx/mpc832x_mds.c:68:12: warning: Using plain integer as NULL pointer
      83xx/mpc832x_mds.c:72:13: warning: incorrect type in assignment (different address spaces)
      83xx/mpc832x_mds.c:72:13:    expected unsigned char [usertype] *static [toplevel] bcsr_regs
      83xx/mpc832x_mds.c:72:13:    got void [noderef] <asn:2>*
      83xx/mpc832x_mds.c:99:11: warning: incorrect type in argument 1 (different address spaces)
      83xx/mpc832x_mds.c:99:11:    expected void volatile [noderef] <asn:2>*addr
      83xx/mpc832x_mds.c:99:11:    got unsigned char [usertype] *static [toplevel] bcsr_regs
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      81b36a0b
    • A
      powerpc: Implement get_brgfreq() and get_baudrate() stubs · a5dae76a
      Anton Vorontsov 提交于
      This is needed to not bother with ugly #ifdefs in the drivers.
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      a5dae76a
  5. 29 12月, 2008 2 次提交
  6. 25 12月, 2008 1 次提交
    • M
      [S390] arch_setup_additional_pages arguments · fc5243d9
      Martin Schwidefsky 提交于
      arch_setup_additional_pages currently gets two arguments, the binary
      format descripton and an indication if the process uses an executable
      stack or not. The second argument is not used by anybody, it could
      be removed without replacement.
      
      What actually does make sense is to pass an indication if the process
      uses the elf interpreter or not. The glibc code will not use anything
      from the vdso if the process does not use the dynamic linker, so for
      statically linked binaries the architecture backend can choose not
      to map the vdso.
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      fc5243d9
  7. 23 12月, 2008 13 次提交
  8. 21 12月, 2008 3 次提交