Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
5ae07daa
Commit
5ae07daa
authored
15 years ago
by
Sascha Hauer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mx1ads: setup iomux pins at once
Signed-off-by:
Sascha Hauer
<
s.hauer@pengutronix.de
>
parent
5b68421f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
55 deletions
+18
-55
arch/arm/mach-mx1/mx1ads.c
arch/arm/mach-mx1/mx1ads.c
+18
-55
No files found.
arch/arm/mach-mx1/mx1ads.c
View file @
5ae07daa
...
...
@@ -32,57 +32,36 @@
#include "devices.h"
/*
* UARTs platform data
*/
static
int
mxc_uart1_pins
[]
=
{
static
int
mx1ads_pins
[]
=
{
/* UART1 */
PC9_PF_UART1_CTS
,
PC10_PF_UART1_RTS
,
PC11_PF_UART1_TXD
,
PC12_PF_UART1_RXD
,
};
static
int
uart1_mxc_init
(
struct
platform_device
*
pdev
)
{
return
mxc_gpio_setup_multiple_pins
(
mxc_uart1_pins
,
ARRAY_SIZE
(
mxc_uart1_pins
),
"UART1"
);
}
static
int
uart1_mxc_exit
(
struct
platform_device
*
pdev
)
{
mxc_gpio_release_multiple_pins
(
mxc_uart1_pins
,
ARRAY_SIZE
(
mxc_uart1_pins
));
return
0
;
}
static
int
mxc_uart2_pins
[]
=
{
/* UART2 */
PB28_PF_UART2_CTS
,
PB29_PF_UART2_RTS
,
PB30_PF_UART2_TXD
,
PB31_PF_UART2_RXD
,
/* I2C */
PA15_PF_I2C_SDA
,
PA16_PF_I2C_SCL
,
/* SPI */
PC13_PF_SPI1_SPI_RDY
,
PC14_PF_SPI1_SCLK
,
PC15_PF_SPI1_SS
,
PC16_PF_SPI1_MISO
,
PC17_PF_SPI1_MOSI
,
};
static
int
uart2_mxc_init
(
struct
platform_device
*
pdev
)
{
return
mxc_gpio_setup_multiple_pins
(
mxc_uart2_pins
,
ARRAY_SIZE
(
mxc_uart2_pins
),
"UART2"
);
}
static
int
uart2_mxc_exit
(
struct
platform_device
*
pdev
)
{
mxc_gpio_release_multiple_pins
(
mxc_uart2_pins
,
ARRAY_SIZE
(
mxc_uart2_pins
));
return
0
;
}
/*
* UARTs platform data
*/
static
struct
imxuart_platform_data
uart_pdata
[]
=
{
{
.
init
=
uart1_mxc_init
,
.
exit
=
uart1_mxc_exit
,
.
flags
=
IMXUART_HAVE_RTSCTS
,
},
{
.
init
=
uart2_mxc_init
,
.
exit
=
uart2_mxc_exit
,
.
flags
=
IMXUART_HAVE_RTSCTS
,
},
};
...
...
@@ -111,23 +90,6 @@ static struct platform_device flash_device = {
/*
* I2C
*/
static
int
i2c_pins
[]
=
{
PA15_PF_I2C_SDA
,
PA16_PF_I2C_SCL
,
};
static
int
i2c_init
(
struct
device
*
dev
)
{
return
mxc_gpio_setup_multiple_pins
(
i2c_pins
,
ARRAY_SIZE
(
i2c_pins
),
"I2C"
);
}
static
void
i2c_exit
(
struct
device
*
dev
)
{
mxc_gpio_release_multiple_pins
(
i2c_pins
,
ARRAY_SIZE
(
i2c_pins
));
}
static
struct
pcf857x_platform_data
pcf857x_data
[]
=
{
{
.
gpio_base
=
4
*
32
,
...
...
@@ -138,8 +100,6 @@ static struct pcf857x_platform_data pcf857x_data[] = {
static
struct
imxi2c_platform_data
mx1ads_i2c_data
=
{
.
bitrate
=
100000
,
.
init
=
i2c_init
,
.
exit
=
i2c_exit
,
};
static
struct
i2c_board_info
mx1ads_i2c_devices
[]
=
{
...
...
@@ -159,6 +119,9 @@ static struct i2c_board_info mx1ads_i2c_devices[] = {
*/
static
void
__init
mx1ads_init
(
void
)
{
mxc_gpio_setup_multiple_pins
(
mx1ads_pins
,
ARRAY_SIZE
(
mx1ads_pins
),
"mx1ads"
);
/* UART */
mxc_register_device
(
&
imx_uart1_device
,
&
uart_pdata
[
0
]);
mxc_register_device
(
&
imx_uart2_device
,
&
uart_pdata
[
1
]);
...
...
This diff is collapsed.
Click to expand it.
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