Commit d2b3bb9b authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

[PATCH] M68k update (part 25)

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
parent b1b26de5
......@@ -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;
......
......@@ -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},
......
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