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