Support for PMC-Sierra Ocelot-3 in 2.6
Subsystems (2)
PATCH 1/1 Support for PMC-Sierra Ocelot-3 in 2.6
Hello !
Attached patch adds support for PMC-Sierra Ocelot-3 in 2.6. This includes both 32-bit and 64-bit support. The patch for PCI will be sent next.
Thanks
Manish Lachwani
Source: MontaVista Software, Inc. | Manish Lachwani <[email protected]> Description:
Support for PMC-Sierra Ocelot-3 in 2.6 (32-bit and 64-bit)
arch/mips/Makefile +7 -0
@@ -436,6 +436,13 @@ load-$(CONFIG_PMC_YOSEMITE) += 0xffffffff80100000 # +# Momentum Ocelot-3 +# +core-$(CONFIG_MOMENCO_OCELOT_3) += arch/mips/momentum/ocelot_3/ +cflags-$(CONFIG_MOMENCO_OCELOT_3) += -Iinclude/asm-mips/mach-ocelot3 +load-$(CONFIG_MOMENCO_OCELOT_3) += 0xffffffff80100000 + +# # Momentum Jaguar ATX # core-$(CONFIG_MOMENCO_JAGUAR_ATX) += arch/mips/momentum/jaguar_atx/
include/asm-mips/mach-ocelot3/cpu-feature-overrides.h new file +40 -0
@@ -0,0 +1,40 @@ +/* +* This file is subject to the terms and conditions of the GNU General Public +* License. See the file "COPYING" in the main directory of this archive +* for more details. +* +* Copyright (C) 2004 MontaVista Software Inc. +* Author: Manish Lachwani, [email protected] +*/ +#ifndef __ASM_MACH_JA_CPU_FEATURE_OVERRIDES_H +#define __ASM_MACH_JA_CPU_FEATURE_OVERRIDES_H + +/* +* Momentum Ocelot-3 is based on Rm7900 processor which +* is based on the E9000 core. +*/ +#define cpu_has_watch 1 +#define cpu_has_mips16 0 +#define cpu_has_divec 0 +#define cpu_has_vce 0 +#define cpu_has_cache_cdex_p 0 +#define cpu_has_cache_cdex_s 0 +#define cpu_has_prefetch 1 +#define cpu_has_mcheck 0 +#define cpu_has_ejtag 0 + +#define cpu_has_llsc 1 +#define cpu_has_vtag_icache 0 +#define cpu_has_dc_aliases 0 +#define cpu_has_ic_fills_f_dc 0 + +#define cpu_has_nofpuex 0 +#define cpu_has_64bits 1 + +#define cpu_has_subset_pcaches 0 + +#define cpu_dcache_line_size () 32 +#define cpu_icache_line_size () 32 +#define cpu_scache_line_size () 32 + +#endif /* __ASM_MACH_JA_CPU_FEATURE_OVERRIDES_H */
include/asm-mips/serial.h +22 -0
@@ -319,6 +319,27 @@#define MOMENCO_JAGUAR_ATX_SERIAL_PORT_DEFNS #endif +#ifdef CONFIG_MOMENCO_OCELOT_3 +#define OCELOT_3_BASE_BAUD ( 20000000 / 16 ) +#define OCELOT_3_SERIAL_IRQ 6 +#ifdef CONFIG_MIPS64 +#define OCELOT_3_SERIAL_BASE 0xfffffffffd000020 +#else +#define OCELOT_3_SERIAL_BASE 0xfd000020 +#endif + +#define _OCELOT_3_SERIAL_INIT (int, base) \ + { baud_base: OCELOT_3_BASE_BAUD, irq: int, \ + flags: STD_COM_FLAGS, \ + iomem_base: (u8 *) base, iomem_reg_shift: 2, \ + io_type: SERIAL_IO_MEM } + +#define MOMENCO_OCELOT_3_SERIAL_PORT_DEFNS \ + _OCELOT_3_SERIAL_INIT(OCELOT_3_SERIAL_IRQ, OCELOT_3_SERIAL_BASE) +#else +#define MOMENCO_OCELOT_3_SERIAL_PORT_DEFNS +#endif +#ifdef CONFIG_MOMENCO_OCELOT /* Ordinary NS16552 duart with a 20MHz crystal. */ #define OCELOT_BASE_BAUD ( 20000000 / 16 )
@@ -420,6 +441,7 @@MOMENCO_OCELOT_G_SERIAL_PORT_DEFNS \ MOMENCO_OCELOT_C_SERIAL_PORT_DEFNS \MOMENCO_OCELOT_SERIAL_PORT_DEFNS \ + MOMENCO_OCELOT_3_SERIAL_PORT_DEFNS \TXX927_SERIAL_PORT_DEFNS \AU1000_SERIAL_PORT_DEFNS
drivers/net/Kconfig +1 -1
@@ -2170,7 +2170,7 @@ config MV643XX_ETH tristate "MV-643XX Ethernet support" - depends on MOMENCO_OCELOT_C || MOMENCO_JAGUAR_ATX + depends on MOMENCO_OCELOT_C || MOMENCO_JAGUAR_ATX || MOMENCO_OCELOT_3 help This driver supports the gigabit Ethernet on the Marvell MV643XX chipset which is used in the Momenco Ocelot C and Jaguar ATX.
arch/mips/momentum/ocelot_3/ocelot_3_fpga.h new file +61 -0
61 lines not on this page · raw message
arch/mips/Kconfig +13 -1
@@ -329,6 +329,18 @@ The Ocelot is a MIPS-based Single Board Computer (SBC) made by Momentum Computer <http://www.momenco.com/>. +config MOMENCO_OCELOT_3 + bool "Support for Momentum Ocelot-3 board" + select DMA_NONCOHERENT + select IRQ_CPU + select IRQ_CPU_RM7K + select IRQ_MV64340 + select RM7000_CPU_SCACHE + select SWAP_IO_SPACE + help + The Ocelot-3 is based off Discovery III System Controller and + PMC-Sierra Rm79000 core. + config MOMENCO_JAGUAR_ATX bool "Support for Momentum Jaguar board" select DMA_NONCOHERENT
@@ -1004,7 +1016,7 @@ config BOOT_ELF32 bool - depends on MACH_DECSTATION || MIPS_ATLAS || MIPS_MALTA || MOMENCO_JAGUAR_ATX || SIBYTE_SB1xxx_SOC || SGI_IP32 || SGI_IP22 || SNI_RM200_PCI + depends on MACH_DECSTATION || MIPS_ATLAS || MIPS_MALTA || MOMENCO_JAGUAR_ATX || MOMENCO_OCELOT_3 || SIBYTE_SB1xxx_SOC || SGI_IP32 || SGI_IP22 || SNI_RM200_PCI default y config MIPS_L1_CACHE_SHIFT
include/asm-mips/bootinfo.h +1 -0
@@ -122,6 +122,7 @@#define MACH_MOMENCO_OCELOT_G 1#define MACH_MOMENCO_OCELOT_C 2#define MACH_MOMENCO_JAGUAR_ATX 3 +#define MACH_MOMENCO_OCELOT_3 4/* * Valid machtype for group ITE
arch/mips/momentum/ocelot_3/reset.c new file +64 -0
64 lines not on this page · raw message
arch/mips/momentum/ocelot_3/prom.c new file +259 -0
259 lines not on this page · raw message
arch/mips/momentum/ocelot_3/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +# +# Makefile for Momentum Computer's Ocelot-3 board. +# +# Note! Dependencies are done automagically by 'make dep', which also +# removes any old dependencies. DON'T put your own dependencies here +# unless it's something special (ie not a .c file). +# +obj-y += int-handler.o irq.o prom.o reset.o setup.o
arch/mips/momentum/ocelot_3/int-handler.S new file +138 -0
138 lines not on this page · raw message
arch/mips/momentum/ocelot_3/irq.c new file +81 -0
81 lines not on this page · raw message
arch/mips/momentum/ocelot_3/setup.c new file +312 -0
312 lines not on this page · raw message
arch/mips/configs/ocelot_3_defconfig new file +719 -0
719 lines not on this page · raw message
arch/mips/momentum/ocelot_3/reset.c line 40
Quoted 5 lines · Manish Lachwani
arch/mips/momentum/ocelot_3/reset.c new file +5
-0+#ifdef CONFIG_MIPS64 +0xfffffffffc807000 ; +#else +0xfc807000 ; +#endif
Ouch. Rather ugly. I suggest you rely on the implicit sign extension of the compiler instead.
Ralf
Quoted 13 lines · Ralf Baechle
arch/mips/momentum/ocelot_3/reset.c line 40
Quoted 5 lines · Manish Lachwani
arch/mips/momentum/ocelot_3/reset.c new file +5
-0+#ifdef CONFIG_MIPS64 +0xfffffffffc807000 ; +#else +0xfc807000 ; +#endif Ouch. Rather ugly. I suggest you rely on the implicit sign extension of the compiler instead.
Quoted 2 lines
Ralf
Got it. Will send a patch with the changes and with PCI included
Thanks
Manish Lachwani