Skip to contentSkip to conversation

Mips64 Ocelot-C and Jaguar ATX platform support

PATCH In review Louis Hamilton 3 participants 4 messages Jul 23, 2003 – Jul 30, 2003 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Mips64 Ocelot-C and Jaguar ATX platform support

Ralf,

Here is 64-bit support for both the RM7000-based Ocelot-C and RM9000-based Jaguar ATX platforms. Since the port was 2.4.21 based, this patch submission is for the 2.4 tree.
This patch supersedes the Ocelot-C patch I sent earlier, since it encompasses both platforms.

Notes the board support lives under arch/mips/momentum.
Also, CONFIG_BOARD_SCACHE and CONFIG_RM7000_CPU_SCACHE are utilized and integrated into each platform's default configuration files.
As in the first patch, drivers/net/mv64340_eth.{c,h} is added to provide ethernet support.

If it looks ok, please check changes into the tree.

Regards,
Louis

Louis Hamilton
Red Hat, Inc.

arch/mips/config-shared.in' arch/mips/momentum/jaguar_atx/dbg_io.c' arch/mips/momentum/jaguar_atx/int-handler.S' arch/mips/momentum/jaguar_atx/irq.c' arch/mips/momentum/jaguar_atx/jaguar_atx_fpga.h' arch/mips/momentum/jaguar_atx/Makefile' arch/mips/momentum/jaguar_atx/mv-irq.c' arch/mips/momentum/jaguar_atx/pci.c' arch/mips/momentum/jaguar_atx/pci-irq.c' arch/mips/momentum/jaguar_atx/prom.c' arch/mips/momentum/jaguar_atx/reset.c' arch/mips/momentum/jaguar_atx/setup.c' arch/mips/momentum/ocelot_c/ocelot_c_fpga.h' arch/mips/momentum/ocelot_c/prom.c' arch/mips/momentum/ocelot_c/reset.c' arch/mips/momentum/ocelot_c/setup.c' arch/mips64/defconfig-jaguar' arch/mips64/defconfig-ocelotc' arch/mips64/kernel/cpu-probe.c' arch/mips64/kernel/pci-dma.c' arch/mips64/kernel/proc.c' arch/mips64/kernel/setup.c' arch/mips64/Makefile' arch/mips64/mm/c-r4k.c' arch/mips64/mm/loadmmu.c' arch/mips64/mm/Makefile' arch/mips64/mm/sc-rm7k.c' arch/mips64/mm/tlbex-r4k.S' arch/mips64/mm/tlb-r4k.c' drivers/char/serial.c' drivers/net/Config.in' drivers/net/Makefile' drivers/net/mv64340_eth.c' drivers/net/mv64340_eth.h' drivers/scsi/scsi_merge.c' include/asm-mips64/addrspace.h' include/asm-mips64/bootinfo.h' include/asm-mips64/cpu.h' include/asm-mips64/io.h' include/asm-mips64/mipsregs.h' include/asm-mips64/page.h' include/asm-mips64/serial.h' `net/core/skbuff.c'

43 files

#1 lore raw

Louis,

Using Ralf's pre-packaged mips64 gcc 2.95.4 / binutils 2.13.2.1 .rpm, I wasn't able to get this to build without having CPU-specific gcc opts (patch below, please verify what flags are appropriate). Also, shouldn't

define_bool CONFIG_BOOT_ELF32 y

be in the config-shared.in in the jaguar section? I cannot link otherwise...

At this point (with latest linux_2_4 tree), I can boot the kernel but get a hang after mounting NFS root via the gt64340 eth0. If I can find a serial cable for the second port, I might try to step with kgdb...

Thanks,
Will

Index: arch/mips64/Makefile
===================================================================
RCS file: /home/cvs/linux/arch/mips64/Makefile,v
retrieving revision 1.22.2.34

mips64/Makefile 28 Jul 2003 18:37:47 -0000 renamed from mips64/Makefile 5 Jul 2003 13:17:04 -0000 1.22.2.34 +0 -0
diff -U3 -r1.22.2.34 Makefile
@@ -79,6 +79,9 @@
 #CFLAGS                += -mips64      # Should be used then we get a

MIPS64 compiler
CFLAGS += -mcpu=r8000 -mips4
endif
+ifdef CONFIG_CPU_RM9000
+GCCFLAGS += -mcpu=r8000 -mips4
+endif

#
# We unconditionally build the math emulator

Quoted 23 lines · Louis Hamilton

Ralf,

Here is 64-bit support for both the RM7000-based Ocelot-C and RM9000-based Jaguar ATX platforms.
Since the port was 2.4.21 based, this patch submission is for the 2.4 tree. This patch supersedes the Ocelot-C patch I sent earlier, since it encompasses both platforms.

Notes the board support lives under arch/mips/momentum. Also, CONFIG_BOARD_SCACHE and CONFIG_RM7000_CPU_SCACHE are utilized and integrated into each platform's default configuration files. As in the first patch, drivers/net/mv64340_eth.{c,h} is added to provide ethernet support.

If it looks ok, please check changes into the tree.

Regards,
Louis

Louis Hamilton
Red Hat, Inc.

#2 lore raw

Will,

Quoted 6 lines · William Jhun

Louis,

Using Ralf's pre-packaged mips64 gcc 2.95.4 / binutils 2.13.2.1 .rpm, I wasn't able to get this to build without having CPU-specific gcc opts (patch below, please verify what flags are appropriate). Also, shouldn't

Arggh.. my (different) build environment meant messing with options in my arch/mips64/Makefile (like using "-march=rm9000" instead of "-mcpu=r8000 -mips4"). The CFLAGS change below looks fine.
Btw, an ifdef for CONFIG_CPU_RM7000 will be required too, using the same CFLAGS options as the rm9000.

Quoted 5 lines

define_bool CONFIG_BOOT_ELF32 y

be in the config-shared.in in the jaguar section?

yes

Quoted 9 lines

At this point (with latest linux_2_4 tree), I can boot the kernel but get a hang after mounting NFS root via the gt64340 eth0. If I can find a serial cable for the second port, I might try to step with kgdb...

Thanks,
Will

thanks

Quoted 45 lines

Index: arch/mips64/Makefile
===================================================================
RCS file: /home/cvs/linux/arch/mips64/Makefile,v
retrieving revision 1.22.2.34
diff -U3 -r1.22.2.34 Makefile

mips64/Makefile 28 Jul 2003 18:37:47 -0000 renamed from mips64/Makefile 5 Jul 2003 13:17:04 -0000 1.22.2.34 +0 -0
@@ -79,6 +79,9 @@
 #CFLAGS                += -mips64      # Should be used then we get a

MIPS64 compiler
CFLAGS += -mcpu=r8000 -mips4
endif

mips64/Makefile 28 Jul 2003 18:37:47 -0000 renamed from mips64/Makefile 5 Jul 2003 13:17:04 -0000 1.22.2.34 +3 -0
+ifdef CONFIG_CPU_RM9000
+GCCFLAGS       += -mcpu=r8000 -mips4
+endif

#
# We unconditionally build the math emulator

Quoted 23 lines · Louis Hamilton

Ralf,

Here is 64-bit support for both the RM7000-based Ocelot-C and RM9000-based Jaguar ATX platforms.
Since the port was 2.4.21 based, this patch submission is for the 2.4 tree. This patch supersedes the Ocelot-C patch I sent earlier, since it encompasses both platforms.

Notes the board support lives under arch/mips/momentum. Also, CONFIG_BOARD_SCACHE and CONFIG_RM7000_CPU_SCACHE are utilized and integrated into each platform's default configuration files. As in the first patch, drivers/net/mv64340_eth.{c,h} is added to provide ethernet support.

If it looks ok, please check changes into the tree.

Regards,
Louis

Louis Hamilton
Red Hat, Inc.

#3 lore raw
In reply to Louis Hamilton
Quoted 7 lines · Louis Hamilton

Notes the board support lives under arch/mips/momentum. Also, CONFIG_BOARD_SCACHE and CONFIG_RM7000_CPU_SCACHE are utilized and integrated into each platform's default configuration files. As in the first patch, drivers/net/mv64340_eth.{c,h} is added to provide ethernet support.

If it looks ok, please check changes into the tree.

Ehhh, sorry. This CONFIG_JAGUAR_DMALOW thing just isn't the way to go. I know the Jaguar's DMA architecture is unpleassant to say the least but still, cluttering generic code with ifdefs isn't the way to go. Declare all memory above the DMA limit high-memory and put the rest into ZONE_DMA rsp. ZONE_NORMAL, as appropriate for the Jaguar. Then provide a dummy implementation of kmap, kunmap etc. (unless you have "real" highmem of course) that does the same thing as if highmem was disabled, see <linux/highmem.h>.

Ralf