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
nexedi
linux
Commits
01ac7d58
Commit
01ac7d58
authored
Mar 13, 2009
by
Sascha Hauer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcm037: setup all pins at once and not in init functions
Signed-off-by:
Sascha Hauer
<
s.hauer@pengutronix.de
>
parent
d16caf69
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
49 deletions
+75
-49
arch/arm/mach-mx3/pcm037.c
arch/arm/mach-mx3/pcm037.c
+75
-49
No files found.
arch/arm/mach-mx3/pcm037.c
View file @
01ac7d58
...
...
@@ -46,6 +46,76 @@
#include "devices.h"
static
unsigned
int
pcm037_pins
[]
=
{
/* I2C */
MX31_PIN_CSPI2_MOSI__SCL
,
MX31_PIN_CSPI2_MISO__SDA
,
/* SDHC1 */
MX31_PIN_SD1_DATA3__SD1_DATA3
,
MX31_PIN_SD1_DATA2__SD1_DATA2
,
MX31_PIN_SD1_DATA1__SD1_DATA1
,
MX31_PIN_SD1_DATA0__SD1_DATA0
,
MX31_PIN_SD1_CLK__SD1_CLK
,
MX31_PIN_SD1_CMD__SD1_CMD
,
IOMUX_MODE
(
MX31_PIN_SCK6
,
IOMUX_CONFIG_GPIO
),
/* card detect */
IOMUX_MODE
(
MX31_PIN_SFS6
,
IOMUX_CONFIG_GPIO
),
/* write protect */
/* SPI1 */
MX31_PIN_CSPI1_MOSI__MOSI
,
MX31_PIN_CSPI1_MISO__MISO
,
MX31_PIN_CSPI1_SCLK__SCLK
,
MX31_PIN_CSPI1_SPI_RDY__SPI_RDY
,
MX31_PIN_CSPI1_SS0__SS0
,
MX31_PIN_CSPI1_SS1__SS1
,
MX31_PIN_CSPI1_SS2__SS2
,
/* UART1 */
MX31_PIN_CTS1__CTS1
,
MX31_PIN_RTS1__RTS1
,
MX31_PIN_TXD1__TXD1
,
MX31_PIN_RXD1__RXD1
,
/* UART2 */
MX31_PIN_TXD2__TXD2
,
MX31_PIN_RXD2__RXD2
,
MX31_PIN_CTS2__CTS2
,
MX31_PIN_RTS2__RTS2
,
/* UART3 */
MX31_PIN_CSPI3_MOSI__RXD3
,
MX31_PIN_CSPI3_MISO__TXD3
,
MX31_PIN_CSPI3_SCLK__RTS3
,
MX31_PIN_CSPI3_SPI_RDY__CTS3
,
/* LAN9217 irq pin */
IOMUX_MODE
(
MX31_PIN_GPIO3_1
,
IOMUX_CONFIG_GPIO
),
/* Onewire */
MX31_PIN_BATT_LINE__OWIRE
,
/* Framebuffer */
MX31_PIN_LD0__LD0
,
MX31_PIN_LD1__LD1
,
MX31_PIN_LD2__LD2
,
MX31_PIN_LD3__LD3
,
MX31_PIN_LD4__LD4
,
MX31_PIN_LD5__LD5
,
MX31_PIN_LD6__LD6
,
MX31_PIN_LD7__LD7
,
MX31_PIN_LD8__LD8
,
MX31_PIN_LD9__LD9
,
MX31_PIN_LD10__LD10
,
MX31_PIN_LD11__LD11
,
MX31_PIN_LD12__LD12
,
MX31_PIN_LD13__LD13
,
MX31_PIN_LD14__LD14
,
MX31_PIN_LD15__LD15
,
MX31_PIN_LD16__LD16
,
MX31_PIN_LD17__LD17
,
MX31_PIN_VSYNC3__VSYNC3
,
MX31_PIN_HSYNC__HSYNC
,
MX31_PIN_FPSHIFT__FPSHIFT
,
MX31_PIN_DRDY0__DRDY0
,
MX31_PIN_D3_REV__D3_REV
,
MX31_PIN_CONTRAST__CONTRAST
,
MX31_PIN_D3_SPL__D3_SPL
,
MX31_PIN_D3_CLS__D3_CLS
,
MX31_PIN_LCS0__GPI03_23
,
};
static
struct
physmap_flash_data
pcm037_flash_data
=
{
.
width
=
2
,
};
...
...
@@ -127,26 +197,8 @@ static struct mxc_nand_platform_data pcm037_nand_board_info = {
};
#ifdef CONFIG_I2C_IMX
static
int
i2c_1_pins
[]
=
{
MX31_PIN_CSPI2_MOSI__SCL
,
MX31_PIN_CSPI2_MISO__SDA
,
};
static
int
pcm037_i2c_1_init
(
struct
device
*
dev
)
{
return
mxc_iomux_setup_multiple_pins
(
i2c_1_pins
,
ARRAY_SIZE
(
i2c_1_pins
),
"i2c-1"
);
}
static
void
pcm037_i2c_1_exit
(
struct
device
*
dev
)
{
mxc_iomux_release_multiple_pins
(
i2c_1_pins
,
ARRAY_SIZE
(
i2c_1_pins
));
}
static
struct
imxi2c_platform_data
pcm037_i2c_1_data
=
{
.
bitrate
=
100000
,
.
init
=
pcm037_i2c_1_init
,
.
exit
=
pcm037_i2c_1_exit
,
};
static
struct
at24_platform_data
board_eeprom
=
{
...
...
@@ -166,24 +218,13 @@ static struct i2c_board_info pcm037_i2c_devices[] = {
};
#endif
static
int
sdhc1_pins
[]
=
{
MX31_PIN_SD1_DATA3__SD1_DATA3
,
MX31_PIN_SD1_DATA2__SD1_DATA2
,
MX31_PIN_SD1_DATA1__SD1_DATA1
,
MX31_PIN_SD1_DATA0__SD1_DATA0
,
MX31_PIN_SD1_CLK__SD1_CLK
,
MX31_PIN_SD1_CMD__SD1_CMD
,
};
static
int
pcm970_sdhc1_init
(
struct
device
*
dev
,
irq_handler_t
h
,
void
*
data
)
{
return
mxc_iomux_setup_multiple_pins
(
sdhc1_pins
,
ARRAY_SIZE
(
sdhc1_pins
),
"sdhc-1"
);
return
0
;
}
static
void
pcm970_sdhc1_exit
(
struct
device
*
dev
,
void
*
data
)
{
mxc_iomux_release_multiple_pins
(
sdhc1_pins
,
ARRAY_SIZE
(
sdhc1_pins
));
}
/* No card and rw detection at the moment */
...
...
@@ -198,38 +239,23 @@ static struct platform_device *devices[] __initdata = {
&
pcm037_sram_device
,
};
static
int
uart0_pins
[]
=
{
MX31_PIN_CTS1__CTS1
,
MX31_PIN_RTS1__RTS1
,
MX31_PIN_TXD1__TXD1
,
MX31_PIN_RXD1__RXD1
};
static
int
uart2_pins
[]
=
{
MX31_PIN_CSPI3_MOSI__RXD3
,
MX31_PIN_CSPI3_MISO__TXD3
};
/*
* Board specific initialization.
*/
static
void
__init
mxc_board_init
(
void
)
{
mxc_iomux_setup_multiple_pins
(
pcm037_pins
,
ARRAY_SIZE
(
pcm037_pins
),
"pcm037"
);
platform_add_devices
(
devices
,
ARRAY_SIZE
(
devices
));
mxc_iomux_setup_multiple_pins
(
uart0_pins
,
ARRAY_SIZE
(
uart0_pins
),
"uart-0"
);
mxc_register_device
(
&
mxc_uart_device0
,
&
uart_pdata
);
mxc_iomux_setup_multiple_pins
(
uart2_pins
,
ARRAY_SIZE
(
uart2_pins
),
"uart-2"
);
mxc_register_device
(
&
mxc_uart_device2
,
&
uart_pdata
);
mxc_iomux_setup_pin
(
MX31_PIN_BATT_LINE__OWIRE
,
"batt-0wire"
);
mxc_register_device
(
&
mxc_w1_master_device
,
NULL
);
/* LAN9217 IRQ pin */
if
(
!
mxc_iomux_setup_pin
(
IOMUX_MODE
(
MX31_PIN_GPIO3_1
,
IOMUX_CONFIG_GPIO
),
"pcm037-eth"
))
gpio_direction_input
(
IOMUX_TO_GPIO
(
MX31_PIN_GPIO3_1
));
gpio_direction_input
(
IOMUX_TO_GPIO
(
MX31_PIN_GPIO3_1
));
#ifdef CONFIG_I2C_IMX
i2c_register_board_info
(
1
,
pcm037_i2c_devices
,
...
...
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