]> pilppa.com Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
16 years agosony-laptop: VGN-A317M hotkey support
Harald Jenny [Thu, 26 Mar 2009 12:58:18 +0000 (21:58 +0900)]
sony-laptop: VGN-A317M hotkey support

This laptop has 5 SPIC managed buttons above the keyboard:
sound + and - as well as brightness, zoom and S1.
Possibly the entire VGN-A serie behaves the same.

Signed-off-by: Harald Jenny <harald@a-little-linux-box.at>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agosony-laptop: merge Type4 into Type3
Mattia Dongili [Thu, 26 Mar 2009 12:58:17 +0000 (21:58 +0900)]
sony-laptop: merge Type4 into Type3

Creating Type4 was a mistake in the first place. Some users report that
also Type3 vaios require the same extra hotkey handling which the Type4
for was menat to guard from.
Merging down Type4 into Type3 will just remove a useless distinction.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agosony-laptop: Add support for extended hotkeys
Matthew Garrett [Thu, 26 Mar 2009 12:58:16 +0000 (21:58 +0900)]
sony-laptop: Add support for extended hotkeys

Recent Sony SR-series machines have an additional set of buttons accessed
via the 0x127 method rather than the 0x100 method. Add support for these.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agosony-laptop: Add rfkill support on new models
Matthew Garrett [Thu, 26 Mar 2009 12:58:15 +0000 (21:58 +0900)]
sony-laptop: Add rfkill support on new models

Newer Vaios provide a full featured rfkill implementation via their
platform methods. Add support for enumerating the available devices and
providing rfkill access to them. Support for the physical kill switch is
added, with the devices moving into the HARD_BLOCKED state when toggled.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agosony-laptop: Add support for extra keyboard events
Matthew Garrett [Thu, 26 Mar 2009 12:58:14 +0000 (21:58 +0900)]
sony-laptop: Add support for extra keyboard events

The current sony-laptop code assumes that the keyboard event method is
always located at slot 2 in the platform code. Remove this assumption and
add support for some additional hotkeys.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agosony-laptop: Enable EC on newer hardware
Matthew Garrett [Thu, 26 Mar 2009 12:58:13 +0000 (21:58 +0900)]
sony-laptop: Enable EC on newer hardware

The latest Vaios can execute certain codepaths in two ways - either using
system management mode or using pure ACPI methods. The latter is only used
if the OS has called the ECON method. Ensure that this is done where the
method is available.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agosony-laptop: Add support for new Sony platform API
Matthew Garrett [Thu, 26 Mar 2009 12:58:12 +0000 (21:58 +0900)]
sony-laptop: Add support for new Sony platform API

Newer Sony Vaios provide a new API for accessing platform functionality. It
consists of a set of standardised methods for enabling events and performing
queries. These are each identified by a unique handle. This patch adds
support for calling functions based on their handle and ports the existing
code for these machines over to it.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPICA: Update version to 20090320
Bob Moore [Mon, 23 Mar 2009 01:30:27 +0000 (09:30 +0800)]
ACPICA: Update version to 20090320

Version 20090320.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPICA: Fix index value in package warning message
Bob Moore [Thu, 19 Mar 2009 02:14:45 +0000 (10:14 +0800)]
ACPICA: Fix index value in package warning message

For predefined method validation. Index value in warning message
could be off by one.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPICA: FADT: Favor 32-bit FACS and DSDT addresses
Bob Moore [Thu, 19 Mar 2009 02:13:40 +0000 (10:13 +0800)]
ACPICA: FADT: Favor 32-bit FACS and DSDT addresses

If both the 32-bit and 64-bit addresses are non-null, use the
32-bit address. Provides Windows compatibility.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPICA: FADT: Favor 32-bit register addresses for compatibility
Bob Moore [Thu, 19 Mar 2009 02:12:13 +0000 (10:12 +0800)]
ACPICA: FADT: Favor 32-bit register addresses for compatibility

Use the 32-bit register addresses whenever they are non-zero. This
means that the 32-bit addresses are favored over the 64-bit
(GAS) addresses. The 64-bit addresses are only used if the 32-bit
addresses are zero. This change provides compatibility with all
versions of Windows. The worst case that this solves is when both
the 32-bit and 64-bit addresses are non-zero, but only the 32-bit
addresses are actually valid. This appears to happen in some
BIOSes because in this case, Windows uses the 32-bit addresses.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPICA: Fix PCI configuration space port address range
Bob Moore [Thu, 19 Mar 2009 01:54:31 +0000 (09:54 +0800)]
ACPICA: Fix PCI configuration space port address range

Microsoft website uses 0xCF8-0xD00. Should be 0xCF8-0xCFF (Two
32-bit registers.)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPICA: Condense some protected ports
Bob Moore [Thu, 19 Mar 2009 01:53:35 +0000 (09:53 +0800)]
ACPICA: Condense some protected ports

One entry in the protected port table eliminated. Added extra
comments to describe each table entry.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPICA: Remove unused code, no functional change
Bob Moore [Thu, 19 Mar 2009 01:52:34 +0000 (09:52 +0800)]
ACPICA: Remove unused code, no functional change

Removed unused code for dump of args and locals. General cleanup
and splitting of long lines.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPICA: Clear PM register write-only bits on reading
Lin Ming [Thu, 19 Mar 2009 01:51:01 +0000 (09:51 +0800)]
ACPICA: Clear PM register write-only bits on reading

Affects PM1 Control register only. When reading the register, zero
the write-only bits as per the ACPI spec.  ACPICA BZ 443. Lin Ming.

http://www.acpica.org/bugzilla/show_bug.cgi?id=443

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPICA: Remove obsolete acpi_os_validate_address interface
Bob Moore [Thu, 19 Mar 2009 01:47:16 +0000 (09:47 +0800)]
ACPICA: Remove obsolete acpi_os_validate_address interface

This interface is no longer necessary. Requests should be validated
on a per-field basis, not on the entire operation region.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPICA: New: I/O port protection
Bob Moore [Thu, 19 Mar 2009 01:37:47 +0000 (09:37 +0800)]
ACPICA: New: I/O port protection

Protect certain I/O ports from reads/writes. Provides MS
compatibility. New module, hwvalid.c

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPICA: Preserve all PM control reserved and ignored bits
Bob Moore [Fri, 13 Mar 2009 01:10:46 +0000 (09:10 +0800)]
ACPICA: Preserve all PM control reserved and ignored bits

As per the ACPI specification, preserve (read/modify/write) all
bits that are defined as either reserved or ignored (PM control
control registers only.)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPICA: Change handling of PM1 Status register ignored bit
Bob Moore [Mon, 9 Mar 2009 08:32:20 +0000 (16:32 +0800)]
ACPICA: Change handling of PM1 Status register ignored bit

Ignored bits must be preserved according to the ACPI spec.
Usually this means a read/modify/write when writing to the
register.  However, for status registers, writing a one means
clear the event.  Writing a zero means preserve the event (do not
clear.) This behavior is clarified in the ACPI 4.0 spec, and the
ACPICA code now simply always writes a zero to the ignored bit.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPICA: Fix AcpiWalkNamespace race condition with table unload
Bob Moore [Mon, 9 Mar 2009 08:31:04 +0000 (16:31 +0800)]
ACPICA: Fix AcpiWalkNamespace race condition with table unload

Added a reader/writer locking mechanism to allow multiple
concurrent namespace walks (readers), but a dynamic table unload
will have exclusive access to the namespace. This fixes a problem
where a table unload could delete the portion of the namespace that
is currently being examined by a walk.  Adds a new file, utlock.c
that implements the reader/writer lock mechanism. ACPICA BZ 749.

http://www.acpica.org/bugzilla/show_bug.cgi?id=749

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPICA: FADT: Fix extraneous length mismatch warning
Bob Moore [Fri, 6 Mar 2009 02:09:00 +0000 (10:09 +0800)]
ACPICA: FADT: Fix extraneous length mismatch warning

Incorrect register length mismatch between the 32 and 64 bit
registers in some cases. Code was was checking the wrong pointer
for non-zero, should be looking at the address within the GAS
structure.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPICA: Formatting update - no functional changes
Bob Moore [Fri, 6 Mar 2009 02:05:18 +0000 (10:05 +0800)]
ACPICA: Formatting update - no functional changes

Split long lines, update comments.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPICA: Add manifest constants for bit register values
Bob Moore [Fri, 6 Mar 2009 01:49:25 +0000 (09:49 +0800)]
ACPICA: Add manifest constants for bit register values

Add and deploy constants for the PM status/enable/control
registers.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoavr32: at32ap700x: setup DMA for AC97C in the machine code
Hans-Christian Egtvedt [Tue, 24 Mar 2009 12:59:23 +0000 (13:59 +0100)]
avr32: at32ap700x: setup DMA for AC97C in the machine code

This patch will adjust the setup the DMA controller for the AC97
Controller in the at32ap700x machine code. This setup matches the new
ALSA driver for the AC97C.

The struct ac97c_platform_data has been moved into its own header file
located in the sound include path.

Tested on ATSTK1006 + ATSTK1000.

This patch will setup the AC97 controller properly for the adjusted
machine code. Both EVKLCD10x and Hammerhead board has been updated.

Tested on EVKLCD10x, and copied to Hammerhead board.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
[haavard.skinnemoen@atmel.com: fold with board code update]
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
16 years agoavr32: at32ap700x: setup DMA for ABDAC in the machine code
Hans-Christian Egtvedt [Tue, 24 Mar 2009 12:59:22 +0000 (13:59 +0100)]
avr32: at32ap700x: setup DMA for ABDAC in the machine code

This patch will adjust the setup the DMA controller for the Audio
Bistream DAC in the at32ap700x machine code. This setup matches the new
ALSA driver for the ABDAC.

Tested on ATSTK1006 + ATSTK1000.

This patch will setup the needed platform data for the Audio Bistream
DAC used by the Favr-32 board.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
[haavard.skinnemoen@atmel.com: fold board code update]
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
16 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux...
Haavard Skinnemoen [Fri, 27 Mar 2009 15:14:38 +0000 (16:14 +0100)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into avr32-arch

16 years agoAdd Merisc board support
Jonas Larsson [Fri, 27 Mar 2009 09:18:14 +0000 (10:18 +0100)]
Add Merisc board support

Merisc is the family name for a range of AVR32-based boards.

The boards are designed to be used in a man-machine interfacing
environment, utilizing a touch-based graphical user interface. They host
a vast range of I/O peripherals as well as a large SDRAM & Flash memory
bank.

For more information see: http://www.martinsson.se/merisc

Signed-off-by: Jonas Larsson <jonas.larsson@martinsson.se>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
16 years agoimxfb: Fix TFT mode
Sascha Hauer [Thu, 26 Mar 2009 11:38:26 +0000 (12:38 +0100)]
imxfb: Fix TFT mode

We read from the PCR reg to determine whether to use TFT mode or not.
This is not possible because it may not have been initialized with
the correct value yet. Select it using fbi->pcr instead.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
16 years agoi.MX21/27: remove ifdef CONFIG_FB_IMX
Sascha Hauer [Thu, 26 Mar 2009 11:23:23 +0000 (12:23 +0100)]
i.MX21/27: remove ifdef CONFIG_FB_IMX

Compile in the framebuffer device unconditionally to fix pcm038
compilation without framebuffer support.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
16 years agoimxfb: add clock support
Sascha Hauer [Thu, 15 Jan 2009 14:21:00 +0000 (15:21 +0100)]
imxfb: add clock support

v2: Added change from Martin Fuzzey: pixclock should be in pico seconds
    instead of MHz.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
16 years agomxc: add arch_reset() function
Ilya Yanok [Mon, 2 Mar 2009 23:49:23 +0000 (02:49 +0300)]
mxc: add arch_reset() function

This patch adds arch_reset() function for all mxc platforms.

It also removes (unsused) arch/arm/mach-mx2/system.c file.

This patch has been tested on i.MX1/27/31/35

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
16 years agoclkdev: add possibility to get a clock based on the device name
Sascha Hauer [Sat, 7 Mar 2009 11:55:49 +0000 (12:55 +0100)]
clkdev: add possibility to get a clock based on the device name

This adds clk_get_sys to get a clock without the associated struct
device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
16 years agoi.MX1: remove fb support from mach-imx
Sascha Hauer [Wed, 25 Mar 2009 18:46:48 +0000 (19:46 +0100)]
i.MX1: remove fb support from mach-imx

The lack of an include file currently breaks compilation of
mx1ads_defconfig. As framebuffer support is not actively used for
mach-imx and the whole architecture will be replaced by mach-mx1
soon, just remove fb support.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
16 years agoide: keep track of number of bytes instead of sectors in struct ide_cmd
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:47 +0000 (12:46 +0100)]
ide: keep track of number of bytes instead of sectors in struct ide_cmd

* Pass number of bytes instead of sectors to ide_init_sg_cmd().

* Pass number of bytes to process to ide_pio_sector() and rename
  it to ide_pio_bytes().

* Rename ->nsect field to ->nbytes in struct ide_cmd and use
  ->nbytes, ->nleft and ->cursg_ofs to keep track of number of
  bytes instead of sectors.

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove ide_execute_pkt_cmd() (v2)
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:47 +0000 (12:46 +0100)]
ide: remove ide_execute_pkt_cmd() (v2)

* Pass command structure to ide_execute_command() and skip
  __ide_set_handler() for ATAPI protocols on non-DRQ devices.

* Convert ide_issue_pc() to always use ide_execute_command()
  and remove no longer needed ide_execute_pkt_cmd().

v2:
* Fix for non-DRQ devices (based on report from Borislav).

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add ->dma_timer_expiry method and remove ->dma_exec_cmd one (v2)
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:47 +0000 (12:46 +0100)]
ide: add ->dma_timer_expiry method and remove ->dma_exec_cmd one (v2)

* Rename dma_timer_expiry() to ide_dma_sff_timer_expiry() and export it.

* Add ->dma_timer_expiry method and use it to set hwif->expiry for
  ATA_PROT_DMA protocol in do_rw_taskfile().

* Initialize ->dma_timer_expiry to ide_dma_sff_timer_expiry() for SFF hosts.

* Move setting hwif->expiry from ide_execute_command() to its users and drop
  'expiry' argument.

* Use ide_execute_command() instead of ->dma_exec_cmd in do_rw_taskfile().

* Remove ->dma_exec_cmd method and its implementations.

* Unexport ide_execute_command() and ide_dma_intr().

v2:
* Fix CONFIG_BLK_DEV_IDEDMA=n build (noticed by Randy Dunlap).

* Fix *dma_expiry naming (suggested by Sergei Shtylyov).

There should be no functional changes caused by this patch.

Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: set hwif->expiry prior to calling [__]ide_set_handler()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:46 +0000 (12:46 +0100)]
ide: set hwif->expiry prior to calling [__]ide_set_handler()

* Set hwif->expiry prior to calling [__]ide_set_handler()
  and drop 'expiry' argument.

* Set hwif->expiry to NULL in ide_{timer_expiry,intr}()
  and remove 'hwif->expiry = NULL' assignments.

There should be no functional changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: use do_rw_taskfile() for ATA_CMD_PACKET commands
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:46 +0000 (12:46 +0100)]
ide: use do_rw_taskfile() for ATA_CMD_PACKET commands

* Pass command to ide_issue_pc() and update ->do_request methods
  in ide-{cd,floppy,tape}.c accordingly.

* Convert ide_pktcmd_tf_load() to ide_init_packet_cmd() which
  just initializes command structure and use do_rw_taskfile()
  to load ATA_CMD_PACKET commands.

While at it:

* Rename ide{floppy,tape}_issue_pc() to ide_{floppy,tape}_issue_pc().

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: pass command to ide_map_sg()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:46 +0000 (12:46 +0100)]
ide: pass command to ide_map_sg()

* Set IDE_TFLAG_WRITE flag and ->rq also for ATA_CMD_PACKET
  commands.

* Pass command to ->dma_setup method and update all its
  implementations accordingly.

* Pass command instead of request to ide_build_sglist(),
  *_build_dmatable() and ide_map_sg().

While at it:

* Fix scc_dma_setup() documentation + use ATA_DMA_WR define.

* Rename sgiioc4_build_dma_table() to sgiioc4_build_dmatable(),
  change return value type to 'int' and drop unused 'ddir'
  argument.

* Do some minor cleanups in [tx4939]ide_dma_setup().

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove ide_end_request()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:45 +0000 (12:46 +0100)]
ide: remove ide_end_request()

* Add ide_rq_bytes() helper.

* Add blk_noretry_request() quirk to ide_complete_rq() (currently only fs
  requests can be marked as "noretry" so there is no change in behavior).

* Switch current ide_end_request() users to use ide_complete_rq().

  [ No need to check for rq->nr_sectors == 0 in {ide_dma,task_pio}_intr(),
    nsectors == 0 in cdrom_end_request() and err == 0 in ide_do_devset(). ]

* Remove no longer needed ide_end_request().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: use ide_end_rq() in ide_complete_rq()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:44 +0000 (12:46 +0100)]
ide: use ide_end_rq() in ide_complete_rq()

This results in PIO->DMA retry being triggered also on completion
of requests using ide_complete_rq() instead of ide_end_request().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: pass number of bytes to complete to ide_complete_rq()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:44 +0000 (12:46 +0100)]
ide: pass number of bytes to complete to ide_complete_rq()

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove BUG() from ide_complete_rq()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:44 +0000 (12:46 +0100)]
ide: remove BUG() from ide_complete_rq()

It is no longer needed so remove it, also while at it dequeue the request
only on blk_end_request() success and make ide_complete_rq() return an error
value.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: move rq->errors quirk out from ide_end_request()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:43 +0000 (12:46 +0100)]
ide: move rq->errors quirk out from ide_end_request()

Move rq->errors quirk out from ide_end_request() to its call sites.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: pass error value to ide_complete_rq()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:43 +0000 (12:46 +0100)]
ide: pass error value to ide_complete_rq()

Set rq->errors at ide_complete_rq() call sites and then pass
error value to ide_complete_rq().

[ Some rq->errors assignments look really wrong but this patch
  leaves them alone to not introduce too many changes at once. ]

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: sanitize ide_end_rq()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:43 +0000 (12:46 +0100)]
ide: sanitize ide_end_rq()

* Move 'uptodate' quirk from ide_end_rq() to its users.

* Move quirks for blk_noretry_request() and !blk_fs_request()
  requests from ide_end_rq() to ide_end_request().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add ide_end_rq() (v2)
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:42 +0000 (12:46 +0100)]
ide: add ide_end_rq() (v2)

* Move request dequeuing from __ide_end_request() to ide_end_request().

* Rename __ide_end_request() to ide_end_rq() and export it.

* Fix ide_end_rq() to pass original blk_end_request() return value.

* ide_end_dequeued_request() is used only in cdrom_end_request()
  so inline it there and then remove the function.

v2:
* Remove needless BUG_ON() while at it (start_request()'s one is enough).

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: make ide_special_rq() BUG() on unknown requests
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:42 +0000 (12:46 +0100)]
ide: make ide_special_rq() BUG() on unknown requests

If unknown request reaches this function something is _seriously_ wrong.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: sanitize ide_finish_cmd()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:42 +0000 (12:46 +0100)]
ide: sanitize ide_finish_cmd()

* Move ide_end_request() call out from ide_finish_cmd() to its users.

* Use ide_finish_cmd() in task_no_data_intr().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: use ide_complete_cmd() for REQ_UNPARK_HEADS
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:42 +0000 (12:46 +0100)]
ide: use ide_complete_cmd() for REQ_UNPARK_HEADS

* Fixup ->tf_flags in ide_do_park_unpark() to match their current use.

* Use ide_complete_cmd() for REQ_UNPARK_HEADS.

While at it:

* No need to read Error register for PM requests in task_no_data_intr().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: use ide_complete_cmd() for head unload commands
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:41 +0000 (12:46 +0100)]
ide: use ide_complete_cmd() for head unload commands

Move handling of head unload commands from task_no_data_intr()
to ide_complete_cmd() and then use ide_complete_cmd() also for
head unload commands.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: task_error() -> task_error_cmd()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:41 +0000 (12:46 +0100)]
ide: task_error() -> task_error_cmd()

* Move ide_error() call from task_error() to task_pio_intr()
  (the only user).

* Drop no longer used arguments from task_error().

* Rename task_error() to ide_error_cmd().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: unify exit paths in task_pio_intr()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:41 +0000 (12:46 +0100)]
ide: unify exit paths in task_pio_intr()

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: inline task_in_unexpected() into task_pio_intr()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:39 +0000 (12:46 +0100)]
ide: inline task_in_unexpected() into task_pio_intr()

task_in_unexpected() is only used by task_pio_intr() so inline it there.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: merge task_{in,out}_intr()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:39 +0000 (12:46 +0100)]
ide: merge task_{in,out}_intr()

* Merge task_out_intr() with task_in_intr().

* Rename task_in_intr() to task_pio_intr().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: use ata_tf_protocols enums
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:39 +0000 (12:46 +0100)]
ide: use ata_tf_protocols enums

* Add IDE_TFLAG_MULTI_PIO taskfile flag and set it for commands
  using multi-PIO protocol.

* Use ata_tf_protocols enums instead of TASKFILE_* defines to
  denote command's protocol and then rename ->data_phase field
  to ->protocol.

* Remove no longer needed <linux/hdreg.h> includes.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: set IDE_TFLAG_WRITE basing on data phase used in ide_taskfile_ioctl()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:38 +0000 (12:46 +0100)]
ide: set IDE_TFLAG_WRITE basing on data phase used in ide_taskfile_ioctl()

Also take care of fixing up incorrect TASKFILE_IN_DMA[Q] data phase when
IDE_DRIVE_TASK_RAW_WRITE is requested (no need to do it for TASKFILE_NO_DATA
and TASKFILE_[MULTI]_IN -- it had no chance of working previously).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: move command related fields from ide_hwif_t to struct ide_cmd
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:38 +0000 (12:46 +0100)]
ide: move command related fields from ide_hwif_t to struct ide_cmd

* Move command related fields from ide_hwif_t to struct ide_cmd.

* Make ide_init_sg_cmd() take command and sectors number as arguments.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: pass command instead of request to ide_pio_datablock()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:38 +0000 (12:46 +0100)]
ide: pass command instead of request to ide_pio_datablock()

* Add IDE_TFLAG_FS taskfile flag and set it for REQ_TYPE_FS requests.

* Convert ->{in,out}put_data methods to take command instead of request
  as an argument.  Then convert pre_task_out_intr(), task_end_request(),
  task_error(), task_in_unexpected(), ide_pio_sector(), ide_pio_multi()
  and ide_pio_datablock() in similar way.

* Rename task_end_request() to ide_finish_cmd().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove ide_task_t typedef
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:37 +0000 (12:46 +0100)]
ide: remove ide_task_t typedef

While at it:
- rename struct ide_task_s to struct ide_cmd
- remove stale comments from idedisk_{read_native,set}_max_address()
- drop unused 'cmd' argument from ide_{cmd,task}_ioctl()
- drop unused 'task' argument from tx4939ide_tf_load_fixup()
- rename ide_complete_task() to ide_complete_cmd()
- use consistent naming for struct ide_cmd variables

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: call ide_build_sglist() prior to ->dma_setup (v2)
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:37 +0000 (12:46 +0100)]
ide: call ide_build_sglist() prior to ->dma_setup (v2)

* Re-map sg table if needed in ide_build_sglist().

* Move ide_build_sglist() call from ->dma_setup to its users.

* Un-export ide_build_sglist().

v2:
* Build fix for CONFIG_BLK_DEV_IDEDMA=n (noticed by Randy Dunlap).

There should be no functional changes caused by this patch.

Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: use blk_fs_request() check in ide-taskfile.c
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:37 +0000 (12:46 +0100)]
ide: use blk_fs_request() check in ide-taskfile.c

Use blk_fs_request() in ide-taskfile.c instead of checking for:
- rq->bio in ide_pio_datablock() and task_error()
- rq->cmd_type == REQ_TYPE_ATA_TASKFILE in task_end_request()

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: return request status from ->pc_callback method
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:36 +0000 (12:46 +0100)]
ide: return request status from ->pc_callback method

Make ->pc_callback method return request status and then move
the request completion from ->pc_callback to ide_pc_intr().

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove ->end_request method
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:36 +0000 (12:46 +0100)]
ide: remove ->end_request method

* Handle completion of private driver requests explicitly
  for ide_floppy and ide_tape media in ide_kill_rq().

* Remove no longer needed ->end_request method.

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-{floppy,tape}: cleanup ide*_end_request()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:34 +0000 (12:46 +0100)]
ide-{floppy,tape}: cleanup ide*_end_request()

* ide*_end_request() is only called with uptodate == 0 or uptodate == 1
  so cleanup it accordingly.

* Inline ide*_end_request() content at call sites so the only user left
  is ->end_request method.

* ->end_request is now used only for private driver requests so remove
  handling of other requests from ide*_end_request().

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: use ->end_request only for private device driver requests
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:34 +0000 (12:46 +0100)]
ide: use ->end_request only for private device driver requests

* Move IDE{FLOPPY,TAPE}_ERROR_* defines to <linux/ide.h> and rename them
  to IDE_DRV_ERROR_*.

* Handle ->end_request special cases for floppy/tape media in ide_kill_rq().

* Call ->end_request only for private device driver requests.

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: move ->failed_pc to ide_drive_t
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:34 +0000 (12:46 +0100)]
ide: move ->failed_pc to ide_drive_t

Move ->failed_pc from struct ide_{disk,tape}_obj to ide_drive_t.

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: remove superfluous tape->lock
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:33 +0000 (12:46 +0100)]
ide-tape: remove superfluous tape->lock

tape->lock is not needed (->queue_lock protects queue).

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: remove superfluous check from ide_floppy_end_request()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:33 +0000 (12:46 +0100)]
ide-floppy: remove superfluous check from ide_floppy_end_request()

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove no longer needed PC_FLAG_TIMEDOUT packet command flag
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:33 +0000 (12:46 +0100)]
ide: remove no longer needed PC_FLAG_TIMEDOUT packet command flag

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoau1xxx-ide: auide_dma_end() cleanup
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:33 +0000 (12:46 +0100)]
au1xxx-ide: auide_dma_end() cleanup

No need to check / clear hwif->sg_nents.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agotrm290: trm290_dma_setup() fix
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:32 +0000 (12:46 +0100)]
trm290: trm290_dma_setup() fix

Re-map sg table if necessary (not that it really matters since
DMA support is disabled currently).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoicside: icside_dma_setup() fixes
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:32 +0000 (12:46 +0100)]
icside: icside_dma_setup() fixes

Check for ide_build_sglist() return value and re-map sg table if necessary.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: move smart_enable() call out from get_smart_data()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:32 +0000 (12:46 +0100)]
ide: move smart_enable() call out from get_smart_data()

Move smart_enable() call out from get_smart_data() to
proc_idedisk_read_smart().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove ->data_phase field from ide_hwif_t
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:32 +0000 (12:46 +0100)]
ide: remove ->data_phase field from ide_hwif_t

* Always use hwif->task->data_phase and remove ->data_phase
  field from ide_hwif_t.

* Remove superfluous REQ_TYPE_ATA_TASKFILE check from
  ide_pio_datablock() while at it.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: no need to read Status and Error registers for "empty" taskfile requests
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:31 +0000 (12:46 +0100)]
ide: no need to read Status and Error registers for "empty" taskfile requests

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: move request type specific code from ide_end_drive_cmd() to callers (v3)
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:31 +0000 (12:46 +0100)]
ide: move request type specific code from ide_end_drive_cmd() to callers (v3)

* Move request type specific code from ide_end_drive_cmd() to callers.

* Remove stale ide_end_drive_cmd() documentation and drop no longer
  used 'stat' argument.  Then rename the function to ide_complete_rq().

v2:
* Fix handling of blk_pm_request() requests in task_no_data_intr().

v3:
* Some ide_no_data_taskfile() users (HPA code and HDIO_DRIVE_* ioctls
  handlers) access original command later so we need to update it in
  ide_complete_task().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: factor out completion of taskfile from ide_end_drive_cmd()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:29 +0000 (12:46 +0100)]
ide: factor out completion of taskfile from ide_end_drive_cmd()

Factor out completion of taskfile from ide_end_drive_cmd()
to ide_complete_task().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: complete power step in ide_complete_pm_request()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:29 +0000 (12:46 +0100)]
ide: complete power step in ide_complete_pm_request()

* Complete power step in ide_complete_pm_request().

* Rename ide_complete_pm_request() to ide_complete_pm_rq().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add "flagged" taskfile flags to struct ide_taskfile (v2)
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:28 +0000 (12:46 +0100)]
ide: add "flagged" taskfile flags to struct ide_taskfile (v2)

* Add ->ftf_flags field to struct ide_taskfile
  and convert flags for TASKFILE ioctl to use it.

* Rename "flagged" taskfile flags:
  - IDE_TFLAG_FLAGGED -> IDE_FTFLAG_FLAGGED
  - IDE_TFLAG_FLAGGED_SET_IN_FLAGS -> IDE_FTFLAG_SET_IN_FLAGS
  - IDE_TFLAG_{OUT,IN}_DATA -> IDE_FTFLAG_{OUT,IN}_DATA

v2:
* Remember to fully update ide-h8300.c, scc_pata.c and tx493{8,9}ide.c
  (thanks to Stephen Rothwell for noticing).

There should be no functional changes caused by this patch.

Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add IDE_HFLAG_4DRIVES host flag
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:28 +0000 (12:46 +0100)]
ide: add IDE_HFLAG_4DRIVES host flag

Add IDE_HFLAG_4DRIVES host flag and use it instead of ide_4drives
chipset type in ide_init_port().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add IDE_HFLAG_DTC2278 host flag
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:28 +0000 (12:46 +0100)]
ide: add IDE_HFLAG_DTC2278 host flag

Add IDE_HFLAG_DTC2278 host flag and use it instead of ide_dtc2278
chipset type in ide_init_port().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove now superfluous check from ide_host_register()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:27 +0000 (12:46 +0100)]
ide: remove now superfluous check from ide_host_register()

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: allow host drivers to specify IRQ flags
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:27 +0000 (12:46 +0100)]
ide: allow host drivers to specify IRQ flags

* Add ->irq_flags field to struct ide_port_info and struct ide_host.

* Update host drivers and IDE PCI code to use ->irq_flags field.

* Convert init_irq() and ide_intr() to use host->irq_flags.

This fixes handling of shared IRQs for non-PCI hosts
and removes ugly ifdeffery from core IDE code.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: fix error message in pre_task_out_intr()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:27 +0000 (12:46 +0100)]
ide: fix error message in pre_task_out_intr()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: fix memleak on failure in probe_for_drive()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:26 +0000 (12:46 +0100)]
ide: fix memleak on failure in probe_for_drive()

Always free drive->id in probe_for_drive() if device is not present.

While at it:
- remove dead IDE_DFLAG_DEAD flag
- remove superfluous IDE_DFLAG_PRESENT check

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoscc_pata: remove DECLARE_SCC_DEV() macro (v2)
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:26 +0000 (12:46 +0100)]
scc_pata: remove DECLARE_SCC_DEV() macro (v2)

v2:
scc_chipsets[] -> scc_chipset fix (spotted by Daniel K.).

Cc: "Daniel K." <daniel@cluded.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: include <asm/ide.h> only when needed
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:26 +0000 (12:46 +0100)]
ide: include <asm/ide.h> only when needed

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoat91_ide: use readsw()/writesw() directly
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:24 +0000 (12:46 +0100)]
at91_ide: use readsw()/writesw() directly

Use readsw()/writesw() directly intead of __ide_mm_{in,out}sw() macros.

Cc: Stanislaw Gruszka <stf_xl@wp.pl>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: use ide_drive_t's rq in cdrom_queue_request_sense
Borislav Petkov [Tue, 27 Jan 2009 16:42:28 +0000 (17:42 +0100)]
ide-cd: use ide_drive_t's rq in cdrom_queue_request_sense

There should be no functionality change resulting from this patch.

Suggested-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoIDE: palm_bk3710: use ioremap instead of arch-specific IO_ADDRESS()
Kevin Hilman [Fri, 30 Jan 2009 19:59:27 +0000 (11:59 -0800)]
IDE: palm_bk3710: use ioremap instead of arch-specific IO_ADDRESS()

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
[bart: minor CodingStyle fixup per Sergei's suggestion]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: cleanup <asm-m68k/ide.h>
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:23 +0000 (12:46 +0100)]
ide: cleanup <asm-m68k/ide.h>

* Remove superfluous <asm/macints.h> include.

* No need to re-define in/out*() macros as they are no longer used
  by m68k host drivers.

* readl() and writel() are not used by core IDE code.

* Use raw_*_swapw() directly in {falcon,q40}ide.c and remove
  {in,out}sw_swapw() macros.

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitz@debian.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: make m68k host drivers use IDE_HFLAG_MMIO
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:23 +0000 (12:46 +0100)]
ide: make m68k host drivers use IDE_HFLAG_MMIO

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitz@debian.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove IDE_ARCH_LOCK (v2)
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:22 +0000 (12:46 +0100)]
ide: remove IDE_ARCH_LOCK (v2)

* Add ->{get,release}_lock methods to struct ide_port_info
  and struct ide_host.

* Convert core IDE code, m68k IDE code and falconide support to use
  ->{get,release}_lock methods instead of ide_{get,release}_lock().

* Remove IDE_ARCH_LOCK.

v2:
* Build fix from Geert updating ide_{get,release}_lock() callers in
  falconide.c.

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitz@debian.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove IDE_ARCH_INTR (v2)
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:21 +0000 (12:46 +0100)]
ide: remove IDE_ARCH_INTR (v2)

This micro-optimization is not worth it.  Just always check for
existence of ->ack_intr method in ide_intr() and ide_timer_expiry().

v2:
Fix brown-paper-bag bug spotted by David D. Kilzer.

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitz@debian.org>
Cc: "David D. Kilzer" <ddkilzer@kilzer.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: improve debugging scheme
Borislav Petkov [Fri, 2 Jan 2009 12:34:47 +0000 (13:34 +0100)]
ide: improve debugging scheme

and more specifically, push __func__ into debug
macro thus making ide_debug_log() calls shorter and more readable.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
16 years agoide: move ->rqsize init from init_irq() to ide_init_port()
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:18 +0000 (12:46 +0100)]
ide: move ->rqsize init from init_irq() to ide_init_port()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agomacide: use struct ide_port_info
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:18 +0000 (12:46 +0100)]
macide: use struct ide_port_info

This fixes hwif->channel and drive->dn assignments.

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agobuddha: use struct ide_port_info
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:18 +0000 (12:46 +0100)]
buddha: use struct ide_port_info

This fixes hwif->channel and drive->dn assignments.

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-pnp: use struct ide_port_info
Bartlomiej Zolnierkiewicz [Fri, 27 Mar 2009 11:46:18 +0000 (12:46 +0100)]
ide-pnp: use struct ide_port_info

This fixes hwif->channel and drive->dn assignments.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>