From c2e03199c1a02b4f8e0761a8a2f8b96f1160c8ba Mon Sep 17 00:00:00 2001 From: "Hans J. Koch" Date: Fri, 17 Sep 2010 18:21:36 +0200 Subject: [PATCH] --- yaml --- r: 212474 b: refs/heads/master c: 2aea73ce22b786039906be89b0ae191d4c016c1e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-tcc8k/Kconfig | 6 ++ trunk/arch/arm/mach-tcc8k/Makefile | 3 + trunk/arch/arm/mach-tcc8k/Makefile.boot | 3 + trunk/arch/arm/mach-tcc8k/board-tcc8000-sdk.c | 64 +++++++++++++++++++ 5 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 trunk/arch/arm/mach-tcc8k/Makefile.boot create mode 100644 trunk/arch/arm/mach-tcc8k/board-tcc8000-sdk.c diff --git a/[refs] b/[refs] index 1dca0e2b943e..c922e0922a09 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 026cec6164901372c3a16b430cd405f0bb6a7c1f +refs/heads/master: 2aea73ce22b786039906be89b0ae191d4c016c1e diff --git a/trunk/arch/arm/mach-tcc8k/Kconfig b/trunk/arch/arm/mach-tcc8k/Kconfig index ec7f71b17c06..ad86415d1577 100644 --- a/trunk/arch/arm/mach-tcc8k/Kconfig +++ b/trunk/arch/arm/mach-tcc8k/Kconfig @@ -2,4 +2,10 @@ if ARCH_TCC8K comment "TCC8000 systems:" +config MACH_TCC8000_SDK + bool "Telechips TCC8000-SDK development kit" + default y + help + Support for the Telechips TCC8000-SDK board. + endif diff --git a/trunk/arch/arm/mach-tcc8k/Makefile b/trunk/arch/arm/mach-tcc8k/Makefile index e92c0d255ae7..9bacf31e49ba 100644 --- a/trunk/arch/arm/mach-tcc8k/Makefile +++ b/trunk/arch/arm/mach-tcc8k/Makefile @@ -4,3 +4,6 @@ # Common support obj-y += clock.o irq.o time.o io.o devices.o + +# Board specific support +obj-$(CONFIG_MACH_TCC8000_SDK) += board-tcc8000-sdk.o diff --git a/trunk/arch/arm/mach-tcc8k/Makefile.boot b/trunk/arch/arm/mach-tcc8k/Makefile.boot new file mode 100644 index 000000000000..f135c9deae10 --- /dev/null +++ b/trunk/arch/arm/mach-tcc8k/Makefile.boot @@ -0,0 +1,3 @@ + zreladdr-y := 0x20008000 +params_phys-y := 0x20000100 +initrd_phys-y := 0x20800000 diff --git a/trunk/arch/arm/mach-tcc8k/board-tcc8000-sdk.c b/trunk/arch/arm/mach-tcc8k/board-tcc8000-sdk.c new file mode 100644 index 000000000000..4e42555b2009 --- /dev/null +++ b/trunk/arch/arm/mach-tcc8k/board-tcc8000-sdk.c @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2009 Hans J. Koch + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include + +#include + +#include +#include +#include + +#include + +#include "common.h" + +#define XI_FREQUENCY 12000000 +#define XTI_FREQUENCY 32768 + +#ifdef CONFIG_MTD_NAND_TCC +/* NAND */ +static struct tcc_nand_platform_data tcc8k_sdk_nand_data = { + .width = 1, + .hw_ecc = 0, +}; +#endif + +static void __init tcc8k_init(void) +{ +#ifdef CONFIG_MTD_NAND_TCC + tcc_nand_device.dev.platform_data = &tcc8k_sdk_nand_data; + platform_device_register(&tcc_nand_device); +#endif +} + +static void __init tcc8k_init_timer(void) +{ + tcc_clocks_init(XI_FREQUENCY, XTI_FREQUENCY); +} + +static struct sys_timer tcc8k_timer = { + .init = tcc8k_init_timer, +}; + +static void __init tcc8k_map_io(void) +{ + tcc8k_map_common_io(); +} + +MACHINE_START(TCC8000_SDK, "Telechips TCC8000-SDK Demo Board") + .phys_io = 0x90000000, + .io_pg_offst = ((0xf1000000) >> 18) & 0xfffc, + .boot_params = PHYS_OFFSET + 0x00000100, + .map_io = tcc8k_map_io, + .init_irq = tcc8k_init_irq, + .init_machine = tcc8k_init, + .timer = &tcc8k_timer, +MACHINE_END