ARM: imx/iomux-v3: allow pad_list to be const
Subsystems (3)
PATCH 1/1 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 __init_const.
---
Hello,
well, iomux-v3 is dying so I don't know how welcome this patch is.
Best regards
Uwe
arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c | 2 +- arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c | 2 +- arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c | 2 +- arch/arm/mach-imx/mach-cpuimx35.c | 2 +- arch/arm/mach-imx/mach-cpuimx51sd.c | 2 +- arch/arm/mach-imx/mach-eukrea_cpuimx25.c | 2 +- arch/arm/mach-imx/mach-mx25_3ds.c | 2 +- arch/arm/mach-imx/mach-mx35_3ds.c | 2 +- arch/arm/mach-imx/mach-mx50_rdp.c | 2 +- arch/arm/mach-imx/mach-mx51_3ds.c | 2 +- arch/arm/mach-imx/mach-mx51_babbage.c | 2 +- arch/arm/mach-imx/mach-mx51_efikamx.c | 2 +- arch/arm/mach-imx/mach-mx51_efikasb.c | 2 +- arch/arm/mach-imx/mach-mx53_ard.c | 2 +- arch/arm/mach-imx/mach-mx53_evk.c | 2 +- arch/arm/mach-imx/mach-mx53_loco.c | 2 +- arch/arm/mach-imx/mach-mx53_smd.c | 2 +- arch/arm/mach-imx/mach-pcm043.c | 2 +- arch/arm/mach-imx/mach-vpr200.c | 2 +- arch/arm/mach-imx/mx51_efika.c | 2 +- arch/arm/plat-mxc/include/mach/iomux-v3.h | 3 ++- arch/arm/plat-mxc/iomux-v3.c | 5 +++-- 22 files changed, 25 insertions(+), 23 deletions(-)
arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c +1 -1
@@ -35,7 +35,7 @@#include "devices-imx25.h" -static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { +static const iomux_v3_cfg_t eukrea_mbimxsd_pads[]__initconst = {/* LCD */ MX25_PAD_LD0__LD0 ,MX25_PAD_LD1__LD1 ,
arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c +1 -1
@@ -101,7 +101,7 @@ static struct mx3fb_platform_data mx3fb_pdata __initdata = { .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 */ MX35_PAD_LD0__IPU_DISPB_DAT_0 ,MX35_PAD_LD1__IPU_DISPB_DAT_1 ,
arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c +1 -1
@@ -42,7 +42,7 @@#include "devices-imx51.h" -static iomux_v3_cfg_t eukrea_mbimxsd51_pads[] = { +static const iomux_v3_cfg_t eukrea_mbimxsd51_pads[]__initconst = {/* LED */ MX51_PAD_NANDF_D10__GPIO3_30 ,/* SWITCH */
arch/arm/mach-imx/mach-cpuimx35.c +1 -1
@@ -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 */ MX35_PAD_CTS1__UART1_CTS ,MX35_PAD_RTS1__UART1_RTS ,
arch/arm/mach-imx/mach-cpuimx51sd.c +1 -1
@@ -63,7 +63,7 @@#define MX51_USB_PLL_DIV_19_2_MHZ 0x01#define MX51_USB_PLL_DIV_24_MHZ 0x02 -static iomux_v3_cfg_t eukrea_cpuimx51sd_pads[] = { +static const iomux_v3_cfg_t eukrea_cpuimx51sd_pads[]__initconst = {/* UART1 */ MX51_PAD_UART1_RXD__UART1_RXD ,MX51_PAD_UART1_TXD__UART1_TXD ,
arch/arm/mach-imx/mach-eukrea_cpuimx25.c +1 -1
@@ -44,7 +44,7 @@ static const struct imxuart_platform_data uart_pdata __initconst = { .flags = IMXUART_HAVE_RTSCTS, }; -static iomux_v3_cfg_t eukrea_cpuimx25_pads[] = { +static const iomux_v3_cfg_t eukrea_cpuimx25_pads[]__initconst = {/* FEC - RMII */ MX25_PAD_FEC_MDC__FEC_MDC ,MX25_PAD_FEC_MDIO__FEC_MDIO ,
arch/arm/mach-imx/mach-mx25_3ds.c +1 -1
@@ -49,7 +49,7 @@ static const struct imxuart_platform_data uart_pdata __initconst = { .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_MDIO__FEC_MDIO ,MX25_PAD_FEC_TDATA0__FEC_TDATA0 ,
arch/arm/mach-imx/mach-mx35_3ds.c +1 -1
@@ -165,7 +165,7 @@ static struct platform_device *devices[] __initdata = { &mx35pdk_flash, }; -static iomux_v3_cfg_t mx35pdk_pads[] = { +static const iomux_v3_cfg_t mx35pdk_pads[]__initconst = {/* UART1 */ MX35_PAD_CTS1__UART1_CTS ,MX35_PAD_RTS1__UART1_RTS ,
arch/arm/mach-imx/mach-mx50_rdp.c +1 -1
@@ -39,7 +39,7 @@#define FEC_EN IMX_GPIO_NR(6, 23)#define FEC_RESET_B IMX_GPIO_NR(4, 12) -static iomux_v3_cfg_t mx50_rdp_pads[]__initdata = { +static const iomux_v3_cfg_t mx50_rdp_pads[]__initconst = {/* SD1 */ MX50_PAD_ECSPI2_SS0__GPIO_4_19 ,MX50_PAD_EIM_CRE__GPIO_1_27 ,
arch/arm/mach-imx/mach-mx51_3ds.c +1 -1
@@ -28,7 +28,7 @@#define MX51_3DS_ECSPI2_CS (GPIO_PORTC + 28) -static iomux_v3_cfg_t mx51_3ds_pads[] = { +static const iomux_v3_cfg_t mx51_3ds_pads[]__initconst = {/* UART1 */ MX51_PAD_UART1_RXD__UART1_RXD ,MX51_PAD_UART1_TXD__UART1_TXD ,
arch/arm/mach-imx/mach-mx51_babbage.c +1 -1
@@ -65,7 +65,7 @@ static const struct gpio_keys_platform_data imx_button_data __initconst = { .nbuttons = ARRAY_SIZE(babbage_buttons), }; -static iomux_v3_cfg_t mx51babbage_pads[] = { +static const iomux_v3_cfg_t mx51babbage_pads[]__initconst = {/* UART1 */ MX51_PAD_UART1_RXD__UART1_RXD ,MX51_PAD_UART1_TXD__UART1_TXD ,
arch/arm/mach-imx/mach-mx51_efikamx.c +1 -1
@@ -65,7 +65,7 @@#define MX51_PAD_PCBID2 IOMUX_PAD(0x504, 0x128, 3, 0x0, 0, PAD_CTL_PUS_100K_UP)#define MX51_PAD_PWRKEY IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, PAD_CTL_PUS_100K_UP | PAD_CTL_PKE) -static iomux_v3_cfg_t mx51efikamx_pads[] = { +static const iomux_v3_cfg_t mx51efikamx_pads[]__initconst = {/* board id */ MX51_PAD_PCBID0 ,MX51_PAD_PCBID1 ,
arch/arm/mach-imx/mach-mx51_efikasb.c +1 -1
@@ -57,7 +57,7 @@#define MX51_PAD_PWRKEY IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, PAD_CTL_PUS_100K_UP | PAD_CTL_PKE)#define MX51_PAD_SD1_CD IOMUX_PAD(0x47c, 0x0e8, 1, __NA_, 0, MX51_ESDHC_PAD_CTRL) -static iomux_v3_cfg_t mx51efikasb_pads[] = { +static const iomux_v3_cfg_t mx51efikasb_pads[]__initconst = {/* USB HOST2 */ MX51_PAD_EIM_D16__USBH2_DATA0 ,MX51_PAD_EIM_D17__USBH2_DATA1 ,
arch/arm/mach-imx/mach-mx53_ard.c +1 -1
@@ -46,7 +46,7 @@#define ARD_PROG IMX_GPIO_NR(5, 12)#define ARD_VOLUMEUP IMX_GPIO_NR(5, 13) -static iomux_v3_cfg_t mx53_ard_pads[] = { +static const iomux_v3_cfg_t mx53_ard_pads[]__initconst = {/* UART1 */ MX53_PAD_PATA_DIOW__UART1_TXD_MUX ,MX53_PAD_PATA_DMACK__UART1_RXD_MUX ,
arch/arm/mach-imx/mach-mx53_evk.c +1 -1
@@ -39,7 +39,7 @@#include "devices-imx53.h" -static iomux_v3_cfg_t mx53_evk_pads[] = { +static const iomux_v3_cfg_t mx53_evk_pads[]__initconst = {MX53_PAD_CSI0_DAT10__UART1_TXD_MUX ,MX53_PAD_CSI0_DAT11__UART1_RXD_MUX ,
arch/arm/mach-imx/mach-mx53_loco.c +1 -1
@@ -44,7 +44,7 @@#define LOCO_SD1_CD IMX_GPIO_NR(3, 13)#define LOCO_ACCEL_EN IMX_GPIO_NR(6, 14) -static iomux_v3_cfg_t mx53_loco_pads[] = { +static const iomux_v3_cfg_t mx53_loco_pads[]__initconst = {/* FEC */ MX53_PAD_FEC_MDC__FEC_MDC ,MX53_PAD_FEC_MDIO__FEC_MDIO ,
arch/arm/mach-imx/mach-mx53_smd.c +1 -1
@@ -36,7 +36,7 @@#define SMD_FEC_PHY_RST IMX_GPIO_NR(7, 6)#define MX53_SMD_SATA_PWR_EN IMX_GPIO_NR(3, 3) -static iomux_v3_cfg_t mx53_smd_pads[] = { +static const iomux_v3_cfg_t mx53_smd_pads[]__initconst = {MX53_PAD_CSI0_DAT10__UART1_TXD_MUX ,MX53_PAD_CSI0_DAT11__UART1_RXD_MUX ,
arch/arm/mach-imx/mach-pcm043.c +1 -1
@@ -129,7 +129,7 @@ static struct platform_device *devices[] __initdata = { &pcm043_flash, }; -static iomux_v3_cfg_t pcm043_pads[] = { +static const iomux_v3_cfg_t pcm043_pads[]__initconst = {/* UART1 */ MX35_PAD_CTS1__UART1_CTS ,MX35_PAD_RTS1__UART1_RTS ,
arch/arm/mach-imx/mach-vpr200.c +1 -1
@@ -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 */ MX35_PAD_TXD1__UART1_TXD_MUX ,MX35_PAD_RXD1__UART1_RXD_MUX ,
arch/arm/mach-imx/mx51_efika.c +1 -1
@@ -55,7 +55,7 @@#define EFIKAMX_PMIC IMX_GPIO_NR(1, 6) -static iomux_v3_cfg_t mx51efika_pads[] = { +static const iomux_v3_cfg_t mx51efika_pads[]__initconst = {/* UART1 */ MX51_PAD_UART1_RXD__UART1_RXD ,MX51_PAD_UART1_TXD__UART1_TXD ,
arch/arm/plat-mxc/include/mach/iomux-v3.h +2 -1
@@ -131,7 +131,8 @@ int mxc_iomux_v3_setup_pad(iomux_v3_cfg_t pad);* setups mutliple pads * 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
arch/arm/plat-mxc/iomux-v3.c +3 -2
@@ -56,9 +56,10 @@ int mxc_iomux_v3_setup_pad(iomux_v3_cfg_t pad) }EXPORT_SYMBOL (mxc_iomux_v3_setup_pad); -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 ret;
Signature · 1 line
1.7.10.4
PATCH 1/1 ARM: imx/iomux-v3: allow pad_list to be const
Quoted 9 lines · Uwe Kleine-K?nig
Also fix all machine files to make use of it and while at it also make the pad lists
__init_const.Signed-off-by Uwe Kleine-K?nig <[email protected]>---
Hello,well, iomux-v3 is dying so I don't know how welcome this patch is.
For me, it's not so welcomed at this point, as I have seen it's patching a bunch of imx5 board files that are scheduled for removal for this cycle.
Signature · 2 lines
Regards, Shawn
PATCH 1/1 ARM: imx/iomux-v3: allow pad_list to be const
Hello Shawn,
Quoted 8 lines · Shawn Guo
Quoted 7 lines · Uwe Kleine-K?nig
Also fix all machine files to make use of it and while at it also make the pad lists
__init_const.Signed-off-by Uwe Kleine-K?nig <[email protected]>---
Hello,
Quoted 5 lines
Quoted 2 lines
well, iomux-v3 is dying so I don't know how welcome this patch is.
For me, it's not so welcomed at this point, as I have seen it's patching a bunch of imx5 board files that are scheduled for removal for this cycle.
I can resend with the respective board files dropped when your changes hit next.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 1/1 ARM: imx/iomux-v3: allow pad_list to be const
Quoted 3 lines · Uwe Kleine-K?nig
I can resend with the respective board files dropped when your changes hit next.
Sounds good. Thanks, Uwe.
Regards,
Shawn