| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /*  | 
 | 2 |  * linux/arch/sh/board/adx/setup.c | 
 | 3 |  * | 
 | 4 |  * Copyright (C) 2001 A&D Co., Ltd. | 
 | 5 |  * | 
 | 6 |  * I/O routine and setup routines for A&D ADX Board | 
 | 7 |  * | 
 | 8 |  * This file is subject to the terms and conditions of the GNU General Public | 
 | 9 |  * License.  See the file "COPYING" in the main directory of this archive | 
 | 10 |  * for more details. | 
 | 11 |  * | 
 | 12 |  */ | 
 | 13 |  | 
 | 14 | #include <asm/machvec.h> | 
 | 15 | #include <linux/module.h> | 
 | 16 |  | 
 | 17 | extern void init_adx_IRQ(void); | 
 | 18 | extern void *cf_io_base; | 
 | 19 |  | 
 | 20 | const char *get_system_type(void) | 
 | 21 | { | 
 | 22 | 	return "A&D ADX"; | 
 | 23 | } | 
 | 24 |  | 
 | 25 | unsigned long adx_isa_port2addr(unsigned long offset) | 
 | 26 | { | 
 | 27 | 	/* CompactFlash (IDE) */ | 
 | 28 | 	if (((offset >= 0x1f0) && (offset <= 0x1f7)) || (offset == 0x3f6)) { | 
 | 29 | 		return (unsigned long)cf_io_base + offset; | 
 | 30 | 	} | 
 | 31 |  | 
 | 32 | 	/* eth0 */ | 
 | 33 | 	if ((offset >= 0x300) && (offset <= 0x30f)) { | 
 | 34 | 		return 0xa5000000 + offset;	/* COMM BOARD (AREA1) */ | 
 | 35 | 	} | 
 | 36 |  | 
 | 37 | 	return offset + 0xb0000000; /* IOBUS (AREA 4)*/ | 
 | 38 | } | 
 | 39 |  | 
 | 40 | /* | 
 | 41 |  * The Machine Vector | 
 | 42 |  */ | 
 | 43 |  | 
 | 44 | struct sh_machine_vector mv_adx __initmv = { | 
 | 45 | 	.mv_nr_irqs		= 48, | 
 | 46 | 	.mv_isa_port2addr	= adx_isa_port2addr, | 
 | 47 | 	.mv_init_irq		= init_adx_IRQ, | 
 | 48 | }; | 
 | 49 | ALIAS_MV(adx) | 
 | 50 |  | 
 | 51 | int __init platform_setup(void) | 
 | 52 | { | 
 | 53 | 	/* Nothing to see here .. */ | 
 | 54 | 	return 0; | 
 | 55 | } | 
 | 56 |  |