blob: a3b66d405eb30e1abf56a22b6f6bbc7874393321 [file] [log] [blame]
Hans J. Koch2aea73c2010-09-17 18:21:36 +02001/*
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>
Oskar Schirmer30d91352011-02-17 16:42:51 +010020#include <mach/tcc-nand.h>
Hans J. Koch2aea73c2010-09-17 18:21:36 +020021
22#include "common.h"
23
24#define XI_FREQUENCY 12000000
25#define XTI_FREQUENCY 32768
26
27#ifdef CONFIG_MTD_NAND_TCC
28/* NAND */
29static struct tcc_nand_platform_data tcc8k_sdk_nand_data = {
30 .width = 1,
31 .hw_ecc = 0,
32};
33#endif
34
35static void __init tcc8k_init(void)
36{
37#ifdef CONFIG_MTD_NAND_TCC
38 tcc_nand_device.dev.platform_data = &tcc8k_sdk_nand_data;
39 platform_device_register(&tcc_nand_device);
40#endif
41}
42
43static void __init tcc8k_init_timer(void)
44{
45 tcc_clocks_init(XI_FREQUENCY, XTI_FREQUENCY);
46}
47
48static struct sys_timer tcc8k_timer = {
49 .init = tcc8k_init_timer,
50};
51
52static void __init tcc8k_map_io(void)
53{
54 tcc8k_map_common_io();
55}
56
57MACHINE_START(TCC8000_SDK, "Telechips TCC8000-SDK Demo Board")
Hans J. Koch2aea73c2010-09-17 18:21:36 +020058 .boot_params = PHYS_OFFSET + 0x00000100,
59 .map_io = tcc8k_map_io,
60 .init_irq = tcc8k_init_irq,
61 .init_machine = tcc8k_init,
62 .timer = &tcc8k_timer,
63MACHINE_END