1. 01 12月, 2010 2 次提交
  2. 25 11月, 2010 2 次提交
    • P
      OMAP2+: PM/serial: hold console semaphore while OMAP UARTs are disabled · 0d8e2d0d
      Paul Walmsley 提交于
      The console semaphore must be held while the OMAP UART devices are
      disabled, lest a console write cause an ARM abort (and a kernel crash)
      when the underlying console device is inaccessible.  These crashes
      only occur when the console is on one of the OMAP internal serial
      ports.
      
      While this problem has been latent in the PM idle loop for some time,
      the crash was not triggerable with an unmodified kernel until commit
      6f251e9d ("OMAP: UART: omap_device
      conversions, remove implicit 8520 assumptions").  After this patch, a
      console write often occurs after the console UART has been disabled in
      the idle loop, crashing the system.  Several users have encountered
      this bug:
      
          http://www.mail-archive.com/linux-omap@vger.kernel.org/msg38396.html
      
          http://www.mail-archive.com/linux-omap@vger.kernel.org/msg36602.html
      
      The same commit also introduced new code that disabled the UARTs
      during init, in omap_serial_init_port().  The kernel will also crash
      in this code when earlyconsole and extra debugging is enabled:
      
          http://www.mail-archive.com/linux-omap@vger.kernel.org/msg36411.html
      
      The minimal fix for the -rc series is to hold the console semaphore
      while the OMAP UARTs are disabled.  This is a somewhat overbroad fix,
      since the console may not be located on an OMAP UART, as is the case
      with the GPMC UART on Zoom3.  While it is technically possible to
      determine which devices the console or earlyconsole is actually
      running on, it is not a trivial problem to solve, and the code to do
      so is not really appropriate for the -rc series.
      
      The right long-term fix is to ensure that no code outside of the OMAP
      serial driver can disable an OMAP UART.  As I understand it, code to
      implement this is under development by TI.
      
      This patch is a collaboration between Paul Walmsley <paul@pwsan.com>
      and Tony Lindgren <tony@atomide.com>.  Thanks to Ming Lei
      <tom.leiming@gmail.com> and Pramod <pramod.gurav@ti.com> for their
      feedback on earlier versions of this patch.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Acked-by: NKevin Hilman <khilman@deeprootsystems.com>
      Cc: Ming Lei <tom.leiming@gmail.com>
      Cc: Pramod <pramod.gurav@ti.com>
      Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: Jean Pihet <jean.pihet@newoldbits.com>
      Cc: Govindraj.R <govindraj.raja@ti.com>
      0d8e2d0d
    • K
      OMAP: UART: don't resume UARTs that are not enabled. · f910043c
      Kevin Hilman 提交于
      Add additional check to omap_uart_resume_idle() so that only
      enabled (specifically, idle-enabled) UARTs are allowed to resume.
      This matches the existing check in prepare idle.
      
      Without this patch, the system will hang if a board is
      configured to register only some uarts instead of all of
      them and PM is enabled.
      
      Cc: Govindraj R. <govindraj.raja@ti.com>
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      [tony@atomide.com: updated description]
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      f910043c
  3. 23 10月, 2010 1 次提交
  4. 12 10月, 2010 1 次提交
    • S
      omap: serial: Fix the boot-up crash/reboot without CONFIG_PM · a1b04cc1
      Santosh Shilimkar 提交于
      The omap2plus_defconfig doesn't boot up when built with CONFIG_PM
      disabled on the latest linux-omap master. Below are the observations
      1. OMAP3 reboots in the middle of boot
      --------------------------------------------------
      [    0.000000] Calibrating delay loop... 494.72 BogoMIPS (lpj=1933312)
      [    0.000000] pid_max: default: 32768 minimum: 301
      [    0.000000] Security Framework initialized
      [    0.000000] Mount-cache hash table entries: 512
      [    0.000000] CPU: Testing write buffer coherency: ok
      [    0.000000] Brought up 1 CPUs
      [    0.000000] SMP: Total of 1 processors activated (494.72 BogoMIPS).
      [    0.000000] regulator: core version 0.5
      [    0.000000] NET: Registered protocol family 16
      
      U-Boot 1.1.4 (Feb 11 2009 - 16:10:23)
      
      OMAP3430-GP rev 2, CPU-OPP2 L3-165MHz
      TI 3430SDP 1.0 Version + mDDR (Boot NOR)
      DRAM:  128 MB
      Flash: 128 MB
      NAND:128 MiB
      --------------------------------------------------
      
      2. OMAP4 does a kernel PANIC
      -------------------------------------
      [    0.000000] Calibrating delay loop... 1195.29 BogoMIPS (lpj=4669440)
      [    0.000000] pid_max: default: 32768 minimum: 301
      [    0.000000] Security Framework initialized
      [    0.000000] Mount-cache hash table entries: 512
      [    0.000000] CPU: Testing write buffer coherency: ok
      [    0.000000] L310 cache controller enabled
      [    0.000000] l2x0: 16 ways, CACHE_ID 0x410000c2, AUX_CTRL 0x0e050000
      [    0.000000] CPU1: Booted secondary processor
      [    0.000000] Brought up 2 CPUs
      [    0.000000] SMP: Total of 2 processors activated (2395.78 BogoMIPS).
      [    0.000000] regulator: core version 0.5
      [    0.000000] NET: Registered protocol family 16
      [    0.000000] mux: Could not set signal i2c2_scl.i2c2_scl
      [    0.000000] mux: Could not set signal i2c2_sda.i2c2_sda
      [    0.000000] mux: Could not set signal i2c3_scl.i2c3_scl
      [    0.000000] mux: Could not set signal i2c3_sda.i2c3_sda
      [    0.000000] mux: Could not set signal i2c4_scl.i2c4_scl
      [    0.000000] mux: Could not set signal i2c4_sda.i2c4_sda
      -------------------------------------
      
      This is happening because 'omap_serial_init()' is hanging in the boot.
      On OMAP3 the watchdog is generating reboot because devices_init doesn't
      happens where as on OMAP4 it just hangs without reboot.
      The uart clock is not getting enabled after omap_device_idle as part
      of omap_serial_init.
      The omap_device_idle(will disable the clock) then omap_uart_block_sleep()
      should enable clock back disabled during the boot up phase.
      But omap_uart_block_sleep() stuffed version is binded only under
      CONFIG_PM and other version is just empty. Hence it is not enabling
      clock back as expected
      
      This patch adds uart clock enable code to omap_uart_block_sleep() function
      built with CONFIG_PM disabled.
      Thanks to Charulatha and Govindraj for their help on this debug.
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NCharulatha V <charu@ti.com>
      Signed-off-by: NGovindraj.R <govindraj.raja@ti.com>
      Acked-by: NKevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      a1b04cc1
  5. 09 10月, 2010 1 次提交
    • P
      OMAP: control: move plat-omap/control.h to mach-omap2/control.h · 4814ced5
      Paul Walmsley 提交于
      Only OMAP2+ platforms have the System Control Module (SCM) IP block.
      In the past, we've kept the SCM header file in plat-omap.  This has
      led to abuse - device drivers including it; includes being added that
      create implicit dependencies on OMAP2+ builds; etc.
      
      In response, move the SCM headers into mach-omap2/.
      
      As part of this, remove the direct SCM access from the OMAP UDC
      driver.  It was clearly broken.  The UDC code needs an indepth review for
      use on OMAP2+ chips.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Cory Maccarrone <darkstar6262@gmail.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      4814ced5
  6. 30 9月, 2010 5 次提交
  7. 02 8月, 2010 5 次提交
  8. 16 3月, 2010 3 次提交
  9. 12 3月, 2010 1 次提交
  10. 24 2月, 2010 1 次提交
  11. 16 2月, 2010 3 次提交
  12. 04 2月, 2010 1 次提交
    • T
      omap: Disable serial port autoidle by default · 301fe8ee
      Tony Lindgren 提交于
      Currently the omap serial clocks are autoidled after 5 seconds.
      However, this causes lost characters on the serial ports. As this
      is considered non-standard behaviour for Linux, disable the timeout.
      
      Note that this will also cause blocking of any deeper omap sleep
      states.
      
      To enable the autoidling of the serial ports, do something like
      this for each serial port:
      
      # echo 5 > /sys/devices/platform/serial8250.0/sleep_timeout
      # echo 5 > /sys/devices/platform/serial8250.1/sleep_timeout
      ...
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      301fe8ee
  13. 09 1月, 2010 1 次提交
  14. 17 12月, 2009 1 次提交
    • M
      OMAP3: serial - fix bug introduced in · f2eeeae0
      Mika Westerberg 提交于
      Commit f62349ee had side effect that
      causes kernel to oops when we are suspending to ram:
      
      	# echo mem > /sys/power/state
      
      	WARNING: at kernel/irq/manage.c:858 __free_irq+0x90/0x174()
      	Trying to free already-free IRQ 72
      	Modules linked in:
      	Backtrace:
      	[<c00328d0>] (dump_backtrace+0x0/0x110) from [<c0347298>] (dump_stack+0x18/0x1c)
      	 r7:dfd4be08 r6:c009505c r5:c03fbfd1 r4:0000035a
      	[<c0347280>] (dump_stack+0x0/0x1c) from [<c005a408>] (warn_slowpath_common+0x50/0x68)
      	[<c005a3b8>] (warn_slowpath_common+0x0/0x68) from [<c005a46c>] (warn_slowpath_fmt+0x30)
      	 r7:c0474afc r6:00000048 r5:00000000 r4:c0474ac0
      	[<c005a43c>] (warn_slowpath_fmt+0x0/0x38) from [<c009505c>] (__free_irq+0x90/0x174)
      	 r3:00000048 r2:c03fc0ef
      	[<c0094fcc>] (__free_irq+0x0/0x174) from [<c0095184>] (free_irq+0x44/0x64)
      	[<c0095140>] (free_irq+0x0/0x64) from [<c0038100>] (omap_uart_enable_irqs+0x4c/0x90)
      	 r7:c034d58c r6:00000003 r5:00000000 r4:c0463028
      	[<c00380b4>] (omap_uart_enable_irqs+0x0/0x90) from [<c003d8f8>] (omap3_pm_begin+0x1c/0)
      	 r5:00000003 r4:00000000
      	[<c003d8dc>] (omap3_pm_begin+0x0/0x28) from [<c008d008>] (suspend_devices_and_enter+0x)
      	[<c008cfd8>] (suspend_devices_and_enter+0x0/0x1dc) from [<c008d29c>] (enter_state+0xe8)
      	 r5:c03f7f46 r4:00000000
      	[<c008d1b4>] (enter_state+0x0/0x140) from [<c008c8e0>] (state_store+0x9c/0xc4)
      	 r7:c034d58c r6:00000003 r5:00000003 r4:c03f7f46
      	[<c008c844>] (state_store+0x0/0xc4) from [<c01cb2dc>] (kobj_attr_store+0x20/0x24)
      	[<c01cb2bc>] (kobj_attr_store+0x0/0x24) from [<c0119420>] (sysfs_write_file+0x114/0x14)
      	[<c011930c>] (sysfs_write_file+0x0/0x148) from [<c00cb298>] (vfs_write+0xb8/0x164)
      	[<c00cb1e0>] (vfs_write+0x0/0x164) from [<c00cb408>] (sys_write+0x44/0x70)
      	 r8:4001f000 r7:00000004 r6:df81bd00 r5:00000000 r4:00000000
      	[<c00cb3c4>] (sys_write+0x0/0x70) from [<c002f040>] (ret_fast_syscall+0x0/0x38)
      	 r8:c002f204 r7:00000004 r6:401fa5e8 r5:4001f000 r4:00000004
      
      This is due the fact that uart_list list was populated in
      omap_serial_early_init() and omap_uart_enable_irqs() went through this
      list even when serial idle wasn't enabled for all uarts.
      
      This patch moves the code that populates the uart_list and enables uart
      clocks into omap_serial_init_port().
      Signed-off-by: NMika Westerberg <ext-mika.1.westerberg@nokia.com>
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      f2eeeae0
  15. 12 12月, 2009 2 次提交
    • V
      omap: serial: fix non-empty uart fifo read abort · ce13d471
      vikram pandita 提交于
      OMAP3xxx and OMAP4430 UART IP blocks have a restriction wrt RX FIFO.
      Empty RX fifo read causes an abort.
      
      OMAP3xxx:
      	UART IP revision >= 0x52 have this issue
      	MVR register format is:
      	Bits  Field Name  Description  				Type  Reset
      	31:8   RESERVED 					RO  	0x0
      	7:4    MAJOR  	Major revision number of the module.  	RO  	0x--
      	3:0    MINOR  	Minor revision number of the module.  	RO  	0x--
      
      OMAP4xxx:
      	All revisions have this issue
      	Revision id check is not used as the format of MVR resigster has changed
      	For omap4 MVR register reads as: 0x50410602 => Revision id = 0x0602
      	Format of MVR register on omap4 is: (Courtesy: Cousson, Benoit)
      	Bits  Field Name  Description  				Type  Reset
      	31:30 SCHEME  	Scheme revision number of module  	RO  	0x1
      	29:28 RESERVED   					RO  	0x1
      	27:16 FUNC  	Function revision number of module  	RO  	0x041
      	15:11 RTL  		Rtl revision number of module  	RO  	0x00
      	10:8  MAJOR 	Major revision number of the module.  	RO  	0x6
      	7:6   CUSTOM  	Custom revision number of the module.  	RO  	0x0
      	5:0   MINOR  	Minor revision number of the module.  	RO  	0x02
      
      Override the default 8250 read handler: mem_serial_in()
      by a custom handler: serial_in_8250()
      which makes sure that RX fifo is not read when empty
      
      tested on zoom3(3630) board
      
      Cc: Benoit Cousson <b-cousson@ti.com>
      Signed-off-by: NVikram Pandita <vikram.pandita@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      ce13d471
    • M
      OMAP3: serial - allow platforms specify which UARTs to initialize · f62349ee
      Mika Westerberg 提交于
      This patch adds new function: omap_serial_init_port(port) that can be
      used to initialize only selected UARTs as serial ports. Platforms can
      then in their board files call this function instead of omap_serial_init()
      if they don't want to use all UARTs as serial ports.
      Signed-off-by: NMika Westerberg <ext-mika.1.westerberg@nokia.com>
      Signed-off-by: NKevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      f62349ee
  16. 23 11月, 2009 1 次提交
  17. 12 11月, 2009 1 次提交
  18. 23 10月, 2009 1 次提交
  19. 21 10月, 2009 1 次提交
    • T
      omap: headers: Move remaining headers from include/mach to include/plat · ce491cf8
      Tony Lindgren 提交于
      Move the remaining headers under plat-omap/include/mach
      to plat-omap/include/plat. Also search and replace the
      files using these headers to include using the right path.
      
      This was done with:
      
      #!/bin/bash
      mach_dir_old="arch/arm/plat-omap/include/mach"
      plat_dir_new="arch/arm/plat-omap/include/plat"
      headers=$(cd $mach_dir_old && ls *.h)
      omap_dirs="arch/arm/*omap*/ \
      drivers/video/omap \
      sound/soc/omap"
      other_files="drivers/leds/leds-ams-delta.c \
      drivers/mfd/menelaus.c \
      drivers/mfd/twl4030-core.c \
      drivers/mtd/nand/ams-delta.c"
      
      for header in $headers; do
      	old="#include <mach\/$header"
      	new="#include <plat\/$header"
      	for dir in $omap_dirs; do
      		find $dir -type f -name \*.[chS] | \
      			xargs sed -i "s/$old/$new/"
      	done
      	find drivers/ -type f -name \*omap*.[chS] | \
      		xargs sed -i "s/$old/$new/"
      	for file in $other_files; do
      		sed -i "s/$old/$new/" $file
      	done
      done
      
      for header in $(ls $mach_dir_old/*.h); do
      	git mv $header $plat_dir_new/
      done
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      ce491cf8
  20. 17 10月, 2009 1 次提交
  21. 25 9月, 2009 2 次提交
  22. 04 9月, 2009 1 次提交
    • P
      OMAP2/3 board-*.c files: read bootloader configuration earlier · b3c6df3a
      Paul Walmsley 提交于
      Most board-*.c files read configuration data from the bootloader in
      their .init_machine() function.  This needs to happen earlier, at some
      point before omap2_init_common_hw() is called.  This is because a
      future patch will use the bootloader serial console port information
      to enable the UART clocks earlier, immediately after omap2_clk_init().
      This is in turn necessary since otherwise clock tree usecounts on
      clocks like dpll4_m2x2_ck will be bogus, which can cause the
      currently-active console UART clock to be disabled during boot.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      b3c6df3a
  23. 03 9月, 2009 2 次提交