Comments (13)
strange... it works fine here, but I don't get the [sw_hcd0]: platform is usb host
line.
~$ zcat /proc/config.gz | grep HCD
CONFIG_USB_ARCH_HAS_HCD=y
# CONFIG_USB_C67X00_HCD is not set
CONFIG_USB_EHCI_HCD=y
# CONFIG_USB_OXU210HP_HCD is not set
# CONFIG_USB_ISP116X_HCD is not set
# CONFIG_USB_ISP1362_HCD is not set
CONFIG_USB_OHCI_HCD=y
# CONFIG_USB_SL811_HCD is not set
# CONFIG_USB_R8A66597_HCD is not set
CONFIG_USB_SW_SUN4I_HCD=y
CONFIG_USB_SW_SUN4I_HCD0=y
# CONFIG_USB_GADGET_DUMMY_HCD is not set
and
$ dmesg | grep -e hci -e hcd
[ 0.340000] [sw_hcd0]: usb host driver initialize........
[ 1.270000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.280000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.290000] [sw-ehci1]: probe, pdev->name: sw-ehci, pdev->id: 1, sw_ehci: 0xc081098c
[ 1.310000] [sw-ehci1]: open clock
[ 1.330000] [sw-ehci1]: Set USB Power ON
[ 1.340000] sw-ehci sw-ehci.1: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.350000] sw-ehci sw-ehci.1: new USB bus registered, assigned bus number 1
[ 1.370000] sw-ehci sw-ehci.1: irq 39, io mem 0xf1c14000
[ 1.400000] sw-ehci sw-ehci.1: USB 0.0 started, EHCI 1.00
[ 1.400000] ehci_irq: port change detect
[ 1.430000] [sw-ohci1]: probe, pdev->name: sw-ohci, pdev->id: 1, sw_ohci: 0xc0810a9c
[ 1.440000] [sw-ohci1]: open clock
[ 1.470000] sw-ohci sw-ohci.1: SW USB2.0 'Open' Host Controller (OHCI) Driver
[ 1.480000] sw-ohci sw-ohci.1: new USB bus registered, assigned bus number 2
[ 1.490000] sw-ohci sw-ohci.1: irq 64, io mem 0xf1c14400
[ 1.570000] [sw-ehci2]: probe, pdev->name: sw-ehci, pdev->id: 2, sw_ehci: 0xc0810bac
[ 1.590000] [sw-ehci2]: open clock
[ 1.610000] [sw-ehci2]: Set USB Power ON
[ 1.620000] sw-ehci sw-ehci.2: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.630000] sw-ehci sw-ehci.2: new USB bus registered, assigned bus number 3
[ 1.650000] sw-ehci sw-ehci.2: irq 40, io mem 0xf1c1c000
[ 1.750000] usb 1-1: new high speed USB device number 2 using sw-ehci
[ 1.780000] sw-ehci sw-ehci.2: USB 0.0 started, EHCI 1.00
[ 1.780000] ehci_irq: port change detect
[ 1.810000] [sw-ehci2]: sw_usb_disable_ehci
[ 1.810000] [sw-ehci2]: remove, pdev->name: sw-ehci, pdev->id: 2, sw_ehci: 0xc0810bac
[ 1.830000] sw-ehci sw-ehci.2: remove, state 1
[ 1.850000] sw-ehci sw-ehci.2: USB bus 3 deregistered
[ 1.850000] [sw-ehci2]: Set USB Power OFF
[ 1.860000] [sw-ehci2]: close clock
[ 1.870000] [sw-ohci2]: probe, pdev->name: sw-ohci, pdev->id: 2, sw_ohci: 0xc0810cbc
[ 1.880000] [sw-ohci2]: open clock
[ 1.910000] [sw-ohci2]: Set USB Power ON
[ 1.910000] sw-ohci sw-ohci.2: SW USB2.0 'Open' Host Controller (OHCI) Driver
[ 1.930000] sw-ohci sw-ohci.2: new USB bus registered, assigned bus number 3
[ 1.940000] sw-ohci sw-ohci.2: irq 65, io mem 0xf1c1c400
[ 2.020000] [sw-ohci2]: sw_usb_disable_ohci
[ 2.030000] [sw-ohci2]: remove, pdev->name: sw-ohci, pdev->id: 2, sw_ohci: 0xc0810cbc
[ 2.040000] sw-ohci sw-ohci.2: remove, state 1
[ 2.060000] sw-ohci sw-ohci.2: USB bus 3 deregistered
[ 2.070000] [sw-ohci2]: Set USB Power OFF
[ 2.080000] [sw-ohci2]: close clock
[ 52.570000] usb 1-1.3: new low speed USB device number 3 using sw-ehci
[ 52.770000] input: USB Keyboard as /devices/platform/sw-ehci.1/usb1/1-1/1-1.3/1-1.3:1.0/input/input1
[ 52.790000] generic-usb 0003:04D9:1603.0001: input: USB HID v1.10 Keyboard [ USB Keyboard] on usb-sw-ehci-1.3/input0
[ 52.880000] input: USB Keyboard as /devices/platform/sw-ehci.1/usb1/1-1/1-1.3/1-1.3:1.1/input/input2
[ 52.900000] generic-usb 0003:04D9:1603.0002: input: USB HID v1.10 Device [ USB Keyboard] on usb-sw-ehci-1.3/input1
using linaro's gcc 4.6.3
from linux-sunxi.
I'm doing that on a default config.
make ARCH=arm sun4i_crane_defconfig
make ARCH=arm menuconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j3 uImage
But the only difference was I set CONFIG_EARLY_PRINTK=y in menu, otherwise kernel fails silently.
Using linaro's gcc 4.7.1
from linux-sunxi.
Which script.bin are you using?
from linux-sunxi.
It fails right there -- drivers/usb/sun4i_usb/hcd/hcd0/sw_hcd0.c
.
At INIT_WORK call:
static int sw_hcd_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
{
// ..........................
/* Init IRQ workqueue before request_irq */
INIT_WORK(&sw_hcd->irq_work, sw_hcd_irq_work);
/* attach to the IRQ */
if (request_irq(nIrq, sw_hcd->isr, 0, dev_name(dev), sw_hcd)) {
DMSG_PANIC("ERR: request_irq %d failed!\n", nIrq);
status = -ENODEV;
goto fail2;
}
sw_hcd->nIrq = nIrq;
/* FIXME this handles wakeup irqs wrong */
if (enable_irq_wake(nIrq) == 0) {
sw_hcd->irq_wake = 1;
device_init_wakeup(dev, 1);
} else {
sw_hcd->irq_wake = 0;
}
// ..........................
from linux-sunxi.
hno wrote:
Which script.bin are you using?
Original script.bin from Novo7 Elf firmware (passed with bin2fex
> fex2bin
).
3.0.8+ pre-compiled kernel from steev (from flashmydroid) works fine.
from linux-sunxi.
I'm using _OTG to get both usb host and client and I'm not seeing any such failure with my defconfig. I've used an usb mouse successfully.
from linux-sunxi.
I also see a panic in sw_hcd_init_controller. Using Linaro gcc 4.7.1, original script.bin; non-default config, but with the same USB options.
[usb_manager]: CONFIG_USB_SW_SUN4I_USB0_OTG
[sw_hcd0]: usb host driver initialize........
[sw_hcd0]: open_usb_clock
[sw_hcd0]: host_init_state = 0
[sw_hcd0]: platform is usb host
[sw_hcd0]: sw_hcd_init_controller: sw_hcd_host0: USB Host mode controller at f1c13000 using PIO, IRQ 38
<1>Unable to handle kernel paging request at virtual address 0038007b
<1>pgd = c0004000
<1>[0038007b] *pgd=00000000
<0>Internal error: Oops: 5 [#1] PREEMPT
...
[<c029dea0>] (dev_driver_string+0x0/0x38) from [<c029df64>] (__dev_printk+0x20/0x64)
[<c029df64>] (__dev_printk+0x20/0x64) from [<c029dfdc>] (_dev_info+0x34/0x44)
[<c029dfdc>] (_dev_info+0x34/0x44) from [<c02f819c>] (usb_add_hcd+0x24/0x6ac)
[<c02f819c>] (usb_add_hcd+0x24/0x6ac) from [<c043cd50>] (sw_hcd_init_controller.constprop.8+0x394/0x470)
[<c043cd50>] (sw_hcd_init_controller.constprop.8+0x394/0x470) from [<c001ce64>] (sw_hcd_probe+0xdc/0x178)
[<c001ce64>] (sw_hcd_probe+0xdc/0x178) from [<c02a2630>] (platform_drv_probe+0x14/0x18)
[<c02a2630>] (platform_drv_probe+0x14/0x18) from [<c02a1220>] (driver_probe_device+0xac/0x288)
[<c02a1220>] (driver_probe_device+0xac/0x288) from [<c02a1488>] (__driver_attach+0x8c/0x90)
[<c02a1488>] (__driver_attach+0x8c/0x90) from [<c02a0058>] (bus_for_each_dev+0x44/0x8c)
[<c02a0058>] (bus_for_each_dev+0x44/0x8c) from [<c02a0b08>] (bus_add_driver+0x188/0x278)
[<c02a0b08>] (bus_add_driver+0x188/0x278) from [<c02a1964>] (driver_register+0x78/0x148)
[<c02a1964>] (driver_register+0x78/0x148) from [<c02a29c4>] (platform_driver_probe+0x18/0x9c)
[<c02a29c4>] (platform_driver_probe+0x18/0x9c) from [<c002a458>] (do_one_initcall+0xfc/0x164)
[<c002a458>] (do_one_initcall+0xfc/0x164) from [<c0008a54>] (kernel_init+0xac/0x14c)
[<c0008a54>] (kernel_init+0xac/0x14c) from [<c003191c>] (kernel_thread_exit+0x0/0x8)
from linux-sunxi.
can you check with bin2fex if you script.bin isn't corrupted?
from linux-sunxi.
bin2fex script.bin | fex2bin | diff - script.bin
works as expected (fex for perusal.)
from linux-sunxi.
Looiking at the trace from nil-- and looks like there may be some device descriptive information missing, and also looks like a very different issue than Xlab is having.
dev_driver_string() is
drv = ACCESS_ONCE(dev->driver);
return drv ? drv->name :
(dev->bus ? dev->bus->name :
(dev->class ? dev->class->name : ""));
called from __dev_printk (via define_dev_printk_level macro definition of _dev_info)
return printk("%s%s %s: %pV",
KERN_INFO, dev_driver_string(dev), dev_name(dev), vaf);
called from usb_add_hdc()
dev_info(hcd->self.controller, "%s\n", hcd->product_desc);
nil--, what is your USB_SW_SUN4I_USB0_* kernel .config setting? CONFIG_USB_SW_SUN4I_USB0_HOST_ONLY? (default is OTG)
from linux-sunxi.
All CONFIG_USB_SW_
are default, so yes, it's OTG. The oops is from chasing a wild pointer?
from linux-sunxi.
I'm running into a somewhat similar issue. I think I'm duplicating another build pretty closely (the one from http://blog.kernelpicnic.net/), but using the sunxi-3.0 branch on an mk802. The kernel doesn't seem to be panicing, but I do get an error when sw_hcd0.c requests an IRQ it returns an error, and then USB doesn't work. I'll probably try using v3.0.39, but then the only real difference will be the GCC version I'm using (4.7.2) and the fact that I'm building it.
from linux-sunxi.
Could someone test this with latest kernel?
from linux-sunxi.
Related Issues (20)
- GC2035 camera driver is unavailable at sunxi-next ? HOT 1
- sunxi-mmc 1c0f000.mmc: reset err -524 HOT 1
- Allwinner A33 -4.15.0-rc2-ga615204e7 - Logitech mouse - musb_hdrc error
- Best WiFi and Bluetooth IC for Sunxi
- thermal zone failes
- Ethernet and the h3-orangepi dts file HOT 1
- Can't get HDMI out on OrangePi One on sunxi-next HOT 2
- sunxi-next drm can't set unusual resolutions HOT 4
- Mainline: MMC-Error -110 on Vacuum HOT 4
- mainline 5.3-rc3: usb not working in otg mode
- FEL mode repeatedly connects and disconnects. Is this normal? HOT 3
- sunxi-mail seems to be down / unavailable HOT 1
- system can not login( 3.4.113-sun8i #6 )
- fbtft spi lcd not working after update to from 5.10.43 to 5.10.60 HOT 1
- Cedrus on A23
- sunxi-v3s uart1's reg can't operate HOT 2
- Error with toolchain compilation
- Include module kernel/drivers/iio/humidity/dht11.ko
- [Website] Website is down HOT 1
- sun8i-H3 NanoPi Neo Unable to wake from suspend with Power Button
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linux-sunxi.