2010-10-29 08:45:01     DR1SEC & DT1SEC as GPIO when using sport-uart module

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

2010-10-29 08:45:01     DR1SEC & DT1SEC as GPIO when using sport-uart module

Julien Vermillard (FRANCE)

Message: 95399   

 

Hi,

 

I'm using sport-uart driver on sport 1. As far as I understand it, it's not using the pin DR1SEC and DT1SEC.

 

But when I try to convert the two pin as gpio (using userland /sys/class/gpio/export) I have the following kernel message :

 

bfin-gpio: GPIO 24 is already reserved as Peripheral by bfin-sport-uart !

bfin-gpio: GPIO 25 is already reserved as Peripheral by bfin-sport-uart !

 

Using the SPORT1 really prevent to use those unused pin as GPIO ?

 

Julien

QuoteReplyEditDelete

 

 

2010-10-31 22:17:07     Re: DR1SEC & DT1SEC as GPIO when using sport-uart module

Aaron Wu (CHINA)

Message: 95424   

 

Hi,

 

What's the software version fore the distribustion are you using?

QuoteReplyEditDelete

 

 

2010-10-31 22:52:18     Re: DR1SEC & DT1SEC as GPIO when using sport-uart module

Sonic Zhang (CHINA)

Message: 95428   

 

The PINs of a peripheral is resered at once no matter if it is really used according to current peripheral management framework.

QuoteReplyEditDelete

 

 

2010-11-02 04:38:20     Re: DR1SEC & DT1SEC as GPIO when using sport-uart module

Julien Vermillard (FRANCE)

Message: 95472   

 

I'm using last svn trunk  : 2.6.36-ADI-2011R1-pre

 

 

Ok I understand the sport driver reserve the pin. but can I modify the sport-uart driver to release them ? according to the Harware Manuel it should work no ?

QuoteReplyEditDelete

 

 

2010-11-02 04:44:54     Re: DR1SEC & DT1SEC as GPIO when usingsport-uart module

Michael Hennerich (GERMANY)

Message: 95473    Remove the secondary channels from bfin_sport0_peripherals...

 

#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)

#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART

static struct resource bfin_sport0_uart_resources[] = {

{

.start = SPORT0_TCR1,

.end = SPORT0_MRCS3+4,

.flags = IORESOURCE_MEM,

},

{

.start = IRQ_SPORT0_RX,

.end = IRQ_SPORT0_RX+1,

.flags = IORESOURCE_IRQ,

},

{

.start = IRQ_SPORT0_ERROR,

.end = IRQ_SPORT0_ERROR,

.flags = IORESOURCE_IRQ,

},

};

 

unsigned short bfin_sport0_peripherals[] = {

P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,

P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0

};

 

static struct platform_device bfin_sport0_uart_device = {

.name = "bfin-sport-uart",

.id = 0,

.num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),

.resource = bfin_sport0_uart_resources,

.dev = {

.platform_data = &bfin_sport0_peripherals, /* Passed to driver */

},

};

#endif

QuoteReplyEditDelete

 

 

2010-11-02 05:48:21     Re: DR1SEC & DT1SEC as GPIO when usingsport-uart module

Julien Vermillard (FRANCE)

Message: 95479   

 

Thanks Michael ! I going to test that later this week.

 

Julien

QuoteReplyEditDelete

 

 

2010-11-02 10:33:56     Re: DR1SEC & DT1SEC as GPIO when usingsport-uart module

Julien Vermillard (FRANCE)

Message: 95487   

 

Ok It did the job for my case.

 

Perhaps it should be done in trunk too ? Because in no case the sport UART is supposed to use the secondary signal.

QuoteReplyEditDelete

Attachments

    Outcomes