Commit | Line | Data |
---|---|---|
2aea73ce HK |
1 | /* |
2 | * Copyright (C) 2009 Hans J. Koch <hjk@linutronix.de> | |
3 | * | |
4 | * This program is free software; you can redistribute it and/or modify | |
5 | * it under the terms of the GNU General Public License version 2 as | |
6 | * published by the Free Software Foundation. | |
7 | */ | |
8 | ||
9 | #include <linux/init.h> | |
10 | #include <linux/kernel.h> | |
11 | #include <linux/platform_device.h> | |
12 | ||
13 | #include <asm/mach-types.h> | |
14 | ||
15 | #include <asm/mach/arch.h> | |
16 | #include <asm/mach/map.h> | |
17 | #include <asm/mach/time.h> | |
18 | ||
19 | #include <mach/clock.h> | |
20 | ||
21 | #include "common.h" | |
22 | ||
23 | #define XI_FREQUENCY 12000000 | |
24 | #define XTI_FREQUENCY 32768 | |
25 | ||
26 | #ifdef CONFIG_MTD_NAND_TCC | |
27 | /* NAND */ | |
28 | static struct tcc_nand_platform_data tcc8k_sdk_nand_data = { | |
29 | .width = 1, | |
30 | .hw_ecc = 0, | |
31 | }; | |
32 | #endif | |
33 | ||
34 | static void __init tcc8k_init(void) | |
35 | { | |
36 | #ifdef CONFIG_MTD_NAND_TCC | |
37 | tcc_nand_device.dev.platform_data = &tcc8k_sdk_nand_data; | |
38 | platform_device_register(&tcc_nand_device); | |
39 | #endif | |
40 | } | |
41 | ||
42 | static void __init tcc8k_init_timer(void) | |
43 | { | |
44 | tcc_clocks_init(XI_FREQUENCY, XTI_FREQUENCY); | |
45 | } | |
46 | ||
47 | static struct sys_timer tcc8k_timer = { | |
48 | .init = tcc8k_init_timer, | |
49 | }; | |
50 | ||
51 | static void __init tcc8k_map_io(void) | |
52 | { | |
53 | tcc8k_map_common_io(); | |
54 | } | |
55 | ||
56 | MACHINE_START(TCC8000_SDK, "Telechips TCC8000-SDK Demo Board") | |
2aea73ce HK |
57 | .boot_params = PHYS_OFFSET + 0x00000100, |
58 | .map_io = tcc8k_map_io, | |
59 | .init_irq = tcc8k_init_irq, | |
60 | .init_machine = tcc8k_init, | |
61 | .timer = &tcc8k_timer, | |
62 | MACHINE_END |