Problem with USB on S3C2412

José Miguel Gonçalves <[email protected]>
Newsgroups gmane.linux.ports.arm.general
Message-ID <[email protected]>
Hi,

I'm having a strange problem with a USB host controller on my board with 
a S3C2412.
This board uses the USB port 1, initialized to host. On my machine_init 
code I have:

    s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST |
                  S3C2410_MISCCR_USBSUSPND0 |
                  S3C2410_MISCCR_USBSUSPND1,
                  S3C2410_MISCCR_USBHOST |
                  S3C2410_MISCCR_USBSUSPND0);

I have a RTL8150 USB to Ethernet controller that I use to NFS root. If I 
boot my board passing no info on the Flash chip to kernel, all is OK:


Linux version 2.6.27.38-inov2 (jmpg@st-ze) (gcc version 4.3.4 (GCC) ) #7 
PREEMPT Thu Nov 5 14:01:35 WET 2009
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: SMDK2412
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 4096
free_area_init_node: node 0, pgdat c0211d70, node_mem_map c0227000
  DMA zone: 4064 pages, LIFO batch:0
CPU S3C2412 (id 0x32412001)
S3C2412: core 200.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
usysclk: parent urefclk
i2sclk: parent erefclk
camif-upll: parent usysclk
msysclk: parent mpll
uartclk: parent erefclk
usbsrc: parent usysclk
erefclk: parent xtal
urefclk: parent xtal
S3C2412: DVS is off
Warning: USB bus clock not at 48MHz
S3C2412: upll on, 96.000 MHz, usb-bus 48.000 MHz
CPU0: D VIVT write-back cache
CPU0: I cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4064
Kernel command line: console=ttySAC2 ip=dhcp root=/dev/nfs
irq: clearing subpending status 00000080
PID hash table entries: 64 (order: 6, 256 bytes)
timer tcon=00500000, tcnt a2c1, tcfg 00000200,00000000, usec 00001eb8
console [ttySAC2] enabled
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 16MB = 16MB total
Memory: 14040KB available (1936K code, 150K data, 80K init)
Calibrating delay loop... 99.32 BogoMIPS (lpj=248320)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 288 bytes
NET: Registered protocol family 16
S3C2412: Initialising architecture
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c1800000, irq 33
DMA channel 1 at c1800040, irq 34
DMA channel 2 at c1800080, irq 35
DMA channel 3 at c18000c0, irq 36
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 27
io scheduler noop registered (default)
s3c2412-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2412
s3c2412-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2412
s3c2412-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2412
rtl8150: rtl8150 based usb-ethernet driver v0.6.2 (2004/08/27)
usbcore: registered new interface driver rtl8150
physmap platform flash device: 00800000 at 00000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
RedBoot partition parsing not available
ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
usb 1-2: new full speed USB device using s3c2410-ohci and address 2
usb 1-2: configuration #1 chosen from 1 choice
rtl8150: eth0: rtl8150 is detected
rtl8150: eth0: allmulti set
rtl8150: eth0: allmulti set
Sending DHCP requests ., OK
IP-Config: Got DHCP answer from 10.0.0.1, my address is 10.0.0.10
IP-Config: Complete:
     device=eth0, addr=10.0.0.10, mask=255.255.255.0, gw=10.0.0.1,
     host=10.0.0.10, domain=devel.intranet, nis-domain=(none),
     bootserver=10.0.0.1, rootserver=10.0.0.1, 
rootpath=/home/jmpg/sx-560-ng/rootfs
Looking up port of RPC 100003/2 on 10.0.0.1
Looking up port of RPC 100005/1 on 10.0.0.1
VFS: Mounted root (nfs filesystem).
Freeing init memory: 80K


but if I pass the MTD partitions info in the kernel parameters, the USB 
does not work OK and I'm not able to boot my board because the 
USB/Ethernet adapter does not work:


Linux version 2.6.27.38-inov2 (jmpg@st-ze) (gcc version 4.3.4 (GCC) ) #7 
PREEMPT Thu Nov 5 14:01:35 WET 2009
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: SMDK2412
Memory policy: ECC disabled, Data cache writeback
CPU S3C2412 (id 0x32412001)
S3C2412: core 200.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
usysclk: parent urefclk
i2sclk: parent erefclk
camif-upll: parent usysclk
msysclk: parent mpll
uartclk: parent erefclk
usbsrc: parent usysclk
erefclk: parent xtal
urefclk: parent xtal
S3C2412: DVS is off
Warning: USB bus clock not at 48MHz
S3C2412: upll on, 96.000 MHz, usb-bus 48.000 MHz
CPU0: D VIVT write-back cache
CPU0: I cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4064
Kernel command line: console=ttySAC2 ip=dhcp root=/dev/nfs 
mtdparts=physmap-flash.0:8k(u-boot-lo),8k(u-boot-env),16k(spare),224k(u-boot-hi),1024k(uImage),-(jffs2)
irq: clearing subpending status 00000080
PID hash table entries: 64 (order: 6, 256 bytes)
timer tcon=00500000, tcnt a2c1, tcfg 00000200,00000000, usec 00001eb8
console [ttySAC2] enabled
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 16MB = 16MB total
Memory: 14040KB available (1936K code, 150K data, 80K init)
Calibrating delay loop... 99.32 BogoMIPS (lpj=248320)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 288 bytes
NET: Registered protocol family 16
S3C2412: Initialising architecture
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c1800000, irq 33
DMA channel 1 at c1800040, irq 34
DMA channel 2 at c1800080, irq 35
DMA channel 3 at c18000c0, irq 36
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 27
io scheduler noop registered (default)
s3c2412-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2412
s3c2412-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2412
s3c2412-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2412
rtl8150: rtl8150 based usb-ethernet driver v0.6.2 (2004/08/27)
usbcore: registered new interface driver rtl8150
physmap platform flash device: 00800000 at 00000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
6 cmdlinepart partitions found on MTD device physmap-flash.0
Creating 6 MTD partitions on "physmap-flash.0":
0x00000000-0x00002000 : "u-boot-lo"
0x00002000-0x00004000 : "u-boot-env"
0x00004000-0x00008000 : "spare"
0x00008000-0x00040000 : "u-boot-hi"
mtd: partition "u-boot-hi" doesn't start on an erase block boundary -- 
force read-only
0x00040000-0x00140000 : "uImage"
0x00140000-0x00800000 : "jffs2"
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
usb 1-2: new full speed USB device using s3c2410-ohci and address 2
usb 1-2: config 1 interface 0 altsetting 0 endpoint 0x83 has an invalid 
bInterval 0, changing to 32
usb 1-2: configuration #1 chosen from 1 choice
rtl8150: eth0: rtl8150 is detected
rtl8150: rtl8150_open: intr_urb submit failed: -90
IP-Config: Failed to open eth0
IP-Config: No network devices available.
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
List of all partitions:
1f00          8 mtdblock0 (driver?)
1f01          8 mtdblock1 (driver?)
1f02         16 mtdblock2 (driver?)
1f03        224 mtdblock3 (driver?)
1f04       1024 mtdblock4 (driver?)
1f05       6912 mtdblock5 (driver?)
No filesystem could mount root, tried:
Kernel panic - not syncing: VFS: Unable to mount root fs on 
unknown-block(2,0)


Any ideas?

Regards,
José Gonçalves
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.