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

Commit f1ea7254 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide: workaround for bogus gcc warning in ide_sysfs_register_port()
  ide-cd: Optiarc DVD RW AD-7200A does play audio
  IDE: Fix platform device registration in Swarm IDE driver (v2)
  ide-dma: fix ide_build_dmatable() for TRM290
  ide-cd: temporary tray close fix
parents ba9b0c11 ca09a237
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
obj-y				:= setup.o rtc_xicor1241.o rtc_m41t81.o
obj-y				:= platform.o setup.o rtc_xicor1241.o \
				   rtc_m41t81.o


obj-$(CONFIG_I2C_BOARDINFO)	+= swarm-i2c.o
obj-$(CONFIG_I2C_BOARDINFO)	+= swarm-i2c.o
+81 −0
Original line number Original line Diff line number Diff line
#include <linux/err.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/ata_platform.h>

#include <asm/sibyte/board.h>
#include <asm/sibyte/sb1250_genbus.h>
#include <asm/sibyte/sb1250_regs.h>

#define DRV_NAME	"pata-swarm"

#define SWARM_IDE_SHIFT	5
#define SWARM_IDE_BASE	0x1f0
#define SWARM_IDE_CTRL	0x3f6

static struct resource swarm_pata_resource[] = {
	{
		.name	= "Swarm GenBus IDE",
		.flags	= IORESOURCE_MEM,
	}, {
		.name	= "Swarm GenBus IDE",
		.flags	= IORESOURCE_MEM,
	}, {
		.name	= "Swarm GenBus IDE",
		.flags	= IORESOURCE_IRQ,
		.start	= K_INT_GB_IDE,
		.end	= K_INT_GB_IDE,
	},
};

static struct pata_platform_info pata_platform_data = {
	.ioport_shift	= SWARM_IDE_SHIFT,
};

static struct platform_device swarm_pata_device = {
	.name		= "pata_platform",
	.id		= -1,
	.resource	= swarm_pata_resource,
	.num_resources	= ARRAY_SIZE(swarm_pata_resource),
	.dev  = {
		.platform_data		= &pata_platform_data,
		.coherent_dma_mask	= ~0,	/* grumble */
	},
};

static int __init swarm_pata_init(void)
{
	u8 __iomem *base;
	phys_t offset, size;
	struct resource *r;

	if (!SIBYTE_HAVE_IDE)
		return -ENODEV;

	base = ioremap(A_IO_EXT_BASE, 0x800);
	offset = __raw_readq(base + R_IO_EXT_REG(R_IO_EXT_START_ADDR, IDE_CS));
	size = __raw_readq(base + R_IO_EXT_REG(R_IO_EXT_MULT_SIZE, IDE_CS));
	iounmap(base);

	offset = G_IO_START_ADDR(offset) << S_IO_ADDRBASE;
	size = (G_IO_MULT_SIZE(size) + 1) << S_IO_REGSIZE;
	if (offset < A_PHYS_GENBUS || offset >= A_PHYS_GENBUS_END) {
		pr_info(DRV_NAME ": PATA interface at GenBus disabled\n");

		return -EBUSY;
	}

	pr_info(DRV_NAME ": PATA interface at GenBus slot %i\n", IDE_CS);

	r = swarm_pata_resource;
	r[0].start = offset + (SWARM_IDE_BASE << SWARM_IDE_SHIFT);
	r[0].end   = offset + ((SWARM_IDE_BASE + 8) << SWARM_IDE_SHIFT) - 1;
	r[1].start = offset + (SWARM_IDE_CTRL << SWARM_IDE_SHIFT);
	r[1].end   = offset + ((SWARM_IDE_CTRL + 1) << SWARM_IDE_SHIFT) - 1;

	return platform_device_register(&swarm_pata_device);
}

device_initcall(swarm_pata_init);
+0 −4
Original line number Original line Diff line number Diff line
@@ -780,10 +780,6 @@ config BLK_DEV_IDEDMA_PMAC
	  to transfer data to and from memory.  Saying Y is safe and improves
	  to transfer data to and from memory.  Saying Y is safe and improves
	  performance.
	  performance.


config BLK_DEV_IDE_SWARM
	tristate "IDE for Sibyte evaluation boards"
	depends on SIBYTE_SB1xxx_SOC

config BLK_DEV_IDE_AU1XXX
config BLK_DEV_IDE_AU1XXX
       bool "IDE for AMD Alchemy Au1200"
       bool "IDE for AMD Alchemy Au1200"
       depends on SOC_AU1200
       depends on SOC_AU1200
+5 −1
Original line number Original line Diff line number Diff line
@@ -1661,7 +1661,9 @@ static int ide_cdrom_probe_capabilities(ide_drive_t *drive)
		cdi->mask &= ~CDC_PLAY_AUDIO;
		cdi->mask &= ~CDC_PLAY_AUDIO;


	mechtype = buf[8 + 6] >> 5;
	mechtype = buf[8 + 6] >> 5;
	if (mechtype == mechtype_caddy || mechtype == mechtype_popup)
	if (mechtype == mechtype_caddy ||
	    mechtype == mechtype_popup ||
	    (drive->atapi_flags & IDE_AFLAG_NO_AUTOCLOSE))
		cdi->mask |= CDC_CLOSE_TRAY;
		cdi->mask |= CDC_CLOSE_TRAY;


	if (cdi->sanyo_slot > 0) {
	if (cdi->sanyo_slot > 0) {
@@ -1859,6 +1861,8 @@ static const struct cd_list_entry ide_cd_quirks_list[] = {
	{ "MATSHITADVD-ROM SR-8176", NULL,   IDE_AFLAG_PLAY_AUDIO_OK	     },
	{ "MATSHITADVD-ROM SR-8176", NULL,   IDE_AFLAG_PLAY_AUDIO_OK	     },
	{ "MATSHITADVD-ROM SR-8174", NULL,   IDE_AFLAG_PLAY_AUDIO_OK	     },
	{ "MATSHITADVD-ROM SR-8174", NULL,   IDE_AFLAG_PLAY_AUDIO_OK	     },
	{ "Optiarc DVD RW AD-5200A", NULL,   IDE_AFLAG_PLAY_AUDIO_OK	     },
	{ "Optiarc DVD RW AD-5200A", NULL,   IDE_AFLAG_PLAY_AUDIO_OK	     },
	{ "Optiarc DVD RW AD-7200A", NULL,   IDE_AFLAG_PLAY_AUDIO_OK	     },
	{ "Optiarc DVD RW AD-7543A", NULL,   IDE_AFLAG_NO_AUTOCLOSE	     },
	{ NULL, NULL, 0 }
	{ NULL, NULL, 0 }
};
};


+1 −1
Original line number Original line Diff line number Diff line
@@ -211,7 +211,7 @@ int ide_build_dmatable (ide_drive_t *drive, struct request *rq)
				xcount = bcount & 0xffff;
				xcount = bcount & 0xffff;
				if (is_trm290)
				if (is_trm290)
					xcount = ((xcount >> 2) - 1) << 16;
					xcount = ((xcount >> 2) - 1) << 16;
				if (xcount == 0x0000) {
				else if (xcount == 0x0000) {
	/* 
	/* 
	 * Most chipsets correctly interpret a length of 0x0000 as 64KB,
	 * Most chipsets correctly interpret a length of 0x0000 as 64KB,
	 * but at least one (e.g. CS5530) misinterprets it as zero (!).
	 * but at least one (e.g. CS5530) misinterprets it as zero (!).
Loading