-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Declare the pata device found on mx51 Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
- Loading branch information
Arnaud Patard (Rtp)
authored and
Sascha Hauer
committed
Aug 23, 2011
1 parent
322a8b0
commit a45adf1
Showing
5 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* 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_pata_imx_data_entry_single(soc) \ | ||
{ \ | ||
.iobase = soc ## _ATA_BASE_ADDR, \ | ||
.irq = soc ## _MXC_INT_ATA, \ | ||
} | ||
|
||
#ifdef CONFIG_SOC_IMX51 | ||
const struct imx_pata_imx_data imx51_pata_imx_data __initconst = | ||
imx_pata_imx_data_entry_single(MX51); | ||
#endif /* ifdef CONFIG_SOC_IMX51 */ | ||
|
||
struct platform_device *__init imx_add_pata_imx( | ||
const struct imx_pata_imx_data *data) | ||
{ | ||
struct resource res[] = { | ||
{ | ||
.start = data->iobase, | ||
.end = data->iobase + SZ_16K - 1, | ||
.flags = IORESOURCE_MEM, | ||
}, | ||
{ | ||
.start = data->irq, | ||
.end = data->irq, | ||
.flags = IORESOURCE_IRQ, | ||
}, | ||
}; | ||
return imx_add_platform_device("pata_imx", -1, | ||
res, ARRAY_SIZE(res), NULL, 0); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters