| wanzongshun | 7ec80dd | 2008-12-03 03:55:38 +0100 | [diff] [blame] | 1 | /* | 
 | 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 |  * | 
| wanzongshun | 35c9221 | 2009-08-21 07:07:46 +0100 | [diff] [blame] | 9 |  * Header file for NUC900 CPU support | 
| wanzongshun | 7ec80dd | 2008-12-03 03:55:38 +0100 | [diff] [blame] | 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 |  | 
| wanzongshun | 35c9221 | 2009-08-21 07:07:46 +0100 | [diff] [blame] | 27 | #define NUC900_8250PORT(name)					\ | 
| wanzongshun | 17198f2 | 2009-02-04 05:01:38 +0100 | [diff] [blame] | 28 | {								\ | 
 | 29 | 	.membase	= name##_BA,				\ | 
 | 30 | 	.mapbase	= name##_PA,				\ | 
 | 31 | 	.irq		= IRQ_##name,				\ | 
 | 32 | 	.uartclk	= 11313600,				\ | 
 | 33 | 	.regshift	= 2,					\ | 
 | 34 | 	.iotype		= UPIO_MEM,				\ | 
 | 35 | 	.flags		= UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,	\ | 
| wanzongshun | 7ec80dd | 2008-12-03 03:55:38 +0100 | [diff] [blame] | 36 | } | 
| wanzongshun | 35c9221 | 2009-08-21 07:07:46 +0100 | [diff] [blame] | 37 |  | 
 | 38 | /*Cpu identifier register*/ | 
 | 39 |  | 
 | 40 | #define NUC900PDID	W90X900_VA_GCR | 
 | 41 | #define NUC910_CPUID	0x02900910 | 
 | 42 | #define NUC920_CPUID	0x02900920 | 
 | 43 | #define NUC950_CPUID	0x02900950 | 
 | 44 | #define NUC960_CPUID	0x02900960 | 
 | 45 |  | 
 | 46 | /* extern file from cpu.c */ | 
 | 47 |  | 
 | 48 | extern void nuc900_clock_source(struct device *dev, unsigned char *src); | 
 | 49 | extern void nuc900_init_clocks(void); | 
 | 50 | extern void nuc900_map_io(struct map_desc *mach_desc, int mach_size); | 
 | 51 | extern void nuc900_board_init(struct platform_device **device, int size); | 
 | 52 |  | 
 | 53 | /* for either public between 910 and 920, or between 920 and 950 */ | 
 | 54 |  | 
 | 55 | extern struct platform_device nuc900_serial_device; | 
 | 56 | extern struct platform_device nuc900_device_fmi; | 
 | 57 | extern struct platform_device nuc900_device_kpi; | 
 | 58 | extern struct platform_device nuc900_device_rtc; | 
 | 59 | extern struct platform_device nuc900_device_ts; | 
| Wang Qiang | 8661970 | 2010-03-10 15:21:47 -0800 | [diff] [blame] | 60 | extern struct platform_device nuc900_device_lcd; |