1. 17 12月, 2008 1 次提交
  2. 31 10月, 2008 1 次提交
    • T
      gianfar: Fix race in TBI/SerDes configuration · c132419e
      Trent Piepho 提交于
      The init_phy() function attaches to the PHY, then configures the
      SerDes<->TBI link (in SGMII mode).  The TBI is on the MDIO bus with the PHY
      (sort of) and is accessed via the gianfar's MDIO registers, using the
      functions gfar_local_mdio_read/write(), which don't do any locking.
      
      The previously attached PHY will start a work-queue on a timer, and
      probably an irq handler as well, which will talk to the PHY and thus use
      the MDIO bus.  This uses phy_read/write(), which have locking, but not
      against the gfar_local_mdio versions.
      
      The result is that PHY code will try to use the MDIO bus at the same time
      as the SerDes setup code, corrupting the transfers.
      
      Setting up the SerDes before attaching to the PHY will insure that there is
      no race between the SerDes code and *our* PHY, but doesn't fix everything.
      Typically the PHYs for all gianfar devices are on the same MDIO bus, which
      is associated with the first gianfar device.  This means that the first
      gianfar's SerDes code could corrupt the MDIO transfers for a different
      gianfar's PHY.
      
      The lock used by phy_read/write() is contained in the mii_bus structure,
      which is pointed to by the PHY.  This is difficult to access from the
      gianfar drivers, as there is no link between a gianfar device and the
      mii_bus which shares the same MDIO registers.  As far as the device layer
      and drivers are concerned they are two unrelated devices (which happen to
      share registers).
      
      Generally all gianfar devices' PHYs will be on the bus associated with the
      first gianfar.  But this might not be the case, so simply locking the
      gianfar's PHY's mii bus might not lock the mii bus that the SerDes setup
      code is going to use.
      
      We solve this by having the code that creates the gianfar platform device
      look in the device tree for an mdio device that shares the gianfar's
      registers.  If one is found the ID of its platform device is saved in the
      gianfar's platform data.
      
      A new function in the gianfar mii code, gfar_get_miibus(), can use the bus
      ID to search through the platform devices for a gianfar_mdio device with
      the right ID.  The platform device's driver data is the mii_bus structure,
      which the SerDes setup code can use to lock the current bus.
      Signed-off-by: NTrent Piepho <tpiepho@freescale.com>
      CC: Andy Fleming <afleming@freescale.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      c132419e
  3. 14 10月, 2008 1 次提交
  4. 29 9月, 2008 1 次提交
  5. 17 7月, 2008 3 次提交
  6. 13 7月, 2008 1 次提交
  7. 07 6月, 2008 1 次提交
  8. 03 6月, 2008 3 次提交
  9. 02 5月, 2008 1 次提交
  10. 30 4月, 2008 1 次提交
    • J
      i2c: Convert most new-style drivers to use module aliasing · 3760f736
      Jean Delvare 提交于
      Based on earlier work by Jon Smirl and Jochen Friedrich.
      
      Update most new-style i2c drivers to use standard module aliasing
      instead of the old driver_name/type driver matching scheme. I've
      left the video drivers apart (except for SoC camera drivers) as
      they're a bit more diffcult to deal with, they'll have their own
      patch later.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: Jon Smirl <jonsmirl@gmail.com>
      Cc: Jochen Friedrich <jochen@scram.de>
      3760f736
  11. 28 4月, 2008 1 次提交
  12. 17 4月, 2008 3 次提交
  13. 06 2月, 2008 1 次提交
    • K
      [POWERPC] FSL: fix mpc83xx_spi device registration · dc4e4207
      Kim Phillips 提交于
      calling platform_device_register after platform_device_alloc causes
      this:
      
      kobject (c3841a70): tried to init an initialized object, something is seriously wrong.
      Call Trace:
      [c381fe20] [c0007bb8] show_stack+0x3c/0x194 (unreliable)
      [c381fe50] [c01322a8] kobject_init+0xb8/0xbc
      [c381fe60] [c01591cc] device_initialize+0x30/0x9c
      [c381fe80] [c015ee34] platform_device_register+0x1c/0x34
      [c381fea0] [c02f1fe0] of_fsl_spi_probe+0x21c/0x22c
      [c381ff30] [c02f2044] fsl_spi_init+0x54/0x160
      [c381ff60] [c02f3924] __machine_initcall_mpc832x_rdb_mpc832x_spi_init+0x120/0x138
      [c381ff70] [c02e61b4] kernel_init+0x98/0x284
      [c381fff0] [c000f740] kernel_thread+0x44/0x60
      
      fixed by calling platform_device_add (second half of
      platform_device_register) instead.
      Signed-off-by: NKim Phillips <kim.phillips@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      dc4e4207
  14. 28 1月, 2008 3 次提交
  15. 24 1月, 2008 3 次提交
  16. 17 1月, 2008 1 次提交
  17. 12 12月, 2007 2 次提交
    • K
      [POWERPC] FSL: enet device tree cleanups · e77b28eb
      Kumar Gala 提交于
      * Removed address fields in ethernet nodes
      * Removed #address-cells, #size-cells from gianfar nodes
      * Added cell-index to gianfar and ucc ethernet nodes
      * Added enet[0..3] labels
      * Renamed compatible node for gianfar mdio to "fsl,gianfar-mdio"
      * Removed device_type = "mdio"
      
      The matching for gianfar mdio still supports the old "mdio"/"gianfar" combo
      but it is now considered deprecated.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      e77b28eb
    • K
      [POWERPC] FSL: I2C device tree cleanups · ec9686c4
      Kumar Gala 提交于
      * Removed device_type = "i2c"
      * Added missing second I2C controller on MPC8548 CDS, MPC8544 DS
      * Added #address-cells, #size-cells, and cell-index where missing
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      ec9686c4
  18. 08 10月, 2007 2 次提交
  19. 05 10月, 2007 4 次提交
  20. 04 10月, 2007 2 次提交
    • S
      [POWERPC] Introduce new CPM device bindings. · e631ae3b
      Scott Wood 提交于
      This introduces a new device binding for the CPM and other devices on
      these boards.  Some of the changes include:
      
      1. Proper namespace scoping for Freescale compatibles and properties.
      
      2. Use compatible rather than things like device_type and model
      to determine which particular variant of a device is present.
      
      3. Give the drivers the relevant CPM command word directly, rather than
      requiring it to have a lookup table based on device-id, SCC v. SMC, and
      CPM version.
      
      4. Specify the CPCR and the usable DPRAM region in the CPM's reg property.
      
      Boards that do not require the legacy bindings should select
      CONFIG_PPC_CPM_NEW_BINDING to enable the of_platform CPM devices. Once
      all existing boards are converted and tested, the config option can
      become default y to prevent new boards from using the old model.  Once
      arch/ppc is gone, the config option can be removed altogether.
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      Acked-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      e631ae3b
    • S
      [POWERPC] CPM: Change from fsl,brg-frequency to brg/clock-frequency · 6d817aa7
      Scott Wood 提交于
      As suggested by David Gibson, now that we have a separate node
      for the baud rate generators, it's better to use the standard
      clock-frequency property than a cpm-node-level fsl,brg-frequency
      property.
      
      This patch updates existing places where fsl,brg-frequency is
      used.
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      6d817aa7
  21. 14 9月, 2007 2 次提交
  22. 18 8月, 2007 1 次提交
  23. 17 8月, 2007 1 次提交