summaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/adx/setup.c
blob: 4938d9592343f99166781dd6c89780161a9c585f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* 
 * linux/arch/sh/board/adx/setup.c
 *
 * Copyright (C) 2001 A&D Co., Ltd.
 *
 * I/O routine and setup routines for A&D ADX Board
 *
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 *
 */

#include <asm/machvec.h>
#include <linux/module.h>

extern void init_adx_IRQ(void);
extern void *cf_io_base;

const char *get_system_type(void)
{
	return "A&D ADX";
}

unsigned long adx_isa_port2addr(unsigned long offset)
{
	/* CompactFlash (IDE) */
	if (((offset >= 0x1f0) && (offset <= 0x1f7)) || (offset == 0x3f6)) {
		return (unsigned long)cf_io_base + offset;
	}

	/* eth0 */
	if ((offset >= 0x300) && (offset <= 0x30f)) {
		return 0xa5000000 + offset;	/* COMM BOARD (AREA1) */
	}

	return offset + 0xb0000000; /* IOBUS (AREA 4)*/
}

/*
 * The Machine Vector
 */

struct sh_machine_vector mv_adx __initmv = {
	.mv_nr_irqs		= 48,
	.mv_isa_port2addr	= adx_isa_port2addr,
	.mv_init_irq		= init_adx_IRQ,
};
ALIAS_MV(adx)

int __init platform_setup(void)
{
	/* Nothing to see here .. */
	return 0;
}

OpenPOWER on IntegriCloud