Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ade2daf9 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz
Browse files

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: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 8ac4ce74
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@
***
***  The CMD640 is also used on some Vesa Local Bus (VLB) cards, and is *NOT*
***  automatically detected by Linux.  For safe, reliable operation with such
***  interfaces, one *MUST* use the "ide0=cmd640_vlb" kernel option.
***  interfaces, one *MUST* use the "cmd640.probe_vlb" kernel option.
***
***  Use of the "serialize" option is no longer necessary.

@@ -292,9 +292,6 @@ The following are valid ONLY on ide0, which usually corresponds
to the first ATA interface found on the particular host, and the defaults for
the base,ctl ports must not be altered.

 "ide0=cmd640_vlb"	: *REQUIRED* for VLB cards with the CMD640 chip
			  (not for PCI -- automatically detected)

 "ide=doubler"		: probe/support IDE doublers on Amiga

There may be more options than shown -- use the source, Luke!
@@ -310,6 +307,10 @@ i.e. to enable probing for ALI M14xx chipsets (ali14xx host driver) use:
* "probe" module parameter when ali14xx driver is compiled as module
  ("modprobe ali14xx probe")

Also for legacy CMD640 host driver (cmd640) you need to use "probe_vlb"
kernel paremeter to enable probing for VLB version of the chipset (PCI ones
are detected automatically).

================================================================================

IDE ATAPI streaming tape driver
+14 −12
Original line number Diff line number Diff line
@@ -325,7 +325,7 @@ config BLK_DEV_PLATFORM
	  If unsure, say N.

config BLK_DEV_CMD640
	bool "CMD640 chipset bugfix/support"
	tristate "CMD640 chipset bugfix/support"
	depends on X86
	---help---
	  The CMD-Technologies CMD640 IDE chip is used on many common 486 and
@@ -359,7 +359,7 @@ config BLK_DEV_CMD640_ENHANCED
	  Otherwise say N.

config BLK_DEV_IDEPNP
	bool "PNP EIDE support"
	tristate "PNP EIDE support"
	depends on PNP
	help
	  If you have a PnP (Plug and Play) compatible EIDE card and
@@ -788,7 +788,7 @@ config BLK_DEV_CELLEB
endif

config BLK_DEV_IDE_PMAC
	bool "Builtin PowerMac IDE support"
	tristate "Builtin PowerMac IDE support"
	depends on PPC_PMAC && IDE=y && BLK_DEV_IDE=y
	help
	  This driver provides support for the built-in IDE controller on
@@ -842,7 +842,9 @@ config BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ
       depends on BLK_DEV_IDE_AU1XXX

config IDE_ARM
	def_bool ARM && (ARCH_CLPS7500 || ARCH_RPC || ARCH_SHARK)
	tristate "ARM IDE support"
	depends on ARM && (ARCH_CLPS7500 || ARCH_RPC || ARCH_SHARK)
	default y

config BLK_DEV_IDE_ICSIDE
	tristate "ICS IDE interface support"
@@ -874,7 +876,7 @@ config BLK_DEV_IDE_BAST
	  Simtec BAST or the Thorcom VR1000

config ETRAX_IDE
	bool "ETRAX IDE support"
	tristate "ETRAX IDE support"
	depends on CRIS && BROKEN
	select BLK_DEV_IDEDMA
	help
@@ -908,14 +910,14 @@ config ETRAX_IDE_G27_RESET
endchoice

config IDE_H8300
	bool "H8300 IDE support"
	tristate "H8300 IDE support"
	depends on H8300
	default y
	help
	  Enables the H8300 IDE driver.

config BLK_DEV_GAYLE
	bool "Amiga Gayle IDE interface support"
	tristate "Amiga Gayle IDE interface support"
	depends on AMIGA
	help
	  This is the IDE driver for the Amiga Gayle IDE interface. It supports
@@ -946,7 +948,7 @@ config BLK_DEV_IDEDOUBLER
	  runtime using the "ide=doubler" kernel boot parameter.

config BLK_DEV_BUDDHA
	bool "Buddha/Catweasel/X-Surf IDE interface support (EXPERIMENTAL)"
	tristate "Buddha/Catweasel/X-Surf IDE interface support (EXPERIMENTAL)"
	depends on ZORRO && EXPERIMENTAL
	help
	  This is the IDE driver for the IDE interfaces on the Buddha, 
@@ -958,7 +960,7 @@ config BLK_DEV_BUDDHA
	  to one of its IDE interfaces.

config BLK_DEV_FALCON_IDE
	bool "Falcon IDE interface support"
	tristate "Falcon IDE interface support"
	depends on ATARI
	help
	  This is the IDE driver for the builtin IDE interface on the Atari
@@ -967,7 +969,7 @@ config BLK_DEV_FALCON_IDE
	  interface.

config BLK_DEV_MAC_IDE
	bool "Macintosh Quadra/Powerbook IDE interface support"
	tristate "Macintosh Quadra/Powerbook IDE interface support"
	depends on MAC
	help
	  This is the IDE driver for the builtin IDE interface on some m68k
@@ -980,7 +982,7 @@ config BLK_DEV_MAC_IDE
	  builtin IDE interface.

config BLK_DEV_Q40IDE
	bool "Q40/Q60 IDE interface support"
	tristate "Q40/Q60 IDE interface support"
	depends on Q40
	help
	  Enable the on-board IDE controller in the Q40/Q60.  This should
@@ -988,7 +990,7 @@ config BLK_DEV_Q40IDE
	  drive subsystem through an expansion card.

config BLK_DEV_MPC8xx_IDE
	bool "MPC8xx IDE support"
	tristate "MPC8xx IDE support"
	depends on 8xx && (LWMON || IVMS8 || IVML24 || TQM8xxL) && IDE=y && BLK_DEV_IDE=y && !PPC_MERGE
	help
	  This option provides support for IDE on Motorola MPC8xx Systems.
+34 −24
Original line number Diff line number Diff line
@@ -7,41 +7,37 @@
# Note : at this point, these files are compiled on all systems.
# In the future, some of these should be built conditionally.
#
# First come modules that register themselves with the core
# link order is important here

EXTRA_CFLAGS				+= -Idrivers/ide

obj-$(CONFIG_BLK_DEV_IDE)		+= pci/

ide-core-y += ide.o ide-io.o ide-iops.o ide-lib.o ide-probe.o ide-taskfile.o

ide-core-$(CONFIG_BLK_DEV_CMD640)	+= pci/cmd640.o

# Core IDE code - must come before legacy
# core IDE code
ide-core-$(CONFIG_BLK_DEV_IDEPCI)	+= setup-pci.o
ide-core-$(CONFIG_BLK_DEV_IDEDMA)	+= ide-dma.o
ide-core-$(CONFIG_IDE_PROC_FS)		+= ide-proc.o
ide-core-$(CONFIG_BLK_DEV_IDEPNP)	+= ide-pnp.o
ide-core-$(CONFIG_BLK_DEV_IDEACPI)	+= ide-acpi.o

# built-in only drivers from arm/
ide-core-$(CONFIG_IDE_ARM)		+= arm/ide_arm.o
obj-$(CONFIG_BLK_DEV_IDE)		+= ide-core.o

# built-in only drivers from legacy/
ide-core-$(CONFIG_BLK_DEV_BUDDHA)	+= legacy/buddha.o
ide-core-$(CONFIG_BLK_DEV_FALCON_IDE)	+= legacy/falconide.o
ide-core-$(CONFIG_BLK_DEV_GAYLE)	+= legacy/gayle.o
ide-core-$(CONFIG_BLK_DEV_MAC_IDE)	+= legacy/macide.o
ide-core-$(CONFIG_BLK_DEV_Q40IDE)	+= legacy/q40ide.o
ifeq ($(CONFIG_IDE_ARM), y)
	ide-arm-core-y += arm/ide_arm.o
	obj-y += ide-arm-core.o
endif

# built-in only drivers from ppc/
ide-core-$(CONFIG_BLK_DEV_MPC8xx_IDE)	+= ppc/mpc8xx.o
ide-core-$(CONFIG_BLK_DEV_IDE_PMAC)	+= ppc/pmac.o
obj-$(CONFIG_BLK_DEV_IDE)		+= legacy/ pci/

# built-in only drivers from h8300/
ide-core-$(CONFIG_IDE_H8300)		+= h8300/ide-h8300.o
obj-$(CONFIG_IDEPCI_PCIBUS_ORDER)	+= ide-scan-pci.o

obj-$(CONFIG_BLK_DEV_IDE)		+= ide-core.o
ifeq ($(CONFIG_BLK_DEV_CMD640), y)
	cmd640-core-y += pci/cmd640.o
	obj-y += cmd640-core.o
endif

obj-$(CONFIG_BLK_DEV_IDE)		+= cris/ ppc/
obj-$(CONFIG_BLK_DEV_IDEPNP)		+= ide-pnp.o
obj-$(CONFIG_IDE_H8300)			+= h8300/
obj-$(CONFIG_IDE_GENERIC)		+= ide-generic.o

obj-$(CONFIG_BLK_DEV_IDEDISK)		+= ide-disk.o
@@ -49,6 +45,20 @@ obj-$(CONFIG_BLK_DEV_IDECD) += ide-cd.o
obj-$(CONFIG_BLK_DEV_IDETAPE)		+= ide-tape.o
obj-$(CONFIG_BLK_DEV_IDEFLOPPY)		+= ide-floppy.o

obj-$(CONFIG_BLK_DEV_IDE)		+= legacy/ arm/ mips/
obj-$(CONFIG_BLK_DEV_HD)		+= legacy/
obj-$(CONFIG_ETRAX_IDE)		+= cris/
ifeq ($(CONFIG_BLK_DEV_IDECS), y)
	ide-cs-core-y += legacy/ide-cs.o
	obj-y += ide-cs-core.o
endif

ifeq ($(CONFIG_BLK_DEV_PLATFORM), y)
	ide-platform-core-y += legacy/ide_platform.o
	obj-y += ide-platform-core.o
endif

obj-$(CONFIG_BLK_DEV_IDE)		+= arm/ mips/

# old hd driver must be last
ifeq ($(CONFIG_BLK_DEV_HD), y)
	hd-core-y += legacy/hd.o
	obj-y += hd-core.o
endif
+4 −0
Original line number Diff line number Diff line
@@ -3,4 +3,8 @@ obj-$(CONFIG_BLK_DEV_IDE_ICSIDE) += icside.o
obj-$(CONFIG_BLK_DEV_IDE_RAPIDE)	+= rapide.o
obj-$(CONFIG_BLK_DEV_IDE_BAST)		+= bast-ide.o

ifeq ($(CONFIG_IDE_ARM), m)
	obj-m += ide_arm.o
endif

EXTRA_CFLAGS	:= -Idrivers/ide
+5 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@
# define IDE_ARM_IRQ	IRQ_HARDDISK
#endif

void __init ide_arm_init(void)
static int __init ide_arm_init(void)
{
	ide_hwif_t *hwif;
	hw_regs_t hw;
@@ -41,4 +41,8 @@ void __init ide_arm_init(void)

		ide_device_add(idx);
	}

	return 0;
}

module_init(ide_arm_init);
Loading