All of lore.kernel.org
 help / color / mirror / Atom feed
From: hjk@linutronix.de (Hans J. Koch)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 7/7 v4] Add board support for Telechips TCC8000-SDK board
Date: Wed, 31 Mar 2010 16:55:54 +0200	[thread overview]
Message-ID: <20100331145554.GH2035@bluebox.local> (raw)
In-Reply-To: <20100331144543.GA2035@bluebox.local>

Add support for the Telechips TCC8000-SDK development board.

Signed-off-by: "Hans J. Koch" <hjk@linutronix.de>
---
 arch/arm/mach-tcc8k/Kconfig             |    6 +++
 arch/arm/mach-tcc8k/Makefile            |    3 ++
 arch/arm/mach-tcc8k/Makefile.boot       |    3 ++
 arch/arm/mach-tcc8k/board-tcc8000-sdk.c |   59 +++++++++++++++++++++++++++++++
 arch/arm/mach-tcc8k/board-tcc8000-sdk.h |   18 +++++++++
 5 files changed, 89 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-tcc8k/Makefile.boot
 create mode 100644 arch/arm/mach-tcc8k/board-tcc8000-sdk.c
 create mode 100644 arch/arm/mach-tcc8k/board-tcc8000-sdk.h

diff --git a/arch/arm/mach-tcc8k/Kconfig b/arch/arm/mach-tcc8k/Kconfig
index ec7f71b..ad86415 100644
--- a/arch/arm/mach-tcc8k/Kconfig
+++ b/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/arch/arm/mach-tcc8k/Makefile b/arch/arm/mach-tcc8k/Makefile
index e8a1134..cd92cde 100644
--- a/arch/arm/mach-tcc8k/Makefile
+++ b/arch/arm/mach-tcc8k/Makefile
@@ -5,3 +5,6 @@
 # Common support
 obj-y += clock.o irq.o time.o io.o devices.o
 
+# Specific board support
+obj-$(CONFIG_MACH_TCC8000_SDK) += board-tcc8000-sdk.o
+
diff --git a/arch/arm/mach-tcc8k/Makefile.boot b/arch/arm/mach-tcc8k/Makefile.boot
new file mode 100644
index 0000000..f135c9d
--- /dev/null
+++ b/arch/arm/mach-tcc8k/Makefile.boot
@@ -0,0 +1,3 @@
+   zreladdr-y		:= 0x20008000
+params_phys-y		:= 0x20000100
+initrd_phys-y		:= 0x20800000
diff --git a/arch/arm/mach-tcc8k/board-tcc8000-sdk.c b/arch/arm/mach-tcc8k/board-tcc8000-sdk.c
new file mode 100644
index 0000000..545e586
--- /dev/null
+++ b/arch/arm/mach-tcc8k/board-tcc8000-sdk.c
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2009 Hans J. Koch <hjk@linutronix.de>
+ *
+ * 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 <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+
+#include <asm/mach-types.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+#include <asm/mach/time.h>
+
+#include "board-tcc8000-sdk.h"
+
+#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_timer_init(void)
+{
+	tcc_clocks_init(XI_FREQUENCY, XTI_FREQUENCY);
+}
+
+static struct sys_timer tcc8k_timer = {
+	.init	= tcc8k_timer_init,
+};
+
+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
diff --git a/arch/arm/mach-tcc8k/board-tcc8000-sdk.h b/arch/arm/mach-tcc8k/board-tcc8000-sdk.h
new file mode 100644
index 0000000..1d4e791
--- /dev/null
+++ b/arch/arm/mach-tcc8k/board-tcc8000-sdk.h
@@ -0,0 +1,18 @@
+/*
+ * Some defines for arch/arm/mach-tcc8k/board-tcc8000-sdk.c
+ *
+ */
+
+#ifndef _BOARD_TCC_8000_SDK_H_
+#define _BOARD_TCC_8000_SDK_H_
+
+extern void __init tcc8k_init_irq(void);
+extern void __init tcc8k_map_common_io(void);
+extern int __init tcc_clocks_init(unsigned long xi_freq,
+					unsigned long xti_freq);
+extern struct platform_device tcc_nand_device;
+
+#define XI_FREQUENCY	12000000
+#define XTI_FREQUENCY	32768
+
+#endif
-- 
1.6.3.3

      parent reply	other threads:[~2010-03-31 14:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-31 14:45 [PATCH 0/7 v4] Add basic support for Telechips TCC8xxx SoCs Hans J. Koch
2010-03-31 14:49 ` [PATCH 1/7 v4] Introduce plat-tcc Hans J. Koch
2010-03-31 14:50 ` [PATCH 2/7 v4] Add the clock framework for Telechips TCC8xxx processors Hans J. Koch
2010-04-14 13:35   ` Russell King - ARM Linux
2010-04-16 13:09     ` Hans J. Koch
2010-04-16 13:13       ` Hans J. Koch
2010-03-31 14:52 ` [PATCH 3/7 v4] Introduce plat-tcc irq framework Hans J. Koch
2010-03-31 14:53 ` [PATCH 4/7 v4] Add TCC8xxx system timer Hans J. Koch
2010-03-31 14:54 ` [PATCH 5/7 v4] Basic IO mappings for mach-tcc8k Hans J. Koch
2010-03-31 14:54 ` [PATCH 6/7 v4] Add common platform devices for TCC8xxx SoCs Hans J. Koch
2010-03-31 14:55 ` Hans J. Koch [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100331145554.GH2035@bluebox.local \
    --to=hjk@linutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.