blob: de29ddcb9459ba03f1d805f7c32f8a67ee0db078 [file] [log] [blame]
wanzongshun7ec80dd2008-12-03 03:55:38 +01001/*
2 * arch/arm/mach-w90x900/cpu.h
3 *
4 * Based on linux/include/asm-arm/plat-s3c24xx/cpu.h by Ben Dooks
5 *
6 * Copyright (c) 2008 Nuvoton technology corporation
7 * All rights reserved.
8 *
9 * Header file for W90X900 CPU support
10 *
11 * Wan ZongShun <mcuos.com@gmail.com>
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License version 2 as
15 * published by the Free Software Foundation.
16 *
17 */
18
19#define IODESC_ENT(y) \
20{ \
21 .virtual = (unsigned long)W90X900_VA_##y, \
22 .pfn = __phys_to_pfn(W90X900_PA_##y), \
23 .length = W90X900_SZ_##y, \
24 .type = MT_DEVICE, \
25}
26
27/*Cpu identifier register*/
28
29#define W90X900PDID W90X900_VA_GCR
30#define W90P910_CPUID 0x02900910
31#define W90P920_CPUID 0x02900920
32#define W90P950_CPUID 0x02900950
33#define W90N960_CPUID 0x02900960
34
35struct w90x900_uartcfg;
36struct map_desc;
37struct sys_timer;
38
39/* core initialisation functions */
40
41extern void w90x900_init_irq(void);
42extern void w90p910_init_io(struct map_desc *mach_desc, int size);
43extern void w90p910_init_uarts(struct w90x900_uartcfg *cfg, int no);
44extern void w90p910_init_clocks(int xtal);
45extern void w90p910_map_io(struct map_desc *mach_desc, int size);
wanzongshun17198f22009-02-04 05:01:38 +010046extern struct platform_device w90p910_serial_device;
wanzongshun7ec80dd2008-12-03 03:55:38 +010047extern struct sys_timer w90x900_timer;
48
wanzongshun17198f22009-02-04 05:01:38 +010049#define W90X900_8250PORT(name) \
50{ \
51 .membase = name##_BA, \
52 .mapbase = name##_PA, \
53 .irq = IRQ_##name, \
54 .uartclk = 11313600, \
55 .regshift = 2, \
56 .iotype = UPIO_MEM, \
57 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, \
wanzongshun7ec80dd2008-12-03 03:55:38 +010058}