07 Apr, 2009

2 commits


25 Mar, 2009

1 commit


02 Dec, 2008

1 commit

  • Corrects spi_imx driver oops during initialization/probing: can't use
    drv_data before it's allocated.

    Signed-off-by: Julien Boibessot
    Acked-by: Sascha Hauer
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Julien Boibessot
     

20 Nov, 2008

1 commit

  • Fix unsafe order in dma mapping operation: always flush data from the
    cache *BEFORE* invalidating it, to allow full duplex transfers where the
    same buffer may be used for both writes and reads.

    Signed-off-by: Andrea Paterniani
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Paterniani
     

07 Aug, 2008

2 commits


27 Jul, 2008

1 commit

  • Add per-device dma_mapping_ops support for CONFIG_X86_64 as POWER
    architecture does:

    This enables us to cleanly fix the Calgary IOMMU issue that some devices
    are not behind the IOMMU (http://lkml.org/lkml/2008/5/8/423).

    I think that per-device dma_mapping_ops support would be also helpful for
    KVM people to support PCI passthrough but Andi thinks that this makes it
    difficult to support the PCI passthrough (see the above thread). So I
    CC'ed this to KVM camp. Comments are appreciated.

    A pointer to dma_mapping_ops to struct dev_archdata is added. If the
    pointer is non NULL, DMA operations in asm/dma-mapping.h use it. If it's
    NULL, the system-wide dma_ops pointer is used as before.

    If it's useful for KVM people, I plan to implement a mechanism to register
    a hook called when a new pci (or dma capable) device is created (it works
    with hot plugging). It enables IOMMUs to set up an appropriate
    dma_mapping_ops per device.

    The major obstacle is that dma_mapping_error doesn't take a pointer to the
    device unlike other DMA operations. So x86 can't have dma_mapping_ops per
    device. Note all the POWER IOMMUs use the same dma_mapping_error function
    so this is not a problem for POWER but x86 IOMMUs use different
    dma_mapping_error functions.

    The first patch adds the device argument to dma_mapping_error. The patch
    is trivial but large since it touches lots of drivers and dma-mapping.h in
    all the architecture.

    This patch:

    dma_mapping_error() doesn't take a pointer to the device unlike other DMA
    operations. So we can't have dma_mapping_ops per device.

    Note that POWER already has dma_mapping_ops per device but all the POWER
    IOMMUs use the same dma_mapping_error function. x86 IOMMUs use device
    argument.

    [akpm@linux-foundation.org: fix sge]
    [akpm@linux-foundation.org: fix svc_rdma]
    [akpm@linux-foundation.org: build fix]
    [akpm@linux-foundation.org: fix bnx2x]
    [akpm@linux-foundation.org: fix s2io]
    [akpm@linux-foundation.org: fix pasemi_mac]
    [akpm@linux-foundation.org: fix sdhci]
    [akpm@linux-foundation.org: build fix]
    [akpm@linux-foundation.org: fix sparc]
    [akpm@linux-foundation.org: fix ibmvscsi]
    Signed-off-by: FUJITA Tomonori
    Cc: Muli Ben-Yehuda
    Cc: Andi Kleen
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Avi Kivity
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     

10 Jul, 2008

1 commit


05 Jul, 2008

1 commit


03 Jul, 2008

1 commit


28 Apr, 2008

1 commit

  • Updates to the i.MX SPI controller driver:

    1) Some comments changed and/or added.

    2) End of transfers is now managed on TXFIFO empty interrupt after the
    last write to TXFIFO. This speeds interrupt execution by removing
    the wait for TXFIFO to become empty. On TXFIFO empty interrupt the
    handler needs only to poll for the end of the ongoing transaction
    (SPI_CONTROL_XCH) to close the transfer.
    (2.1) Write only transfers are closed flushing RXFIFO.
    (2.2) Read transfers are closed reading trailing bytes from RXFIFO.
    (2.3) Read transfers where RXFIFO overrun occurred are closed by
    flushing RXFIFO and aborting the message.

    3) Fifos are now flushed via SPI disable after the end of ongoing
    transaction.

    Signed-off-by: Andrea Paterniani
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Paterniani
     

11 Apr, 2008

1 commit

  • Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is
    prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable SPI
    platform drivers, to allow module auto loading.

    [dbrownell@users.sourceforge.net: more drivers: registration fixes]
    Signed-off-by: Kay Sievers
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kay Sievers
     

07 Feb, 2008

1 commit

  • Remove some more references to dev->power.power_state. That field is overdue
    for removal, but we can't do that while it's still referenced in the kernel.
    The only reason to update it was to make the /sys/devices/.../power/state
    files (now removed) work better.

    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     

03 Feb, 2008

1 commit


11 Dec, 2007

1 commit


19 Oct, 2007

1 commit

  • Found these while looking at printk uses.

    Add missing newlines to dev_ uses
    Add missing KERN_ prefixes to multiline dev_s
    Fixed a wierd->weird spelling typo
    Added a newline to a printk

    Signed-off-by: Joe Perches
    Cc: "Luck, Tony"
    Cc: Jens Axboe
    Cc: Mark M. Hoffman
    Cc: Roland Dreier
    Cc: Tilman Schmidt
    Cc: David Woodhouse
    Cc: Jeff Garzik
    Cc: Stephen Hemminger
    Cc: Greg KH
    Cc: Jeremy Fitzhardinge
    Cc: Geert Uytterhoeven
    Cc: Alessandro Zummo
    Cc: David Brownell
    Cc: James Smart
    Cc: Andrew Vasquez
    Cc: "Antonino A. Daplas"
    Cc: Evgeniy Polyakov
    Cc: Russell King
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

17 Oct, 2007

2 commits

  • Make the SPI framework and drivers stop using class_device. Update docs
    accordingly ... highlighting just which sysfs paths should be
    "safe"/stable.

    Signed-off-by: Tony Jones
    Signed-off-by: David Brownell
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tony Jones
     
  • Shrink the runtime footprint of various SPI drivers:

    - Move the probe() routine into the init section where practical,
    using platform_driver_probe() to make that safe. This often saves
    around 1KB. Using platform_driver_probe() can also be a correctness
    fix, if the probe routine is already marked __init but the driver
    struct keeps a dangling pointer to it after init section removal.

    - Likewise move remove() routines into the exit sections.

    These changes would be inappropriate iff the platform devices were
    actually hotpluggable (e.g. they're found on optional addon cards,
    or in an FPGA that's dynamically reprogrammed). In these cases,
    that's not the situation; it's an SOC controller and the only device
    is initialized before these drivers.

    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     

31 Aug, 2007

1 commit

  • Update various SPI drivers so they properly support

    - coldplug through "modprobe $(cat /sys/devices/.../modalias)"

    - hotplug through "modprobe $(MODALIAS)"

    The basic rule for platform, SPI, and (new style) I2C drivers is just
    to make sure that modprobing the driver name works. In this case, all
    the relevant drivers are platform drivers, and this patch either

    (a) Changes the driver name, if no in-tree code would break;
    this is simpler and thus preferable in the long term.

    (b) Adds MODULE_ALIAS directives, when in-tree platforms declare
    devices using the current driver name; less desirable.

    Most systems will link SPI controller drivers statically, but
    there's no point in being needlessly broken.

    Signed-off-by: David Brownell
    Cc: Jean Delvare
    Acked-by: Andrei Konovalov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     

18 Jul, 2007

1 commit

  • Minor SPI controller driver updates: make the setup() methods reject
    spi->mode bits they don't support, by masking aginst the inverse of bits
    they *do* support. This insures against misbehavior later when new mode
    bits get added.

    Most controllers can't support SPI_LSB_FIRST; more handle SPI_CS_HIGH.
    Support for all four SPI clock/transfer modes is routine.

    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     

01 Jun, 2007

1 commit


21 Feb, 2007

1 commit

  • The signature of the per-device cleanup() routine changed to remove its
    const-ness. Three new SPI controller drivers now need that change, to
    eliminate build warnings.

    This also fixes a build bug with atmel_spi on AT91 systems.

    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     

13 Feb, 2007

1 commit

  • Add the SPI controller driver for Freescale i.MX(S/L/1).
    Main features summary:

    > Per chip setup via board specific code and/or protocol driver.
    > Per transfer setup.
    > PIO transfers.
    > DMA transfers.
    > Managing of NULL tx / rx buffer for rd only / wr only transfers.

    This patch replace patch-2.6.20-rc4-spi_imx with the following changes:
    > Few cosmetic changes.
    > Function map_dma_buffers now return 0 for success and -1 for failure.
    > Solved a bug inside spi_imx_probe function (wrong error path).
    > Solved a bug inside setup function (bad undo setup for max_speed_hz).
    > For read-only transfers, always write zero bytes.

    This is almost the same as the 'BIS' version sent by Andrea, except for
    updating the 'DUMMY' byte so that read-only transfers shift out zeroes.
    That part of the API changed recently, since some half duplex peripheral
    chips require that semantic.

    Signed-off-by: Andrea Paterniani
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Paterniani