Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
c6987159
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看板
提交
c6987159
编写于
6月 16, 2010
作者:
U
Uwe Kleine-König
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ARM: imx: dynamically register imx-i2c devices (imx27)
Signed-off-by:
N
Uwe Kleine-König
<
u.kleine-koenig@pengutronix.de
>
上级
a8ff0456
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
24 addition
and
49 deletion
+24
-49
arch/arm/mach-imx/Kconfig
arch/arm/mach-imx/Kconfig
+5
-0
arch/arm/mach-imx/devices-imx27.h
arch/arm/mach-imx/devices-imx27.h
+5
-0
arch/arm/mach-imx/devices.c
arch/arm/mach-imx/devices.c
+0
-26
arch/arm/mach-imx/devices.h
arch/arm/mach-imx/devices.h
+0
-4
arch/arm/mach-imx/mach-cpuimx27.c
arch/arm/mach-imx/mach-cpuimx27.c
+2
-3
arch/arm/mach-imx/mach-mx27ads.c
arch/arm/mach-imx/mach-mx27ads.c
+2
-3
arch/arm/mach-imx/mach-mxt_td60.c
arch/arm/mach-imx/mach-mxt_td60.c
+4
-5
arch/arm/mach-imx/mach-pca100.c
arch/arm/mach-imx/mach-pca100.c
+2
-3
arch/arm/mach-imx/mach-pcm038.c
arch/arm/mach-imx/mach-pcm038.c
+2
-3
arch/arm/plat-mxc/include/mach/mx27.h
arch/arm/plat-mxc/include/mach/mx27.h
+2
-2
未找到文件。
arch/arm/mach-imx/Kconfig
浏览文件 @
c6987159
...
...
@@ -82,6 +82,7 @@ comment "MX27 platforms:"
config MACH_MX27ADS
bool "MX27ADS platform"
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_MXC_NAND
help
Include support for MX27ADS platform. This includes specific
...
...
@@ -89,6 +90,7 @@ config MACH_MX27ADS
config MACH_PCM038
bool "Phytec phyCORE-i.MX27 CPU module (pcm038)"
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_MXC_NAND
select MXC_ULPI if USB_ULPI
help
...
...
@@ -111,6 +113,7 @@ endchoice
config MACH_CPUIMX27
bool "Eukrea CPUIMX27 module"
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_MXC_NAND
help
Include support for Eukrea CPUIMX27 platform. This includes
...
...
@@ -151,6 +154,7 @@ config MACH_IMX27LITE
config MACH_PCA100
bool "Phytec phyCARD-s (pca100)"
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_MXC_NAND
select MXC_ULPI if USB_ULPI
help
...
...
@@ -159,6 +163,7 @@ config MACH_PCA100
config MACH_MXT_TD60
bool "Maxtrack i-MXT TD60"
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_MXC_NAND
help
Include support for i-MXT (aka td60) platform. This
...
...
arch/arm/mach-imx/devices-imx27.h
浏览文件 @
c6987159
...
...
@@ -9,5 +9,10 @@
#include <mach/mx27.h>
#include <mach/devices-common.h>
#define imx27_add_i2c_imx0(pdata) \
imx_add_imx_i2c(0, MX27_I2C1_BASE_ADDR, SZ_4K, MX27_INT_I2C1, pdata)
#define imx27_add_i2c_imx1(pdata) \
imx_add_imx_i2c(1, MX27_I2C2_BASE_ADDR, SZ_4K, MX27_INT_I2C2, pdata)
#define imx27_add_mxc_nand(pdata) \
imx_add_mxc_nand_v1(MX27_NFC_BASE_ADDR, MX27_INT_NANDFC, pdata)
arch/arm/mach-imx/devices.c
浏览文件 @
c6987159
...
...
@@ -368,32 +368,6 @@ struct platform_device mxc_fec_device = {
};
#endif
#ifdef CONFIG_MACH_MX27
#define DEFINE_IMX_I2C_DEVICE(n, baseaddr, irq) \
static struct resource mxc_i2c_resources ## n[] = { \
{ \
.start = baseaddr, \
.end = baseaddr + SZ_4K - 1, \
.flags = IORESOURCE_MEM, \
}, { \
.start = irq, \
.end = irq, \
.flags = IORESOURCE_IRQ, \
} \
}; \
\
struct platform_device mxc_i2c_device ## n = { \
.name = "imx-i2c", \
.id = n, \
.num_resources = ARRAY_SIZE(mxc_i2c_resources ## n), \
.resource = mxc_i2c_resources ## n, \
}
DEFINE_IMX_I2C_DEVICE
(
0
,
MX2x_I2C_BASE_ADDR
,
MX2x_INT_I2C
);
DEFINE_IMX_I2C_DEVICE
(
1
,
MX27_I2C2_BASE_ADDR
,
MX27_INT_I2C2
);
#endif
static
struct
resource
mxc_pwm_resources
[]
=
{
{
.
start
=
MX2x_PWM_BASE_ADDR
,
...
...
arch/arm/mach-imx/devices.h
浏览文件 @
c6987159
...
...
@@ -28,10 +28,6 @@ extern struct platform_device mxc_w1_master_device;
extern
struct
platform_device
mxc_fb_device
;
extern
struct
platform_device
mxc_fec_device
;
extern
struct
platform_device
mxc_pwm_device
;
#ifdef CONFIG_MACH_MX27
extern
struct
platform_device
mxc_i2c_device0
;
extern
struct
platform_device
mxc_i2c_device1
;
#endif
extern
struct
platform_device
mxc_sdhc_device0
;
extern
struct
platform_device
mxc_sdhc_device1
;
extern
struct
platform_device
mxc_otg_udc_device
;
...
...
arch/arm/mach-imx/mach-cpuimx27.c
浏览文件 @
c6987159
...
...
@@ -35,7 +35,6 @@
#include <mach/board-eukrea_cpuimx27.h>
#include <mach/common.h>
#include <mach/hardware.h>
#include <mach/i2c.h>
#include <mach/iomux-mx27.h>
#include <mach/imx-uart.h>
#include <mach/mxc_nand.h>
...
...
@@ -131,7 +130,7 @@ static struct platform_device *platform_devices[] __initdata = {
&
mxc_fec_device
,
};
static
struct
imxi2c_platform_data
eukrea_cpuimx27_i2c_1_data
=
{
static
const
struct
imxi2c_platform_data
cpuimx27_i2c1_data
__initconst
=
{
.
bitrate
=
100000
,
};
...
...
@@ -196,7 +195,7 @@ static void __init eukrea_cpuimx27_init(void)
i2c_register_board_info
(
0
,
eukrea_cpuimx27_i2c_devices
,
ARRAY_SIZE
(
eukrea_cpuimx27_i2c_devices
));
mxc_register_device
(
&
mxc_i2c_device0
,
&
eukrea_cpuimx27_i2c_
1_data
);
imx27_add_i2c_imx1
(
&
cpuimx27_i2c
1_data
);
platform_add_devices
(
platform_devices
,
ARRAY_SIZE
(
platform_devices
));
...
...
arch/arm/mach-imx/mach-mx27ads.c
浏览文件 @
c6987159
...
...
@@ -31,7 +31,6 @@
#include <mach/imx-uart.h>
#include <mach/iomux-mx27.h>
#include <mach/mxc_nand.h>
#include <mach/i2c.h>
#include <mach/imxfb.h>
#include <mach/mmc.h>
...
...
@@ -195,7 +194,7 @@ static struct platform_device mx27ads_nor_mtd_device = {
.
resource
=
&
mx27ads_flash_resource
,
};
static
struct
imxi2c_platform_data
mx27ads_i2c_data
=
{
static
const
struct
imxi2c_platform_data
mx27ads_i2c1_data
__initconst
=
{
.
bitrate
=
100000
,
};
...
...
@@ -322,7 +321,7 @@ static void __init mx27ads_board_init(void)
/* only the i2c master 1 is used on this CPU card */
i2c_register_board_info
(
1
,
mx27ads_i2c_devices
,
ARRAY_SIZE
(
mx27ads_i2c_devices
));
mxc_register_device
(
&
mxc_i2c_device1
,
&
mx27ads_i2c
_data
);
imx27_add_i2c_imx1
(
&
mx27ads_i2c1
_data
);
mxc_register_device
(
&
mxc_fb_device
,
&
mx27ads_fb_data
);
mxc_register_device
(
&
mxc_sdhc_device0
,
&
sdhc1_pdata
);
mxc_register_device
(
&
mxc_sdhc_device1
,
&
sdhc2_pdata
);
...
...
arch/arm/mach-imx/mach-mxt_td60.c
浏览文件 @
c6987159
...
...
@@ -31,7 +31,6 @@
#include <mach/imx-uart.h>
#include <mach/iomux-mx27.h>
#include <mach/mxc_nand.h>
#include <mach/i2c.h>
#include <linux/i2c/pca953x.h>
#include <mach/imxfb.h>
#include <mach/mmc.h>
...
...
@@ -131,7 +130,7 @@ mxt_td60_nand_board_info __initconst = {
.
hw_ecc
=
1
,
};
static
struct
imxi2c_platform_data
mxt_td60_i2c_data
=
{
static
const
struct
imxi2c_platform_data
mxt_td60_i2c0_data
__initconst
=
{
.
bitrate
=
100000
,
};
...
...
@@ -171,7 +170,7 @@ static struct i2c_board_info mxt_td60_i2c_devices[] = {
},
};
static
struct
imxi2c_platform_data
mxt_td60_i2c2_data
=
{
static
const
struct
imxi2c_platform_data
mxt_td60_i2c1_data
__initconst
=
{
.
bitrate
=
100000
,
};
...
...
@@ -263,8 +262,8 @@ static void __init mxt_td60_board_init(void)
i2c_register_board_info
(
1
,
mxt_td60_i2c2_devices
,
ARRAY_SIZE
(
mxt_td60_i2c2_devices
));
mxc_register_device
(
&
mxc_i2c_device0
,
&
mxt_td60_i2c
_data
);
mxc_register_device
(
&
mxc_i2c_device1
,
&
mxt_td60_i2c2
_data
);
imx27_add_i2c_imx0
(
&
mxt_td60_i2c0
_data
);
imx27_add_i2c_imx1
(
&
mxt_td60_i2c1
_data
);
mxc_register_device
(
&
mxc_fb_device
,
&
mxt_td60_fb_data
);
mxc_register_device
(
&
mxc_sdhc_device0
,
&
sdhc1_pdata
);
...
...
arch/arm/mach-imx/mach-pca100.c
浏览文件 @
c6987159
...
...
@@ -36,7 +36,6 @@
#include <mach/common.h>
#include <mach/hardware.h>
#include <mach/iomux-mx27.h>
#include <mach/i2c.h>
#include <asm/mach/time.h>
#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
#include <mach/spi.h>
...
...
@@ -150,7 +149,7 @@ static struct platform_device *platform_devices[] __initdata = {
&
mxc_wdt
,
};
static
struct
imxi2c_platform_data
pca100_i2c_1_data
=
{
static
const
struct
imxi2c_platform_data
pca100_i2c1_data
__initconst
=
{
.
bitrate
=
100000
,
};
...
...
@@ -333,7 +332,7 @@ static void __init pca100_init(void)
i2c_register_board_info
(
1
,
pca100_i2c_devices
,
ARRAY_SIZE
(
pca100_i2c_devices
));
mxc_register_device
(
&
mxc_i2c_device1
,
&
pca100_i2c_
1_data
);
imx27_add_i2c_imx1
(
&
pca100_i2c
1_data
);
mxc_gpio_mode
(
GPIO_PORTD
|
28
|
GPIO_GPIO
|
GPIO_OUT
);
mxc_gpio_mode
(
GPIO_PORTD
|
27
|
GPIO_GPIO
|
GPIO_OUT
);
...
...
arch/arm/mach-imx/mach-pcm038.c
浏览文件 @
c6987159
...
...
@@ -35,7 +35,6 @@
#include <mach/board-pcm038.h>
#include <mach/common.h>
#include <mach/hardware.h>
#include <mach/i2c.h>
#include <mach/iomux-mx27.h>
#include <mach/imx-uart.h>
#include <mach/mxc_nand.h>
...
...
@@ -194,7 +193,7 @@ static void __init pcm038_init_sram(void)
mx27_setup_weimcs
(
1
,
0x0000d843
,
0x22252521
,
0x22220a00
);
}
static
struct
imxi2c_platform_data
pcm038_i2c_1_data
=
{
static
const
struct
imxi2c_platform_data
pcm038_i2c1_data
__initconst
=
{
.
bitrate
=
100000
,
};
...
...
@@ -318,7 +317,7 @@ static void __init pcm038_init(void)
i2c_register_board_info
(
1
,
pcm038_i2c_devices
,
ARRAY_SIZE
(
pcm038_i2c_devices
));
mxc_register_device
(
&
mxc_i2c_device1
,
&
pcm038_i2c_
1_data
);
imx27_add_i2c_imx1
(
&
pcm038_i2c
1_data
);
/* PE18 for user-LED D40 */
mxc_gpio_mode
(
GPIO_PORTE
|
18
|
GPIO_GPIO
|
GPIO_OUT
);
...
...
arch/arm/plat-mxc/include/mach/mx27.h
浏览文件 @
c6987159
...
...
@@ -48,7 +48,7 @@
#define MX27_CSPI2_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x0f000)
#define MX27_SSI1_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x10000)
#define MX27_SSI2_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x11000)
#define MX27_I2C_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x12000)
#define MX27_I2C
1
_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x12000)
#define MX27_SDHC1_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x13000)
#define MX27_SDHC2_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x14000)
#define MX27_GPIO_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x15000)
...
...
@@ -150,7 +150,7 @@ static inline void mx27_setup_weimcs(size_t cs,
#define MX27_INT_SDHC3 9
#define MX27_INT_SDHC2 10
#define MX27_INT_SDHC1 11
#define MX27_INT_I2C 12
#define MX27_INT_I2C
1
12
#define MX27_INT_SSI2 13
#define MX27_INT_SSI1 14
#define MX27_INT_CSPI2 15
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录