2010-03-22 03:06:04     GPIO被保留怎么修改?

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

2010-03-22 03:06:04     GPIO被保留怎么修改?

zhang zhihua (CHINA)

Message: 87540   

 

BF518F-EZBRD,我现在想使用PH2、PH3、PH4来扩展串口(16C2552),PH3、PH4作为两个外部中断(INTA、INTB)的输入,但是在使用request_irq()申请中断号IRQ_PH3、IRQ_PH4的时候却出现了问题,IRQ_PH4能申请成功,但是IRQ_PH3却出现以下错误:

 

bfin-gpio: GPIO 35 is already reserved as Peripheral by bfin-spi !

setting trigger mode 2 for irq 106 failed (_bfin_gpio_irq_type+0x0/0x154)

Request the IRQ failed!

 

在内核里面修改哪个文件可以修改呢?因为在以前的使用过程当中IRQ_PH3没使用到,所以我现在想屏蔽掉以前系统中reserved的这个中断号,使他能为我所用呢?

 

root:~> cat /proc/gpio时显示如下:

GPIO_0:         bfin_mac                Peripheral

GPIO_1:         bfin_mac                GPIO INPUT

GPIO_2:         bfin_mac                GPIO INPUT

GPIO_3:         bfin_mac                GPIO INPUT

GPIO_4:         bfin_mac                Peripheral

GPIO_5:         bfin_mac                Peripheral

GPIO_6:         bfin_mac                GPIO INPUT

GPIO_7:         ksz8893m                GPIO INPUT

GPIO_8:         bfin_mac                Peripheral

GPIO_9:         bfin_mac                Peripheral

GPIO_10:        bfin_mac                Peripheral

GPIO_11:        bfin_mac                Peripheral

GPIO_12:        bfin_mac                Peripheral

GPIO_13:        bfin_mac                Peripheral

GPIO_14:        bfin_mac                Peripheral

GPIO_15:        bfin_mac                Peripheral

GPIO_16:        bfin_mac                Peripheral

GPIO_17:        bfin_mac                Peripheral

GPIO_18:        bfin_mac                Peripheral

GPIO_19:        bfin-sdh                Peripheral

GPIO_20:        bfin-sdh                Peripheral

GPIO_21:        bfin-sdh                Peripheral

GPIO_22:        bfin-sdh                Peripheral

GPIO_23:        bfin-sdh                Peripheral

GPIO_24:        bfin-sdh                Peripheral

GPIO_25:        bfin-uart               Peripheral

GPIO_26:        bfin-uart               Peripheral

GPIO_27:        ParaFlash               Peripheral

GPIO_28:        bfin-spi                Peripheral

GPIO_29:        bfin-spi                Peripheral

GPIO_30:        bfin-spi                Peripheral

GPIO_31:        m25p80          Peripheral

GPIO_33:        bfin-spi                Peripheral

GPIO_34:        bfin-spi                Peripheral

GPIO_35:        bfin-spi                Peripheral

GPIO_38:        bfin-uart               Peripheral

GPIO_39:        bfin-uart               Peripheral

 

我怎么样修改才能使GPIO_35像GPIO_36 or GPIO_37一样被我使用来作为中断申请呢?don't need to disable the SPI bus!因为GPIO_35一直是空着呢,所以定义成Peripheral  bfin-spi 其实没什么用... ...

TranslateQuoteReplyEditDelete

 

 

2010-03-22 03:11:11     Re: GPIO被保留怎么修改?

Mike Frysinger (UNITED STATES)

Message: 87541   

 

do not post the same question multiple times.  you've already been given the answer.

QuoteReplyEditDelete

 

 

2010-03-22 03:20:52     Re: GPIO被保留怎么修改?

zhang zhihua (CHINA)

Message: 87551   

 

Hi,Mike,

 

if I disable the SPI bus,the system can't work!I want to use it via modify  the kernel,how to do?

TranslateQuoteReplyEditDelete

 

 

2010-03-22 03:24:22     Re: GPIO被保留怎么修改?

Mike Frysinger (UNITED STATES)

Message: 87553   

 

i really have no idea what "the system cant work" means.  Linux can boot up just fine with all SPI support disabled.

 

you need to describe the actual changes you made and the actual errors/output you're seeing.

Attachments

    Outcomes