Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gsplhtlxg
clone-Linux
提交
d112f4e4
C
clone-Linux
项目概览
gsplhtlxg
/
clone-Linux
通知
2
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
clone-Linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d112f4e4
编写于
6月 22, 2010
作者:
U
Uwe Kleine-König
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ARM: imx: dynamically register imx-uart devices (imx1)
Signed-off-by:
N
Uwe Kleine-König
<
u.kleine-koenig@pengutronix.de
>
上级
2db68237
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
30 addition
and
57 deletion
+30
-57
arch/arm/mach-imx/Kconfig
arch/arm/mach-imx/Kconfig
+2
-0
arch/arm/mach-imx/devices-imx1.h
arch/arm/mach-imx/devices-imx1.h
+5
-0
arch/arm/mach-imx/devices.c
arch/arm/mach-imx/devices.c
+0
-31
arch/arm/mach-imx/devices.h
arch/arm/mach-imx/devices.h
+0
-2
arch/arm/mach-imx/mach-mx1ads.c
arch/arm/mach-imx/mach-mx1ads.c
+8
-9
arch/arm/mach-imx/mach-scb9328.c
arch/arm/mach-imx/mach-scb9328.c
+3
-3
arch/arm/plat-mxc/include/mach/mx1.h
arch/arm/plat-mxc/include/mach/mx1.h
+12
-12
未找到文件。
arch/arm/mach-imx/Kconfig
浏览文件 @
d112f4e4
...
...
@@ -17,11 +17,13 @@ config ARCH_MX1ADS
bool "MX1ADS platform"
select MACH_MXLADS
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_UART
help
Say Y here if you are using Motorola MX1ADS/MXLADS boards
config MACH_SCB9328
bool "Synertronixx scb9328"
select IMX_HAVE_PLATFORM_IMX_UART
help
Say Y here if you are using a Synertronixx scb9328 board
...
...
arch/arm/mach-imx/devices-imx1.h
浏览文件 @
d112f4e4
...
...
@@ -11,3 +11,8 @@
#define imx1_add_i2c_imx(pdata) \
imx_add_imx_i2c(0, MX1_I2C_BASE_ADDR, SZ_4K, MX1_INT_I2C, pdata)
#define imx1_add_imx_uart0(pdata) \
imx_add_imx_uart_3irq(0, MX1_UART1_BASE_ADDR, 0xd0, MX1_INT_UART1RX, MX1_INT_UART1TX, MX1_INT_UART1RTS, pdata)
#define imx1_add_imx_uart1(pdata) \
imx_add_imx_uart_3irq(0, MX1_UART2_BASE_ADDR, 0xd0, MX1_INT_UART2RX, MX1_INT_UART2TX, MX1_INT_UART2RTS, pdata)
arch/arm/mach-imx/devices.c
浏览文件 @
d112f4e4
...
...
@@ -70,37 +70,6 @@ struct platform_device imx1_camera_device = {
.
num_resources
=
ARRAY_SIZE
(
imx1_camera_resources
),
};
#define DEFINE_IMX1_UART_DEVICE(n, baseaddr, irqrx, irqtx, irqrts) \
static struct resource imx1_uart_resources ## n[] = { \
{ \
.start = baseaddr, \
.end = baseaddr + 0xd0, \
.flags = IORESOURCE_MEM, \
}, { \
.start = irqrx, \
.end = irqrx, \
.flags = IORESOURCE_IRQ, \
}, { \
.start = irqtx, \
.end = irqtx, \
.flags = IORESOURCE_IRQ, \
}, { \
.start = irqrts, \
.end = irqrts, \
.flags = IORESOURCE_IRQ, \
}, \
}; \
\
struct platform_device imx1_uart_device ## n = { \
.name = "imx-uart", \
.id = n, \
.num_resources = ARRAY_SIZE(imx1_uart_resources ## n), \
.resource = imx1_uart_resources ## n, \
}
DEFINE_IMX1_UART_DEVICE
(
0
,
MX1_UART1_BASE_ADDR
,
MX1_UART1_MINT_RX
,
MX1_UART1_MINT_TX
,
MX1_UART1_MINT_RTS
);
DEFINE_IMX1_UART_DEVICE
(
1
,
MX1_UART2_BASE_ADDR
,
MX1_UART2_MINT_RX
,
MX1_UART2_MINT_TX
,
MX1_UART2_MINT_RTS
);
static
struct
resource
imx_rtc_resources
[]
=
{
{
.
start
=
0x00204000
,
...
...
arch/arm/mach-imx/devices.h
浏览文件 @
d112f4e4
#ifdef CONFIG_ARCH_MX1
extern
struct
platform_device
imx1_camera_device
;
extern
struct
platform_device
imx1_uart_device0
;
extern
struct
platform_device
imx1_uart_device1
;
extern
struct
platform_device
imx_rtc_device
;
extern
struct
platform_device
imx_wdt_device
;
extern
struct
platform_device
imx_usb_device
;
...
...
arch/arm/mach-imx/mach-mx1ads.c
浏览文件 @
d112f4e4
...
...
@@ -26,7 +26,6 @@
#include <mach/common.h>
#include <mach/hardware.h>
#include <mach/i2c.h>
#include <mach/imx-uart.h>
#include <mach/iomux-mx1.h>
#include <mach/irqs.h>
...
...
@@ -59,12 +58,12 @@ static int mx1ads_pins[] = {
* UARTs platform data
*/
static
struct
imxuart_platform_data
uart_pdata
[]
=
{
{
static
const
struct
imxuart_platform_data
uart0_pdata
__initconst
=
{
.
flags
=
IMXUART_HAVE_RTSCTS
,
},
{
};
static
const
struct
imxuart_platform_data
uart1_pdata
__initconst
=
{
.
flags
=
IMXUART_HAVE_RTSCTS
,
},
};
/*
...
...
@@ -122,8 +121,8 @@ static void __init mx1ads_init(void)
ARRAY_SIZE
(
mx1ads_pins
),
"mx1ads"
);
/* UART */
mxc_register_device
(
&
imx1_uart_device0
,
&
uart_pdata
[
0
]
);
mxc_register_device
(
&
imx1_uart_device1
,
&
uart_pdata
[
1
]
);
imx1_add_imx_uart0
(
&
uart0_pdata
);
imx1_add_imx_uart1
(
&
uart1_pdata
);
/* Physmap flash */
mxc_register_device
(
&
flash_device
,
&
mx1ads_flash_data
);
...
...
arch/arm/mach-imx/mach-scb9328.c
浏览文件 @
d112f4e4
...
...
@@ -22,9 +22,9 @@
#include <mach/common.h>
#include <mach/hardware.h>
#include <mach/irqs.h>
#include <mach/imx-uart.h>
#include <mach/iomux-mx1.h>
#include "devices-imx1.h"
#include "devices.h"
/*
...
...
@@ -114,7 +114,7 @@ static void uart1_mxc_exit(struct platform_device *pdev)
ARRAY_SIZE
(
mxc_uart1_pins
));
}
static
struct
imxuart_platform_data
uart_pdata
=
{
static
const
struct
imxuart_platform_data
uart_pdata
__initconst
=
{
.
init
=
uart1_mxc_init
,
.
exit
=
uart1_mxc_exit
,
.
flags
=
IMXUART_HAVE_RTSCTS
,
...
...
@@ -130,7 +130,7 @@ static struct platform_device *devices[] __initdata = {
*/
static
void
__init
scb9328_init
(
void
)
{
mxc_register_device
(
&
imx1_uart_device0
,
&
uart_pdata
);
imx1_add_imx_uart0
(
&
uart_pdata
);
printk
(
KERN_INFO
"Scb9328: Adding devices
\n
"
);
platform_add_devices
(
devices
,
ARRAY_SIZE
(
devices
));
...
...
arch/arm/plat-mxc/include/mach/mx1.h
浏览文件 @
d112f4e4
...
...
@@ -91,18 +91,18 @@
#define MX1_SIM_DATA_INT 16
#define MX1_RTC_INT 17
#define MX1_RTC_SAMINT 18
#define MX1_
UART2_MINT_
PFERR 19
#define MX1_
UART2_MINT_
RTS 20
#define MX1_
UART2_MINT_
DTR 21
#define MX1_
UART2_MINT_
UARTC 22
#define MX1_
UART2_MINT_TX
23
#define MX1_
UART2_MINT_RX
24
#define MX1_
UART1_MINT_
PFERR 25
#define MX1_
UART1_MINT_
RTS 26
#define MX1_
UART1_MINT_
DTR 27
#define MX1_
UART1_MINT_
UARTC 28
#define MX1_
UART1_MINT_TX
29
#define MX1_
UART1_MINT_RX
30
#define MX1_
INT_UART2
PFERR 19
#define MX1_
INT_UART2
RTS 20
#define MX1_
INT_UART2
DTR 21
#define MX1_
INT_UART2
UARTC 22
#define MX1_
INT_UART2TX
23
#define MX1_
INT_UART2RX
24
#define MX1_
INT_UART1
PFERR 25
#define MX1_
INT_UART1
RTS 26
#define MX1_
INT_UART1
DTR 27
#define MX1_
INT_UART1
UARTC 28
#define MX1_
INT_UART1TX
29
#define MX1_
INT_UART1RX
30
#define MX1_VOICE_DAC_INT 31
#define MX1_VOICE_ADC_INT 32
#define MX1_PEN_DATA_INT 33
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录