1. 24 7月, 2010 1 次提交
  2. 22 5月, 2010 1 次提交
  3. 18 5月, 2010 1 次提交
  4. 13 5月, 2010 1 次提交
    • P
      driver core: Early dev_name() depends on slab_is_available(). · 06fe53be
      Paul Mundt 提交于
      The early dev_name() setup needs to do an allocation which can only be
      satisfied under slab_is_available() conditions. Some of the early
      platform drivers may be initialized before this point, and those still
      need to contend themselves with an empty dev_name.
      
      This fixes up a regression with the SH earlyprintk which was bailing out
      prior to hitting the early probe path due to not being able to satisfy
      the early allocation. Other early platform drivers (such as the early
      timers) that need to match the dev name are sufficiently late that
      allocations are already possible.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      06fe53be
  5. 11 5月, 2010 1 次提交
  6. 29 3月, 2010 1 次提交
  7. 19 3月, 2010 2 次提交
  8. 10 3月, 2010 1 次提交
    • P
      driver core: Early dev_name() support. · a636ee7f
      Paul Mundt 提交于
      Presently early platform devices suffer from the fact they are unable to
      use dev_xxx() calls early on due to dev_name() and others being
      unavailable at the time ->probe() is called.
      
      This implements early init_name construction from the matched name/id
      pair following the semantics of the late device/driver match. As a
      result, matched IDs (inclusive of requested ones) are preserved when the
      handoff from the early platform code happens at kobject initialization
      time.
      
      Since we still require kmalloc slabs to be available at this point, using
      kstrdup() for establishing the init_name works fine. This subsequently
      needs to be tested from dev_name() prior to the init_name being cleared
      by the driver core. We don't kfree() since others will already have a
      handle on the string long before the kobject initialization takes place.
      
      This is also needed to permit drivers to use the clock framework early,
      without having to manually construct their own device IDs from the match
      id/name pair locally (needed by the early console and timer code on sh
      and arm).
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a636ee7f
  9. 08 3月, 2010 3 次提交
  10. 24 12月, 2009 1 次提交
  11. 12 12月, 2009 1 次提交
    • M
      Driver Core: Early platform driver buffer · c60e0504
      Magnus Damm 提交于
      Add early_platform_init_buffer() support and update the
      early platform driver code to allow passing parameters
      to the driver on the kernel command line.
      
      early_platform_init_buffer() simply allows early platform
      drivers to provide a pointer and length to a memory area
      where the remaining part of the kernel command line option
      will be stored.
      
      Needed to pass baud rate and other serial port options
      to the reworked early serial console code on SuperH.
      Signed-off-by: NMagnus Damm <damm@opensource.se>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c60e0504
  12. 31 10月, 2009 1 次提交
  13. 16 9月, 2009 1 次提交
  14. 23 8月, 2009 1 次提交
  15. 11 8月, 2009 1 次提交
    • M
      PM / Driver Core: Kill dev_pm_ops platform warning for now · 651b1f12
      Magnus Damm 提交于
      Commit 783ea7d4
      (Driver Core: Rework platform suspend/resume, print warning)
      added a warning message printed for platform drivers that use the
      legacy PM callbacks rather than struct dev_pm_ops.  Unfortunately,
      this resulted in some confusion and made some people try to convert
      drivers by replacing the old callbacks with struct dev_pm_ops in
      automatic way, which generally is not a good idea.
      
      Remove the platform device runtime dev_pm_ops warning for now,
      because it's annoying to users and it's not really necessary right
      now.
      
      [rjw: Modified the changelog to be more informative.]
      Signed-off-by: NMagnus Damm <damm@igel.co.jp>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      651b1f12
  16. 25 7月, 2009 1 次提交
  17. 24 7月, 2009 1 次提交
  18. 22 7月, 2009 1 次提交
  19. 16 6月, 2009 2 次提交
  20. 13 6月, 2009 1 次提交
  21. 09 5月, 2009 3 次提交
    • G
      Revert driver core: move platform_data into platform_device · e67c8562
      Greg Kroah-Hartman 提交于
      This reverts commit 006f4571:
      
      	This patch moves platform_data from struct device into
      	struct platform_device, based on the two ideas:
      
      	1. Now all platform_driver is registered by platform_driver_register,
      	   which makes probe()/release()/... of platform_driver passed parameter
      	   of platform_device *, so platform driver can get platform_data from
      	   platform_device;
      
      	2. Other kind of devices do not need to use platform_data, we can
      	   decrease size of device if moving it to platform_device.
      
      	Taking into consideration of thousands of files to be fixed and they
      	can't be finished in one night(maybe it will take a long time), so we
      	keep platform_data in device to allow two kind of cases coexist until
      	all platform devices pass its platfrom data from
      	platform_device->platform_data.
      
      	All patches to do this kind of conversion are welcome.
      
      As we don't really want to do it, it was a bad idea.
      
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Ming Lei <tom.leiming@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      e67c8562
    • M
      Revert driver core: fix passing platform_data · bee86321
      Ming Lei 提交于
      This reverts commit ce21c7bc:
      	We will remove platform_data field from struct device until
      	all platform devices pass its specific data from platfom_device
      	and all platform drivers use platform specific data passed by
      	platform_device->platform_data. This kind of conversion will
      	need a long time, for thousands of files is affected.
      
      	To make the conversion easily, we allow platform specific data
      	passed by struct device or struct platform_device and platform
      	driver may use it from struct device or struct platform_device.
      
      As we really don't want to do this at all.
      
      
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Ming Lei <tom.leiming@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      bee86321
    • R
      Driver core: platform: fix kernel-doc warnings · d86c1302
      Randy Dunlap 提交于
      Fix function parameter notation in platform.c;
      fixes kernel-doc warnings.
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d86c1302
  22. 17 4月, 2009 1 次提交
    • M
      Driver Core: early platform driver · 13977091
      Magnus Damm 提交于
      V3 of the early platform driver implementation.
      
      Platform drivers are great for embedded platforms because we can separate
      driver configuration from the actual driver.  So base addresses,
      interrupts and other configuration can be kept with the processor or board
      code, and the platform driver can be reused by many different platforms.
      
      For early devices we have nothing today.  For instance, to configure early
      timers and early serial ports we cannot use platform devices.  This
      because the setup order during boot.  Timers are needed before the
      platform driver core code is available.  The same goes for early printk
      support.  Early in this case means before initcalls.
      
      These early drivers today have their configuration either hard coded or
      they receive it using some special configuration method.  This is working
      quite well, but if we want to support both regular kernel modules and
      early devices then we need to have two ways of configuring the same
      driver.  A single way would be better.
      
      The early platform driver patch is basically a set of functions that allow
      drivers to register themselves and architecture code to locate them and
      probe.  Registration happens through early_param().  The time for the
      probe is decided by the architecture code.
      
      See Documentation/driver-model/platform.txt for more details.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NMagnus Damm <damm@igel.co.jp>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Tejun Heo <htejun@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      13977091
  23. 25 3月, 2009 4 次提交
    • M
      driver core: fix passing platform_data · ce21c7bc
      Ming Lei 提交于
      We will remove platform_data field from struct device until
      all platform devices pass its specific data from platfom_device
      and all platform drivers use platform specific data passed by
      platform_device->platform_data. This kind of conversion will
      need a long time, for thousands of files is affected.
      
      To make the conversion easily, we allow platform specific data
      passed by struct device or struct platform_device and platform
      driver may use it from struct device or struct platform_device.
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ce21c7bc
    • M
      driver core: move platform_data into platform_device · 006f4571
      Ming Lei 提交于
      This patch moves platform_data from struct device into
      struct platform_device, based on the two ideas:
      
      1. Now all platform_driver is registered by platform_driver_register,
         which makes probe()/release()/... of platform_driver passed parameter
         of platform_device *, so platform driver can get platform_data from
         platform_device;
      
      2. Other kind of devices do not need to use platform_data, we can
         decrease size of device if moving it to platform_device.
      
      Taking into consideration of thousands of files to be fixed and they
      can't be finished in one night(maybe it will take a long time), so we
      keep platform_data in device to allow two kind of cases coexist until
      all platform devices pass its platfrom data from
      platform_device->platform_data.
      
      All patches to do this kind of conversion are welcome.
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      006f4571
    • E
      platform: introduce module id table for platform devices · 57fee4a5
      Eric Miao 提交于
      Now platform_device is being widely used on SoC processors where the
      peripherals are attached to the system bus, which is simple enough.
      
      However, silicon IPs for these SoCs are usually shared heavily across
      a family of processors, even products from different companies.  This
      makes the original simple driver name based matching insufficient, or
      simply not straight-forward.
      
      Introduce a module id table for platform devices, and makes it clear
      that a platform driver is able to support some shared IP and handle
      slight differences across different platforms (by 'driver_data').
      Module alias is handled automatically when a MODULE_DEVICE_TABLE()
      is defined.
      
      To not disturb the current platform drivers too much, the matched id
      entry is recorded and can be retrieved by platform_get_device_id().
      Signed-off-by: NEric Miao <eric.miao@marvell.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      57fee4a5
    • E
      platform: make better use of to_platform_{device,driver}() macros · 71b3e0c1
      Eric Miao 提交于
      This helps the code look more consistent and cleaner.
      Signed-off-by: NEric Miao <eric.miao@marvell.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      71b3e0c1
  24. 07 1月, 2009 2 次提交
  25. 17 10月, 2008 3 次提交
  26. 11 6月, 2008 1 次提交
  27. 11 3月, 2008 1 次提交
    • J
      drivers: fix dma_get_required_mask · e88a0c2c
      James Bottomley 提交于
      There's a bug in the current implementation of dma_get_required_mask()
      where it ands the returned mask with the current device mask.  This
      rather defeats the purpose if you're using the call to determine what
      your mask should be (since you will at that time have the default
      DMA_32BIT_MASK).  This bug results in any driver that uses this function
      *always* getting a 32 bit mask, which is wrong.
      
      Fix by removing the and with dev->dma_mask.
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      e88a0c2c
  28. 25 1月, 2008 1 次提交