2010-12-23 23:25:20     Question:BF561 & ST16C2552 ?

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

2010-12-23 23:25:20     Question:BF561 & ST16C2552 ?

HappyBlackfin Blackfin (CHINA)

Message: 96974   

 

Processor: BF561 0.5

 

ucLinux Release:Linux version 2.6.28.10-ADI-2009R1 (root@LinuxS1) (gcc version 4.1.2(ADI SVN))#79 SMP

 

Hardware resource:

 

Address map:

 

BF561 A2 to ST16C2552 A0

 

BF561 A3 to ST16C2552 A1

 

BF561 A4 to ST16C2552 A2

 

BF561 A5 to ST16C2552 CHSEL (such as A3)

 

BF561 #AMS3 to ST16C2552 #CS

 

Interrupt map:

 

BF561 PF12 to ST16C2552 INTB

 

BF561 PF11 to ST16C2552 INTA

 

 

 

Source code:

 

\mach=bf561\boards\ezkit.c we add:

 

#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)

 

#include <linux/serial_8250.h>

 

#include <linux/serial.h>

 

static struct plat_serial8250_port serial8250_platform_data [] = {

 

{ .membase = (void *)0x2C000000,

 

.mapbase = 0x2C000000,

 

.irq = IRQ_PF12,

 

.flags = UPF_BOOT_AUTOCONF | UART_CONFIG_TYPE,

 

.iotype = UPIO_MEM,

 

.regshift = 2,

 

.uartclk = 14745000,

 

}, {

 

.membase = (void *)0x2C000008,

 

.mapbase = 0x2C000008,

 

.irq = IRQ_PF11,

 

.flags = UPF_BOOT_AUTOCONF | UART_CONFIG_TYPE,

 

.iotype = UPIO_MEM,

 

.regshift = 2,

 

.uartclk = 14745000,

 

}, {

 

}

 

};

 

static struct platform_device serial8250_device = {

 

.id = PLAT8250_DEV_PLATFORM,

 

.name = "serial8250",

 

.dev = {

 

.platform_data = serial8250_platform_data,

 

},

 

};

 

#endif

 

.................

 

static struct platform_device *ezkit_devices[] __initdata = {

 

........

 

#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)

 

&serial8250_device,

 

#endif

 

.......

 

}

 

 

 

Boot info:

 

Serial: 8250/16550 driver2 ports, IRQ sharing disabled

 

serial8250.0: ttyS0 at MMIO 0x2c000000 (irq = 85) is a 16550A

 

Serial: Blackfin serial driver

 

bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 35) is a BFIN-UART

 

 

 

Test:

 

root:/> echo "hellolinux for blackfin" > /dev/ttyS0

 

Then can see signal on ST16C2552  UART B TX pin.

 

 

 

Question:

 

Why only one UART register successful?

 

How to do?

 

 

 

Thanks!

Attachments

    Outcomes