]> git.hungrycats.org Git - linux/commitdiff
[PATCH] M68k update (part 25)
authorGeert Uytterhoeven <geert@linux-m68k.org>
Tue, 23 Jul 2002 13:22:50 +0000 (06:22 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Tue, 23 Jul 2002 13:22:50 +0000 (06:22 -0700)
Update ISA space code on m68k (from 2.4.x)
 - Add support for multiple types of ISA busses in one kernel image (e.g. an
   image for both Q40 and Amiga with PCMCIA)
 - Allow port operations on m68k if CONFIG_ISA is defined

arch/m68k/kernel/setup.c
drivers/char/mem.c

index 893d176dc924eecf49dacc8f9dc2e73aec78af7f..9c2499ba21ed84fb8cb0aa24eb87222f72c665b8 100644 (file)
@@ -109,7 +109,7 @@ int mach_sysrq_shift_mask = 0;
 char *mach_sysrq_xlate = NULL;
 #endif
 
-#if defined(CONFIG_ISA)
+#if defined(CONFIG_ISA) && defined(MULTI_ISA)
 int isa_type;
 int isa_sex;
 #endif
@@ -399,7 +399,7 @@ void __init setup_arch(char **cmdline_p)
        paging_init();
 
 /* set ISA defs early as possible */
-#if defined(CONFIG_ISA)
+#if defined(CONFIG_ISA) && defined(MULTI_ISA)
 #if defined(CONFIG_Q40) 
        if (MACH_IS_Q40) {
            isa_type = Q40_ISA;
index d17c851601126edf24c64ed728a7f73398178d2c..07af77b4ad12d530a4c2a659ba024361ed952da3 100644 (file)
@@ -324,7 +324,7 @@ static ssize_t write_kmem(struct file * file, const char * buf,
        return virtr + wrote;
 }
 
-#if !defined(__mc68000__)
+#if defined(CONFIG_ISA) || !defined(__mc68000__)
 static ssize_t read_port(struct file * file, char * buf,
                         size_t count, loff_t *ppos)
 {
@@ -557,7 +557,7 @@ static struct file_operations null_fops = {
        write:          write_null,
 };
 
-#if !defined(__mc68000__)
+#if defined(CONFIG_ISA) || !defined(__mc68000__)
 static struct file_operations port_fops = {
        llseek:         memory_lseek,
        read:           read_port,
@@ -591,7 +591,7 @@ static int memory_open(struct inode * inode, struct file * filp)
                case 3:
                        filp->f_op = &null_fops;
                        break;
-#if !defined(__mc68000__)
+#if defined(CONFIG_ISA) || !defined(__mc68000__)
                case 4:
                        filp->f_op = &port_fops;
                        break;
@@ -628,7 +628,9 @@ void __init memory_devfs_register (void)
        {1, "mem",     S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops},
        {2, "kmem",    S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops},
        {3, "null",    S_IRUGO | S_IWUGO,           &null_fops},
+#if defined(CONFIG_ISA) || !defined(__mc68000__)
        {4, "port",    S_IRUSR | S_IWUSR | S_IRGRP, &port_fops},
+#endif
        {5, "zero",    S_IRUGO | S_IWUGO,           &zero_fops},
        {7, "full",    S_IRUGO | S_IWUGO,           &full_fops},
        {8, "random",  S_IRUGO | S_IWUSR,           &random_fops},