summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix ohci-ssb with !CONFIG_PMAl Viro2007-10-131-0/+2
| | | | | | | | ohci_bus_{suspend,resume} exists only if we have CONFIG_PM; do the same thing as other subdrivers... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'for-linus' of ↵Linus Torvalds2007-10-131-1/+1
|\ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: mlx4_core: Fix infinite loop on device initialization
| * mlx4_core: Fix infinite loop on device initializationRoland Dreier2007-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | Commit 3d73c288 ("mlx4_core: Fix section mismatches") introduced a stupid bug in device init: when some of mlx4_init_one() was split off into __mlx4_init_one(), the call from the main mlx4_init_one() function was back to mlx4_init_one() rather than to __mlx4_init_one(), which leads to an obvious infinite loop if the function is every called. Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | i2c-nforce2: Declare PEC as supportedJean Delvare2007-10-131-0/+1
| | | | | | | | | | | | The i2c-nforce2 driver has SMBus PEC support, so it should say so. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c-nforce2: Abort the transaction on errorOleg Ryjkov2007-10-131-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch is to add an abort function that will bring back the MCP51/55 controller if it was blocked by a block-read operation, in particular. (When a slave sends a wrong byte count on a byte read, the host gets locked up). I've only tested it on an MCP51 and MCP55. However, I'm almost certain it will also work on MCP65, I just did not have the board to test it on. Thus for now the abort function will only be called if an MCP51/55 was detected. Signed-off-by: Oleg Ryjkov <olegr@olegr.ca> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c-nforce2: Move status checking to a separate functionOleg Ryjkov2007-10-131-16/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first part of the patch that adds a function to reset the nvidia MCP51/55 i2c controller, if something bad happens to it (e.g. a slave sends a wrong byte count during a block transaction). This patch just adds nforce2_check_status function. It was originally written by Hans-Frieder Vogt. The reason that I'm the one sending it is: - I relied on it for the second part of the patch, - It makes the driver code cleaner/better. Signed-off-by: Oleg Ryjkov <olegr@olegr.ca> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c-au1550: Fix a misused register problemChris David2007-10-131-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a "mis-used register" problem on the AMD MIPS Alchemy au1550 I2C interface. In summary, the programmable serial controller seems to hang the kernel when I send a single 'address' byte on the I2C bus. The patch essentially uses the PSC_SMBSTAT register's TE (transmit FIFO empty) bit to check when the transmit FIFO is empty, instead of using the PSC_SMBEVNT register's TU (transmit underflow) bit. Using the TE bit fixed the hang problem. Signed-off-by: Chris David <cd@chrisdavid.com> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c: Rename the PEC functionality bitDavid Brownell2007-10-134-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | Rename I2C_FUNC_SMBUS_HWPEC_CALC as I2C_FUNC_SMBUS_PEC, and list that functionality as always available through the software implementation. Update documentation accordingly (and list similar requirements). The way it's currently packaged doesn't present the capability in a useful way. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c-at91: Mark as brokenDavid Brownell2007-10-131-1/+9
| | | | | | | | | | | | | | | | Mark the i2c-at91 driver BROKEN in Kconfig, and explain just why it's broken. (Summary: hardware design issues.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c: Move i2c-dev interfaces to i2c-dev.hDavid Brownell2007-10-132-32/+29
| | | | | | | | | | | | | | | | | | | | Move the i2c-dev support into <linux/i2c-dev.h> where it should always have lived. Now <linux/i2c.h> no longer holds stuff related to the optional userspace /dev/i2c-X interface. Improve the descriptions for these ioctl requests. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c: Remove i2c_algorithm.algo_control()David Brownell2007-10-133-31/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes: - An effectively unused hook: i2c_algorithm.algo_control. - The i2c_control() call, used only by i2c-dev to call that unused hook or set two barely supported adapter params. (That param setting moves into i2c-dev.c ... still iffy due to lack of locking, but no other changes.) As shown by diffstat, this is a net code shrink. It also reduces the complexity of the I2C adapter and /dev interfaces. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | cx23885: Drop empty i2c algorithm control callbackJean Delvare2007-10-131-7/+0
| | | | | | | | | | | | | | | | i2c_algorithm.algo_control is about to be removed. Signed-off-by: Jean Delvare <khali@linux-fr.org> Reviewed-by: Michael Krufky <mkrufky@linuxtv.org> Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* | i2c: Remove NOP i2c_algorithm.algo_control() methodsDavid Brownell2007-10-137-56/+0
| | | | | | | | | | | | | | | | | | | | This removes NOP implementations of i2c_algorithm.algo_control. With this change, there are no implementations of this hook in the kernel.org tree ... that hook seems about ripe to remove. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c-dev: Reject I2C_M_RECV_LENDavid Brownell2007-10-131-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | The I2C_M_RECV_LEN calling convention for i2c_mesg.flags involves playing games with reported buffer lengths. (They start out less than their actual size, and the length is then modified to reflect how many bytes were delivered ... which one hopes is less than the presumed actual size.) Refuse to play such error prone games across the boundary between userspace and kernel. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c-stub: Support multiple chipsJean Delvare2007-10-132-32/+65
| | | | | | | | | | | | | | | | | | Add support for multiple chips to i2c-stub. I've changed the memory allocation scheme from static to dynamic, so that we don't waste too much memory. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Mark M. Hoffman <mhoffman@lightlink.com>
* | i2c-bfin-twi: Remove useless twi_lock mutexFrancis Moreau2007-10-131-16/+0
| | | | | | | | | | | | | | | | | | | | Remove this unneeded mutex. Indeed it was used to serialize access to the hardware, but this is already done by the i2c-core layer, see 'bus_lock' mutex used by i2c_transfer(). Signed-off-by: Francis Moreau <francis.moro@gmail.com> Acked-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c-i801: Add support for the Intel Tolapai SMBusJason Gaston2007-10-132-1/+5
| | | | | | | | | | | | | | Add the Intel Tolapai SMBus Controller DID. Signed-off-by: Jason Gaston <jason.d.gaston@intel.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c: Document struct i2c_msgDavid Brownell2007-10-132-10/+58
| | | | | | | | | | | | | | | | | | | | | | Clarify use of the I2C_M_* flags by highlighting the fact that most of them depend on I2C_FUNC_PROTOCOL_MANGLING. Also provide kerneldoc for i2c_smbus_read_block_data() and also for "struct i2c_msg". Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c/pcf8574: No arbitrary initializationJean Delvare2007-10-132-12/+10
| | | | | | | | | | | | | | | | Do not initialize the PCF8574 with an arbitrary value. Users will have to write the initial value to sysfs themselves. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Aurelien Jarno <aurelien@aurel32.net>
* | i2c: Add DaVinci I2C controller supportVladimir Barinov2007-10-134-0/+621
| | | | | | | | | | | | Signed-off-by: Vladimir Barinov <vbarinov@ru.mvista.com> Acked-by: Trilok Soni <soni.trilok@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c-ibm_iic: Add support for new-style clientsStefan Roese2007-10-131-1/+8
| | | | | | | | | | | | | | | | Use i2c_bit_add_numbered_adapter() if device id specified, so that the i2c-ibm_iic adapter works well with new-style pre-declared devices. Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c/tps65010: New-style driver updates, part 2David Brownell2007-10-134-151/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | Switch the tps65010 driver into a "new-style" I2C driver, and convert all of its in-tree users (board support for OSK, H2, H3) accordingly. That accounts for most of the board-specific code in this driver; the rest of that code is now moved into board-specific initcalls. Also remove some of the many now-superfluous #includes. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c/tps65010: New-style driver updates, part 1David Brownell2007-10-131-66/+69
| | | | | | | | | | | | | | | | | | Prepare to convert tps65010 driver to "new style" driver by changing how it references the i2c_client. This lets the eventual patch with driver and platform updates be smaller. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c-core: Make some code staticAdrian Bunk2007-10-132-6/+3
| | | | | | | | | | | | | | After the i2c-isa removal some code can become static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c: New-style devices can support driver model wakeup flagsDavid Brownell2007-10-132-4/+7
| | | | | | | | | | | | | | | | | | | | We need to be able to flag I2C devices, such as RTCs, which can issue wake events (usually through IRQ lines). This adds an i2c_board_info.flags bit, and uses it to initialize the i2c device node. (And shrinks a few lines that were overly long.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | i2c: Kill struct i2c_device_idJean Delvare2007-10-132-16/+0
| | | | | | | | | | | | | | | | | | | | I2C devices do not have any form of ID as PCI or USB devices have. No driver uses "MODULE_DEVICE_TABLE(i2c, ...)" because it doesn't make sense. So we can get rid of struct i2c_device_id and the associated support code. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Greg KH <greg@kroah.com>
* | missing includes in arch/powerpc/platforms/52xx/lite5200.cAl Viro2007-10-131-0/+2
| | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | fallout from elsa setup splitAl Viro2007-10-131-1/+1
| | | | | | | | | | | | | | ... and yes, caller wants it to return int. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | JFS: Bio cleanup: Replace missing return statementsDave Kleikamp2007-10-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | commit e30408b2a99cb7b8bf529c7dc2328a19d71894cf ("JFS: fix bio-related build breakage") removed some "return 0;" statements, rather than changing them to null returns. Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Cc: Jeff Garzik <jeff@garzik.org> Cc: Randy Dunlap <randy.dunlap@oracle.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds2007-10-133-52/+52
|\ \ | | | | | | | | | | | | | | | | | | * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] SMP: Fix use of cpumasks. [MIPS] Revert "[MIPS] tlbex.c: Cleanup __init usage." [MIPS] CFE: Add missing parenthesis.
| * | [MIPS] SMP: Fix use of cpumasks.Ralf Baechle2007-10-131-3/+3
| | | | | | | | | | | | | | | | | | Noticed by Nick Piggin <nickpiggin@yahoo.com.au>. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * | [MIPS] Revert "[MIPS] tlbex.c: Cleanup __init usage."Ralf Baechle2007-10-131-48/+48
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit aaf76a3245c02faba51c96b9a340c14d6bb0dcc0. As requested by ranck Bui-Huu <fbuihuu@gmail.com>. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * | [MIPS] CFE: Add missing parenthesis.Ralf Baechle2007-10-131-1/+1
| | | | | | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | | Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6Linus Torvalds2007-10-1341-989/+484
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (27 commits) alim15x3: remove redundant m5229_revision check sc1200: fix ->dma_base equal zero handling cs5520: fix ->dma_base equal zero handling sgiioc4: add missing ->dma_base check cs5535: add missing ->dma_base check ide: remove CONFIG_IDEDMA_IVB config option ide: change master/slave IDENTIFY order ide: move ide_config_drive_speed() calls to upper layers (take 2) pdc202xx_new: check ide_config_drive_speed() return value cs5535: check ide_config_drive_speed() return value amd74xx/via82cxxx: check ide_config_drive_speed() return value au1xxx: fix au1xxx_set_pio_mode() icside: use ide_tune_dma() ide-pmac: fix PIO setup and enable autotune ide-pmac: use ide_tune_dma() (take 2) ide-pmac: remove pmac_ide_do_setfeature() (take 2) ide-pmac: remove nIEN clearing from pmac_ide_do_setfeature() ide-pmac: use __ide_wait_stat() ide-pmac: remove extra good status wait from pmac_ide_do_setfeature() ide: add __ide_wait_stat() helper ...
| * | | alim15x3: remove redundant m5229_revision checkBartlomiej Zolnierkiewicz2007-10-131-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | init_dma_ali15x3() guarantees that hwif->dma_base will never be set for m5229_revision < 0x20 so remove redundant m5229_revision >= 0x20 check from init_hwif_common_ali15x3(). While at it remove incorrect comment. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * | | sc1200: fix ->dma_base equal zero handlingBartlomiej Zolnierkiewicz2007-10-131-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set hwif->atapi_dma/{ultra,mwdma}_mask and drive->autodma after checking that ->dma_base exists. If ->dma_base is not set (== PCI BAR4 cannot be reserved) then DMA hooks shouldn't be initialized or bad things will happen. OTOH hwif->set_{pio,dma}_mode hooks should be set even if hwif->dma_base == 0. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * | | cs5520: fix ->dma_base equal zero handlingBartlomiej Zolnierkiewicz2007-10-131-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set hwif->ide_dma_{check,on} and hwif->autodma to 1 after checking that ->dma_base exists. If ->dma_base is not set (== PCI BAR4 cannot be reserved) then DMA hooks shouldn't be initialized or bad things will happen. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * | | sgiioc4: add missing ->dma_base checkBartlomiej Zolnierkiewicz2007-10-131-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If ->dma_base is not set (== PCI BAR4 cannot be reserved) then DMA hooks shouldn't be initialized or bad things will happen. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * | | cs5535: add missing ->dma_base checkBartlomiej Zolnierkiewicz2007-10-131-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If ->dma_base is not set (== PCI BAR4 cannot be reserved) then DMA hooks shouldn't be initialized or bad things will happen. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * | | ide: remove CONFIG_IDEDMA_IVB config optionBartlomiej Zolnierkiewicz2007-10-132-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Devices which don't set word 93 validation bit should be now handled by ide-iops.c::ivb_list[] and for debugging purposes cable detection can be completely overriden with "idex=ata66" parameter. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * | | ide: change master/slave IDENTIFY orderBartlomiej Zolnierkiewicz2007-10-132-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Need to probe slave device first to make it release PDIAG- (this is required for correct device side cable detection). Based on libata commit f31f0cc2f0b7527072d94d02da332d9bb8d7d94c. Thanks to Craig for testing this patch. Cc: Craig Block <chblock3@yahoo.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * | | ide: move ide_config_drive_speed() calls to upper layers (take 2)Bartlomiej Zolnierkiewicz2007-10-1336-521/+304
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Convert {ide_hwif_t,ide_pci_device_t}->host_flag to be u16. * Add IDE_HFLAG_POST_SET_MODE host flag to indicate the need to program the host for the transfer mode after programming the device. Set it in au1xxx-ide, amd74xx, cs5530, cs5535, pdc202xx_new, sc1200, pmac and via82cxxx host drivers. * Add IDE_HFLAG_NO_SET_MODE host flag to indicate the need to completely skip programming of host/device for the transfer mode ("smart" hosts). Set it in it821x host driver and check it in ide_tune_dma(). * Add ide_set_pio_mode()/ide_set_dma_mode() helpers and convert all direct ->set_pio_mode/->speedproc users to use these helpers. * Move ide_config_drive_speed() calls from ->set_pio_mode/->speedproc methods to callers. * Rename ->speedproc method to ->set_dma_mode, make it void and update all implementations accordingly. * Update ide_set_xfer_rate() comments. * Unexport ide_config_drive_speed(). v2: * Fix issues noticed by Sergei: - export ide_set_dma_mode() instead of moving ->set_pio_mode abuse wrt to setting DMA modes from sc1200_set_pio_mode() to do_special() - check IDE_HFLAG_NO_SET_MODE in ide_tune_dma() - check for (hwif->set_pio_mode) == NULL in ide_set_pio_mode() - check for (hwif->set_dma_mode) == NULL in ide_set_dma_mode() - return -1 from ide_set_{pio,dma}_mode() if ->set_{pio,dma}_mode == NULL - don't set ->set_{pio,dma}_mode on it821x in "smart" mode - fix build problem in pmac.c - minor fixes in au1xxx-ide.c/cs5530.c/siimage.c - improve patch description Changes in behavior caused by this patch: - HDIO_SET_PIO_MODE ioctl would now return -ENOSYS for attempts to change PIO mode if it821x controller is in "smart" mode - removal of two debugging printk-s (from cs5530.c and sc1200.c) - transfer modes 0x00-0x07 passed from user space may be programmed twice on the device (not really an issue since 0x00 is not supported correctly by any host driver ATM, 0x01 is not supported at all and 0x02-0x07 are invalid) Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * | | pdc202xx_new: check ide_config_drive_speed() return valueBartlomiej Zolnierkiewicz2007-10-131-3/+3
| | | | | | | | | | | | | | | | | | | | Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * | | cs5535: check ide_config_drive_speed() return valueBartlomiej Zolnierkiewicz2007-10-131-2/+6
| | | | | | | | | | | | | | | | | | | | Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * | | amd74xx/via82cxxx: check ide_config_drive_speed() return valueBartlomiej Zolnierkiewicz2007-10-132-14/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Check ide_config_drive_speed() return value. * While at also call ide_config_drive_speed() if the transfer mode is XFER_PIO_SLOW (this case happens iff the transfer mode has already been set on the device by ide-proc.c::set_xfer_rate()) and remove redundant setting of ->{init,current}_speed. * Bump driver version. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * | | au1xxx: fix au1xxx_set_pio_mode()Bartlomiej Zolnierkiewicz2007-10-131-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set transfer mode on the device before programming the host controller for the new timings (matches what auide_tune_chipset() is doing wrt DMA modes). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * | | icside: use ide_tune_dma()Bartlomiej Zolnierkiewicz2007-10-133-44/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add "good DMA drives" hack for icside to ide-dma.c::ide_find_dma_mode() (in the long-term it should be either removed or generalized for all hosts). * Use ide_tune_dma() in icside.c::icside_dma_check(). This results in the following changes in behavior: - pre-EIDE SWDMA modes are now also respected - drive->autodma is checked instead of hwif->autodma (doesn't really matter as icside sets both to "1") * Make ide-dma.c::__ide_dma_good_drive() static and drop "__" prefix. Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * | | ide-pmac: fix PIO setup and enable autotuneBenjamin Herrenschmidt2007-10-131-8/+12
| | | | | | | | | | | | | | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * | | ide-pmac: use ide_tune_dma() (take 2)Bartlomiej Zolnierkiewicz2007-10-131-18/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add missing initialization of hwif->autodma and drive->autodma to pmac_ide_setup_dma(). * Use ide_tune_dma() in pmac_ide_dma_check(). While at it: * Fix pmac_ide_dma_check() return value if DMA mode is not programmed (should be "-1" otherwise ide_set_dma() will try to enable DMA). * Remove unnecessary drive->using_dma fiddling (->dma_off_quietly is always called before ide_set_dma() call and ide_set_dma() calls ->ide_dma_on if ->ide_dma_check returns "0"). v2: * No reason to blacklist all ide_floppy devices and the old code was always enabling DMA anyway (without even programming controller/device if the device was ide_floppy). Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * | | ide-pmac: remove pmac_ide_do_setfeature() (take 2)Bartlomiej Zolnierkiewicz2007-10-134-80/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use ide_config_drive_speed() instead of pmac_ide_do_setfeature() and remove the latter, also ide-iops.c::__ide_wait_stat() could be static again. Since for IDE PMAC host driver IDE_CONTROL_REG is always true, device's ->quirk_list is always zero and ->ide_dma_host_{on,off} are nops than the only changes in behavior are: * if PIO mode is set then ->dma_off_queitly is called to disable DMA * if setting transfer mode fails ide_dump_status() is called to dump status v2: * IDE PMAC controllers allow separate PIO and DMA timings and PPC userland depends on this fact, and calls "hdparm -p" without calling "hdparm -d". Therefore to compensate for DMA being disabled by ide_config_drive_speed() for PIO modes: - add IDE_HFLAG_SET_PIO_MODE_KEEP_DMA flag and set it in PMAC host driver - add handling of the new flag to ide-io.c::do_special() Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
OpenPOWER on IntegriCloud