Commit 3d677dc5 authored by Andy Grover's avatar Andy Grover

Merge groveronline.com:/root/bk/linux-2.5

into groveronline.com:/root/bk/linux-acpi
parents 0a029011 6ff3e5b7
...@@ -128,9 +128,6 @@ archmrproper: ...@@ -128,9 +128,6 @@ archmrproper:
vmlinux: arch/alpha/vmlinux.lds.s vmlinux: arch/alpha/vmlinux.lds.s
arch/$(ARCH)/vmlinux.lds.s: arch/$(ARCH)/vmlinux.lds.S
$(CPP) $(CPPFLAGS) $(CPPFLAGS_$@) -D__ASSEMBLY__ -P -C -U$(ARCH) $< -o $@
bootpfile: bootpfile:
@$(MAKEBOOT) bootpfile @$(MAKEBOOT) bootpfile
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
static struct fs_struct init_fs = INIT_FS; static struct fs_struct init_fs = INIT_FS;
static struct files_struct init_files = INIT_FILES; static struct files_struct init_files = INIT_FILES;
static struct signal_struct init_signals = INIT_SIGNALS; static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
struct mm_struct init_mm = INIT_MM(init_mm); struct mm_struct init_mm = INIT_MM(init_mm);
struct task_struct init_task = INIT_TASK(init_task); struct task_struct init_task = INIT_TASK(init_task);
......
...@@ -343,7 +343,7 @@ pcibios_fixup_pbus_ranges(struct pci_bus * bus, ...@@ -343,7 +343,7 @@ pcibios_fixup_pbus_ranges(struct pci_bus * bus,
} }
int int
pcibios_enable_device(struct pci_dev *dev) pcibios_enable_device(struct pci_dev *dev, int mask)
{ {
/* Nothing to do, since we enable all devices at startup. */ /* Nothing to do, since we enable all devices at startup. */
return 0; return 0;
......
...@@ -592,108 +592,19 @@ static int ...@@ -592,108 +592,19 @@ static int
do_signal(sigset_t *oldset, struct pt_regs * regs, struct switch_stack * sw, do_signal(sigset_t *oldset, struct pt_regs * regs, struct switch_stack * sw,
unsigned long r0, unsigned long r19) unsigned long r0, unsigned long r19)
{ {
siginfo_t info;
int signr;
unsigned long single_stepping = ptrace_cancel_bpt(current); unsigned long single_stepping = ptrace_cancel_bpt(current);
if (!oldset) if (!oldset)
oldset = &current->blocked; oldset = &current->blocked;
while (1) { signr = get_signal_to_deliver(&info, regs);
unsigned long signr;
struct k_sigaction *ka;
siginfo_t info;
spin_lock_irq(&current->sigmask_lock);
signr = dequeue_signal(&current->blocked, &info);
spin_unlock_irq(&current->sigmask_lock);
if (!signr)
break;
if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) {
/* Let the debugger run. */
current->exit_code = signr;
current->state = TASK_STOPPED;
notify_parent(current, SIGCHLD);
schedule();
single_stepping |= ptrace_cancel_bpt(current);
/* We're back. Did the debugger cancel the sig? */
if (!(signr = current->exit_code))
continue;
current->exit_code = 0;
/* The debugger continued. Ignore SIGSTOP. */
if (signr == SIGSTOP)
continue;
/* Update the siginfo structure. Is this good? */
if (signr != info.si_signo) {
info.si_signo = signr;
info.si_errno = 0;
info.si_code = SI_USER;
info.si_pid = current->parent->pid;
info.si_uid = current->parent->uid;
}
/* If the (new) signal is now blocked, requeue it. */
if (sigismember(&current->blocked, signr)) {
send_sig_info(signr, &info, current);
continue;
}
}
ka = &current->sig->action[signr-1];
if (ka->sa.sa_handler == SIG_IGN) {
if (signr != SIGCHLD)
continue;
/* Check for SIGCHLD: it's special. */
while (sys_wait4(-1, NULL, WNOHANG, NULL) > 0)
/* nothing */;
continue;
}
if (ka->sa.sa_handler == SIG_DFL) {
int exit_code = signr & 0x7f;
/* Init gets no signals it doesn't want. */
if (current->pid == 1)
continue;
switch (signr) {
case SIGCONT: case SIGCHLD: case SIGWINCH:
continue;
case SIGTSTP: case SIGTTIN: case SIGTTOU:
if (is_orphaned_pgrp(current->pgrp))
continue;
/* FALLTHRU */
case SIGSTOP:
current->state = TASK_STOPPED;
current->exit_code = signr;
if (!(current->parent->sig->action[SIGCHLD-1]
.sa.sa_flags & SA_NOCLDSTOP))
notify_parent(current, SIGCHLD);
schedule();
single_stepping |= ptrace_cancel_bpt(current);
continue;
case SIGQUIT: case SIGILL: case SIGTRAP:
case SIGABRT: case SIGFPE: case SIGSEGV:
case SIGBUS: case SIGSYS: case SIGXCPU: case SIGXFSZ:
if (do_coredump(signr, regs))
exit_code |= 0x80;
/* FALLTHRU */
default:
lock_kernel();
sig_exit(signr, exit_code, &info);
/* NOTREACHED */
}
continue;
}
if (signr > 0) {
/* Whee! Actually deliver the signal. */ /* Whee! Actually deliver the signal. */
struct k_sigaction *ka = &current->sig->action[signr-1];
if (r0) syscall_restart(r0, r19, regs, ka); if (r0) syscall_restart(r0, r19, regs, ka);
handle_signal(signr, ka, &info, oldset, regs, sw); handle_signal(signr, ka, &info, oldset, regs, sw);
if (single_stepping) if (single_stepping)
......
...@@ -759,6 +759,7 @@ ENTRY(sys_call_table) ...@@ -759,6 +759,7 @@ ENTRY(sys_call_table)
.long sys_io_getevents .long sys_io_getevents
.long sys_io_submit .long sys_io_submit
.long sys_io_cancel .long sys_io_cancel
.long sys_exit_group /* 250 */
.rept NR_syscalls-(.-sys_call_table)/4 .rept NR_syscalls-(.-sys_call_table)/4
.long sys_ni_syscall .long sys_ni_syscall
......
...@@ -13,7 +13,7 @@ obj-y += mem.o tty_io.o n_tty.o tty_ioctl.o pty.o misc.o random.o ...@@ -13,7 +13,7 @@ obj-y += mem.o tty_io.o n_tty.o tty_ioctl.o pty.o misc.o random.o
# This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'. # This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'.
export-objs := busmouse.o console.o generic_serial.o ip2main.o \ export-objs := busmouse.o console.o generic_serial.o ip2main.o \
ite_gpio.o misc.o nvram.o pty.o random.o rtc.o \ ite_gpio.o misc.o nvram.o random.o rtc.o \
selection.o sonypi.o sysrq.o tty_io.o tty_ioctl.o selection.o sonypi.o sysrq.o tty_io.o tty_ioctl.o
obj-$(CONFIG_VT) += vt.o vc_screen.o consolemap.o consolemap_deftbl.o selection.o keyboard.o obj-$(CONFIG_VT) += vt.o vc_screen.o consolemap.o consolemap_deftbl.o selection.o keyboard.o
......
...@@ -34,26 +34,12 @@ ...@@ -34,26 +34,12 @@
#include "../zftape/zftape-buffers.h" #include "../zftape/zftape-buffers.h"
#include "../zftape/zftape-ctl.h" #include "../zftape/zftape-ctl.h"
#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,18)
# define FT_KSYM(sym) EXPORT_SYMBOL(sym);
#else
# define FT_KSYM(sym) X(sym),
#endif
#if LINUX_VERSION_CODE < KERNEL_VER(2,1,18)
struct symbol_table zft_symbol_table = {
#include <linux/symtab_begin.h>
#endif
/* zftape-init.c */ /* zftape-init.c */
FT_KSYM(zft_cmpr_register) EXPORT_SYMBOL(zft_cmpr_register);
FT_KSYM(zft_cmpr_unregister) EXPORT_SYMBOL(zft_cmpr_unregister);
/* zftape-read.c */ /* zftape-read.c */
FT_KSYM(zft_fetch_segment_fraction) EXPORT_SYMBOL(zft_fetch_segment_fraction);
/* zftape-buffers.c */ /* zftape-buffers.c */
FT_KSYM(zft_vmalloc_once) EXPORT_SYMBOL(zft_vmalloc_once);
FT_KSYM(zft_vmalloc_always) EXPORT_SYMBOL(zft_vmalloc_always);
FT_KSYM(zft_vfree) EXPORT_SYMBOL(zft_vfree);
#if LINUX_VERSION_CODE < KERNEL_VER(2,1,18)
#include <linux/symtab_end.h>
};
#endif
This diff is collapsed.
...@@ -7,61 +7,36 @@ ...@@ -7,61 +7,36 @@
# Note : at this point, these files are compiled on all systems. # Note : at this point, these files are compiled on all systems.
# In the future, some of these should be built conditionally. # In the future, some of these should be built conditionally.
# #
export-objs := ide-taskfile.o ide.o ide-probe.o export-objs := ide-iops.o ide-taskfile.o ide-proc.o ide.o ide-probe.o ide-dma.o ide-lib.o setup-pci.o
obj-$(CONFIG_BLK_DEV_IDE) += ide-mod.o ide-probe-mod.o all-subdirs := arm legacy pci ppc
obj-$(CONFIG_BLK_DEV_IDECS) += ide-cs.o mod-subdirs := arm legacy pci ppc
obj-$(CONFIG_BLK_DEV_IDEDISK) += ide-disk.o
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_IT8172) += it8172.o obj-y :=
obj-m :=
ide-obj-y :=
ide-obj-$(CONFIG_BLK_DEV_ADMA100) += adma100.o subdir-$(CONFIG_BLK_DEV_IDEPCI) += pci
ide-obj-$(CONFIG_BLK_DEV_AEC62XX) += aec62xx.o subdir-$(CONFIG_BLK_DEV_IDE) += legacy ppc arm pci
ide-obj-$(CONFIG_BLK_DEV_ALI14XX) += ali14xx.o
ide-obj-$(CONFIG_BLK_DEV_ALI15X3) += alim15x3.o
ide-obj-$(CONFIG_BLK_DEV_AMD74XX) += amd74xx.o
ide-obj-$(CONFIG_BLK_DEV_BUDDHA) += buddha.o
ide-obj-$(CONFIG_BLK_DEV_CMD640) += cmd640.o
ide-obj-$(CONFIG_BLK_DEV_CMD64X) += cmd64x.o
ide-obj-$(CONFIG_BLK_DEV_CS5530) += cs5530.o
ide-obj-$(CONFIG_BLK_DEV_CY82C693) += cy82c693.o
ide-obj-$(CONFIG_BLK_DEV_DTC2278) += dtc2278.o
ide-obj-$(CONFIG_BLK_DEV_FALCON_IDE) += falconide.o
ide-obj-$(CONFIG_BLK_DEV_GAYLE) += gayle.o
ide-obj-$(CONFIG_BLK_DEV_Q40IDE) += q40ide.o
ide-obj-$(CONFIG_BLK_DEV_HPT34X) += hpt34x.o
ide-obj-$(CONFIG_BLK_DEV_HPT366) += hpt366.o
ide-obj-$(CONFIG_BLK_DEV_HT6560B) += ht6560b.o
ide-obj-$(CONFIG_BLK_DEV_IDE_ICSIDE) += icside.o
ide-obj-$(CONFIG_BLK_DEV_IDEDMA_PCI) += ide-dma.o
ide-obj-$(CONFIG_BLK_DEV_MPC8xx_IDE) += ide-m8xx.o
ide-obj-$(CONFIG_BLK_DEV_IDEPCI) += ide-pci.o
ide-obj-$(CONFIG_BLK_DEV_ISAPNP) += ide-pnp.o
ide-obj-$(CONFIG_BLK_DEV_IDE_PMAC) += ide-pmac.o
ide-obj-$(CONFIG_BLK_DEV_IDE_SWARM) += ide-swarm.o
ide-obj-$(CONFIG_BLK_DEV_MAC_IDE) += macide.o
ide-obj-$(CONFIG_BLK_DEV_NS87415) += ns87415.o
ide-obj-$(CONFIG_BLK_DEV_OPTI621) += opti621.o
ide-obj-$(CONFIG_BLK_DEV_SVWKS) += serverworks.o
ide-obj-$(CONFIG_BLK_DEV_PDC202XX) += pdc202xx.o
ide-obj-$(CONFIG_BLK_DEV_PDC4030) += pdc4030.o
ide-obj-$(CONFIG_BLK_DEV_PIIX) += piix.o
ide-obj-$(CONFIG_BLK_DEV_QD65XX) += qd65xx.o
ide-obj-$(CONFIG_BLK_DEV_IDE_RAPIDE) += rapide.o
ide-obj-$(CONFIG_BLK_DEV_RZ1000) += rz1000.o
ide-obj-$(CONFIG_BLK_DEV_SIS5513) += sis5513.o
ide-obj-$(CONFIG_BLK_DEV_SLC90E66) += slc90e66.o
ide-obj-$(CONFIG_BLK_DEV_SL82C105) += sl82c105.o
ide-obj-$(CONFIG_BLK_DEV_TRM290) += trm290.o
ide-obj-$(CONFIG_BLK_DEV_UMC8672) += umc8672.o
ide-obj-$(CONFIG_BLK_DEV_VIA82CXXX) += via82cxxx.o
ide-obj-$(CONFIG_PROC_FS) += ide-proc.o obj-$(CONFIG_BLK_DEV_IDE) += ide-probe.o ide-geometry.o ide-iops.o ide-taskfile.o ide.o ide-lib.o
obj-$(CONFIG_BLK_DEV_IDEDISK) += ide-disk.o
obj-$(CONFIG_BLK_DEV_IDECD) += ide-cd.o
obj-$(CONFIG_BLK_DEV_IDETAPE) += ide-tape.o
obj-$(CONFIG_BLK_DEV_IDEFLOPPY) += ide-floppy.o
ide-mod-objs := ide-taskfile.o ide.o $(ide-obj-y) obj-$(CONFIG_BLK_DEV_IDEDMA_PCI) += ide-dma.o
ide-probe-mod-objs := ide-probe.o ide-geometry.o obj-$(CONFIG_BLK_DEV_ISAPNP) += ide-pnp.o
obj-$(CONFIG_PROC_FS) += ide-proc.o
obj-$(CONFIG_BLK_DEV_IDEPCI) += setup-pci.o
ifeq ($(CONFIG_BLK_DEV_IDE),y)
obj-y += pci/idedriver-pci.o
obj-y += legacy/idedriver-legacy.o
obj-y += ppc/idedriver-ppc.o
obj-y += arm/idedriver-arm.o
endif
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
O_TARGET := idedriver-arm.o
obj-y :=
obj-m :=
obj-$(CONFIG_BLK_DEV_IDE_ICSIDE) += icside.o
obj-$(CONFIG_BLK_DEV_IDE_RAPIDE) += rapide.o
EXTRA_CFLAGS := -I../
include $(TOPDIR)/Rules.make
/*
* linux/drivers/ide/ide-adma.c Version 0.00 June 24, 2001
*
* Copyright (c) 2001 Andre Hedrick <andre@linux-ide.org>
*
* Asynchronous DMA -- TBA, this is a holding file.
*
*/
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
#include <linux/mc146818rtc.h> #include <linux/mc146818rtc.h>
#include <asm/io.h> #include <asm/io.h>
#ifdef CONFIG_BLK_DEV_IDE
/* /*
* We query CMOS about hard disks : it could be that we have a SCSI/ESDI/etc * We query CMOS about hard disks : it could be that we have a SCSI/ESDI/etc
* controller that is BIOS compatible with ST-506, and thus showing up in our * controller that is BIOS compatible with ST-506, and thus showing up in our
...@@ -25,14 +23,12 @@ ...@@ -25,14 +23,12 @@
* If a drive is not actually on the primary interface, then these parameters * If a drive is not actually on the primary interface, then these parameters
* will be ignored. This results in the user having to supply the logical * will be ignored. This results in the user having to supply the logical
* drive geometry as a boot parameter for each drive not on the primary i/f. * drive geometry as a boot parameter for each drive not on the primary i/f.
*/ *
/*
* The only "perfect" way to handle this would be to modify the setup.[cS] code * The only "perfect" way to handle this would be to modify the setup.[cS] code
* to do BIOS calls Int13h/Fn08h and Int13h/Fn48h to get all of the drive info * to do BIOS calls Int13h/Fn08h and Int13h/Fn48h to get all of the drive info
* for us during initialization. I have the necessary docs -- any takers? -ml * for us during initialization. I have the necessary docs -- any takers? -ml
*/ *
/* * I did this, but it doesn't work - there is no reasonable way to find the
* I did this, but it doesnt work - there is no reasonable way to find the
* correspondence between the BIOS numbering of the disks and the Linux * correspondence between the BIOS numbering of the disks and the Linux
* numbering. -aeb * numbering. -aeb
* *
...@@ -51,14 +47,13 @@ void probe_cmos_for_drives (ide_hwif_t *hwif) ...@@ -51,14 +47,13 @@ void probe_cmos_for_drives (ide_hwif_t *hwif)
{ {
#ifdef __i386__ #ifdef __i386__
extern struct drive_info_struct drive_info; extern struct drive_info_struct drive_info;
byte cmos_disks, *BIOS = (byte *) &drive_info; u8 cmos_disks, *BIOS = (u8 *) &drive_info;
int unit; int unit;
unsigned long flags; unsigned long flags;
#ifdef CONFIG_BLK_DEV_PDC4030
if (hwif->chipset == ide_pdc4030 && hwif->channel != 0) if (hwif->chipset == ide_pdc4030 && hwif->channel != 0)
return; return;
#endif /* CONFIG_BLK_DEV_PDC4030 */
spin_lock_irqsave(&rtc_lock, flags); spin_lock_irqsave(&rtc_lock, flags);
cmos_disks = CMOS_READ(0x12); cmos_disks = CMOS_READ(0x12);
spin_unlock_irqrestore(&rtc_lock, flags); spin_unlock_irqrestore(&rtc_lock, flags);
...@@ -68,7 +63,7 @@ void probe_cmos_for_drives (ide_hwif_t *hwif) ...@@ -68,7 +63,7 @@ void probe_cmos_for_drives (ide_hwif_t *hwif)
if ((cmos_disks & (0xf0 >> (unit*4))) if ((cmos_disks & (0xf0 >> (unit*4)))
&& !drive->present && !drive->nobios) { && !drive->present && !drive->nobios) {
unsigned short cyl = *(unsigned short *)BIOS; u16 cyl = *(u16 *)BIOS;
unsigned char head = *(BIOS+2); unsigned char head = *(BIOS+2);
unsigned char sect = *(BIOS+14); unsigned char sect = *(BIOS+14);
if (cyl > 0 && head > 0 && sect > 0 && sect < 64) { if (cyl > 0 && head > 0 && sect > 0 && sect < 64) {
...@@ -86,10 +81,7 @@ void probe_cmos_for_drives (ide_hwif_t *hwif) ...@@ -86,10 +81,7 @@ void probe_cmos_for_drives (ide_hwif_t *hwif)
} }
#endif #endif
} }
#endif /* CONFIG_BLK_DEV_IDE */
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
extern ide_drive_t * get_info_ptr(kdev_t); extern ide_drive_t * get_info_ptr(kdev_t);
extern unsigned long current_capacity (ide_drive_t *); extern unsigned long current_capacity (ide_drive_t *);
...@@ -98,10 +90,11 @@ extern unsigned long current_capacity (ide_drive_t *); ...@@ -98,10 +90,11 @@ extern unsigned long current_capacity (ide_drive_t *);
* If heads is nonzero: find a translation with this many heads and S=63. * If heads is nonzero: find a translation with this many heads and S=63.
* Otherwise: find out how OnTrack Disk Manager would translate the disk. * Otherwise: find out how OnTrack Disk Manager would translate the disk.
*/ */
static void
ontrack(ide_drive_t *drive, int heads, unsigned int *c, int *h, int *s) { static void ontrack(ide_drive_t *drive, int heads, unsigned int *c, int *h, int *s)
static const byte dm_head_vals[] = {4, 8, 16, 32, 64, 128, 255, 0}; {
const byte *headp = dm_head_vals; static const u8 dm_head_vals[] = {4, 8, 16, 32, 64, 128, 255, 0};
const u8 *headp = dm_head_vals;
unsigned long total; unsigned long total;
/* /*
...@@ -153,6 +146,7 @@ ontrack(ide_drive_t *drive, int heads, unsigned int *c, int *h, int *s) { ...@@ -153,6 +146,7 @@ ontrack(ide_drive_t *drive, int heads, unsigned int *c, int *h, int *s) {
* an IDE disk drive, or if a geometry was "forced" on the commandline. * an IDE disk drive, or if a geometry was "forced" on the commandline.
* Returns 1 if the geometry translation was successful. * Returns 1 if the geometry translation was successful.
*/ */
int ide_xlate_1024 (kdev_t i_rdev, int xparm, int ptheads, const char *msg) int ide_xlate_1024 (kdev_t i_rdev, int xparm, int ptheads, const char *msg)
{ {
ide_drive_t *drive; ide_drive_t *drive;
...@@ -217,8 +211,7 @@ int ide_xlate_1024 (kdev_t i_rdev, int xparm, int ptheads, const char *msg) ...@@ -217,8 +211,7 @@ int ide_xlate_1024 (kdev_t i_rdev, int xparm, int ptheads, const char *msg)
set_capacity(drive->disk, current_capacity(drive)); set_capacity(drive->disk, current_capacity(drive));
if (ret) if (ret)
printk("%s%s [%d/%d/%d]", msg, msg1, printk(KERN_INFO "%s%s [%d/%d/%d]", msg, msg1,
drive->bios_cyl, drive->bios_head, drive->bios_sect); drive->bios_cyl, drive->bios_head, drive->bios_sect);
return ret; return ret;
} }
#endif /* defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) */
This diff is collapsed.
#include <linux/config.h>
#define __NO_VERSION__
#include <linux/module.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/timer.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/major.h>
#include <linux/errno.h>
#include <linux/genhd.h>
#include <linux/blkpg.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/hdreg.h>
#include <linux/ide.h>
#include <asm/byteorder.h>
#include <asm/irq.h>
#include <asm/uaccess.h>
#include <asm/io.h>
#include <asm/bitops.h>
/*
* IDE library routines. These are plug in code that most
* drivers can use but occasionally may be weird enough
* to want to do their own thing with
*
* Add common non I/O op stuff here. Make sure it has proper
* kernel-doc function headers or your patch will be rejected
*/
/**
* ide_xfer_verbose - return IDE mode names
* @xfer_rate: rate to name
*
* Returns a constant string giving the name of the mode
* requested.
*/
char *ide_xfer_verbose (u8 xfer_rate)
{
switch(xfer_rate) {
case XFER_UDMA_7: return("UDMA 7");
case XFER_UDMA_6: return("UDMA 6");
case XFER_UDMA_5: return("UDMA 5");
case XFER_UDMA_4: return("UDMA 4");
case XFER_UDMA_3: return("UDMA 3");
case XFER_UDMA_2: return("UDMA 2");
case XFER_UDMA_1: return("UDMA 1");
case XFER_UDMA_0: return("UDMA 0");
case XFER_MW_DMA_2: return("MW DMA 2");
case XFER_MW_DMA_1: return("MW DMA 1");
case XFER_MW_DMA_0: return("MW DMA 0");
case XFER_SW_DMA_2: return("SW DMA 2");
case XFER_SW_DMA_1: return("SW DMA 1");
case XFER_SW_DMA_0: return("SW DMA 0");
case XFER_PIO_4: return("PIO 4");
case XFER_PIO_3: return("PIO 3");
case XFER_PIO_2: return("PIO 2");
case XFER_PIO_1: return("PIO 1");
case XFER_PIO_0: return("PIO 0");
case XFER_PIO_SLOW: return("PIO SLOW");
default: return("XFER ERROR");
}
}
EXPORT_SYMBOL(ide_xfer_verbose);
/**
* ide_dma_speed - compute DMA speed
* @drive: drive
* @mode; intended mode
*
* Checks the drive capabilities and returns the speed to use
* for the transfer. Returns -1 if the requested mode is unknown
* (eg PIO)
*/
u8 ide_dma_speed(ide_drive_t *drive, u8 mode)
{
struct hd_driveid *id = drive->id;
ide_hwif_t *hwif = HWIF(drive);
u8 speed = 0;
if (drive->media != ide_disk && hwif->atapi_dma == 0)
return 0;
switch(mode) {
case 0x04:
if ((id->dma_ultra & 0x0040) &&
(id->dma_ultra & hwif->ultra_mask))
{ speed = XFER_UDMA_6; break; }
case 0x03:
if ((id->dma_ultra & 0x0020) &&
(id->dma_ultra & hwif->ultra_mask))
{ speed = XFER_UDMA_5; break; }
case 0x02:
if ((id->dma_ultra & 0x0010) &&
(id->dma_ultra & hwif->ultra_mask))
{ speed = XFER_UDMA_4; break; }
if ((id->dma_ultra & 0x0008) &&
(id->dma_ultra & hwif->ultra_mask))
{ speed = XFER_UDMA_3; break; }
case 0x01:
if ((id->dma_ultra & 0x0004) &&
(id->dma_ultra & hwif->ultra_mask))
{ speed = XFER_UDMA_2; break; }
if ((id->dma_ultra & 0x0002) &&
(id->dma_ultra & hwif->ultra_mask))
{ speed = XFER_UDMA_1; break; }
if ((id->dma_ultra & 0x0001) &&
(id->dma_ultra & hwif->ultra_mask))
{ speed = XFER_UDMA_0; break; }
case 0x00:
if ((id->dma_mword & 0x0004) &&
(id->dma_mword & hwif->mwdma_mask))
{ speed = XFER_MW_DMA_2; break; }
if ((id->dma_mword & 0x0002) &&
(id->dma_mword & hwif->mwdma_mask))
{ speed = XFER_MW_DMA_1; break; }
if ((id->dma_mword & 0x0001) &&
(id->dma_mword & hwif->mwdma_mask))
{ speed = XFER_MW_DMA_0; break; }
if ((id->dma_1word & 0x0004) &&
(id->dma_1word & hwif->swdma_mask))
{ speed = XFER_SW_DMA_2; break; }
if ((id->dma_1word & 0x0002) &&
(id->dma_1word & hwif->swdma_mask))
{ speed = XFER_SW_DMA_1; break; }
if ((id->dma_1word & 0x0001) &&
(id->dma_1word & hwif->swdma_mask))
{ speed = XFER_SW_DMA_0; break; }
}
// printk("%s: %s: mode 0x%02x, speed 0x%02x\n",
// __FUNCTION__, drive->name, mode, speed);
return speed;
}
EXPORT_SYMBOL(ide_dma_speed);
/**
* ide_rate_filter - return best speed for mode
* @mode: modes available
* @speed: desired speed
*
* Given the available DMA/UDMA mode this function returns
* the best available speed at or below the speed requested.
*/
u8 ide_rate_filter (u8 mode, u8 speed)
{
#ifdef CONFIG_BLK_DEV_IDEDMA
static u8 speed_max[] = {
XFER_MW_DMA_2, XFER_UDMA_2, XFER_UDMA_4,
XFER_UDMA_5, XFER_UDMA_6
};
// printk("%s: mode 0x%02x, speed 0x%02x\n", __FUNCTION__, mode, speed);
/* So that we remember to update this if new modes appear */
if (mode > 4)
BUG();
return min(speed, speed_max[mode]);
#else /* !CONFIG_BLK_DEV_IDEDMA */
return min(speed, XFER_PIO_4);
#endif /* CONFIG_BLK_DEV_IDEDMA */
}
EXPORT_SYMBOL(ide_rate_filter);
int ide_dma_enable (ide_drive_t *drive)
{
ide_hwif_t *hwif = HWIF(drive);
struct hd_driveid *id = drive->id;
return ((int) ((((id->dma_ultra >> 8) & hwif->ultra_mask) ||
((id->dma_mword >> 8) & hwif->mwdma_mask) ||
((id->dma_1word >> 8) & hwif->swdma_mask)) ? 1 : 0));
}
EXPORT_SYMBOL(ide_dma_enable);
This diff is collapsed.
...@@ -21,12 +21,6 @@ ...@@ -21,12 +21,6 @@
#include <linux/isapnp.h> #include <linux/isapnp.h>
#ifndef PREPARE_FUNC
#define PREPARE_FUNC(dev) (dev->prepare)
#define ACTIVATE_FUNC(dev) (dev->activate)
#define DEACTIVATE_FUNC(dev) (dev->deactivate)
#endif
#define DEV_IO(dev, index) (dev->resource[index].start) #define DEV_IO(dev, index) (dev->resource[index].start)
#define DEV_IRQ(dev, index) (dev->irq_resource[index].start) #define DEV_IRQ(dev, index) (dev->irq_resource[index].start)
...@@ -54,6 +48,7 @@ struct pnp_dev_t { ...@@ -54,6 +48,7 @@ struct pnp_dev_t {
}; };
/* Generic initialisation function for ISA PnP IDE interface */ /* Generic initialisation function for ISA PnP IDE interface */
static int __init pnpide_generic_init(struct pci_dev *dev, int enable) static int __init pnpide_generic_init(struct pci_dev *dev, int enable)
{ {
hw_regs_t hw; hw_regs_t hw;
...@@ -66,13 +61,16 @@ static int __init pnpide_generic_init(struct pci_dev *dev, int enable) ...@@ -66,13 +61,16 @@ static int __init pnpide_generic_init(struct pci_dev *dev, int enable)
return 1; return 1;
ide_setup_ports(&hw, (ide_ioreg_t) DEV_IO(dev, 0), ide_setup_ports(&hw, (ide_ioreg_t) DEV_IO(dev, 0),
generic_ide_offsets, (ide_ioreg_t) DEV_IO(dev, 1), generic_ide_offsets,
0, NULL, DEV_IRQ(dev, 0)); (ide_ioreg_t) DEV_IO(dev, 1),
0, NULL,
// generic_pnp_ide_iops,
DEV_IRQ(dev, 0));
index = ide_register_hw(&hw, NULL); index = ide_register_hw(&hw, NULL);
if (index != -1) { if (index != -1) {
printk("ide%d: %s IDE interface\n", index, DEV_NAME(dev)); printk(KERN_INFO "ide%d: %s IDE interface\n", index, DEV_NAME(dev));
return 0; return 0;
} }
...@@ -88,7 +86,6 @@ struct pnp_dev_t idepnp_devices[] __initdata = { ...@@ -88,7 +86,6 @@ struct pnp_dev_t idepnp_devices[] __initdata = {
{ 0 } { 0 }
}; };
#ifdef MODULE
#define NR_PNP_DEVICES 8 #define NR_PNP_DEVICES 8
struct pnp_dev_inst { struct pnp_dev_inst {
struct pci_dev *dev; struct pci_dev *dev;
...@@ -96,11 +93,11 @@ struct pnp_dev_inst { ...@@ -96,11 +93,11 @@ struct pnp_dev_inst {
}; };
static struct pnp_dev_inst devices[NR_PNP_DEVICES]; static struct pnp_dev_inst devices[NR_PNP_DEVICES];
static int pnp_ide_dev_idx = 0; static int pnp_ide_dev_idx = 0;
#endif
/* /*
* Probe for ISA PnP IDE interfaces. * Probe for ISA PnP IDE interfaces.
*/ */
void __init pnpide_init(int enable) void __init pnpide_init(int enable)
{ {
struct pci_dev *dev = NULL; struct pci_dev *dev = NULL;
...@@ -109,19 +106,18 @@ void __init pnpide_init(int enable) ...@@ -109,19 +106,18 @@ void __init pnpide_init(int enable)
if (!isapnp_present()) if (!isapnp_present())
return; return;
#ifdef MODULE
/* Module unload, deactivate all registered devices. */ /* Module unload, deactivate all registered devices. */
if (!enable) { if (!enable) {
int i; int i;
for (i = 0; i < pnp_ide_dev_idx; i++) { for (i = 0; i < pnp_ide_dev_idx; i++) {
dev = devices[i].dev;
devices[i].dev_type->init_fn(dev, 0); devices[i].dev_type->init_fn(dev, 0);
if (dev->deactivate)
if (DEACTIVATE_FUNC(devices[i].dev)) dev->deactivate(dev);
DEACTIVATE_FUNC(devices[i].dev)(devices[i].dev);
} }
return; return;
} }
#endif
for (dev_type = idepnp_devices; dev_type->vendor; dev_type++) { for (dev_type = idepnp_devices; dev_type->vendor; dev_type++) {
while ((dev = isapnp_find_dev(NULL, dev_type->vendor, while ((dev = isapnp_find_dev(NULL, dev_type->vendor,
dev_type->device, dev))) { dev_type->device, dev))) {
...@@ -129,20 +125,20 @@ void __init pnpide_init(int enable) ...@@ -129,20 +125,20 @@ void __init pnpide_init(int enable)
if (dev->active) if (dev->active)
continue; continue;
if (PREPARE_FUNC(dev) && (PREPARE_FUNC(dev))(dev) < 0) { if (dev->prepare && dev->prepare(dev) < 0) {
printk("ide: %s prepare failed\n", DEV_NAME(dev)); printk(KERN_ERR"ide-pnp: %s prepare failed\n", DEV_NAME(dev));
continue; continue;
} }
if (ACTIVATE_FUNC(dev) && (ACTIVATE_FUNC(dev))(dev) < 0) { if (dev->activate && dev->activate(dev) < 0) {
printk("ide: %s activate failed\n", DEV_NAME(dev)); printk(KERN_ERR"ide: %s activate failed\n", DEV_NAME(dev));
continue; continue;
} }
/* Call device initialization function */ /* Call device initialization function */
if (dev_type->init_fn(dev, 1)) { if (dev_type->init_fn(dev, 1)) {
if (DEACTIVATE_FUNC(dev)) if (dev->deactivate(dev))
DEACTIVATE_FUNC(dev)(dev); dev->deactivate(dev);
} else { } else {
#ifdef MODULE #ifdef MODULE
/* /*
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -31,17 +31,17 @@ typedef struct ide_pio_timings_s { ...@@ -31,17 +31,17 @@ typedef struct ide_pio_timings_s {
} ide_pio_timings_t; } ide_pio_timings_t;
typedef struct ide_pio_data_s { typedef struct ide_pio_data_s {
byte pio_mode; u8 pio_mode;
byte use_iordy; u8 use_iordy;
byte overridden; u8 overridden;
byte blacklisted; u8 blacklisted;
unsigned int cycle_time; unsigned int cycle_time;
} ide_pio_data_t; } ide_pio_data_t;
#ifndef _IDE_C #ifndef _IDE_C
int ide_scan_pio_blacklist (char *model); int ide_scan_pio_blacklist (char *model);
byte ide_get_best_pio_mode (ide_drive_t *drive, byte mode_wanted, byte max_mode, ide_pio_data_t *d); u8 ide_get_best_pio_mode (ide_drive_t *drive, u8 mode_wanted, u8 max_mode, ide_pio_data_t *d);
extern const ide_pio_timings_t ide_pio_timings[6]; extern const ide_pio_timings_t ide_pio_timings[6];
#else /* _IDE_C */ #else /* _IDE_C */
...@@ -159,7 +159,7 @@ int ide_scan_pio_blacklist (char *model) ...@@ -159,7 +159,7 @@ int ide_scan_pio_blacklist (char *model)
/* /*
* Drive PIO mode auto selection * Drive PIO mode auto selection
*/ */
byte ide_get_best_pio_mode (ide_drive_t *drive, byte mode_wanted, byte max_mode, ide_pio_data_t *d) u8 ide_get_best_pio_mode (ide_drive_t *drive, u8 mode_wanted, u8 max_mode, ide_pio_data_t *d)
{ {
int pio_mode; int pio_mode;
int cycle_time = 0; int cycle_time = 0;
......
O_TARGET := idedriver-legacy.o
obj-y :=
obj-m :=
obj-$(CONFIG_BLK_DEV_ALI14XX) += ali14xx.o
obj-$(CONFIG_BLK_DEV_DTC2278) += dtc2278.o
obj-$(CONFIG_BLK_DEV_HT6560B) += ht6560b.o
obj-$(CONFIG_BLK_DEV_PDC4030) += pdc4030.o
obj-$(CONFIG_BLK_DEV_QD65XX) += qd65xx.o
obj-$(CONFIG_BLK_DEV_UMC8672) += umc8672.o
obj-$(CONFIG_BLK_DEV_BUDDHA) += buddha.o
obj-$(CONFIG_BLK_DEV_FALCON_IDE) += falconide.o
obj-$(CONFIG_BLK_DEV_GAYLE) += gayle.o
obj-$(CONFIG_BLK_DEV_MAC_IDE) += macide.o
obj-$(CONFIG_BLK_DEV_Q40IDE) += q40ide.o
obj-$(CONFIG_BLK_DEV_IDECS) += ide-cs.o
obj-$(CONFIG_BLK_DEV_HD) += hd.o
EXTRA_CFLAGS := -I../
include $(TOPDIR)/Rules.make
...@@ -39,6 +39,8 @@ ...@@ -39,6 +39,8 @@
#undef REALLY_SLOW_IO /* most systems can safely undef this */ #undef REALLY_SLOW_IO /* most systems can safely undef this */
#include <linux/module.h>
#include <linux/config.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/delay.h> #include <linux/delay.h>
...@@ -52,14 +54,20 @@ ...@@ -52,14 +54,20 @@
#include <asm/io.h> #include <asm/io.h>
#include "ide_modes.h" #ifdef CONFIG_BLK_DEV_ALI14XX_MODULE
# define _IDE_C
# include "ide_modes.h"
# undef _IDE_C
#else
# include "ide_modes.h"
#endif /* CONFIG_BLK_DEV_ALI14XX_MODULE */
/* port addresses for auto-detection */ /* port addresses for auto-detection */
#define ALI_NUM_PORTS 4 #define ALI_NUM_PORTS 4
static int ports[ALI_NUM_PORTS] __initdata = {0x074, 0x0f4, 0x034, 0x0e4}; static int ports[ALI_NUM_PORTS] __initdata = {0x074, 0x0f4, 0x034, 0x0e4};
/* register initialization data */ /* register initialization data */
typedef struct { byte reg, data; } RegInitializer; typedef struct { u8 reg, data; } RegInitializer;
static RegInitializer initData[] __initdata = { static RegInitializer initData[] __initdata = {
{0x01, 0x0f}, {0x02, 0x00}, {0x03, 0x00}, {0x04, 0x00}, {0x01, 0x0f}, {0x02, 0x00}, {0x03, 0x00}, {0x04, 0x00},
...@@ -74,7 +82,7 @@ static RegInitializer initData[] __initdata = { ...@@ -74,7 +82,7 @@ static RegInitializer initData[] __initdata = {
#define ALI_MAX_PIO 4 #define ALI_MAX_PIO 4
/* timing parameter registers for each drive */ /* timing parameter registers for each drive */
static struct { byte reg1, reg2, reg3, reg4; } regTab[4] = { static struct { u8 reg1, reg2, reg3, reg4; } regTab[4] = {
{0x03, 0x26, 0x04, 0x27}, /* drive 0 */ {0x03, 0x26, 0x04, 0x27}, /* drive 0 */
{0x05, 0x28, 0x06, 0x29}, /* drive 1 */ {0x05, 0x28, 0x06, 0x29}, /* drive 1 */
{0x2b, 0x30, 0x2c, 0x31}, /* drive 2 */ {0x2b, 0x30, 0x2c, 0x31}, /* drive 2 */
...@@ -84,24 +92,24 @@ static struct { byte reg1, reg2, reg3, reg4; } regTab[4] = { ...@@ -84,24 +92,24 @@ static struct { byte reg1, reg2, reg3, reg4; } regTab[4] = {
static int basePort; /* base port address */ static int basePort; /* base port address */
static int regPort; /* port for register number */ static int regPort; /* port for register number */
static int dataPort; /* port for register data */ static int dataPort; /* port for register data */
static byte regOn; /* output to base port to access registers */ static u8 regOn; /* output to base port to access registers */
static byte regOff; /* output to base port to close registers */ static u8 regOff; /* output to base port to close registers */
/*------------------------------------------------------------------------*/ /*------------------------------------------------------------------------*/
/* /*
* Read a controller register. * Read a controller register.
*/ */
static inline byte inReg (byte reg) static inline u8 inReg (u8 reg)
{ {
outb_p(reg, regPort); outb_p(reg, regPort);
return IN_BYTE(dataPort); return inb(dataPort);
} }
/* /*
* Write a controller register. * Write a controller register.
*/ */
static void outReg (byte data, byte reg) static void outReg (u8 data, u8 reg)
{ {
outb_p(reg, regPort); outb_p(reg, regPort);
outb_p(data, dataPort); outb_p(data, dataPort);
...@@ -112,11 +120,11 @@ static void outReg (byte data, byte reg) ...@@ -112,11 +120,11 @@ static void outReg (byte data, byte reg)
* This function computes timing parameters * This function computes timing parameters
* and sets controller registers accordingly. * and sets controller registers accordingly.
*/ */
static void ali14xx_tune_drive (ide_drive_t *drive, byte pio) static void ali14xx_tune_drive (ide_drive_t *drive, u8 pio)
{ {
int driveNum; int driveNum;
int time1, time2; int time1, time2;
byte param1, param2, param3, param4; u8 param1, param2, param3, param4;
unsigned long flags; unsigned long flags;
ide_pio_data_t d; ide_pio_data_t d;
int bus_speed = system_bus_clock(); int bus_speed = system_bus_clock();
...@@ -132,7 +140,7 @@ static void ali14xx_tune_drive (ide_drive_t *drive, byte pio) ...@@ -132,7 +140,7 @@ static void ali14xx_tune_drive (ide_drive_t *drive, byte pio)
param3 += 8; param3 += 8;
param4 += 8; param4 += 8;
} }
printk("%s: PIO mode%d, t1=%dns, t2=%dns, cycles = %d+%d, %d+%d\n", printk(KERN_DEBUG "%s: PIO mode%d, t1=%dns, t2=%dns, cycles = %d+%d, %d+%d\n",
drive->name, pio, time1, time2, param1, param2, param3, param4); drive->name, pio, time1, time2, param1, param2, param3, param4);
/* stuff timing parameters into controller registers */ /* stuff timing parameters into controller registers */
...@@ -153,16 +161,16 @@ static void ali14xx_tune_drive (ide_drive_t *drive, byte pio) ...@@ -153,16 +161,16 @@ static void ali14xx_tune_drive (ide_drive_t *drive, byte pio)
static int __init findPort (void) static int __init findPort (void)
{ {
int i; int i;
byte t; u8 t;
unsigned long flags; unsigned long flags;
local_irq_save(flags); local_irq_save(flags);
for (i = 0; i < ALI_NUM_PORTS; ++i) { for (i = 0; i < ALI_NUM_PORTS; ++i) {
basePort = ports[i]; basePort = ports[i];
regOff = IN_BYTE(basePort); regOff = inb(basePort);
for (regOn = 0x30; regOn <= 0x33; ++regOn) { for (regOn = 0x30; regOn <= 0x33; ++regOn) {
outb_p(regOn, basePort); outb_p(regOn, basePort);
if (IN_BYTE(basePort) == regOn) { if (inb(basePort) == regOn) {
regPort = basePort + 4; regPort = basePort + 4;
dataPort = basePort + 8; dataPort = basePort + 8;
t = inReg(0) & 0xf0; t = inReg(0) & 0xf0;
...@@ -184,7 +192,7 @@ static int __init findPort (void) ...@@ -184,7 +192,7 @@ static int __init findPort (void)
*/ */
static int __init initRegisters (void) { static int __init initRegisters (void) {
RegInitializer *p; RegInitializer *p;
byte t; u8 t;
unsigned long flags; unsigned long flags;
local_irq_save(flags); local_irq_save(flags);
...@@ -192,21 +200,21 @@ static int __init initRegisters (void) { ...@@ -192,21 +200,21 @@ static int __init initRegisters (void) {
for (p = initData; p->reg != 0; ++p) for (p = initData; p->reg != 0; ++p)
outReg(p->data, p->reg); outReg(p->data, p->reg);
outb_p(0x01, regPort); outb_p(0x01, regPort);
t = IN_BYTE(regPort) & 0x01; t = inb(regPort) & 0x01;
outb_p(regOff, basePort); outb_p(regOff, basePort);
local_irq_restore(flags); local_irq_restore(flags);
return t; return t;
} }
void __init init_ali14xx (void) int __init probe_ali14xx (void)
{ {
/* auto-detect IDE controller port */ /* auto-detect IDE controller port */
if (!findPort()) { if (!findPort()) {
printk("\nali14xx: not found"); printk(KERN_ERR "ali14xx: not found.\n");
return; return 1;
} }
printk("\nali14xx: base= 0x%03x, regOn = 0x%02x", basePort, regOn); printk(KERN_DEBUG "ali14xx: base= 0x%03x, regOn = 0x%02x.\n", basePort, regOn);
ide_hwifs[0].chipset = ide_ali14xx; ide_hwifs[0].chipset = ide_ali14xx;
ide_hwifs[1].chipset = ide_ali14xx; ide_hwifs[1].chipset = ide_ali14xx;
ide_hwifs[0].tuneproc = &ali14xx_tune_drive; ide_hwifs[0].tuneproc = &ali14xx_tune_drive;
...@@ -217,7 +225,80 @@ void __init init_ali14xx (void) ...@@ -217,7 +225,80 @@ void __init init_ali14xx (void)
/* initialize controller registers */ /* initialize controller registers */
if (!initRegisters()) { if (!initRegisters()) {
printk("\nali14xx: Chip initialization failed"); printk(KERN_ERR "ali14xx: Chip initialization failed.\n");
return 1;
}
#ifndef HWIF_PROBE_CLASSIC_METHOD
probe_hwif_init(&ide_hwifs[0]);
probe_hwif_init(&ide_hwifs[1]);
#endif /* HWIF_PROBE_CLASSIC_METHOD */
return 0;
}
void __init ali14xx_release (void)
{
if (ide_hwifs[0].chipset != ide_ali14xx &&
ide_hwifs[1].chipset != ide_ali14xx)
return; return;
ide_hwifs[0].chipset = ide_unknown;
ide_hwifs[1].chipset = ide_unknown;
ide_hwifs[0].tuneproc = NULL;
ide_hwifs[1].tuneproc = NULL;
ide_hwifs[0].mate = NULL;
ide_hwifs[1].mate = NULL;
}
#ifndef MODULE
/*
* init_ali14xx:
*
* called by ide.c when parsing command line
*/
void __init init_ali14xx (void)
{
/* auto-detect IDE controller port */
if (findPort())
if (probe_ali14xx())
goto no_detect;
return;
no_detect:
printk(KERN_ERR "ali14xx: not found.\n");
ali14xx_release();
}
#else
MODULE_AUTHOR("see local file");
MODULE_DESCRIPTION("support of ALI 14XX IDE chipsets");
MODULE_LICENSE("GPL");
int __init ali14xx_mod_init(void)
{
/* auto-detect IDE controller port */
if (findPort())
if (probe_ali14xx()) {
ali14xx_release();
return -ENODEV;
}
if (ide_hwifs[0].chipset != ide_ali14xx &&
ide_hwifs[1].chipset != ide_ali14xx) {
ali14xx_release();
return -ENODEV;
} }
return 0;
} }
module_init(ali14xx_mod_init);
void __init ali14xx_mod_exit(void)
{
ali14xx_release();
}
module_exit(ali14xx_mod_exit);
#endif
...@@ -168,7 +168,11 @@ void __init buddha_init(void) ...@@ -168,7 +168,11 @@ void __init buddha_init(void)
continue; continue;
board = z->resource.start; board = z->resource.start;
/*
* FIXME: we now have selectable mmio v/s iomio transports.
*/
if(type != BOARD_XSURF) { if(type != BOARD_XSURF) {
if (!request_mem_region(board+BUDDHA_BASE1, 0x800, "IDE")) if (!request_mem_region(board+BUDDHA_BASE1, 0x800, "IDE"))
continue; continue;
...@@ -196,12 +200,16 @@ void __init buddha_init(void) ...@@ -196,12 +200,16 @@ void __init buddha_init(void)
ide_setup_ports(&hw, (ide_ioreg_t)(buddha_board+buddha_bases[i]), ide_setup_ports(&hw, (ide_ioreg_t)(buddha_board+buddha_bases[i]),
buddha_offsets, 0, buddha_offsets, 0,
(ide_ioreg_t)(buddha_board+buddha_irqports[i]), (ide_ioreg_t)(buddha_board+buddha_irqports[i]),
buddha_ack_intr, IRQ_AMIGA_PORTS); buddha_ack_intr,
// budda_iops,
IRQ_AMIGA_PORTS);
} else { } else {
ide_setup_ports(&hw, (ide_ioreg_t)(buddha_board+xsurf_bases[i]), ide_setup_ports(&hw, (ide_ioreg_t)(buddha_board+xsurf_bases[i]),
xsurf_offsets, 0, xsurf_offsets, 0,
(ide_ioreg_t)(buddha_board+xsurf_irqports[i]), (ide_ioreg_t)(buddha_board+xsurf_irqports[i]),
xsurf_ack_intr, IRQ_AMIGA_PORTS); xsurf_ack_intr,
// xsurf_iops,
IRQ_AMIGA_PORTS);
} }
index = ide_register_hw(&hw, NULL); index = ide_register_hw(&hw, NULL);
......
...@@ -59,7 +59,9 @@ void __init falconide_init(void) ...@@ -59,7 +59,9 @@ void __init falconide_init(void)
int index; int index;
ide_setup_ports(&hw, (ide_ioreg_t)ATA_HD_BASE, falconide_offsets, ide_setup_ports(&hw, (ide_ioreg_t)ATA_HD_BASE, falconide_offsets,
0, 0, NULL, IRQ_MFP_IDE); 0, 0, NULL,
// falconide_iops,
IRQ_MFP_IDE);
index = ide_register_hw(&hw, NULL); index = ide_register_hw(&hw, NULL);
if (index != -1) if (index != -1)
......
...@@ -137,6 +137,10 @@ void __init gayle_init(void) ...@@ -137,6 +137,10 @@ void __init gayle_init(void)
irqport = (ide_ioreg_t)ZTWO_VADDR(GAYLE_IRQ_1200); irqport = (ide_ioreg_t)ZTWO_VADDR(GAYLE_IRQ_1200);
ack_intr = gayle_ack_intr_a1200; ack_intr = gayle_ack_intr_a1200;
} }
/*
* FIXME: we now have selectable modes between mmio v/s iomio
*/
phys_base += i*GAYLE_NEXT_PORT; phys_base += i*GAYLE_NEXT_PORT;
res_start = ((unsigned long)phys_base) & ~(GAYLE_NEXT_PORT-1); res_start = ((unsigned long)phys_base) & ~(GAYLE_NEXT_PORT-1);
...@@ -149,7 +153,9 @@ void __init gayle_init(void) ...@@ -149,7 +153,9 @@ void __init gayle_init(void)
ctrlport = GAYLE_HAS_CONTROL_REG ? (base + GAYLE_CONTROL) : 0; ctrlport = GAYLE_HAS_CONTROL_REG ? (base + GAYLE_CONTROL) : 0;
ide_setup_ports(&hw, base, gayle_offsets, ide_setup_ports(&hw, base, gayle_offsets,
ctrlport, irqport, ack_intr, IRQ_AMIGA_PORTS); ctrlport, irqport, ack_intr,
// gaule_iops,
IRQ_AMIGA_PORTS);
index = ide_register_hw(&hw, NULL); index = ide_register_hw(&hw, NULL);
if (index != -1) { if (index != -1) {
......
...@@ -84,7 +84,9 @@ void q40ide_init(void) ...@@ -84,7 +84,9 @@ void q40ide_init(void)
ide_setup_ports(&hw,(ide_ioreg_t) pcide_bases[i], (int *)pcide_offsets, ide_setup_ports(&hw,(ide_ioreg_t) pcide_bases[i], (int *)pcide_offsets,
pcide_bases[i]+0x206, pcide_bases[i]+0x206,
0, NULL, q40ide_default_irq(pcide_bases[i])); 0, NULL,
// pcide_iops,
q40ide_default_irq(pcide_bases[i]));
ide_register_hw(&hw, NULL); ide_register_hw(&hw, NULL);
} }
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment