Skip to contentSkip to conversation

Add basic support for Telechips TCC8xxx SoCs

PATCH Superseded Hans J. Koch 1 participant 10 messages Apr 21, 2010 – May 26, 2010 2 messages not in the archive

Subsystems (2)

v5 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v5 cover Add basic support for Telechips TCC8xxx SoCs

This is my current version 5 of this patch series.

Changes since v4:

- fixed refcounting of clocks after Russell's review (in PATCH 2/7).
- rebased to v2.6.34-rc5

Thanks,
Hans

#1 lore raw

PATCH v5 1/7 Introduce plat-tcc

This patch introduces support for the tcc platform by creating an arch/arm/plat-tcc and arch/arm/mach-tcc8k directories and adding basic include files plus Kconfig and Makefile.

---
 arch/arm/Kconfig                             |   11 +
 arch/arm/Makefile                            |    2 +
 arch/arm/mach-tcc8k/Kconfig                  |    5 +
 arch/arm/plat-tcc/Kconfig                    |   20 +
 arch/arm/plat-tcc/Makefile                   |    3 +
 arch/arm/plat-tcc/include/mach/debug-macro.S |   33 +
 arch/arm/plat-tcc/include/mach/entry-macro.S |   69 ++
 arch/arm/plat-tcc/include/mach/hardware.h    |   43 ++
 arch/arm/plat-tcc/include/mach/memory.h      |   19 +
 arch/arm/plat-tcc/include/mach/system.h      |   31 +
 arch/arm/plat-tcc/include/mach/tcc8k-regs.h  |  855 ++++++++++++++++++++++++++
 arch/arm/plat-tcc/include/mach/uncompress.h  |   32 +
 arch/arm/plat-tcc/include/mach/vmalloc.h     |   11 +
 arch/arm/plat-tcc/system.c                   |   25 +
 14 files changed, 1159 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-tcc8k/Kconfig
 create mode 100644 arch/arm/plat-tcc/Kconfig
 create mode 100644 arch/arm/plat-tcc/Makefile
 create mode 100644 arch/arm/plat-tcc/include/mach/debug-macro.S
 create mode 100644 arch/arm/plat-tcc/include/mach/entry-macro.S
 create mode 100644 arch/arm/plat-tcc/include/mach/hardware.h
 create mode 100644 arch/arm/plat-tcc/include/mach/memory.h
 create mode 100644 arch/arm/plat-tcc/include/mach/system.h
 create mode 100644 arch/arm/plat-tcc/include/mach/tcc8k-regs.h
 create mode 100644 arch/arm/plat-tcc/include/mach/uncompress.h
 create mode 100644 arch/arm/plat-tcc/include/mach/vmalloc.h
 create mode 100644 arch/arm/plat-tcc/system.c
arch/arm/Kconfig +11 -0
index c5408bf..8b9429c 100644
@@ -723,6 +723,15 @@ config ARCH_SHARK
 	  Support for the StrongARM based Digital DNARD machine, also known
 	  as "Shark" (<http://www.shark-linux.de/shark.html>).
 
+config ARCH_TCC_926
+	bool "Telechips TCC ARM926-based systems"
+	select CPU_ARM926T
+	select HAVE_CLK
+	select COMMON_CLKDEV
+	select GENERIC_CLOCKEVENTS
+	help
+	  Support for Telechips TCC ARM926-based systems.
+
 config ARCH_LH7A40X
 	bool "Sharp LH7A40X"
 	select CPU_ARM922T
@@ -887,6 +896,8 @@ source "arch/arm/plat-s3c24xx/Kconfig"
 source "arch/arm/plat-s5p/Kconfig"
 source "arch/arm/plat-s5pc1xx/Kconfig"
 
+source "arch/arm/plat-tcc/Kconfig"
+
 if ARCH_S3C2410
 source "arch/arm/mach-s3c2400/Kconfig"
 source "arch/arm/mach-s3c2410/Kconfig"
arch/arm/Makefile +2 -0
index ed820e7..9656799 100644
@@ -172,6 +172,7 @@ machine-$(CONFIG_ARCH_SHARK)		:= shark
 machine-$(CONFIG_ARCH_SHMOBILE) 	:= shmobile
 machine-$(CONFIG_ARCH_STMP378X)		:= stmp378x
 machine-$(CONFIG_ARCH_STMP37XX)		:= stmp37xx
+machine-$(CONFIG_ARCH_TCC8K)		:= tcc8k
 machine-$(CONFIG_ARCH_U300)		:= u300
 machine-$(CONFIG_ARCH_U8500)		:= ux500
 machine-$(CONFIG_ARCH_VERSATILE)	:= versatile
@@ -192,6 +193,7 @@ plat-$(CONFIG_PLAT_PXA)		:= pxa
 plat-$(CONFIG_PLAT_S3C24XX)	:= s3c24xx samsung
 plat-$(CONFIG_PLAT_S5PC1XX)	:= s5pc1xx samsung
 plat-$(CONFIG_PLAT_S5P)		:= s5p samsung
+plat-$(CONFIG_ARCH_TCC_926)	:= tcc
 
 ifeq ($(CONFIG_ARCH_EBSA110),y)
 # This is what happens if you forget the IOCS16 line.
arch/arm/mach-tcc8k/Kconfig new file +5 -0
new file mode 100644
index 0000000..ec7f71b
@@ -0,0 +1,5 @@
+if ARCH_TCC8K
+
+comment "TCC8000 systems:"
+
+endif
arch/arm/plat-tcc/Kconfig new file +20 -0
new file mode 100644
index 0000000..1bf4995
@@ -0,0 +1,20 @@
+if ARCH_TCC_926
+
+menu "Telechips ARM926-based CPUs"
+
+choice
+	prompt "Telechips CPU type:"
+	default ARCH_TCC8K
+
+config ARCH_TCC8K
+	bool TCC8000
+	select USB_ARCH_HAS_OHCI
+	help
+	  Support for Telechips TCC8000 systems
+
+endchoice
+
+source "arch/arm/mach-tcc8k/Kconfig"
+
+endmenu
+endif
arch/arm/plat-tcc/Makefile new file +3 -0
new file mode 100644
index 0000000..3f2e4fe
@@ -0,0 +1,3 @@
+# "Telechips Platform Common Modules"
+
+obj-y := system.o
arch/arm/plat-tcc/include/mach/debug-macro.S new file +33 -0
new file mode 100644
index 0000000..9753784
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 1994-1999 Russell King
+ * Copyright (C) 2008-2009 Telechips
+ * Copyright (C) 2009 Hans J. Koch <[email protected]>
+ *
+ * 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.
+ *
+ */
+
+		.macro	addruart,rx,tmp
+		mrc	p15, 0, \rx, c1, c0
+		tst	\rx, #1			@ MMU enabled?
+		moveq	\rx, #0x90000000	@ physical base address
+		movne	\rx, #0xF1000000	@ virtual base
+		orr	\rx, \rx, #0x00007000	@ UART0
+		.endm
+
+		.macro	senduart,rd,rx
+		strb	\rd, [\rx, #0x44]
+		.endm
+
+		.macro	waituart,rd,rx
+		.endm
+
+		.macro	busyuart,rd,rx
+1001:
+		ldr \rd, [\rx, #0x14]
+		tst \rd, #0x20
+
+		beq 1001b
+		.endm
arch/arm/plat-tcc/include/mach/entry-macro.S new file +69 -0

69 lines not on this page · raw message

arch/arm/plat-tcc/include/mach/hardware.h new file +43 -0

43 lines not on this page · raw message

arch/arm/plat-tcc/include/mach/memory.h new file +19 -0
new file mode 100644
index 0000000..1c3478d
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 1999 ARM Limited
+ * Copyright (C) 2000 RidgeRun, Inc.
+ * Copyright (C) 2008-2009 Telechips
+ * Copyright (C) 2010 Hans J. Koch <[email protected]>
+ *
+ * Licensed under the terms of the GPL v2.
+ */
+
+#ifndef __ASM_ARCH_MEMORY_H
+#define __ASM_ARCH_MEMORY_H
+
+/*
+ * Physical DRAM offset.
+ */
+#define PHYS_OFFSET		UL(0x20000000)
+
+#endif
+
arch/arm/plat-tcc/include/mach/system.h new file +31 -0
new file mode 100644
index 0000000..909e603
@@ -0,0 +1,31 @@
+/*
+ * Author: <[email protected]>
+ * Created: June 10, 2008
+ * Description: LINUX SYSTEM FUNCTIONS for TCC83x
+ *
+ * Copyright (C) 2008-2009 Telechips
+ *
+ * Licensed under the terms of the GPL v2.
+ *
+ */
+
+#ifndef __ASM_ARCH_SYSTEM_H
+#define __ASM_ARCH_SYSTEM_H
+#include <linux/clk.h>
+
+#include <asm/mach-types.h>
+#include <mach/hardware.h>
+
+extern void plat_tcc_reboot(void);
+
+static inline void arch_idle(void)
+{
+	cpu_do_idle();
+}
+
+static inline void arch_reset(char mode, const char *cmd)
+{
+	plat_tcc_reboot();
+}
+
+#endif
arch/arm/plat-tcc/include/mach/tcc8k-regs.h new file +855 -0

855 lines not on this page · raw message

arch/arm/plat-tcc/include/mach/uncompress.h new file +32 -0
new file mode 100644
index 0000000..8e0294d
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2009 Hans J. Koch <[email protected]>
+ *
+ * This file is licensed under the terms of the GPL version 2.
+ */
+
+#include <linux/types.h>
+#include <mach/tcc8k-regs.h>
+
+unsigned int system_rev;
+
+#define ID_MASK			0x7fff
+
+static void putc(int c)
+{
+	u32 *uart_lsr = (u32 *)(UART_BASE_PHYS + UART_LSR_OFFS);
+	u32 *uart_thr = (u32 *)(UART_BASE_PHYS + UART_THR_OFFS);
+
+	while (!(*uart_lsr & UART_LSR_THRE))
+		barrier();
+	*uart_thr = c;
+}
+
+static inline void flush(void)
+{
+}
+
+/*
+ * nothing to do
+ */
+#define arch_decomp_setup()
+#define arch_decomp_wdog()
arch/arm/plat-tcc/include/mach/vmalloc.h new file +11 -0
new file mode 100644
index 0000000..7eb4b3d
@@ -0,0 +1,11 @@
+/*
+ * Author: <[email protected]>
+ * Created: June 10, 2008
+ *
+ * Copyright (C) 2000 Russell King.
+ * Copyright (C) 2008-2009 Telechips
+ *
+ * Licensed under the terms of the GPL v2.
+ */
+#define VMALLOC_END	0xf0000000UL
+
arch/arm/plat-tcc/system.c new file +25 -0
new file mode 100644
index 0000000..79b6ecd
@@ -0,0 +1,25 @@
+/*
+ * System functions for Telechips TCCxxxx SoCs
+ *
+ * Copyright (C) Hans J. Koch <[email protected]>
+ *
+ * Licensed under the terms of the GPL v2.
+ *
+ */
+
+#include <linux/io.h>
+
+#include <mach/tcc8k-regs.h>
+
+/* System reboot */
+void plat_tcc_reboot(void)
+{
+	/* Make sure clocks are on */
+	__raw_writel(0xffffffff, CKC_BASE + BCLKCTR0_OFFS);
+
+	/* Enable watchdog reset */
+	__raw_writel(0x49, TIMER_BASE + TWDCFG_OFFS);
+	/* Wait for reset */
+	unreachable();
+}
+
Signature · 1 line
1.6.3.3

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

PATCH v5 1/7 Introduce plat-tcc

Quoted 16 lines · Russell King - ARM Linux

arch/arm/plat-tcc/include/mach/tcc8k-regs.h line 325

Quoted 12 lines · Hans J. Koch
arch/arm/plat-tcc/include/mach/tcc8k-regs.h new file +12 -0
+#define UART_RBR_OFFS		0x00
+#define UART_THR_OFFS		0x00
+#define UART_DLL_OFFS		0x00
+#define UART_IER_OFFS		0x04
+#define UART_DLM_OFFS		0x04
+#define UART_IIR_OFFS		0x08
+#define UART_FCR_OFFS		0x08
+#define UART_LCR_OFFS		0x0c
+#define UART_MCR_OFFS		0x10
+#define UART_LSR_OFFS		0x14
+#define UART_MSR_OFFS		0x18
+#define UART_SCR_OFFS		0x1c

These look like a duplication (n << 2) of the standard 8250 definitions in serial_reg.h

Yep. Meanwhile I've got confirmation from Telechips that this is actually supposed to be a 8250-compatible thing. I will use that driver in the future, so for the moment, I threw away all UART-related stuff. Thanks for that hint!

Quoted 24 lines

arch/arm/plat-tcc/include/mach/tcc8k-regs.h line 347

Quoted 12 lines
arch/arm/plat-tcc/include/mach/tcc8k-regs.h new file +11 -0
+/* Bits in UART_LCR */
+#define UART_LCR_DLAB	(1 << 7)
+#define UART_LCR_SB	(1 << 6)
+#define UART_LCR_SP	(1 << 5)
+#define UART_LCR_EPS	(1 << 4)
+#define UART_LCR_PEN	(1 << 3)
+#define UART_LCR_STB	(1 << 2)
+#define UART_LCR_WLS_5	(0 << 0)
+#define UART_LCR_WLS_6	(1 << 0)
+#define UART_LCR_WLS_7	(2 << 0)
+#define UART_LCR_WLS_8	(3 << 0)
#define UART_LCR_DLAB           0x80 /* Divisor latch access bit */
#define UART_LCR_SBC            0x40 /* Set break control */
#define UART_LCR_SPAR           0x20 /* Stick parity (?) */
#define UART_LCR_EPAR           0x10 /* Even parity select */
#define UART_LCR_PARITY         0x08 /* Parity Enable */
#define UART_LCR_STOP           0x04 /* Stop bits: 0=1 bit, 1=2 bits */
#define UART_LCR_WLEN5          0x00 /* Wordlength: 5 bits */
#define UART_LCR_WLEN6          0x01 /* Wordlength: 6 bits */
#define UART_LCR_WLEN7          0x02 /* Wordlength: 7 bits */
#define UART_LCR_WLEN8          0x03 /* Wordlength: 8 bits */
Quoted 1 line

etc. Please use the already established definitions from linux/serial_reg.h

I've done so in uncompress.h (the only remaining user).

Quoted 27 lines
Quoted 27 lines
arch/arm/plat-tcc/system.c new file +20 -0
new file mode 100644
index 0000000..79b6ecd
@@ -0,0 +1,25 @@
+/*
+ * System functions for Telechips TCCxxxx SoCs
+ *
+ * Copyright (C) Hans J. Koch <[email protected]>
+ *
+ * Licensed under the terms of the GPL v2.
+ *
+ */
+
+#include <linux/io.h>
+
+#include <mach/tcc8k-regs.h>
+
+/* System reboot */
+void plat_tcc_reboot(void)
+{
+	/* Make sure clocks are on */
+	__raw_writel(0xffffffff, CKC_BASE + BCLKCTR0_OFFS);
+
+	/* Enable watchdog reset */
Quoted 8 lines

arch/arm/plat-tcc/system.c line 23

Quoted 3 lines
arch/arm/plat-tcc/system.c new file +3 -0
+	__raw_writel(0x49, TIMER_BASE + TWDCFG_OFFS);
+	/* Wait for reset */
+	unreachable();

I don't think that's true; what you're saying is that the CPU will never execute any instructions after the __raw_writel - what if the write is buffered and doesn't take effect immediately - are you happy for the CPU to start executing data?

Grmbl... The meaning of unreachable() has changed. OK, I replaced it with a while(1);

New patch series will follow.

Thanks,
Hans

#4 lore raw

PATCH v5 2/7 Add the clock framework for Telechips TCC8xxx processors.

In reply to Hans J. Koch

This adds definitions and low-level functions to handle clocks in TCC8xxx processors.

---
 arch/arm/mach-tcc8k/Makefile                |    6 +
 arch/arm/mach-tcc8k/clock.c                 |  592 +++++++++++++++++++++++++++
 arch/arm/plat-tcc/Makefile                  |    2 +-
 arch/arm/plat-tcc/clock.c                   |  180 ++++++++
 arch/arm/plat-tcc/include/mach/clkdev.h     |    7 +
 arch/arm/plat-tcc/include/mach/clock.h      |   48 +++
 arch/arm/plat-tcc/include/mach/tcc8k-regs.h |   17 +-
 7 files changed, 842 insertions(+), 10 deletions(-)
 create mode 100644 arch/arm/mach-tcc8k/Makefile
 create mode 100644 arch/arm/mach-tcc8k/clock.c
 create mode 100644 arch/arm/plat-tcc/clock.c
 create mode 100644 arch/arm/plat-tcc/include/mach/clkdev.h
 create mode 100644 arch/arm/plat-tcc/include/mach/clock.h
arch/arm/mach-tcc8k/Makefile new file +6 -0
new file mode 100644
index 0000000..805d850
@@ -0,0 +1,6 @@
+#
+# Makefile for TCC8K boards and common files.
+#
+
+# Common support
+obj-y += clock.o
arch/arm/mach-tcc8k/clock.c new file +592 -0

592 lines not on this page · raw message

arch/arm/plat-tcc/Makefile +1 -1
index 3f2e4fe..eceabc8 100644
@@ -1,3 +1,3 @@
 # "Telechips Platform Common Modules"
 
-obj-y := system.o
+obj-y := clock.o system.o
arch/arm/plat-tcc/clock.c new file +180 -0

180 lines not on this page · raw message

arch/arm/plat-tcc/include/mach/clkdev.h new file +7 -0
new file mode 100644
index 0000000..04b37a8
@@ -0,0 +1,7 @@
+#ifndef __ASM_MACH_CLKDEV_H
+#define __ASM_MACH_CLKDEV_H
+
+#define __clk_get(clk) ({ 1; })
+#define __clk_put(clk) do { } while (0)
+
+#endif
arch/arm/plat-tcc/include/mach/clock.h new file +48 -0

48 lines not on this page · raw message

arch/arm/plat-tcc/include/mach/tcc8k-regs.h +8 -9
index 67f866c..9142b44 100644
@@ -30,13 +30,13 @@
 #define EXT_MEM_CTRL_BASE	0xf0000000
 #define EXT_MEM_CTRL_SIZE	SZ_4K
 
-#define CS1_BASE_VIRT		0xf7000000
-#define AHB_PERI_BASE_VIRT	0xf4000000
-#define APB0_PERI_BASE_VIRT	0xf1000000
-#define APB1_PERI_BASE_VIRT	0xf2000000
-#define EXT_MEM_CTRL_BASE_VIRT	0xf3000000
-#define INT_SRAM_BASE_VIRT	0xf5000000
-#define DATA_TCM_BASE_VIRT	0xf6000000
+#define CS1_BASE_VIRT		(void __iomem *)0xf7000000
+#define AHB_PERI_BASE_VIRT	(void __iomem *)0xf4000000
+#define APB0_PERI_BASE_VIRT	(void __iomem *)0xf1000000
+#define APB1_PERI_BASE_VIRT	(void __iomem *)0xf2000000
+#define EXT_MEM_CTRL_BASE_VIRT	(void __iomem *)0xf3000000
+#define INT_SRAM_BASE_VIRT	(void __iomem *)0xf5000000
+#define DATA_TCM_BASE_VIRT	(void __iomem *)0xf6000000
 
 #define __REG(x)     (*((volatile u32 *)(x)))
 
@@ -708,8 +708,7 @@
 #define PMGPIO_APB_OFFS		0x800
 
 /* Clock controller registers */
-#define CKC_BASE		(APB1_PERI_BASE_VIRT + 0x6000)
-#define CKC_BASE_PHYS		(APB1_PERI_BASE + 0x6000)
+#define CKC_BASE	((void __iomem *)(APB1_PERI_BASE_VIRT + 0x6000))
 
 #define CLKCTRL_OFFS		0x00
 #define PLL0CFG_OFFS		0x04
Signature · 1 line
1.6.3.3

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

PATCH v5 2/7 Add the clock framework for Telechips TCC8xxx processors.

Quoted 16 lines · Russell King - ARM Linux

arch/arm/mach-tcc8k/clock.c line 342

Quoted 11 lines · Hans J. Koch
arch/arm/mach-tcc8k/clock.c new file +11 -0
+static int __set_parent(struct clk *clock, struct clk *parent)
+{
+	if (clock->parent && (clock->parent != parent)) {
+		clock->parent->refcount--;
+		if ((clock->parent->refcount == 0) && clock->parent->disable)
+			clock->parent->disable(clock->parent);
+	}
+
+	clock->parent = parent;
+	if (clock->parent)
+		clock->parent->refcount++;

Is this left over from the old clk_set_parent() implementation - with the handling of refcounting in the main clk_set_parent(), this refcounting seems unnecessary (and seems buggy.)

Right. All refcounting is already done in plat-tcc/clock.c, so this __set_parent() became obsolete. I removed it completely, because the initial parent setting is already done elsewhere.

Thanks,
Hans

#7 lore raw

PATCH v5 3/7 Introduce plat-tcc irq framework

In reply to Hans J. Koch

Introduce lowlevel interrupt routines.

---
 arch/arm/mach-tcc8k/Makefile          |    3 +-
 arch/arm/mach-tcc8k/irq.c             |  110 +++++++++++++++++++++++++++++++++
 arch/arm/plat-tcc/include/mach/irqs.h |   84 +++++++++++++++++++++++++
 3 files changed, 196 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-tcc8k/irq.c
 create mode 100644 arch/arm/plat-tcc/include/mach/irqs.h
arch/arm/mach-tcc8k/Makefile +2 -1
index 805d850..24356e9 100644
@@ -3,4 +3,5 @@
 #
 
 # Common support
-obj-y += clock.o
+obj-y += clock.o irq.o
+
arch/arm/mach-tcc8k/irq.c new file +110 -0

110 lines not on this page · raw message

arch/arm/plat-tcc/include/mach/irqs.h new file +84 -0

84 lines not on this page · raw message

Signature · 1 line
1.6.3.3
#8 lore raw

PATCH v5 4/7 Add TCC8xxx system timer

In reply to Hans J. Koch

Add the system timer using clockevents with the internal TC32 timer. This also adds a clocksource using the same timer.

---
 arch/arm/Kconfig                       |    1 +
 arch/arm/mach-tcc8k/Makefile           |    2 +-
 arch/arm/mach-tcc8k/time.c             |  147 ++++++++++++++++++++++++++++++++
 arch/arm/plat-tcc/include/mach/timex.h |    5 +
 4 files changed, 154 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-tcc8k/time.c
 create mode 100644 arch/arm/plat-tcc/include/mach/timex.h
arch/arm/Kconfig +1 -0
index 8b9429c..7c6e731 100644
@@ -728,6 +728,7 @@ config ARCH_TCC_926
 	select CPU_ARM926T
 	select HAVE_CLK
 	select COMMON_CLKDEV
+	select GENERIC_TIME
 	select GENERIC_CLOCKEVENTS
 	help
 	  Support for Telechips TCC ARM926-based systems.
arch/arm/mach-tcc8k/Makefile +1 -1
index 24356e9..5673868 100644
@@ -3,5 +3,5 @@
 #
 
 # Common support
-obj-y += clock.o irq.o
+obj-y += clock.o irq.o time.o
 
arch/arm/mach-tcc8k/time.c new file +147 -0

147 lines not on this page · raw message

arch/arm/plat-tcc/include/mach/timex.h new file +5 -0
new file mode 100644
index 0000000..057acbe
@@ -0,0 +1,5 @@
+/*
+ * A definition needed by arch core code.
+ *
+ */
+#define CLOCK_TICK_RATE		(HZ * 100000UL)
Signature · 1 line
1.6.3.3
#9 lore raw

PATCH v5 5/7 Basic IO mappings for mach-tcc8k

In reply to Hans J. Koch

Map the IO ranges of TCC8xxx peripherals.

---
 arch/arm/mach-tcc8k/Makefile        |    2 +-
 arch/arm/mach-tcc8k/io.c            |   63 +++++++++++++++++++++++++++++++++++
 arch/arm/plat-tcc/include/mach/io.h |   23 +++++++++++++
 3 files changed, 87 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-tcc8k/io.c
 create mode 100644 arch/arm/plat-tcc/include/mach/io.h
arch/arm/mach-tcc8k/Makefile +1 -1
index 5673868..09552e2 100644
@@ -3,5 +3,5 @@
 #
 
 # Common support
-obj-y += clock.o irq.o time.o
+obj-y += clock.o irq.o time.o io.o
 
arch/arm/mach-tcc8k/io.c new file +63 -0

63 lines not on this page · raw message

arch/arm/plat-tcc/include/mach/io.h new file +23 -0
new file mode 100644
index 0000000..3e911d3
@@ -0,0 +1,23 @@
+/*
+ * IO definitions for TCC8000 processors and boards
+ *
+ * Copyright (C) 1997-1999 Russell King
+ * Copyright (C) 2008-2009 Telechips
+ * Copyright (C) 2010 Hans J. Koch <[email protected]>
+ *
+ * Licensed under the terms of the GNU Public License version 2.
+ */
+
+#ifndef __ASM_ARM_ARCH_IO_H
+#define __ASM_ARM_ARCH_IO_H
+
+#define IO_SPACE_LIMIT 0xffffffff
+
+/*
+ * We don't actually have real ISA nor PCI buses, but there is so many
+ * drivers out there that might just work if we fake them...
+ */
+#define __io(a)			__typesafe_io(a)
+#define __mem_pci(a)		(a)
+
+#endif
Signature · 1 line
1.6.3.3
#10 lore raw

PATCH v5 6/7 Add common platform devices for TCC8xxx SoCs

In reply to Hans J. Koch

This patch introduces a first set of platform devices for integrated peripherals of TCC8xxx processors. Drivers for these devices are available and will be posted in a second step.

---
 arch/arm/mach-tcc8k/Makefile  |    2 +-
 arch/arm/mach-tcc8k/devices.c |  274 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 275 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-tcc8k/devices.c
arch/arm/mach-tcc8k/Makefile +1 -1
index 09552e2..e8a1134 100644
@@ -3,5 +3,5 @@
 #
 
 # Common support
-obj-y += clock.o irq.o time.o io.o
+obj-y += clock.o irq.o time.o io.o devices.o
 
arch/arm/mach-tcc8k/devices.c new file +274 -0

274 lines not on this page · raw message

Signature · 1 line
1.6.3.3
#11 lore raw

PATCH v5 7/7 Add board support for Telechips TCC8000-SDK board

In reply to Hans J. Koch

Add support for the Telechips TCC8000-SDK development board.

---
 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
arch/arm/mach-tcc8k/Kconfig +6 -0
index ec7f71b..ad86415 100644
@@ -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
arch/arm/mach-tcc8k/Makefile +3 -0
index e8a1134..cd92cde 100644
@@ -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
+
arch/arm/mach-tcc8k/Makefile.boot new file +3 -0
new file mode 100644
index 0000000..f135c9d
@@ -0,0 +1,3 @@
+   zreladdr-y		:= 0x20008000
+params_phys-y		:= 0x20000100
+initrd_phys-y		:= 0x20800000
arch/arm/mach-tcc8k/board-tcc8000-sdk.c new file +59 -0

59 lines not on this page · raw message

arch/arm/mach-tcc8k/board-tcc8000-sdk.h new file +18 -0
new file mode 100644
index 0000000..1d4e791
@@ -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
Signature · 1 line
1.6.3.3