Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
742269e2
Commit
742269e2
authored
Nov 15, 2010
by
Uwe Kleine-König
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM: mx3: dynamically allocate imx2-wdt devices
Signed-off-by:
Uwe Kleine-König
<
u.kleine-koenig@pengutronix.de
>
parent
2d58de28
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
26 additions
and
42 deletions
+26
-42
arch/arm/mach-mx3/Kconfig
arch/arm/mach-mx3/Kconfig
+4
-0
arch/arm/mach-mx3/devices-imx31.h
arch/arm/mach-mx3/devices-imx31.h
+4
-0
arch/arm/mach-mx3/devices-imx35.h
arch/arm/mach-mx3/devices-imx35.h
+4
-0
arch/arm/mach-mx3/devices.c
arch/arm/mach-mx3/devices.c
+0
-33
arch/arm/mach-mx3/devices.h
arch/arm/mach-mx3/devices.h
+0
-1
arch/arm/mach-mx3/mach-cpuimx35.c
arch/arm/mach-mx3/mach-cpuimx35.c
+1
-5
arch/arm/mach-mx3/mach-pcm037.c
arch/arm/mach-mx3/mach-pcm037.c
+1
-1
arch/arm/mach-mx3/mach-pcm043.c
arch/arm/mach-mx3/mach-pcm043.c
+1
-1
arch/arm/mach-mx3/mx31lite-db.c
arch/arm/mach-mx3/mx31lite-db.c
+1
-1
arch/arm/plat-mxc/devices/platform-imx2-wdt.c
arch/arm/plat-mxc/devices/platform-imx2-wdt.c
+10
-0
No files found.
arch/arm/mach-mx3/Kconfig
View file @
742269e2
...
@@ -51,6 +51,7 @@ config MACH_PCM037
...
@@ -51,6 +51,7 @@ config MACH_PCM037
bool "Support Phytec pcm037 (i.MX31) platforms"
bool "Support Phytec pcm037 (i.MX31) platforms"
select SOC_IMX31
select SOC_IMX31
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_EHCI
...
@@ -75,6 +76,7 @@ config MACH_MX31LITE
...
@@ -75,6 +76,7 @@ config MACH_MX31LITE
bool "Support MX31 LITEKIT (LogicPD)"
bool "Support MX31 LITEKIT (LogicPD)"
select SOC_IMX31
select SOC_IMX31
select MXC_ULPI if USB_ULPI
select MXC_ULPI if USB_ULPI
select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_MMC
select IMX_HAVE_PLATFORM_MXC_MMC
...
@@ -143,6 +145,7 @@ config MACH_PCM043
...
@@ -143,6 +145,7 @@ config MACH_PCM043
bool "Support Phytec pcm043 (i.MX35) platforms"
bool "Support Phytec pcm043 (i.MX35) platforms"
select SOC_IMX35
select SOC_IMX35
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_SSI
select IMX_HAVE_PLATFORM_IMX_SSI
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_IMX_UART
...
@@ -193,6 +196,7 @@ config MACH_EUKREA_CPUIMX35
...
@@ -193,6 +196,7 @@ config MACH_EUKREA_CPUIMX35
bool "Support Eukrea CPUIMX35 Platform"
bool "Support Eukrea CPUIMX35 Platform"
select SOC_IMX35
select SOC_IMX35
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_EHCI
...
...
arch/arm/mach-mx3/devices-imx31.h
View file @
742269e2
...
@@ -13,6 +13,10 @@ extern const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data __initconst;
...
@@ -13,6 +13,10 @@ extern const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data __initconst;
#define imx31_add_fsl_usb2_udc(pdata) \
#define imx31_add_fsl_usb2_udc(pdata) \
imx_add_fsl_usb2_udc(&imx31_fsl_usb2_udc_data, pdata)
imx_add_fsl_usb2_udc(&imx31_fsl_usb2_udc_data, pdata)
extern
const
struct
imx_imx2_wdt_data
imx31_imx2_wdt_data
__initconst
;
#define imx31_add_imx2_wdt(pdata) \
imx_add_imx2_wdt(&imx31_imx2_wdt_data)
extern
const
struct
imx_imx_i2c_data
imx31_imx_i2c_data
[]
__initconst
;
extern
const
struct
imx_imx_i2c_data
imx31_imx_i2c_data
[]
__initconst
;
#define imx31_add_imx_i2c(id, pdata) \
#define imx31_add_imx_i2c(id, pdata) \
imx_add_imx_i2c(&imx31_imx_i2c_data[id], pdata)
imx_add_imx_i2c(&imx31_imx_i2c_data[id], pdata)
...
...
arch/arm/mach-mx3/devices-imx35.h
View file @
742269e2
...
@@ -23,6 +23,10 @@ extern const struct imx_flexcan_data imx35_flexcan_data[] __initconst;
...
@@ -23,6 +23,10 @@ extern const struct imx_flexcan_data imx35_flexcan_data[] __initconst;
#define imx35_add_flexcan0(pdata) imx35_add_flexcan(0, pdata)
#define imx35_add_flexcan0(pdata) imx35_add_flexcan(0, pdata)
#define imx35_add_flexcan1(pdata) imx35_add_flexcan(1, pdata)
#define imx35_add_flexcan1(pdata) imx35_add_flexcan(1, pdata)
extern
const
struct
imx_imx2_wdt_data
imx35_imx2_wdt_data
__initconst
;
#define imx35_add_imx2_wdt(pdata) \
imx_add_imx2_wdt(&imx35_imx2_wdt_data)
extern
const
struct
imx_imx_i2c_data
imx35_imx_i2c_data
[]
__initconst
;
extern
const
struct
imx_imx_i2c_data
imx35_imx_i2c_data
[]
__initconst
;
#define imx35_add_imx_i2c(id, pdata) \
#define imx35_add_imx_i2c(id, pdata) \
imx_add_imx_i2c(&imx35_imx_i2c_data[id], pdata)
imx_add_imx_i2c(&imx35_imx_i2c_data[id], pdata)
...
...
arch/arm/mach-mx3/devices.c
View file @
742269e2
...
@@ -95,19 +95,6 @@ struct platform_device mx3_camera = {
...
@@ -95,19 +95,6 @@ struct platform_device mx3_camera = {
},
},
};
};
static
struct
resource
imx_wdt_resources
[]
=
{
{
.
flags
=
IORESOURCE_MEM
,
},
};
struct
platform_device
imx_wdt_device0
=
{
.
name
=
"imx2-wdt"
,
.
id
=
0
,
.
num_resources
=
ARRAY_SIZE
(
imx_wdt_resources
),
.
resource
=
imx_wdt_resources
,
};
static
struct
resource
imx_rtc_resources
[]
=
{
static
struct
resource
imx_rtc_resources
[]
=
{
{
{
.
start
=
MX31_RTC_BASE_ADDR
,
.
start
=
MX31_RTC_BASE_ADDR
,
...
@@ -145,23 +132,3 @@ struct platform_device imx_kpp_device = {
...
@@ -145,23 +132,3 @@ struct platform_device imx_kpp_device = {
.
num_resources
=
ARRAY_SIZE
(
imx_kpp_resources
),
.
num_resources
=
ARRAY_SIZE
(
imx_kpp_resources
),
.
resource
=
imx_kpp_resources
,
.
resource
=
imx_kpp_resources
,
};
};
static
int
__init
mx3_devices_init
(
void
)
{
#if defined(CONFIG_ARCH_MX31)
if
(
cpu_is_mx31
())
{
imx_wdt_resources
[
0
].
start
=
MX31_WDOG_BASE_ADDR
;
imx_wdt_resources
[
0
].
end
=
MX31_WDOG_BASE_ADDR
+
0x3fff
;
}
#endif
#if defined(CONFIG_ARCH_MX35)
if
(
cpu_is_mx35
())
{
imx_wdt_resources
[
0
].
start
=
MX35_WDOG_BASE_ADDR
;
imx_wdt_resources
[
0
].
end
=
MX35_WDOG_BASE_ADDR
+
0x3fff
;
}
#endif
return
0
;
}
subsys_initcall
(
mx3_devices_init
);
arch/arm/mach-mx3/devices.h
View file @
742269e2
extern
struct
platform_device
mx3_ipu
;
extern
struct
platform_device
mx3_ipu
;
extern
struct
platform_device
mx3_fb
;
extern
struct
platform_device
mx3_fb
;
extern
struct
platform_device
mx3_camera
;
extern
struct
platform_device
mx3_camera
;
extern
struct
platform_device
imx_wdt_device0
;
extern
struct
platform_device
imx_rtc_device0
;
extern
struct
platform_device
imx_rtc_device0
;
extern
struct
platform_device
imx_kpp_device
;
extern
struct
platform_device
imx_kpp_device
;
arch/arm/mach-mx3/mach-cpuimx35.c
View file @
742269e2
...
@@ -72,10 +72,6 @@ static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = {
...
@@ -72,10 +72,6 @@ static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = {
},
},
};
};
static
struct
platform_device
*
devices
[]
__initdata
=
{
&
imx_wdt_device0
,
};
static
struct
pad_desc
eukrea_cpuimx35_pads
[]
=
{
static
struct
pad_desc
eukrea_cpuimx35_pads
[]
=
{
/* UART1 */
/* UART1 */
MX35_PAD_CTS1__UART1_CTS
,
MX35_PAD_CTS1__UART1_CTS
,
...
@@ -156,7 +152,7 @@ static void __init mxc_board_init(void)
...
@@ -156,7 +152,7 @@ static void __init mxc_board_init(void)
ARRAY_SIZE
(
eukrea_cpuimx35_pads
));
ARRAY_SIZE
(
eukrea_cpuimx35_pads
));
imx35_add_fec
(
NULL
);
imx35_add_fec
(
NULL
);
platform_add_devices
(
devices
,
ARRAY_SIZE
(
devices
)
);
imx35_add_imx2_wdt
(
NULL
);
imx35_add_imx_uart0
(
&
uart_pdata
);
imx35_add_imx_uart0
(
&
uart_pdata
);
imx35_add_mxc_nand
(
&
eukrea_cpuimx35_nand_board_info
);
imx35_add_mxc_nand
(
&
eukrea_cpuimx35_nand_board_info
);
...
...
arch/arm/mach-mx3/mach-pcm037.c
View file @
742269e2
...
@@ -440,7 +440,6 @@ static int __init pcm037_camera_alloc_dma(const size_t buf_size)
...
@@ -440,7 +440,6 @@ static int __init pcm037_camera_alloc_dma(const size_t buf_size)
static
struct
platform_device
*
devices
[]
__initdata
=
{
static
struct
platform_device
*
devices
[]
__initdata
=
{
&
pcm037_flash
,
&
pcm037_flash
,
&
pcm037_sram_device
,
&
pcm037_sram_device
,
&
imx_wdt_device0
,
&
pcm037_mt9t031
,
&
pcm037_mt9t031
,
&
pcm037_mt9v022
,
&
pcm037_mt9v022
,
};
};
...
@@ -606,6 +605,7 @@ static void __init mxc_board_init(void)
...
@@ -606,6 +605,7 @@ static void __init mxc_board_init(void)
platform_add_devices
(
devices
,
ARRAY_SIZE
(
devices
));
platform_add_devices
(
devices
,
ARRAY_SIZE
(
devices
));
imx31_add_imx2_wdt
(
NULL
);
imx31_add_imx_uart0
(
&
uart_pdata
);
imx31_add_imx_uart0
(
&
uart_pdata
);
/* XXX: should't this have .flags = 0 (i.e. no RTSCTS) on PCM037_EET? */
/* XXX: should't this have .flags = 0 (i.e. no RTSCTS) on PCM037_EET? */
imx31_add_imx_uart1
(
&
uart_pdata
);
imx31_add_imx_uart1
(
&
uart_pdata
);
...
...
arch/arm/mach-mx3/mach-pcm043.c
View file @
742269e2
...
@@ -138,7 +138,6 @@ static struct i2c_board_info pcm043_i2c_devices[] = {
...
@@ -138,7 +138,6 @@ static struct i2c_board_info pcm043_i2c_devices[] = {
static
struct
platform_device
*
devices
[]
__initdata
=
{
static
struct
platform_device
*
devices
[]
__initdata
=
{
&
pcm043_flash
,
&
pcm043_flash
,
&
imx_wdt_device0
,
};
};
static
struct
pad_desc
pcm043_pads
[]
=
{
static
struct
pad_desc
pcm043_pads
[]
=
{
...
@@ -362,6 +361,7 @@ static void __init mxc_board_init(void)
...
@@ -362,6 +361,7 @@ static void __init mxc_board_init(void)
imx35_add_fec
(
NULL
);
imx35_add_fec
(
NULL
);
platform_add_devices
(
devices
,
ARRAY_SIZE
(
devices
));
platform_add_devices
(
devices
,
ARRAY_SIZE
(
devices
));
imx35_add_imx2_wdt
(
NULL
);
imx35_add_imx_uart0
(
&
uart_pdata
);
imx35_add_imx_uart0
(
&
uart_pdata
);
imx35_add_mxc_nand
(
&
pcm037_nand_board_info
);
imx35_add_mxc_nand
(
&
pcm037_nand_board_info
);
...
...
arch/arm/mach-mx3/mx31lite-db.c
View file @
742269e2
...
@@ -199,6 +199,6 @@ void __init mx31lite_db_init(void)
...
@@ -199,6 +199,6 @@ void __init mx31lite_db_init(void)
imx31_add_mxc_mmc
(
0
,
&
mmc_pdata
);
imx31_add_mxc_mmc
(
0
,
&
mmc_pdata
);
imx31_add_spi_imx0
(
&
spi0_pdata
);
imx31_add_spi_imx0
(
&
spi0_pdata
);
platform_device_register
(
&
litekit_led_device
);
platform_device_register
(
&
litekit_led_device
);
mxc_register_device
(
&
imx_wdt_device0
,
NULL
);
imx31_add_imx2_wdt
(
NULL
);
mxc_register_device
(
&
imx_rtc_device0
,
NULL
);
mxc_register_device
(
&
imx_rtc_device0
,
NULL
);
}
}
arch/arm/plat-mxc/devices/platform-imx2-wdt.c
View file @
742269e2
...
@@ -31,6 +31,16 @@ const struct imx_imx2_wdt_data imx27_imx2_wdt_data __initconst =
...
@@ -31,6 +31,16 @@ const struct imx_imx2_wdt_data imx27_imx2_wdt_data __initconst =
imx_imx2_wdt_data_entry_single
(
MX27
,
SZ_4K
);
imx_imx2_wdt_data_entry_single
(
MX27
,
SZ_4K
);
#endif
/* ifdef CONFIG_SOC_IMX27 */
#endif
/* ifdef CONFIG_SOC_IMX27 */
#ifdef CONFIG_SOC_IMX31
const
struct
imx_imx2_wdt_data
imx31_imx2_wdt_data
__initconst
=
imx_imx2_wdt_data_entry_single
(
MX31
,
SZ_16K
);
#endif
/* ifdef CONFIG_SOC_IMX31 */
#ifdef CONFIG_SOC_IMX35
const
struct
imx_imx2_wdt_data
imx35_imx2_wdt_data
__initconst
=
imx_imx2_wdt_data_entry_single
(
MX35
,
SZ_16K
);
#endif
/* ifdef CONFIG_SOC_IMX35 */
struct
platform_device
*
__init
imx_add_imx2_wdt
(
struct
platform_device
*
__init
imx_add_imx2_wdt
(
const
struct
imx_imx2_wdt_data
*
data
)
const
struct
imx_imx2_wdt_data
*
data
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment