Commit 9fece9bd authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Shawn Guo

ARM: imx/iomux-v3: allow pad_list to be const

Also fix all machine files to make use of it and while at it also make
the pad lists __initconst.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
parent c517d838
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include "iomux-mx25.h" #include "iomux-mx25.h"
#include "mx25.h" #include "mx25.h"
static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { static const iomux_v3_cfg_t eukrea_mbimxsd_pads[] __initconst = {
/* LCD */ /* LCD */
MX25_PAD_LD0__LD0, MX25_PAD_LD0__LD0,
MX25_PAD_LD1__LD1, MX25_PAD_LD1__LD1,
......
...@@ -100,7 +100,7 @@ static struct mx3fb_platform_data mx3fb_pdata __initdata = { ...@@ -100,7 +100,7 @@ static struct mx3fb_platform_data mx3fb_pdata __initdata = {
.num_modes = ARRAY_SIZE(fb_modedb), .num_modes = ARRAY_SIZE(fb_modedb),
}; };
static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { static const iomux_v3_cfg_t eukrea_mbimxsd_pads[] __initconst = {
/* LCD */ /* LCD */
MX35_PAD_LD0__IPU_DISPB_DAT_0, MX35_PAD_LD0__IPU_DISPB_DAT_0,
MX35_PAD_LD1__IPU_DISPB_DAT_1, MX35_PAD_LD1__IPU_DISPB_DAT_1,
......
...@@ -56,9 +56,10 @@ int mxc_iomux_v3_setup_pad(iomux_v3_cfg_t pad) ...@@ -56,9 +56,10 @@ int mxc_iomux_v3_setup_pad(iomux_v3_cfg_t pad)
return 0; return 0;
} }
int mxc_iomux_v3_setup_multiple_pads(iomux_v3_cfg_t *pad_list, unsigned count) int mxc_iomux_v3_setup_multiple_pads(const iomux_v3_cfg_t *pad_list,
unsigned count)
{ {
iomux_v3_cfg_t *p = pad_list; const iomux_v3_cfg_t *p = pad_list;
int i; int i;
int ret; int ret;
......
...@@ -131,7 +131,8 @@ int mxc_iomux_v3_setup_pad(iomux_v3_cfg_t pad); ...@@ -131,7 +131,8 @@ int mxc_iomux_v3_setup_pad(iomux_v3_cfg_t pad);
* setups mutliple pads * setups mutliple pads
* convenient way to call the above function with tables * convenient way to call the above function with tables
*/ */
int mxc_iomux_v3_setup_multiple_pads(iomux_v3_cfg_t *pad_list, unsigned count); int mxc_iomux_v3_setup_multiple_pads(const iomux_v3_cfg_t *pad_list,
unsigned count);
/* /*
* Initialise the iomux controller * Initialise the iomux controller
......
...@@ -75,7 +75,7 @@ static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = { ...@@ -75,7 +75,7 @@ static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = {
}, },
}; };
static iomux_v3_cfg_t eukrea_cpuimx35_pads[] = { static const iomux_v3_cfg_t eukrea_cpuimx35_pads[] __initconst = {
/* UART1 */ /* UART1 */
MX35_PAD_CTS1__UART1_CTS, MX35_PAD_CTS1__UART1_CTS,
MX35_PAD_RTS1__UART1_RTS, MX35_PAD_RTS1__UART1_RTS,
......
...@@ -45,7 +45,7 @@ static const struct imxuart_platform_data uart_pdata __initconst = { ...@@ -45,7 +45,7 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
.flags = IMXUART_HAVE_RTSCTS, .flags = IMXUART_HAVE_RTSCTS,
}; };
static iomux_v3_cfg_t eukrea_cpuimx25_pads[] = { static const iomux_v3_cfg_t eukrea_cpuimx25_pads[] __initconst = {
/* FEC - RMII */ /* FEC - RMII */
MX25_PAD_FEC_MDC__FEC_MDC, MX25_PAD_FEC_MDC__FEC_MDC,
MX25_PAD_FEC_MDIO__FEC_MDIO, MX25_PAD_FEC_MDIO__FEC_MDIO,
......
...@@ -50,7 +50,7 @@ static const struct imxuart_platform_data uart_pdata __initconst = { ...@@ -50,7 +50,7 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
.flags = IMXUART_HAVE_RTSCTS, .flags = IMXUART_HAVE_RTSCTS,
}; };
static iomux_v3_cfg_t mx25pdk_pads[] = { static const iomux_v3_cfg_t mx25pdk_pads[] __initconst = {
MX25_PAD_FEC_MDC__FEC_MDC, MX25_PAD_FEC_MDC__FEC_MDC,
MX25_PAD_FEC_MDIO__FEC_MDIO, MX25_PAD_FEC_MDIO__FEC_MDIO,
MX25_PAD_FEC_TDATA0__FEC_TDATA0, MX25_PAD_FEC_TDATA0__FEC_TDATA0,
......
...@@ -166,7 +166,7 @@ static struct platform_device *devices[] __initdata = { ...@@ -166,7 +166,7 @@ static struct platform_device *devices[] __initdata = {
&mx35pdk_flash, &mx35pdk_flash,
}; };
static iomux_v3_cfg_t mx35pdk_pads[] = { static const iomux_v3_cfg_t mx35pdk_pads[] __initconst = {
/* UART1 */ /* UART1 */
MX35_PAD_CTS1__UART1_CTS, MX35_PAD_CTS1__UART1_CTS,
MX35_PAD_RTS1__UART1_RTS, MX35_PAD_RTS1__UART1_RTS,
......
...@@ -129,7 +129,7 @@ static struct platform_device *devices[] __initdata = { ...@@ -129,7 +129,7 @@ static struct platform_device *devices[] __initdata = {
&pcm043_flash, &pcm043_flash,
}; };
static iomux_v3_cfg_t pcm043_pads[] = { static const iomux_v3_cfg_t pcm043_pads[] __initconst = {
/* UART1 */ /* UART1 */
MX35_PAD_CTS1__UART1_CTS, MX35_PAD_CTS1__UART1_CTS,
MX35_PAD_RTS1__UART1_RTS, MX35_PAD_RTS1__UART1_RTS,
......
...@@ -161,7 +161,7 @@ static struct i2c_board_info vpr200_i2c_devices[] = { ...@@ -161,7 +161,7 @@ static struct i2c_board_info vpr200_i2c_devices[] = {
} }
}; };
static iomux_v3_cfg_t vpr200_pads[] = { static const iomux_v3_cfg_t vpr200_pads[] __initconst = {
/* UART1 */ /* UART1 */
MX35_PAD_TXD1__UART1_TXD_MUX, MX35_PAD_TXD1__UART1_TXD_MUX,
MX35_PAD_RXD1__UART1_RXD_MUX, MX35_PAD_RXD1__UART1_RXD_MUX,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment