General TC > General TC Talk

[SOLVED] TC Max Serial Port Baudrate

<< < (8/9) > >>

aj:

--- Quote from: Rich on June 05, 2013, 11:56:06 AM ---Hi aj
I see some code that seems to indicate it supports both UARTs. After you try to set ttyS1 execute:

--- Code: ---dmesg | tail
--- End code ---
and see if the driver logged any messages.

--- End quote ---

Hi Rich

dmesg | tail :
------------------------------------------------------
UART 0 clock speed: 0x0
UART 0 clock speed: 0x2
Entering bdlab mode to change the UART speed
Baudrate divisor low register: 0x60
Baudrate divisor: 0x6000
Baudrate divisor low register: 0x1
Baudrate divisor: 0x100
Leaving bdlab mode
setserial sets custom speed on ttyS0. This is deprecated.
setserial sets custom speed on ttyS1. This is deprecated.
------------------------------------------------------

Thanks

Rich:
Hi aj
Can I ask you to try that again with:

--- Code: ---dmesg | tail -n 20
--- End code ---

aj:

--- Quote from: Rich on June 05, 2013, 12:09:46 PM ---Hi aj
Can I ask you to try that again with:

--- Code: ---dmesg | tail -n 20
--- End code ---

--- End quote ---

Hi Rich,

-----------------------------------------------------------------------------------------------------
ACPI: resource (null) [io  0x0480-0x04bf] conflicts with ACPI region GPIO [io 0x480-0x4bf]
ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
lpc_sch: probe of 0000:00:1f.0 failed with error -16
ACPI: Deprecated procfs I/F for AC is loaded, please retry with CONFIG_ACPI_PROCFS_POWER cleared
ACPI: AC Adapter [ADP1] (on-line)
input: PC Speaker as /devices/platform/pcspkr/input/input3
Adding 126656k swap on /dev/zram0.  Priority:-1 extents:1 across:126656k SS
squashfs: version 4.0 (2009/01/31) Phillip Lougher
EXT4-fs (sda1): warning: maximal mount count reached, running e2fsck is recommended
EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
W83627HF fast serial port driver 0.1 loaded
Uart port address seems to be: 0x2f8
UART 0 clock speed: 0x0
UART 0 clock speed: 0x2
Entering bdlab mode to change the UART speed
Baudrate divisor low register: 0x60
Baudrate divisor: 0x6000
Baudrate divisor low register: 0x1
Baudrate divisor: 0x100
Leaving bdlab mode
setserial sets custom speed on ttyS1. This is deprecated.
-----------------------------------------------------------------------------------------------------

Thanks

Rich:
Hi aj
As a quick test, open the source file, go to the  w83627_set_serial  routine, and change:

--- Code: --- w83627_set_uart_clock(WDT_CLOCK_2400000,0);
clock = w83627_get_uart_clock(WDT_UART0); /* UART 0 clock speed */
printk(KERN_INFO "UART 0 clock speed: 0x%x\n", clock);
--- End code ---
To:

--- Code: --- w83627_set_uart_clock(WDT_CLOCK_2400000,0);
clock = w83627_get_uart_clock(WDT_UART0); /* UART 0 clock speed */
printk(KERN_INFO "UART 0 clock speed: 0x%x\n", clock);
w83627_set_uart_clock(WDT_CLOCK_2400000,1);
--- End code ---
Recompile the driver and see if ttyS1 can now be programmed to run at the higher speed.
Sorry for the delay. I'm still trying to get a grip on how this driver is supposed to work.

aj:

--- Quote from: Rich on June 06, 2013, 08:19:53 AM ---Hi aj
As a quick test, open the source file, go to the  w83627_set_serial  routine, and change:

--- Code: --- w83627_set_uart_clock(WDT_CLOCK_2400000,0);
clock = w83627_get_uart_clock(WDT_UART0); /* UART 0 clock speed */
printk(KERN_INFO "UART 0 clock speed: 0x%x\n", clock);
--- End code ---
To:

--- Code: --- w83627_set_uart_clock(WDT_CLOCK_2400000,0);
clock = w83627_get_uart_clock(WDT_UART0); /* UART 0 clock speed */
printk(KERN_INFO "UART 0 clock speed: 0x%x\n", clock);
w83627_set_uart_clock(WDT_CLOCK_2400000,1);
--- End code ---
Recompile the driver and see if ttyS1 can now be programmed to run at the higher speed.
Sorry for the delay. I'm still trying to get a grip on how this driver is supposed to work.

--- End quote ---

Hi Rich,

I will try this alteration. You don't have to be sorry because you are helping me a lot :)
I contacted Tony Lindgren (driver's developer) and he suggested this:
-------------------------------------------------------------------------------
This is a bug:
/*
* Reads the UART clock source speed
*/
 static int w83627_get_uart_clock(int uartno)
{
...
return (clock & 0x2); // bug here – must 3 in order to mask 2 bits
}

same thing with set clock
maybe try fixing the above in the patch?
-----------------------------------------------------------------------------

Thanks for the support

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version