Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
bf182bcc
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
bf182bcc
编写于
11月 05, 2010
作者:
U
Uwe Kleine-König
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ARM: imx: dynamically allocate mxc_pwm devices
Signed-off-by:
N
Uwe Kleine-König
<
u.kleine-koenig@pengutronix.de
>
上级
c0624657
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
56 addition
and
20 deletion
+56
-20
arch/arm/mach-imx/devices.c
arch/arm/mach-imx/devices.c
+0
-19
arch/arm/mach-imx/devices.h
arch/arm/mach-imx/devices.h
+0
-1
arch/arm/plat-mxc/devices/Kconfig
arch/arm/plat-mxc/devices/Kconfig
+3
-0
arch/arm/plat-mxc/devices/Makefile
arch/arm/plat-mxc/devices/Makefile
+1
-0
arch/arm/plat-mxc/devices/platform-mxc_pwm.c
arch/arm/plat-mxc/devices/platform-mxc_pwm.c
+45
-0
arch/arm/plat-mxc/include/mach/devices-common.h
arch/arm/plat-mxc/include/mach/devices-common.h
+7
-0
未找到文件。
arch/arm/mach-imx/devices.c
浏览文件 @
bf182bcc
...
...
@@ -77,25 +77,6 @@ int __init imx1_register_gpios(void)
#endif
#if defined(CONFIG_MACH_MX21) || defined(CONFIG_MACH_MX27)
static
struct
resource
mxc_pwm_resources
[]
=
{
{
.
start
=
MX2x_PWM_BASE_ADDR
,
.
end
=
MX2x_PWM_BASE_ADDR
+
SZ_4K
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
{
.
start
=
MX2x_INT_PWM
,
.
end
=
MX2x_INT_PWM
,
.
flags
=
IORESOURCE_IRQ
,
}
};
struct
platform_device
mxc_pwm_device
=
{
.
name
=
"mxc_pwm"
,
.
id
=
0
,
.
num_resources
=
ARRAY_SIZE
(
mxc_pwm_resources
),
.
resource
=
mxc_pwm_resources
,
};
#define DEFINE_MXC_MMC_DEVICE(n, baseaddr, irq, dmareq) \
static struct resource mxc_sdhc_resources ## n[] = { \
{ \
...
...
arch/arm/mach-imx/devices.h
浏览文件 @
bf182bcc
#if defined(CONFIG_MACH_MX21) || defined(CONFIG_MACH_MX27)
extern
struct
platform_device
mxc_pwm_device
;
extern
struct
platform_device
mxc_sdhc_device0
;
extern
struct
platform_device
mxc_sdhc_device1
;
extern
struct
platform_device
mxc_otg_udc_device
;
...
...
arch/arm/plat-mxc/devices/Kconfig
浏览文件 @
bf182bcc
...
...
@@ -40,6 +40,9 @@ config IMX_HAVE_PLATFORM_MX2_CAMERA
config IMX_HAVE_PLATFORM_MXC_NAND
bool
config IMX_HAVE_PLATFORM_MXC_PWM
bool
config IMX_HAVE_PLATFORM_MXC_W1
bool
...
...
arch/arm/plat-mxc/devices/Makefile
浏览文件 @
bf182bcc
...
...
@@ -12,5 +12,6 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UDC) += platform-imx_udc.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_MX1_CAMERA)
+=
platform-mx1-camera.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_MX2_CAMERA)
+=
platform-mx2-camera.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_W1)
+=
platform-mxc_w1.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX)
+=
platform-spi_imx.o
arch/arm/plat-mxc/devices/platform-mxc_pwm.c
0 → 100644
浏览文件 @
bf182bcc
/*
* Copyright (C) 2009-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>
#define imx_mxc_pwm_data_entry_single(soc) \
{ \
.iobase = soc ## _PWM_BASE_ADDR, \
.irq = soc ## _INT_PWM, \
}
#ifdef CONFIG_SOC_IMX21
const
struct
imx_mxc_pwm_data
imx21_mxc_pwm_data
__initconst
=
imx_mxc_pwm_data_entry_single
(
MX21
);
#endif
/* ifdef CONFIG_SOC_IMX21 */
#ifdef CONFIG_SOC_IMX27
const
struct
imx_mxc_pwm_data
imx27_mxc_pwm_data
__initconst
=
imx_mxc_pwm_data_entry_single
(
MX27
);
#endif
/* ifdef CONFIG_SOC_IMX27 */
struct
platform_device
*
__init
imx_add_mxc_pwm
(
const
struct
imx_mxc_pwm_data
*
data
)
{
struct
resource
res
[]
=
{
{
.
start
=
data
->
iobase
,
.
end
=
data
->
iobase
+
SZ_4K
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
{
.
start
=
data
->
irq
,
.
end
=
data
->
irq
,
.
flags
=
IORESOURCE_IRQ
,
},
};
return
imx_add_platform_device
(
"mxc_pwm"
,
0
,
res
,
ARRAY_SIZE
(
res
),
NULL
,
0
);
}
arch/arm/plat-mxc/include/mach/devices-common.h
浏览文件 @
bf182bcc
...
...
@@ -168,6 +168,13 @@ struct platform_device *__init imx_add_mxc_nand(
const
struct
imx_mxc_nand_data
*
data
,
const
struct
mxc_nand_platform_data
*
pdata
);
struct
imx_mxc_pwm_data
{
resource_size_t
iobase
;
resource_size_t
irq
;
};
struct
platform_device
*
__init
imx_add_mxc_pwm
(
const
struct
imx_mxc_pwm_data
*
data
);
struct
imx_mxc_w1_data
{
resource_size_t
iobase
;
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录