mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] ppc32 CPM_UART: fixes and improvements
A number of small issues are fixed, and added the header file, missed from the original series. With this, driver should be pretty stable as tested among both platform-device-driven and "old way" boards. Also added missing GPL statement , and updated year field on existing ones to reflect code update. Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
parent
61f5657c50
commit
6e1976961c
6 changed files with 104 additions and 12 deletions
60
include/linux/fs_uart_pd.h
Normal file
60
include/linux/fs_uart_pd.h
Normal file
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Platform information definitions for the CPM Uart driver.
|
||||
*
|
||||
* 2006 (c) MontaVista Software, Inc.
|
||||
* Vitaly Bordug <vbordug@ru.mvista.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public License
|
||||
* version 2. This program is licensed "as is" without any warranty of any
|
||||
* kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#ifndef FS_UART_PD_H
|
||||
#define FS_UART_PD_H
|
||||
|
||||
#include <linux/version.h>
|
||||
#include <asm/types.h>
|
||||
|
||||
enum fs_uart_id {
|
||||
fsid_smc1_uart,
|
||||
fsid_smc2_uart,
|
||||
fsid_scc1_uart,
|
||||
fsid_scc2_uart,
|
||||
fsid_scc3_uart,
|
||||
fsid_scc4_uart,
|
||||
fs_uart_nr,
|
||||
};
|
||||
|
||||
static inline int fs_uart_id_scc2fsid(int id)
|
||||
{
|
||||
return fsid_scc1_uart + id - 1;
|
||||
}
|
||||
|
||||
static inline int fs_uart_id_fsid2scc(int id)
|
||||
{
|
||||
return id - fsid_scc1_uart + 1;
|
||||
}
|
||||
|
||||
static inline int fs_uart_id_smc2fsid(int id)
|
||||
{
|
||||
return fsid_smc1_uart + id - 1;
|
||||
}
|
||||
|
||||
static inline int fs_uart_id_fsid2smc(int id)
|
||||
{
|
||||
return id - fsid_smc1_uart + 1;
|
||||
}
|
||||
|
||||
struct fs_uart_platform_info {
|
||||
void(*init_ioports)(void);
|
||||
/* device specific information */
|
||||
int fs_no; /* controller index */
|
||||
u32 uart_clk;
|
||||
u8 tx_num_fifo;
|
||||
u8 tx_buf_size;
|
||||
u8 rx_num_fifo;
|
||||
u8 rx_buf_size;
|
||||
u8 brg;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue