· 9 years ago · Nov 19, 2016, 08:20 AM
1[PATCH 1/3] Add Mindspeed Comcerto platform support
2stanleymiao at gmail.com stanleymiao at gmail.com
3Thu Oct 14 04:38:07 EDT 2010
4
5 Previous message: Add Mindspeed Comcerto platform support
6 Next message: [PATCH 1/3] Add Mindspeed Comcerto platform support
7 Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
8
9From: Stanley.Miao <stanley.miao at windriver.com>
10
11Add Mindspeed Comcerto platform support. Now this patch includes only
12Multifunction EVM board with Comcerto-1000 CPU.
13
14Signed-off-by: Stanley.Miao <stanley.miao at windriver.com>
15---
16 arch/arm/Kconfig | 11 ++
17 arch/arm/Makefile | 1 +
18 arch/arm/boot/compressed/Makefile | 4 +
19 arch/arm/boot/compressed/head-comcerto.S | 6 +
20 arch/arm/boot/compressed/head.S | 5 +
21 arch/arm/mach-comcerto/Kconfig | 32 +++++
22 arch/arm/mach-comcerto/Makefile | 10 ++
23 arch/arm/mach-comcerto/Makefile.boot | 2 +
24 arch/arm/mach-comcerto/board-c1kmfcn_evm.c | 88 ++++++++++++
25 arch/arm/mach-comcerto/comcerto-1000.c | 146 ++++++++++++++++++++
26 .../arm/mach-comcerto/include/mach/comcerto-1000.h | 91 ++++++++++++
27 arch/arm/mach-comcerto/include/mach/debug-macro.S | 46 ++++++
28 arch/arm/mach-comcerto/include/mach/entry-macro.S | 70 ++++++++++
29 arch/arm/mach-comcerto/include/mach/hardware.h | 37 +++++
30 arch/arm/mach-comcerto/include/mach/io.h | 32 +++++
31 arch/arm/mach-comcerto/include/mach/memory.h | 33 +++++
32 arch/arm/mach-comcerto/include/mach/system.h | 39 +++++
33 arch/arm/mach-comcerto/include/mach/timex.h | 28 ++++
34 arch/arm/mach-comcerto/include/mach/uncompress.h | 58 ++++++++
35 arch/arm/mach-comcerto/include/mach/vmalloc.h | 21 +++
36 20 files changed, 760 insertions(+), 0 deletions(-)
37 create mode 100644 arch/arm/boot/compressed/head-comcerto.S
38 create mode 100644 arch/arm/mach-comcerto/Kconfig
39 create mode 100644 arch/arm/mach-comcerto/Makefile
40 create mode 100644 arch/arm/mach-comcerto/Makefile.boot
41 create mode 100644 arch/arm/mach-comcerto/board-c1kmfcn_evm.c
42 create mode 100644 arch/arm/mach-comcerto/comcerto-1000.c
43 create mode 100644 arch/arm/mach-comcerto/include/mach/comcerto-1000.h
44 create mode 100644 arch/arm/mach-comcerto/include/mach/debug-macro.S
45 create mode 100644 arch/arm/mach-comcerto/include/mach/entry-macro.S
46 create mode 100644 arch/arm/mach-comcerto/include/mach/hardware.h
47 create mode 100644 arch/arm/mach-comcerto/include/mach/io.h
48 create mode 100644 arch/arm/mach-comcerto/include/mach/memory.h
49 create mode 100644 arch/arm/mach-comcerto/include/mach/system.h
50 create mode 100644 arch/arm/mach-comcerto/include/mach/timex.h
51 create mode 100644 arch/arm/mach-comcerto/include/mach/uncompress.h
52 create mode 100644 arch/arm/mach-comcerto/include/mach/vmalloc.h
53
54diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
55index 88c97bc..ca6ccf7 100644
56--- a/arch/arm/Kconfig
57+++ b/arch/arm/Kconfig
58@@ -334,6 +334,15 @@ config ARCH_EP93XX
59 help
60 This enables support for the Cirrus EP93xx series of CPUs.
61
62+config ARCH_COMCERTO
63+ bool "Mindspeed Comcerto"
64+ select ZONE_DMA
65+ select CPU_V6
66+ help
67+ This enables support for Mindspeed's Comcerto development boards.
68+ If you would like to build your kernel to run on one of these boards
69+ then you must say 'Y' here. Otherwise say 'N'
70+
71 config ARCH_FOOTBRIDGE
72 bool "FootBridge"
73 select CPU_SA110
74@@ -841,6 +850,8 @@ source "arch/arm/mach-clps711x/Kconfig"
75
76 source "arch/arm/mach-cns3xxx/Kconfig"
77
78+source "arch/arm/mach-comcerto/Kconfig"
79+
80 source "arch/arm/mach-davinci/Kconfig"
81
82 source "arch/arm/mach-dove/Kconfig"
83diff --git a/arch/arm/Makefile b/arch/arm/Makefile
84index 59c1ce8..2daad67 100644
85--- a/arch/arm/Makefile
86+++ b/arch/arm/Makefile
87@@ -141,6 +141,7 @@ machine-$(CONFIG_ARCH_INTEGRATOR) := integrator
88 machine-$(CONFIG_ARCH_IOP13XX) := iop13xx
89 machine-$(CONFIG_ARCH_IOP32X) := iop32x
90 machine-$(CONFIG_ARCH_IOP33X) := iop33x
91+machine-$(CONFIG_ARCH_COMCERTO) := comcerto
92 machine-$(CONFIG_ARCH_IXP2000) := ixp2000
93 machine-$(CONFIG_ARCH_IXP23XX) := ixp23xx
94 machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx
95diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
96index 65a7c1c..e8419db 100644
97--- a/arch/arm/boot/compressed/Makefile
98+++ b/arch/arm/boot/compressed/Makefile
99@@ -33,6 +33,10 @@ ifeq ($(CONFIG_CPU_XSCALE),y)
100 OBJS += head-xscale.o
101 endif
102
103+ifeq ($(CONFIG_ARCH_COMCERTO),y)
104+OBJS += head-comcerto.o
105+endif
106+
107 ifeq ($(CONFIG_PXA_SHARPSL_DETECT_MACH_ID),y)
108 OBJS += head-sharpsl.o
109 endif
110diff --git a/arch/arm/boot/compressed/head-comcerto.S b/arch/arm/boot/compressed/head-comcerto.S
111new file mode 100644
112index 0000000..60160f6
113--- /dev/null
114+++ b/arch/arm/boot/compressed/head-comcerto.S
115@@ -0,0 +1,6 @@
116+#include <asm/mach-types.h>
117+
118+ .section ".start", "ax"
119+ ldr r7, mach_type
120+
121+mach_type: .word MACH_TYPE_COMCERTO
122diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
123index 6825c34..8f38fbf 100644
124--- a/arch/arm/boot/compressed/head.S
125+++ b/arch/arm/boot/compressed/head.S
126@@ -66,6 +66,11 @@ wait: mrc p14, 0, pc, c0, c1, 0
127 add \rb, \rb, #0x00010000 @ Ser1
128 #endif
129 .endm
130+#elif defined(CONFIG_ARCH_COMCERTO)
131+ .macro loadsp, rb, tmp
132+ mov \rb, #0x10000000
133+ orr \rb, \rb, #0x00090000
134+ .endm
135 #elif defined(CONFIG_ARCH_S3C2410)
136 .macro loadsp, rb, tmp
137 mov \rb, #0x50000000
138diff --git a/arch/arm/mach-comcerto/Kconfig b/arch/arm/mach-comcerto/Kconfig
139new file mode 100644
140index 0000000..a61a31a
141--- /dev/null
142+++ b/arch/arm/mach-comcerto/Kconfig
143@@ -0,0 +1,32 @@
144+if ARCH_COMCERTO
145+
146+menu "Comcerto Implementation Options"
147+
148+choice
149+ prompt "Comcerto System Type"
150+ default ARCH_M83XXX
151+
152+config ARCH_M83XXX
153+ bool "M83xxx"
154+ select GENERIC_TIME
155+ select GENERIC_CLOCKEVENTS
156+ help
157+ Say Y here if you intend to run this kernel with a Comcerto1000 device.
158+
159+endchoice
160+
161+choice
162+ prompt "Comcerto Board type"
163+ default EVM_C1KMFCN_EVM
164+
165+config EVM_C1KMFCN_EVM
166+ bool "C1KMFCN_EVM"
167+ depends on ARCH_M83XXX
168+ help
169+ Say Y here if you intend to run this kernel with a C1K Multifunction EVM board.
170+
171+endchoice
172+
173+endmenu
174+
175+endif
176diff --git a/arch/arm/mach-comcerto/Makefile b/arch/arm/mach-comcerto/Makefile
177new file mode 100644
178index 0000000..70aac61
179--- /dev/null
180+++ b/arch/arm/mach-comcerto/Makefile
181@@ -0,0 +1,10 @@
182+#
183+# Makefile for the linux kernel.
184+#
185+
186+# Object file lists.
187+
188+obj-y :=
189+
190+obj-$(CONFIG_ARCH_M83XXX) += comcerto-1000.o
191+obj-$(CONFIG_EVM_C1KMFCN_EVM) += board-c1kmfcn_evm.o
192diff --git a/arch/arm/mach-comcerto/Makefile.boot b/arch/arm/mach-comcerto/Makefile.boot
193new file mode 100644
194index 0000000..6262c4b
195--- /dev/null
196+++ b/arch/arm/mach-comcerto/Makefile.boot
197@@ -0,0 +1,2 @@
198+zreladdr-y := 0x80808000
199+params_phys-y := 0x80800100
200diff --git a/arch/arm/mach-comcerto/board-c1kmfcn_evm.c b/arch/arm/mach-comcerto/board-c1kmfcn_evm.c
201new file mode 100644
202index 0000000..74a7da3
203--- /dev/null
204+++ b/arch/arm/mach-comcerto/board-c1kmfcn_evm.c
205@@ -0,0 +1,88 @@
206+/*
207+ * linux/arch/arm/mach-comcerto/board-c1kmfcn_evm.c
208+ *
209+ * Copyright (C) 2004,2008 Mindspeed Technologies, Inc.
210+ * Copyright (c) 2010 Wind River Systems, Inc.
211+ *
212+ * This program is free software; you can redistribute it and/or modify
213+ * it under the terms of the GNU General Public License as published by
214+ * the Free Software Foundation; either version 2 of the License, or
215+ * (at your option) any later version.
216+ *
217+ * This program is distributed in the hope that it will be useful,
218+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
219+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
220+ * GNU General Public License for more details.
221+ *
222+ * You should have received a copy of the GNU General Public License
223+ * along with this program; if not, write to the Free Software
224+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
225+ */
226+#include <linux/sched.h>
227+#include <linux/device.h>
228+#include <linux/serial_8250.h>
229+#include <asm/sizes.h>
230+#include <asm/setup.h>
231+#include <asm/mach-types.h>
232+#include <asm/io.h>
233+#include <asm/mach/arch.h>
234+#include <mach/hardware.h>
235+
236+/* --------------------------------------------------------------------
237+ * Serial interface
238+ * -------------------------------------------------------------------- */
239+static struct plat_serial8250_port comcerto_uart_data[] = {
240+ {
241+ .mapbase = COMCERTO_APB_UART0_BASE,
242+ .membase = (void *)APB_VADDR(COMCERTO_APB_UART0_BASE),
243+ .irq = IRQ_UART0,
244+ .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
245+ .iotype = UPIO_MEM,
246+ .regshift = 2,
247+ .uartclk = COMCERTO_DEFAULTAHBCLK * 1000000,
248+ },
249+ {
250+ .flags = 0,
251+ },
252+};
253+
254+static struct platform_device comcerto_uart = {
255+ .name = "serial8250",
256+ .id = PLAT8250_DEV_PLATFORM,
257+ .dev = {
258+ .platform_data = comcerto_uart_data,
259+ },
260+};
261+
262+static struct platform_device *comcerto_devices[] __initdata = {
263+ &comcerto_uart,
264+};
265+
266+/************************************************************************
267+ * Machine definition
268+ *
269+ ************************************************************************/
270+static void __init platform_map_io(void)
271+{
272+ device_map_io();
273+}
274+
275+static void __init platform_irq_init(void)
276+{
277+}
278+
279+static void __init platform_init(void)
280+{
281+ platform_add_devices(comcerto_devices, ARRAY_SIZE(comcerto_devices));
282+}
283+
284+MACHINE_START(COMCERTO, "Comcerto 1000 (Multifunction EVM)")
285+ /* Mindspeed Technologies Inc. */
286+ .phys_io = COMCERTO_AHB_APB_BASE,
287+ .io_pg_offst = ((COMCERTO_AHB_APB_BASE) >> 18) & 0xfffc,
288+ .boot_params = COMCERTO_SDRAM_BASE + 0x100,
289+ .map_io = platform_map_io,
290+ .init_irq = platform_irq_init,
291+ .init_machine = platform_init,
292+ .timer = &comcerto_timer,
293+MACHINE_END
294diff --git a/arch/arm/mach-comcerto/comcerto-1000.c b/arch/arm/mach-comcerto/comcerto-1000.c
295new file mode 100644
296index 0000000..09032ea
297--- /dev/null
298+++ b/arch/arm/mach-comcerto/comcerto-1000.c
299@@ -0,0 +1,146 @@
300+/*
301+ * linux/arch/arm/mach-comcerto/comcerto-1000.c
302+ *
303+ * Copyright (C) 2004,2008 Mindspeed Technologies, Inc.
304+ * Copyright (c) 2010 Wind River Systems, Inc.
305+ *
306+ * This program is free software; you can redistribute it and/or modify
307+ * it under the terms of the GNU General Public License as published by
308+ * the Free Software Foundation; either version 2 of the License, or
309+ * (at your option) any later version.
310+ *
311+ * This program is distributed in the hope that it will be useful,
312+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
313+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
314+ * GNU General Public License for more details.
315+ *
316+ * You should have received a copy of the GNU General Public License
317+ * along with this program; if not, write to the Free Software
318+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
319+ */
320+#include <linux/sched.h>
321+#include <linux/mm.h>
322+#include <linux/init.h>
323+#include <asm/setup.h>
324+#include <asm/mach-types.h>
325+#include <asm/io.h>
326+#include <asm/sizes.h>
327+#include <asm/mach/arch.h>
328+#include <asm/mach/map.h>
329+#include <mach/hardware.h>
330+
331+/***********************************************************
332+ * Virtual address Mapping *
333+ * *
334+ ***********************************************************/
335+
336+static struct map_desc comcerto_io_desc[] __initdata = {
337+ {
338+ .virtual = SDRAM_MSP_MEMORY_VADDR,
339+ .pfn = __phys_to_pfn(SDRAM_MSP_MEMORY_PHY),
340+ .length = SDRAM_MSP_MEMORY_SIZE,
341+ .type = MT_DEVICE
342+ },
343+ {
344+ .virtual = ARAM_MEMORY_VADDR,
345+ .pfn = __phys_to_pfn(COMCERTO_AHB_ARAM_BASE),
346+ .length = ARAM_MEMORY_SIZE,
347+ .type = MT_DEVICE
348+ },
349+ {
350+ .virtual = (ARAM_MEMORY_VADDR + 0x100000),
351+ .pfn = __phys_to_pfn(COMCERTO_AHB_ARAM_BASE + 0x100000),
352+ .length = ARAM_MEMORY_SIZE,
353+ .type = MT_DEVICE
354+ },
355+ {
356+ .virtual = ARAM_MEMORY_VADDR + 0x100000,
357+ .pfn = __phys_to_pfn(COMCERTO_AHB_ARAM_BASE + 0x100000),
358+ .length = ARAM_MEMORY_SIZE,
359+ .type = MT_DEVICE
360+ },
361+ {
362+ .virtual = APB_VADDR(COMCERTO_APB_TIMER_BASE),
363+ .pfn = __phys_to_pfn(COMCERTO_APB_TIMER_BASE),
364+ .length = SZ_64K,
365+ .type = MT_DEVICE
366+ },
367+ {
368+ .virtual = APB_VADDR(COMCERTO_APB_GPIO_BASE),
369+ .pfn = __phys_to_pfn(COMCERTO_APB_GPIO_BASE),
370+ .length = SZ_64K,
371+ .type = MT_DEVICE
372+ },
373+ {
374+ .virtual = APB_VADDR(COMCERTO_APB_UART0_BASE),
375+ .pfn = __phys_to_pfn(COMCERTO_APB_UART0_BASE),
376+ .length = SZ_64K,
377+ .type = MT_DEVICE
378+ },
379+ {
380+ .virtual = APB_VADDR(COMCERTO_APB_UART1_BASE),
381+ .pfn = __phys_to_pfn(COMCERTO_APB_UART1_BASE),
382+ .length = SZ_64K,
383+ .type = MT_DEVICE
384+ },
385+ {
386+ .virtual = APB_VADDR(COMCERTO_APB_SPI_BASE),
387+ .pfn = __phys_to_pfn(COMCERTO_APB_SPI_BASE),
388+ .length = SZ_64K,
389+ .type = MT_DEVICE
390+ },
391+ {
392+ .virtual = APB_VADDR(COMCERTO_APB_I2C_BASE),
393+ .pfn = __phys_to_pfn(COMCERTO_APB_I2C_BASE),
394+ .length = SZ_16K,
395+ .type = MT_DEVICE
396+ },
397+ {
398+ .virtual = APB_VADDR(COMCERTO_APB_INTC_BASE),
399+ .pfn = __phys_to_pfn(COMCERTO_APB_INTC_BASE),
400+ .length = SZ_64K,
401+ .type = MT_DEVICE
402+ },
403+ {
404+ .virtual = APB_VADDR(COMCERTO_APB_CLK_BASE),
405+ .pfn = __phys_to_pfn(COMCERTO_APB_CLK_BASE),
406+ .length = SZ_64K,
407+ .type = MT_DEVICE
408+ },
409+ {
410+ .virtual = APB_VADDR(COMCERTO_APB_EMAC0_BASE),
411+ .pfn = __phys_to_pfn(COMCERTO_APB_EMAC0_BASE),
412+ .length = SZ_64K,
413+ .type = MT_DEVICE
414+ },
415+ {
416+ .virtual = APB_VADDR(COMCERTO_APB_EMAC1_BASE),
417+ .pfn = __phys_to_pfn(COMCERTO_APB_EMAC1_BASE),
418+ .length = SZ_64K,
419+ .type = MT_DEVICE
420+ },
421+ {
422+ .virtual = APB_VADDR(COMCERTO_APB_ARAM_BASE),
423+ .pfn = __phys_to_pfn(COMCERTO_APB_ARAM_BASE),
424+ .length = SZ_4K,
425+ .type = MT_DEVICE
426+ },
427+ {
428+ .virtual = APB_VADDR(COMCERTO_APB_EXPBUS_BASE),
429+ .pfn = __phys_to_pfn(COMCERTO_APB_EXPBUS_BASE),
430+ .length = SZ_64K,
431+ .type = MT_DEVICE
432+ },
433+ {
434+ .virtual = COMCERTO_IPSEC_VADDR_BASE,
435+ .pfn = __phys_to_pfn(COMCERTO_AHB_IPSEC_BASE),
436+ .length = SZ_1M,
437+ .type = MT_DEVICE
438+ },
439+};
440+
441+void __init device_map_io(void)
442+{
443+ iotable_init(comcerto_io_desc, ARRAY_SIZE(comcerto_io_desc));
444+}
445+
446diff --git a/arch/arm/mach-comcerto/include/mach/comcerto-1000.h b/arch/arm/mach-comcerto/include/mach/comcerto-1000.h
447new file mode 100644
448index 0000000..f48ae34
449--- /dev/null
450+++ b/arch/arm/mach-comcerto/include/mach/comcerto-1000.h
451@@ -0,0 +1,91 @@
452+/*
453+ * arch/arm/mach-comcerto/include/mach/comcerto-1000.h
454+ *
455+ * Copyright (C) 2008 Mindspeed Technologies, Inc.
456+ *
457+ * This program is free software; you can redistribute it and/or modify
458+ * it under the terms of the GNU General Public License as published by
459+ * the Free Software Foundation; either version 2 of the License, or
460+ * (at your option) any later version.
461+ *
462+ * This program is distributed in the hope that it will be useful,
463+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
464+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
465+ * GNU General Public License for more details.
466+ *
467+ * You should have received a copy of the GNU General Public License
468+ * along with this program; if not, write to the Free Software
469+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
470+ */
471+
472+#ifndef __ASM_ARCH_COMCERTO1000_H__
473+#define __ASM_ARCH_COMCERTO1000_H__
474+
475+#define COMCERTO_DEFAULTAHBCLK 187 /* MHz */
476+#define COMCERTO_PHYCLK 250 /* MHz */
477+#define COMCERTO_ARMCLK 650 /* MHz */
478+
479+/***** Physical address of IO on APB Bus *****/
480+
481+/* 0x001F0000 Reserved*/
482+#define COMCERTO_APB_MDMA_BASE 0x101E0000
483+#define COMCERTO_APB_TDMA2_BASE 0x101D0000
484+/* 0x101B0000 --> 0x101C0000 Reserved*/
485+#define COMCERTO_APB_EXPBUS_BASE 0x101A0000
486+#define COMCERTO_APB_EMAC1_BASE 0x10190000
487+/* 0x10100000 --> 0x00180000 Reserved*/
488+#define COMCERTO_APB_ARAM_BASE 0x100F0000
489+/* 0x100E0000 Reserved*/
490+#define COMCERTO_APB_EMAC0_BASE 0x100D0000
491+/* 0x100C0000 Reserved*/
492+#define COMCERTO_APB_CLK_BASE 0x100B0000
493+#define COMCERTO_APB_INTC_BASE 0x100A0000
494+#define COMCERTO_APB_I2C_BASE 0x1009C000
495+#define COMCERTO_APB_SPI_BASE 0x10098000
496+#define COMCERTO_APB_UART1_BASE 0x10094000
497+#define COMCERTO_APB_UART0_BASE 0x10090000
498+/* 0x10080000 Reserved*/
499+#define COMCERTO_APB_GPIO_BASE 0x10070000
500+#define COMCERTO_APB_PCIePHY_BASE 0x10060000
501+#define COMCERTO_APB_TIMER_BASE 0x10050000
502+#define COMCERTO_APB_AHB_BASE 0x10040000
503+#define COMCERTO_APB_PCIe1_BASE 0x10030000
504+#define COMCERTO_APB_TDMA_BASE 0x10020000
505+#define COMCERTO_APB_PCIe0_BASE 0x10010000
506+#define COMCERTO_APB_TDM_BASE 0x10000000
507+
508+/***** Physical address on AHB Bus *****/
509+#define COMCERTO_AHB_HIGHMEMDDR_BASE 0xFFFF0000
510+#define COMCERTO_AHB_DDR_BASE 0x80000000
511+#define COMCERTO_AHB_PCIe1_BASE 0x50000000
512+#define COMCERTO_AHB_PCIe0_BASE 0x40000000
513+#define COMCERTO_AHB_EXP_BASE 0x20000000
514+#define COMCERTO_AHB_PCIe1CMD_BASE 0x11410000
515+#define COMCERTO_AHB_PCIe0CMD_BASE 0x11400000
516+#define COMCERTO_AHB_IBR_BASE 0x11000000
517+#define COMCERTO_AHB_APB_BASE 0x10000000
518+#define COMCERTO_AHB_USB0_BASE 0x0F000000
519+#define COMCERTO_AHB_IPSEC_BASE 0x0E000000
520+#define COMCERTO_AHB_DDRCONFIG_BASE 0x0D000000
521+#define COMCERTO_AHB_ARAM_BASE 0x0A000000
522+
523+/* Physical addresses of memories */
524+#define COMCERTO_SDRAM_BASE (COMCERTO_AHB_DDR_BASE + SZ_8M)
525+#define ARAM_MEMORY_SIZE SZ_128K
526+#define SDRAM_MSP_MEMORY_PHY COMCERTO_AHB_DDR_BASE
527+#define SDRAM_MSP_MEMORY_SIZE SZ_8M
528+
529+#define IO_SPACE_LIMIT 0
530+
531+/*
532+ * Virtual address mapping
533+ */
534+#define SDRAM_MSP_MEMORY_VADDR 0xf0000000
535+#define ARAM_MEMORY_VADDR 0xfa000000
536+#define COMCERTO_PCIe0CMD_VADDR_BASE 0xfa020000
537+#define COMCERTO_PCIe1CMD_VADDR_BASE 0xfa030000
538+#define COMCERTO_IPSEC_VADDR_BASE 0xfb000000
539+#define APB_VADDR_BASE 0xfc000000 /* VA of IO on APB bus */
540+
541+#define APB_VADDR(x) ((x) - COMCERTO_AHB_APB_BASE + APB_VADDR_BASE)
542+#endif
543diff --git a/arch/arm/mach-comcerto/include/mach/debug-macro.S b/arch/arm/mach-comcerto/include/mach/debug-macro.S
544new file mode 100644
545index 0000000..42bc5a0
546--- /dev/null
547+++ b/arch/arm/mach-comcerto/include/mach/debug-macro.S
548@@ -0,0 +1,46 @@
549+/*
550+ * arch/arm/mach-comcerto/include/mach/debug-macro.S
551+ *
552+ * Copyright (C) 2004,2005 Mindspeed Technologies, Inc.
553+ *
554+ * This program is free software; you can redistribute it and/or modify
555+ * it under the terms of the GNU General Public License as published by
556+ * the Free Software Foundation; either version 2 of the License, or
557+ * (at your option) any later version.
558+ *
559+ * This program is distributed in the hope that it will be useful,
560+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
561+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
562+ * GNU General Public License for more details.
563+ *
564+ * You should have received a copy of the GNU General Public License
565+ * along with this program; if not, write to the Free Software
566+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
567+ */
568+
569+#define UART_LSR 0x14
570+
571+ .macro addruart,rx, tmp
572+ mrc p15, 0, \rx, c1, c0
573+ tst \rx, #1 @ MMU enabled?
574+ moveq \rx, #0x10000000 @ physical base address
575+ movne \rx, #0xfc000000 @ virtual base
576+ orr \rx, \rx, #0x00090000 @ UART0
577+ .endm
578+
579+ .macro senduart,rd,rx
580+ strb \rd, [\rx, #0x00]
581+ .endm
582+
583+ .macro waituart,rd,rx
584+1001: ldrb \rd, [\rx, #UART_LSR]
585+ tst \rd, #0x20 @ wait for THRE
586+ beq 1001b
587+ .endm
588+
589+ .macro busyuart,rd,rx
590+1001: ldrb \rd, [\rx, #UART_LSR]
591+ and \rd, \rd, #0x60
592+ teq \rd, #0x60 @ wait for TEMT and THRE
593+ bne 1001b
594+ .endm
595diff --git a/arch/arm/mach-comcerto/include/mach/entry-macro.S b/arch/arm/mach-comcerto/include/mach/entry-macro.S
596new file mode 100644
597index 0000000..442ad92
598--- /dev/null
599+++ b/arch/arm/mach-comcerto/include/mach/entry-macro.S
600@@ -0,0 +1,70 @@
601+/*
602+ * arch/arm/mach-comcerto/include/mach/entry-macro.S
603+ *
604+ * Copyright (C) 2004,2005 Mindspeed Technologies, Inc.
605+ *
606+ * This program is free software; you can redistribute it and/or modify
607+ * it under the terms of the GNU General Public License as published by
608+ * the Free Software Foundation; either version 2 of the License, or
609+ * (at your option) any later version.
610+ *
611+ * This program is distributed in the hope that it will be useful,
612+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
613+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
614+ * GNU General Public License for more details.
615+ *
616+ * You should have received a copy of the GNU General Public License
617+ * along with this program; if not, write to the Free Software
618+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
619+ */
620+#include <mach/hardware.h>
621+
622+#if defined(CONFIG_ARCH_COMCERTO)
623+ .macro disable_fiq
624+ .endm
625+
626+ .macro get_irqnr_preamble, base, tmp
627+ .endm
628+
629+ .macro arch_ret_to_user, tmp1, tmp2
630+ .endm
631+
632+ .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
633+
634+ mov \irqnr, #0
635+ ldr \base, =COMCERTO_INTC_CSP_IRQ_WNR
636+ ldr \tmp, [\base]
637+ cmp \tmp, #0
638+ beq 10011f
639+ cmp \tmp, #32
640+ movne \irqnr, \tmp
641+ bne 1004f
642+
643+
644+10011:
645+ mov \irqnr, #0
646+ ldr \base, =COMCERTO_INTC_STATUS_REG_1
647+ ldr \tmp, =COMCERTO_INTC_CSP_IRQMASK_1
648+ ldr \irqstat, [\base]
649+ ldr \tmp, [\tmp]
650+ ands \irqstat, \irqstat, \tmp
651+ beq 1004f
652+
653+ tst \irqstat, #0x2000
654+ movne \irqnr,#13
655+ bne 1003f
656+
657+1001: tst \irqstat, #1
658+ bne 1003f
659+ add \irqnr, \irqnr, #1
660+ mov \irqstat, \irqstat, lsr #1
661+ cmp \irqnr, #32
662+ bcc 1001b
663+1003: add \irqnr, \irqnr, #32
664+
665+1004:
666+ .endm
667+
668+ .macro irq_prio_table
669+ .endm
670+#endif
671diff --git a/arch/arm/mach-comcerto/include/mach/hardware.h b/arch/arm/mach-comcerto/include/mach/hardware.h
672new file mode 100644
673index 0000000..577289d
674--- /dev/null
675+++ b/arch/arm/mach-comcerto/include/mach/hardware.h
676@@ -0,0 +1,37 @@
677+/*
678+ * arch/arm/mach-comcerto/include/mach/hardware.h
679+ *
680+ * Copyright (C) 2006 Mindspeed Technologies, Inc.
681+ *
682+ * This program is free software; you can redistribute it and/or modify
683+ * it under the terms of the GNU General Public License as published by
684+ * the Free Software Foundation; either version 2 of the License, or
685+ * (at your option) any later version.
686+ *
687+ * This program is distributed in the hope that it will be useful,
688+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
689+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
690+ * GNU General Public License for more details.
691+ *
692+ * You should have received a copy of the GNU General Public License
693+ * along with this program; if not, write to the Free Software
694+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
695+ */
696+
697+#ifndef __ASM_ARCH_HARDWARE_H
698+#define __ASM_ARCH_HARDWARE_H
699+
700+/***** Device *****/
701+#if defined(CONFIG_ARCH_M83XXX)
702+ #include <mach/comcerto-1000.h>
703+#else
704+ #error "mach/hardware.h : Unknown architecture"
705+#endif
706+
707+#ifndef __ASSEMBLY__
708+struct sys_timer;
709+extern struct sys_timer comcerto_timer;
710+extern void device_map_io(void);
711+#endif
712+
713+#endif
714diff --git a/arch/arm/mach-comcerto/include/mach/io.h b/arch/arm/mach-comcerto/include/mach/io.h
715new file mode 100644
716index 0000000..be3320f
717--- /dev/null
718+++ b/arch/arm/mach-comcerto/include/mach/io.h
719@@ -0,0 +1,32 @@
720+/*
721+ * arch/arm/mach-comcerto/include/mach/io.h
722+ *
723+ * Copyright (C) 2004,2005 Mindspeed Technologies, Inc.
724+ *
725+ * This program is free software; you can redistribute it and/or modify
726+ * it under the terms of the GNU General Public License as published by
727+ * the Free Software Foundation; either version 2 of the License, or
728+ * (at your option) any later version.
729+ *
730+ * This program is distributed in the hope that it will be useful,
731+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
732+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
733+ * GNU General Public License for more details.
734+ *
735+ * You should have received a copy of the GNU General Public License
736+ * along with this program; if not, write to the Free Software
737+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
738+ */
739+#ifndef __ASM_ARCH_COMCERTO1000_IO_H
740+#define __ASM_ARCH_COMCERTO1000_IO_H
741+
742+#include <asm/io.h>
743+
744+#if !defined(CONFIG_PCI)
745+
746+#define __io(a) ((void __iomem *)(a))
747+#define __mem_pci(a) (a)
748+
749+#endif
750+
751+#endif /* __ASM_ARCH_COMCERTO1000_IO_H */
752diff --git a/arch/arm/mach-comcerto/include/mach/memory.h b/arch/arm/mach-comcerto/include/mach/memory.h
753new file mode 100644
754index 0000000..6d42d06
755--- /dev/null
756+++ b/arch/arm/mach-comcerto/include/mach/memory.h
757@@ -0,0 +1,33 @@
758+/*
759+ * arch/arm/mach-comcerto/include/mach/memory.h
760+ *
761+ * Copyright (C) 2006 Mindspeed Technologies, Inc.
762+ *
763+ * This program is free software; you can redistribute it and/or modify
764+ * it under the terms of the GNU General Public License as published by
765+ * the Free Software Foundation; either version 2 of the License, or
766+ * (at your option) any later version.
767+ *
768+ * This program is distributed in the hope that it will be useful,
769+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
770+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
771+ * GNU General Public License for more details.
772+ *
773+ * You should have received a copy of the GNU General Public License
774+ * along with this program; if not, write to the Free Software
775+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
776+ */
777+
778+#ifndef __ASM_ARCH_MEMORY_H
779+#define __ASM_ARCH_MEMORY_H
780+
781+#include <mach/hardware.h>
782+
783+#define PHYS_OFFSET COMCERTO_SDRAM_BASE
784+
785+#define __virt_to_bus(x) __virt_to_phys(x)
786+#define __bus_to_virt(x) __phys_to_virt(x)
787+#define __pfn_to_bus(x) __pfn_to_phys(x)
788+#define __bus_to_pfn(x) __phys_to_pfn(x)
789+
790+#endif
791diff --git a/arch/arm/mach-comcerto/include/mach/system.h b/arch/arm/mach-comcerto/include/mach/system.h
792new file mode 100644
793index 0000000..364cc7e
794--- /dev/null
795+++ b/arch/arm/mach-comcerto/include/mach/system.h
796@@ -0,0 +1,39 @@
797+/*
798+ * arch/arm/mach-comcerto/include/mach/system.h
799+ *
800+ * Copyright (C) 2004,2005 Mindspeed Technologies, Inc.
801+ *
802+ * This program is free software; you can redistribute it and/or modify
803+ * it under the terms of the GNU General Public License as published by
804+ * the Free Software Foundation; either version 2 of the License, or
805+ * (at your option) any later version.
806+ *
807+ * This program is distributed in the hope that it will be useful,
808+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
809+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
810+ * GNU General Public License for more details.
811+ *
812+ * You should have received a copy of the GNU General Public License
813+ * along with this program; if not, write to the Free Software
814+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
815+ */
816+#ifndef __ASM_ARCH_SYSTEM_H
817+#define __ASM_ARCH_SYSTEM_H
818+
819+#include <mach/hardware.h>
820+#include <asm/io.h>
821+
822+static inline void arch_idle(void)
823+{
824+ /*
825+ * This should do all the clock switching
826+ * and wait for interrupt tricks
827+ */
828+ cpu_do_idle();
829+}
830+
831+static inline void arch_reset(char mode, const char *cmd)
832+{
833+}
834+
835+#endif /* __ASM_ARCH_SYSTEM_H */
836diff --git a/arch/arm/mach-comcerto/include/mach/timex.h b/arch/arm/mach-comcerto/include/mach/timex.h
837new file mode 100644
838index 0000000..4ca125d
839--- /dev/null
840+++ b/arch/arm/mach-comcerto/include/mach/timex.h
841@@ -0,0 +1,28 @@
842+/*
843+ * linux/include/asm-arm/arch-comcerto/timex.h
844+ *
845+ * Copyright (C) 2006 Mindspeed Technologies, Inc.
846+ *
847+ * This program is free software; you can redistribute it and/or modify
848+ * it under the terms of the GNU General Public License as published by
849+ * the Free Software Foundation; either version 2 of the License, or
850+ * (at your option) any later version.
851+ *
852+ * This program is distributed in the hope that it will be useful,
853+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
854+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
855+ * GNU General Public License for more details.
856+ *
857+ * You should have received a copy of the GNU General Public License
858+ * along with this program; if not, write to the Free Software
859+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
860+ */
861+
862+#ifndef __ASM_ARCH_TIMEX_H__
863+#define __ASM_ARCH_TIMEX_H__
864+
865+#include <mach/hardware.h>
866+
867+#define CLOCK_TICK_RATE (COMCERTO_DEFAULTAHBCLK * 1000 * 1000)
868+
869+#endif
870diff --git a/arch/arm/mach-comcerto/include/mach/uncompress.h b/arch/arm/mach-comcerto/include/mach/uncompress.h
871new file mode 100644
872index 0000000..e3e6938
873--- /dev/null
874+++ b/arch/arm/mach-comcerto/include/mach/uncompress.h
875@@ -0,0 +1,58 @@
876+/*
877+ * arch/arm/mach-comcerto/include/mach/uncompress.h
878+ *
879+ * Copyright (C) 2004,2008 Mindspeed Technologies, Inc.
880+ *
881+ * This program is free software; you can redistribute it and/or modify
882+ * it under the terms of the GNU General Public License as published by
883+ * the Free Software Foundation; either version 2 of the License, or
884+ * (at your option) any later version.
885+ *
886+ * This program is distributed in the hope that it will be useful,
887+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
888+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
889+ * GNU General Public License for more details.
890+ *
891+ * You should have received a copy of the GNU General Public License
892+ * along with this program; if not, write to the Free Software
893+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
894+ */
895+#ifndef __ASM_ARCH_UNCOMPRESS_H
896+#define __ASM_ARCH_UNCOMPRESS_H
897+
898+#define UART_DR (*(volatile unsigned long *)0x10090000)
899+#define UART_LSR (*(volatile unsigned long *)0x10090014)
900+
901+static inline void putc(int c)
902+{
903+ while (!(UART_LSR & 0x20))
904+ barrier();
905+
906+ UART_DR = c;
907+}
908+
909+static void flush(void)
910+{
911+}
912+static inline void puts(const char *ptr)
913+{
914+ char c;
915+
916+ while ((c = *ptr++) != '\0') {
917+ if (c == '\n')
918+ putc('\r');
919+ putc(c);
920+ }
921+
922+ flush();
923+
924+}
925+
926+/*
927+ * nothing to do
928+ */
929+#define arch_decomp_setup()
930+
931+#define arch_decomp_wdog()
932+
933+#endif /* __ASM_ARCH_UNCOMPRESS_H */
934diff --git a/arch/arm/mach-comcerto/include/mach/vmalloc.h b/arch/arm/mach-comcerto/include/mach/vmalloc.h
935new file mode 100644
936index 0000000..f807501
937--- /dev/null
938+++ b/arch/arm/mach-comcerto/include/mach/vmalloc.h
939@@ -0,0 +1,21 @@
940+/*
941+ * arch/arm/mach-comcerto/include/mach/vmalloc.h
942+ *
943+ * Copyright (C) 2004,2005 Mindspeed Technologies, Inc.
944+ *
945+ * This program is free software; you can redistribute it and/or modify
946+ * it under the terms of the GNU General Public License as published by
947+ * the Free Software Foundation; either version 2 of the License, or
948+ * (at your option) any later version.
949+ *
950+ * This program is distributed in the hope that it will be useful,
951+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
952+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
953+ * GNU General Public License for more details.
954+ *
955+ * You should have received a copy of the GNU General Public License
956+ * along with this program; if not, write to the Free Software
957+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
958+ */
959+
960+#define VMALLOC_END (0xF0000000)
961--
9621.5.4.3
963
964
965 Previous message: Add Mindspeed Comcerto platform support
966 Next message: [PATCH 1/3] Add Mindspeed Comcerto platform support
967 Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
968
969More information about the linux-arm-kernel mailing list