blob: 2929e891ee03a7c4b28fc31a754cf8effe3e92de [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/* include/asm-arm/arch-lh7a40x/constants.h
2 *
3 * Copyright (C) 2004 Coastal Environmental Systems
4 * Copyright (C) 2004 Logic Product Development
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * version 2 as published by the Free Software Foundation.
9 *
10 */
11
12#ifndef __ASM_ARCH_CONSTANTS_H
13#define __ASM_ARCH_CONSTANTS_H
14
15#include <linux/config.h>
16
17/* Addressing constants */
18
19 /* SoC CPU IO addressing */
20#define IO_PHYS (0x80000000)
21#define IO_VIRT (0xf8000000)
22#define IO_SIZE (0x0000B000)
23
24#ifdef CONFIG_MACH_KEV7A400
25# define CPLD_PHYS (0x20000000)
26# define CPLD_VIRT (0xf2000000)
27# define CPLD_SIZE PAGE_SIZE
28#endif
29
30#if defined (CONFIG_MACH_LPD7A400) || defined (CONFIG_MACH_LPD7A404)
31
Marc Singer22951962006-05-16 11:41:27 +010032# define IOBARRIER_PHYS 0x10000000 /* Second bank, fastest timing */
Linus Torvalds1da177e2005-04-16 15:20:36 -070033# define IOBARRIER_VIRT 0xf0000000
34# define IOBARRIER_SIZE PAGE_SIZE
35
36# define CF_PHYS 0x60200000
37# define CF_VIRT 0xf6020000
38# define CF_SIZE (8*1024)
39
40 /* The IO mappings for the LPD CPLD are, unfortunately, sparse. */
41# define CPLDX_PHYS(x) (0x70000000 | ((x) << 20))
42# define CPLDX_VIRT(x) (0xf7000000 | ((x) << 16))
43# define CPLD00_PHYS CPLDX_PHYS (0x00) /* Wired LAN */
44# define CPLD00_VIRT CPLDX_VIRT (0x00)
45# define CPLD00_SIZE PAGE_SIZE
46# define CPLD02_PHYS CPLDX_PHYS (0x02)
47# define CPLD02_VIRT CPLDX_VIRT (0x02)
48# define CPLD02_SIZE PAGE_SIZE
49# define CPLD06_PHYS CPLDX_PHYS (0x06)
50# define CPLD06_VIRT CPLDX_VIRT (0x06)
51# define CPLD06_SIZE PAGE_SIZE
52# define CPLD08_PHYS CPLDX_PHYS (0x08)
53# define CPLD08_VIRT CPLDX_VIRT (0x08)
54# define CPLD08_SIZE PAGE_SIZE
Marc Singer22951962006-05-16 11:41:27 +010055# define CPLD0A_PHYS CPLDX_PHYS (0x0a)
56# define CPLD0A_VIRT CPLDX_VIRT (0x0a)
57# define CPLD0A_SIZE PAGE_SIZE
Linus Torvalds1da177e2005-04-16 15:20:36 -070058# define CPLD0C_PHYS CPLDX_PHYS (0x0c)
59# define CPLD0C_VIRT CPLDX_VIRT (0x0c)
60# define CPLD0C_SIZE PAGE_SIZE
61# define CPLD0E_PHYS CPLDX_PHYS (0x0e)
62# define CPLD0E_VIRT CPLDX_VIRT (0x0e)
63# define CPLD0E_SIZE PAGE_SIZE
64# define CPLD10_PHYS CPLDX_PHYS (0x10)
65# define CPLD10_VIRT CPLDX_VIRT (0x10)
66# define CPLD10_SIZE PAGE_SIZE
67# define CPLD12_PHYS CPLDX_PHYS (0x12)
68# define CPLD12_VIRT CPLDX_VIRT (0x12)
69# define CPLD12_SIZE PAGE_SIZE
70# define CPLD14_PHYS CPLDX_PHYS (0x14)
71# define CPLD14_VIRT CPLDX_VIRT (0x14)
72# define CPLD14_SIZE PAGE_SIZE
73# define CPLD16_PHYS CPLDX_PHYS (0x16)
74# define CPLD16_VIRT CPLDX_VIRT (0x16)
75# define CPLD16_SIZE PAGE_SIZE
76# define CPLD18_PHYS CPLDX_PHYS (0x18)
77# define CPLD18_VIRT CPLDX_VIRT (0x18)
78# define CPLD18_SIZE PAGE_SIZE
79# define CPLD1A_PHYS CPLDX_PHYS (0x1a)
80# define CPLD1A_VIRT CPLDX_VIRT (0x1a)
81# define CPLD1A_SIZE PAGE_SIZE
82#endif
83
84 /* Timing constants */
85
86#define XTAL_IN 14745600 /* 14.7456 MHz crystal */
87#define PLL_CLOCK (XTAL_IN * 21) /* 309 MHz PLL clock */
88#define MAX_HCLK_KHZ 100000 /* HCLK max limit ~100MHz */
Marc Singer22951962006-05-16 11:41:27 +010089#define HCLK (99993600)
90//#define HCLK (119808000)
Linus Torvalds1da177e2005-04-16 15:20:36 -070091
92#endif /* __ASM_ARCH_CONSTANTS_H */