[#4793] Erroneous check_gpio(ident) in peripheral_free()

Document created by Aaronwu Employee on Aug 30, 2013
Version 1Show Document
  • View in full screen mode

[#4793] Erroneous check_gpio(ident) in peripheral_free()

Submitted By: Michael McTernan

Open Date

2009-01-09 08:01:31     Close Date

2009-01-12 04:49:53

Priority:

Medium     Assignee:

Michael Hennerich

Status:

Closed     Fixed In Release:

N/A

Found In Release:

2008R1.5-RC3     Release:

2008R1.5 an trunk

Category:

Kernel Functions     Board:

Custom

Processor:

BF537     Silicon Revision:

0.3

Is this bug repeatable?:

Yes     Resolution:

Fixed

Uboot version or rev.:

    Toolchain version or rev.:

2008R1.5

App binary format:

N/A     

Summary: Erroneous check_gpio(ident) in peripheral_free()

Details:

 

As per thread:

https://blackfin.uclinux.org/gf/project/uclinux-dist/forum/?action=ForumBrowse&forum_id=39&_forum_action=ForumMessageBrowse&thread_id=31923

 

In blackfin/kernel/bfin_gpio.c, peripheral_free() contains:

 

  if (check_gpio(ident) < 0) 

      return;

 

On the BF537, this bails when trying to release some of the non-gpio lines e.g. P_SPORT0_TFS:

 

#define P_SPORT0_TFS    (P_DEFINED | P_IDENT(PORT_PJ10) | P_FUNCT(0))

#define PORT_PJ10    (GPIO_PH15 + 11)

#define GPIO_PH15          47

#define MAX_BLACKFIN_GPIOS 48

 

So PORT_PJ10 > MAX_BLACKFIN_GPIOS, hence P_SPORT0_TFS and similar pins can never be freed.

 

This looks present on trunk as well as the 2008R1.5 branch.

 

Follow-ups

 

--- Michael Hennerich                                        2009-01-09 08:34:26

Thanks!

Fixed on svn trunk and 2008R1 branch.

 

-Michael

 

--- Michael McTernan                                         2009-01-12 04:34:32

Excellent!

 

Please close (I don't think I have the option to close it myself).

 

--- Michael Hennerich                                        2009-01-12 04:49:53

Close it.

-Michael

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes