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

Commit eedcdefb authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide: remove stale comment from ide-lib.c
  ide: fix comment in init_irq()
  ide: ide_init_port() bugfix
  ide-disk: fix flush requests (take 2)
  ide: introduce CONFIG_BLK_DEV_IDEDMA_SFF option
  bast-ide: build fix
  ide-tape: remove never executed code
  ide: fix ide/legacy/gayle.c compilation
  ide-cd: replace ntohs with generic byteorder macro be16_to_cpu
  ide: remove stale version number
  pdc202xx_old: always enable burst mode
  palm_bk3710: use struct ide_port_info
  palm_bk3710: port initialization/probing bugfix
  palm_bk3710: fix ide_unregister() usage
  palm_bk3710: ide_register_hw() -> ide_device_add()
  ide: insert BUG_ON() into __ide_set_handler() (take 2)
  cs5520: remove stale comment
  ide: another possible ide panic fix for blk-end-request
parents 9585ca02 467390a2
Loading
Loading
Loading
Loading
+7 −19
Original line number Diff line number Diff line
@@ -378,6 +378,9 @@ config BLK_DEV_IDEPNP
	  would like the kernel to automatically detect and activate
	  it, say Y here.

config BLK_DEV_IDEDMA_SFF
	bool

if PCI

comment "PCI IDE chipsets support"
@@ -459,6 +462,7 @@ config BLK_DEV_RZ1000
config BLK_DEV_IDEDMA_PCI
	bool
	select BLK_DEV_IDEPCI
	select BLK_DEV_IDEDMA_SFF

config BLK_DEV_AEC62XX
	tristate "AEC62XX chipset support"
@@ -688,23 +692,6 @@ config BLK_DEV_PDC202XX_OLD

	  If unsure, say N.

config PDC202XX_BURST
	bool "Special UDMA Feature"
	depends on BLK_DEV_PDC202XX_OLD
	help
	  This option causes the pdc202xx driver to enable UDMA modes on the
	  PDC202xx even when the PDC202xx BIOS has not done so.

	  It was originally designed for the PDC20246/Ultra33, whose BIOS will
	  only setup UDMA on the first two PDC20246 cards.  It has also been
	  used successfully on a PDC20265/Ultra100, allowing use of UDMA modes
	  when the PDC20265 BIOS has been disabled (for faster boot up).

	  Please read the comments at the top of
	  <file:drivers/ide/pci/pdc202xx_old.c>.

	  If unsure, say N.

config BLK_DEV_PDC202XX_NEW
	tristate "PROMISE PDC202{68|69|70|71|75|76|77} support"
	select BLK_DEV_IDEDMA_PCI
@@ -1016,7 +1003,7 @@ config BLK_DEV_Q40IDE
config BLK_DEV_PALMCHIP_BK3710
	tristate "Palmchip bk3710 IDE controller support"
	depends on ARCH_DAVINCI
	select BLK_DEV_IDEDMA_PCI
	select BLK_DEV_IDEDMA_SFF
	help
	  Say Y here if you want to support the onchip IDE controller on the
	  TI DaVinci SoC
@@ -1124,7 +1111,8 @@ config BLK_DEV_UMC8672
endif

config BLK_DEV_IDEDMA
	def_bool BLK_DEV_IDEDMA_PCI || BLK_DEV_IDEDMA_PMAC || BLK_DEV_IDEDMA_ICS || BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
	def_bool BLK_DEV_IDEDMA_SFF || BLK_DEV_IDEDMA_PMAC || \
		 BLK_DEV_IDEDMA_ICS || BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA

config IDE_ARCH_OBSOLETE_INIT
	def_bool ALPHA || (ARM && !ARCH_L7200) || BLACKFIN || X86 || IA64 || M32R || MIPS || PARISC || PPC || (SUPERH64 && BLK_DEV_IDEPCI) || SPARC
+4 −8
Original line number Diff line number Diff line
@@ -21,12 +21,7 @@
#include <asm/arch/bast-map.h>
#include <asm/arch/bast-irq.h>

/* list of registered interfaces */
static ide_hwif_t *ifs[2];

static int __init
bastide_register(unsigned int base, unsigned int aux, int irq,
		 ide_hwif_t **hwif)
static int __init bastide_register(unsigned int base, unsigned int aux, int irq)
{
	ide_hwif_t *hwif;
	hw_regs_t hw;
@@ -76,8 +71,9 @@ static int __init bastide_init(void)

	printk("BAST: IDE driver, (c) 2003-2004 Simtec Electronics\n");

	bastide_register(BAST_VA_IDEPRI, BAST_VA_IDEPRIAUX, IRQ_IDE0, &ifs[0]);
	bastide_register(BAST_VA_IDESEC, BAST_VA_IDESECAUX, IRQ_IDE1, &ifs[1]);
	bastide_register(BAST_VA_IDEPRI, BAST_VA_IDEPRIAUX, IRQ_IDE0);
	bastide_register(BAST_VA_IDESEC, BAST_VA_IDESECAUX, IRQ_IDE1);

	return 0;
}

+53 −21
Original line number Diff line number Diff line
@@ -311,15 +311,37 @@ static void __devinit palm_bk3710_chipinit(void __iomem *base)
	palm_bk3710_setpiomode(base, NULL, 0, 600, 0);
	palm_bk3710_setpiomode(base, NULL, 1, 600, 0);
}

static u8 __devinit palm_bk3710_cable_detect(ide_hwif_t *hwif)
{
	return ATA_CBL_PATA80;
}

static void __devinit palm_bk3710_init_hwif(ide_hwif_t *hwif)
{
	hwif->set_pio_mode = palm_bk3710_set_pio_mode;
	hwif->set_dma_mode = palm_bk3710_set_dma_mode;

	hwif->cable_detect = palm_bk3710_cable_detect;
}

static const struct ide_port_info __devinitdata palm_bk3710_port_info = {
	.init_hwif		= palm_bk3710_init_hwif,
	.host_flags		= IDE_HFLAG_NO_DMA, /* hack (no PCI) */
	.pio_mask		= ATA_PIO4,
	.udma_mask		= ATA_UDMA4,	/* (input clk 99MHz) */
	.mwdma_mask		= ATA_MWDMA2,
};

static int __devinit palm_bk3710_probe(struct platform_device *pdev)
{
	hw_regs_t ide_ctlr_info;
	int index = 0;
	int pribase;
	struct clk *clkp;
	struct resource *mem, *irq;
	ide_hwif_t *hwif;
	void __iomem *base;
	int pribase, i;
	hw_regs_t hw;
	u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };

	clkp = clk_get(NULL, "IDECLK");
	if (IS_ERR(clkp))
@@ -330,7 +352,7 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev)
	ide_palm_clk = clk_get_rate(ideclkp)/100000;
	ide_palm_clk = (10000/ide_palm_clk) + 1;
	/* Register the IDE interface with Linux ATA Interface */
	memset(&ide_ctlr_info, 0, sizeof(ide_ctlr_info));
	memset(&hw, 0, sizeof(hw));

	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	if (mem == NULL) {
@@ -349,32 +371,42 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev)
	palm_bk3710_chipinit(base);

	pribase = mem->start + IDE_PALM_ATA_PRI_REG_OFFSET;
	for (index = 0; index < IDE_NR_PORTS - 2; index++)
		ide_ctlr_info.io_ports[index] = pribase + index;
	ide_ctlr_info.io_ports[IDE_CONTROL_OFFSET] = mem->start +
	for (i = 0; i < IDE_NR_PORTS - 2; i++)
		hw.io_ports[i] = pribase + i;
	hw.io_ports[IDE_CONTROL_OFFSET] = mem->start +
			IDE_PALM_ATA_PRI_CTL_OFFSET;
	ide_ctlr_info.irq = irq->start;
	ide_ctlr_info.chipset = ide_palm3710;
	hw.irq = irq->start;
	hw.chipset = ide_palm3710;

	if (ide_register_hw(&ide_ctlr_info, NULL, &hwif) < 0) {
		printk(KERN_WARNING "Palm Chip BK3710 IDE Register Fail\n");
		return -ENODEV;
	}
	hwif = ide_deprecated_find_port(hw.io_ports[IDE_DATA_OFFSET]);
	if (hwif == NULL)
		goto out;

	i = hwif->index;

	if (hwif->present)
		ide_unregister(i, 0, 0);
	else if (!hwif->hold)
		ide_init_port_data(hwif, i);

	ide_init_port_hw(hwif, &hw);

	hwif->set_pio_mode = &palm_bk3710_set_pio_mode;
	hwif->set_dma_mode = &palm_bk3710_set_dma_mode;
	hwif->mmio = 1;
	default_hwif_mmiops(hwif);
	hwif->cbl = ATA_CBL_PATA80;
	hwif->ultra_mask = 0x1f;	/* Ultra DMA Mode 4 Max
						(input clk 99MHz) */
	hwif->mwdma_mask = 0x7;
	hwif->drives[0].autotune = 1;
	hwif->drives[1].autotune = 1;

	ide_setup_dma(hwif, mem->start);

	idx[0] = i;

	ide_device_add(idx, &palm_bk3710_port_info);

	if (!hwif->present)
		goto out;

	return 0;
out:
	printk(KERN_WARNING "Palm Chip BK3710 IDE Register Fail\n");
	return -ENODEV;
}

static struct platform_driver platform_bk_driver = {
+1 −1
Original line number Diff line number Diff line
@@ -1555,7 +1555,7 @@ int ide_cd_read_toc(ide_drive_t *drive, struct request_sense *sense)
	if (stat)
		return stat;

	toc->hdr.toc_length = ntohs (toc->hdr.toc_length);
	toc->hdr.toc_length = be16_to_cpu(toc->hdr.toc_length);

	if (info->cd_flags & IDE_CD_FLAG_TOCTRACKS_AS_BCD) {
		toc->hdr.first_track = BCD2BIN(toc->hdr.first_track);
+11 −7
Original line number Diff line number Diff line
@@ -590,20 +590,24 @@ static ide_proc_entry_t idedisk_proc[] = {
static void idedisk_prepare_flush(struct request_queue *q, struct request *rq)
{
	ide_drive_t *drive = q->queuedata;
	ide_task_t task;
	ide_task_t *task = kmalloc(sizeof(*task), GFP_ATOMIC);

	memset(&task, 0, sizeof(task));
	/* FIXME: map struct ide_taskfile on rq->cmd[] */
	BUG_ON(task == NULL);

	memset(task, 0, sizeof(*task));
	if (ide_id_has_flush_cache_ext(drive->id) &&
	    (drive->capacity64 >= (1UL << 28)))
		task.tf.command = WIN_FLUSH_CACHE_EXT;
		task->tf.command = WIN_FLUSH_CACHE_EXT;
	else
		task.tf.command = WIN_FLUSH_CACHE;
	task.tf_flags	= IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE;
	task.data_phase	= TASKFILE_NO_DATA;
		task->tf.command = WIN_FLUSH_CACHE;
	task->tf_flags	 = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE |
			   IDE_TFLAG_DYN;
	task->data_phase = TASKFILE_NO_DATA;

	rq->cmd_type = REQ_TYPE_ATA_TASKFILE;
	rq->cmd_flags |= REQ_SOFTBARRIER;
	rq->special = &task;
	rq->special = task;
}

/*
Loading