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

Commit 969907a9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide: drivers/ide/generic.c -> drivers/ide/ide-pci-generic.c
  ide-disk: set non-rotational queue flag for SSD and CF devices
  ide-cd: add TEAC CD-224E to the NO_AUTOCLOSE list
  ide: Add tx4938ide driver (v2)
  TXx9: Add TX4938 ATA support (v3)
  ide: Add tx4939ide driver (v6)
  ide: two more pci_ioremap_bar() conversions
  pci: use pci_ioremap_bar() in drivers/ide
  sgiioc4: use ide_host_add() (take 2)
  sgiioc4: fix error cleanup path (take 2)
parents ea541686 fa3fd720
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -292,4 +292,17 @@ void tx4938_setup_pcierr_irq(void);
void tx4938_irq_init(void);
void tx4938_mtd_init(int ch);

struct tx4938ide_platform_info {
	/*
	 * I/O port shift, for platforms with ports that are
	 * constantly spaced and need larger than the 1-byte
	 * spacing used by ata_std_ports().
	 */
	unsigned int ioport_shift;
	unsigned int gbus_clock;	/*  0 means no PIO mode tuning. */
	unsigned int ebus_ch;
};

void tx4938_ata_init(unsigned int irq, unsigned int shift, int tune);

#endif
+47 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
#include <linux/param.h>
#include <linux/ptrace.h>
#include <linux/mtd/physmap.h>
#include <linux/platform_device.h>
#include <asm/reboot.h>
#include <asm/traps.h>
#include <asm/txx9irq.h>
@@ -335,6 +336,52 @@ void __init tx4938_mtd_init(int ch)
	txx9_physmap_flash_init(ch, start, size, &pdata);
}

void __init tx4938_ata_init(unsigned int irq, unsigned int shift, int tune)
{
	struct platform_device *pdev;
	struct resource res[] = {
		{
			/* .start and .end are filled in later */
			.flags = IORESOURCE_MEM,
		}, {
			.start = irq,
			.flags = IORESOURCE_IRQ,
		},
	};
	struct tx4938ide_platform_info pdata = {
		.ioport_shift = shift,
		/*
		 * The IDE driver should not change bus timings if other ISA
		 * devices existed.
		 */
		.gbus_clock = tune ? txx9_gbus_clock : 0,
	};
	u64 ebccr;
	int i;

	if ((__raw_readq(&tx4938_ccfgptr->pcfg) &
	     (TX4938_PCFG_ATA_SEL | TX4938_PCFG_NDF_SEL))
	    != TX4938_PCFG_ATA_SEL)
		return;
	for (i = 0; i < 8; i++) {
		/* check EBCCRn.ISA, EBCCRn.BSZ, EBCCRn.ME */
		ebccr = __raw_readq(&tx4938_ebuscptr->cr[i]);
		if ((ebccr & 0x00f00008) == 0x00e00008)
			break;
	}
	if (i == 8)
		return;
	pdata.ebus_ch = i;
	res[0].start = ((ebccr >> 48) << 20) + 0x10000;
	res[0].end = res[0].start + 0x20000 - 1;
	pdev = platform_device_alloc("tx4938ide", -1);
	if (!pdev ||
	    platform_device_add_resources(pdev, res, ARRAY_SIZE(res)) ||
	    platform_device_add_data(pdev, &pdata, sizeof(pdata)) ||
	    platform_device_add(pdev))
		platform_device_put(pdev);
}

static void __init tx4938_stop_unused_modules(void)
{
	__u64 pcfg, rst = 0, ckd = 0;
+1 −0
Original line number Diff line number Diff line
@@ -352,6 +352,7 @@ static void __init rbtx4938_device_init(void)
	rbtx4938_ne_init();
	tx4938_wdt_init();
	rbtx4938_mtd_init();
	tx4938_ata_init(RBTX4938_IRQ_IOC_ATA, 0, 1);
	txx9_iocled_init(RBTX4938_LED_ADDR - IO_BASE, -1, 8, 1, "green", NULL);
}

+10 −0
Original line number Diff line number Diff line
@@ -720,6 +720,16 @@ config BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ
       default "128"
       depends on BLK_DEV_IDE_AU1XXX

config BLK_DEV_IDE_TX4938
	tristate "TX4938 internal IDE support"
	depends on SOC_TX4938
	select IDE_TIMINGS

config BLK_DEV_IDE_TX4939
	tristate "TX4939 internal IDE support"
	depends on SOC_TX4939
	select BLK_DEV_IDEDMA_SFF

config IDE_ARM
	tristate "ARM IDE support"
	depends on ARM && (ARCH_CLPS7500 || ARCH_RPC || ARCH_SHARK)
+3 −1
Original line number Diff line number Diff line
@@ -68,7 +68,6 @@ obj-$(CONFIG_BLK_DEV_VIA82CXXX) += via82cxxx.o

# Must appear at the end of the block
obj-$(CONFIG_BLK_DEV_GENERIC)		+= ide-pci-generic.o
ide-pci-generic-y			+= generic.o

obj-$(CONFIG_IDEPCI_PCIBUS_ORDER)	+= ide-scan-pci.o

@@ -111,3 +110,6 @@ obj-$(CONFIG_BLK_DEV_IDE_RAPIDE) += rapide.o
obj-$(CONFIG_BLK_DEV_PALMCHIP_BK3710)	+= palm_bk3710.o

obj-$(CONFIG_BLK_DEV_IDE_AU1XXX)	+= au1xxx-ide.o

obj-$(CONFIG_BLK_DEV_IDE_TX4938)	+= tx4938ide.o
obj-$(CONFIG_BLK_DEV_IDE_TX4939)	+= tx4939ide.o
Loading