-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PATCH] CRIS update: new subarchitecture v32
New CRIS sub architecture named v32. From: Dave Jones <davej@redhat.com> Fix swapped kmalloc args Signed-off-by: Mikael Starvik <starvik@axis.com> Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
- Loading branch information
Mikael Starvik
authored and
Linus Torvalds
committed
Jul 27, 2005
1 parent
5d01e6c
commit 51533b6
Showing
193 changed files
with
52,861 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,296 @@ | ||
config ETRAX_DRAM_VIRTUAL_BASE | ||
hex | ||
depends on ETRAX_ARCH_V32 | ||
default "c0000000" | ||
|
||
config ETRAX_LED1G | ||
string "First green LED bit" | ||
depends on ETRAX_ARCH_V32 | ||
default "PA3" | ||
help | ||
Bit to use for the first green LED (network LED). | ||
Most Axis products use bit A3 here. | ||
|
||
config ETRAX_LED1R | ||
string "First red LED bit" | ||
depends on ETRAX_ARCH_V32 | ||
default "PA4" | ||
help | ||
Bit to use for the first red LED (network LED). | ||
Most Axis products use bit A4 here. | ||
|
||
config ETRAX_LED2G | ||
string "Second green LED bit" | ||
depends on ETRAX_ARCH_V32 | ||
default "PA5" | ||
help | ||
Bit to use for the first green LED (status LED). | ||
Most Axis products use bit A5 here. | ||
|
||
config ETRAX_LED2R | ||
string "Second red LED bit" | ||
depends on ETRAX_ARCH_V32 | ||
default "PA6" | ||
help | ||
Bit to use for the first red LED (network LED). | ||
Most Axis products use bit A6 here. | ||
|
||
config ETRAX_LED3G | ||
string "Third green LED bit" | ||
depends on ETRAX_ARCH_V32 | ||
default "PA7" | ||
help | ||
Bit to use for the first green LED (drive/power LED). | ||
Most Axis products use bit A7 here. | ||
|
||
config ETRAX_LED3R | ||
string "Third red LED bit" | ||
depends on ETRAX_ARCH_V32 | ||
default "PA7" | ||
help | ||
Bit to use for the first red LED (drive/power LED). | ||
Most Axis products use bit A7 here. | ||
|
||
choice | ||
prompt "Product debug-port" | ||
depends on ETRAX_ARCH_V32 | ||
default ETRAX_DEBUG_PORT0 | ||
|
||
config ETRAX_DEBUG_PORT0 | ||
bool "Serial-0" | ||
help | ||
Choose a serial port for the ETRAX debug console. Default to | ||
port 0. | ||
|
||
config ETRAX_DEBUG_PORT1 | ||
bool "Serial-1" | ||
help | ||
Use serial port 1 for the console. | ||
|
||
config ETRAX_DEBUG_PORT2 | ||
bool "Serial-2" | ||
help | ||
Use serial port 2 for the console. | ||
|
||
config ETRAX_DEBUG_PORT3 | ||
bool "Serial-3" | ||
help | ||
Use serial port 3 for the console. | ||
|
||
config ETRAX_DEBUG_PORT_NULL | ||
bool "disabled" | ||
help | ||
Disable serial-port debugging. | ||
|
||
endchoice | ||
|
||
choice | ||
prompt "Kernel GDB port" | ||
depends on ETRAX_KGDB | ||
default ETRAX_KGDB_PORT0 | ||
help | ||
Choose a serial port for kernel debugging. NOTE: This port should | ||
not be enabled under Drivers for built-in interfaces (as it has its | ||
own initialization code) and should not be the same as the debug port. | ||
|
||
config ETRAX_KGDB_PORT0 | ||
bool "Serial-0" | ||
help | ||
Use serial port 0 for kernel debugging. | ||
|
||
config ETRAX_KGDB_PORT1 | ||
bool "Serial-1" | ||
help | ||
Use serial port 1 for kernel debugging. | ||
|
||
config ETRAX_KGDB_PORT2 | ||
bool "Serial-2" | ||
help | ||
Use serial port 2 for kernel debugging. | ||
|
||
config ETRAX_KGDB_PORT3 | ||
bool "Serial-3" | ||
help | ||
Use serial port 3 for kernel debugging. | ||
|
||
endchoice | ||
|
||
config ETRAX_MEM_GRP1_CONFIG | ||
hex "MEM_GRP1_CONFIG" | ||
depends on ETRAX_ARCH_V32 | ||
default "4044a" | ||
help | ||
Waitstates for flash. The default value is suitable for the | ||
standard flashes used in axis products (120 ns). | ||
|
||
config ETRAX_MEM_GRP2_CONFIG | ||
hex "MEM_GRP2_CONFIG" | ||
depends on ETRAX_ARCH_V32 | ||
default "0" | ||
help | ||
Waitstates for SRAM. 0 is a good choice for most Axis products. | ||
|
||
config ETRAX_MEM_GRP3_CONFIG | ||
hex "MEM_GRP3_CONFIG" | ||
depends on ETRAX_ARCH_V32 | ||
default "0" | ||
help | ||
Waitstates for CSP0-3. 0 is a good choice for most Axis products. | ||
It may need to be changed if external devices such as extra | ||
register-mapped LEDs are used. | ||
|
||
config ETRAX_MEM_GRP4_CONFIG | ||
hex "MEM_GRP4_CONFIG" | ||
depends on ETRAX_ARCH_V32 | ||
default "0" | ||
help | ||
Waitstates for CSP4-6. 0 is a good choice for most Axis products. | ||
|
||
config ETRAX_SDRAM_GRP0_CONFIG | ||
hex "SDRAM_GRP0_CONFIG" | ||
depends on ETRAX_ARCH_V32 | ||
default "336" | ||
help | ||
SDRAM configuration for group 0. The value depends on the | ||
hardware configuration. The default value is suitable | ||
for 32 MB organized as two 16 bits chips (e.g. Axis | ||
part number 18550) connected as one 32 bit device (i.e. in | ||
the same group). | ||
|
||
config ETRAX_SDRAM_GRP1_CONFIG | ||
hex "SDRAM_GRP1_CONFIG" | ||
depends on ETRAX_ARCH_V32 | ||
default "0" | ||
help | ||
SDRAM configuration for group 1. The defult value is 0 | ||
because group 1 is not used in the default configuration, | ||
described in the help for SDRAM_GRP0_CONFIG. | ||
|
||
config ETRAX_SDRAM_TIMING | ||
hex "SDRAM_TIMING" | ||
depends on ETRAX_ARCH_V32 | ||
default "104a" | ||
help | ||
SDRAM timing parameters. The default value is ok for | ||
most hardwares but large SDRAMs may require a faster | ||
refresh (a.k.a 8K refresh). The default value implies | ||
100MHz clock and SDR mode. | ||
|
||
config ETRAX_SDRAM_COMMAND | ||
hex "SDRAM_COMMAND" | ||
depends on ETRAX_ARCH_V32 | ||
default "0" | ||
help | ||
SDRAM command. Should be 0 unless you really know what | ||
you are doing (may be != 0 for unusual address line | ||
mappings such as in a MCM).. | ||
|
||
config ETRAX_DEF_GIO_PA_OE | ||
hex "GIO_PA_OE" | ||
depends on ETRAX_ARCH_V32 | ||
default "1c" | ||
help | ||
Configures the direction of general port A bits. 1 is out, 0 is in. | ||
This is often totally different depending on the product used. | ||
There are some guidelines though - if you know that only LED's are | ||
connected to port PA, then they are usually connected to bits 2-4 | ||
and you can therefore use 1c. On other boards which don't have the | ||
LED's at the general ports, these bits are used for all kinds of | ||
stuff. If you don't know what to use, it is always safe to put all | ||
as inputs, although floating inputs isn't good. | ||
|
||
config ETRAX_DEF_GIO_PA_OUT | ||
hex "GIO_PA_OUT" | ||
depends on ETRAX_ARCH_V32 | ||
default "00" | ||
help | ||
Configures the initial data for the general port A bits. Most | ||
products should use 00 here. | ||
|
||
config ETRAX_DEF_GIO_PB_OE | ||
hex "GIO_PB_OE" | ||
depends on ETRAX_ARCH_V32 | ||
default "00000" | ||
help | ||
Configures the direction of general port B bits. 1 is out, 0 is in. | ||
This is often totally different depending on the product used. | ||
There are some guidelines though - if you know that only LED's are | ||
connected to port PA, then they are usually connected to bits 2-4 | ||
and you can therefore use 1c. On other boards which don't have the | ||
LED's at the general ports, these bits are used for all kinds of | ||
stuff. If you don't know what to use, it is always safe to put all | ||
as inputs, although floating inputs isn't good. | ||
|
||
config ETRAX_DEF_GIO_PB_OUT | ||
hex "GIO_PB_OUT" | ||
depends on ETRAX_ARCH_V32 | ||
default "00000" | ||
help | ||
Configures the initial data for the general port B bits. Most | ||
products should use 00000 here. | ||
|
||
config ETRAX_DEF_GIO_PC_OE | ||
hex "GIO_PC_OE" | ||
depends on ETRAX_ARCH_V32 | ||
default "00000" | ||
help | ||
Configures the direction of general port C bits. 1 is out, 0 is in. | ||
This is often totally different depending on the product used. | ||
There are some guidelines though - if you know that only LED's are | ||
connected to port PA, then they are usually connected to bits 2-4 | ||
and you can therefore use 1c. On other boards which don't have the | ||
LED's at the general ports, these bits are used for all kinds of | ||
stuff. If you don't know what to use, it is always safe to put all | ||
as inputs, although floating inputs isn't good. | ||
|
||
config ETRAX_DEF_GIO_PC_OUT | ||
hex "GIO_PC_OUT" | ||
depends on ETRAX_ARCH_V32 | ||
default "00000" | ||
help | ||
Configures the initial data for the general port C bits. Most | ||
products should use 00000 here. | ||
|
||
config ETRAX_DEF_GIO_PD_OE | ||
hex "GIO_PD_OE" | ||
depends on ETRAX_ARCH_V32 | ||
default "00000" | ||
help | ||
Configures the direction of general port D bits. 1 is out, 0 is in. | ||
This is often totally different depending on the product used. | ||
There are some guidelines though - if you know that only LED's are | ||
connected to port PA, then they are usually connected to bits 2-4 | ||
and you can therefore use 1c. On other boards which don't have the | ||
LED's at the general ports, these bits are used for all kinds of | ||
stuff. If you don't know what to use, it is always safe to put all | ||
as inputs, although floating inputs isn't good. | ||
|
||
config ETRAX_DEF_GIO_PD_OUT | ||
hex "GIO_PD_OUT" | ||
depends on ETRAX_ARCH_V32 | ||
default "00000" | ||
help | ||
Configures the initial data for the general port D bits. Most | ||
products should use 00000 here. | ||
|
||
config ETRAX_DEF_GIO_PE_OE | ||
hex "GIO_PE_OE" | ||
depends on ETRAX_ARCH_V32 | ||
default "00000" | ||
help | ||
Configures the direction of general port E bits. 1 is out, 0 is in. | ||
This is often totally different depending on the product used. | ||
There are some guidelines though - if you know that only LED's are | ||
connected to port PA, then they are usually connected to bits 2-4 | ||
and you can therefore use 1c. On other boards which don't have the | ||
LED's at the general ports, these bits are used for all kinds of | ||
stuff. If you don't know what to use, it is always safe to put all | ||
as inputs, although floating inputs isn't good. | ||
|
||
config ETRAX_DEF_GIO_PE_OUT | ||
hex "GIO_PE_OUT" | ||
depends on ETRAX_ARCH_V32 | ||
default "00000" | ||
help | ||
Configures the initial data for the general port E bits. Most | ||
products should use 00000 here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# | ||
# arch/cris/arch-v32/boot/Makefile | ||
# | ||
target = $(target_boot_dir) | ||
src = $(src_boot_dir) | ||
|
||
zImage: compressed/vmlinuz | ||
|
||
compressed/vmlinuz: $(objtree)/vmlinux | ||
@$(MAKE) -f $(src)/compressed/Makefile $(objtree)/vmlinuz | ||
|
||
clean: | ||
rm -f zImage tools/build compressed/vmlinux.out | ||
@$(MAKE) -f $(src)/compressed/Makefile clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# | ||
# lx25/arch/cris/arch-v32/boot/compressed/Makefile | ||
# | ||
# create a compressed vmlinux image from the original vmlinux files and romfs | ||
# | ||
|
||
target = $(target_compressed_dir) | ||
src = $(src_compressed_dir) | ||
|
||
CC = gcc-cris -mlinux -march=v32 -I $(TOPDIR)/include | ||
CFLAGS = -O2 | ||
LD = gcc-cris -mlinux -march=v32 -nostdlib | ||
OBJCOPY = objcopy-cris | ||
OBJCOPYFLAGS = -O binary --remove-section=.bss | ||
OBJECTS = $(target)/head.o $(target)/misc.o | ||
|
||
# files to compress | ||
SYSTEM = $(objtree)/vmlinux.bin | ||
|
||
all: vmlinuz | ||
|
||
$(target)/decompress.bin: $(OBJECTS) | ||
$(LD) -T $(src)/decompress.ld -o $(target)/decompress.o $(OBJECTS) | ||
$(OBJCOPY) $(OBJCOPYFLAGS) $(target)/decompress.o $(target)/decompress.bin | ||
|
||
$(objtree)/vmlinuz: $(target) piggy.img $(target)/decompress.bin | ||
cat $(target)/decompress.bin piggy.img > $(objtree)/vmlinuz | ||
rm -f piggy.img | ||
cp $(objtree)/vmlinuz $(src) | ||
|
||
$(target)/head.o: $(src)/head.S | ||
$(CC) -D__ASSEMBLY__ -c $< -o $@ | ||
|
||
# gzip the kernel image | ||
|
||
piggy.img: $(SYSTEM) | ||
cat $(SYSTEM) | gzip -f -9 > piggy.img | ||
|
||
clean: | ||
rm -f piggy.img $(objtree)/vmlinuz vmlinuz.o decompress.o decompress.bin $(OBJECTS) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Creation of the self-extracting compressed kernel image (vmlinuz) | ||
----------------------------------------------------------------- | ||
$Id: README,v 1.1 2003/08/21 09:37:03 johana Exp $ | ||
|
||
This can be slightly confusing because it's a process with many steps. | ||
|
||
The kernel object built by the arch/etrax100/Makefile, vmlinux, is split | ||
by that makefile into text and data binary files, vmlinux.text and | ||
vmlinux.data. | ||
|
||
Those files together with a ROM filesystem can be catted together and | ||
burned into a flash or executed directly at the DRAM origin. | ||
|
||
They can also be catted together and compressed with gzip, which is what | ||
happens in this makefile. Together they make up piggy.img. | ||
|
||
The decompressor is built into the file decompress.o. It is turned into | ||
the binary file decompress.bin, which is catted together with piggy.img | ||
into the file vmlinuz. It can be executed in an arbitrary place in flash. | ||
|
||
Be careful - it assumes some things about free locations in DRAM. It | ||
assumes the DRAM starts at 0x40000000 and that it is at least 8 MB, | ||
so it puts its code at 0x40700000, and initial stack at 0x40800000. | ||
|
||
-Bjorn |
Oops, something went wrong.