dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

94464 Commits

Author SHA1 Message Date
Henrique de Moraes Holschuh 3f6cb5630a ACPI: thinkpad-acpi: fix selects in Kconfig
Add missing select for BACKLIGHT_LCD_SUPPORT, as select doesn't select the
dependencies of a symbol for us.

Also, "select INPUT" in Kconfig.  We are not an Input device, nor are we
anywhere close to the input subsystem in the Kconfig tree, so using
"depends on INPUT" is not user-friendly at all.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-29 09:47:03 -04:00
Henrique de Moraes Holschuh e0e3c0615a ACPI: thinkpad-acpi: use a private workqueue
Switch all task workers to a private thinkpad-acpi workqueue.

This way, we don't risk causing trouble for other tasks scheduled to the
default work queue, as our workers end up needing to access the ACPI EC,
run ACPI AML code, trigger SMI traps... and none of those are exactly known
to be fast, simple operations.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-29 09:47:03 -04:00
Henrique de Moraes Holschuh 10cc92759b ACPI: thinkpad-acpi: fluff really minor fix
Fix a minor (nano?) thing that bothered me at exactly at the wrong time.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-29 09:47:02 -04:00
Henrique de Moraes Holschuh 65807cc284 ACPI: thinkpad-acpi: use uppercase for "LED" on user documentation
Change all occourences of the "led" word to full uppercase in user
documentation.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-29 09:47:02 -04:00
Henrique de Moraes Holschuh af11610192 ACPI: thinkpad-acpi: add sysfs led class support to thinkpad leds (v3.2)
Add a sysfs led class interface to the led subdriver.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-29 09:47:02 -04:00
Henrique de Moraes Holschuh e306501d1c ACPI: thinkpad-acpi: add sysfs led class support for thinklight (v3.1)
Add a sysfs led class interface to the thinklight (light subdriver).

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-29 09:47:01 -04:00
Henrique de Moraes Holschuh 4fa6811b8a ACPI: thinkpad-acpi: prepare light and LED for sysfs support
Do some preparatory work to add sysfs support to the thinklight and
thinkpad leds driver.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-29 09:47:01 -04:00
Henrique de Moraes Holschuh 95e57ab2cb ACPI: thinkpad-acpi: claim tpacpi as an official short handle (v1.1)
Unfortunately, a lot of stuff in the kernel has size limitations, so
"thinkpad-acpi" ends up eating up too much real estate.  We were using
"tpacpi" in symbols already, but this shorthand was not visible to
userland.

Document that the driver will use tpacpi as a short hand where necessary,
and use it to name the kernel thread for NVRAM polling (now named
"ktpacpi_nvramd").

Also, register a module alias with the shorthand.  One can refer to the
module using the shorthand name.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-29 09:47:01 -04:00
Henrique de Moraes Holschuh e11aecf137 ACPI: thinkpad-acpi: fix brightness dimming control bug
ibm-acpi and thinkpad-acpi did not know about bit 5 of the EC backlight
level control register (EC 0x31), so it was always forced to zero on
any writes.

This would disable the BIOS option to *not* use a dimmer backlight level
scale while on battery, and who knows what else (there are two other
control bits of unknown function).

Bit 5 controls the "reduce backlight levels when on battery" optional
functionality (active low).  Bits 6 and 7 are better left alone as well,
instead of being forced to zero.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-29 09:47:01 -04:00
Henrique de Moraes Holschuh 2d5e94d7ca ACPI: thinkpad-acpi: rate-limit CMOS/EC unsynced error messages
If userspace applications mess with the CMOS NVRAM, or something causes
both the ACPI firmware and thinkpad-acpi to try to change the brightness at
the same time, it is possible to have the CMOS and EC registers for the
current brightness go out of sync.

Should that happen, thinkpad-acpi could be really obnoxious when using a
brightness_mode of 3 (both EC and CMOS).  Instead of complaining a massive
number of times, make sure to complain only once until EC and CMOS are back
in sync.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Joerg Platte <lists@naasa.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-29 09:47:00 -04:00
Henrique de Moraes Holschuh 8c74adbc69 ACPI: thinkpad-acpi: enhance box identification output (v2)
During initialization, thinkpad-acpi outputs some messages to make sure
releavant box identification information is easily available in-line with
the rest of the driver messages.

Enhance those messages to output the alfanumeric model number as well.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-29 09:47:00 -04:00
Henrique de Moraes Holschuh 9288902225 ACPI: thinkpad-acpi: warn once about weird hotkey masks
thinkpad-acpi knows for a while now how to best program the hotkeys by
default, and always enable them by default.  Unfortunately, this
information has not filtered down everywhere it needs to, yet.  Notably,
old ibm-acpi documentation and most "thinkpad setup guides" will have wrong
information on this area.

Warn the local admin once whenever any of the following patterns are met:

1. Attempts to set hotkey mask to 0xffff (artifact from docs and config
   for the old ibm-acpi driver and behaviour).  This mask makes no
   real-world sense;

2. Attempts to set hotkey mask to 0xffffffff, which means the user is
   trying to just have "everything work" without even reading the
   documentation, or that we need to get a bug report, because there
   is a new thinkpad out there with new exciting hot keys :-)

3. Attempts to set hotkey mask to 0xffffff, which is almost never the
   correct way to set up volume and brightness event reporting (and with
   the current state-of-the-art, it is known to never be right way to do
   it).

The driver will perform any and all requested operations, though,
regardless of any warnings.  I hope these warnings can be removed one or
two years from now.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-29 09:47:00 -04:00
Henrique de Moraes Holschuh b59727965d ACPI: thinkpad-acpi: BIOS backlight mode helper (v2.1)
Lenovo ThinkPads with generic ACPI backlight level control can be easily
set to react to keyboard brightness key presses in a more predictable way
than what they do when in "DOS / bootloader" mode after Linux brings
up the ACPI interface.

The switch to the ACPI backlight mode in the firmware is designed to be
safe to use only as an one way trapdoor.  One is not to force the firmware
to switch back to "DOS/bootloader" mode except by rebooting.  The mode
switch itself is performed by calling any of the ACPI _BCL methods at least
once.

When in ACPI mode, the backlight firmware just issues (standard) events for
the brightness up/down hot key presses along with the non-standard HKEY
events which thinkpad-acpi traps, and doesn't touch the hardware.

thinkpad-acpi will:

1. Place the ThinkPad firmware in ACPI backlight control mode
   if one is available
2. Suppress HKEY backlight change notifications by default
   to avoid double-reporting when ACPI video is loaded when
   the ThinkPad is in ACPI backlight control mode
3. Urge the user to load the ACPI video driver

The user is free to use either the ACPI video driver to get the brightness
key events, or to override the thinkpad-acpi default hotkey mask to get
them from thinkpad-acpi as well (this will result in duplicate events if
ACPI video is loaded, so let's hope distros won't screw this up).

Provided userspace is sane, all should work (and *keep* working), which is
more that can be said about the non-ACPI mode of the new Lenovo ThinkPad
BIOSes when coupled to current userspace and X.org drivers.

Full guidelines for backlight hot key reporting and use of the
thinkpad-acpi backlight interface have been added to the documentation.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-29 09:46:59 -04:00
Harvey Harrison a01e035ebb drivers: fix integer as NULL pointer warnings
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28 17:31:13 -07:00
Harvey Harrison a6a3a17b7f media: fix integer as NULL pointer warnings
drivers/media/video/v4l2-common.c:719:16: warning: Using plain integer as NULL pointer
drivers/media/video/au0828/au0828-dvb.c:122:19: warning: Using plain integer as NULL pointer
drivers/media/video/ivtv/ivtv-yuv.c:1101:22: warning: Using plain integer as NULL pointer
drivers/media/video/ivtv/ivtv-yuv.c:1102:23: warning: Using plain integer as NULL pointer
drivers/media/video/pvrusb2/pvrusb2-audio.c:78:39: warning: Using plain integer as NULL pointer
drivers/media/video/pvrusb2/pvrusb2-video-v4l.c:84:39: warning: Using plain integer as NULL pointer
drivers/media/video/pvrusb2/pvrusb2-v4l2.c:1264:9: warning: Using plain integer as NULL pointer
drivers/media/video/pvrusb2/pvrusb2-context.c:197:28: warning: Using plain integer as NULL pointer
drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c:126:39: warning: Using plain integer as NULL pointer
drivers/media/video/pvrusb2/pvrusb2-dvb.c:133:32: warning: Using plain integer as NULL pointer
drivers/media/video/pvrusb2/pvrusb2-dvb.c:145:31: warning: Using plain integer as NULL pointer
drivers/media/video/pvrusb2/pvrusb2-dvb.c:177:55: warning: Using plain integer as NULL pointer
drivers/media/video/videobuf-core.c💯9: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28 17:31:13 -07:00
Harvey Harrison 172c122df5 scsi: fix integer as NULL pointer warnings
drivers/scsi/aic7xxx/aic7770_osm.c:53:58: warning: Using plain integer as NULL pointer
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c:355:47: warning: Using plain integer as NULL pointer
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c:372:55: warning: Using plain integer as NULL pointer
drivers/scsi/aha152x.c:997:28: warning: Using plain integer as NULL pointer
drivers/scsi/aha152x.c:1003:28: warning: Using plain integer as NULL pointer
drivers/scsi/aha152x.c:1165:46: warning: Using plain integer as NULL pointer
drivers/scsi/fdomain.c:1446:40: warning: Using plain integer as NULL pointer
drivers/scsi/sym53c8xx_2/sym_hipd.c:1650:51: warning: Using plain integer as NULL pointer
drivers/scsi/sym53c8xx_2/sym_hipd.c:3171:42: warning: Using plain integer as NULL pointer
drivers/scsi/sym53c8xx_2/sym_hipd.c:5732:52: warning: Using plain integer as NULL pointer
drivers/scsi/ncr53c8xx.c:8189:31: warning: Using plain integer as NULL pointer
drivers/scsi/ncr53c8xx.c:8225:34: warning: Using plain integer as NULL pointer
drivers/scsi/dpt_i2o.c:156:32: warning: Using plain integer as NULL pointer
drivers/scsi/ultrastor.c:954:42: warning: Using plain integer as NULL pointer
drivers/scsi/ultrastor.c:1104:18: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28 17:31:13 -07:00
Linus Torvalds 8ab68ab420 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (35 commits)
  siimage: coding style cleanup (take 2)
  ide-cd: clean up cdrom_analyze_sense_data()
  ide-cd: fix test unsigned var < 0
  ide: add TSSTcorp CDDVDW SH-S202H to ivb_list[]
  piix: add Asus Eee 701 controller to short cable list
  ARM: always select HAVE_IDE
  remove the broken ETRAX_IDE driver
  ide: remove ->dma_prdtable field from ide_hwif_t
  ide: remove ->dma_vendor{1,3} fields from ide_hwif_t
  scc_pata: add ->dma_host_set and ->dma_start methods
  ide: skip "VLB sync" if host uses MMIO
  ide: add ide_pad_transfer() helper
  ide: remove ->INW and ->OUTW methods
  ide: use IDE I/O helpers directly in ide_tf_{load,read}()
  ns87415: add ->tf_read method
  scc_pata: add ->tf_{load,read} methods
  ide-h8300: add ->tf_{load,read} methods
  ide-cris: add ->tf_{load,read} methods
  ide: add ->tf_load and ->tf_read methods
  ide: move ide_tf_{load,read} to ide-iops.c
  ...
2008-04-28 17:30:26 -07:00
Linus Torvalds f05c463be5 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
  kconfig: add named choice group
  kconfig: fix choice dependency check
  kconifg: 'select' considered less evil
  dontdiff: ignore timeconst.h
  dontdiff: add modules.order
  kbuild: fix unportability in gen_initramfs_list.sh
  kbuild: fix help output to show correct arch
  kbuild: show defconfig subdirs in make help
  kconfig: reversed borderlines in inputbox
2008-04-28 17:29:43 -07:00
Harvey Harrison 8da56309f0 drivers: atm, char fix integer as NULL pointer warnings
drivers/atm/nicstar.c:418:25: warning: Using plain integer as NULL pointer
drivers/char/drm/r128_cce.c:820:25: warning: Using plain integer as NULL pointer
drivers/char/tty_io.c:1183:10: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28 17:29:18 -07:00
Harvey Harrison 7b8ee84d89 mm: fix integer as NULL pointer warnings
mm/hugetlb.c:207:11: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28 17:29:18 -07:00
Harvey Harrison b331d259b1 kernel: fix integer as NULL pointer warnings
kernel/cpuset.c:1268:52: warning: Using plain integer as NULL pointer
kernel/pid_namespace.c:95:24: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Reviewed-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28 17:29:18 -07:00
Harvey Harrison d613c3e2d8 init: fix integer as NULL pointer warnings
init/do_mounts_rd.c:215:13: warning: Using plain integer as NULL pointer
init/do_mounts_md.c:136:45: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28 17:29:18 -07:00
Sergei Shtylyov 7b255436df siimage: coding style cleanup (take 2)
Fix 18 errors and several warnings given by checkpatch.pl:

- use of C99 // comments;

- trailing whitespace;

- 'switch' and 'case' not at the same indentation level;

- no space before the open parenthesis of the 'if' and 'switch' statements;

- space between function name and open parenthesis (though I have introduced
  such warnins in some places since the code looks prettier with the spaces);

- including <asm/io.h> instead of <linux/io.h>;

- line over 80 characters.

In addition to these changes, also do the following:

- make the arrays in sil_set_pio_mode() 'static', and make the arrays in
  sil_set_dma_mode() 'static const';

- change the string of the 'if' statements into the 'switch' statement in
  sil_pata_udma_filter();

- drop the needless '==' operators from the 'if' statements where a condition
  is a mere bit test;

- remove needless initializer for the 'tmp' variable in init_chipset_siimage();

- beautify groups of the variable initializers and assignment operators;

- add new line after variable definitions;

- remove new line between the comment and the statements it refers to;

- remove needless curly braces and parentheses;

- fix typos, capitalize acronyms, etc. in the comments...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:44 +02:00
Roel Kluin eee49298dd ide-cd: clean up cdrom_analyze_sense_data()
[bart: fix handling of bio_sectors(failed_command->bio) == 0]

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:43 +02:00
Roel Kluin a83ead2344 ide-cd: fix test unsigned var < 0
valid is unsigned and cannot be below 0.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:43 +02:00
Alexander Smal 3ced5c49bd ide: add TSSTcorp CDDVDW SH-S202H to ivb_list[]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:43 +02:00
Bartlomiej Zolnierkiewicz 1fa5a40f27 piix: add Asus Eee 701 controller to short cable list
Based on ata_piix patch by Dan McGee.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:43 +02:00
Adrian Bunk 2064c946ea ARM: always select HAVE_IDE
It's plain wrong for PCMCIA to select HAVE_IDE that implies e.g. the
availability of an asm/ide.h

It turns out this was done for ARM, and we can simply always select 
HAVE_IDE on ARM instead of manually tracking which platforms might 
possible have an IDE controller directly or indirectly.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:43 +02:00
Adrian Bunk 3f31b87460 remove the broken ETRAX_IDE driver
ETRAX_IDE was marked as broken last year with the comment
"it doesn't even compile currently".

Remove it since it won't get fixed in the near future.

On Mon, Apr 14, 2008 at 02:50:19PM +0200, Mikael Starvik wrote:
> You can remove it for now and we will resubmit a new if/when we get around
> to fix it.

[bart: ported it over IDE tree]

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Cc: Jesper Nilsson <Jesper.Nilsson@axis.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:42 +02:00
Bartlomiej Zolnierkiewicz 55224bc86a ide: remove ->dma_prdtable field from ide_hwif_t
* Use 'hwif->dma_base + {4,8}' instead of hwif->dma_prdtable in
  {ide,scc}_dma_setup().

* Remove no longer needed ->dma_prdtable field from ide_hwif_t.

While at it:

* Use ATA_DMA_TABLE_OFS define.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:42 +02:00
Bartlomiej Zolnierkiewicz 41051a141d ide: remove ->dma_vendor{1,3} fields from ide_hwif_t
* Use 'hwif->dma_base + {1,3}' instead of hwif->dma_vendor{1,3} in
  pdc202xx_new host driver.

* Remove no longer needed ->dma_vendor{1,3} fields from ide_hwif_t.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:42 +02:00
Bartlomiej Zolnierkiewicz 669185e98c scc_pata: add ->dma_host_set and ->dma_start methods
Add ->dma_host_set and ->dma_start methods (+ __scc_dma_end() helper)
so scc_ide_{in,out}b() can be used directly.

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>
2008-04-28 23:44:41 +02:00
Bartlomiej Zolnierkiewicz 22cdd6cedc ide: skip "VLB sync" if host uses MMIO
* Skip "VLB sync" in ata_{in,out}put_data() if host uses MMIO.

* Use I/O ops directly in ata_vlb_sync() an drop no longer needed
  'ide_drive_t *drive' argument.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:41 +02:00
Bartlomiej Zolnierkiewicz 9f87abe892 ide: add ide_pad_transfer() helper
* Add ide_pad_transfer() helper (which uses ->{in,out}put_data methods
  internally so the transfer is also padded to drive+host requirements)
  and use it instead of ide_atapi_{write_zeros,discard_data}().

* Remove no longer needed ide_atapi_{write_zeros,discard_data}().

Cc: Borislav Petkov <petkovbb@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:41 +02:00
Bartlomiej Zolnierkiewicz 7c0daf2681 ide: remove ->INW and ->OUTW methods
* Remove no longer used ->INW and ->OUTW methods.

While at it:

* scc_pata.c: scc_ide_{out,in}w() is called only in scc_tf_{load,read}()
  so inline it there.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:41 +02:00
Bartlomiej Zolnierkiewicz ca545c1e75 ide: use IDE I/O helpers directly in ide_tf_{load,read}()
There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:41 +02:00
Bartlomiej Zolnierkiewicz ea23b8ba00 ns87415: add ->tf_read method
Add ->tf_read method so out{b,w}(), in{b,w}() and superio_ide_inb()
can be used directly.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:40 +02:00
Bartlomiej Zolnierkiewicz db2432c40f scc_pata: add ->tf_{load,read} methods
Add ->tf_{load,read} methods so scc_ide_{outb,outw,inb,inw}()
can be used directly.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:40 +02:00
Bartlomiej Zolnierkiewicz 92fcaaa85e ide-h8300: add ->tf_{load,read} methods
Add ->tf_{load,read} methods so outb()/inb() and mm_outw()/mm_inw()
can be used directly.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:40 +02:00
Bartlomiej Zolnierkiewicz 6dbceb8c80 ide-cris: add ->tf_{load,read} methods
Add ->tf_{load,read} methods so cris_ide_{outb,outw,inb,inw}()
can be used directly.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:40 +02:00
Bartlomiej Zolnierkiewicz 94cd5b62ff ide: add ->tf_load and ->tf_read methods
* Add ->tf_load and ->tf_read methods to ide_hwif_t and set the default
  methods in default_hwif_transport().

* Use ->tf_{load,read} instead o calling ide_tf_{load,read}() directly.

* Make ide_tf_{load,read}() static.

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>
2008-04-28 23:44:40 +02:00
Bartlomiej Zolnierkiewicz d309e0bb8e ide: move ide_tf_{load,read} to ide-iops.c
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:39 +02:00
Bartlomiej Zolnierkiewicz 089c5c7e00 ide: factor out debugging code from ide_tf_load()
Factor out debugging code from ide_tf_load() to ide_tf_dump() helper
and update ide_tf_load() users accordingly.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:39 +02:00
Bartlomiej Zolnierkiewicz 1fc142589e ide: add ide_execute_pkt_cmd() helper
Add ide_execute_pkt_cmd() helper for executing PACKET command,
then convert ATAPI device drivers to use it.

As a nice side-effect this fixes ide-{floppy,tape,scsi} w.r.t.
ide_lock taking (ide-cd was OK).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:39 +02:00
Bartlomiej Zolnierkiewicz 3910dde641 ide-{floppy,tape,scsi}: 400ns delay is required after executing the command
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:39 +02:00
Bartlomiej Zolnierkiewicz 32b3fe4fff ide: always use ->OUTBSYNC method for executing commands
Always use ->OUTBSYNC method for executing commands so the posting is done
if needed (this affects only pmac and scc_pata host drivers at the moment).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:38 +02:00
Bartlomiej Zolnierkiewicz 24cc434acc siimage: remove proc_reports_siimage()
* proc_reports_siimage() is now only called by init_chipset_siimage()
  so inline it there.

* Use array instead of switch statement for reporting clock modes.

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>
2008-04-28 23:44:38 +02:00
Bartlomiej Zolnierkiewicz 165701d9fc siimage: add sil_* I/O ops
Add sil_iowrite{8,16,32}() and sil_ioread{8,16}() helpers, then use them to
merge code accessing configuration registers through PCI and MMIO together.

[ because of this SATA initialization bits from setup_mmio_siimage() are
  moved to init_chipset_siimage() ]

This also cuts code size a bit:

   text    data     bss     dec     hex filename
   4437     164       0    4601    11f9 drivers/ide/pci/siimage.o.before
   3979     164       0    4143    102f drivers/ide/pci/siimage.o.after

While at it:

* Use I/O ops directly instead of using ->IN{B,W} and ->OUT{B,W}.

* Fixup CodingStyle in setup_mmio_siimage().

* Rename 'tmpbyte' variable to 'tmp' in init_chipset_siimage().

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>
2008-04-28 23:44:38 +02:00
Bartlomiej Zolnierkiewicz 24a96ae0e3 siimage: do clocking register posting earlier in setup_mmio_siimage()
Do clocking register posting earlier in setup_mmio_siimage()
to match code in init_chipset_siimage().

This is a preparation for the next patch which merges PCI and MMIO
code paths together.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:38 +02:00
Bartlomiej Zolnierkiewicz 16bb69c14a ide: remove ->INS{W,L} and ->OUTS{W,L} methods
* Use ins{w,l}()/outs{w,l}() and __ide_mm_ins{w,l}()/__ide_mm_outs{w,l}()
  directly in ata_{in,out}put_data() (by using IDE_HFLAG_MMIO host flag to
  decide which I/O ops are required).

* Remove no longer needed ->INS{W,L} and ->OUTS{W,L} methods (ide-h8300,
  au1xxx-ide and scc_pata implement their own ->{in,out}put_data methods).

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28 23:44:37 +02:00