linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* beagle hangs in uart3 disabling clocks
@ 2010-10-03  9:04 Ming Lei
  2010-10-03 17:27 ` Premi, Sanjeev
  2010-10-04 15:25 ` Kevin Hilman
  0 siblings, 2 replies; 22+ messages in thread
From: Ming Lei @ 2010-10-03  9:04 UTC (permalink / raw)
  To: Kevin Hilman, linux-omap

Hi,

I just tested pm branch of tony's linux-omap-2.6 tree, and found my
beagle will hang in uart3 disabling clocks, follows the log info:


Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.36-rc6+ (tom@tom-lei) (gcc version 4.3.3 (Sourcery
G++ Lite 2009q1-203) ) #320 PREEM
PT Sun Oct 3 16:46:04 CST 2010
CPU: ARMv7 Processor [411fc082] revision 2 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: OMAP3 Beagle Board
bootconsole [earlycon0] enabled
Memory policy: ECC disabled, Data cache writeback
OMAP3430/3530 ES2.1 (l2cache iva sgx neon isp )
SRAM: Mapped pa 0x40200000 to va 0xfe400000 size: 0x10000
On node 0 totalpages: 32768
free_area_init_node: node 0, pgdat c04a1a00, node_mem_map c06b8000
  Normal zone: 256 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 32512 pages, LIFO batch:7
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: console=ttyO2,115200n8 root=/dev/mmcblk0p2 rw
rootdelay=1 earlyprintk initcall_de
bug=1 loglevel=8
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 123068k/123068k available, 8004k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    vmalloc : 0xc8800000 - 0xf8000000   ( 760 MB)
    lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .init : 0xc0008000 - 0xc0034000   ( 176 kB)
      .text : 0xc0034000 - 0xc046c000   (4320 kB)
      .data : 0xc046c000 - 0xc04a2000   ( 216 kB)
Preemptable hierarchical RCU implementation.
        RCU-based detection of stalled CPUs is disabled.
        Verbose stalled-CPUs detection is disabled.
NR_IRQS:402
omap_hwmod: l3_main: registering
omap_hwmod: l3_main: MPU OCP slave port ID  0
omap_hwmod: l3_main: no MPU register target found
omap_hwmod: l4_core: registering
omap_hwmod: l4_core: MPU OCP slave port ID  0
omap_hwmod: l4_core: no MPU register target found
omap_hwmod: l4_per: registering
omap_hwmod: l4_per: MPU OCP slave port ID  0
omap_hwmod: l4_per: no MPU register target found
omap_hwmod: l4_wkup: registering
omap_hwmod: l4_wkup: MPU OCP slave port ID  0
omap_hwmod: l4_wkup: no MPU register target found
omap_hwmod: mpu: registering
omap_hwmod: iva: registering
omap_hwmod: wd_timer2: registering
omap_hwmod: wd_timer2: MPU OCP slave port ID  0
omap_hwmod: wd_timer2: MPU register target at va fa314000
omap_hwmod: uart1: registering
omap_hwmod: uart1: MPU OCP slave port ID  0
omap_hwmod: uart1: MPU register target at va fa06a000
omap_hwmod: uart2: registering
omap_hwmod: uart2: MPU OCP slave port ID  0
omap_hwmod: uart2: MPU register target at va fa06c000
omap_hwmod: uart3: registering
omap_hwmod: uart3: MPU OCP slave port ID  0
omap_hwmod: uart3: MPU register target at va fb020000
omap_hwmod: i2c1: registering
omap_hwmod: i2c1: MPU OCP slave port ID  0
omap_hwmod: i2c1: MPU register target at va fa070000
omap_hwmod: i2c2: registering
omap_hwmod: i2c2: MPU OCP slave port ID  0
omap_hwmod: i2c2: MPU register target at va fa072000
omap_hwmod: i2c3: registering
omap_hwmod: i2c3: MPU OCP slave port ID  0
omap_hwmod: i2c3: MPU register target at va fa060000
omap_hwmod: sr1_hwmod: registering
omap_hwmod: sr1_hwmod: MPU OCP slave port ID  0
omap_hwmod: sr1_hwmod: MPU register target at va fa0c9000
omap_hwmod: sr2_hwmod: registering
omap_hwmod: sr2_hwmod: MPU OCP slave port ID  0
omap_hwmod: sr2_hwmod: MPU register target at va fa0cb000
Clocking rate (Crystal/Core/MPU): 26.0/332/500 MHz
omap_hwmod: l3_main: looking up clocks
omap_hwmod: l4_core: looking up clocks
omap_hwmod: l4_per: looking up clocks
omap_hwmod: l4_wkup: looking up clocks
omap_hwmod: mpu: looking up clocks
omap_hwmod: iva: looking up clocks
omap_hwmod: wd_timer2: looking up clocks
omap_hwmod: uart1: looking up clocks
omap_hwmod: uart2: looking up clocks
omap_hwmod: uart3: looking up clocks
omap_hwmod: i2c1: looking up clocks
omap_hwmod: i2c2: looking up clocks
omap_hwmod: i2c3: looking up clocks
omap_hwmod: sr1_hwmod: looking up clocks
omap_hwmod: sr1_fck: missing clockdomain for sr1_fck.
omap_hwmod: sr2_hwmod: looking up clocks
omap_hwmod: sr2_fck: missing clockdomain for sr2_fck.
omap_hwmod: l3_main: enabling
omap_hwmod: l3_main: enabling clocks
omap_hwmod: l3_main: idling
omap_hwmod: l3_main: disabling clocks
omap_hwmod: l4_core: enabling
omap_hwmod: l4_core: enabling clocks
omap_hwmod: l4_core: idling
omap_hwmod: l4_core: disabling clocks
omap_hwmod: l4_per: enabling
omap_hwmod: l4_per: enabling clocks
omap_hwmod: l4_per: idling
omap_hwmod: l4_per: disabling clocks
omap_hwmod: l4_wkup: enabling
omap_hwmod: l4_wkup: enabling clocks
omap_hwmod: l4_wkup: idling
omap_hwmod: l4_wkup: disabling clocks
omap_hwmod: mpu: enabling
omap_hwmod: mpu: enabling clocks
omap_hwmod: mpu: idling
omap_hwmod: mpu: disabling clocks
omap_hwmod: iva: enabling
omap_hwmod: iva: enabling clocks
omap_hwmod: iva: idling
omap_hwmod: iva: disabling clocks
omap_hwmod: wd_timer2: enabling
omap_hwmod: wd_timer2: enabling clocks
omap_hwmod: wd_timer2: resetting
omap_hwmod: wd_timer2: softreset in 0 usec
omap_hwmod: wd_timer2: idling
omap_hwmod: wd_timer2: disabling clocks
omap_hwmod: uart1: enabling
omap_hwmod: uart1: enabling clocks
omap_hwmod: uart2: enabling
omap_hwmod: uart2: enabling clocks
omap_hwmod: uart3: enabling
omap_hwmod: uart3: enabling clocks
omap_hwmod: i2c1: enabling
omap_hwmod: i2c1: enabling clocks
omap_hwmod: i2c1: resetting
omap_hwmod: i2c1: softreset in 0 usec
omap_hwmod: i2c1: idling
omap_hwmod: i2c1: disabling clocks
omap_hwmod: i2c2: enabling
omap_hwmod: i2c2: enabling clocks
omap_hwmod: i2c2: resetting
omap_hwmod: i2c2: softreset in 0 usec
omap_hwmod: i2c2: idling
omap_hwmod: i2c2: disabling clocks
omap_hwmod: i2c3: enabling
omap_hwmod: i2c3: enabling clocks
omap_hwmod: i2c3: resetting
omap_hwmod: i2c3: softreset in 0 usec
omap_hwmod: i2c3: idling
omap_hwmod: i2c3: disabling clocks
omap_hwmod: sr1_hwmod: enabling
omap_hwmod: sr1_hwmod: enabling clocks
omap_hwmod: sr1_hwmod: idling
omap_hwmod: sr1_hwmod: disabling clocks
omap_hwmod: sr2_hwmod: enabling
omap_hwmod: sr2_hwmod: enabling clocks
omap_hwmod: sr2_hwmod: idling
omap_hwmod: sr2_hwmod: disabling clocks
Reprogramming SDRC clock to 332000000 Hz
GPMC revision 5.0
IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96 interrupts
Total of 96 interrupts on 1 active controller
OMAP GPIO hardware version 2.5
OMAP clockevent source: GPTIMER12 at 32768 Hz
Console: colour dummy device 80x30
Calibrating delay loop... 471.61 BogoMIPS (lpj=1843200)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
calling  spawn_ksoftirqd+0x0/0x50 @ 1
initcall spawn_ksoftirqd+0x0/0x50 returned 0 after 0 usecs
calling  init_workqueues+0x0/0x234 @ 1
initcall init_workqueues+0x0/0x234 returned 0 after 0 usecs
devtmpfs: initialized
device: 'platform': device_add
PM: Adding info for No Bus:platform
bus: 'platform': registered
Registering sysdev class 'cpu'
calling  init_mmap_min_addr+0x0/0x18 @ 1
initcall init_mmap_min_addr+0x0/0x18 returned 0 after 0 usecs
calling  init_cpufreq_transition_notifier_list+0x0/0x2c @ 1
initcall init_cpufreq_transition_notifier_list+0x0/0x2c returned 0 after 0 usecs
calling  net_ns_init+0x0/0x180 @ 1
initcall net_ns_init+0x0/0x180 returned 0 after 0 usecs
calling  ptrace_break_init+0x0/0x34 @ 1
initcall ptrace_break_init+0x0/0x34 returned 0 after 0 usecs
calling  consistent_init+0x0/0xc0 @ 1
initcall consistent_init+0x0/0xc0 returned 0 after 0 usecs
calling  v6_userpage_init+0x0/0x14 @ 1
initcall v6_userpage_init+0x0/0x14 returned 0 after 0 usecs
calling  omap_voltage_init+0x0/0x4b4 @ 1
vp_latch_vsel: PMIC function to convert voltage in uV to vsel not registered
init_voltageprocessor: vp_latch_vsel failed
vp_latch_vsel: PMIC function to convert voltage in uV to vsel not registered
init_voltageprocessor: vp_latch_vsel failed
initcall omap_voltage_init+0x0/0x4b4 returned 0 after 22888 usecs
calling  omap_pm_runtime_init+0x0/0x9c @ 1
initcall omap_pm_runtime_init+0x0/0x9c returned 0 after 0 usecs
calling  omap_device_init+0x0/0x1c @ 1
device: 'omap': device_add
PM: Adding info for No Bus:omap
initcall omap_device_init+0x0/0x1c returned 0 after 7629 usecs
calling  sysctl_init+0x0/0x24 @ 1
initcall sysctl_init+0x0/0x24 returned 0 after 0 usecs
calling  ksysfs_init+0x0/0xa0 @ 1
initcall ksysfs_init+0x0/0xa0 returned 0 after 0 usecs
calling  init_jiffies_clocksource+0x0/0x1c @ 1
initcall init_jiffies_clocksource+0x0/0x1c returned 0 after 0 usecs
calling  pm_init+0x0/0x7c @ 1
initcall pm_init+0x0/0x7c returned 0 after 0 usecs
calling  init_zero_pfn+0x0/0x3c @ 1
initcall init_zero_pfn+0x0/0x3c returned 0 after 0 usecs
calling  fsnotify_init+0x0/0x2c @ 1
initcall fsnotify_init+0x0/0x2c returned 0 after 0 usecs
calling  filelock_init+0x0/0x4c @ 1
initcall filelock_init+0x0/0x4c returned 0 after 0 usecs
calling  init_misc_binfmt+0x0/0x48 @ 1
initcall init_misc_binfmt+0x0/0x48 returned 0 after 0 usecs
calling  init_script_binfmt+0x0/0x20 @ 1
initcall init_script_binfmt+0x0/0x20 returned 0 after 0 usecs
calling  init_elf_binfmt+0x0/0x20 @ 1
initcall init_elf_binfmt+0x0/0x20 returned 0 after 0 usecs
calling  debugfs_init+0x0/0x68 @ 1
initcall debugfs_init+0x0/0x68 returned 0 after 0 usecs
calling  random32_init+0x0/0x98 @ 1
initcall random32_init+0x0/0x98 returned 0 after 0 usecs
calling  regulator_init+0x0/0x38 @ 1
regulator: core version 0.5
device class 'regulator': registering
initcall regulator_init+0x0/0x38 returned 0 after 7629 usecs
calling  cpufreq_core_init+0x0/0x6c @ 1
initcall cpufreq_core_init+0x0/0x6c returned 0 after 0 usecs
calling  cpuidle_init+0x0/0x34 @ 1
initcall cpuidle_init+0x0/0x34 returned 0 after 0 usecs
calling  sock_init+0x0/0x78 @ 1
initcall sock_init+0x0/0x78 returned 0 after 0 usecs
calling  netpoll_init+0x0/0x2c @ 1
initcall netpoll_init+0x0/0x2c returned 0 after 0 usecs
calling  netlink_proto_init+0x0/0x1a0 @ 1
NET: Registered protocol family 16
initcall netlink_proto_init+0x0/0x1a0 returned 0 after 0 usecs
calling  bdi_class_init+0x0/0x64 @ 1
device class 'bdi': registering
initcall bdi_class_init+0x0/0x64 returned 0 after 0 usecs
calling  kobject_uevent_init+0x0/0x28 @ 1
initcall kobject_uevent_init+0x0/0x28 returned 0 after 0 usecs
calling  gpiolib_sysfs_init+0x0/0xec @ 1
device class 'gpio': registering
device: 'gpiochip0': device_add
PM: Adding info for No Bus:gpiochip0
device: 'gpiochip32': device_add
PM: Adding info for No Bus:gpiochip32
device: 'gpiochip64': device_add
PM: Adding info for No Bus:gpiochip64
device: 'gpiochip96': device_add
PM: Adding info for No Bus:gpiochip96
device: 'gpiochip128': device_add
PM: Adding info for No Bus:gpiochip128
device: 'gpiochip160': device_add
PM: Adding info for No Bus:gpiochip160
initcall gpiolib_sysfs_init+0x0/0xec returned 0 after 45776 usecs
calling  tty_class_init+0x0/0x4c @ 1
device class 'tty': registering
initcall tty_class_init+0x0/0x4c returned 0 after 7629 usecs
calling  vtconsole_class_init+0x0/0xf0 @ 1
device class 'vtconsole': registering
device: 'vtcon0': device_add
PM: Adding info for No Bus:vtcon0
initcall vtconsole_class_init+0x0/0xf0 returned 0 after 7629 usecs
calling  i2c_init+0x0/0x74 @ 1
bus: 'i2c': registered
bus: 'i2c': add driver dummy
initcall i2c_init+0x0/0x74 returned 0 after 0 usecs
calling  customize_machine+0x0/0x2c @ 1
mux: Setting signal mcspi1_clk.gpio171 0x0100 -> 0x011c
mux: Setting signal mcspi1_simo.gpio172 0x0100 -> 0x011c
mux: Setting signal mcspi1_somi.gpio173 0x0100 -> 0x011c
OMAP3 Beagle Rev: Ax/Bx
omap_device: i2c_omap: building with 1 hwmods
omap_device: i2c_omap: counted 4 total resources across 1 hwmods
omap_device: i2c_omap: registering
Registering platform device 'i2c_omap.1'. Parent at omap
device: 'i2c_omap.1': device_add
bus: 'platform': add device i2c_omap.1
PM: Adding info for platform:i2c_omap.1
mux: Setting signal i2c3_scl.i2c3_scl 0x0118 -> 0x0100
mux: Setting signal i2c3_sda.i2c3_sda 0x0118 -> 0x0100
omap_device: i2c_omap: building with 1 hwmods
omap_device: i2c_omap: counted 4 total resources across 1 hwmods
omap_device: i2c_omap: registering
Registering platform device 'i2c_omap.3'. Parent at omap
device: 'i2c_omap.3': device_add
bus: 'platform': add device i2c_omap.3
PM: Adding info for platform:i2c_omap.3
Registering platform device 'leds-gpio'. Parent at platform
device: 'leds-gpio': device_add
bus: 'platform': add device leds-gpio
PM: Adding info for platform:leds-gpio
Registering platform device 'gpio-keys'. Parent at platform
device: 'gpio-keys': device_add
bus: 'platform': add device gpio-keys
PM: Adding info for platform:gpio-keys
Registering platform device 'omapdss'. Parent at platform
device: 'omapdss': device_add
bus: 'platform': add device omapdss
PM: Adding info for platform:omapdss
omap_device: omap-hsuart: building with 1 hwmods
omap_device: omap-hsuart: counted 4 total resources across 1 hwmods
omap_device: omap-hsuart: registering
Registering platform device 'omap-hsuart.0'. Parent at omap
device: 'omap-hsuart.0': device_add
bus: 'platform': add device omap-hsuart.0
PM: Adding info for platform:omap-hsuart.0
omap_hwmod: uart1: idling
omap_hwmod: uart1: disabling clocks
omap_device: omap-hsuart: activating
omap_hwmod: uart1: enabling
omap_hwmod: uart1: enabling clocks
omap_device: omap-hsuart: pm_lat 0: activate: elapsed time 0 nsec
omap_device: omap-hsuart: deactivating
omap_hwmod: uart1: idling
omap_hwmod: uart1: disabling clocks
omap_device: omap-hsuart: pm_lat 0: deactivate: elapsed time 0 nsec
omap_device: omap-hsuart: activating
omap_hwmod: uart1: enabling
omap_hwmod: uart1: enabling clocks
omap_device: omap-hsuart: pm_lat 0: activate: elapsed time 0 nsec
omap_device: omap-hsuart: building with 1 hwmods
omap_device: omap-hsuart: counted 4 total resources across 1 hwmods
omap_device: omap-hsuart: registering
Registering platform device 'omap-hsuart.1'. Parent at omap
device: 'omap-hsuart.1': device_add
bus: 'platform': add device omap-hsuart.1
PM: Adding info for platform:omap-hsuart.1
omap_hwmod: uart2: idling
omap_hwmod: uart2: disabling clocks
omap_device: omap-hsuart: activating
omap_hwmod: uart2: enabling
omap_hwmod: uart2: enabling clocks
omap_device: omap-hsuart: pm_lat 0: activate: elapsed time 0 nsec
omap_device: omap-hsuart: deactivating
omap_hwmod: uart2: idling
omap_hwmod: uart2: disabling clocks
omap_device: omap-hsuart: pm_lat 0: deactivate: elapsed time 0 nsec
omap_device: omap-hsuart: activating
omap_hwmod: uart2: enabling
omap_hwmod: uart2: enabling clocks
omap_device: omap-hsuart: pm_lat 0: activate: elapsed time 0 nsec
omap_device: omap-hsuart: building with 1 hwmods
omap_device: omap-hsuart: counted 4 total resources across 1 hwmods
omap_device: omap-hsuart: registering
Registering platform device 'omap-hsuart.2'. Parent at omap
device: 'omap-hsuart.2': device_add
bus: 'platform': add device omap-hsuart.2
PM: Adding info for platform:omap-hsuart.2
omap_hwmod: uart3: idling
omap_hwmod: uart3: disabling clocks

Texas Instruments X-Loader 1.41
Starting OS Bootloader...


U-Boot 1.3.3 (Jul 10 2008 - 16:33:09)

OMAP3530-GP rev 2, CPU-OPP2 L3-165MHz
OMAP3 Beagle Board + LPDDR/NAND
DRAM:  128 MB
NAND:


-- 
Lei Ming

^ permalink raw reply	[flat|nested] 22+ messages in thread

* RE: beagle hangs in uart3 disabling clocks
  2010-10-03  9:04 beagle hangs in uart3 disabling clocks Ming Lei
@ 2010-10-03 17:27 ` Premi, Sanjeev
  2010-10-04 12:13   ` Ming Lei
  2010-10-04 12:17   ` Pramod
  2010-10-04 15:25 ` Kevin Hilman
  1 sibling, 2 replies; 22+ messages in thread
From: Premi, Sanjeev @ 2010-10-03 17:27 UTC (permalink / raw)
  To: Ming Lei, Kevin Hilman, linux-omap@vger.kernel.org


> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org 
> [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Ming Lei
> Sent: Sunday, October 03, 2010 2:34 PM
> To: Kevin Hilman; linux-omap@vger.kernel.org
> Subject: beagle hangs in uart3 disabling clocks
> 
> Hi,
> 
> I just tested pm branch of tony's linux-omap-2.6 tree, and found my
> beagle will hang in uart3 disabling clocks, follows the log info:
> 
> 
[snip]..[snip]

> 
> Texas Instruments X-Loader 1.41
> Starting OS Bootloader...
> 
> 
> U-Boot 1.3.3 (Jul 10 2008 - 16:33:09)
> 
> OMAP3530-GP rev 2, CPU-OPP2 L3-165MHz
> OMAP3 Beagle Board + LPDDR/NAND
> DRAM:  128 MB
> NAND:

Lei,

Couldn't help noticing the version information for x-loader and
u-boot. Both seem to be quite old...

Could you try update both? May be, there is a dependency...

~sanjeev

> 
> 
> -- 
> Lei Ming
> --
> To unsubscribe from this list: send the line "unsubscribe 
> linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: beagle hangs in uart3 disabling clocks
  2010-10-03 17:27 ` Premi, Sanjeev
@ 2010-10-04 12:13   ` Ming Lei
  2010-10-04 12:17   ` Pramod
  1 sibling, 0 replies; 22+ messages in thread
From: Ming Lei @ 2010-10-04 12:13 UTC (permalink / raw)
  To: Premi, Sanjeev; +Cc: Kevin Hilman, linux-omap@vger.kernel.org

2010/10/4 Premi, Sanjeev <premi@ti.com>:
>
>> -----Original Message-----
>> From: linux-omap-owner@vger.kernel.org
>> [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Ming Lei
>> Sent: Sunday, October 03, 2010 2:34 PM
>> To: Kevin Hilman; linux-omap@vger.kernel.org
>> Subject: beagle hangs in uart3 disabling clocks
>>
>> Hi,
>>
>> I just tested pm branch of tony's linux-omap-2.6 tree, and found my
>> beagle will hang in uart3 disabling clocks, follows the log info:
>>
>>
> [snip]..[snip]
>
>>
>> Texas Instruments X-Loader 1.41
>> Starting OS Bootloader...
>>
>>
>> U-Boot 1.3.3 (Jul 10 2008 - 16:33:09)
>>
>> OMAP3530-GP rev 2, CPU-OPP2 L3-165MHz
>> OMAP3 Beagle Board + LPDDR/NAND
>> DRAM:  128 MB
>> NAND:
>
> Lei,
>
> Couldn't help noticing the version information for x-loader and
> u-boot. Both seem to be quite old...
>
> Could you try update both? May be, there is a dependency...

No difference even update x-load and u-boot with those in the link below:

http://code.google.com/p/beagleboard/wiki/BeagleboardRevC3Validation


thanks,
-- 
Lei Ming
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: beagle hangs in uart3 disabling clocks
  2010-10-03 17:27 ` Premi, Sanjeev
  2010-10-04 12:13   ` Ming Lei
@ 2010-10-04 12:17   ` Pramod
  2010-10-04 12:38     ` Govindraj
  1 sibling, 1 reply; 22+ messages in thread
From: Pramod @ 2010-10-04 12:17 UTC (permalink / raw)
  To: Premi, Sanjeev; +Cc: Ming Lei, Kevin Hilman, linux-omap@vger.kernel.org

Hi Sanjeev,
>> I just tested pm branch of tony's linux-omap-2.6 tree, and found my
>> beagle will hang in uart3 disabling clocks, follows the log info:
>>
>>
> [snip]..[snip]
>
>>
>> Texas Instruments X-Loader 1.41
>> Starting OS Bootloader...
>>
>>
>> U-Boot 1.3.3 (Jul 10 2008 - 16:33:09)
>>
>> OMAP3530-GP rev 2, CPU-OPP2 L3-165MHz
>> OMAP3 Beagle Board + LPDDR/NAND
>> DRAM:  128 MB
>> NAND:
>
> Lei,
>
> Couldn't help noticing the version information for x-loader and
> u-boot. Both seem to be quite old...
>
> Could you try update both? May be, there is a dependency...
>
I am seeing the same issue with console on UART3 on zoom3 board. The 
bootloaders are older. Can you please share a link to latest bootloader 
which will have zoom3 support.

I am using L25_INC3.x android kernel. The board hangs as soon as it 
boots the kernel. Enabling the logs shows us that the hang occurs when 
UART3 clocks are being disabled in omap_hwmod.c as mentioned by Lei 
Ming. Has anyone observed this issue on any of omap boards?

> ~sanjeev
>
>>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: beagle hangs in uart3 disabling clocks
  2010-10-04 12:17   ` Pramod
@ 2010-10-04 12:38     ` Govindraj
  2010-10-04 15:18       ` Ming Lei
  0 siblings, 1 reply; 22+ messages in thread
From: Govindraj @ 2010-10-04 12:38 UTC (permalink / raw)
  To: Pramod; +Cc: Premi, Sanjeev, Ming Lei, Kevin Hilman,
	linux-omap@vger.kernel.org

I tried now on zoom3 with uart3[ttyO2] as console

It boots up fine for me

Logs:

http://pastebin.com/sXR5nYcD

I am using omap2plus_defconfig and lo-master

commit 0882b1455797b0a104978000a622c3f2412e7cf5
Author: Tony Lindgren <tony@atomide.com>
Date:   Fri Oct 1 17:23:48 2010 -0700

    omap: READ CAREFULLY: Fix build after merging in hwmod support for testing


---
Regards,
Govindraj.R



On Mon, Oct 4, 2010 at 5:47 PM, Pramod <pramod.gurav@ti.com> wrote:
> Hi Sanjeev,
>>>
>>> I just tested pm branch of tony's linux-omap-2.6 tree, and found my
>>> beagle will hang in uart3 disabling clocks, follows the log info:
>>>
>>>
>> [snip]..[snip]
>>
>>>
>>> Texas Instruments X-Loader 1.41
>>> Starting OS Bootloader...
>>>
>>>
>>> U-Boot 1.3.3 (Jul 10 2008 - 16:33:09)
>>>
>>> OMAP3530-GP rev 2, CPU-OPP2 L3-165MHz
>>> OMAP3 Beagle Board + LPDDR/NAND
>>> DRAM:  128 MB
>>> NAND:
>>
>> Lei,
>>
>> Couldn't help noticing the version information for x-loader and
>> u-boot. Both seem to be quite old...
>>
>> Could you try update both? May be, there is a dependency...
>>
> I am seeing the same issue with console on UART3 on zoom3 board. The
> bootloaders are older. Can you please share a link to latest bootloader
> which will have zoom3 support.
>
> I am using L25_INC3.x android kernel. The board hangs as soon as it boots
> the kernel. Enabling the logs shows us that the hang occurs when UART3
> clocks are being disabled in omap_hwmod.c as mentioned by Lei Ming. Has
> anyone observed this issue on any of omap boards?
>
>> ~sanjeev
>>
>>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: beagle hangs in uart3 disabling clocks
  2010-10-04 12:38     ` Govindraj
@ 2010-10-04 15:18       ` Ming Lei
  2010-10-04 15:44         ` Kevin Hilman
  0 siblings, 1 reply; 22+ messages in thread
From: Ming Lei @ 2010-10-04 15:18 UTC (permalink / raw)
  To: Govindraj
  Cc: Pramod, Premi, Sanjeev, Kevin Hilman, linux-omap@vger.kernel.org

2010/10/4 Govindraj <govindraj.ti@gmail.com>:
> I tried now on zoom3 with uart3[ttyO2] as console
>
> It boots up fine for me
>
> Logs:
>
> http://pastebin.com/sXR5nYcD
>
> I am using omap2plus_defconfig and lo-master
>
> commit 0882b1455797b0a104978000a622c3f2412e7cf5
> Author: Tony Lindgren <tony@atomide.com>
> Date:   Fri Oct 1 17:23:48 2010 -0700
>
>    omap: READ CAREFULLY: Fix build after merging in hwmod support for testing

Seems you are trying the master branch of Tony's linux-omap-2.6 tree, could you
try the pm branch of the tree?


thanks,
-- 
Lei Ming
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: beagle hangs in uart3 disabling clocks
  2010-10-03  9:04 beagle hangs in uart3 disabling clocks Ming Lei
  2010-10-03 17:27 ` Premi, Sanjeev
@ 2010-10-04 15:25 ` Kevin Hilman
  1 sibling, 0 replies; 22+ messages in thread
From: Kevin Hilman @ 2010-10-04 15:25 UTC (permalink / raw)
  To: Ming Lei; +Cc: linux-omap

Ming Lei <tom.leiming@gmail.com> writes:

> I just tested pm branch of tony's linux-omap-2.6 tree, and found my
> beagle will hang in uart3 disabling clocks, follows the log info:

It greatly helps when you also state what defconfig you're using, and
what you've changed from the default defconfig.

... more below...

> Starting kernel ...
>
> Uncompressing Linux... done, booting the kernel.
> Linux version 2.6.36-rc6+ (tom@tom-lei) (gcc version 4.3.3 (Sourcery
> G++ Lite 2009q1-203) ) #320 PREEM
> PT Sun Oct 3 16:46:04 CST 2010
> CPU: ARMv7 Processor [411fc082] revision 2 (ARMv7), cr=10c53c7f
> CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
> Machine: OMAP3 Beagle Board
> bootconsole [earlycon0] enabled
> Memory policy: ECC disabled, Data cache writeback
> OMAP3430/3530 ES2.1 (l2cache iva sgx neon isp )
> SRAM: Mapped pa 0x40200000 to va 0xfe400000 size: 0x10000
> On node 0 totalpages: 32768
> free_area_init_node: node 0, pgdat c04a1a00, node_mem_map c06b8000
>   Normal zone: 256 pages used for memmap
>   Normal zone: 0 pages reserved
>   Normal zone: 32512 pages, LIFO batch:7
> Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
> Kernel command line: console=ttyO2,115200n8 root=/dev/mmcblk0p2 rw
> rootdelay=1 earlyprintk initcall_de
> bug=1 loglevel=8
> PID hash table entries: 512 (order: -1, 2048 bytes)
> Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
> Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
> Memory: 128MB = 128MB total
> Memory: 123068k/123068k available, 8004k reserved, 0K highmem
> Virtual kernel memory layout:
>     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
>     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
>     DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
>     vmalloc : 0xc8800000 - 0xf8000000   ( 760 MB)
>     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
>     modules : 0xbf000000 - 0xc0000000   (  16 MB)
>       .init : 0xc0008000 - 0xc0034000   ( 176 kB)
>       .text : 0xc0034000 - 0xc046c000   (4320 kB)
>       .data : 0xc046c000 - 0xc04a2000   ( 216 kB)
> Preemptable hierarchical RCU implementation.
>         RCU-based detection of stalled CPUs is disabled.
>         Verbose stalled-CPUs detection is disabled.
> NR_IRQS:402
> omap_hwmod: l3_main: registering

You've manually done a '#define DEBUG' in omap_hwmod.c.  This does not
work well with UART hwmods, especially when using a UART console and
using DEBUG_LL + earlyprintk.

[...]

> omap_hwmod: uart2: idling
> omap_hwmod: uart2: disabling clocks
> omap_device: omap-hsuart: activating
> omap_hwmod: uart2: enabling
> omap_hwmod: uart2: enabling clocks
> omap_device: omap-hsuart: pm_lat 0: activate: elapsed time 0 nsec
> omap_device: omap-hsuart: deactivating
> omap_hwmod: uart2: idling
> omap_hwmod: uart2: disabling clocks
> omap_device: omap-hsuart: pm_lat 0: deactivate: elapsed time 0 nsec
> omap_device: omap-hsuart: activating
> omap_hwmod: uart2: enabling
> omap_hwmod: uart2: enabling clocks
> omap_device: omap-hsuart: pm_lat 0: activate: elapsed time 0 nsec
> omap_device: omap-hsuart: building with 1 hwmods
> omap_device: omap-hsuart: counted 4 total resources across 1 hwmods
> omap_device: omap-hsuart: registering
> Registering platform device 'omap-hsuart.2'. Parent at omap
> device: 'omap-hsuart.2': device_add
> bus: 'platform': add device omap-hsuart.2
> PM: Adding info for platform:omap-hsuart.2
> omap_hwmod: uart3: idling
> omap_hwmod: uart3: disabling clocks

Remember UART3 is your serial console.  

Basically, what is happening is that the hwmod is trying to print debug
messages for all hwmod changes.  As soon as UART3 is disabled, the
printing will fail since that is your console, so as soon as uart3
clocks are disabled, there is a fault when the polling-mode serial
driver (used for earlyprintk) tries to access the UART, and you hang.

Kevin




^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: beagle hangs in uart3 disabling clocks
  2010-10-04 15:18       ` Ming Lei
@ 2010-10-04 15:44         ` Kevin Hilman
  2010-10-04 16:17           ` Ming Lei
  0 siblings, 1 reply; 22+ messages in thread
From: Kevin Hilman @ 2010-10-04 15:44 UTC (permalink / raw)
  To: Ming Lei; +Cc: Govindraj, Pramod, Premi, Sanjeev, linux-omap@vger.kernel.org

Ming Lei <tom.leiming@gmail.com> writes:

> 2010/10/4 Govindraj <govindraj.ti@gmail.com>:
>> I tried now on zoom3 with uart3[ttyO2] as console
>>
>> It boots up fine for me
>>
>> Logs:
>>
>> http://pastebin.com/sXR5nYcD
>>
>> I am using omap2plus_defconfig and lo-master
>>
>> commit 0882b1455797b0a104978000a622c3f2412e7cf5
>> Author: Tony Lindgren <tony@atomide.com>
>> Date:   Fri Oct 1 17:23:48 2010 -0700
>>
>>    omap: READ CAREFULLY: Fix build after merging in hwmod support for testing
>
> Seems you are trying the master branch of Tony's linux-omap-2.6 tree, could you
> try the pm branch of the tree?

Why?  What do you need from the PM branch that is not in l-o master?

The PM branch is *experimental*, and is under significant change while
parts that are not yet ready for mainline are being reworked and in some
cases completely re-written.

IOW, the PM branch is unstable and should not be trusted.  (I can say
that, I am the maintainer.)  ;)

Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: beagle hangs in uart3 disabling clocks
  2010-10-04 15:44         ` Kevin Hilman
@ 2010-10-04 16:17           ` Ming Lei
  2010-10-04 18:54             ` Kevin Hilman
  0 siblings, 1 reply; 22+ messages in thread
From: Ming Lei @ 2010-10-04 16:17 UTC (permalink / raw)
  To: Kevin Hilman
  Cc: Govindraj, Pramod, Premi, Sanjeev, linux-omap@vger.kernel.org

2010/10/4 Kevin Hilman <khilman@deeprootsystems.com>:
>
> Why?  What do you need from the PM branch that is not in l-o master?

Seems master branch works fine for me, my beagle board doesn't hang
uart3 disabling clocks.

I only want to have a try of the runtime pm feature of omap3, so use
PM branch to do the test.

>
> The PM branch is *experimental*, and is under significant change while
> parts that are not yet ready for mainline are being reworked and in some
> cases completely re-written.
>
> IOW, the PM branch is unstable and should not be trusted.  (I can say
> that, I am the maintainer.)  ;)

I see now, :-)

-- 
Lei Ming
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: beagle hangs in uart3 disabling clocks
  2010-10-04 16:17           ` Ming Lei
@ 2010-10-04 18:54             ` Kevin Hilman
  2010-10-05  5:36               ` Ming Lei
  0 siblings, 1 reply; 22+ messages in thread
From: Kevin Hilman @ 2010-10-04 18:54 UTC (permalink / raw)
  To: Ming Lei; +Cc: Govindraj, Pramod, Premi, Sanjeev, linux-omap@vger.kernel.org

Ming Lei <tom.leiming@gmail.com> writes:

> 2010/10/4 Kevin Hilman <khilman@deeprootsystems.com>:
>>
>> Why?  What do you need from the PM branch that is not in l-o master?
>
> Seems master branch works fine for me, my beagle board doesn't hang
> uart3 disabling clocks.

Master branch and PM branch have exactly the same functionality for
UART hwmods.  The problem was that you manually enabled DEBUG in
omap_hwmod.c.

> I only want to have a try of the runtime pm feature of omap3, so use
> PM branch to do the test.

master branch and PM branch have exactly the same functionality for
runtime PM

Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: beagle hangs in uart3 disabling clocks
  2010-10-04 18:54             ` Kevin Hilman
@ 2010-10-05  5:36               ` Ming Lei
  2010-10-05  6:14                 ` Paul Walmsley
  0 siblings, 1 reply; 22+ messages in thread
From: Ming Lei @ 2010-10-05  5:36 UTC (permalink / raw)
  To: Kevin Hilman
  Cc: Govindraj, Pramod, Premi, Sanjeev, linux-omap@vger.kernel.org

2010/10/5 Kevin Hilman <khilman@deeprootsystems.com>:
> Ming Lei <tom.leiming@gmail.com> writes:
>
>> 2010/10/4 Kevin Hilman <khilman@deeprootsystems.com>:
>>>
>>> Why?  What do you need from the PM branch that is not in l-o master?
>>
>> Seems master branch works fine for me, my beagle board doesn't hang
>> uart3 disabling clocks.
>
> Master branch and PM branch have exactly the same functionality for
> UART hwmods.  The problem was that you manually enabled DEBUG in
> omap_hwmod.c.

Yes, you are correct. If DEBUG in omap_hwmod.c is enabled manually,
and pass the parameter of 'earlyprintk loglevel=8' to kernel from bootloader,
this issue can be triggered even with master branch.

>
>> I only want to have a try of the runtime pm feature of omap3, so use
>> PM branch to do the test.
>
> master branch and PM branch have exactly the same functionality for
> runtime PM

Thanks for letting me know it.

thanks,
-- 
Lei Ming
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: beagle hangs in uart3 disabling clocks
  2010-10-05  5:36               ` Ming Lei
@ 2010-10-05  6:14                 ` Paul Walmsley
  2010-10-05  6:47                   ` Ming Lei
  2010-10-05  7:13                   ` Pramod
  0 siblings, 2 replies; 22+ messages in thread
From: Paul Walmsley @ 2010-10-05  6:14 UTC (permalink / raw)
  To: Ming Lei
  Cc: Kevin Hilman, Govindraj, Pramod, Premi, Sanjeev,
	linux-omap@vger.kernel.org

[-- Attachment #1: Type: TEXT/PLAIN, Size: 5972 bytes --]

Hello Lei,

On Tue, 5 Oct 2010, Ming Lei wrote:

> 2010/10/5 Kevin Hilman <khilman@deeprootsystems.com>:
> > Ming Lei <tom.leiming@gmail.com> writes:
> >
> >> 2010/10/4 Kevin Hilman <khilman@deeprootsystems.com>:
> >>>
> >>> Why?  What do you need from the PM branch that is not in l-o master?
> >>
> >> Seems master branch works fine for me, my beagle board doesn't hang
> >> uart3 disabling clocks.
> >
> > Master branch and PM branch have exactly the same functionality for
> > UART hwmods.  The problem was that you manually enabled DEBUG in
> > omap_hwmod.c.
> 
> Yes, you are correct. If DEBUG in omap_hwmod.c is enabled manually,
> and pass the parameter of 'earlyprintk loglevel=8' to kernel from bootloader,
> this issue can be triggered even with master branch.

Does this experimental patch solve the problem, even if DEBUG is enabled 
in the hwmod code?


- Paul

From d928bd31c9c4ad16a044b244ef3d2ad3ed648f6f Mon Sep 17 00:00:00 2001
From: Paul Walmsley <paul@pwsan.com>
Date: Tue, 5 Oct 2010 00:11:27 -0600
Subject: [PATCH] RFC: omap serial: block console output while resetting earlyconsole UART

Currently, no attempt is made to block console output while the
earlyconsole UART is unavailable.  This can result in silent crashes
that are very difficult to debug due to the lack of console output.
This patch holds the console semaphore while resetting the active console
UART, which causes all console output during that time to be buffered and
then transmitted after the console semaphore is released.

Not-yet-signed-off-by: Paul Walmsley <paul@pwsan.com>
---
 arch/arm/mach-omap2/serial.c |  100 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 100 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 338e46a..577f8f9 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -28,10 +28,13 @@
 #include <linux/serial_8250.h>
 #include <linux/pm_runtime.h>
 
+#include <linux/console.h>
+
 #ifdef CONFIG_SERIAL_OMAP
 #include <plat/omap-serial.h>
 #endif
 
+#include <plat/serial.h>
 #include <plat/common.h>
 #include <plat/board.h>
 #include <plat/clock.h>
@@ -39,6 +42,8 @@
 #include <plat/omap_hwmod.h>
 #include <plat/omap_device.h>
 
+#include <asm/memory.h>
+
 #include "prm.h"
 #include "pm.h"
 #include "cm.h"
@@ -51,6 +56,8 @@
 #define UART_ERRATA_FIFO_FULL_ABORT	(0x1 << 0)
 #define UART_ERRATA_i202_MDR1_ACCESS	(0x1 << 1)
 
+#define uart_id_to_ttys_id(u)		(u - 1)
+
 /*
  * NOTE: By default the serial timeout is disabled as it causes lost characters
  * over the serial ports. This means that the UART clocks will stay on until
@@ -106,6 +113,83 @@ static LIST_HEAD(uart_list);
 static u8 num_uarts;
 
 /*
+ * early_console_uart: if earlyconsole is enabled and active, the UART
+ * ID (e.g., 1, 2, 3, 4) will be stored here.  '0' means earlyconsole
+ * is disabled or some problem occurred during earlyconsole handling.
+ */
+static int early_console_uart;
+
+#define for_each_console(con) \
+	for (con = console_drivers; con != NULL; con = con->next)
+
+/* XXX belongs in kernel/printk.c or some earlyconsole file */
+/* XXX The "earlycon" string is an ugly hack */
+int _is_early_console_enabled(void)
+{
+	int ret = 0;
+	struct console *c;
+
+	acquire_console_sem();
+	for_each_console(c)
+		if (!strcmp("earlycon", c->name))
+			ret = 1;
+	release_console_sem();
+
+	return ret;
+}
+
+/* XXX document */
+static int _get_early_console_uart(void)
+{
+	u32 v;
+	int u = -EINVAL;
+
+	v = __raw_readl(phys_to_virt(OMAP_UART_INFO));
+	/* XXX see the OMAP debug-macro.S for this table */
+	switch (v) {
+	case 0:
+	case OMAP2UART1:
+		u = 1;
+		break;
+	case OMAP2UART2:
+		u = 2;
+		break;
+	case OMAP2UART3:
+	case OMAP3UART3:
+	case OMAP4UART3:
+		u = 3;
+		break;
+	case OMAP3UART4:
+	case OMAP4UART4:
+		u = 4;
+		break;
+	case ZOOM_UART:
+		WARN(1, "omap serial: ZOOM UART in use - does that go through "
+		     "the OMAP serial code?\n");
+		break;
+	default:
+		WARN(1, "omap serial: unknown serial port in use!\n");
+	}
+
+	return u;
+}
+
+/* XXX document */
+static void _store_early_console_uart_id(void)
+{
+	int uart_id;
+
+	if (_is_early_console_enabled()) {
+		uart_id = _get_early_console_uart();
+		if (uart_id > 0) {
+			early_console_uart = uart_id;
+			pr_info("omap serial: early console active on UART%d (ttyS%d)\n",
+				uart_id, uart_id_to_ttys_id(uart_id));
+		}
+	}
+}
+
+/*
  * Since these idle/enable hooks are used in the idle path itself
  * which has interrupts disabled, use the non-locking versions of
  * the hwmod enable/disable functions.
@@ -801,6 +885,17 @@ void __init omap_serial_init_port(int port)
 	oh->dev_attr = uart;
 
 	/*
+	 * XXX How do we know whether the console is on this UART or not?
+	 * We should only call acquire_console_sem() if the console is on
+	 * this UART.
+	 *
+	 * Of course, the console is not the only thing that could be using
+	 * this UART.
+	 */
+	if (uart->num == uart_id_to_ttys_id(early_console_uart))
+		acquire_console_sem();
+
+	/*
 	 * Because of early UART probing, UART did not get idled
 	 * on init.  Now that omap_device is ready, ensure full idle
 	 * before doing omap_device_enable().
@@ -824,6 +919,9 @@ void __init omap_serial_init_port(int port)
 	omap_uart_block_sleep(uart);
 	uart->timeout = DEFAULT_TIMEOUT;
 
+	if (uart->num == uart_id_to_ttys_id(early_console_uart))
+		release_console_sem();
+
 	if ((cpu_is_omap34xx() && uart->padconf) ||
 	    (uart->wk_en && uart->wk_mask)) {
 		device_init_wakeup(&od->pdev.dev, true);
@@ -846,6 +944,8 @@ void __init omap_serial_init(void)
 {
 	struct omap_uart_state *uart;
 
+	_store_early_console_uart_id();
+
 	list_for_each_entry(uart, &uart_list, node)
 		omap_serial_init_port(uart->num);
 }
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: beagle hangs in uart3 disabling clocks
  2010-10-05  6:14                 ` Paul Walmsley
@ 2010-10-05  6:47                   ` Ming Lei
  2010-10-05  7:13                   ` Pramod
  1 sibling, 0 replies; 22+ messages in thread
From: Ming Lei @ 2010-10-05  6:47 UTC (permalink / raw)
  To: Paul Walmsley
  Cc: Kevin Hilman, Govindraj, Pramod, Premi, Sanjeev,
	linux-omap@vger.kernel.org

Hi Paul,

2010/10/5 Paul Walmsley <paul@pwsan.com>:
> Hello Lei,
>
> On Tue, 5 Oct 2010, Ming Lei wrote:
>
>> 2010/10/5 Kevin Hilman <khilman@deeprootsystems.com>:
>> > Ming Lei <tom.leiming@gmail.com> writes:
>> >
>> >> 2010/10/4 Kevin Hilman <khilman@deeprootsystems.com>:
>> >>>
>> >>> Why?  What do you need from the PM branch that is not in l-o master?
>> >>
>> >> Seems master branch works fine for me, my beagle board doesn't hang
>> >> uart3 disabling clocks.
>> >
>> > Master branch and PM branch have exactly the same functionality for
>> > UART hwmods.  The problem was that you manually enabled DEBUG in
>> > omap_hwmod.c.
>>
>> Yes, you are correct. If DEBUG in omap_hwmod.c is enabled manually,
>> and pass the parameter of 'earlyprintk loglevel=8' to kernel from bootloader,
>> this issue can be triggered even with master branch.
>
> Does this experimental patch solve the problem, even if DEBUG is enabled
> in the hwmod code?
>
>
> - Paul
>
> From d928bd31c9c4ad16a044b244ef3d2ad3ed648f6f Mon Sep 17 00:00:00 2001
> From: Paul Walmsley <paul@pwsan.com>
> Date: Tue, 5 Oct 2010 00:11:27 -0600
> Subject: [PATCH] RFC: omap serial: block console output while resetting earlyconsole UART
>
> Currently, no attempt is made to block console output while the
> earlyconsole UART is unavailable.  This can result in silent crashes
> that are very difficult to debug due to the lack of console output.
> This patch holds the console semaphore while resetting the active console
> UART, which causes all console output during that time to be buffered and
> then transmitted after the console semaphore is released.

Good works, this patch does fix the issue!

With the patch, even DEBUG in omap_hwmod.c is enabled manually
and 'earlyprintk loglevel=8' is passed to kernel, my beagle board can't
hang after 'uart3: disabling clocks' is printed.

>
> Not-yet-signed-off-by: Paul Walmsley <paul@pwsan.com>
> ---
>  arch/arm/mach-omap2/serial.c |  100 ++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 100 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index 338e46a..577f8f9 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -28,10 +28,13 @@
>  #include <linux/serial_8250.h>
>  #include <linux/pm_runtime.h>
>
> +#include <linux/console.h>
> +
>  #ifdef CONFIG_SERIAL_OMAP
>  #include <plat/omap-serial.h>
>  #endif
>
> +#include <plat/serial.h>
>  #include <plat/common.h>
>  #include <plat/board.h>
>  #include <plat/clock.h>
> @@ -39,6 +42,8 @@
>  #include <plat/omap_hwmod.h>
>  #include <plat/omap_device.h>
>
> +#include <asm/memory.h>
> +
>  #include "prm.h"
>  #include "pm.h"
>  #include "cm.h"
> @@ -51,6 +56,8 @@
>  #define UART_ERRATA_FIFO_FULL_ABORT    (0x1 << 0)
>  #define UART_ERRATA_i202_MDR1_ACCESS   (0x1 << 1)
>
> +#define uart_id_to_ttys_id(u)          (u - 1)
> +
>  /*
>  * NOTE: By default the serial timeout is disabled as it causes lost characters
>  * over the serial ports. This means that the UART clocks will stay on until
> @@ -106,6 +113,83 @@ static LIST_HEAD(uart_list);
>  static u8 num_uarts;
>
>  /*
> + * early_console_uart: if earlyconsole is enabled and active, the UART
> + * ID (e.g., 1, 2, 3, 4) will be stored here.  '0' means earlyconsole
> + * is disabled or some problem occurred during earlyconsole handling.
> + */
> +static int early_console_uart;
> +
> +#define for_each_console(con) \
> +       for (con = console_drivers; con != NULL; con = con->next)
> +
> +/* XXX belongs in kernel/printk.c or some earlyconsole file */
> +/* XXX The "earlycon" string is an ugly hack */
> +int _is_early_console_enabled(void)
> +{
> +       int ret = 0;
> +       struct console *c;
> +
> +       acquire_console_sem();
> +       for_each_console(c)
> +               if (!strcmp("earlycon", c->name))
> +                       ret = 1;
> +       release_console_sem();
> +
> +       return ret;
> +}
> +
> +/* XXX document */
> +static int _get_early_console_uart(void)
> +{
> +       u32 v;
> +       int u = -EINVAL;
> +
> +       v = __raw_readl(phys_to_virt(OMAP_UART_INFO));
> +       /* XXX see the OMAP debug-macro.S for this table */
> +       switch (v) {
> +       case 0:
> +       case OMAP2UART1:
> +               u = 1;
> +               break;
> +       case OMAP2UART2:
> +               u = 2;
> +               break;
> +       case OMAP2UART3:
> +       case OMAP3UART3:
> +       case OMAP4UART3:
> +               u = 3;
> +               break;
> +       case OMAP3UART4:
> +       case OMAP4UART4:
> +               u = 4;
> +               break;
> +       case ZOOM_UART:
> +               WARN(1, "omap serial: ZOOM UART in use - does that go through "
> +                    "the OMAP serial code?\n");
> +               break;
> +       default:
> +               WARN(1, "omap serial: unknown serial port in use!\n");
> +       }
> +
> +       return u;
> +}
> +
> +/* XXX document */
> +static void _store_early_console_uart_id(void)
> +{
> +       int uart_id;
> +
> +       if (_is_early_console_enabled()) {
> +               uart_id = _get_early_console_uart();
> +               if (uart_id > 0) {
> +                       early_console_uart = uart_id;
> +                       pr_info("omap serial: early console active on UART%d (ttyS%d)\n",
> +                               uart_id, uart_id_to_ttys_id(uart_id));
> +               }
> +       }
> +}
> +
> +/*
>  * Since these idle/enable hooks are used in the idle path itself
>  * which has interrupts disabled, use the non-locking versions of
>  * the hwmod enable/disable functions.
> @@ -801,6 +885,17 @@ void __init omap_serial_init_port(int port)
>        oh->dev_attr = uart;
>
>        /*
> +        * XXX How do we know whether the console is on this UART or not?
> +        * We should only call acquire_console_sem() if the console is on
> +        * this UART.
> +        *
> +        * Of course, the console is not the only thing that could be using
> +        * this UART.
> +        */
> +       if (uart->num == uart_id_to_ttys_id(early_console_uart))
> +               acquire_console_sem();
> +
> +       /*
>         * Because of early UART probing, UART did not get idled
>         * on init.  Now that omap_device is ready, ensure full idle
>         * before doing omap_device_enable().
> @@ -824,6 +919,9 @@ void __init omap_serial_init_port(int port)
>        omap_uart_block_sleep(uart);
>        uart->timeout = DEFAULT_TIMEOUT;
>
> +       if (uart->num == uart_id_to_ttys_id(early_console_uart))
> +               release_console_sem();
> +
>        if ((cpu_is_omap34xx() && uart->padconf) ||
>            (uart->wk_en && uart->wk_mask)) {
>                device_init_wakeup(&od->pdev.dev, true);
> @@ -846,6 +944,8 @@ void __init omap_serial_init(void)
>  {
>        struct omap_uart_state *uart;
>
> +       _store_early_console_uart_id();
> +
>        list_for_each_entry(uart, &uart_list, node)
>                omap_serial_init_port(uart->num);
>  }
> --
> 1.7.1
>


thanks,
-- 
Lei Ming
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: beagle hangs in uart3 disabling clocks
  2010-10-05  6:14                 ` Paul Walmsley
  2010-10-05  6:47                   ` Ming Lei
@ 2010-10-05  7:13                   ` Pramod
  2010-10-05  7:19                     ` Paul Walmsley
  1 sibling, 1 reply; 22+ messages in thread
From: Pramod @ 2010-10-05  7:13 UTC (permalink / raw)
  To: Paul Walmsley
  Cc: Ming Lei, Kevin Hilman, Govindraj, Premi, Sanjeev,
	linux-omap@vger.kernel.org

On Tuesday 05 October 2010 11:44 AM, Paul Walmsley wrote:
> Hello Lei,
>
> On Tue, 5 Oct 2010, Ming Lei wrote:
>
>> 2010/10/5 Kevin Hilman<khilman@deeprootsystems.com>:
>>> Ming Lei<tom.leiming@gmail.com>  writes:
>>>
>>>> 2010/10/4 Kevin Hilman<khilman@deeprootsystems.com>:
>>>>>
>>>>> Why?  What do you need from the PM branch that is not in l-o master?
>>>>
>>>> Seems master branch works fine for me, my beagle board doesn't hang
>>>> uart3 disabling clocks.
>>>
>>> Master branch and PM branch have exactly the same functionality for
>>> UART hwmods.  The problem was that you manually enabled DEBUG in
>>> omap_hwmod.c.
>>
>> Yes, you are correct. If DEBUG in omap_hwmod.c is enabled manually,
>> and pass the parameter of 'earlyprintk loglevel=8' to kernel from bootloader,
>> this issue can be triggered even with master branch.
>
> Does this experimental patch solve the problem, even if DEBUG is enabled
> in the hwmod code?
>
>
> - Paul

Hi Paul,

I applied this patch on my kernel which is based on android-2.6.32 
enabling dynamic printks. I still see the console hang after enabling 
the logs in hwmod.

I am using zoom3 board. Can you please let me know which defconfig from 
lo master branch can be used to test on zoom3? I would like to test this 
patch with lo master branch and zoom3.


Thanks,
Pramod

>
>  From d928bd31c9c4ad16a044b244ef3d2ad3ed648f6f Mon Sep 17 00:00:00 2001
> From: Paul Walmsley<paul@pwsan.com>
> Date: Tue, 5 Oct 2010 00:11:27 -0600
> Subject: [PATCH] RFC: omap serial: block console output while resetting earlyconsole UART
>
> Currently, no attempt is made to block console output while the
> earlyconsole UART is unavailable.  This can result in silent crashes
> that are very difficult to debug due to the lack of console output.
> This patch holds the console semaphore while resetting the active console
> UART, which causes all console output during that time to be buffered and
> then transmitted after the console semaphore is released.
>
> Not-yet-signed-off-by: Paul Walmsley<paul@pwsan.com>
> ---
>   arch/arm/mach-omap2/serial.c |  100 ++++++++++++++++++++++++++++++++++++++++++
>   1 files changed, 100 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index 338e46a..577f8f9 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -28,10 +28,13 @@
>   #include<linux/serial_8250.h>
>   #include<linux/pm_runtime.h>
>
> +#include<linux/console.h>
> +
>   #ifdef CONFIG_SERIAL_OMAP
>   #include<plat/omap-serial.h>
>   #endif
>
> +#include<plat/serial.h>
>   #include<plat/common.h>
>   #include<plat/board.h>
>   #include<plat/clock.h>
> @@ -39,6 +42,8 @@
>   #include<plat/omap_hwmod.h>
>   #include<plat/omap_device.h>
>
> +#include<asm/memory.h>
> +
>   #include "prm.h"
>   #include "pm.h"
>   #include "cm.h"
> @@ -51,6 +56,8 @@
>   #define UART_ERRATA_FIFO_FULL_ABORT	(0x1<<  0)
>   #define UART_ERRATA_i202_MDR1_ACCESS	(0x1<<  1)
>
> +#define uart_id_to_ttys_id(u)		(u - 1)
> +
>   /*
>    * NOTE: By default the serial timeout is disabled as it causes lost characters
>    * over the serial ports. This means that the UART clocks will stay on until
> @@ -106,6 +113,83 @@ static LIST_HEAD(uart_list);
>   static u8 num_uarts;
>
>   /*
> + * early_console_uart: if earlyconsole is enabled and active, the UART
> + * ID (e.g., 1, 2, 3, 4) will be stored here.  '0' means earlyconsole
> + * is disabled or some problem occurred during earlyconsole handling.
> + */
> +static int early_console_uart;
> +
> +#define for_each_console(con) \
> +	for (con = console_drivers; con != NULL; con = con->next)
> +
> +/* XXX belongs in kernel/printk.c or some earlyconsole file */
> +/* XXX The "earlycon" string is an ugly hack */
> +int _is_early_console_enabled(void)
> +{
> +	int ret = 0;
> +	struct console *c;
> +
> +	acquire_console_sem();
> +	for_each_console(c)
> +		if (!strcmp("earlycon", c->name))
> +			ret = 1;
> +	release_console_sem();
> +
> +	return ret;
> +}
> +
> +/* XXX document */
> +static int _get_early_console_uart(void)
> +{
> +	u32 v;
> +	int u = -EINVAL;
> +
> +	v = __raw_readl(phys_to_virt(OMAP_UART_INFO));
> +	/* XXX see the OMAP debug-macro.S for this table */
> +	switch (v) {
> +	case 0:
> +	case OMAP2UART1:
> +		u = 1;
> +		break;
> +	case OMAP2UART2:
> +		u = 2;
> +		break;
> +	case OMAP2UART3:
> +	case OMAP3UART3:
> +	case OMAP4UART3:
> +		u = 3;
> +		break;
> +	case OMAP3UART4:
> +	case OMAP4UART4:
> +		u = 4;
> +		break;
> +	case ZOOM_UART:
> +		WARN(1, "omap serial: ZOOM UART in use - does that go through "
> +		     "the OMAP serial code?\n");
> +		break;
> +	default:
> +		WARN(1, "omap serial: unknown serial port in use!\n");
> +	}
> +
> +	return u;
> +}
> +
> +/* XXX document */
> +static void _store_early_console_uart_id(void)
> +{
> +	int uart_id;
> +
> +	if (_is_early_console_enabled()) {
> +		uart_id = _get_early_console_uart();
> +		if (uart_id>  0) {
> +			early_console_uart = uart_id;
> +			pr_info("omap serial: early console active on UART%d (ttyS%d)\n",
> +				uart_id, uart_id_to_ttys_id(uart_id));
> +		}
> +	}
> +}
> +
> +/*
>    * Since these idle/enable hooks are used in the idle path itself
>    * which has interrupts disabled, use the non-locking versions of
>    * the hwmod enable/disable functions.
> @@ -801,6 +885,17 @@ void __init omap_serial_init_port(int port)
>   	oh->dev_attr = uart;
>
>   	/*
> +	 * XXX How do we know whether the console is on this UART or not?
> +	 * We should only call acquire_console_sem() if the console is on
> +	 * this UART.
> +	 *
> +	 * Of course, the console is not the only thing that could be using
> +	 * this UART.
> +	 */
> +	if (uart->num == uart_id_to_ttys_id(early_console_uart))
> +		acquire_console_sem();
> +
> +	/*
>   	 * Because of early UART probing, UART did not get idled
>   	 * on init.  Now that omap_device is ready, ensure full idle
>   	 * before doing omap_device_enable().
> @@ -824,6 +919,9 @@ void __init omap_serial_init_port(int port)
>   	omap_uart_block_sleep(uart);
>   	uart->timeout = DEFAULT_TIMEOUT;
>
> +	if (uart->num == uart_id_to_ttys_id(early_console_uart))
> +		release_console_sem();
> +
>   	if ((cpu_is_omap34xx()&&  uart->padconf) ||
>   	    (uart->wk_en&&  uart->wk_mask)) {
>   		device_init_wakeup(&od->pdev.dev, true);
> @@ -846,6 +944,8 @@ void __init omap_serial_init(void)
>   {
>   	struct omap_uart_state *uart;
>
> +	_store_early_console_uart_id();
> +
>   	list_for_each_entry(uart,&uart_list, node)
>   		omap_serial_init_port(uart->num);
>   }


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: beagle hangs in uart3 disabling clocks
  2010-10-05  7:13                   ` Pramod
@ 2010-10-05  7:19                     ` Paul Walmsley
  2010-10-05  9:34                       ` Pramod
  0 siblings, 1 reply; 22+ messages in thread
From: Paul Walmsley @ 2010-10-05  7:19 UTC (permalink / raw)
  To: Pramod
  Cc: Ming Lei, Kevin Hilman, Govindraj, Premi, Sanjeev,
	linux-omap@vger.kernel.org

On Tue, 5 Oct 2010, Pramod wrote:

> I applied this patch on my kernel which is based on android-2.6.32 enabling
> dynamic printks. I still see the console hang after enabling the logs in
> hwmod.
> 
> I am using zoom3 board. Can you please let me know which defconfig from lo
> master branch can be used to test on zoom3? I would like to test this patch
> with lo master branch and zoom3.

Could you please paste your boot log messages here?


- Paul

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: beagle hangs in uart3 disabling clocks
  2010-10-05  7:19                     ` Paul Walmsley
@ 2010-10-05  9:34                       ` Pramod
  2010-10-05  9:47                         ` Paul Walmsley
  0 siblings, 1 reply; 22+ messages in thread
From: Pramod @ 2010-10-05  9:34 UTC (permalink / raw)
  To: Paul Walmsley
  Cc: Ming Lei, Kevin Hilman, Govindraj, Premi, Sanjeev,
	linux-omap@vger.kernel.org

On Tuesday 05 October 2010 12:49 PM, Paul Walmsley wrote:
> On Tue, 5 Oct 2010, Pramod wrote:
>
>> I applied this patch on my kernel which is based on android-2.6.32 enabling
>> dynamic printks. I still see the console hang after enabling the logs in
>> hwmod.
>>
>> I am using zoom3 board. Can you please let me know which defconfig from lo
>> master branch can be used to test on zoom3? I would like to test this patch
>> with lo master branch and zoom3.
>
> Could you please paste your boot log messages here?
>
>
> - Paul

Hi paul,
These are the boot log messages.

Uncompressing 
Linux..............................................................................................................................................................
.............................................................. done, 
booting the kernel.
Initializing cgroup subsys cpu
Linux version 2.6.32.9-00001-g8d10978-dirty (dw@dw-desktop) (gcc version 
4.4.1 (Sourcery G++ Lite 2009q3-67) ) #23 PREEMPT Tue Oct 5 12:25:20 IST 
2010
CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: OMAP Zoom3 board
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 131072
free_area_init_node: node 0, pgdat c06c1968, node_mem_map c07cb000
   Normal zone: 1024 pages used for memmap
   Normal zone: 0 pages reserved
   Normal zone: 130048 pages, LIFO batch:31
DIE ID: 5C320000000000000156087C06005013
OMAP3630 ES1.0 (l2cache iva sgx neon isp 192mhz_clk )
omap_sam_base (VA) == 0xfe400000
omap_sram_start (PA) == 0x40200000
omap_sram_size (SIZE) == 0x10000
SRAM: Mapped pa 0x40200000 to va 0xfe400000 size: 0x100000
Reserving 14745600 bytes SDRAM for VRAM
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
Kernel command line: console=ttyO2,115200n8 root=/dev/nfs rw 
nfsroot=172.24.137.0:/home/dw/l25.x/25.INC3.1/myfs,nolock,wsize=1024,rsize=1024 
init=/init ip=dhcp videoout=omap24xx
vout omap_vout.video1_numbuffers=6 omap_vout.vid1_static_vrfb_alloc=y 
omapfb.vram=0:4M earlyprintk loglevel=8
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 256MB 256MB = 512MB total
Memory: 491008KB available (6180K code, 1352K data, 224K init, 0K highmem)
Virtual kernel memory layout:
     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
     vmalloc : 0xe0800000 - 0xf8000000   ( 376 MB)
     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
       .init : 0xc0008000 - 0xc0040000   ( 224 kB)
       .text : 0xc0040000 - 0xc0649000   (6180 kB)
       .data : 0xc0674000 - 0xc06ce3d0   ( 361 kB)
Hierarchical RCU implementation.
NR_IRQS:402
IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96 interrupts
Total of 96 interrupts on 1 active controller
Clocking rate (Crystal/Core/MPU): 26.0/400/600 MHz
Reprogramming SDRC clock to 400000000 Hz
GPMC revision 5.0
OMAP GPIO hardware version 2.5
OMAP clockevent source: GPTIMER1 at 32768 Hz
Console: colour dummy device 80x30
Calibrating delay loop... 597.64 BogoMIPS (lpj=2334720)
Mount-cache hash table entries: 512
Initializing cgroup subsys debug
Initializing cgroup subsys cpuacct
Initializing cgroup subsys freezer
CPU: Testing write buffer coherency: ok
regulator: core version 0.5
NET: Registered protocol family 16
mux: Setting signal i2c2_scl.i2c2_scl 0x0118 -> 0x0100
mux: Setting signal i2c2_sda.i2c2_sda 0x0118 -> 0x0100
mux: Setting signal i2c3_scl.i2c3_scl 0x0118 -> 0x0100
mux: Setting signal i2c3_sda.i2c3_sda 0x0118 -> 0x0100
mux: Setting signal uart3_cts_rctx.gpio_163 0x0108 -> 0x011c
mux: Setting signal cam_xclka.gpio_96 0x0004 -> 0x0004
mux: Setting signal cam_wen.gpio_167 0x0004 -> 0x0004
mux: Setting signal mcspi1_cs2.mcspi1_cs2 0x0108 -> 0x0108
mux: Setting signal cam_hs.gpio_94 0x010c -> 0x0104
mux: Setting signal cam_xclka.gpio_96 0x0004 -> 0x0004
mux: Setting signal gpmc_ncs5.gpio_56 0x0004 -> 0x0004
mux: Setting signal cam_vs.gpio_95 0x0114 -> 0x0004
mux: Setting signal sys_nirq.sys_nirq 0x0118 -> 0x4118
mux: Setting signal cam_pclk.gpio_97 0x0114 -> 0x011c
mux: Setting signal cam_d2.gpio101 0x0104 -> 0x0004
mux: Setting signal mcbsp1_clkx.gpio162 0x011c -> 0x0104
mux: Setting signal etk_clk.etk_clk 0x001b -> 0x011a
mux: Setting signal mcspi1_cs1.mcspi1_cs1 0x000b -> 0x011b
mux: Setting signal etk_d4.etk_d4 0x0103 -> 0x011a
mux: Setting signal etk_d5.etk_d5 0x0103 -> 0x011a
mux: Setting signal etk_d6.etk_d6 0x0103 -> 0x011a
mux: Setting signal etk_d3.etk_d3 0x0103 -> 0x011a
(wl12xx):  Connectivity board init
(wl12xx):  Connectivity board init for OMAP3+WL127x
(wl12xx):  wl127x_vio_leakage_fix
(wl12xx):  Adding Connectivity platform device
(wl12xx):  Configuring Connectivity GPIOs
mux: Setting signal cam_d10.gpio109 0x0104 -> 0x0004
mux: Setting signal mcbsp1_fsx.gpio161 0x011c -> 0x0004
mux: Setting signal uart3_rts_sd.gpio164 0x0000 -> 0x0004
OMAP DMA hardware revision 5.0
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
i2c_omap i2c_omap.1: bus 1 rev4.0 at 100 kHz
twl4030: PIH (irq 7) chaining IRQs 368..375
twl4030: power (irq 373) chaining IRQs 376..383
twl4030: gpio (irq 368) chaining IRQs 384..401
mux: Setting signal sdmmc1_clk.sdmmc1_clk 0x0000 -> 0x0118
mux: Setting signal sdmmc1_cmd.sdmmc1_cmd 0x0118 -> 0x0118
mux: Setting signal sdmmc1_dat0.sdmmc1_dat0 0x0118 -> 0x0118
mux: Setting signal sdmmc1_dat1.sdmmc1_dat1 0x0118 -> 0x0118
mux: Setting signal sdmmc1_dat2.sdmmc1_dat2 0x0118 -> 0x0118
mux: Setting signal sdmmc1_dat3.sdmmc1_dat3 0x0118 -> 0x0118
regulator: VUSB1V5: 1500 mV normal standby
regulator: VUSB1V8: 1800 mV normal standby
regulator: VUSB3V1: 3100 mV normal standby
twl4030_usb twl4030_usb: HW_CONDITIONS 0x70/112; link 1
twl4030_usb twl4030_usb: Initialized TWL4030 USB module
regulator: VMMC1: 1850 <--> 3150 mV at 3000 mV normal standby
regulator: VDAC: 1800 mV normal standby
regulator: VPLL2: 1800 mV normal standby
regulator: VMMC2: 1850 mV normal standby
regulator: VSIM: 1800 <--> 3000 mV at 1800 mV normal standby
i2c_omap i2c_omap.2: bus 2 rev4.0 at 100 kHz
i2c_omap i2c_omap.3: bus 3 rev4.0 at 400 kHz
Sangoma WANPIPE Router v1.1 (c) 1995-2000 Sangoma Technologies Inc.
Bluetooth: Core ver 2.15
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Switching to clocksource 32k_counter
musb_hdrc: version 6.0, musb-dma, otg (peripheral+host), debug=0
HS USB OTG: revision 0x40, sysconfig 0x2005, sysstatus 0x1, intrfsel 
0x1, simenable  0x0
musb_hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine (X), bulk 
split (X), HB-ISO Rx, HB-ISO Tx, SoftConn)
musb_hdrc: MHDRC RTL version 1.800
musb_hdrc: setup fifo_mode 4
musb_hdrc: 28/31 max ep, 16384/16384 memory
musb_hdrc: USB OTG mode controller at fa0ab000 using DMA, IRQ 92
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
dspbridge_init: 600000 bytes @ 81a00000
zoom2_wifi_init: start
omap-iommu omap-iommu.0: isp registered
iovmm-omap initialized isp, major: 253, base-minor: 0
ashmem: initialized
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.
yaffs Oct  5 2010 12:18:21 Installing.
msgmni has been set to 959
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler cfq registered (default)
OMAP DSS rev 2.0
OMAP DISPC rev 3.0
OMAP VENC rev 2
dsi_init calling
OMAP DSI rev 1.0
omap-hsuart.0: ttyO0 at MMIO 0x4806a000 (irq = 72) is a OMAP UART0
omap-hsuart.1: ttyO1 at MMIO 0x4806c000 (irq = 73) is a OMAP UART1
omap-hsuart.2: ttyO2 at MMIO 0x49020000 (irq = 74) is a OMAP UART2
console [ttyO2] enabled
omap-hsuart.3: ttyO3 at MMIO 0x10000000 (irq = 262) is a OMAP UART3
brd: module loaded
loop: module loaded
Android kernel panic handler initialized (bind=kpanic)
<6>LIS331DLH accelerometer driver
omap2-nand driver initializing
omap2-nand: irqstatus set on cmd entry ff
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xbc (Micron NAND 512MiB 
1,8V 16-bit)
Creating 7 MTD partitions on "omap2-nand.0":
0x000000000000-0x000000080000 : "X-Loader-NAND"
0x000000080000-0x000000200000 : "U-Boot-NAND"
0x0000001c0000-0x000000200000 : "Boot Env-NAND"
0x000000200000-0x000001e00000 : "Kernel-NAND"
0x000002000000-0x00000d400000 : "system"
0x00000d400000-0x000011400000 : "userdata"
0x000011400000-0x000013400000 : "cache"
smsc911x: Driver version 2008-10-21.
smsc911x-mdio: probed
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ffffffff:01, 
irq=-1)
net eth0: MAC Address: 00:08:ee:03:2a:0d
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
android init
android_probe pdata: c0684bb0
android_bind
android_usb gadget: adding config #1 'android'/c06ab104
android_bind_config
android_usb gadget: cfg 1/c06ab104 speeds:
android_usb gadget: android_usb ready
musb_hdrc musb_hdrc: MUSB HDRC host driver
drivers/usb/core/inode.c: creating file 'devices'
drivers/usb/core/inode.c: creating file '001'
musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
usb usb1: default language 0x0409
usb usb1: udev 1, busnum 1, minor = 0
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: MUSB HDRC host driver
usb usb1: Manufacturer: Linux 2.6.32.9-00001-g8d10978-dirty musb-hcd
usb usb1: SerialNumber: musb_hdrc
usb usb1: uevent
usb usb1: usb_probe_device
usb usb1: configuration #1 chosen from 1 choice
usb usb1: adding 1-0:1.0 (config #1, interface 0)
usb 1-0:1.0: uevent
hub 1-0:1.0: usb_probe_interface
hub 1-0:1.0: usb_probe_interface - got id
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
hub 1-0:1.0: standalone hub
hub 1-0:1.0: individual port power switching
hub 1-0:1.0: no over-current protection
hub 1-0:1.0: power on to power good time: 10ms
hub 1-0:1.0: 100mA bus power budget for each child
hub 1-0:1.0: local power source is good
hub 1-0:1.0: enabling power on all ports
drivers/usb/core/inode.c: creating file '001'
f_adb init
android_register_function adb
f_mass_storage init
android_register_function usb_mass_storage
f_rndis init
android_register_function rndis
rndis_function_bind_config MAC: 02:05:43:33:32:30
android_usb gadget: using random self ethernet address
android_usb gadget: using random host ethernet address
usb0: MAC 02:96:06:2f:1b:90
usb0: HOST MAC b6:86:7c:cf:72:ef
android_usb gadget: adding 'rndis'/dfae7cc0 to config 'android'/c06ab104
rndis_register: configNr = 0
rndis_set_param_medium: 0 0
rndis_set_param_vendor:
android_usb gadget: RNDIS: dual speed IN/ep1in OUT/ep1out NOTIFY/ep2in
mass_storage_bind_config
android_usb gadget: adding 'usb_mass_storage'/dfa70a00 to config 
'android'/c06ab104
android_usb gadget: fsg_function_bind
android_usb gadget: Number of LUNs=1
adb_bind_config
android_usb gadget: adding 'adb'/dfae79c0 to config 'android'/c06ab104
android_usb gadget: adb_function_bind dev: dfae79c0
android_usb gadget: create_bulk_endpoints dev: dfae79c0
android_usb gadget: usb_ep_autoconfig for ep_in got ep4in
android_usb gadget: usb_ep_autoconfig for adb ep_out got ep3out
android_usb gadget: dual speed adb: IN/ep4in, OUT/ep3out
hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0000
input: twl4030-keypad as 
/devices/platform/i2c_omap.1/i2c-1/1-004a/twl4030_keypad/input/input0
twl4030_usb twl4030_usb: HW_CONDITIONS 0xf0/240; link 2
synaptics_ts_probe: Product Major Version 1
synaptics_ts_probe: Product Minor Version 3
synaptics_ts_probe: product property 2
synaptics_ts_probe: device control 81
synaptics_ts_probe: interrupt enable 3
synaptics_ts_probe: 0xe0: 1 1 1 2 1 3 0 0
synaptics_ts_probe: Sensor properties 601
synaptics_ts_probe: max_x 7515, max_y 4667
synaptics_ts_probe: inactive_x 0 0, inactive_y 0 0
synaptics_ts_probe: snap_x 0-0 0-0, snap_y 0-0 0-0
input: synaptics-rmi-touchscreen as /devices/virtual/input/input1
synaptics_ts_probe: Start touchscreen synaptics-rmi-touchscreen in 
interrupt mode
using rtc device, twl_rtc, for alarms
twl_rtc twl_rtc: rtc core: registered twl_rtc as rtc0
i2c /dev entries driver
Linux video capture interface: v2.00
omap-previewer omap-previewer: omap-previewer: Registered preview wrapper
omap3isp omap3isp: Revision 15.0 found
omap-iommu omap-iommu.0: isp: version 1.1
Saving csi2 context
Restoring csi2 context
Saving csi2 context
Driver for 1-wire Dallas network protocol.
OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
Bluetooth: HCI UART driver ver 2.2
Bluetooth: HCI H4 protocol initialized
Bluetooth: HCILL protocol initialized
cpuidle: using governor ladder
cpuidle: using governor menu
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
logger: created 64K log 'log_main'
logger: created 256K log 'log_events'
logger: created 64K log 'log_radio'
logger: created 64K log 'log_system'
Advanced Linux Sound Architecture Driver Version 1.0.21.
No device for DAI twl4030
No device for DAI twl4030 Voice
No device for DAI twl4030 Clock
No device for DAI omap-mcbsp-dai-0
No device for DAI omap-mcbsp-dai-1
No device for DAI omap-mcbsp-dai-2
No device for DAI omap-mcbsp-dai-3
No device for DAI omap-mcbsp-dai-4
Zoom2 SoC init
set mux for group mode = OMAP_MCBSP2_SLAVE
mux: Setting signal mcbsp2_fsx.mcbsp2_fsx 0x0100 -> 0x0100
mux: Setting signal mcbsp2_clkx.mcbsp2_clkx 0x0100 -> 0x0100
mux: Setting signal mcbsp2_dr.mcbsp2_dr 0x0100 -> 0x0100
mux: Setting signal mcbsp2_dx.mcbsp2_dx 0x0000 -> 0x0000
No device for DAI null
set mux for group mode = OMAP_MCBSP4_SLAVE
mux: Setting signal mcbsp4_fsx.mcbsp4_fsx 0x0004 -> 0x0100
mux: Setting signal gpmc_ncs4.gpmc_ncs4 0x0000 -> 0x0102
mux: Setting signal gpmc_ncs5.gpmc_ncs5 0x0004 -> 0x0102
mux: Setting signal gpmc_ncs6.gpmc_ncs6 0x0104 -> 0x0002
TWL4030 Audio Codec init
asoc: twl4030 <-> omap-mcbsp-dai-0 mapping ok
asoc: twl4030 Voice <-> omap-mcbsp-dai-1 mapping ok
asoc: null <-> omap-mcbsp-dai-1 mapping ok
asoc: null <-> omap-mcbsp-dai-2 mapping ok
ALSA device list:
   #0: Zoom2 (twl4030)
oprofile: using timer
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (7676 buckets, 30704 max)
CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use
nf_conntrack.acct=1 kernel parameter, acct=1 nf_conntrack module option or
sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
ctnetlink v0.93: registering with nfnetlink.
xt_time: kernel timezone is -0000
ip_tables: (C) 2000-2006 Netfilter Core Team
arp_tables: (C) 2002 David S. Miller
TCP cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
Mobile IPv6
IPv6 over IPv4 tunneling driver
sit0: Disabled Privacy Extensions
ip6tnl0: Disabled Privacy Extensions
NET: Registered protocol family 17
NET: Registered protocol family 15
Bluetooth: L2CAP ver 2.14
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO (Voice Link) ver 0.6
Bluetooth: SCO socket layer initialized
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM ver 1.11
Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Bluetooth: HIDP (Human Interface Emulation) ver 1.2
Power Management for TI OMAP3.
sr1_opp_margin[1]=37500
sr1_opp_margin[2]=37500
sr1_opp_margin[3]=37500
sr1_opp_margin[4]=62500
steps added, volt will berecaliberated automatically
SR2:Fused Nvalues for VDD2OPP1 11192746
SmartReflex driver initialized
Disabling unused clock "gpio2_dbck"
Disabling unused clock "gpio3_dbck"
Disabling unused clock "gpio5_dbck"
Disabling unused clock "sad2d_ick"
Disabling unused clock "dpll4_m6x2_ck"
Disabling unused clock "dpll4_m5x2_ck"
Disabling unused clock "dpll3_m3x2_ck"
Disabling unused clock "sys_clkout1"
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
rotation = 0, var->rotate = 0 Console: switching to colour frame buffer 
device 100x30
OMAP DISPCONTROL read (stallmode)0
OMAP DISPCONTROL read (gpout)0
OMAP DISPCONTROL read (stallmode)0
omapdss DPI: Could not find exact pixel clock. Requested 21800 kHz, got 
21600 kHz
sil9022 3-0039: <sil9022_set_cm_clkout_ctrl> sil9022 HDMI Chip version = b0
regulator_init_complete: incomplete constraints, leaving VPLL2 on
twl_rtc twl_rtc: setting system clock to 2000-02-24 20:28:34 UTC (951424114)
lv8093 2-0072: Registered lv8093 as V4L2 device.
Registered lv8093 as i2c device.
lv8093_lens_power_set(ON)
lv8093 Lens HW detected
lv8093_lens_power_set(OFF)
Restoring csi2 context
imx046_sensor_power_set(ON)
Context config pixel format unsupported
imx046 2-001a: model id detected 0x46 mfr 0xb, rev# 0x2
imx046 2-001a: imx046 chip version 0x02 detected
imx046_sensor_power_set(OFF)
Saving csi2 context
Restoring csi2 context
omap3 omap3isp CSI memvs initted
Saving csi2 context
omap_vout: registered and initialized video device 3 [v4l2]
omap_vout: registered and initialized video device 4 [v4l2]
net eth0: SMSC911x/921x identified at 0xe08b4000, IRQ: 318
usb0: eth_open
ADDRCONF(NETDEV_UP): usb0: link is not ready
Sending DHCP requests .
hub 1-0:1.0: hub_suspend
usb usb1: bus auto-suspend
., OK
IP-Config: Got DHCP answer from 0.0.0.0, my address is 172.24.137.179
usb0: stop stats: rx/tx 0/0, errs 0/0
IP-Config: Complete:
      device=eth0, addr=172.24.137.179, mask=255.255.254.0, gw=172.24.136.2,
      host=172.24.137.179, domain=apr.dhcp.ti.com, nis-domain=(none),
      bootserver=0.0.0.0, rootserver=172.24.137.0, rootpath=
Looking up port of RPC 100003/2 on 172.24.137.0
Looking up port of RPC 100005/1 on 172.24.137.0
VFS: Mounted root (nfs filesystem) on device 0:13.
Freeing init memory: 224K
Warning: unable to open an initial console.
usb usb1: uevent
usb 1-0:1.0: uevent
init: cannot open '/initlogo.rle'
init: cannot find '/system/bin/pvrsrvinit', disabling 'pvrsrvinit'
init: cannot find '/system/etc/install-recovery.sh', disabling 
'flash_recovery'
init: cannot find '/system/bin/fw3a_core', disabling 'fw3a'
init: cannot find '/system/bin/playmp3', disabling 'bootsound'
twl4030_usb twl4030_usb: HW_CONDITIONS 0x70/112; link 1
proc_load: Processor Loaded /system/lib/dsp/baseimage.dof
omap mailbox rev 4.0
warning: `rild' uses 32-bit capabilities (legacy support in use)
proc_start: dsp in running state
procwrap_detach: deprecated dspbridge ioctl
/bin/sh: can't access tty; job control turned off
# eth0: no IPv6 routers present
    NFS: server 172.24.137.0 error: fileid changed
fsid 0:d: expected fileid 0xbe2e57, got 0xbe2e4a
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: beagle hangs in uart3 disabling clocks
  2010-10-05  9:34                       ` Pramod
@ 2010-10-05  9:47                         ` Paul Walmsley
  2010-10-05  9:58                           ` Pramod
  0 siblings, 1 reply; 22+ messages in thread
From: Paul Walmsley @ 2010-10-05  9:47 UTC (permalink / raw)
  To: Pramod
  Cc: Ming Lei, Kevin Hilman, Govindraj, Premi, Sanjeev,
	linux-omap@vger.kernel.org

On Tue, 5 Oct 2010, Pramod wrote:

> On Tuesday 05 October 2010 12:49 PM, Paul Walmsley wrote:
> > On Tue, 5 Oct 2010, Pramod wrote:
> > 
> > > I applied this patch on my kernel which is based on android-2.6.32
> > > enabling
> > > dynamic printks. I still see the console hang after enabling the logs in
> > > hwmod.
> > > 
> > > I am using zoom3 board. Can you please let me know which defconfig from lo
> > > master branch can be used to test on zoom3? I would like to test this
> > > patch
> > > with lo master branch and zoom3.
> > 
> > Could you please paste your boot log messages here?
> > 
> > 
> > - Paul
> 
> Hi paul,
> These are the boot log messages.

Is that with the patch applied or without it?  If without, please post the 
log messages from a boot after you apply the patch.

- Paul

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: beagle hangs in uart3 disabling clocks
  2010-10-05  9:47                         ` Paul Walmsley
@ 2010-10-05  9:58                           ` Pramod
  2010-10-05 10:03                             ` Paul Walmsley
  0 siblings, 1 reply; 22+ messages in thread
From: Pramod @ 2010-10-05  9:58 UTC (permalink / raw)
  To: Paul Walmsley
  Cc: Ming Lei, Kevin Hilman, Govindraj, Premi, Sanjeev,
	linux-omap@vger.kernel.org

On Tuesday 05 October 2010 03:17 PM, Paul Walmsley wrote:
> On Tue, 5 Oct 2010, Pramod wrote:
>
>> On Tuesday 05 October 2010 12:49 PM, Paul Walmsley wrote:
>>> On Tue, 5 Oct 2010, Pramod wrote:
>>>
>>>> I applied this patch on my kernel which is based on android-2.6.32
>>>> enabling
>>>> dynamic printks. I still see the console hang after enabling the logs in
>>>> hwmod.
>>>>
>>>> I am using zoom3 board. Can you please let me know which defconfig from lo
>>>> master branch can be used to test on zoom3? I would like to test this
>>>> patch
>>>> with lo master branch and zoom3.
>>>
>>> Could you please paste your boot log messages here?
>>>
>>>
>>> - Paul
>>
>> Hi paul,
>> These are the boot log messages.
>
> Is that with the patch applied or without it?  If without, please post the
> log messages from a boot after you apply the patch.
>
> - Paul

These logs are with the patch shared by you.

Pramod


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: beagle hangs in uart3 disabling clocks
  2010-10-05  9:58                           ` Pramod
@ 2010-10-05 10:03                             ` Paul Walmsley
  2010-10-05 11:09                               ` Pramod
  0 siblings, 1 reply; 22+ messages in thread
From: Paul Walmsley @ 2010-10-05 10:03 UTC (permalink / raw)
  To: Pramod
  Cc: Ming Lei, Kevin Hilman, Govindraj, Premi, Sanjeev,
	linux-omap@vger.kernel.org

On Tue, 5 Oct 2010, Pramod wrote:

> On Tuesday 05 October 2010 03:17 PM, Paul Walmsley wrote:
> > On Tue, 5 Oct 2010, Pramod wrote:
> > 
> > > On Tuesday 05 October 2010 12:49 PM, Paul Walmsley wrote:
> > > > On Tue, 5 Oct 2010, Pramod wrote:
> > > > 
> > > > > I applied this patch on my kernel which is based on android-2.6.32
> > > > > enabling
> > > > > dynamic printks. I still see the console hang after enabling the logs
> > > > > in
> > > > > hwmod.
> > > > > 
> > > > > I am using zoom3 board. Can you please let me know which defconfig
> > > > > from lo
> > > > > master branch can be used to test on zoom3? I would like to test this
> > > > > patch
> > > > > with lo master branch and zoom3.
> > > > 
> > > > Could you please paste your boot log messages here?
> > > > 
> > > > 
> > > > - Paul
> > > 
> > > Hi paul,
> > > These are the boot log messages.
> > 
> > Is that with the patch applied or without it?  If without, please post the
> > log messages from a boot after you apply the patch.
> > 
> > - Paul
> 
> These logs are with the patch shared by you.

Looks to me like it boots fine.  If you had hwmod debugging enabled, your 
kernel should have crashed after

omap-hsuart.0: ttyO0 at MMIO 0x4806a000 (irq = 72) is a OMAP UART0
omap-hsuart.1: ttyO1 at MMIO 0x4806c000 (irq = 73) is a OMAP UART1
omap-hsuart.2: ttyO2 at MMIO 0x49020000 (irq = 74) is a OMAP UART2

... but it didn't crash there.  I'm not seeing any hwmod debug messages 
though, so you probably don't have DEBUG defined in omap_hwmod.c.

So, I suspect whatever problem you're seeing is unrelated to the problem 
that the patch was intended to solve.


- Paul

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: beagle hangs in uart3 disabling clocks
  2010-10-05 10:03                             ` Paul Walmsley
@ 2010-10-05 11:09                               ` Pramod
  2010-10-05 17:26                                 ` Paul Walmsley
  0 siblings, 1 reply; 22+ messages in thread
From: Pramod @ 2010-10-05 11:09 UTC (permalink / raw)
  To: Paul Walmsley
  Cc: Ming Lei, Kevin Hilman, Govindraj, Premi, Sanjeev,
	linux-omap@vger.kernel.org

On Tuesday 05 October 2010 03:33 PM, Paul Walmsley wrote:
> On Tue, 5 Oct 2010, Pramod wrote:
>
>> On Tuesday 05 October 2010 03:17 PM, Paul Walmsley wrote:
>>> On Tue, 5 Oct 2010, Pramod wrote:
>>>
>>>> On Tuesday 05 October 2010 12:49 PM, Paul Walmsley wrote:
>>>>> On Tue, 5 Oct 2010, Pramod wrote:
>>>>>
>>>>>> I applied this patch on my kernel which is based on android-2.6.32
>>>>>> enabling
>>>>>> dynamic printks. I still see the console hang after enabling the logs
>>>>>> in
>>>>>> hwmod.
>>>>>>
>>>>>> I am using zoom3 board. Can you please let me know which defconfig
>>>>>> from lo
>>>>>> master branch can be used to test on zoom3? I would like to test this
>>>>>> patch
>>>>>> with lo master branch and zoom3.
>>>>>
>>>>> Could you please paste your boot log messages here?
>>>>>
>>>>>
>>>>> - Paul
>>>>
>>>> Hi paul,
>>>> These are the boot log messages.
>>>
>>> Is that with the patch applied or without it?  If without, please post the
>>> log messages from a boot after you apply the patch.
>>>
>>> - Paul
>>
>> These logs are with the patch shared by you.
>
> Looks to me like it boots fine.  If you had hwmod debugging enabled, your
> kernel should have crashed after
>
> omap-hsuart.0: ttyO0 at MMIO 0x4806a000 (irq = 72) is a OMAP UART0
> omap-hsuart.1: ttyO1 at MMIO 0x4806c000 (irq = 73) is a OMAP UART1
> omap-hsuart.2: ttyO2 at MMIO 0x49020000 (irq = 74) is a OMAP UART2
>
> ... but it didn't crash there.  I'm not seeing any hwmod debug messages
> though, so you probably don't have DEBUG defined in omap_hwmod.c.
>
> So, I suspect whatever problem you're seeing is unrelated to the problem
> that the patch was intended to solve.
>
>
> - Paul

The hwmod debug messages will be seen when I enable them on the go with:
echo -n 'file omap_hwmod.c +p' > /debug/dynamic_debug/control

This will show lots of logs as below ending with UART3 clock disabling 
and a hang.

omap_hwmod:omap_hwmod: uart1: idling
omap_hwmod:omap_hwmod: uart1: disabling clocks
omap_hwmod:omap_hwmod: uart2: idling
omap_hwmod:omap_hwmod: uart2: disabling clocks
omap_hwmod:omap_hwmod: uart1: enabling
omap_hwmod:omap_hwmod: uart1: enabling clocks
omap_hwmod:omap_hwmod: uart2: enabling
omap_hwmod:omap_hwmod: uart2: enabling clocks
omap_hwmod:omap_hwmod: uart3: idling
omap_hwmod:omap_hwmod: uart3: disabling clock



-
Pramod

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: beagle hangs in uart3 disabling clocks
  2010-10-05 11:09                               ` Pramod
@ 2010-10-05 17:26                                 ` Paul Walmsley
  2010-10-05 17:33                                   ` Kevin Hilman
  0 siblings, 1 reply; 22+ messages in thread
From: Paul Walmsley @ 2010-10-05 17:26 UTC (permalink / raw)
  To: Pramod
  Cc: Ming Lei, Kevin Hilman, Govindraj, Premi, Sanjeev,
	linux-omap@vger.kernel.org

On Tue, 5 Oct 2010, Pramod wrote:

> On Tuesday 05 October 2010 03:33 PM, Paul Walmsley wrote:
> > 
> > Looks to me like it boots fine.  If you had hwmod debugging enabled, your
> > kernel should have crashed after
> > 
> > omap-hsuart.0: ttyO0 at MMIO 0x4806a000 (irq = 72) is a OMAP UART0
> > omap-hsuart.1: ttyO1 at MMIO 0x4806c000 (irq = 73) is a OMAP UART1
> > omap-hsuart.2: ttyO2 at MMIO 0x49020000 (irq = 74) is a OMAP UART2
> > 
> > ... but it didn't crash there.  I'm not seeing any hwmod debug messages
> > though, so you probably don't have DEBUG defined in omap_hwmod.c.
> > 
> > So, I suspect whatever problem you're seeing is unrelated to the problem
> > that the patch was intended to solve.
> > 
> > 
> > - Paul
> 
> The hwmod debug messages will be seen when I enable them on the go with:
> echo -n 'file omap_hwmod.c +p' > /debug/dynamic_debug/control
> 
> This will show lots of logs as below ending with UART3 clock disabling and a
> hang.
> 
> omap_hwmod:omap_hwmod: uart1: idling
> omap_hwmod:omap_hwmod: uart1: disabling clocks
> omap_hwmod:omap_hwmod: uart2: idling
> omap_hwmod:omap_hwmod: uart2: disabling clocks
> omap_hwmod:omap_hwmod: uart1: enabling
> omap_hwmod:omap_hwmod: uart1: enabling clocks
> omap_hwmod:omap_hwmod: uart2: enabling
> omap_hwmod:omap_hwmod: uart2: enabling clocks
> omap_hwmod:omap_hwmod: uart3: idling
> omap_hwmod:omap_hwmod: uart3: disabling clock

OK, the problem here is probably with the real serial console generating 
messages while the hwmod is idle, not earlyconsole/bootconsole.  The patch 
could be extended to fix that, but it doesn't address that right now.  Why 
don't you take a shot at doing that?

In this context, the real serial console is only part of the problem.  
For a complete fix, I suspect that one would have to tinker with the OMAP 
UART driver or serial core, since other drivers beyond the real console 
may be using the serial port (e.g. Bluetooth).

Also, thinking about this issue further, there needs to be an additional 
fix at least in omap_serial_init_port() to ensure that the UART TX FIFO is 
completely drained before it starts messing around with the underlying 
hwmod.  Similarly, whenever the PM runtime conversion is done for 
drivers/serial/omap-serial.c, it will need to ensure that the TX FIFO has 
drained before going to idle.


regards,

- Paul

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: beagle hangs in uart3 disabling clocks
  2010-10-05 17:26                                 ` Paul Walmsley
@ 2010-10-05 17:33                                   ` Kevin Hilman
  0 siblings, 0 replies; 22+ messages in thread
From: Kevin Hilman @ 2010-10-05 17:33 UTC (permalink / raw)
  To: Paul Walmsley
  Cc: Pramod, Ming Lei, Govindraj, Premi, Sanjeev,
	linux-omap@vger.kernel.org, Govindraj R.

Paul Walmsley <paul@pwsan.com> writes:

> On Tue, 5 Oct 2010, Pramod wrote:
>
>> On Tuesday 05 October 2010 03:33 PM, Paul Walmsley wrote:
>> > 
>> > Looks to me like it boots fine.  If you had hwmod debugging enabled, your
>> > kernel should have crashed after
>> > 
>> > omap-hsuart.0: ttyO0 at MMIO 0x4806a000 (irq = 72) is a OMAP UART0
>> > omap-hsuart.1: ttyO1 at MMIO 0x4806c000 (irq = 73) is a OMAP UART1
>> > omap-hsuart.2: ttyO2 at MMIO 0x49020000 (irq = 74) is a OMAP UART2
>> > 
>> > ... but it didn't crash there.  I'm not seeing any hwmod debug messages
>> > though, so you probably don't have DEBUG defined in omap_hwmod.c.
>> > 
>> > So, I suspect whatever problem you're seeing is unrelated to the problem
>> > that the patch was intended to solve.
>> > 
>> > 
>> > - Paul
>> 
>> The hwmod debug messages will be seen when I enable them on the go with:
>> echo -n 'file omap_hwmod.c +p' > /debug/dynamic_debug/control
>> 
>> This will show lots of logs as below ending with UART3 clock disabling and a
>> hang.
>> 
>> omap_hwmod:omap_hwmod: uart1: idling
>> omap_hwmod:omap_hwmod: uart1: disabling clocks
>> omap_hwmod:omap_hwmod: uart2: idling
>> omap_hwmod:omap_hwmod: uart2: disabling clocks
>> omap_hwmod:omap_hwmod: uart1: enabling
>> omap_hwmod:omap_hwmod: uart1: enabling clocks
>> omap_hwmod:omap_hwmod: uart2: enabling
>> omap_hwmod:omap_hwmod: uart2: enabling clocks
>> omap_hwmod:omap_hwmod: uart3: idling
>> omap_hwmod:omap_hwmod: uart3: disabling clock
>
> OK, the problem here is probably with the real serial console generating 
> messages while the hwmod is idle, not earlyconsole/bootconsole.  The patch 
> could be extended to fix that, but it doesn't address that right now.  Why 
> don't you take a shot at doing that?
>
> In this context, the real serial console is only part of the problem.  
> For a complete fix, I suspect that one would have to tinker with the OMAP 
> UART driver or serial core, since other drivers beyond the real console 
> may be using the serial port (e.g. Bluetooth).
>
> Also, thinking about this issue further, there needs to be an additional 
> fix at least in omap_serial_init_port() to ensure that the UART TX FIFO is 
> completely drained before it starts messing around with the underlying 
> hwmod.  Similarly, whenever the PM runtime conversion is done for 
> drivers/serial/omap-serial.c, it will need to ensure that the TX FIFO has 
> drained before going to idle.

Now that the base omap-serial driver is queued for mainline, the next
step is to move all the PM hackery from mach-omap2/serial.c into the
driver itself by using the runtime PM API.

This should ensure that any users of the real serial driver will have an
active UART.

Kevin

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2010-10-05 17:33 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-03  9:04 beagle hangs in uart3 disabling clocks Ming Lei
2010-10-03 17:27 ` Premi, Sanjeev
2010-10-04 12:13   ` Ming Lei
2010-10-04 12:17   ` Pramod
2010-10-04 12:38     ` Govindraj
2010-10-04 15:18       ` Ming Lei
2010-10-04 15:44         ` Kevin Hilman
2010-10-04 16:17           ` Ming Lei
2010-10-04 18:54             ` Kevin Hilman
2010-10-05  5:36               ` Ming Lei
2010-10-05  6:14                 ` Paul Walmsley
2010-10-05  6:47                   ` Ming Lei
2010-10-05  7:13                   ` Pramod
2010-10-05  7:19                     ` Paul Walmsley
2010-10-05  9:34                       ` Pramod
2010-10-05  9:47                         ` Paul Walmsley
2010-10-05  9:58                           ` Pramod
2010-10-05 10:03                             ` Paul Walmsley
2010-10-05 11:09                               ` Pramod
2010-10-05 17:26                                 ` Paul Walmsley
2010-10-05 17:33                                   ` Kevin Hilman
2010-10-04 15:25 ` Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).