Serial ports are incorrectly setup, and don't correctly release interrupts

Bug #1169324 reported by Michael O
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Arndale
Fix Released
Undecided
Unassigned
linaro-landing-team-samsung
Fix Released
Low
Tushar Behera

Bug Description

The GPIO pins on the Exynos5 for the UARTs are not being configured.
(They work at the moment by accident; u-boot sets some of them up and the configuration isn't cleared).

The GPIO ports should be explicitly configured for special function 2 and the pull-down mode turned off.

In addition, the serial driver never releases the interrupt on shutdown, but it does repeatedly acquire it on startup.
This leads to such entertainment as:

# cat /proc/interrupts
           CPU0 CPU1
 29: 0 0 GIC arch_timer
 30: 526385 86260 GIC arch_timer
 66: 0 0 GIC dma-pl330.0
 67: 0 0 GIC dma-pl330.1
 83: 39 0 GIC exynos4210-uart.0, exynos4210-uart.0, exynos4210-uart.0, exynos4210-uart.0, exynos4210-uart.0, exynos4210-uart.0, exynos4210-uart.0, exynos4210-uart.0, exynos4210-uart.0, exynos4210-uart.0, exynos4210-uart.0
 84: 25 0 GIC exynos4210-uart.1, exynos4210-uart.1
 85: 69 0 GIC exynos4210-uart.2, exynos4210-uart.2, exynos4210-uart.2, exynos4210-uart.2, exynos4210-uart.2, exynos4210-uart.2, exynos4210-uart.2, exynos4210-uart.2, exynos4210-uart.2
 86: 452 0 GIC exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3, exynos4210-uart.3

The patch (attached) adds the relevant GPIO pins to the dts file, and extends the driver to use them for setup.
In addition, the interrupts are now correctly free'd on shutdown.

Revision history for this message
Michael O (m-3) wrote :
Changed in linaro-landing-team-samsung:
milestone: none → 2013.04
Revision history for this message
Tushar Behera (tusharbehera) wrote :

The respective GPIO pins are already set in the u-boot, hence it is not required to explicitly set them again in the driver. Do you find any specific issue with the GPIO pins not getting configured in kernel?

The shutdown hook is a valid one and will be applied to Samsung LT tree.

Revision history for this message
Tushar Behera (tusharbehera) wrote :

Additionally, can I get a Signed-off-by for the patch that you have submitted so that I can add you as the author of the patch?

For reference, the content of the applied patch is attached.

Fathi Boudra (fboudra)
Changed in arndale:
status: New → Incomplete
Changed in linaro-landing-team-samsung:
status: New → Incomplete
Changed in linaro-landing-team-samsung:
status: Incomplete → Fix Committed
Changed in arndale:
status: Incomplete → Fix Committed
Changed in linaro-landing-team-samsung:
assignee: nobody → Tushar Behera (tusharbehera)
importance: Undecided → Low
Revision history for this message
Michael O (m-3) wrote :

The main problem in the kernel was that the GPIO pins still had the pull-down turned on. (They were not marked as allocated in the gpio structures which was annoying in debugging).

Re signed-off: I'm ignorant of this proceedure: Can you point me to a doc describing what I should do?

Revision history for this message
Fathi Boudra (fboudra) wrote : Re: [Bug 1169324] Re: Serial ports are incorrectly setup, and don't correctly release interrupts

> Re signed-off: I'm ignorant of this proceedure: Can you point me to a
> doc describing what I should do?

https://www.kernel.org/doc/Documentation/SubmittingPatches

Revision history for this message
Tushar Behera (tusharbehera) wrote :

After checking u-boot source, I found that the GPIO pins are not getting fully configured in u-boot and this patch should get applied.

As we are moving to use pinctrol in 3.10, it would be better to migrate this patch to pinctrol and post after 3.10-rc1 is released.

Changed in linaro-landing-team-samsung:
status: Fix Committed → Fix Released
Changed in arndale:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.