Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
fed3d35b
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
fed3d35b
编写于
11月 12, 2010
作者:
U
Uwe Kleine-König
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ARM: mx3: dynamically allocate mxc_rnga devices
Signed-off-by:
N
Uwe Kleine-König
<
u.kleine-koenig@pengutronix.de
>
上级
6a697e3d
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
62 addition
and
20 deletion
+62
-20
arch/arm/mach-mx3/Kconfig
arch/arm/mach-mx3/Kconfig
+1
-1
arch/arm/mach-mx3/devices.c
arch/arm/mach-mx3/devices.c
+0
-18
arch/arm/mach-mx3/devices.h
arch/arm/mach-mx3/devices.h
+0
-1
arch/arm/plat-mxc/devices/Kconfig
arch/arm/plat-mxc/devices/Kconfig
+4
-0
arch/arm/plat-mxc/devices/Makefile
arch/arm/plat-mxc/devices/Makefile
+1
-0
arch/arm/plat-mxc/devices/platform-mxc_rnga.c
arch/arm/plat-mxc/devices/platform-mxc_rnga.c
+56
-0
未找到文件。
arch/arm/mach-mx3/Kconfig
浏览文件 @
fed3d35b
...
...
@@ -12,7 +12,7 @@ config ARCH_MX35
config SOC_IMX31
bool
select
ARCH_HAS
_RNGA
select
IMX_HAVE_PLATFORM_MXC
_RNGA
select ARCH_MXC_AUDMUX_V2
select ARCH_MX31
...
...
arch/arm/mach-mx3/devices.c
浏览文件 @
fed3d35b
...
...
@@ -29,23 +29,6 @@
#include "devices.h"
#ifdef CONFIG_ARCH_MX31
static
struct
resource
rnga_resources
[]
=
{
{
.
start
=
MX3x_RNGA_BASE_ADDR
,
.
end
=
MX3x_RNGA_BASE_ADDR
+
0x28
,
.
flags
=
IORESOURCE_MEM
,
},
};
struct
platform_device
mxc_rnga_device
=
{
.
name
=
"mxc_rnga"
,
.
id
=
-
1
,
.
num_resources
=
1
,
.
resource
=
rnga_resources
,
};
#endif
/* CONFIG_ARCH_MX31 */
/* i.MX31 Image Processing Unit */
/* The resource order is important! */
...
...
@@ -262,7 +245,6 @@ static int __init mx3_devices_init(void)
if
(
cpu_is_mx31
())
{
imx_wdt_resources
[
0
].
start
=
MX31_WDOG_BASE_ADDR
;
imx_wdt_resources
[
0
].
end
=
MX31_WDOG_BASE_ADDR
+
0x3fff
;
mxc_register_device
(
&
mxc_rnga_device
,
NULL
);
}
#endif
#if defined(CONFIG_ARCH_MX35)
...
...
arch/arm/mach-mx3/devices.h
浏览文件 @
fed3d35b
...
...
@@ -5,7 +5,6 @@ extern struct platform_device mxc_otg_udc_device;
extern
struct
platform_device
mxc_otg_host
;
extern
struct
platform_device
mxc_usbh1
;
extern
struct
platform_device
mxc_usbh2
;
extern
struct
platform_device
mxc_rnga_device
;
extern
struct
platform_device
imx_wdt_device0
;
extern
struct
platform_device
imx_rtc_device0
;
extern
struct
platform_device
imx_kpp_device
;
arch/arm/plat-mxc/devices/Kconfig
浏览文件 @
fed3d35b
...
...
@@ -62,6 +62,10 @@ config IMX_HAVE_PLATFORM_MXC_NAND
config IMX_HAVE_PLATFORM_MXC_PWM
bool
config IMX_HAVE_PLATFORM_MXC_RNGA
bool
select ARCH_HAS_RNGA
config IMX_HAVE_PLATFORM_MXC_W1
bool
...
...
arch/arm/plat-mxc/devices/Makefile
浏览文件 @
fed3d35b
...
...
@@ -19,5 +19,6 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_EHCI) += platform-mxc-ehci.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_MMC)
+=
platform-mxc-mmc.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_NAND)
+=
platform-mxc_nand.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_PWM)
+=
platform-mxc_pwm.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_RNGA)
+=
platform-mxc_rnga.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_W1)
+=
platform-mxc_w1.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX)
+=
platform-spi_imx.o
arch/arm/plat-mxc/devices/platform-mxc_rnga.c
0 → 100644
浏览文件 @
fed3d35b
/*
* Copyright (C) 2010 Pengutronix
* Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 2 as published by the
* Free Software Foundation.
*/
#include <mach/hardware.h>
#include <mach/devices-common.h>
struct
imx_mxc_rnga_data
{
resource_size_t
iobase
;
};
#define imx_mxc_rnga_data_entry_single(soc) \
{ \
.iobase = soc ## _RNGA_BASE_ADDR, \
}
#ifdef CONFIG_SOC_IMX31
static
const
struct
imx_mxc_rnga_data
imx31_mxc_rnga_data
__initconst
=
imx_mxc_rnga_data_entry_single
(
MX31
);
#endif
/* ifdef CONFIG_SOC_IMX31 */
static
struct
platform_device
*
__init
imx_add_mxc_rnga
(
const
struct
imx_mxc_rnga_data
*
data
)
{
struct
resource
res
[]
=
{
{
.
start
=
data
->
iobase
,
.
end
=
data
->
iobase
+
SZ_16K
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
};
return
imx_add_platform_device
(
"mxc_rnga"
,
-
1
,
res
,
ARRAY_SIZE
(
res
),
NULL
,
0
);
}
static
int
__init
imxXX_add_mxc_rnga
(
void
)
{
struct
platform_device
*
ret
;
#if defined(CONFIG_SOC_IMX31)
if
(
cpu_is_mx31
())
ret
=
imx_add_mxc_rnga
(
&
imx31_mxc_rnga_data
);
else
#endif
/* if defined(CONFIG_SOC_IMX31) */
ret
=
ERR_PTR
(
-
ENODEV
);
if
(
IS_ERR
(
ret
))
return
PTR_ERR
(
ret
);
return
0
;
}
arch_initcall
(
imxXX_add_mxc_rnga
);
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录