| Thomas Gleixner | d2912cb | 2019-06-04 10:11:33 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ | 
| wanzongshun | 7ec80dd | 2008-12-03 03:55:38 +0100 | [diff] [blame] | 2 | /* | 
 | 3 |  * arch/arm/mach-w90x900/cpu.h | 
 | 4 |  * | 
 | 5 |  * Based on linux/include/asm-arm/plat-s3c24xx/cpu.h by Ben Dooks | 
 | 6 |  * | 
 | 7 |  * Copyright (c) 2008 Nuvoton technology corporation | 
 | 8 |  * All rights reserved. | 
 | 9 |  * | 
| wanzongshun | 35c9221 | 2009-08-21 07:07:46 +0100 | [diff] [blame] | 10 |  * Header file for NUC900 CPU support | 
| wanzongshun | 7ec80dd | 2008-12-03 03:55:38 +0100 | [diff] [blame] | 11 |  * | 
 | 12 |  * Wan ZongShun <mcuos.com@gmail.com> | 
| wanzongshun | 7ec80dd | 2008-12-03 03:55:38 +0100 | [diff] [blame] | 13 |  */ | 
 | 14 |  | 
 | 15 | #define IODESC_ENT(y)                                  \ | 
 | 16 | {                                                      \ | 
 | 17 |        .virtual = (unsigned long)W90X900_VA_##y,       \ | 
 | 18 |        .pfn     = __phys_to_pfn(W90X900_PA_##y),       \ | 
 | 19 |        .length  = W90X900_SZ_##y,                      \ | 
 | 20 |        .type    = MT_DEVICE,                           \ | 
 | 21 | } | 
 | 22 |  | 
| wanzongshun | 35c9221 | 2009-08-21 07:07:46 +0100 | [diff] [blame] | 23 | #define NUC900_8250PORT(name)					\ | 
| wanzongshun | 17198f2 | 2009-02-04 05:01:38 +0100 | [diff] [blame] | 24 | {								\ | 
 | 25 | 	.membase	= name##_BA,				\ | 
 | 26 | 	.mapbase	= name##_PA,				\ | 
 | 27 | 	.irq		= IRQ_##name,				\ | 
 | 28 | 	.uartclk	= 11313600,				\ | 
 | 29 | 	.regshift	= 2,					\ | 
 | 30 | 	.iotype		= UPIO_MEM,				\ | 
 | 31 | 	.flags		= UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,	\ | 
| wanzongshun | 7ec80dd | 2008-12-03 03:55:38 +0100 | [diff] [blame] | 32 | } | 
| wanzongshun | 35c9221 | 2009-08-21 07:07:46 +0100 | [diff] [blame] | 33 |  | 
 | 34 | /*Cpu identifier register*/ | 
 | 35 |  | 
 | 36 | #define NUC900PDID	W90X900_VA_GCR | 
 | 37 | #define NUC910_CPUID	0x02900910 | 
 | 38 | #define NUC920_CPUID	0x02900920 | 
 | 39 | #define NUC950_CPUID	0x02900950 | 
 | 40 | #define NUC960_CPUID	0x02900960 | 
 | 41 |  | 
 | 42 | /* extern file from cpu.c */ | 
 | 43 |  | 
 | 44 | extern void nuc900_clock_source(struct device *dev, unsigned char *src); | 
 | 45 | extern void nuc900_init_clocks(void); | 
 | 46 | extern void nuc900_map_io(struct map_desc *mach_desc, int mach_size); | 
 | 47 | extern void nuc900_board_init(struct platform_device **device, int size); | 
 | 48 |  | 
 | 49 | /* for either public between 910 and 920, or between 920 and 950 */ | 
 | 50 |  | 
 | 51 | extern struct platform_device nuc900_serial_device; | 
 | 52 | extern struct platform_device nuc900_device_fmi; | 
 | 53 | extern struct platform_device nuc900_device_kpi; | 
 | 54 | extern struct platform_device nuc900_device_rtc; | 
 | 55 | extern struct platform_device nuc900_device_ts; | 
| Wang Qiang | 8661970 | 2010-03-10 15:21:47 -0800 | [diff] [blame] | 56 | extern struct platform_device nuc900_device_lcd; |