safe/jmp/linux-2.6
16 years ago[Blackfin] arch: Update copyright date
Michael Hennerich [Tue, 22 Jan 2008 09:29:16 +0000 (17:29 +0800)]
[Blackfin] arch: Update copyright date

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: GPIO API cleanup and anomaly update
Michael Hennerich [Tue, 22 Jan 2008 09:20:10 +0000 (17:20 +0800)]
[Blackfin] arch: GPIO API cleanup and anomaly update

 - Add anomaly workaround for bfin_gpio_reset_spi0_ssel1
 - Fix style
 - Update copyright
 - Remove BUG_ON checks for functions intended to be used only by arch
   support. GPIO users should only access using the generic GPIO API
 - Make all GPIO identifier unsigned int

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: Fix BUG gpio_direction_output API is not compatitable with GENERIC_G...
Michael Hennerich [Tue, 22 Jan 2008 10:36:20 +0000 (18:36 +0800)]
[Blackfin] arch: Fix BUG gpio_direction_output API is not compatitable with GENERIC_GPIO API interface

signef-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: Initial checkin of the memory protection support.
Bernd Schmidt [Sun, 27 Jan 2008 10:39:16 +0000 (18:39 +0800)]
[Blackfin] arch: Initial checkin of the memory protection support.

Enable it with CONFIG_MPU.

Signed-off-by: Bernd Schmidt <bernd.schmidt@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: set_bfin_dma_config shouldnt set SYNC or RESTART by default - add...
Michael Hennerich [Tue, 22 Jan 2008 07:29:18 +0000 (15:29 +0800)]
[Blackfin] arch: set_bfin_dma_config shouldnt set SYNC or RESTART by default - add argument or option

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: Add some comments - fix semicolons
Michael Hennerich [Fri, 11 Jan 2008 09:21:41 +0000 (17:21 +0800)]
[Blackfin] arch: Add some comments - fix semicolons

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: move all code related to CPLB handling into a new subdirectory under...
Bernd Schmidt [Fri, 11 Jan 2008 08:58:44 +0000 (16:58 +0800)]
[Blackfin] arch: move all code related to CPLB handling into a new subdirectory under kernel/

Signed-off-by: Bernd Schmidt <bernd.schmidt@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: print out list of modules if kernel is crashing and tell people...
Robin Getz [Fri, 11 Jan 2008 08:53:00 +0000 (16:53 +0800)]
[Blackfin] arch: print out list of modules if kernel is crashing and tell people if the kernel is tainted

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: enable generic GPIO based I2C driver in STAMP-BF533, EZKIT-BF533...
Bryan Wu [Thu, 24 Jan 2008 08:19:15 +0000 (16:19 +0800)]
[Blackfin] arch: enable generic GPIO based I2C driver in STAMP-BF533, EZKIT-BF533 and EZKIT-BF561 boards

Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: Don't oops_in_progress if single step is comming from the kernel
Robin Getz [Thu, 10 Jan 2008 09:57:56 +0000 (17:57 +0800)]
[Blackfin] arch: Don't oops_in_progress if single step is comming from the kernel

Don't oops_in_progress if single step is comming from the
kernel, which happens if a single step occurs after a exception cause.
This fixes up the remaining issues in the toolchain bug.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: Fix BUG - kernel sometimes would stuck with KEYBOARD_GPIO on
Michael Hennerich [Mon, 24 Dec 2007 12:19:51 +0000 (20:19 +0800)]
[Blackfin] arch: Fix BUG - kernel sometimes would stuck with KEYBOARD_GPIO on

Make sure the SYSTEM reset completes before we issue the CORE reset

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: update to latest anomaly sheets
Mike Frysinger [Mon, 24 Dec 2007 12:05:09 +0000 (20:05 +0800)]
[Blackfin] arch: update to latest anomaly sheets

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: Spelling fixes
Joe Perches [Mon, 24 Dec 2007 12:03:51 +0000 (20:03 +0800)]
[Blackfin] arch: Spelling fixes

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: fix bug - kgdb causing kernel panic
Sonic Zhang [Wed, 26 Dec 2007 04:00:10 +0000 (12:00 +0800)]
[Blackfin] arch: fix bug - kgdb causing kernel panic

ignore soft bp except when single step except occurs.
Narrow the condition to ignore soft bp.
If soft bp occurs in the single step handler or the soft bp handler,
return immediately. This could happen when gdb client set soft bps in
kernel code that in the path of kgdb core code.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: fix bug when DMA operation related core B of BF561
Enrik Berkhan [Mon, 24 Dec 2007 11:51:31 +0000 (19:51 +0800)]
[Blackfin] arch: fix bug when DMA operation related core B of BF561

- Before DMA'ing data to core B L1 memory, caches have to be flushed.
- Before DMA'ing data from core B L1 memory, caches have to be invalidated.
- Fix lock/unlock.

Signed-off-by: Enrik Berkhan <Enrik.Berkhan@ge.com>
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: Restore default DMA priority over core on bf54x.
Sonic Zhang [Mon, 24 Dec 2007 11:43:39 +0000 (19:43 +0800)]
[Blackfin] arch: Restore default DMA priority over core on bf54x.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: pull in linux/etherdevice.h for random_ether_addr() used in bfin_get...
Mike Frysinger [Mon, 24 Dec 2007 11:35:35 +0000 (19:35 +0800)]
[Blackfin] arch: pull in linux/etherdevice.h for random_ether_addr() used in bfin_get_ether_addr()

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: disable bfin_get_ether_addr fucntion for boards when do not use...
Martin Strubel [Mon, 24 Dec 2007 11:12:32 +0000 (19:12 +0800)]
[Blackfin] arch: disable bfin_get_ether_addr fucntion for boards when do not use MAC driver

Signed-off-by: Martin Strubel <hackfin@section5.ch>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: Enable both edge triggered GPIO IRQs on BF54x and use irq_to_gpio()
Michael Hennerich [Mon, 24 Dec 2007 10:51:34 +0000 (18:51 +0800)]
[Blackfin] arch: Enable both edge triggered GPIO IRQs on BF54x and use irq_to_gpio()

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: added Minotaur BSP
Martin Strubel [Sun, 27 Jan 2008 11:54:20 +0000 (19:54 +0800)]
[Blackfin] arch: added Minotaur BSP

Signed-off-by: Martin Strubel <hackfin@section5.ch>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: replace current blackfin specific pfbutton driver with kernel generi...
Michael Hennerich [Sun, 27 Jan 2008 08:49:48 +0000 (16:49 +0800)]
[Blackfin] arch: replace current blackfin specific pfbutton driver with kernel generic gpio key driver

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: append IRQ Number to label string
Michael Hennerich [Mon, 24 Dec 2007 08:56:12 +0000 (16:56 +0800)]
[Blackfin] arch: append IRQ Number to label string

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: Fix gpio label handling
Michael Hennerich [Mon, 24 Dec 2007 12:07:03 +0000 (20:07 +0800)]
[Blackfin] arch: Fix gpio label handling

early serial init also utilizes the peripheral request api - however
at this point bfin_gpio_init didn't allocate memory for the labels.
So we always have two zombies (allocated pin functions without labels)

This happens before the initcalls - We now allocate memory statically.
Define MAX_RESOURCES individually for each cpu.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: add support for BF523/BF524/BF526
Mike Frysinger [Mon, 24 Dec 2007 08:54:48 +0000 (16:54 +0800)]
[Blackfin] arch: add support for BF523/BF524/BF526

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: scrub dead alive/idle LED code
Mike Frysinger [Mon, 24 Dec 2007 06:59:03 +0000 (14:59 +0800)]
[Blackfin] arch: scrub dead alive/idle LED code

if it does get re-added, it needs to be in the boards directory,
not common code ... or it needs a re-implementation

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: fix up coding style in uaccess.h
Bernd Schmidt [Mon, 24 Dec 2007 04:40:29 +0000 (12:40 +0800)]
[Blackfin] arch: fix up coding style in uaccess.h

Signed-off-by: Bernd Schmidt <bernd.schmidt@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: set default value of DEB_DMA_URGENT to YES to avoid DMA aborting...
Cliff Cai [Mon, 24 Dec 2007 04:33:20 +0000 (12:33 +0800)]
[Blackfin] arch: set default value of DEB_DMA_URGENT to YES to avoid DMA aborting caused by conflict between core and DMA

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: Added support for OpenCores Keyboard Controller to H8606 board
Javier Herrero [Sun, 27 Jan 2008 11:53:08 +0000 (19:53 +0800)]
[Blackfin] arch: Added support for OpenCores Keyboard Controller to H8606 board

Signed-off-by: Javier Herrero <jherrero@hvsistemas.es>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: Fix if/def BUG - and define is multipoint NO
Bryan Wu [Mon, 24 Dec 2007 04:20:19 +0000 (12:20 +0800)]
[Blackfin] arch: Fix if/def BUG - and define is multipoint NO

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: The BF527 EZkit connects UART1/PORTF
Michael Hennerich [Mon, 24 Dec 2007 03:57:47 +0000 (11:57 +0800)]
[Blackfin] arch: The BF527 EZkit connects UART1/PORTF

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: update defconfig of boards
Bryan Wu [Thu, 24 Jan 2008 08:14:35 +0000 (16:14 +0800)]
[Blackfin] arch: update defconfig of boards

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: Trash bf54x-hcd driver - we use the musb driver
Michael Hennerich [Sun, 23 Dec 2007 16:16:01 +0000 (00:16 +0800)]
[Blackfin] arch: Trash bf54x-hcd driver - we use the musb driver

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: Enable peripheral platform resources on the BF527 EZkit
Michael Hennerich [Mon, 24 Dec 2007 03:49:29 +0000 (11:49 +0800)]
[Blackfin] arch: Enable peripheral platform resources on the BF527 EZkit

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: Fix bug to Enable bf548 to Re-program Clocks while Kernel boots.
Sonic Zhang [Sun, 27 Jan 2008 08:32:31 +0000 (16:32 +0800)]
[Blackfin] arch: Fix bug to Enable bf548 to Re-program Clocks while Kernel boots.

Reprogram DDR EBIU register properly for bf548.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: Clean up dump_bfin_mem
Robin Getz [Sun, 23 Dec 2007 14:57:01 +0000 (22:57 +0800)]
[Blackfin] arch: Clean up dump_bfin_mem

Clean up dump_bfin_mem so that it will display
content from the kernel, as well as l1 instruction, when deferred
HW errors happen, print out the last frame info if it makes sense.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: add Hitachi TX09D70VM1CDA TFT LCD driver resource to Blackfin board
Michael Hennerich [Sun, 27 Jan 2008 11:58:46 +0000 (19:58 +0800)]
[Blackfin] arch: add Hitachi TX09D70VM1CDA TFT LCD driver resource to Blackfin board

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: Fix bug to Enable kernel to build for bf548 with PM.
Sonic Zhang [Sun, 23 Dec 2007 15:02:13 +0000 (23:02 +0800)]
[Blackfin] arch: Fix bug to Enable kernel to build for bf548 with PM.

On BF548-EZKIT, build kernel faills with power management, video and audio enabled.
This patch fix this.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: fix bug - make memcpy return the dest addr.
Yi Li [Fri, 21 Dec 2007 13:12:21 +0000 (21:12 +0800)]
[Blackfin] arch: fix bug - make memcpy return the dest addr.

The memcpy() function returns the src pointer instead of the dst pointer.
This patch fix this bug.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: fix bug SDIO driver fails to build for BF542/BF548
Cliff Cai [Fri, 21 Dec 2007 13:04:40 +0000 (21:04 +0800)]
[Blackfin] arch: fix bug SDIO driver fails to build for BF542/BF548

modified CMD_TIMEOUT and DAT_TIMEOUT to CMD_TIME_OUT and DAT_TIME_OUT

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: Added support for 8250-class UARTs in HV Sistemas H8606 board, modif...
Javier Herrero [Fri, 21 Dec 2007 10:26:44 +0000 (18:26 +0800)]
[Blackfin] arch: Added support for 8250-class UARTs in HV Sistemas H8606 board, modification in 8250.c driver for correct compilation with Blackfin

Signed-off-by: Javier Herrero <jherrero@hvsistemas.es>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: Let the pre-processor do the math to save a few cycles - no function...
Robin Getz [Fri, 21 Dec 2007 09:49:53 +0000 (17:49 +0800)]
[Blackfin] arch: Let the pre-processor do the math to save a few cycles - no functional changes

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: do not use fixed numbers to describe offsets - no functional changes
Robin Getz [Fri, 21 Dec 2007 09:48:07 +0000 (17:48 +0800)]
[Blackfin] arch: do not use fixed numbers to describe offsets - no functional changes

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: do not use hard coded addresses
Robin Getz [Fri, 21 Dec 2007 09:46:33 +0000 (17:46 +0800)]
[Blackfin] arch: do not use hard coded addresses

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: fix bug gdb testing on hardware has regression
Robin Getz [Mon, 24 Dec 2007 07:27:56 +0000 (15:27 +0800)]
[Blackfin] arch: fix bug gdb testing on hardware has regression

http://blackfin.uclinux.org/gf/project/toolchain/tracker/?action=TrackerItemEdit&tracker_item_id=3651

As Bernd predicted, this was only necessary because of other
problems in the kenel - fixing those, and this is not necessary, so
remove it.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: fix bug - trap_tests fails to recover on some tests.
Robin Getz [Sun, 27 Jan 2008 07:38:56 +0000 (15:38 +0800)]
[Blackfin] arch: fix bug - trap_tests fails to recover on some tests.

http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3719

When the CPLBs get a miss, we do:
  - find a victim in the HW table
  - remove the victim
  - find the replacement in the software table
  - put it into the HW table.

If we can't find a replacement in the software table, we accidently
leave a duplicate in the HW table. This patch ensures that duplicate
is marked as not valid.

What we should do is find the replacement in the software table, before
we find a victim in the HW table - but its too late in the release cycle
to do that much restructuring of this code.

Rather that duplicate code, connect Hardware Errors (irq5) into trap_c,
so user space processes get killed properly.

The rest of irq_panic() can be moved into traps.c (later)

There is still a small corner case that causes problems when a
pheriperal interrupt goes off a single cycle before a user space
hardware error. This causes a kernel panic, rather than the user
space process being killed.

But, this checkin makes things work in 99.9% of the cases, and is a vast
improvement from what is there today (which fails 100% of the time).

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[Blackfin] arch: Add a note describing what is going on - no functional changes
Robin Getz [Sun, 27 Jan 2008 07:38:44 +0000 (15:38 +0800)]
[Blackfin] arch: Add a note describing what is going on - no functional changes

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years agoprintk: revert ktime_get() timestamps
Ingo Molnar [Sun, 27 Jan 2008 07:03:54 +0000 (08:03 +0100)]
printk: revert ktime_get() timestamps

revert 19ef9309273d26cb005cb23e6a370353dca91099.

Kevin Winchester reported a lockup during X startup an bisected
it to this commit.

Reported-by: Kevin Winchester <kjwinchester@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Sun, 27 Jan 2008 07:01:20 +0000 (23:01 -0800)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  [CIFS] DFS build fixes
  [CIFS] DFS support: provide shrinkable mounts
  [CIFS] Do not log path names in lookup errors
  [CIFS] DFS support patchset: Added mountdata
  [CIFS] Forgot to add two new files from previous commit
  [CIFS] DNS name resolution helper upcall for cifs
  [CIFS] fix checkpatch warnings in fs/cifs/inode.c
  [CIFS] hold ses sem on tcp session reconnect during mount
  [CIFS] Allow setting mode via cifs acl
  [CIFS]  fix unicode string alignment in SPNEGO setup
  [CIFS] cifs_partialpagewrite() cleanup
  [CIFS]  use krb5 session key from first SMB session after a NegProt
  [CIFS] redo existing session setup if needed in cifs_mount
  [CIFS] Only dump SPNEGO key if CONFIG_CIFS_DEBUG2 is set
  [CIFS] fix SetEA failure to some Samba versions

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Sun, 27 Jan 2008 06:54:32 +0000 (22:54 -0800)]
Merge git://git./linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (63 commits)
  ide: remove REQ_TYPE_ATA_CMD
  ide: switch ide_cmd_ioctl() to use REQ_TYPE_ATA_TASKFILE requests
  ide: switch set_xfer_rate() to use REQ_TYPE_ATA_TASKFILE requests
  ide: fix final status check in drive_cmd_intr()
  ide: check BUSY and ERROR status bits before reading data in drive_cmd_intr()
  ide: don't enable local IRQs for PIO-in in driver_cmd_intr() (take 2)
  ide: convert "empty" REQ_TYPE_ATA_CMD requests to use REQ_TYPE_ATA_TASKFILE
  ide: initialize rq->cmd_type in ide_init_drive_cmd() callers
  ide: use wait_drive_not_busy() in drive_cmd_intr() (take 2)
  ide: kill DATA_READY define
  ide: task_end_request() fix
  ide: use rq->nr_sectors in task_end_request()
  ide: remove needless ->cursg clearing from task_end_request()
  ide: set IDE_TFLAG_IN_* flags before queuing/executing command
  ide-tape: fix handling of non-special requests in ->end_request method
  ide: fix final status check in task_in_intr()
  ide: clear HOB bit for REQ_TYPE_ATA_CMD requests in ide_end_drive_cmd()
  ide: fix ->io_32bit race in ide_taskfile_ioctl()
  cmd64x: remove /proc/ide/cmd64x
  ide: remove broken disk byte-swapping support
  ...

16 years agoMerge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Sun, 27 Jan 2008 06:52:53 +0000 (22:52 -0800)]
Merge branch 'for-linus' of git://git390.osdl.marist.edu/linux-2.6

* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: (56 commits)
  [S390] replace lock_cpu_hotplug with get_online_cpus
  [S390] usage of s390dbf: shrink number of debug areas to use.
  [S390] constify function pointer tables.
  [S390] do local_irq_restore while spinning in spin_lock_irqsave.
  [S390] add smp_call_function_mask
  [S390] dasd: fix loop in request expiration handling
  [S390] Unused field / extern declaration in processor.h
  [S390] Remove TOPDIR from Makefile
  [S390] dasd: add hyper PAV support to DASD device driver, part 1
  [S390] single-step cleanup
  [S390] Move NOTES and BUG_TABLE.
  [S390] drivers/s390/: Spelling fixes
  [S390] include/asm-s390/: Spelling fixes
  [S390] arch/s390/: Spelling fixes
  [S390] Use diag308 subcodes 3 and 6 for reboot and dump when possible.
  [S390] vmemmap: allocate struct pages before 1:1 mapping
  [S390] Initialize sclp_ipl_info
  [S390] Allocate and free cpu lowcores and stacks when needed/possible.
  [S390] use LIST_HEAD instead of LIST_HEAD_INIT
  [S390] Load disabled wait psw instead of stopping cpu on halt.
  ...

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Sun, 27 Jan 2008 06:43:56 +0000 (22:43 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/selinux-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6:
  selinux: fix labeling of /proc/net inodes

16 years agoide: remove REQ_TYPE_ATA_CMD
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:13 +0000 (20:13 +0100)]
ide: remove REQ_TYPE_ATA_CMD

Based on the earlier work by Tejun Heo.

All users are gone so we can finally remove it.

Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: switch ide_cmd_ioctl() to use REQ_TYPE_ATA_TASKFILE requests
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:13 +0000 (20:13 +0100)]
ide: switch ide_cmd_ioctl() to use REQ_TYPE_ATA_TASKFILE requests

Based on the earlier work by Tejun Heo.

There should be no functionality changes caused by this patch.

Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: switch set_xfer_rate() to use REQ_TYPE_ATA_TASKFILE requests
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:12 +0000 (20:13 +0100)]
ide: switch set_xfer_rate() to use REQ_TYPE_ATA_TASKFILE requests

Based on the earlier work by Tejun Heo.

Switch set_xfer_rate() to use REQ_TYPE_ATA_TASKFILE requests
and make ide_wait_cmd() static.

There should be no functionality changes caused by this patch.

Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: fix final status check in drive_cmd_intr()
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:12 +0000 (20:13 +0100)]
ide: fix final status check in drive_cmd_intr()

Don't check for READY_STAT bit being set for PIO-in protocol (makes the
final status check in drive_cmd_intr() match the one in task_in_intr()).

Also fix function name reported by ide_error() call while at it.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: check BUSY and ERROR status bits before reading data in drive_cmd_intr()
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:12 +0000 (20:13 +0100)]
ide: check BUSY and ERROR status bits before reading data in drive_cmd_intr()

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: don't enable local IRQs for PIO-in in driver_cmd_intr() (take 2)
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:12 +0000 (20:13 +0100)]
ide: don't enable local IRQs for PIO-in in driver_cmd_intr() (take 2)

Don't enable local IRQs for PIO-in protocol in driver_cmd_intr().

While at it:

* Remove redundant rq->cmd_type check.

* Read status register after enabling local IRQs for no-data protocol.

v2:
* Re-add DRQ=1 check lost in v1 (noticed by Sergei).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: convert "empty" REQ_TYPE_ATA_CMD requests to use REQ_TYPE_ATA_TASKFILE
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:12 +0000 (20:13 +0100)]
ide: convert "empty" REQ_TYPE_ATA_CMD requests to use REQ_TYPE_ATA_TASKFILE

Based on the previous work by Tejun Heo.

There should be no functionality changes caused by this patch.

Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: initialize rq->cmd_type in ide_init_drive_cmd() callers
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:11 +0000 (20:13 +0100)]
ide: initialize rq->cmd_type in ide_init_drive_cmd() callers

* Initialize rq->cmd_type in ide_wait_cmd(), ide_cmd_ioctl() and
  set_pio_mode() (other callers were aleady over-riding rq->cmd_type).

* Remove no longer needed rq->cmd_type setup from ide_init_drive_cmd().

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: use wait_drive_not_busy() in drive_cmd_intr() (take 2)
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:11 +0000 (20:13 +0100)]
ide: use wait_drive_not_busy() in drive_cmd_intr() (take 2)

Use wait_drive_not_busy() in drive_cmd_intr().

v2:
* Fix wait_drive_not_busy() comment (noticed by Sergei).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: kill DATA_READY define
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:11 +0000 (20:13 +0100)]
ide: kill DATA_READY define

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: task_end_request() fix
Tejun Heo [Sat, 26 Jan 2008 19:13:11 +0000 (20:13 +0100)]
ide: task_end_request() fix

task_end_request() modified to always call ide_end_drive_cmd()
for taskfile requests.  Previously, ide_end_drive_cmd() was
called only when IDE_TFLAG_FLAGGED was set.  Also,
ide_dma_intr() is modified to use task_end_request().

Enables TASKFILE ioctls to get valid register outputs on
successful completion.

Bart:
- ported it over recent IDE changes

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: use rq->nr_sectors in task_end_request()
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:11 +0000 (20:13 +0100)]
ide: use rq->nr_sectors in task_end_request()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove needless ->cursg clearing from task_end_request()
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:11 +0000 (20:13 +0100)]
ide: remove needless ->cursg clearing from task_end_request()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: set IDE_TFLAG_IN_* flags before queuing/executing command
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:10 +0000 (20:13 +0100)]
ide: set IDE_TFLAG_IN_* flags before queuing/executing command

* Add IDE_TFLAG_{HOB,TF,DEVICE} defines.

* Set IDE_TFLAG_IN_* flags in {do_rw,ide_no_data,ide_raw}_taskfile() users.

* Remove no longer needed ->tf_flags setup from ide_end_drive_cmd().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: fix handling of non-special requests in ->end_request method
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:10 +0000 (20:13 +0100)]
ide-tape: fix handling of non-special requests in ->end_request method

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: fix final status check in task_in_intr()
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:10 +0000 (20:13 +0100)]
ide: fix final status check in task_in_intr()

Check for DRQ bit being cleared on the final status check.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: clear HOB bit for REQ_TYPE_ATA_CMD requests in ide_end_drive_cmd()
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:10 +0000 (20:13 +0100)]
ide: clear HOB bit for REQ_TYPE_ATA_CMD requests in ide_end_drive_cmd()

ide_dump_status() may set HOB bit before ide_end_drive_cmd() is called.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: fix ->io_32bit race in ide_taskfile_ioctl()
Tejun Heo [Sat, 26 Jan 2008 19:13:10 +0000 (20:13 +0100)]
ide: fix ->io_32bit race in ide_taskfile_ioctl()

In ide_taskfile_ioctl(), there was a race condition involving
drive->io_32bit.  It was cleared and restored during ioctl
requests but there was no synchronization with other requests.
So, other requests could execute with the altered ->io_32bit
setting or updated drive->io_32bit could be overwritten by
ide_taskfile_ioctl().

This patch adds IDE_TFLAG_IO_16BIT flag to indicate to
ide_pio_datablock() that 16-bit I/O is needed regardless of
drive->io_32bit settting.

Bart:
- ported it over recent IDE changes

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agocmd64x: remove /proc/ide/cmd64x
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:09 +0000 (20:13 +0100)]
cmd64x: remove /proc/ide/cmd64x

This belongs to user-space (and only if really needed).

   text    data     bss     dec     hex filename
   3874     180      28    4082     ff2 drivers/ide/pci/cmd64x.o.before
   2231     180       0    2411     96b drivers/ide/pci/cmd64x.o.after

Additionaly to being bloat the code reported incorrect UDMA modes for
the reserved values of UDIDETCR0/1 registers.

Also while at it remove unused CNTRL_DIS_RA0/1 defines.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove broken disk byte-swapping support
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:09 +0000 (20:13 +0100)]
ide: remove broken disk byte-swapping support

Remove broken disk byte-swapping support:
- it can cause a data corruption on SMP (or if using PREEMPT on UP)
- all data coming from disk are byte-swapped by taskfile_*_data() which
  results in incorrect identify data being reported by /proc/ide/ and IOCTLs
- "hdx=bswap/byteswap" kernel parameter has been broken on m68k host drivers
  (including Atari/Q40 ones) since 2.5.x days (because of 'hwif' zero-ing)
- byte-swapping is limited to PIO transfers (for working with TiVo disks on
  x86 machines using user-space solutions or dm-byteswap should result in
  much better performance because DMA can be used)

For previous discussions please see:

http://www.ussg.iu.edu/hypermail/linux/kernel/0201.0/0768.html
http://lkml.org/lkml/2004/2/28/111

[ I have dm-byteswap device mapper target if somebody is interested
  (patch is for 2.6.4 though but I'll dust it off if needed). ]

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add ide_busy_sleep() helper
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:09 +0000 (20:13 +0100)]
ide: add ide_busy_sleep() helper

Add ide_busy_sleep() helper and use it in do_probe(),
enable_nest() and probe_hwif().

As a nice side-effect this fixes a minor bug in do_probe()
(the code was reading status register without any delay).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: make CONFIG_IDEPCI_PCIBUS_ORDER visible and deprecate it
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:09 +0000 (20:13 +0100)]
ide: make CONFIG_IDEPCI_PCIBUS_ORDER visible and deprecate it

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: move CONFIG_IDEPCI_PCIBUS_ORDER code to ide-scan-pci.c
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:09 +0000 (20:13 +0100)]
ide: move CONFIG_IDEPCI_PCIBUS_ORDER code to ide-scan-pci.c

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: print banner message once per controller in m68k host drivers
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:09 +0000 (20:13 +0100)]
ide: print banner message once per controller in m68k host drivers

* Print banner message once per controller in m68k host drivers.

* Change printk() level to KERN_INFO in buddha, falconide and gayle.

* Add banner message to q40ide.

This is basically a preparation for the future IDE layer changes.

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add ide_set_irq() inline helper
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:08 +0000 (20:13 +0100)]
ide: add ide_set_irq() inline helper

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-pmac: use custom hwif->sg_max_nents only if DMA support is enabled
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:08 +0000 (20:13 +0100)]
ide-pmac: use custom hwif->sg_max_nents only if DMA support is enabled

Move setting hwif->sg_max_nents from pmac_ide_setup_device()
to pmac_ide_setup_dma().

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agorapide: remove write-only hwif->hwif_data
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:08 +0000 (20:13 +0100)]
rapide: remove write-only hwif->hwif_data

Cc: Russell King <rmk@arm.linux.org.uk>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: use ide_init_port_hw() in setup-pci.c
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:08 +0000 (20:13 +0100)]
ide: use ide_init_port_hw() in setup-pci.c

* Move setting hwif->gendev.parent from ide_pci_setup_ports()
  to ide_hwif_configure().

* Always set hwif->io_ports in ide_hwif_configure().

* Use ide_init_port_hw() in ide_hwif_configure().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: always use ide_std_init_ports() in setup-pci.c
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:08 +0000 (20:13 +0100)]
ide: always use ide_std_init_ports() in setup-pci.c

* ide_init_hwif_ports() call in setup-pci.c::ide_hwif_configure()
  doesn't depend on the default cotrol register offset, default IRQ
  or ppc_ide_md.ide_init_hwif implementations so ide_std_init_ports()
  can always be used.

* Since 'base' is always non-zero and thus hwif->io_ports[IDE_DATA_OFFSET]
  is also non-zero always clear hwif->noprobe.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoau1xxx-ide: use ide_init_port_hw()
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:08 +0000 (20:13 +0100)]
au1xxx-ide: use ide_init_port_hw()

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoau1xxx-ide: au_ide_probe() fixes
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:07 +0000 (20:13 +0100)]
au1xxx-ide: au_ide_probe() fixes

* hwif->hold is always set in au_ide_probe() (few lines earlier),
  no need to set it again

* hwif->{channel,select_data,config_data} should be always zero

* autotune PIO also if CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA is defined

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: make remaining built-in only IDE host drivers modular (take 2)
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:07 +0000 (20:13 +0100)]
ide: make remaining built-in only IDE host drivers modular (take 2)

* Make remaining built-in only IDE host drivers modular, add ide-scan-pci.c
  file for probing PCI host drivers registered with IDE core (special case
  for built-in IDE and CONFIG_IDEPCI_PCIBUS_ORDER=y) and then take care of
  the ordering in which all IDE host drivers are probed when IDE is built-in
  during link time.

* Move probing of gayle, falconide, macide, q40ide and buddha (m68k arch
  specific) host drivers, before PCI ones (no PCI on m68k), ide-cris (cris
  arch specific), cmd640 (x86 arch specific) and pmac (ppc arch specific).

* Move probing of ide-cris (cris arch specific) host driver before cmd640
  (x86 arch specific).

* Move probing of mpc8xx (ppc specific) host driver before ide-pnp (depends
  on ISA and none of ppc platform that use mpc8xx supports ISA) and ide-h8300
  (h8300 arch specific).

* Add "probe_vlb" kernel parameter to cmd640 host driver and update
  Documentation/ide.txt accordingly.

* Make IDE_ARM config option visible so it can also be disabled if needed.

* Remove bogus comment from ide.c while at it.

v2:
* Fix two issues spotted by Sergei:
  - replace ENOMEM error value by ENOENT in ide-h8300 host driver
  - fix MODULE_PARM_DESC() in cmd640 host driver

Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: fix host drivers depending on ide_generic to probe for interfaces (take 2)
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:06 +0000 (20:13 +0100)]
ide: fix host drivers depending on ide_generic to probe for interfaces (take 2)

* Add mpc8xx_ide_probe() to mpc8xx.c and call it from probe_for_hwifs().

* Convert ide_arm, ide-cris, ide-h8300, ide-pnp, buddha, falconide, gayle,
  macide, q40ide, cmd640 and mpc8xx host drivers to use ide_device_add().

  This removes dependency on ide_generic for these drivers so update
  ide/Kconfig accordingly.

v2:
* ide_arm build fix (s/ide_device_idx/ide_device_add/)
  (Thanks to Christoph Lameter <clameter@sgi.com> for reporting the problem).

Cc: Mikael Starvik <starvik@axis.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agocmd640: fix dependency on IDE_GENERIC
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:06 +0000 (20:13 +0100)]
cmd640: fix dependency on IDE_GENERIC

Make BLK_DEV_CMD640 select IDE_GENERIC.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: move ide_arm_init() call from init_ide_data() to ide_init()
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:06 +0000 (20:13 +0100)]
ide: move ide_arm_init() call from init_ide_data() to ide_init()

* Remove ide_init_port_data() call from ide_arm_init() and move
  ide_arm_init() call from init_ide_data() to ide_init().

This patch is a preparation for the future changes (and as a side-effect
makes obsolete "idex=io[,ctl[,irq]]" kernel parameters work for ide_arm).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: drop 'initializing' argument from ide_register_hw()
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:06 +0000 (20:13 +0100)]
ide: drop 'initializing' argument from ide_register_hw()

* Rename init_hwif_data() to ide_init_port_data() and export it.

* For all users of ide_register_hw() with 'initializing' argument set
  hwif->present and hwif->hold are always zero so convert these host
  drivers to use ide_find_port()+ide_init_port_data()+ide_init_port_hw()
  instead (also no need for init_hwif_default() call since the setup
  done by it gets over-ridden by ide_init_port_hw() call).

* Drop 'initializing' argument from ide_register_hw().

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add ide_init_port_hw() helper
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:05 +0000 (20:13 +0100)]
ide: add ide_init_port_hw() helper

* Add ide_init_port_hw() helper.

* rapide.c: convert rapide_locate_hwif() to rapide_setup_ports()
  and use ide_init_port_hw().

* ide_platform.c: convert plat_ide_locate_hwif() to plat_ide_setup_ports()
  and use ide_init_port_hw().

* sgiioc4.c: use ide_init_port_hw().

* pmac.c: add 'hw_regs_t *hw' argument to pmac_ide_setup_device(),
  setup 'hw' in pmac_ide_{macio,pci}_attach() and use ide_init_port_hw()
  in pmac_ide_setup_device().

This patch is a preparation for the future changes in the IDE probing code.

There should be no functionality changes caused by this patch.

Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Jeremy Higdon <jeremy@sgi.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agosgiioc4: always init hwif->io_ports
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:05 +0000 (20:13 +0100)]
sgiioc4: always init hwif->io_ports

'if (hwif->io_ports[IDE_DATA_OFFSET] != cmd_base)' is always true.

Cc: Jeremy Higdon <jeremy@sgi.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: Fix build break caused by "ide: remove ideprobe_init()"
Olof Johansson [Sat, 26 Jan 2008 19:13:05 +0000 (20:13 +0100)]
ide: Fix build break caused by "ide: remove ideprobe_init()"

Fix build break of powerpc holly_defconfig:

In file included from arch/powerpc/platforms/embedded6xx/holly.c:24:
include/linux/ide.h:1206: error: 'CONFIG_IDE_MAX_HWIFS' undeclared here (not in a function)

There's no need to have a sized array in the prototype, might as well
turn it into a pointer.

It could probably be argued that large parts of the include file can be
covered under #ifdef CONFIG_IDE, but that's a larger undertaking.

Signed-off-by: Olof Johansson <olof@lixom.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove ideprobe_init()
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:05 +0000 (20:13 +0100)]
ide: remove ideprobe_init()

* Rename ide_device_add() to ide_device_add_all() and make it accept
  'u8 idx[MAX_HWIFS]' instead of 'u8 idx[4]' as an argument.

* Add ide_device_add() wrapper for ide_device_add_all().

* Convert ide_generic_init() to use ide_device_add_all().

* Remove no longer needed ideprobe_init().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add hwif->chipset fixup to ide_device_add()
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:04 +0000 (20:13 +0100)]
ide: add hwif->chipset fixup to ide_device_add()

Add hwif->chipset fixup identical to the one in ideprobe_init()
to ide_device_add().

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoswarm: set hwif->chipset
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:04 +0000 (20:13 +0100)]
swarm: set hwif->chipset

hwif->chipset should be set if the hwif is claimed by host driver.

Cc: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agorapide: set hwif->chipset
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:04 +0000 (20:13 +0100)]
rapide: set hwif->chipset

hwif->chipset should be set if the hwif is claimed by host driver.

Cc: Russell King <rmk@arm.linux.org.uk>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: fix probing for hosts with serialized or IRQ sharing interfaces
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:04 +0000 (20:13 +0100)]
ide: fix probing for hosts with serialized or IRQ sharing interfaces

After hwif_register_devices() IDE devices are ready to be used so
the way in which ide_device_add() works currently is racy for hosts
with serialized / IRQ sharing interfaces.

Fix ide_device_add() by looping over interfaces for probe_hwif(),
hwif_init() and hwif_register_devices() operations.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: kill probe_hwif_init()
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:04 +0000 (20:13 +0100)]
ide: kill probe_hwif_init()

There should be no functionality changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: don't try to unregister interfaces if 'initializing' in ide_register_hw()
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:03 +0000 (20:13 +0100)]
ide: don't try to unregister interfaces if 'initializing' in ide_register_hw()

Host drivers using ide_register_hw() and 'initializing == 1':

* ide-pnp
  - depends on ISA

* ide_arm
  - ARM arch specific
  - initialized before all other host drivers

* ide-cris
  - CRIS arch specific => IDE_ARCH_OBSOLETE_INIT is not defined
  - broken

* ide-h8300
  - H8300 arch specific => IDE_ARCH_OBSOLETE_INIT is not defined, no PCI

* buddha/q40/gayle/macide/falconide
  - M68K arch specific => IDE_ARCH_OBSOLETE_INIT is not defined, no PCI

Since the only host drivers which probe interfaces before the above ones are:

* ali14xx/dtc2278/ht6560b/qd65xx/umc8672
  - depend on ISA
  - require IDE_ARCH_OBSOLETE_INIT=y to work

* PCI ones
  - depend on PCI

don't try to unregister interfaces if 'initializing == 1' in ide_register_hw()
(it is possible that built-in host drivers will claim all IDE interfaces but
later ide-pnp host driver will try to unregister them - this change fixes it).

Also skip hwif->hold check if 'initializing == 1' since it is set only by:

* pmac
  - PPC && PMAC specific => no ISA

* au1xxx-ide
  - MIPS && SOC_AU1200 specific => no ISA

and use ide_find_port() helper to find free ide_hwifs[] slot.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: merge ->fixup and ->quirkproc methods
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:03 +0000 (20:13 +0100)]
ide: merge ->fixup and ->quirkproc methods

* Assign drive->quirk_list in ->quirkproc implementations:
  - hpt366.c::hpt3xx_quirkproc()
  - pdc202xx_new.c::pdcnew_quirkproc()
  - pdc202xx_old.c::pdc202xx_quirkproc()

* Make ->quirkproc void.

* Move calling ->quirkproc from do_identify() to probe_hwif().

* Convert it821x_fixups() to it821x_quirkproc() in it821x.c.

* Convert siimage_fixup() to sil_quirkproc() in siimage.c, also remove
  no longer needed drive->present check from is_dev_seagate_sata().

* Convert ide_undecoded_slave() to accept 'drive' instead of 'hwif'
  as an argument.  Then convert ide_register_hw() to accept 'quirkproc'
  argument instead of 'fixup' one.

* Remove no longer needed ->fixup method.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: dump taskfile HOB registers in ide_tf_load() (if DEBUG is defined)
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:03 +0000 (20:13 +0100)]
ide: dump taskfile HOB registers in ide_tf_load() (if DEBUG is defined)

* Dump taskfile HOB registers in ide_tf_load() (if DEBUG is defined).

* Remove no longer needed DEBUG code from __ide_do_rw_disk().

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: merge ->dma_host_{on,off} methods into ->dma_host_set method
Bartlomiej Zolnierkiewicz [Sat, 26 Jan 2008 19:13:03 +0000 (20:13 +0100)]
ide: merge ->dma_host_{on,off} methods into ->dma_host_set method

Merge ->dma_host_{on,off} methods into ->dma_host_set method
which takes 'int on' argument.

There should be no functionality changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>