Au1550 with kernel linux-2.6.28.1
Hi List,
at the moment I run a 2.6.16.11 on this core. Because of some trouble with the USB 2.0 EHCI controller (which is wired on the internal PCI bus) I am thinking about running a more recent kernel.
It was easy to build linux-2.6.28.1 based on the db1550_defconfig using the mips_4KCle-gcc (gcc version 4.0.0 (DENX ELDK 4.1 4.0.0)) toolchain. But I see nothing on the serial console after starting the kernel. Some time ago (10 month I think) I was testing the head of the git mips kernel and the system was booting with some trouble on the pci bus but I was able so see someting on the serial console.
A quick search on this list show me
http://www.linux-mips.org/archives/linux-mips/2008-11/msg00099.html
the last activity on the alchemy chip.
I just want to ask who is working with the au1550 on a more recent kernel than 2.6.16.11.
I'll start now with some early printk to solve booting problems and than we will see .....
Kind regards,
FN
Hallo Frank,
Quoted 10 lines · On Fri, 23 Jan 2009 20:40:00 +0100 Frank Neuber <[email protected]>…
at the moment I run a 2.6.16.11 on this core. Because of some trouble with the USB 2.0 EHCI controller (which is wired on the internal PCI bus) I am thinking about running a more recent kernel.
It was easy to build linux-2.6.28.1 based on thedb1550_defconfigusing the mips_4KCle-gcc (gcc version 4.0.0 (DENX ELDK 4.1 4.0.0)) toolchain. But I see nothing on the serial console after starting the kernel. Some time ago (10 month I think) I was testing the head of the git mips kernel and the system was booting with some trouble on the pci bus but I was able so see someting on the serial console.
Quoted 3 lines
A quick search on this list show me
http://www.linux-mips.org/archives/linux-mips/2008-11/msg00099.html
the last activity on the alchemy chip.
That stuff went in in time for 2.6.29-rc2, so it's unlikely to be the cause of your problems.
Quoted 4 lines
I just want to ask who is working with the au1550 on a more recent kernel than 2.6.16.11.
I'll start now with some early printk to solve booting problems and than we will see .....
I know of at least one person running 2.6.26 or .27 on a Au1550. You should start by throwing away the defconfig ;-). Create a new config with only au1x00 serial and serial console enabled and then add new devices one at a time and see where it breaks.
(Btw, which board? I'd love to get my hands on other alchemy boards to test on).
Thanks!
Manuel Lauss
Hi Manuel,
thank you for your quick response.
Am Samstag, den 24.01.2009, 08:57 +0100 schrieb Manuel Lauss:
Quoted 9 lines
Quoted 4 lines
I just want to ask who is working with the au1550 on a more recent kernel than 2.6.16.11.
I'll start now with some early printk to solve booting problems and than we will see .....I know of at least one person running 2.6.26 or .27 on a Au1550. You should start by throwing away the defconfig ;-). Create a new config with only au1x00 serial and serial console enabled and then add new devices one at a time and see where it breaks.
Yestoday I tested the earlyprintk stuff witout luck :-(
I simply added this CMDLINE earlycon=uart,mmio,0x11100000,115200n8 console=ttyS0,115200n8 panic=1
The drivers/serial/8250_early.o is build in the kernel but without adding CONFIG_EARLY_PRINTK or CONFIG_SYS_HAS_EARLY_PRINTK. Maybe this is the problem.
On the running kernel I see this.
Serial: 8250/16550 driver $Revision: 1.90 $ 5 ports, IRQ sharing enabled serial8250.7: ttyS0 at MMIO 0x11100000 (irq = 0) is a 16550A serial8250.7: ttyS1 at MMIO 0x11200000 (irq = 8) is a 16550A serial8250.7: ttyS2 at MMIO 0x11400000 (irq = 9) is a 16550A The console is console=ttyS0,115200n8 ....
Now I'll go more deep into the kernel.
Quoted 3 lines
(Btw, which board? I'd love to get my hands on other alchemy boards to test on).
It is a customer board not available on the market.
It is possible for you to connect me to this person. Maybe we can share some know how. At the moment I work on USB Analog/DVB stuff more deep on MIPS.
Kind Regards,
Frank
Hi Manuel,
after trying the standard early printk without luck I implemented my own:
printk.c 2009-01-24 23:49:42.000000000 +0100 renamed from printk.c.orig 2009-01-24 23:48:08.000000000 +0100 +22 -0
@@ -481,8 +481,30 @@ _call_console_drivers(start_print, end, msg_level); } +#include <linux/serial_8250.h> +#include <asm/mach-au1x00/au1000.h> + +void serial_putc (const char c) +{ + volatile u32 *uart_lsr = (volatile u32*)(UART0_ADDR+UART_LSR); + volatile u32 *uart_tx = (volatile u32*)(UART0_ADDR+UART_TX); + + if (c == '\n') serial_putc ('\r'); + + /* Wait for fifo to shift out some bytes */ + while((*uart_lsr&UART_LSR_THRE)==0); + + *uart_tx = (u32)c; +} + static void emit_log_char(char c) { +#if 1 + if (c == '\n'){ + serial_putc('\r'); + } + serial_putc(c); +#endif LOG_BUF(log_end) = c; log_end++; if (log_end - log_start > log_buf_len)
The same result, I see nothing :-(
This means I run into trouble in the very early assembler part of the kernel. I know the ARM kernel has some debug features implemented (using the serial port).
Has the mips kernel a comparable debug possebility?
I striped down the defconfig as you sad and start the kernel using uboot:
tc# bootm 0x80500000
## Booting image at 80500000 ...
Image Name: Linux-2.6.28.1 Created: 2009-01-24 21:39:57 UTC Image Type: MIPS Linux Kernel Image (gzip compressed) Data Size: 894213 Bytes = 873.3 kB
Load Address: 80100000
Entry Point: 80104690
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting kernel ...
Could the entry point be the problem? He is very close to the load address. Because I have no JTAG for mips it is not easy to check what is going on here ....
Now I have no idea what can I do next ...
Kind Regards,
Frank
Re: Au1550 with kernel linux-2.6.28.1 (SOLVED)
Hi List,
after a sleepness nigth I got an idea .... Because I need an uImage I had to build a Image first.
The buildprocess of the kernel call this wrong line mips_4KCle-objcopy --remove-section=.reginfo vmlinux arch/mips/boot/Image if I add this rule in the Makefile
$(obj)/Image: $(VMLINUX) FORCE
$(call if_changed,objcopy)
@echo ' Kernel: $@ is ready'
On older kernelversions this works well!
The rigth one is this:
mips_4KCle-objcopy -O binary -R .note -R .comment -S vmlinux arch/mips/boot/Image
I typed the last steps by hand for now and it works
gzip -f -9 < arch/mips/boot/Image > arch/mips/boot/zImage/bin/sh /tmp/linux-2.6.28.1/scripts/mkuboot.sh -A mips -O linux -T kernel -C gzip -a 0x80100000 -e 0x80104690 -n 'Linux-2.6.28.1' -d arch/mips/boot/zImage uImage (keep in mind the -a 0x80100000 -e 0x80104690 parameters are greped from vmlinux withTEXT_ADDR := $(shell awk '/_text/ { printf "0x%s", $$1 ; exit }' < $(TOPDIR)/System.map)ENTRY_ADDR := $(shell awk '/kernel_entry/ { printf "0x%s", $$1 ; exit }' < $(TOPDIR)/System.map)
)
Than I can see my first early printk messages :-) huhuuu
Now I can work on.
BTW: why is uImage not supported by the kernel build system for MIPS?
Regards,
Frank
Au1550 with kernel linux-2.6.28.1 PCI Cardbus mappings too large
Hello again,
as I sad I want to use a USB controller wired on the pci bus. The EHCI Probe (usb_hcd_pci_probe) fails with "controller already in use" error because the request_mem_region gives an error.
I think the Problem is that the CardBus bridge eat the mem. As a refence you can compare the CadrBus mem window on 2.6.28.1 with 2.6.16.11.
At the moment I have no idea how can I fix this resource conflict ...
I found a pcibios_fixup_bus fuction that reorganize the dev->resource[i] values but I'm not sure if this is called during pci init. I'll check this now.
Is there a PCI guru for mips on the list?
Kind regards,
Frank
Kernel 2.6.28.1 output
pci 0000:00:0c.0: PME# supported from D1 D3hot D3cold pci 0000:00:0c.0: PME# disabled
pci 0000:00:0c.1: PME# supported from D1 D3hot D3cold pci 0000:00:0c.1: PME# disabled
pci 0000:00:0c.2: PME# supported from D0 D1 D2 D3hot D3cold pci 0000:00:0c.2: PME# disabled
pci 0000:00:0d.0: PME# supported from D0 D1 D2 D3hot D3cold pci 0000:00:0d.0: PME# disabled
pci 0000:00:0d.1: PME# supported from D0 D1 D2 D3hot D3cold pci 0000:00:0d.1: PME# disabled
pci 0000:00:0c.0: BAR 0: can't allocate mem resource [0x50000000-0x4fffffff]
pci 0000:00:0c.1: BAR 0: can't allocate mem resource [0x50000000-0x4fffffff]
pci 0000:00:0d.0: BAR 0: can't allocate mem resource [0x50000000-0x4fffffff]
pci 0000:00:0d.1: BAR 0: can't allocate mem resource [0x50000000-0x4fffffff]
pci 0000:00:0c.2: BAR 0: can't allocate mem resource [0x50000000-0x4fffffff]
pci 0000:00:0d.0: CardBus bridge, secondary bus 0000:01
pci 0000:00:0d.0: IO window: 0x001000-0x0010ff pci 0000:00:0d.0: IO window: 0x001400-0x0014ff pci 0000:00:0d.0: PREFETCH window: 0x40000000-0x43ffffff pci 0000:00:0d.0: MEM window: 0x44000000-0x47ffffff pci 0000:00:0d.1: CardBus bridge, secondary bus 0000:05 pci 0000:00:0d.1: IO window: 0x001800-0x0018ff pci 0000:00:0d.1: IO window: 0x001c00-0x001cff pci 0000:00:0d.1: PREFETCH window: 0x48000000-0x4bffffff pci 0000:00:0d.1: MEM window: 0x4c000000-0x4fffffff
PCI: Enabling device 0000:00:0d.0 (0000 -> 0003)
PCI: Enabling device 0000:00:0d.1 (0000 -> 0003)
Kernel 2.6.16.11 output
PCI: Bus 1, cardbus bridge: 0000:00:0d.0
IO window: 00001000-000010ff
IO window: 00001400-000014ff
PREFETCH window: 40000000-41ffffff
MEM window: 42000000-43ffffff
PCI: Bus 5, cardbus bridge: 0000:00:0d.1
IO window: 00001800-000018ff
IO window: 00001c00-00001cff
PREFETCH window: 44000000-45ffffff
MEM window: 46000000-47ffffff
PCI: Enabling device 0000:00:0d.0 (0000 -> 0003)
PCI: Setting latency timer of device 0000:00:0d.0 to 64
PCI: Enabling device 0000:00:0d.1 (0000 -> 0003)
PCI: Setting latency timer of device 0000:00:0d.1 to 64
(SOLVED) Re: Au1550 with kernel linux-2.6.28.1 PCI Cardbus mappings too large (SOLVED)
Hi,
I found a woking solution to use my pci wired ehci controller on the au1550 :-)
I did this in drivers/pci/pci.c here is the patch:
drivers/pci/pci.c +1 -1
@@ -29,7 +29,7 @@ int pci_domains_supported = 1;#endif #define DEFAULT_CARDBUS_IO_SIZE (256) -#define DEFAULT_CARDBUS_MEM_SIZE (64*1024*1024) +#define DEFAULT_CARDBUS_MEM_SIZE (32*1024*1024)/* pci=cbmemsize=nnM,cbiosize=nn can override this */ unsigned long pci_cardbus_io_size =DEFAULT_CARDBUS_IO_SIZE ;unsigned long pci_cardbus_mem_size =DEFAULT_CARDBUS_MEM_SIZE ;
Because this code is working on i386 with 64 bit memsize we need a au1550 specific solution.
I don't know how is the rigth way.
Kind Regards,
Frank
Am Montag, den 26.01.2009, 11:21 +0100 schrieb Frank Neuber:
Quoted 70 lines
Hello again,
as I sad I want to use a USB controller wired on the pci bus. The EHCI Probe (usb_hcd_pci_probe) fails with "controller already in use" error because therequest_mem_regiongives an error.I think the Problem is that the CardBus bridge eat the mem. As a refence you can compare the CadrBus mem window on 2.6.28.1 with 2.6.16.11.
At the moment I have no idea how can I fix this resource conflict ...I found a
pcibios_fixup_busfuction that reorganize the dev->resource[i] values but I'm not sure if this is called during pci init. I'll check this now.
Is there a PCI guru for mips on the list?Kind regards,
FrankKernel 2.6.28.1 output
pci 0000:00:0c.0: PME# supported from D1 D3hot D3cold pci 0000:00:0c.0: PME# disabled
pci 0000:00:0c.1: PME# supported from D1 D3hot D3cold pci 0000:00:0c.1: PME# disabled
pci 0000:00:0c.2: PME# supported from D0 D1 D2 D3hot D3cold pci 0000:00:0c.2: PME# disabled
pci 0000:00:0d.0: PME# supported from D0 D1 D2 D3hot D3cold pci 0000:00:0d.0: PME# disabled
pci 0000:00:0d.1: PME# supported from D0 D1 D2 D3hot D3cold pci 0000:00:0d.1: PME# disabled
pci 0000:00:0c.0: BAR 0: can't allocate mem resource [0x50000000-0x4fffffff]
pci 0000:00:0c.1: BAR 0: can't allocate mem resource [0x50000000-0x4fffffff]
pci 0000:00:0d.0: BAR 0: can't allocate mem resource [0x50000000-0x4fffffff]
pci 0000:00:0d.1: BAR 0: can't allocate mem resource [0x50000000-0x4fffffff]
pci 0000:00:0c.2: BAR 0: can't allocate mem resource [0x50000000-0x4fffffff]
pci 0000:00:0d.0: CardBus bridge, secondary bus 0000:01pci 0000:00:0d.0: IO window: 0x001000-0x0010ff pci 0000:00:0d.0: IO window: 0x001400-0x0014ff pci 0000:00:0d.0: PREFETCH window: 0x40000000-0x43ffffff pci 0000:00:0d.0: MEM window: 0x44000000-0x47ffffff pci 0000:00:0d.1: CardBus bridge, secondary bus 0000:05 pci 0000:00:0d.1: IO window: 0x001800-0x0018ff pci 0000:00:0d.1: IO window: 0x001c00-0x001cff pci 0000:00:0d.1: PREFETCH window: 0x48000000-0x4bffffff pci 0000:00:0d.1: MEM window: 0x4c000000-0x4fffffffPCI: Enabling device 0000:00:0d.0 (0000 -> 0003)
PCI: Enabling device 0000:00:0d.1 (0000 -> 0003)Kernel 2.6.16.11 output
PCI: Bus 1, cardbus bridge: 0000:00:0d.0
IO window: 00001000-000010ff
IO window: 00001400-000014ff
PREFETCH window: 40000000-41ffffff
MEM window: 42000000-43ffffff
PCI: Bus 5, cardbus bridge: 0000:00:0d.1
IO window: 00001800-000018ff
IO window: 00001c00-00001cff
PREFETCH window: 44000000-45ffffff
MEM window: 46000000-47ffffff
PCI: Enabling device 0000:00:0d.0 (0000 -> 0003)
PCI: Setting latency timer of device 0000:00:0d.0 to 64
PCI: Enabling device 0000:00:0d.1 (0000 -> 0003)
PCI: Setting latency timer of device 0000:00:0d.1 to 64