Skip to contentSkip to conversation

i.MX unnecessary ifdef removal

PATCH New Sascha Hauer 4 participants 18 messages Jan 27, 2011

Subsystems (3)
lore
Share & tools
lore

Sascha Hauer

author maintainer
#0 lore raw

The following patches remove several unnecessary ifdefs in board files.

Sascha

The following changes since commit 376e9c5848abef8c72c09bd89f2f7ee128caa104:

ARM: mxs: add initial pm support (2011-01-26 08:30:49 +0100)

are available in the git repository at:
none ..BRANCH.NOT.VERIFIED..

Sascha Hauer (13):
ARM i.MX35 pcm043: remove unnecessary CONFIG_I2C ifdefs ARM i.MX35 pcm043: put usbh1 outside CONFIG_USB_ULPI
ARM i.MX31 mx31ads: remove unnecessary CONFIG_I2C ifdefs ARM i.MX31 mx31ads: remove unnecessary CONFIG_SERIAL_IMX ifdefs ARM i.MX31 mx31ads: remove unnecessary CONFIG_SERIAL_8250 ifdefs ARM i.MX27 pca100: remove unnecessary CONFIG_SPI_IMX ifdefs ARM i.MX27 eukrea mbimx27: remove unnecessary CONFIG_SPI_IMX ifdefs ARM i.MX31 pcm037 eet: remove unnecessary CONFIG_SPI_IMX ifdefs ARM i.MX51 mx51 3ds: remove unnecessary CONFIG_SERIAL_IMX ifdefs ARM i.MX51 mx51 babbage: remove unnecessary CONFIG_SERIAL_IMX ifdefs ARM i.MX51 mx51 babbage: remove unnecessary CONFIG_KEYBOARD_IMX ifdefs ARM i.MX51 cpuimx51: remove unnecessary CONFIG_SERIAL_8250 ifdefs ARM i.MX51 efikamx: remove unnecessary CONFIG_SERIAL_IMX ifdefs

 arch/arm/mach-imx/eukrea_mbimx27-baseboard.c |    2 -
 arch/arm/mach-imx/mach-pca100.c              |    4 ---
 arch/arm/mach-mx3/mach-mx31ads.c             |   21 +-------------------
 arch/arm/mach-mx3/mach-pcm037_eet.c          |    2 -
 arch/arm/mach-mx3/mach-pcm043.c              |   10 ++------
 arch/arm/mach-mx5/board-cpuimx51.c           |    4 ---
 arch/arm/mach-mx5/board-mx51_3ds.c           |   27 ++++---------------------
 arch/arm/mach-mx5/board-mx51_babbage.c       |   19 ++++-------------
 arch/arm/mach-mx5/board-mx51_efikamx.c       |   17 ++-------------
 9 files changed, 17 insertions(+), 89 deletions(-)
author maintainer
#1 lore raw

PATCH 1/13 ARM i.MX35 pcm043: remove unnecessary CONFIG_I2C ifdefs

---
 arch/arm/mach-mx3/mach-pcm043.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
arch/arm/mach-mx3/mach-pcm043.c +0 -4
index bcf83fc..a27022d 100644
@@ -115,7 +115,6 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
 	.flags = IMXUART_HAVE_RTSCTS,
 };
 
-#if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE
 static const struct imxi2c_platform_data pcm043_i2c0_data __initconst = {
 	.bitrate = 50000,
 };
@@ -134,7 +133,6 @@ static struct i2c_board_info pcm043_i2c_devices[] = {
 		I2C_BOARD_INFO("pcf8563", 0x51),
 	}
 };
-#endif
 
 static struct platform_device *devices[] __initdata = {
 	&pcm043_flash,
@@ -369,12 +367,10 @@ static void __init mxc_board_init(void)
 
 	imx35_add_imx_uart1(&uart_pdata);
 
-#if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE
 	i2c_register_board_info(0, pcm043_i2c_devices,
 			ARRAY_SIZE(pcm043_i2c_devices));
 
 	imx35_add_imx_i2c0(&pcm043_i2c0_data);
-#endif
 
 	mxc_register_device(&mx3_ipu, &mx3_ipu_data);
 	mxc_register_device(&mx3_fb, &mx3fb_pdata);
Signature · 1 line
1.7.2.3
author maintainer
#2 lore raw

PATCH 2/13 ARM i.MX35 pcm043: put usbh1 outside CONFIG_USB_ULPI

In reply to Sascha Hauer

The usbh1 port of the pcm043 does not use ulpi, so put it outside the corresponding ifdefs.

---
 arch/arm/mach-mx3/mach-pcm043.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-mx3/mach-pcm043.c +3 -3
index a27022d..a515290 100644
@@ -310,13 +310,13 @@ static struct mxc_usbh_platform_data otg_pdata __initdata = {
 	.portsc	= MXC_EHCI_MODE_UTMI,
 	.flags	= MXC_EHCI_INTERFACE_DIFF_UNI,
 };
+#endif
 
 static const struct mxc_usbh_platform_data usbh1_pdata __initconst = {
 	.portsc	= MXC_EHCI_MODE_SERIAL,
 	.flags	= MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY |
 		  MXC_EHCI_IPPUE_DOWN,
 };
-#endif
 
 static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
 	.operating_mode = FSL_USB2_DR_DEVICE,
@@ -382,9 +382,9 @@ static void __init mxc_board_init(void)
 
 		imx35_add_mxc_ehci_otg(&otg_pdata);
 	}
-
-	imx35_add_mxc_ehci_hs(&usbh1_pdata);
 #endif
+	imx35_add_mxc_ehci_hs(&usbh1_pdata);
+
 	if (!otg_mode_host)
 		imx35_add_fsl_usb2_udc(&otg_device_pdata);
 
Signature · 1 line
1.7.2.3
author maintainer
#3 lore raw

PATCH 3/13 ARM i.MX31 mx31ads: remove unnecessary CONFIG_I2C ifdefs

In reply to Sascha Hauer
---
 arch/arm/mach-mx3/mach-mx31ads.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
arch/arm/mach-mx3/mach-mx31ads.c +0 -6
index 88b97d6..f9a7109 100644
@@ -476,7 +476,6 @@ static struct wm8350_platform_data __initdata mx31_wm8350_pdata = {
 };
 #endif
 
-#if defined(CONFIG_I2C_IMX) || defined(CONFIG_I2C_IMX_MODULE)
 static struct i2c_board_info __initdata mx31ads_i2c1_devices[] = {
 #ifdef CONFIG_MACH_MX31ADS_WM1133_EV1
 	{
@@ -497,11 +496,6 @@ static void mxc_init_i2c(void)
 
 	imx31_add_imx_i2c1(NULL);
 }
-#else
-static void mxc_init_i2c(void)
-{
-}
-#endif
 
 static unsigned int ssi_pins[] = {
 	MX31_PIN_SFS5__SFS5,
Signature · 1 line
1.7.2.3
author maintainer
#4 lore raw

PATCH 4/13 ARM i.MX31 mx31ads: remove unnecessary CONFIG_SERIAL_IMX ifdefs

In reply to Sascha Hauer
---
 arch/arm/mach-mx3/mach-mx31ads.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
arch/arm/mach-mx3/mach-mx31ads.c +0 -6
index f9a7109..1a83dc5 100644
@@ -117,7 +117,6 @@ static inline int mxc_init_extuart(void)
 }
 #endif
 
-#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
 static const struct imxuart_platform_data uart_pdata __initconst = {
 	.flags = IMXUART_HAVE_RTSCTS,
 };
@@ -134,11 +133,6 @@ static inline void mxc_init_imx_uart(void)
 	mxc_iomux_setup_multiple_pins(uart_pins, ARRAY_SIZE(uart_pins), "uart-0");
 	imx31_add_imx_uart0(&uart_pdata);
 }
-#else /* !SERIAL_IMX */
-static inline void mxc_init_imx_uart(void)
-{
-}
-#endif /* !SERIAL_IMX */
 
 static void mx31ads_expio_irq_handler(u32 irq, struct irq_desc *desc)
 {
Signature · 1 line
1.7.2.3
author maintainer
#5 lore raw

PATCH 5/13 ARM i.MX31 mx31ads: remove unnecessary CONFIG_SERIAL_8250 ifdefs

In reply to Sascha Hauer
---
 arch/arm/mach-mx3/mach-mx31ads.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)
arch/arm/mach-mx3/mach-mx31ads.c +1 -8
index 1a83dc5..e40eb6e 100644
@@ -73,8 +73,7 @@
  * This file contains the board-specific initialization routines.
  */
 
-#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
-/*!
+/*
  * The serial port definition structure.
  */
 static struct plat_serial8250_port serial_platform_data[] = {
@@ -110,12 +109,6 @@ static int __init mxc_init_extuart(void)
 {
 	return platform_device_register(&serial_device);
 }
-#else
-static inline int mxc_init_extuart(void)
-{
-	return 0;
-}
-#endif
 
 static const struct imxuart_platform_data uart_pdata __initconst = {
 	.flags = IMXUART_HAVE_RTSCTS,
Signature · 1 line
1.7.2.3
author maintainer
#6 lore raw

PATCH 6/13 ARM i.MX27 pca100: remove unnecessary CONFIG_SPI_IMX ifdefs

In reply to Sascha Hauer
---
 arch/arm/mach-imx/mach-pca100.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
arch/arm/mach-imx/mach-pca100.c +0 -4
index cccc0a0..faa4e04 100644
@@ -187,7 +187,6 @@ static struct i2c_board_info pca100_i2c_devices[] = {
 	}
 };
 
-#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
 static struct spi_eeprom at25320 = {
 	.name		= "at25320an",
 	.byte_len	= 4096,
@@ -211,7 +210,6 @@ static const struct spi_imx_master pca100_spi0_data __initconst = {
 	.chipselect	= pca100_spi_cs,
 	.num_chipselect = ARRAY_SIZE(pca100_spi_cs),
 };
-#endif
 
 static void pca100_ac97_warm_reset(struct snd_ac97 *ac97)
 {
@@ -389,13 +387,11 @@ static void __init pca100_init(void)
 
 	imx27_add_imx_i2c(1, &pca100_i2c1_data);
 
-#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
 	mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_IN);
 	mxc_gpio_mode(GPIO_PORTD | 27 | GPIO_GPIO | GPIO_IN);
 	spi_register_board_info(pca100_spi_board_info,
 				ARRAY_SIZE(pca100_spi_board_info));
 	imx27_add_spi_imx0(&pca100_spi0_data);
-#endif
 
 	gpio_request(OTG_PHY_CS_GPIO, "usb-otg-cs");
 	gpio_direction_output(OTG_PHY_CS_GPIO, 1);
Signature · 1 line
1.7.2.3
author maintainer
#7 lore raw

PATCH 7/13 ARM i.MX27 eukrea mbimx27: remove unnecessary CONFIG_SPI_IMX ifdefs

In reply to Sascha Hauer
---
 arch/arm/mach-imx/eukrea_mbimx27-baseboard.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c +0 -2
index 275c858..b6d68cf 100644
@@ -357,13 +357,11 @@ void __init eukrea_mbimx27_baseboard_init(void)
 	ads7846_dev_init();
 #endif
 
-#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
 	/* SPI_CS0 init */
 	mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT);
 	imx27_add_spi_imx0(&eukrea_mbimx27_spi0_data);
 	spi_register_board_info(eukrea_mbimx27_spi_board_info,
 			ARRAY_SIZE(eukrea_mbimx27_spi_board_info));
-#endif
 
 	/* Leds configuration */
 	mxc_gpio_mode(GPIO_PORTF | 16 | GPIO_GPIO | GPIO_OUT);
Signature · 1 line
1.7.2.3
author maintainer
#8 lore raw

PATCH 8/13 ARM i.MX31 pcm037 eet: remove unnecessary CONFIG_SPI_IMX ifdefs

In reply to Sascha Hauer
---
 arch/arm/mach-mx3/mach-pcm037_eet.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
arch/arm/mach-mx3/mach-pcm037_eet.c +0 -2
index fda5654..df6fb07 100644
@@ -180,9 +180,7 @@ static int __init eet_init_devices(void)
 
 	/* SPI */
 	spi_register_board_info(pcm037_spi_dev, ARRAY_SIZE(pcm037_spi_dev));
-#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
 	imx31_add_spi_imx0(&pcm037_spi1_pdata);
-#endif
 
 	platform_device_register(&pcm037_gpio_keys_device);
 
Signature · 1 line
1.7.2.3
author maintainer
#9 lore raw

PATCH 9/13 ARM i.MX51 mx51 3ds: remove unnecessary CONFIG_SERIAL_IMX ifdefs

In reply to Sascha Hauer
---
 arch/arm/mach-mx5/board-mx51_3ds.c |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)
arch/arm/mach-mx5/board-mx51_3ds.c +4 -10
index 8a0619b..feb2800 100644
@@ -71,22 +71,13 @@ static iomux_v3_cfg_t mx51_3ds_pads[] = {
 };
 
 /* Serial ports */
-#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
 static const struct imxuart_platform_data uart_pdata __initconst = {
 	.flags = IMXUART_HAVE_RTSCTS,
 };
 
 static inline void mxc_init_imx_uart(void)
 {
-	imx51_add_imx_uart(0, &uart_pdata);
-	imx51_add_imx_uart(1, &uart_pdata);
-	imx51_add_imx_uart(2, &uart_pdata);
-}
-#else /* !SERIAL_IMX */
-static inline void mxc_init_imx_uart(void)
-{
 }
-#endif /* SERIAL_IMX */
 
 #if defined(CONFIG_KEYBOARD_IMX) || defined(CONFIG_KEYBOARD_IMX_MODULE)
 static int mx51_3ds_board_keymap[] = {
@@ -161,7 +152,10 @@ static void __init mxc_board_init(void)
 {
 	mxc_iomux_v3_setup_multiple_pads(mx51_3ds_pads,
 					ARRAY_SIZE(mx51_3ds_pads));
-	mxc_init_imx_uart();
+
+	imx51_add_imx_uart(0, &uart_pdata);
+	imx51_add_imx_uart(1, &uart_pdata);
+	imx51_add_imx_uart(2, &uart_pdata);
 
 	imx51_add_ecspi(1, &mx51_3ds_ecspi2_pdata);
 	spi_register_board_info(mx51_3ds_spi_nor_device,
Signature · 1 line
1.7.2.3
#10 lore raw

PATCH 9/13 ARM i.MX51 mx51 3ds: remove unnecessary CONFIG_SERIAL_IMX ifdefs

Hello.

Quoted 18 lines · Sascha Hauer
---
  arch/arm/mach-mx5/board-mx51_3ds.c |   14 ++++----------
  1 files changed, 4 insertions(+), 10 deletions(-)
arch/arm/mach-mx5/board-mx51_3ds.c +0 -1
index 8a0619b..feb2800 100644
@@ -71,22 +71,13 @@ static iomux_v3_cfg_t mx51_3ds_pads[] = {
  };
 
  /* Serial ports */
-#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
  static const struct imxuart_platform_data uart_pdata __initconst = {
  	.flags = IMXUART_HAVE_RTSCTS,
  };
 

arch/arm/mach-mx5/board-mx51_3ds.c static iomux_v3_cfg_t mx51_3ds_pads[] = { · line 80

Quoted 10 lines
arch/arm/mach-mx5/board-mx51_3ds.c +0 -7
  static inline void mxc_init_imx_uart(void)
  {
-	imx51_add_imx_uart(0, &uart_pdata);
-	imx51_add_imx_uart(1, &uart_pdata);
-	imx51_add_imx_uart(2, &uart_pdata);
-}
-#else /* !SERIAL_IMX */
-static inline void mxc_init_imx_uart(void)
-{
  }

Why then leave the empty function?

Quoted 6 lines
arch/arm/mach-mx5/board-mx51_3ds.c +0 -1
-#endif /* SERIAL_IMX */
 
  #if defined(CONFIG_KEYBOARD_IMX) || defined(CONFIG_KEYBOARD_IMX_MODULE)
  static int mx51_3ds_board_keymap[] = {
@@ -161,7 +152,10 @@ static void __init mxc_board_init(void)
  {

arch/arm/mach-mx5/board-mx51_3ds.c static void __init mxc_board_init(void) · line 161

Quoted 10 lines
arch/arm/mach-mx5/board-mx51_3ds.c +4 -1
  	mxc_iomux_v3_setup_multiple_pads(mx51_3ds_pads,
  					ARRAY_SIZE(mx51_3ds_pads));
-	mxc_init_imx_uart();
+
+	imx51_add_imx_uart(0, &uart_pdata);
+	imx51_add_imx_uart(1, &uart_pdata);
+	imx51_add_imx_uart(2, &uart_pdata);
 
  	imx51_add_ecspi(1,&mx51_3ds_ecspi2_pdata);
  	spi_register_board_info(mx51_3ds_spi_nor_device,

WBR, Sergei

author maintainer
#11 lore raw

PATCH 10/13 ARM i.MX51 mx51 babbage: remove unnecessary CONFIG_SERIAL_IMX ifdefs

In reply to Sascha Hauer
---
 arch/arm/mach-mx5/board-mx51_babbage.c |   19 +++++--------------
 1 files changed, 5 insertions(+), 14 deletions(-)
arch/arm/mach-mx5/board-mx51_babbage.c +5 -14
index 1d231e8..d9d402e 100644
@@ -161,23 +161,10 @@ static iomux_v3_cfg_t mx51babbage_pads[] = {
 };
 
 /* Serial ports */
-#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
 static const struct imxuart_platform_data uart_pdata __initconst = {
 	.flags = IMXUART_HAVE_RTSCTS,
 };
 
-static inline void mxc_init_imx_uart(void)
-{
-	imx51_add_imx_uart(0, &uart_pdata);
-	imx51_add_imx_uart(1, &uart_pdata);
-	imx51_add_imx_uart(2, &uart_pdata);
-}
-#else /* !SERIAL_IMX */
-static inline void mxc_init_imx_uart(void)
-{
-}
-#endif /* SERIAL_IMX */
-
 static const struct imxi2c_platform_data babbage_i2c_data __initconst = {
 	.bitrate = 100000,
 };
@@ -360,7 +347,11 @@ static void __init mxc_board_init(void)
 #endif
 	mxc_iomux_v3_setup_multiple_pads(mx51babbage_pads,
 					ARRAY_SIZE(mx51babbage_pads));
-	mxc_init_imx_uart();
+
+	imx51_add_imx_uart(0, &uart_pdata);
+	imx51_add_imx_uart(1, &uart_pdata);
+	imx51_add_imx_uart(2, &uart_pdata);
+
 	babbage_fec_reset();
 	imx51_add_fec(NULL);
 
Signature · 1 line
1.7.2.3
author maintainer
#12 lore raw

PATCH 11/13 ARM i.MX51 mx51 babbage: remove unnecessary CONFIG_KEYBOARD_IMX ifdefs

In reply to Sascha Hauer
---
 arch/arm/mach-mx5/board-mx51_3ds.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
arch/arm/mach-mx5/board-mx51_3ds.c +1 -12
index feb2800..58a2574 100644
@@ -79,7 +79,6 @@ static inline void mxc_init_imx_uart(void)
 {
 }
 
-#if defined(CONFIG_KEYBOARD_IMX) || defined(CONFIG_KEYBOARD_IMX_MODULE)
 static int mx51_3ds_board_keymap[] = {
 	KEY(0, 0, KEY_1),
 	KEY(0, 1, KEY_2),
@@ -115,16 +114,6 @@ static const struct matrix_keymap_data mx51_3ds_map_data __initconst = {
 	.keymap_size	= ARRAY_SIZE(mx51_3ds_board_keymap),
 };
 
-static void mxc_init_keypad(void)
-{
-	imx51_add_imx_keypad(&mx51_3ds_map_data);
-}
-#else
-static inline void mxc_init_keypad(void)
-{
-}
-#endif
-
 static int mx51_3ds_spi2_cs[] = {
 	MXC_SPI_CS(0),
 	MX51_3DS_ECSPI2_CS,
@@ -166,7 +155,7 @@ static void __init mxc_board_init(void)
 				    "devices on the board are unusable.\n");
 
 	imx51_add_sdhci_esdhc_imx(0, NULL);
-	mxc_init_keypad();
+	imx51_add_imx_keypad(&mx51_3ds_map_data);
 	imx51_add_imx2_wdt(0, NULL);
 }
 
Signature · 1 line
1.7.2.3
reviewer
#13 lore raw

PATCH 11/13 ARM i.MX51 mx51 babbage: remove unnecessary CONFIG_KEYBOARD_IMX ifdefs

Hi Sascha,

arch/arm/mach-mx5/board-mx51_3ds.c

Quoted 9 lines · Sascha Hauer

---
?arch/arm/mach-mx5/board-mx51_3ds.c | ? 13 +------------ ?1 files changed, 1 insertions(+), 12 deletions(-)

arch/arm/mach-mx5/board-mx51_3ds.c +0 -0
index feb2800..58a2574 100644

In the subject field you should put MX51_3ds instead of Babbage.

Regards,

Fabio Estevam

author maintainer
#14 lore raw

PATCH 12/13 ARM i.MX51 cpuimx51: remove unnecessary CONFIG_SERIAL_8250 ifdefs

In reply to Sascha Hauer
---
 arch/arm/mach-mx5/board-cpuimx51.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
arch/arm/mach-mx5/board-cpuimx51.c +0 -4
index f8652ef..f576a97 100644
@@ -60,7 +60,6 @@
 #define	MX51_USB_PLL_DIV_19_2_MHZ	0x01
 #define	MX51_USB_PLL_DIV_24_MHZ		0x02
 
-#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
 static struct plat_serial8250_port serial_platform_data[] = {
 	{
 		.mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x400000),
@@ -105,12 +104,9 @@ static struct platform_device serial_device = {
 		.platform_data = serial_platform_data,
 	},
 };
-#endif
 
 static struct platform_device *devices[] __initdata = {
-#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE)
 	&serial_device,
-#endif
 };
 
 static iomux_v3_cfg_t eukrea_cpuimx51_pads[] = {
Signature · 1 line
1.7.2.3
author maintainer
#15 lore raw

PATCH 13/13 ARM i.MX51 efikamx: remove unnecessary CONFIG_SERIAL_IMX ifdefs

In reply to Sascha Hauer
---
 arch/arm/mach-mx5/board-mx51_efikamx.c |   17 +++--------------
 1 files changed, 3 insertions(+), 14 deletions(-)
arch/arm/mach-mx5/board-mx51_efikamx.c +3 -14
index b7946f8..e237040 100644
@@ -121,23 +121,10 @@ static iomux_v3_cfg_t mx51efikamx_pads[] = {
 };
 
 /* Serial ports */
-#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
 static const struct imxuart_platform_data uart_pdata = {
 	.flags = IMXUART_HAVE_RTSCTS,
 };
 
-static inline void mxc_init_imx_uart(void)
-{
-	imx51_add_imx_uart(0, &uart_pdata);
-	imx51_add_imx_uart(1, &uart_pdata);
-	imx51_add_imx_uart(2, &uart_pdata);
-}
-#else /* !SERIAL_IMX */
-static inline void mxc_init_imx_uart(void)
-{
-}
-#endif /* SERIAL_IMX */
-
 /* This function is board specific as the bit mask for the plldiv will also
  * be different for other Freescale SoCs, thus a common bitmask is not
  * possible and cannot get place in /plat-mxc/ehci.c.
@@ -320,7 +307,9 @@ static void __init mxc_board_init(void)
 					ARRAY_SIZE(mx51efikamx_pads));
 	mx51_efikamx_board_id();
 	mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config);
-	mxc_init_imx_uart();
+	imx51_add_imx_uart(0, &uart_pdata);
+	imx51_add_imx_uart(1, &uart_pdata);
+	imx51_add_imx_uart(2, &uart_pdata);
 	imx51_add_sdhci_esdhc_imx(0, NULL);
 
 	/* on < 1.2 boards both SD controllers are used */
Signature · 1 line
1.7.2.3
#16 lore raw

PATCH 13/13 ARM i.MX51 efikamx: remove unnecessary CONFIG_SERIAL_IMX ifdefs

Sascha Hauer <[email protected]> writes:

Hi,

Quoted 34 lines
---
 arch/arm/mach-mx5/board-mx51_efikamx.c |   17 +++--------------
 1 files changed, 3 insertions(+), 14 deletions(-)
arch/arm/mach-mx5/board-mx51_efikamx.c +0 -13
index b7946f8..e237040 100644
@@ -121,23 +121,10 @@ static iomux_v3_cfg_t mx51efikamx_pads[] = {
 };
 
 /* Serial ports */
-#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
 static const struct imxuart_platform_data uart_pdata = {
 	.flags = IMXUART_HAVE_RTSCTS,
 };
 
-static inline void mxc_init_imx_uart(void)
-{
-	imx51_add_imx_uart(0, &uart_pdata);
-	imx51_add_imx_uart(1, &uart_pdata);
-	imx51_add_imx_uart(2, &uart_pdata);
-}
-#else /* !SERIAL_IMX */
-static inline void mxc_init_imx_uart(void)
-{
-}
-#endif /* SERIAL_IMX */
-
 /* This function is board specific as the bit mask for the plldiv will also
  * be different for other Freescale SoCs, thus a common bitmask is not
  * possible and cannot get place in /plat-mxc/ehci.c.

arch/arm/mach-mx5/board-mx51_efikamx.c static void __init mxc_board_init(void) · line 312

Quoted 7 lines
arch/arm/mach-mx5/board-mx51_efikamx.c +3 -1
@@ -320,7 +307,9 @@ static void __init mxc_board_init(void)
 					ARRAY_SIZE(mx51efikamx_pads));
 	mx51_efikamx_board_id();
 	mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config);
-	mxc_init_imx_uart();
+	imx51_add_imx_uart(0, &uart_pdata);
+	imx51_add_imx_uart(1, &uart_pdata);
+	imx51_add_imx_uart(2, &uart_pdata);

I'm even wondering if configuring uart 1 and 2 is necessary. afair only ttymxc0 is really used

Arnaud

author maintainer
#17 lore raw

PATCH 13/13 ARM i.MX51 efikamx: remove unnecessary CONFIG_SERIAL_IMX ifdefs

Quoted 40 lines · Arnaud Patard

Sascha Hauer <[email protected]> writes:

Hi,

Quoted 36 lines
---
 arch/arm/mach-mx5/board-mx51_efikamx.c |   17 +++--------------
 1 files changed, 3 insertions(+), 14 deletions(-)
arch/arm/mach-mx5/board-mx51_efikamx.c +0 -13
index b7946f8..e237040 100644
@@ -121,23 +121,10 @@ static iomux_v3_cfg_t mx51efikamx_pads[] = {
 };
 
 /* Serial ports */
-#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
 static const struct imxuart_platform_data uart_pdata = {
 	.flags = IMXUART_HAVE_RTSCTS,
 };
 
-static inline void mxc_init_imx_uart(void)
-{
-	imx51_add_imx_uart(0, &uart_pdata);
-	imx51_add_imx_uart(1, &uart_pdata);
-	imx51_add_imx_uart(2, &uart_pdata);
-}
-#else /* !SERIAL_IMX */
-static inline void mxc_init_imx_uart(void)
-{
-}
-#endif /* SERIAL_IMX */
-
 /* This function is board specific as the bit mask for the plldiv will also
  * be different for other Freescale SoCs, thus a common bitmask is not
  * possible and cannot get place in /plat-mxc/ehci.c.
@@ -320,7 +307,9 @@ static void __init mxc_board_init(void)
 					ARRAY_SIZE(mx51efikamx_pads));
 	mx51_efikamx_board_id();
Quoted 8 lines

arch/arm/mach-mx5/board-mx51_efikamx.c static void __init mxc_board_init(void) · line 312

Quoted 5 lines
arch/arm/mach-mx5/board-mx51_efikamx.c +3 -1
 	mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config);
-	mxc_init_imx_uart();
+	imx51_add_imx_uart(0, &uart_pdata);
+	imx51_add_imx_uart(1, &uart_pdata);
+	imx51_add_imx_uart(2, &uart_pdata);

I'm even wondering if configuring uart 1 and 2 is necessary. afair only ttymxc0 is really used

I can't say because I do not have the hardware. Anyway, this would be subject to another patch.

Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |