Skip to contentSkip to conversation

omap: merge IGEP v2 and v3

PATCH RESEND Superseded Mike Rapoport 5 participants 18 messages May 12, 2011 – May 18, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover omap: merge IGEP v2 and v3

Hi Tony,

This is yet another attempt to reduce code duplication in the board files :) Only build tested, since I don't have the hardware, so I belive an Ack from Enric is required.

Mike Rapoport (4):
omap: igep0020: name refactoring for future merge with IGEP3
omap: igep0020: minor refactoring
omap: igep0020: add support for IGEP3
omap: drop board-igep0030.c

 arch/arm/mach-omap2/Kconfig          |    1 +
 arch/arm/mach-omap2/Makefile         |    2 -
 arch/arm/mach-omap2/board-igep0020.c |  286 +++++++++++++---------
 arch/arm/mach-omap2/board-igep0030.c |  438 ----------------------------------
 4 files changed, 174 insertions(+), 553 deletions(-)
 delete mode 100644 arch/arm/mach-omap2/board-igep0030.c
Signature · 1 line
1.7.3.1
#1 lore raw

PATCH RESEND 1/4 omap: igep0020: name refactoring for future merge with IGEP3

IGEP2 and IGEP3 boards are very similar and can be merged into one file. Start refactoring with changing igep2 to igep where applicable.

---
 arch/arm/mach-omap2/board-igep0020.c |  158 +++++++++++++++++-----------------
 1 files changed, 79 insertions(+), 79 deletions(-)
arch/arm/mach-omap2/board-igep0020.c +79 -79
index c62c297e..ad20f7b 100644
@@ -112,7 +112,7 @@ static void __init igep2_get_revision(void)
  * So MTD regards it as 4KiB page size and 256KiB block size 64*(2*2048)
  */
 
-static struct mtd_partition igep2_onenand_partitions[] = {
+static struct mtd_partition igep_onenand_partitions[] = {
 	{
 		.name           = "X-Loader",
 		.offset         = 0,
@@ -140,21 +140,21 @@ static struct mtd_partition igep2_onenand_partitions[] = {
 	},
 };
 
-static struct omap_onenand_platform_data igep2_onenand_data = {
-	.parts = igep2_onenand_partitions,
-	.nr_parts = ARRAY_SIZE(igep2_onenand_partitions),
+static struct omap_onenand_platform_data igep_onenand_data = {
+	.parts = igep_onenand_partitions,
+	.nr_parts = ARRAY_SIZE(igep_onenand_partitions),
 	.dma_channel	= -1,	/* disable DMA in OMAP OneNAND driver */
 };
 
-static struct platform_device igep2_onenand_device = {
+static struct platform_device igep_onenand_device = {
 	.name		= "omap2-onenand",
 	.id		= -1,
 	.dev = {
-		.platform_data = &igep2_onenand_data,
+		.platform_data = &igep_onenand_data,
 	},
 };
 
-static void __init igep2_flash_init(void)
+static void __init igep_flash_init(void)
 {
 	u8 cs = 0;
 	u8 onenandcs = GPMC_CS_NUM + 1;
@@ -166,7 +166,7 @@ static void __init igep2_flash_init(void)
 		/* Check if NAND/oneNAND is configured */
 		if ((ret & 0xC00) == 0x800)
 			/* NAND found */
-			pr_err("IGEP2: Unsupported NAND found\n");
+			pr_err("IGEP: Unsupported NAND found\n");
 		else {
 			ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7);
 			if ((ret & 0x3F) == (ONENAND_MAP >> 24))
@@ -176,18 +176,18 @@ static void __init igep2_flash_init(void)
 	}
 
 	if (onenandcs > GPMC_CS_NUM) {
-		pr_err("IGEP2: Unable to find configuration in GPMC\n");
+		pr_err("IGEP: Unable to find configuration in GPMC\n");
 		return;
 	}
 
-	igep2_onenand_data.cs = onenandcs;
+	igep_onenand_data.cs = onenandcs;
 
-	if (platform_device_register(&igep2_onenand_device) < 0)
-		pr_err("IGEP2: Unable to register OneNAND device\n");
+	if (platform_device_register(&igep_onenand_device) < 0)
+		pr_err("IGEP: Unable to register OneNAND device\n");
 }
 
 #else
-static void __init igep2_flash_init(void) {}
+static void __init igep_flash_init(void) {}
 #endif
 
 #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
@@ -211,11 +211,11 @@ static inline void __init igep2_init_smsc911x(void)
 static inline void __init igep2_init_smsc911x(void) { }
 #endif
 
-static struct regulator_consumer_supply igep2_vmmc1_supply =
+static struct regulator_consumer_supply igep_vmmc1_supply =
 	REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
 
 /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
-static struct regulator_init_data igep2_vmmc1 = {
+static struct regulator_init_data igep_vmmc1 = {
 	.constraints = {
 		.min_uV			= 1850000,
 		.max_uV			= 3150000,
@@ -226,13 +226,13 @@ static struct regulator_init_data igep2_vmmc1 = {
 					| REGULATOR_CHANGE_STATUS,
 	},
 	.num_consumer_supplies  = 1,
-	.consumer_supplies      = &igep2_vmmc1_supply,
+	.consumer_supplies      = &igep_vmmc1_supply,
 };
 
-static struct regulator_consumer_supply igep2_vio_supply =
+static struct regulator_consumer_supply igep_vio_supply =
 	REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1");
 
-static struct regulator_init_data igep2_vio = {
+static struct regulator_init_data igep_vio = {
 	.constraints = {
 		.min_uV			= 1800000,
 		.max_uV			= 1800000,
@@ -244,34 +244,34 @@ static struct regulator_init_data igep2_vio = {
 					| REGULATOR_CHANGE_STATUS,
 	},
 	.num_consumer_supplies  = 1,
-	.consumer_supplies      = &igep2_vio_supply,
+	.consumer_supplies      = &igep_vio_supply,
 };
 
-static struct regulator_consumer_supply igep2_vmmc2_supply =
+static struct regulator_consumer_supply igep_vmmc2_supply =
 	REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
 
-static struct regulator_init_data igep2_vmmc2 = {
+static struct regulator_init_data igep_vmmc2 = {
 	.constraints		= {
 		.valid_modes_mask	= REGULATOR_MODE_NORMAL,
 		.always_on		= 1,
 	},
 	.num_consumer_supplies	= 1,
-	.consumer_supplies	= &igep2_vmmc2_supply,
+	.consumer_supplies	= &igep_vmmc2_supply,
 };
 
-static struct fixed_voltage_config igep2_vwlan = {
+static struct fixed_voltage_config igep_vwlan = {
 	.supply_name		= "vwlan",
 	.microvolts		= 3300000,
 	.gpio			= -EINVAL,
 	.enabled_at_boot	= 1,
-	.init_data		= &igep2_vmmc2,
+	.init_data		= &igep_vmmc2,
 };
 
-static struct platform_device igep2_vwlan_device = {
+static struct platform_device igep_vwlan_device = {
 	.name		= "reg-fixed-voltage",
 	.id		= 0,
 	.dev = {
-		.platform_data	= &igep2_vwlan,
+		.platform_data	= &igep_vwlan,
 	},
 };
 
@@ -296,7 +296,7 @@ static struct omap2_hsmmc_info mmc[] = {
 #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
 #include <linux/leds.h>
 
-static struct gpio_led igep2_gpio_leds[] = {
+static struct gpio_led igep_gpio_leds[] = {
 	[0] = {
 		.name			= "gpio-led:red:d0",
 		.gpio			= IGEP2_GPIO_LED0_RED,
@@ -320,34 +320,34 @@ static struct gpio_led igep2_gpio_leds[] = {
 	},
 };
 
-static struct gpio_led_platform_data igep2_led_pdata = {
-	.leds           = igep2_gpio_leds,
-	.num_leds       = ARRAY_SIZE(igep2_gpio_leds),
+static struct gpio_led_platform_data igep_led_pdata = {
+	.leds           = igep_gpio_leds,
+	.num_leds       = ARRAY_SIZE(igep_gpio_leds),
 };
 
-static struct platform_device igep2_led_device = {
+static struct platform_device igep_led_device = {
 	 .name   = "leds-gpio",
 	 .id     = -1,
 	 .dev    = {
-		 .platform_data  =  &igep2_led_pdata,
+		 .platform_data  =  &igep_led_pdata,
 	},
 };
 
-static void __init igep2_leds_init(void)
+static void __init igep_leds_init(void)
 {
-	platform_device_register(&igep2_led_device);
+	platform_device_register(&igep_led_device);
 }
 
 #else
-static struct gpio igep2_gpio_leds[] __initdata = {
+static struct gpio igep_gpio_leds[] __initdata = {
 	{ IGEP2_GPIO_LED0_RED,	 GPIOF_OUT_INIT_LOW, "gpio-led:red:d0"   },
 	{ IGEP2_GPIO_LED0_GREEN, GPIOF_OUT_INIT_LOW, "gpio-led:green:d0" },
 	{ IGEP2_GPIO_LED1_RED,	 GPIOF_OUT_INIT_LOW, "gpio-led:red:d1"   },
 };
 
-static inline void igep2_leds_init(void)
+static inline void igep_leds_init(void)
 {
-	if (gpio_request_array(igep2_gpio_leds, ARRAY_SIZE(igep2_gpio_leds))) {
+	if (gpio_request_array(igep_gpio_leds, ARRAY_SIZE(igep_gpio_leds))) {
 		pr_warning("IGEP v2: Could not obtain leds gpios\n");
 		return;
 	}
@@ -363,7 +363,7 @@ static struct gpio igep2_twl_gpios[] = {
 	{ -EINVAL, GPIOF_OUT_INIT_LOW,	"GPIO_USBH_CPEN" },
 };
 
-static int igep2_twl_gpio_setup(struct device *dev,
+static int igep_twl_gpio_setup(struct device *dev,
 		unsigned gpio, unsigned ngpio)
 {
 	int ret;
@@ -392,23 +392,23 @@ static int igep2_twl_gpio_setup(struct device *dev,
 	if (ret == 0)
 		gpio_export(gpio + TWL4030_GPIO_MAX + 1, 0);
 	else
-		pr_warning("IGEP v2: Could not obtain gpio GPIO_LED1_GREEN\n");
+		pr_warning("IGEP: Could not obtain gpio GPIO_LED1_GREEN\n");
 #else
-	igep2_gpio_leds[3].gpio = gpio + TWL4030_GPIO_MAX + 1;
+	igep_gpio_leds[3].gpio = gpio + TWL4030_GPIO_MAX + 1;
 #endif
 
 	return 0;
 };
 
-static struct twl4030_gpio_platform_data igep2_twl4030_gpio_pdata = {
+static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = {
 	.gpio_base	= OMAP_MAX_GPIO_LINES,
 	.irq_base	= TWL4030_GPIO_IRQ_BASE,
 	.irq_end	= TWL4030_GPIO_IRQ_END,
 	.use_leds	= true,
-	.setup		= igep2_twl_gpio_setup,
+	.setup		= igep_twl_gpio_setup,
 };
 
-static struct twl4030_usb_data igep2_usb_data = {
+static struct twl4030_usb_data igep_usb_data = {
 	.usb_mode	= T2_USB_MODE_ULPI,
 };
 
@@ -476,11 +476,11 @@ static void __init igep2_display_init(void)
 		pr_err("IGEP v2: Could not obtain gpio GPIO_DVI_PUP\n");
 }
 
-static struct platform_device *igep2_devices[] __initdata = {
-	&igep2_vwlan_device,
+static struct platform_device *igep_devices[] __initdata = {
+	&igep_vwlan_device,
 };
 
-static void __init igep2_init_early(void)
+static void __init igep_init_early(void)
 {
 	omap2_init_common_infrastructure();
 	omap2_init_common_devices(m65kxxxxam_sdrc_params,
@@ -525,18 +525,18 @@ static struct twl4030_keypad_data igep2_keypad_pdata = {
 	.rep		= 1,
 };
 
-static struct twl4030_platform_data igep2_twldata = {
+static struct twl4030_platform_data igep_twldata = {
 	.irq_base	= TWL4030_IRQ_BASE,
 	.irq_end	= TWL4030_IRQ_END,
 
 	/* platform_data for children goes here */
-	.usb		= &igep2_usb_data,
+	.usb		= &igep_usb_data,
 	.codec		= &igep2_codec_data,
-	.gpio		= &igep2_twl4030_gpio_pdata,
+	.gpio		= &igep_twl4030_gpio_pdata,
 	.keypad		= &igep2_keypad_pdata,
-	.vmmc1          = &igep2_vmmc1,
+	.vmmc1          = &igep_vmmc1,
 	.vpll2		= &igep2_vpll2,
-	.vio		= &igep2_vio,
+	.vio		= &igep_vio,
 };
 
 static struct i2c_board_info __initdata igep2_i2c3_boardinfo[] = {
@@ -545,11 +545,11 @@ static struct i2c_board_info __initdata igep2_i2c3_boardinfo[] = {
 	},
 };
 
-static void __init igep2_i2c_init(void)
+static void __init igep_i2c_init(void)
 {
 	int ret;
 
-	omap3_pmic_init("twl4030", &igep2_twldata);
+	omap3_pmic_init("twl4030", &igep_twldata);
 
 	/*
 	 * Bus 3 is attached to the DVI port where devices like the pico DLP
@@ -561,7 +561,7 @@ static void __init igep2_i2c_init(void)
 		pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret);
 }
 
-static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
+static const struct usbhs_omap_board_data igep2_usbhs_bdata __initconst = {
 	.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
 	.port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
 	.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
@@ -579,64 +579,64 @@ static struct omap_board_mux board_mux[] __initdata = {
 #endif
 
 #if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE)
-static struct gpio igep2_wlan_bt_gpios[] __initdata = {
+static struct gpio igep_wlan_bt_gpios[] __initdata = {
 	{ -EINVAL, GPIOF_OUT_INIT_HIGH, "GPIO_WIFI_NPD"	   },
 	{ -EINVAL, GPIOF_OUT_INIT_HIGH, "GPIO_WIFI_NRESET" },
 	{ -EINVAL, GPIOF_OUT_INIT_HIGH, "GPIO_BT_NRESET"   },
 };
 
-static void __init igep2_wlan_bt_init(void)
+static void __init igep_wlan_bt_init(void)
 {
 	int err;
 
 	/* GPIO's for WLAN-BT combo depends on hardware revision */
 	if (hwrev == IGEP2_BOARD_HWREV_B) {
-		igep2_wlan_bt_gpios[0].gpio = IGEP2_RB_GPIO_WIFI_NPD;
-		igep2_wlan_bt_gpios[1].gpio = IGEP2_RB_GPIO_WIFI_NRESET;
-		igep2_wlan_bt_gpios[2].gpio = IGEP2_RB_GPIO_BT_NRESET;
+		igep_wlan_bt_gpios[0].gpio = IGEP2_RB_GPIO_WIFI_NPD;
+		igep_wlan_bt_gpios[1].gpio = IGEP2_RB_GPIO_WIFI_NRESET;
+		igep_wlan_bt_gpios[2].gpio = IGEP2_RB_GPIO_BT_NRESET;
 	} else if (hwrev == IGEP2_BOARD_HWREV_C) {
-		igep2_wlan_bt_gpios[0].gpio = IGEP2_RC_GPIO_WIFI_NPD;
-		igep2_wlan_bt_gpios[1].gpio = IGEP2_RC_GPIO_WIFI_NRESET;
-		igep2_wlan_bt_gpios[2].gpio = IGEP2_RC_GPIO_BT_NRESET;
+		igep_wlan_bt_gpios[0].gpio = IGEP2_RC_GPIO_WIFI_NPD;
+		igep_wlan_bt_gpios[1].gpio = IGEP2_RC_GPIO_WIFI_NRESET;
+		igep_wlan_bt_gpios[2].gpio = IGEP2_RC_GPIO_BT_NRESET;
 	} else
 		return;
 
-	err = gpio_request_array(igep2_wlan_bt_gpios,
-				 ARRAY_SIZE(igep2_wlan_bt_gpios));
+	err = gpio_request_array(igep_wlan_bt_gpios,
+				 ARRAY_SIZE(igep_wlan_bt_gpios));
 	if (err) {
 		pr_warning("IGEP2: Could not obtain WIFI/BT gpios\n");
 		return;
 	}
 
-	gpio_export(igep2_wlan_bt_gpios[0].gpio, 0);
-	gpio_export(igep2_wlan_bt_gpios[1].gpio, 0);
-	gpio_export(igep2_wlan_bt_gpios[2].gpio, 0);
+	gpio_export(igep_wlan_bt_gpios[0].gpio, 0);
+	gpio_export(igep_wlan_bt_gpios[1].gpio, 0);
+	gpio_export(igep_wlan_bt_gpios[2].gpio, 0);
 
-	gpio_set_value(igep2_wlan_bt_gpios[1].gpio, 0);
+	gpio_set_value(igep_wlan_bt_gpios[1].gpio, 0);
 	udelay(10);
-	gpio_set_value(igep2_wlan_bt_gpios[1].gpio, 1);
+	gpio_set_value(igep_wlan_bt_gpios[1].gpio, 1);
 
 }
 #else
-static inline void __init igep2_wlan_bt_init(void) { }
+static inline void __init igep_wlan_bt_init(void) { }
 #endif
 
-static void __init igep2_init(void)
+static void __init igep_init(void)
 {
 	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
 
 	/* Get IGEP2 hardware revision */
 	igep2_get_revision();
 	/* Register I2C busses and drivers */
-	igep2_i2c_init();
-	platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices));
+	igep_i2c_init();
+	platform_add_devices(igep_devices, ARRAY_SIZE(igep_devices));
 	omap_display_init(&igep2_dss_data);
 	omap_serial_init();
 	usb_musb_init(NULL);
-	usbhs_init(&usbhs_bdata);
+	usbhs_init(&igep2_usbhs_bdata);
 
-	igep2_flash_init();
-	igep2_leds_init();
+	igep_flash_init();
+	igep_leds_init();
 	igep2_display_init();
 	igep2_init_smsc911x();
 
@@ -644,7 +644,7 @@ static void __init igep2_init(void)
 	 * WLAN-BT combo module from MuRata which has a Marvell WLAN
 	 * (88W8686) + CSR Bluetooth chipset. Uses SDIO interface.
 	 */
-	igep2_wlan_bt_init();
+	igep_wlan_bt_init();
 
 }
 
@@ -652,8 +652,8 @@ MACHINE_START(IGEP0020, "IGEP v2 board")
 	.boot_params	= 0x80000100,
 	.reserve	= omap_reserve,
 	.map_io		= omap3_map_io,
-	.init_early	= igep2_init_early,
+	.init_early	= igep_init_early,
 	.init_irq	= omap_init_irq,
-	.init_machine	= igep2_init,
+	.init_machine	= igep_init,
 	.timer		= &omap_timer,
 MACHINE_END
Signature · 1 line
1.7.3.1
#2 lore raw

PATCH RESEND 1/4 omap: igep0020: name refactoring for future merge with IGEP3

Hi Mike,

The only comment I wanted to do is maybe I prefer rename the board-igep0020 to board-igep00x0 to be more generic. Apart from this these patch series looks good for me and has my ack. Thanks.

2011/5/12 Mike Rapoport <[email protected]>:

Quoted 416 lines

IGEP2 and IGEP3 boards are very similar and can be merged into one file. Start refactoring with changing igep2 to igep where applicable.

---
?arch/arm/mach-omap2/board-igep0020.c | ?158 +++++++++++++++++----------------- ?1 files changed, 79 insertions(+), 79 deletions(-)

arch/arm/mach-omap2/board-igep0020.c +0 -0
index c62c297e..ad20f7b 100644
@@ -112,7 +112,7 @@ static void __init igep2_get_revision(void)
 ?* So MTD regards it as 4KiB page size and 256KiB block size 64*(2*2048)

?*/

arch/arm/mach-omap2/board-igep0020.c +1 -1
-static struct mtd_partition igep2_onenand_partitions[] = {
+static struct mtd_partition igep_onenand_partitions[] = {

? ? ? ?{
? ? ? ? ? ? ? ?.name ? ? ? ? ? = "X-Loader",
? ? ? ? ? ? ? ?.offset ? ? ? ? = 0,

arch/arm/mach-omap2/board-igep0020.c +3 -3
@@ -140,21 +140,21 @@ static struct mtd_partition igep2_onenand_partitions[] = {
 ? ? ? ?},
 ?};
 
-static struct omap_onenand_platform_data igep2_onenand_data = {
- ? ? ? .parts = igep2_onenand_partitions,
- ? ? ? .nr_parts = ARRAY_SIZE(igep2_onenand_partitions),
+static struct omap_onenand_platform_data igep_onenand_data = {
+ ? ? ? .parts = igep_onenand_partitions,
+ ? ? ? .nr_parts = ARRAY_SIZE(igep_onenand_partitions),

? ? ? ?.dma_channel ? ?= -1, ? /* disable DMA in OMAP OneNAND driver */ ?};

arch/arm/mach-omap2/board-igep0020.c +1 -1
-static struct platform_device igep2_onenand_device = {
+static struct platform_device igep_onenand_device = {

? ? ? ?.name ? ? ? ? ? = "omap2-onenand",
? ? ? ?.id ? ? ? ? ? ? = -1,
? ? ? ?.dev = {
- ? ? ? ? ? ? ? .platform_data = &igep2_onenand_data,
+ ? ? ? ? ? ? ? .platform_data = &igep_onenand_data, ? ? ? ?},
?};

arch/arm/mach-omap2/board-igep0020.c +1 -1
-static void __init igep2_flash_init(void)
+static void __init igep_flash_init(void)

?{
? ? ? ?u8 cs = 0;
? ? ? ?u8 onenandcs = GPMC_CS_NUM + 1;

arch/arm/mach-omap2/board-igep0020.c +0 -0
@@ -166,7 +166,7 @@ static void __init igep2_flash_init(void)

? ? ? ? ? ? ? ?/* Check if NAND/oneNAND is configured */ ? ? ? ? ? ? ? ?if ((ret & 0xC00) == 0x800)
? ? ? ? ? ? ? ? ? ? ? ?/* NAND found */
- ? ? ? ? ? ? ? ? ? ? ? pr_err("IGEP2: Unsupported NAND found\n");
+ ? ? ? ? ? ? ? ? ? ? ? pr_err("IGEP: Unsupported NAND found\n"); ? ? ? ? ? ? ? ?else {
? ? ? ? ? ? ? ? ? ? ? ?ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7); ? ? ? ? ? ? ? ? ? ? ? ?if ((ret & 0x3F) == (ONENAND_MAP >> 24))

arch/arm/mach-omap2/board-igep0020.c +4 -4
@@ -176,18 +176,18 @@ static void __init igep2_flash_init(void)
 ? ? ? ?}
 
 ? ? ? ?if (onenandcs > GPMC_CS_NUM) {
- ? ? ? ? ? ? ? pr_err("IGEP2: Unable to find configuration in GPMC\n");
+ ? ? ? ? ? ? ? pr_err("IGEP: Unable to find configuration in GPMC\n");
 ? ? ? ? ? ? ? ?return;
 ? ? ? ?}
 
- ? ? ? igep2_onenand_data.cs = onenandcs;
+ ? ? ? igep_onenand_data.cs = onenandcs;
 
- ? ? ? if (platform_device_register(&igep2_onenand_device) < 0)
- ? ? ? ? ? ? ? pr_err("IGEP2: Unable to register OneNAND device\n");
+ ? ? ? if (platform_device_register(&igep_onenand_device) < 0)
+ ? ? ? ? ? ? ? pr_err("IGEP: Unable to register OneNAND device\n");
 ?}
 

?#else

arch/arm/mach-omap2/board-igep0020.c +1 -1
-static void __init igep2_flash_init(void) {}
+static void __init igep_flash_init(void) {}

?#endif

?#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)

arch/arm/mach-omap2/board-igep0020.c +0 -0
@@ -211,11 +211,11 @@ static inline void __init igep2_init_smsc911x(void)
 ?static inline void __init igep2_init_smsc911x(void) { }

?#endif

arch/arm/mach-omap2/board-igep0020.c +1 -1
-static struct regulator_consumer_supply igep2_vmmc1_supply =
+static struct regulator_consumer_supply igep_vmmc1_supply =

? ? ? ?REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");

?/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */

arch/arm/mach-omap2/board-igep0020.c +1 -1
-static struct regulator_init_data igep2_vmmc1 = {
+static struct regulator_init_data igep_vmmc1 = {

? ? ? ?.constraints = {
? ? ? ? ? ? ? ?.min_uV ? ? ? ? ? ? ? ? = 1850000,
? ? ? ? ? ? ? ?.max_uV ? ? ? ? ? ? ? ? = 3150000,

arch/arm/mach-omap2/board-igep0020.c +11 -11
@@ -226,13 +226,13 @@ static struct regulator_init_data igep2_vmmc1 = {
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| REGULATOR_CHANGE_STATUS,
 ? ? ? ?},
 ? ? ? ?.num_consumer_supplies ?= 1,
- ? ? ? .consumer_supplies ? ? ?= &igep2_vmmc1_supply,
+ ? ? ? .consumer_supplies ? ? ?= &igep_vmmc1_supply,
 ?};
 
-static struct regulator_consumer_supply igep2_vio_supply =
+static struct regulator_consumer_supply igep_vio_supply =
 ? ? ? ?REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1");
 
-static struct regulator_init_data igep2_vio = {
+static struct regulator_init_data igep_vio = {
 ? ? ? ?.constraints = {
 ? ? ? ? ? ? ? ?.min_uV ? ? ? ? ? ? ? ? = 1800000,
 ? ? ? ? ? ? ? ?.max_uV ? ? ? ? ? ? ? ? = 1800000,
@@ -244,34 +244,34 @@ static struct regulator_init_data igep2_vio = {
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| REGULATOR_CHANGE_STATUS,
 ? ? ? ?},
 ? ? ? ?.num_consumer_supplies ?= 1,
- ? ? ? .consumer_supplies ? ? ?= &igep2_vio_supply,
+ ? ? ? .consumer_supplies ? ? ?= &igep_vio_supply,
 ?};
 
-static struct regulator_consumer_supply igep2_vmmc2_supply =
+static struct regulator_consumer_supply igep_vmmc2_supply =
 ? ? ? ?REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
 
-static struct regulator_init_data igep2_vmmc2 = {
+static struct regulator_init_data igep_vmmc2 = {
 ? ? ? ?.constraints ? ? ? ? ? ?= {
 ? ? ? ? ? ? ? ?.valid_modes_mask ? ? ? = REGULATOR_MODE_NORMAL,
 ? ? ? ? ? ? ? ?.always_on ? ? ? ? ? ? ?= 1,
 ? ? ? ?},
 ? ? ? ?.num_consumer_supplies ?= 1,
- ? ? ? .consumer_supplies ? ? ?= &igep2_vmmc2_supply,
+ ? ? ? .consumer_supplies ? ? ?= &igep_vmmc2_supply,
 ?};
 
-static struct fixed_voltage_config igep2_vwlan = {
+static struct fixed_voltage_config igep_vwlan = {
 ? ? ? ?.supply_name ? ? ? ? ? ?= "vwlan",
 ? ? ? ?.microvolts ? ? ? ? ? ? = 3300000,
 ? ? ? ?.gpio ? ? ? ? ? ? ? ? ? = -EINVAL,
 ? ? ? ?.enabled_at_boot ? ? ? ?= 1,
- ? ? ? .init_data ? ? ? ? ? ? ?= &igep2_vmmc2,
+ ? ? ? .init_data ? ? ? ? ? ? ?= &igep_vmmc2,
 ?};
 
-static struct platform_device igep2_vwlan_device = {
+static struct platform_device igep_vwlan_device = {
 ? ? ? ?.name ? ? ? ? ? = "reg-fixed-voltage",
 ? ? ? ?.id ? ? ? ? ? ? = 0,
 ? ? ? ?.dev = {
- ? ? ? ? ? ? ? .platform_data ?= &igep2_vwlan,
+ ? ? ? ? ? ? ? .platform_data ?= &igep_vwlan,
 ? ? ? ?},
 ?};
 
@@ -296,7 +296,7 @@ static struct omap2_hsmmc_info mmc[] = {
 ?#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)

?#include <linux/leds.h>

arch/arm/mach-omap2/board-igep0020.c +1 -1
-static struct gpio_led igep2_gpio_leds[] = {
+static struct gpio_led igep_gpio_leds[] = {

? ? ? ?[0] = {
? ? ? ? ? ? ? ?.name ? ? ? ? ? ? ? ? ? = "gpio-led:red:d0", ? ? ? ? ? ? ? ?.gpio ? ? ? ? ? ? ? ? ? = IGEP2_GPIO_LED0_RED,

arch/arm/mach-omap2/board-igep0020.c +7 -7
@@ -320,34 +320,34 @@ static struct gpio_led igep2_gpio_leds[] = {
 ? ? ? ?},
 ?};
 
-static struct gpio_led_platform_data igep2_led_pdata = {
- ? ? ? .leds ? ? ? ? ? = igep2_gpio_leds,
- ? ? ? .num_leds ? ? ? = ARRAY_SIZE(igep2_gpio_leds),
+static struct gpio_led_platform_data igep_led_pdata = {
+ ? ? ? .leds ? ? ? ? ? = igep_gpio_leds,
+ ? ? ? .num_leds ? ? ? = ARRAY_SIZE(igep_gpio_leds),
 ?};
 
-static struct platform_device igep2_led_device = {
+static struct platform_device igep_led_device = {
 ? ? ? ? .name ? = "leds-gpio",
 ? ? ? ? .id ? ? = -1,
 ? ? ? ? .dev ? ?= {
- ? ? ? ? ? ? ? ?.platform_data ?= ?&igep2_led_pdata,
+ ? ? ? ? ? ? ? ?.platform_data ?= ?&igep_led_pdata,
 ? ? ? ?},
 ?};
 
-static void __init igep2_leds_init(void)
+static void __init igep_leds_init(void)
 ?{
- ? ? ? platform_device_register(&igep2_led_device);
+ ? ? ? platform_device_register(&igep_led_device);
 ?}
 

?#else

arch/arm/mach-omap2/board-igep0020.c +1 -1
-static struct gpio igep2_gpio_leds[] __initdata = {
+static struct gpio igep_gpio_leds[] __initdata = {

? ? ? ?{ IGEP2_GPIO_LED0_RED, ? GPIOF_OUT_INIT_LOW, "gpio-led:red:d0" ? }, ? ? ? ?{ IGEP2_GPIO_LED0_GREEN, GPIOF_OUT_INIT_LOW, "gpio-led:green:d0" }, ? ? ? ?{ IGEP2_GPIO_LED1_RED, ? GPIOF_OUT_INIT_LOW, "gpio-led:red:d1" ? }, ?};

arch/arm/mach-omap2/board-igep0020.c +1 -1
-static inline void igep2_leds_init(void)
+static inline void igep_leds_init(void)

?{
- ? ? ? if (gpio_request_array(igep2_gpio_leds, ARRAY_SIZE(igep2_gpio_leds))) {
+ ? ? ? if (gpio_request_array(igep_gpio_leds, ARRAY_SIZE(igep_gpio_leds))) { ? ? ? ? ? ? ? ?pr_warning("IGEP v2: Could not obtain leds gpios\n"); ? ? ? ? ? ? ? ?return;
? ? ? ?}

arch/arm/mach-omap2/board-igep0020.c +1 -1
@@ -363,7 +363,7 @@ static struct gpio igep2_twl_gpios[] = {
 ? ? ? ?{ -EINVAL, GPIOF_OUT_INIT_LOW, ?"GPIO_USBH_CPEN" },
 ?};
 
-static int igep2_twl_gpio_setup(struct device *dev,
+static int igep_twl_gpio_setup(struct device *dev,
 ? ? ? ? ? ? ? ?unsigned gpio, unsigned ngpio)
 ?{
 ? ? ? ?int ret;
@@ -392,23 +392,23 @@ static int igep2_twl_gpio_setup(struct device *dev,
 ? ? ? ?if (ret == 0)
 ? ? ? ? ? ? ? ?gpio_export(gpio + TWL4030_GPIO_MAX + 1, 0);

? ? ? ?else
- ? ? ? ? ? ? ? pr_warning("IGEP v2: Could not obtain gpio GPIO_LED1_GREEN\n");
+ ? ? ? ? ? ? ? pr_warning("IGEP: Could not obtain gpio GPIO_LED1_GREEN\n"); ?#else
- ? ? ? igep2_gpio_leds[3].gpio = gpio + TWL4030_GPIO_MAX + 1;
+ ? ? ? igep_gpio_leds[3].gpio = gpio + TWL4030_GPIO_MAX + 1; ?#endif

? ? ? ?return 0;
?};

arch/arm/mach-omap2/board-igep0020.c +1 -1
-static struct twl4030_gpio_platform_data igep2_twl4030_gpio_pdata = {
+static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = {

? ? ? ?.gpio_base ? ? ?= OMAP_MAX_GPIO_LINES,
? ? ? ?.irq_base ? ? ? = TWL4030_GPIO_IRQ_BASE,
? ? ? ?.irq_end ? ? ? ?= TWL4030_GPIO_IRQ_END,
? ? ? ?.use_leds ? ? ? = true,
- ? ? ? .setup ? ? ? ? ?= igep2_twl_gpio_setup,
+ ? ? ? .setup ? ? ? ? ?= igep_twl_gpio_setup,
?};

arch/arm/mach-omap2/board-igep0020.c +1 -1
-static struct twl4030_usb_data igep2_usb_data = {
+static struct twl4030_usb_data igep_usb_data = {

? ? ? ?.usb_mode ? ? ? = T2_USB_MODE_ULPI,
?};

arch/arm/mach-omap2/board-igep0020.c +4 -4
@@ -476,11 +476,11 @@ static void __init igep2_display_init(void)
 ? ? ? ? ? ? ? ?pr_err("IGEP v2: Could not obtain gpio GPIO_DVI_PUP\n");
 ?}
 
-static struct platform_device *igep2_devices[] __initdata = {
- ? ? ? &igep2_vwlan_device,
+static struct platform_device *igep_devices[] __initdata = {
+ ? ? ? &igep_vwlan_device,
 ?};
 
-static void __init igep2_init_early(void)
+static void __init igep_init_early(void)
 ?{
 ? ? ? ?omap2_init_common_infrastructure();
 ? ? ? ?omap2_init_common_devices(m65kxxxxam_sdrc_params,
@@ -525,18 +525,18 @@ static struct twl4030_keypad_data igep2_keypad_pdata = {
 ? ? ? ?.rep ? ? ? ? ? ?= 1,
 ?};
 
-static struct twl4030_platform_data igep2_twldata = {
+static struct twl4030_platform_data igep_twldata = {
 ? ? ? ?.irq_base ? ? ? = TWL4030_IRQ_BASE,
 ? ? ? ?.irq_end ? ? ? ?= TWL4030_IRQ_END,
 

? ? ? ?/* platform_data for children goes here */
- ? ? ? .usb ? ? ? ? ? ?= &igep2_usb_data,
+ ? ? ? .usb ? ? ? ? ? ?= &igep_usb_data,
? ? ? ?.codec ? ? ? ? ?= &igep2_codec_data,
- ? ? ? .gpio ? ? ? ? ? = &igep2_twl4030_gpio_pdata,
+ ? ? ? .gpio ? ? ? ? ? = &igep_twl4030_gpio_pdata, ? ? ? ?.keypad ? ? ? ? = &igep2_keypad_pdata,
- ? ? ? .vmmc1 ? ? ? ? ?= &igep2_vmmc1,
+ ? ? ? .vmmc1 ? ? ? ? ?= &igep_vmmc1,
? ? ? ?.vpll2 ? ? ? ? ?= &igep2_vpll2,
- ? ? ? .vio ? ? ? ? ? ?= &igep2_vio,
+ ? ? ? .vio ? ? ? ? ? ?= &igep_vio,
?};

?static struct i2c_board_info __initdata igep2_i2c3_boardinfo[] = {

arch/arm/mach-omap2/board-igep0020.c +2 -2
@@ -545,11 +545,11 @@ static struct i2c_board_info __initdata igep2_i2c3_boardinfo[] = {
 ? ? ? ?},
 ?};
 
-static void __init igep2_i2c_init(void)
+static void __init igep_i2c_init(void)
 ?{
 ? ? ? ?int ret;
 
- ? ? ? omap3_pmic_init("twl4030", &igep2_twldata);
+ ? ? ? omap3_pmic_init("twl4030", &igep_twldata);
 

? ? ? ?/*
? ? ? ? * Bus 3 is attached to the DVI port where devices like the pico DLP

arch/arm/mach-omap2/board-igep0020.c +1 -1
@@ -561,7 +561,7 @@ static void __init igep2_i2c_init(void)
 ? ? ? ? ? ? ? ?pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret);
 ?}
 
-static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
+static const struct usbhs_omap_board_data igep2_usbhs_bdata __initconst = {
 ? ? ? ?.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
 ? ? ? ?.port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
 ? ? ? ?.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
@@ -579,64 +579,64 @@ static struct omap_board_mux board_mux[] __initdata = {

?#endif

?#if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE)

arch/arm/mach-omap2/board-igep0020.c +1 -1
-static struct gpio igep2_wlan_bt_gpios[] __initdata = {
+static struct gpio igep_wlan_bt_gpios[] __initdata = {

? ? ? ?{ -EINVAL, GPIOF_OUT_INIT_HIGH, "GPIO_WIFI_NPD" ? ?}, ? ? ? ?{ -EINVAL, GPIOF_OUT_INIT_HIGH, "GPIO_WIFI_NRESET" }, ? ? ? ?{ -EINVAL, GPIOF_OUT_INIT_HIGH, "GPIO_BT_NRESET" ? }, ?};

arch/arm/mach-omap2/board-igep0020.c +1 -1
-static void __init igep2_wlan_bt_init(void)
+static void __init igep_wlan_bt_init(void)

?{
? ? ? ?int err;

? ? ? ?/* GPIO's for WLAN-BT combo depends on hardware revision */ ? ? ? ?if (hwrev == IGEP2_BOARD_HWREV_B) {
- ? ? ? ? ? ? ? igep2_wlan_bt_gpios[0].gpio = IGEP2_RB_GPIO_WIFI_NPD;
- ? ? ? ? ? ? ? igep2_wlan_bt_gpios[1].gpio = IGEP2_RB_GPIO_WIFI_NRESET;
- ? ? ? ? ? ? ? igep2_wlan_bt_gpios[2].gpio = IGEP2_RB_GPIO_BT_NRESET;
+ ? ? ? ? ? ? ? igep_wlan_bt_gpios[0].gpio = IGEP2_RB_GPIO_WIFI_NPD;
+ ? ? ? ? ? ? ? igep_wlan_bt_gpios[1].gpio = IGEP2_RB_GPIO_WIFI_NRESET;
+ ? ? ? ? ? ? ? igep_wlan_bt_gpios[2].gpio = IGEP2_RB_GPIO_BT_NRESET; ? ? ? ?} else if (hwrev == IGEP2_BOARD_HWREV_C) {
- ? ? ? ? ? ? ? igep2_wlan_bt_gpios[0].gpio = IGEP2_RC_GPIO_WIFI_NPD;
- ? ? ? ? ? ? ? igep2_wlan_bt_gpios[1].gpio = IGEP2_RC_GPIO_WIFI_NRESET;
- ? ? ? ? ? ? ? igep2_wlan_bt_gpios[2].gpio = IGEP2_RC_GPIO_BT_NRESET;
+ ? ? ? ? ? ? ? igep_wlan_bt_gpios[0].gpio = IGEP2_RC_GPIO_WIFI_NPD;
+ ? ? ? ? ? ? ? igep_wlan_bt_gpios[1].gpio = IGEP2_RC_GPIO_WIFI_NRESET;
+ ? ? ? ? ? ? ? igep_wlan_bt_gpios[2].gpio = IGEP2_RC_GPIO_BT_NRESET; ? ? ? ?} else
? ? ? ? ? ? ? ?return;

- ? ? ? err = gpio_request_array(igep2_wlan_bt_gpios,
- ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?ARRAY_SIZE(igep2_wlan_bt_gpios));
+ ? ? ? err = gpio_request_array(igep_wlan_bt_gpios,
+ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?ARRAY_SIZE(igep_wlan_bt_gpios)); ? ? ? ?if (err) {
? ? ? ? ? ? ? ?pr_warning("IGEP2: Could not obtain WIFI/BT gpios\n"); ? ? ? ? ? ? ? ?return;
? ? ? ?}

- ? ? ? gpio_export(igep2_wlan_bt_gpios[0].gpio, 0);
- ? ? ? gpio_export(igep2_wlan_bt_gpios[1].gpio, 0);
- ? ? ? gpio_export(igep2_wlan_bt_gpios[2].gpio, 0);
+ ? ? ? gpio_export(igep_wlan_bt_gpios[0].gpio, 0);
+ ? ? ? gpio_export(igep_wlan_bt_gpios[1].gpio, 0);
+ ? ? ? gpio_export(igep_wlan_bt_gpios[2].gpio, 0);

- ? ? ? gpio_set_value(igep2_wlan_bt_gpios[1].gpio, 0);
+ ? ? ? gpio_set_value(igep_wlan_bt_gpios[1].gpio, 0); ? ? ? ?udelay(10);
- ? ? ? gpio_set_value(igep2_wlan_bt_gpios[1].gpio, 1);
+ ? ? ? gpio_set_value(igep_wlan_bt_gpios[1].gpio, 1);

?}
?#else

arch/arm/mach-omap2/board-igep0020.c +1 -1
-static inline void __init igep2_wlan_bt_init(void) { }
+static inline void __init igep_wlan_bt_init(void) { }

?#endif

arch/arm/mach-omap2/board-igep0020.c +1 -1
-static void __init igep2_init(void)
+static void __init igep_init(void)

?{
? ? ? ?omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);

? ? ? ?/* Get IGEP2 hardware revision */
? ? ? ?igep2_get_revision();
? ? ? ?/* Register I2C busses and drivers */
- ? ? ? igep2_i2c_init();
- ? ? ? platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices));
+ ? ? ? igep_i2c_init();
+ ? ? ? platform_add_devices(igep_devices, ARRAY_SIZE(igep_devices)); ? ? ? ?omap_display_init(&igep2_dss_data);
? ? ? ?omap_serial_init();
? ? ? ?usb_musb_init(NULL);
- ? ? ? usbhs_init(&usbhs_bdata);
+ ? ? ? usbhs_init(&igep2_usbhs_bdata);

- ? ? ? igep2_flash_init();
- ? ? ? igep2_leds_init();
+ ? ? ? igep_flash_init();
+ ? ? ? igep_leds_init();
? ? ? ?igep2_display_init();
? ? ? ?igep2_init_smsc911x();

arch/arm/mach-omap2/board-igep0020.c +0 -0
@@ -644,7 +644,7 @@ static void __init igep2_init(void)

? ? ? ? * WLAN-BT combo module from MuRata which has a Marvell WLAN ? ? ? ? * (88W8686) + CSR Bluetooth chipset. Uses SDIO interface. ? ? ? ? */
- ? ? ? igep2_wlan_bt_init();
+ ? ? ? igep_wlan_bt_init();

?}

arch/arm/mach-omap2/board-igep0020.c +2 -2
@@ -652,8 +652,8 @@ MACHINE_START(IGEP0020, "IGEP v2 board")
 ? ? ? ?.boot_params ? ?= 0x80000100,
 ? ? ? ?.reserve ? ? ? ?= omap_reserve,
 ? ? ? ?.map_io ? ? ? ? = omap3_map_io,
- ? ? ? .init_early ? ? = igep2_init_early,
+ ? ? ? .init_early ? ? = igep_init_early,
 ? ? ? ?.init_irq ? ? ? = omap_init_irq,
- ? ? ? .init_machine ? = igep2_init,
+ ? ? ? .init_machine ? = igep_init,
 ? ? ? ?.timer ? ? ? ? ?= &omap_timer,
Quoted 5 lines

?MACHINE_END
--
1.7.3.1

maintainer
#3 lore raw

PATCH RESEND 1/4 omap: igep0020: name refactoring for future merge with IGEP3

Quoted 5 lines · Enric Balletb? i Serra

Hi Mike,

The only comment I wanted to do is maybe I prefer rename the board-igep0020 to board-igep00x0 to be more generic. Apart from this these patch series looks good for me and has my ack. Thanks.

I suggest we do the rename separately later on. Otherwise it easily gets classified as "crazy churn" type of patch, so best to stick to just code coalescing and fixes for this merge window.

Tony

#4 lore raw

PATCH RESEND 1/4 omap: igep0020: name refactoring for future merge with IGEP3

Hi,

2011/5/17 Tony Lindgren <[email protected]>:

Quoted 10 lines · Enric Balletb? i Serra
Quoted 5 lines

Hi Mike,

The only comment I wanted to do is maybe I prefer rename the board-igep0020 to board-igep00x0 to be more generic. Apart from this these patch series looks good for me and has my ack. Thanks.

I suggest we do the rename separately later on. Otherwise it easily gets classified as "crazy churn" type of patch, so best to stick to just code coalescing and fixes for this merge window.

Ok, so Mike you've my ack, thanks

Cheers,
Enric

maintainer
#5 lore raw

PATCH RESEND 1/4 omap: igep0020: name refactoring for future merge with IGEP3

Quoted 10 lines · Enric Balletb? i Serra

Hi,

2011/5/17 Tony Lindgren <[email protected]>:

Quoted 7 lines · Enric Balletb? i Serra
Quoted 5 lines

Hi Mike,

The only comment I wanted to do is maybe I prefer rename the board-igep0020 to board-igep00x0 to be more generic. Apart from this these patch series looks good for me and has my ack. Thanks.

Quoted 5 lines
Quoted 3 lines

I suggest we do the rename separately later on. Otherwise it easily gets classified as "crazy churn" type of patch, so best to stick to just code coalescing and fixes for this merge window.

Ok, so Mike you've my ack, thanks

Thanks, applying these to devel-cleanup for the upcoming merge window.

Tony

#6 lore raw

PATCH RESEND 1/4 omap: igep0020: name refactoring for future merge with IGEP3

Quoted 10 lines · Tony Lindgren
Quoted 9 lines · Enric Balletb? i Serra

Hi,

2011/5/17 Tony Lindgren <[email protected]>:

Quoted 6 lines · Enric Balletb? i Serra
Quoted 5 lines

Hi Mike,

The only comment I wanted to do is maybe I prefer rename the board-igep0020 to board-igep00x0 to be more generic. Apart from this these patch series looks good for me and has my ack. Thanks.

Quoted 6 lines
Quoted 4 lines
Quoted 3 lines

I suggest we do the rename separately later on. Otherwise it easily gets classified as "crazy churn" type of patch, so best to stick to just code coalescing and fixes for this merge window.

Ok, so Mike you've my ack, thanks

Thanks, applying these to devel-cleanup for the upcoming merge window.

You mean for-next? Or you've just forgot to update the devel-cleanup?

Signature · 2 lines
Regards,
Igor.
#7 lore raw

PATCH RESEND 2/4 omap: igep0020: minor refactoring

In reply to Mike Rapoport

to allow easy addition of IGEP3

---
 arch/arm/mach-omap2/board-igep0020.c |   57 ++++++++++++++++++----------------
 1 files changed, 30 insertions(+), 27 deletions(-)
arch/arm/mach-omap2/board-igep0020.c +30 -27
index ad20f7b..ea7cbc6 100644
@@ -299,17 +299,14 @@ static struct omap2_hsmmc_info mmc[] = {
 static struct gpio_led igep_gpio_leds[] = {
 	[0] = {
 		.name			= "gpio-led:red:d0",
-		.gpio			= IGEP2_GPIO_LED0_RED,
 		.default_trigger	= "default-off"
 	},
 	[1] = {
 		.name			= "gpio-led:green:d0",
-		.gpio			= IGEP2_GPIO_LED0_GREEN,
 		.default_trigger	= "default-off",
 	},
 	[2] = {
 		.name			= "gpio-led:red:d1",
-		.gpio			= IGEP2_GPIO_LED1_RED,
 		.default_trigger	= "default-off",
 	},
 	[3] = {
@@ -335,6 +332,10 @@ static struct platform_device igep_led_device = {
 
 static void __init igep_leds_init(void)
 {
+	igep_gpio_leds[0].gpio = IGEP2_GPIO_LED0_RED;
+	igep_gpio_leds[1].gpio = IGEP2_GPIO_LED0_GREEN;
+	igep_gpio_leds[2].gpio = IGEP2_GPIO_LED1_RED;
+
 	platform_device_register(&igep_led_device);
 }
 
@@ -347,14 +348,15 @@ static struct gpio igep_gpio_leds[] __initdata = {
 
 static inline void igep_leds_init(void)
 {
+	int i;
+
 	if (gpio_request_array(igep_gpio_leds, ARRAY_SIZE(igep_gpio_leds))) {
 		pr_warning("IGEP v2: Could not obtain leds gpios\n");
 		return;
 	}
 
-	gpio_export(IGEP2_GPIO_LED0_RED, 0);
-	gpio_export(IGEP2_GPIO_LED0_GREEN, 0);
-	gpio_export(IGEP2_GPIO_LED1_RED, 0);
+	for (i = 0; i < ARRAY_SIZE(igep_gpio_leds); i++)
+		gpio_export(igep_gpio_leds[i].gpio, 0);
 }
 #endif
 
@@ -372,6 +374,18 @@ static int igep_twl_gpio_setup(struct device *dev,
 	mmc[0].gpio_cd = gpio + 0;
 	omap2_hsmmc_init(mmc);
 
+	/* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
+#if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE)
+	ret = gpio_request_one(gpio + TWL4030_GPIO_MAX + 1, GPIOF_OUT_INIT_HIGH,
+			       "gpio-led:green:d1");
+	if (ret == 0)
+		gpio_export(gpio + TWL4030_GPIO_MAX + 1, 0);
+	else
+		pr_warning("IGEP: Could not obtain gpio GPIO_LED1_GREEN\n");
+#else
+	igep_gpio_leds[3].gpio = gpio + TWL4030_GPIO_MAX + 1;
+#endif
+
 	/*
 	 * REVISIT: need ehci-omap hooks for external VBUS
 	 * power switch and overcurrent detect
@@ -385,18 +399,6 @@ static int igep_twl_gpio_setup(struct device *dev,
 	if (ret < 0)
 		pr_err("IGEP2: Could not obtain gpio for USBH_CPEN");
 
-	/* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
-#if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE)
-	ret = gpio_request_one(gpio + TWL4030_GPIO_MAX + 1, GPIOF_OUT_INIT_HIGH,
-			       "gpio-led:green:d1");
-	if (ret == 0)
-		gpio_export(gpio + TWL4030_GPIO_MAX + 1, 0);
-	else
-		pr_warning("IGEP: Could not obtain gpio GPIO_LED1_GREEN\n");
-#else
-	igep_gpio_leds[3].gpio = gpio + TWL4030_GPIO_MAX + 1;
-#endif
-
 	return 0;
 };
 
@@ -531,11 +533,8 @@ static struct twl4030_platform_data igep_twldata = {
 
 	/* platform_data for children goes here */
 	.usb		= &igep_usb_data,
-	.codec		= &igep2_codec_data,
 	.gpio		= &igep_twl4030_gpio_pdata,
-	.keypad		= &igep2_keypad_pdata,
 	.vmmc1          = &igep_vmmc1,
-	.vpll2		= &igep2_vpll2,
 	.vio		= &igep_vio,
 };
 
@@ -549,8 +548,6 @@ static void __init igep_i2c_init(void)
 {
 	int ret;
 
-	omap3_pmic_init("twl4030", &igep_twldata);
-
 	/*
 	 * Bus 3 is attached to the DVI port where devices like the pico DLP
 	 * projector don't work reliably with 400kHz
@@ -559,6 +556,12 @@ static void __init igep_i2c_init(void)
 		ARRAY_SIZE(igep2_i2c3_boardinfo));
 	if (ret)
 		pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret);
+
+	igep_twldata.codec	= &igep2_codec_data;
+	igep_twldata.keypad	= &igep2_keypad_pdata;
+	igep_twldata.vpll2	= &igep2_vpll2;
+
+	omap3_pmic_init("twl4030", &igep_twldata);
 }
 
 static const struct usbhs_omap_board_data igep2_usbhs_bdata __initconst = {
@@ -630,15 +633,11 @@ static void __init igep_init(void)
 	/* Register I2C busses and drivers */
 	igep_i2c_init();
 	platform_add_devices(igep_devices, ARRAY_SIZE(igep_devices));
-	omap_display_init(&igep2_dss_data);
 	omap_serial_init();
 	usb_musb_init(NULL);
-	usbhs_init(&igep2_usbhs_bdata);
 
 	igep_flash_init();
 	igep_leds_init();
-	igep2_display_init();
-	igep2_init_smsc911x();
 
 	/*
 	 * WLAN-BT combo module from MuRata which has a Marvell WLAN
@@ -646,6 +645,10 @@ static void __init igep_init(void)
 	 */
 	igep_wlan_bt_init();
 
+	omap_display_init(&igep2_dss_data);
+	igep2_display_init();
+	igep2_init_smsc911x();
+	usbhs_init(&igep2_usbhs_bdata);
 }
 
 MACHINE_START(IGEP0020, "IGEP v2 board")
Signature · 1 line
1.7.3.1
#8 lore raw

PATCH RESEND 2/4 omap: igep0020: minor refactoring

Quoted 19 lines · Mike Rapoport
arch/arm/mach-omap2/board-igep0020.c +0 -3
@@ -299,17 +299,14 @@ static struct omap2_hsmmc_info mmc[] = {
 static struct gpio_led igep_gpio_leds[] = {
        [0] = {
                .name                   = "gpio-led:red:d0",
-               .gpio                   = IGEP2_GPIO_LED0_RED,
                .default_trigger        = "default-off"
        },
        [1] = {
                .name                   = "gpio-led:green:d0",
-               .gpio                   = IGEP2_GPIO_LED0_GREEN,
                .default_trigger        = "default-off",
        },
        [2] = {
                .name                   = "gpio-led:red:d1",
-               .gpio                   = IGEP2_GPIO_LED1_RED,
                .default_trigger        = "default-off",
        },
        [3] = {

arch/arm/mach-omap2/board-igep0020.c static struct platform_device igep_led_device = { · line 340

Quoted 9 lines
arch/arm/mach-omap2/board-igep0020.c +4 -0
@@ -335,6 +332,10 @@ static struct platform_device igep_led_device = {
 
 static void __init igep_leds_init(void)
 {
+       igep_gpio_leds[0].gpio = IGEP2_GPIO_LED0_RED;
+       igep_gpio_leds[1].gpio = IGEP2_GPIO_LED0_GREEN;
+       igep_gpio_leds[2].gpio = IGEP2_GPIO_LED1_RED;
+
        platform_device_register(&igep_led_device);
 }

Hi Mike,

Overall, the series looks great, but I'm somewhat worried by the fact that you have to replace data structures with code in order to get there. Are there any other options to do this?

Arnd

#9 lore raw

PATCH RESEND 2/4 omap: igep0020: minor refactoring

Quoted 32 lines · Arnd Bergmann
Quoted 19 lines · Mike Rapoport
arch/arm/mach-omap2/board-igep0020.c +0 -3
@@ -299,17 +299,14 @@ static struct omap2_hsmmc_info mmc[] = {
 static struct gpio_led igep_gpio_leds[] = {
        [0] = {
                .name                   = "gpio-led:red:d0",
-               .gpio                   = IGEP2_GPIO_LED0_RED,
                .default_trigger        = "default-off"
        },
        [1] = {
                .name                   = "gpio-led:green:d0",
-               .gpio                   = IGEP2_GPIO_LED0_GREEN,
                .default_trigger        = "default-off",
        },
        [2] = {
                .name                   = "gpio-led:red:d1",
-               .gpio                   = IGEP2_GPIO_LED1_RED,
                .default_trigger        = "default-off",
        },
        [3] = {

arch/arm/mach-omap2/board-igep0020.c static struct platform_device igep_led_device = { · line 340

Quoted 9 lines
arch/arm/mach-omap2/board-igep0020.c +4 -0
@@ -335,6 +332,10 @@ static struct platform_device igep_led_device = {
 
 static void __init igep_leds_init(void)
 {
+       igep_gpio_leds[0].gpio = IGEP2_GPIO_LED0_RED;
+       igep_gpio_leds[1].gpio = IGEP2_GPIO_LED0_GREEN;
+       igep_gpio_leds[2].gpio = IGEP2_GPIO_LED1_RED;
+
        platform_device_register(&igep_led_device);
 }

Hi Mike,

Quoted 3 lines

Overall, the series looks great, but I'm somewhat worried by the fact that you have to replace data structures with code in order to get there. Are there any other options to do this?

We can keep all the data structures that differ between IGEP2 and IGEP3. However, this significantly reduces the benifit of the series. There's already code in the IGEP2 that differentiates between HW revisions, so anyway the board support will require some work for devicetree transition. Eventually, when devicetree will be usable on OMAPs, most of the code currently found in arch/arm/mach-omap2/board* will require some work and I hardly believe that the transition can be automated...

Quoted 2 lines

Arnd

--
Sincerely yours,
Mike.

#10 lore raw

PATCH RESEND 2/4 omap: igep0020: minor refactoring

Quoted 8 lines · mike at compulab.co.il

We can keep all the data structures that differ between IGEP2 and IGEP3. However, this significantly reduces the benifit of the series. There's already code in the IGEP2 that differentiates between HW revisions, so anyway the board support will require some work for devicetree transition. Eventually, when devicetree will be usable on OMAPs, most of the code currently found in arch/arm/mach-omap2/board* will require some work and I hardly believe that the transition can be automated...

True. Let's just use the version you posted then.

Arnd

#11 lore raw

PATCH RESEND 2/4 omap: igep0020: minor refactoring

2011/5/15 Arnd Bergmann <[email protected]>:

Quoted 10 lines · mike at compulab.co.il
Quoted 8 lines

We can keep all the data structures that differ between IGEP2 and IGEP3. However, this significantly reduces the benifit of the series. There's already code in the IGEP2 that differentiates between HW revisions, so anyway the board support will require some work for devicetree transition. Eventually, when devicetree will be usable on OMAPs, most of the code currently found in arch/arm/mach-omap2/board* will require some work and I hardly believe that the transition can be automated...

Quoted 4 lines

True. Let's just use the version you posted then.

? ? ? ?Arnd

#12 lore raw

PATCH RESEND 3/4 omap: igep0020: add support for IGEP3

In reply to Mike Rapoport

Add IGEP3 machine support to board-igep0020

---
 arch/arm/mach-omap2/board-igep0020.c |  103 ++++++++++++++++++++++++++--------
 1 files changed, 80 insertions(+), 23 deletions(-)
arch/arm/mach-omap2/board-igep0020.c +80 -23
index ea7cbc6..0d6d583 100644
@@ -55,6 +55,11 @@
 #define IGEP2_RC_GPIO_WIFI_NRESET  139
 #define IGEP2_RC_GPIO_BT_NRESET    137
 
+#define IGEP3_GPIO_LED0_GREEN	54
+#define IGEP3_GPIO_LED0_RED	53
+#define IGEP3_GPIO_LED1_RED	16
+#define IGEP3_GPIO_USBH_NRESET  183
+
 /*
  * IGEP2 Hardware Revision Table
  *
@@ -69,6 +74,7 @@
 
 #define IGEP2_BOARD_HWREV_B	0
 #define IGEP2_BOARD_HWREV_C	1
+#define IGEP3_BOARD_HWREV	2
 
 static u8 hwrev;
 
@@ -76,6 +82,11 @@ static void __init igep2_get_revision(void)
 {
 	u8 ret;
 
+	if (machine_is_igep0030()) {
+		hwrev = IGEP3_BOARD_HWREV;
+		return;
+	}
+
 	omap_mux_init_gpio(IGEP2_GPIO_LED1_RED, OMAP_PIN_INPUT);
 
 	if (gpio_request_one(IGEP2_GPIO_LED1_RED, GPIOF_IN, "GPIO_HW0_REV")) {
@@ -332,24 +343,40 @@ static struct platform_device igep_led_device = {
 
 static void __init igep_leds_init(void)
 {
-	igep_gpio_leds[0].gpio = IGEP2_GPIO_LED0_RED;
-	igep_gpio_leds[1].gpio = IGEP2_GPIO_LED0_GREEN;
-	igep_gpio_leds[2].gpio = IGEP2_GPIO_LED1_RED;
+	if (machine_is_igep0020()) {
+		igep_gpio_leds[0].gpio = IGEP2_GPIO_LED0_RED;
+		igep_gpio_leds[1].gpio = IGEP2_GPIO_LED0_GREEN;
+		igep_gpio_leds[2].gpio = IGEP2_GPIO_LED1_RED;
+	} else {
+		igep_gpio_leds[0].gpio = IGEP3_GPIO_LED0_RED;
+		igep_gpio_leds[1].gpio = IGEP3_GPIO_LED0_GREEN;
+		igep_gpio_leds[2].gpio = IGEP3_GPIO_LED1_RED;
+	}
 
 	platform_device_register(&igep_led_device);
 }
 
 #else
 static struct gpio igep_gpio_leds[] __initdata = {
-	{ IGEP2_GPIO_LED0_RED,	 GPIOF_OUT_INIT_LOW, "gpio-led:red:d0"   },
-	{ IGEP2_GPIO_LED0_GREEN, GPIOF_OUT_INIT_LOW, "gpio-led:green:d0" },
-	{ IGEP2_GPIO_LED1_RED,	 GPIOF_OUT_INIT_LOW, "gpio-led:red:d1"   },
+	{ -EINVAL,	GPIOF_OUT_INIT_LOW, "gpio-led:red:d0"   },
+	{ -EINVAL,	GPIOF_OUT_INIT_LOW, "gpio-led:green:d0" },
+	{ -EINVAL,	GPIOF_OUT_INIT_LOW, "gpio-led:red:d1"   },
 };
 
 static inline void igep_leds_init(void)
 {
 	int i;
 
+	if (machine_is_igep0020()) {
+		igep_gpio_leds[0].gpio = IGEP2_GPIO_LED0_RED;
+		igep_gpio_leds[1].gpio = IGEP2_GPIO_LED0_GREEN;
+		igep_gpio_leds[2].gpio = IGEP2_GPIO_LED1_RED;
+	} else {
+		igep_gpio_leds[0].gpio = IGEP3_GPIO_LED0_RED;
+		igep_gpio_leds[1].gpio = IGEP3_GPIO_LED0_GREEN;
+		igep_gpio_leds[2].gpio = IGEP3_GPIO_LED1_RED;
+	}
+
 	if (gpio_request_array(igep_gpio_leds, ARRAY_SIZE(igep_gpio_leds))) {
 		pr_warning("IGEP v2: Could not obtain leds gpios\n");
 		return;
@@ -386,6 +413,9 @@ static int igep_twl_gpio_setup(struct device *dev,
 	igep_gpio_leds[3].gpio = gpio + TWL4030_GPIO_MAX + 1;
 #endif
 
+	if (machine_is_igep0030())
+		return 0;
+
 	/*
 	 * REVISIT: need ehci-omap hooks for external VBUS
 	 * power switch and overcurrent detect
@@ -548,18 +578,20 @@ static void __init igep_i2c_init(void)
 {
 	int ret;
 
-	/*
-	 * Bus 3 is attached to the DVI port where devices like the pico DLP
-	 * projector don't work reliably with 400kHz
-	 */
-	ret = omap_register_i2c_bus(3, 100, igep2_i2c3_boardinfo,
-		ARRAY_SIZE(igep2_i2c3_boardinfo));
-	if (ret)
-		pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret);
-
-	igep_twldata.codec	= &igep2_codec_data;
-	igep_twldata.keypad	= &igep2_keypad_pdata;
-	igep_twldata.vpll2	= &igep2_vpll2;
+	if (machine_is_igep0020()) {
+		/*
+		 * Bus 3 is attached to the DVI port where devices like the
+		 * pico DLP projector don't work reliably with 400kHz
+		 */
+		ret = omap_register_i2c_bus(3, 100, igep2_i2c3_boardinfo,
+					    ARRAY_SIZE(igep2_i2c3_boardinfo));
+		if (ret)
+			pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret);
+
+		igep_twldata.codec	= &igep2_codec_data;
+		igep_twldata.keypad	= &igep2_keypad_pdata;
+		igep_twldata.vpll2	= &igep2_vpll2;
+	}
 
 	omap3_pmic_init("twl4030", &igep_twldata);
 }
@@ -575,6 +607,17 @@ static const struct usbhs_omap_board_data igep2_usbhs_bdata __initconst = {
 	.reset_gpio_port[2] = -EINVAL,
 };
 
+static const struct usbhs_omap_board_data igep3_usbhs_bdata __initconst = {
+	.port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
+	.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
+	.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
+
+	.phy_reset = true,
+	.reset_gpio_port[0] = -EINVAL,
+	.reset_gpio_port[1] = IGEP3_GPIO_USBH_NRESET,
+	.reset_gpio_port[2] = -EINVAL,
+};
+
 #ifdef CONFIG_OMAP_MUX
 static struct omap_board_mux board_mux[] __initdata = {
 	{ .reg_offset = OMAP_MUX_TERMINATOR },
@@ -597,7 +640,7 @@ static void __init igep_wlan_bt_init(void)
 		igep_wlan_bt_gpios[0].gpio = IGEP2_RB_GPIO_WIFI_NPD;
 		igep_wlan_bt_gpios[1].gpio = IGEP2_RB_GPIO_WIFI_NRESET;
 		igep_wlan_bt_gpios[2].gpio = IGEP2_RB_GPIO_BT_NRESET;
-	} else if (hwrev == IGEP2_BOARD_HWREV_C) {
+	} else if (hwrev == IGEP2_BOARD_HWREV_C || machine_is_igep0030()) {
 		igep_wlan_bt_gpios[0].gpio = IGEP2_RC_GPIO_WIFI_NPD;
 		igep_wlan_bt_gpios[1].gpio = IGEP2_RC_GPIO_WIFI_NRESET;
 		igep_wlan_bt_gpios[2].gpio = IGEP2_RC_GPIO_BT_NRESET;
@@ -645,10 +688,14 @@ static void __init igep_init(void)
 	 */
 	igep_wlan_bt_init();
 
-	omap_display_init(&igep2_dss_data);
-	igep2_display_init();
-	igep2_init_smsc911x();
-	usbhs_init(&igep2_usbhs_bdata);
+	if (machine_is_igep0020()) {
+		omap_display_init(&igep2_dss_data);
+		igep2_display_init();
+		igep2_init_smsc911x();
+		usbhs_init(&igep2_usbhs_bdata);
+	} else {
+		usbhs_init(&igep3_usbhs_bdata);
+	}
 }
 
 MACHINE_START(IGEP0020, "IGEP v2 board")
@@ -660,3 +707,13 @@ MACHINE_START(IGEP0020, "IGEP v2 board")
 	.init_machine	= igep_init,
 	.timer		= &omap_timer,
 MACHINE_END
+
+MACHINE_START(IGEP0030, "IGEP OMAP3 module")
+	.boot_params	= 0x80000100,
+	.reserve	= omap_reserve,
+	.map_io		= omap3_map_io,
+	.init_early	= igep_init_early,
+	.init_irq	= omap_init_irq,
+	.init_machine	= igep_init,
+	.timer		= &omap_timer,
+MACHINE_END
Signature · 1 line
1.7.3.1
Acked-by Enric Balletbo i Serra on v1 3/4
#13 lore raw

Re: [RESEND PATCH 3/4] omap: igep0020: add support for IGEP3

2011/5/12 Mike Rapoport <[email protected]>:

Quoted 194 lines

Add IGEP3 machine support to board-igep0020

---
 arch/arm/mach-omap2/board-igep0020.c |  103 ++++++++++++++++++++++++++--------

 1 files changed, 80 insertions(+), 23 deletions(-)
arch/arm/mach-omap2/board-igep0020.c +70 -23
index ea7cbc6..0d6d583 100644
@@ -55,6 +55,11 @@
  #define IGEP2_RC_GPIO_WIFI_NRESET  139
  #define IGEP2_RC_GPIO_BT_NRESET    137
 
+#define IGEP3_GPIO_LED0_GREEN  54
+#define IGEP3_GPIO_LED0_RED    53
+#define IGEP3_GPIO_LED1_RED    16
+#define IGEP3_GPIO_USBH_NRESET  183
+
  /*
  * IGEP2 Hardware Revision Table
  *
@@ -69,6 +74,7 @@
 
  #define IGEP2_BOARD_HWREV_B    0
  #define IGEP2_BOARD_HWREV_C    1
+#define IGEP3_BOARD_HWREV      2
 
  static u8 hwrev;
 
@@ -76,6 +82,11 @@ static void __init igep2_get_revision(void)
  {
        u8 ret;
 
+       if (machine_is_igep0030()) {
+               hwrev = IGEP3_BOARD_HWREV;
+               return;
+       }
+
        omap_mux_init_gpio(IGEP2_GPIO_LED1_RED, OMAP_PIN_INPUT);
 
        if (gpio_request_one(IGEP2_GPIO_LED1_RED, GPIOF_IN, "GPIO_HW0_REV")) {
@@ -332,24 +343,40 @@ static struct platform_device igep_led_device = {
 
  static void __init igep_leds_init(void)
  {
-       igep_gpio_leds[0].gpio = IGEP2_GPIO_LED0_RED;
-       igep_gpio_leds[1].gpio = IGEP2_GPIO_LED0_GREEN;
-       igep_gpio_leds[2].gpio = IGEP2_GPIO_LED1_RED;
+       if (machine_is_igep0020()) {
+               igep_gpio_leds[0].gpio = IGEP2_GPIO_LED0_RED;
+               igep_gpio_leds[1].gpio = IGEP2_GPIO_LED0_GREEN;
+               igep_gpio_leds[2].gpio = IGEP2_GPIO_LED1_RED;
+       } else {
+               igep_gpio_leds[0].gpio = IGEP3_GPIO_LED0_RED;
+               igep_gpio_leds[1].gpio = IGEP3_GPIO_LED0_GREEN;
+               igep_gpio_leds[2].gpio = IGEP3_GPIO_LED1_RED;
+       }
 
        platform_device_register(&igep_led_device);
  }
 
  #else
  static struct gpio igep_gpio_leds[] __initdata = {
-       { IGEP2_GPIO_LED0_RED,   GPIOF_OUT_INIT_LOW, "gpio-led:red:d0"   },
-       { IGEP2_GPIO_LED0_GREEN, GPIOF_OUT_INIT_LOW, "gpio-led:green:d0" },
-       { IGEP2_GPIO_LED1_RED,   GPIOF_OUT_INIT_LOW, "gpio-led:red:d1"   },
+       { -EINVAL,      GPIOF_OUT_INIT_LOW, "gpio-led:red:d0"   },
+       { -EINVAL,      GPIOF_OUT_INIT_LOW, "gpio-led:green:d0" },
+       { -EINVAL,      GPIOF_OUT_INIT_LOW, "gpio-led:red:d1"   },
  };
 
  static inline void igep_leds_init(void)
  {
        int i;
 
+       if (machine_is_igep0020()) {
+               igep_gpio_leds[0].gpio = IGEP2_GPIO_LED0_RED;
+               igep_gpio_leds[1].gpio = IGEP2_GPIO_LED0_GREEN;
+               igep_gpio_leds[2].gpio = IGEP2_GPIO_LED1_RED;
+       } else {
+               igep_gpio_leds[0].gpio = IGEP3_GPIO_LED0_RED;
+               igep_gpio_leds[1].gpio = IGEP3_GPIO_LED0_GREEN;
+               igep_gpio_leds[2].gpio = IGEP3_GPIO_LED1_RED;
+       }
+
        if (gpio_request_array(igep_gpio_leds, ARRAY_SIZE(igep_gpio_leds))) {
                pr_warning("IGEP v2: Could not obtain leds gpios\n");
                return;
@@ -386,6 +413,9 @@ static int igep_twl_gpio_setup(struct device *dev,
        igep_gpio_leds[3].gpio = gpio + TWL4030_GPIO_MAX + 1;
  #endif
 
+       if (machine_is_igep0030())
+               return 0;
+
        /*
         * REVISIT: need ehci-omap hooks for external VBUS
         * power switch and overcurrent detect
@@ -548,18 +578,20 @@ static void __init igep_i2c_init(void)
  {
        int ret;
 
-       /*
-        * Bus 3 is attached to the DVI port where devices like the pico DLP
-        * projector don't work reliably with 400kHz
-        */
-       ret = omap_register_i2c_bus(3, 100, igep2_i2c3_boardinfo,
-               ARRAY_SIZE(igep2_i2c3_boardinfo));
-       if (ret)
-               pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret);
-
-       igep_twldata.codec      = &igep2_codec_data;
-       igep_twldata.keypad     = &igep2_keypad_pdata;
-       igep_twldata.vpll2      = &igep2_vpll2;
+       if (machine_is_igep0020()) {
+               /*
+                * Bus 3 is attached to the DVI port where devices like the
+                * pico DLP projector don't work reliably with 400kHz
+                */
+               ret = omap_register_i2c_bus(3, 100, igep2_i2c3_boardinfo,
+                                           ARRAY_SIZE(igep2_i2c3_boardinfo));
+               if (ret)
+                       pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret);
+
+               igep_twldata.codec      = &igep2_codec_data;
+               igep_twldata.keypad     = &igep2_keypad_pdata;
+               igep_twldata.vpll2      = &igep2_vpll2;
+       }
 
        omap3_pmic_init("twl4030", &igep_twldata);
  }
@@ -575,6 +607,17 @@ static const struct usbhs_omap_board_data igep2_usbhs_bdata __initconst = {
        .reset_gpio_port[2] = -EINVAL,
  };
 
+static const struct usbhs_omap_board_data igep3_usbhs_bdata __initconst = {
+       .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
+       .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
+       .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
+
+       .phy_reset = true,
+       .reset_gpio_port[0] = -EINVAL,
+       .reset_gpio_port[1] = IGEP3_GPIO_USBH_NRESET,
+       .reset_gpio_port[2] = -EINVAL,
+};
+
  #ifdef CONFIG_OMAP_MUX
  static struct omap_board_mux board_mux[] __initdata = {
        { .reg_offset = OMAP_MUX_TERMINATOR },
@@ -597,7 +640,7 @@ static void __init igep_wlan_bt_init(void)
                igep_wlan_bt_gpios[0].gpio = IGEP2_RB_GPIO_WIFI_NPD;
                igep_wlan_bt_gpios[1].gpio = IGEP2_RB_GPIO_WIFI_NRESET;
                igep_wlan_bt_gpios[2].gpio = IGEP2_RB_GPIO_BT_NRESET;
-       } else if (hwrev == IGEP2_BOARD_HWREV_C) {
+       } else if (hwrev == IGEP2_BOARD_HWREV_C || machine_is_igep0030()) {
                igep_wlan_bt_gpios[0].gpio = IGEP2_RC_GPIO_WIFI_NPD;
                igep_wlan_bt_gpios[1].gpio = IGEP2_RC_GPIO_WIFI_NRESET;
                igep_wlan_bt_gpios[2].gpio = IGEP2_RC_GPIO_BT_NRESET;
@@ -645,10 +688,14 @@ static void __init igep_init(void)
         */
        igep_wlan_bt_init();
 
-       omap_display_init(&igep2_dss_data);
-       igep2_display_init();
-       igep2_init_smsc911x();
-       usbhs_init(&igep2_usbhs_bdata);
+       if (machine_is_igep0020()) {
+               omap_display_init(&igep2_dss_data);
+               igep2_display_init();
+               igep2_init_smsc911x();
+               usbhs_init(&igep2_usbhs_bdata);
+       } else {
+               usbhs_init(&igep3_usbhs_bdata);
+       }
  }
 
  MACHINE_START(IGEP0020, "IGEP v2 board")
@@ -660,3 +707,13 @@ MACHINE_START(IGEP0020, "IGEP v2 board")
        .init_machine   = igep_init,
        .timer          = &omap_timer,

 MACHINE_END

arch/arm/mach-omap2/board-igep0020.c +10 -1
+
+MACHINE_START(IGEP0030, "IGEP OMAP3 module")
+       .boot_params    = 0x80000100,
+       .reserve        = omap_reserve,
+       .map_io         = omap3_map_io,
+       .init_early     = igep_init_early,
+       .init_irq       = omap_init_irq,
+       .init_machine   = igep_init,
+       .timer          = &omap_timer,
+MACHINE_END
--
Quoted 3 lines

1.7.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#14 lore raw

PATCH RESEND 4/4 omap: drop board-igep0030.c

In reply to Mike Rapoport

since it is merged into board-igep0020.c

---
 arch/arm/mach-omap2/Kconfig          |    1 +
 arch/arm/mach-omap2/Makefile         |    2 -
 arch/arm/mach-omap2/board-igep0030.c |  438 ----------------------------------
 3 files changed, 1 insertions(+), 440 deletions(-)
 delete mode 100644 arch/arm/mach-omap2/board-igep0030.c
arch/arm/mach-omap2/Kconfig +1 -0
index b997a35..19d5891 100644
@@ -288,6 +288,7 @@ config MACH_IGEP0030
 	depends on ARCH_OMAP3
 	default y
 	select OMAP_PACKAGE_CBB
+	select MACH_IGEP0020
 
 config MACH_SBC3530
 	bool "OMAP3 SBC STALKER board"
arch/arm/mach-omap2/Makefile +0 -2
index a0c2cae..186f482 100644
@@ -229,8 +229,6 @@ obj-$(CONFIG_MACH_CM_T35)		+= board-cm-t35.o \
 obj-$(CONFIG_MACH_CM_T3517)		+= board-cm-t3517.o
 obj-$(CONFIG_MACH_IGEP0020)		+= board-igep0020.o \
 					   hsmmc.o
-obj-$(CONFIG_MACH_IGEP0030)		+= board-igep0030.o \
-					   hsmmc.o
 obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK)	+= board-omap3touchbook.o \
 					   hsmmc.o
 obj-$(CONFIG_MACH_OMAP_4430SDP)		+= board-4430sdp.o \
arch/arm/mach-omap2/board-igep0030.c deleted +0 -438

438 lines not on this page · raw message

Signature · 1 line
1.7.3.1
#15 lore raw

PATCH RESEND 4/4 omap: drop board-igep0030.c

2011/5/12 Mike Rapoport <[email protected]>:

Quoted 480 lines

since it is merged into board-igep0020.c

---

?arch/arm/mach-omap2/Kconfig ? ? ? ? ?| ? ?1 +
?arch/arm/mach-omap2/Makefile ? ? ? ? | ? ?2 -
?arch/arm/mach-omap2/board-igep0030.c | ?438 ----------------------------------

?3 files changed, 1 insertions(+), 440 deletions(-) ?delete mode 100644 arch/arm/mach-omap2/board-igep0030.c

arch/arm/mach-omap2/Kconfig +0 -0
index b997a35..19d5891 100644
@@ -288,6 +288,7 @@ config MACH_IGEP0030

? ? ? ?depends on ARCH_OMAP3
? ? ? ?default y
? ? ? ?select OMAP_PACKAGE_CBB
+ ? ? ? select MACH_IGEP0020

?config MACH_SBC3530
? ? ? ?bool "OMAP3 SBC STALKER board"

arch/arm/mach-omap2/Makefile +0 -0
index a0c2cae..186f482 100644
@@ -229,8 +229,6 @@ obj-$(CONFIG_MACH_CM_T35) ? ? ? ? ? += board-cm-t35.o \

?obj-$(CONFIG_MACH_CM_T3517) ? ? ? ? ? ?+= board-cm-t3517.o ?obj-$(CONFIG_MACH_IGEP0020) ? ? ? ? ? ?+= board-igep0020.o \
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? hsmmc.o -obj-$(CONFIG_MACH_IGEP0030) ? ? ? ? ? ?+= board-igep0030.o \
- ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?hsmmc.o ?obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) ? ? += board-omap3touchbook.o \
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? hsmmc.o ?obj-$(CONFIG_MACH_OMAP_4430SDP) ? ? ? ? ? ? ? ?+= board-4430sdp.o \

arch/arm/mach-omap2/board-igep0030.c deleted +0 -439
deleted file mode 100644
index 83f6be2..0000000
@@ -1,438 +0,0 @@
-/*
- * Copyright (C) 2010 - ISEE 2007 SL
- *
- * Modified from mach-omap2/board-generic.c
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/delay.h>
-#include <linux/err.h>
-#include <linux/clk.h>
-#include <linux/io.h>
-#include <linux/gpio.h>
-#include <linux/interrupt.h>
-
-#include <linux/regulator/machine.h>
-#include <linux/regulator/fixed.h>
-#include <linux/i2c/twl.h>
-#include <linux/mmc/host.h>
-
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-
-#include <plat/board.h>
-#include <plat/common.h>
-#include <plat/gpmc.h>
-#include <plat/usb.h>
-#include <plat/onenand.h>
-
-#include "mux.h"
-#include "hsmmc.h"
-#include "sdram-numonyx-m65kxxxxam.h"
-#include "common-board-devices.h"
-
-#define IGEP3_GPIO_LED0_GREEN ?54
-#define IGEP3_GPIO_LED0_RED ? ?53
-#define IGEP3_GPIO_LED1_RED ? ?16
-
-#define IGEP3_GPIO_WIFI_NPD ? ?138
-#define IGEP3_GPIO_WIFI_NRESET 139
-#define IGEP3_GPIO_BT_NRESET ? 137
-
-#define IGEP3_GPIO_USBH_NRESET ?183
-
-
-#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
- ? ? ? defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
-
-#define ONENAND_MAP ? ? ? ? ? ? 0x20000000
-
-/*
- * x2 Flash built-in COMBO POP MEMORY
- * Since the device is equipped with two DataRAMs, and two-plane NAND
- * Flash memory array, these two component enables simultaneous program
- * of 4KiB. Plane1 has only even blocks such as block0, block2, block4
- * while Plane2 has only odd blocks such as block1, block3, block5.
- * So MTD regards it as 4KiB page size and 256KiB block size 64*(2*2048)
- */
-
-static struct mtd_partition igep3_onenand_partitions[] = {
- ? ? ? {
- ? ? ? ? ? ? ? .name ? ? ? ? ? = "X-Loader",
- ? ? ? ? ? ? ? .offset ? ? ? ? = 0,
- ? ? ? ? ? ? ? .size ? ? ? ? ? = 2 * (64*(2*2048))
- ? ? ? },
- ? ? ? {
- ? ? ? ? ? ? ? .name ? ? ? ? ? = "U-Boot",
- ? ? ? ? ? ? ? .offset ? ? ? ? = MTDPART_OFS_APPEND,
- ? ? ? ? ? ? ? .size ? ? ? ? ? = 6 * (64*(2*2048)),
- ? ? ? },
- ? ? ? {
- ? ? ? ? ? ? ? .name ? ? ? ? ? = "Environment",
- ? ? ? ? ? ? ? .offset ? ? ? ? = MTDPART_OFS_APPEND,
- ? ? ? ? ? ? ? .size ? ? ? ? ? = 2 * (64*(2*2048)),
- ? ? ? },
- ? ? ? {
- ? ? ? ? ? ? ? .name ? ? ? ? ? = "Kernel",
- ? ? ? ? ? ? ? .offset ? ? ? ? = MTDPART_OFS_APPEND,
- ? ? ? ? ? ? ? .size ? ? ? ? ? = 12 * (64*(2*2048)),
- ? ? ? },
- ? ? ? {
- ? ? ? ? ? ? ? .name ? ? ? ? ? = "File System",
- ? ? ? ? ? ? ? .offset ? ? ? ? = MTDPART_OFS_APPEND,
- ? ? ? ? ? ? ? .size ? ? ? ? ? = MTDPART_SIZ_FULL,
- ? ? ? },
-};
-
-static struct omap_onenand_platform_data igep3_onenand_pdata = {
- ? ? ? .parts = igep3_onenand_partitions,
- ? ? ? .nr_parts = ARRAY_SIZE(igep3_onenand_partitions),
- ? ? ? .onenand_setup = NULL,
- ? ? ? .dma_channel ? ?= -1, ? /* disable DMA in OMAP OneNAND driver */
-};
-
-static struct platform_device igep3_onenand_device = {
- ? ? ? .name ? ? ? ? ? = "omap2-onenand",
- ? ? ? .id ? ? ? ? ? ? = -1,
- ? ? ? .dev = {
- ? ? ? ? ? ? ? .platform_data = &igep3_onenand_pdata,
- ? ? ? },
-};
-
-static void __init igep3_flash_init(void)
-{
- ? ? ? u8 cs = 0;
- ? ? ? u8 onenandcs = GPMC_CS_NUM + 1;
-
- ? ? ? for (cs = 0; cs < GPMC_CS_NUM; cs++) {
- ? ? ? ? ? ? ? u32 ret;
- ? ? ? ? ? ? ? ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1);
-
- ? ? ? ? ? ? ? /* Check if NAND/oneNAND is configured */
- ? ? ? ? ? ? ? if ((ret & 0xC00) == 0x800)
- ? ? ? ? ? ? ? ? ? ? ? /* NAND found */
- ? ? ? ? ? ? ? ? ? ? ? pr_err("IGEP3: Unsupported NAND found\n");
- ? ? ? ? ? ? ? else {
- ? ? ? ? ? ? ? ? ? ? ? ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7);
-
- ? ? ? ? ? ? ? ? ? ? ? if ((ret & 0x3F) == (ONENAND_MAP >> 24))
- ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? /* OneNAND found */
- ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? onenandcs = cs;
- ? ? ? ? ? ? ? }
- ? ? ? }
-
- ? ? ? if (onenandcs > GPMC_CS_NUM) {
- ? ? ? ? ? ? ? pr_err("IGEP3: Unable to find configuration in GPMC\n");
- ? ? ? ? ? ? ? return;
- ? ? ? }
-
- ? ? ? igep3_onenand_pdata.cs = onenandcs;
-
- ? ? ? if (platform_device_register(&igep3_onenand_device) < 0)
- ? ? ? ? ? ? ? pr_err("IGEP3: Unable to register OneNAND device\n");
-}
-
-#else
-static void __init igep3_flash_init(void) {}
-#endif
-
-static struct regulator_consumer_supply igep3_vmmc1_supply =
- ? ? ? REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
-
-/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
-static struct regulator_init_data igep3_vmmc1 = {
- ? ? ? .constraints = {
- ? ? ? ? ? ? ? .min_uV ? ? ? ? ? ? ? ? = 1850000,
- ? ? ? ? ? ? ? .max_uV ? ? ? ? ? ? ? ? = 3150000,
- ? ? ? ? ? ? ? .valid_modes_mask ? ? ? = REGULATOR_MODE_NORMAL
- ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | REGULATOR_MODE_STANDBY,
- ? ? ? ? ? ? ? .valid_ops_mask ? ? ? ? = REGULATOR_CHANGE_VOLTAGE
- ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | REGULATOR_CHANGE_MODE
- ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | REGULATOR_CHANGE_STATUS,
- ? ? ? },
- ? ? ? .num_consumer_supplies ?= 1,
- ? ? ? .consumer_supplies ? ? ?= &igep3_vmmc1_supply,
-};
-
-static struct regulator_consumer_supply igep3_vio_supply =
- ? ? ? REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1");
-
-static struct regulator_init_data igep3_vio = {
- ? ? ? .constraints = {
- ? ? ? ? ? ? ? .min_uV ? ? ? ? ? ? ? ? = 1800000,
- ? ? ? ? ? ? ? .max_uV ? ? ? ? ? ? ? ? = 1800000,
- ? ? ? ? ? ? ? .apply_uV ? ? ? ? ? ? ? = 1,
- ? ? ? ? ? ? ? .valid_modes_mask ? ? ? = REGULATOR_MODE_NORMAL
- ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | REGULATOR_MODE_STANDBY,
- ? ? ? ? ? ? ? .valid_ops_mask ? ? ? ? = REGULATOR_CHANGE_VOLTAGE
- ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | REGULATOR_CHANGE_MODE
- ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | REGULATOR_CHANGE_STATUS,
- ? ? ? },
- ? ? ? .num_consumer_supplies ?= 1,
- ? ? ? .consumer_supplies ? ? ?= &igep3_vio_supply,
-};
-
-static struct regulator_consumer_supply igep3_vmmc2_supply =
- ? ? ? REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
-
-static struct regulator_init_data igep3_vmmc2 = {
- ? ? ? .constraints ? ?= {
- ? ? ? ? ? ? ? .valid_modes_mask ? ? ? = REGULATOR_MODE_NORMAL,
- ? ? ? ? ? ? ? .always_on ? ? ? ? ? ? ?= 1,
- ? ? ? },
- ? ? ? .num_consumer_supplies ?= 1,
- ? ? ? .consumer_supplies ? ? ?= &igep3_vmmc2_supply,
-};
-
-static struct fixed_voltage_config igep3_vwlan = {
- ? ? ? .supply_name ? ? ? ? ? ?= "vwlan",
- ? ? ? .microvolts ? ? ? ? ? ? = 3300000,
- ? ? ? .gpio ? ? ? ? ? ? ? ? ? = -EINVAL,
- ? ? ? .enabled_at_boot ? ? ? ?= 1,
- ? ? ? .init_data ? ? ? ? ? ? ?= &igep3_vmmc2,
-};
-
-static struct platform_device igep3_vwlan_device = {
- ? ? ? .name ? = "reg-fixed-voltage",
- ? ? ? .id ? ? = 0,
- ? ? ? .dev ? ?= {
- ? ? ? ? ? ? ? .platform_data = &igep3_vwlan,
- ? ? ? },
-};
-
-static struct omap2_hsmmc_info mmc[] = {
- ? ? ? [0] = {
- ? ? ? ? ? ? ? .mmc ? ? ? ? ? ?= 1,
- ? ? ? ? ? ? ? .caps ? ? ? ? ? = MMC_CAP_4_BIT_DATA,
- ? ? ? ? ? ? ? .gpio_cd ? ? ? ?= -EINVAL,
- ? ? ? ? ? ? ? .gpio_wp ? ? ? ?= -EINVAL,
- ? ? ? },
-#if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE)
- ? ? ? [1] = {
- ? ? ? ? ? ? ? .mmc ? ? ? ? ? ?= 2,
- ? ? ? ? ? ? ? .caps ? ? ? ? ? = MMC_CAP_4_BIT_DATA,
- ? ? ? ? ? ? ? .gpio_cd ? ? ? ?= -EINVAL,
- ? ? ? ? ? ? ? .gpio_wp ? ? ? ?= -EINVAL,
- ? ? ? },
-#endif
- ? ? ? {} ? ? ?/* Terminator */
-};
-
-#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
-#include <linux/leds.h>
-
-static struct gpio_led igep3_gpio_leds[] = {
- ? ? ? [0] = {
- ? ? ? ? ? ? ? .name ? ? ? ? ? ? ? ? ? = "gpio-led:red:d0",
- ? ? ? ? ? ? ? .gpio ? ? ? ? ? ? ? ? ? = IGEP3_GPIO_LED0_RED,
- ? ? ? ? ? ? ? .default_trigger ? ? ? ?= "default-off"
- ? ? ? },
- ? ? ? [1] = {
- ? ? ? ? ? ? ? .name ? ? ? ? ? ? ? ? ? = "gpio-led:green:d0",
- ? ? ? ? ? ? ? .gpio ? ? ? ? ? ? ? ? ? = IGEP3_GPIO_LED0_GREEN,
- ? ? ? ? ? ? ? .default_trigger ? ? ? ?= "default-off",
- ? ? ? },
- ? ? ? [2] = {
- ? ? ? ? ? ? ? .name ? ? ? ? ? ? ? ? ? = "gpio-led:red:d1",
- ? ? ? ? ? ? ? .gpio ? ? ? ? ? ? ? ? ? = IGEP3_GPIO_LED1_RED,
- ? ? ? ? ? ? ? .default_trigger ? ? ? ?= "default-off",
- ? ? ? },
- ? ? ? [3] = {
- ? ? ? ? ? ? ? .name ? ? ? ? ? ? ? ? ? = "gpio-led:green:d1",
- ? ? ? ? ? ? ? .default_trigger ? ? ? ?= "heartbeat",
- ? ? ? ? ? ? ? .gpio ? ? ? ? ? ? ? ? ? = -EINVAL, /* gets replaced */
- ? ? ? },
-};
-
-static struct gpio_led_platform_data igep3_led_pdata = {
- ? ? ? .leds ? ? ? ? ? = igep3_gpio_leds,
- ? ? ? .num_leds ? ? ? = ARRAY_SIZE(igep3_gpio_leds),
-};
-
-static struct platform_device igep3_led_device = {
- ? ? ? ?.name ? = "leds-gpio",
- ? ? ? ?.id ? ? = -1,
- ? ? ? ?.dev ? ?= {
- ? ? ? ? ? ? ? ?.platform_data = &igep3_led_pdata,
- ? ? ? },
-};
-
-static void __init igep3_leds_init(void)
-{
- ? ? ? platform_device_register(&igep3_led_device);
-}
-
-#else
-static struct gpio igep3_gpio_leds[] __initdata = {
- ? ? ? { IGEP3_GPIO_LED0_RED, ? GPIOF_OUT_INIT_HIGH, "gpio-led:red:d0" ? },
- ? ? ? { IGEP3_GPIO_LED0_GREEN, GPIOF_OUT_INIT_HIGH, "gpio-led:green:d0" },
- ? ? ? { IGEP3_GPIO_LED1_RED, ? GPIOF_OUT_INIT_HIGH, "gpio-led:red:d1" ? },
-};
-
-static inline void igep3_leds_init(void)
-{
- ? ? ? if (gpio_request_array(igep3_gpio_leds, ARRAY_SIZE(igep3_gpio_leds))) {
- ? ? ? ? ? ? ? pr_warning("IGEP3: Could not obtain leds gpios\n");
- ? ? ? ? ? ? ? return;
- ? ? ? }
- ? ? ? gpio_export(IGEP3_GPIO_LED0_RED, 0);
- ? ? ? gpio_export(IGEP3_GPIO_LED0_GREEN, 0);
- ? ? ? gpio_export(IGEP3_GPIO_LED1_RED, 0);
-}
-#endif
-
-static int igep3_twl4030_gpio_setup(struct device *dev,
- ? ? ? ? ? ? ? unsigned gpio, unsigned ngpio)
-{
-#if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE)
- ? ? ? int ret;
-
- ? ? ? /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
- ? ? ? ret = gpio_request_one(gpio + TWL4030_GPIO_MAX + 1, GPIOF_OUT_INIT_HIGH,
- ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?"gpio-led:green:d1");
- ? ? ? if (ret)
- ? ? ? ? ? ? ? pr_warning("IGEP3: Could not obtain gpio GPIO_LED1_GREEN\n");
- ? ? ? else
- ? ? ? ? ? ? ? gpio_export(gpio + TWL4030_GPIO_MAX + 1, 0);
-#else
- ? ? ? igep3_gpio_leds[3].gpio = gpio + TWL4030_GPIO_MAX + 1;
-#endif
- ? ? ? /* gpio + 0 is "mmc0_cd" (input/IRQ) */
- ? ? ? mmc[0].gpio_cd = gpio + 0;
- ? ? ? omap2_hsmmc_init(mmc);
-
- ? ? ? return 0;
-};
-
-static struct twl4030_gpio_platform_data igep3_twl4030_gpio_pdata = {
- ? ? ? .gpio_base ? ? ?= OMAP_MAX_GPIO_LINES,
- ? ? ? .irq_base ? ? ? = TWL4030_GPIO_IRQ_BASE,
- ? ? ? .irq_end ? ? ? ?= TWL4030_GPIO_IRQ_END,
- ? ? ? .use_leds ? ? ? = true,
- ? ? ? .setup ? ? ? ? ?= igep3_twl4030_gpio_setup,
-};
-
-static struct twl4030_usb_data igep3_twl4030_usb_data = {
- ? ? ? .usb_mode ? ? ? = T2_USB_MODE_ULPI,
-};
-
-static struct platform_device *igep3_devices[] __initdata = {
- ? ? ? &igep3_vwlan_device,
-};
-
-static void __init igep3_init_early(void)
-{
- ? ? ? omap2_init_common_infrastructure();
- ? ? ? omap2_init_common_devices(m65kxxxxam_sdrc_params,
- ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? m65kxxxxam_sdrc_params);
-}
-
-static struct twl4030_platform_data igep3_twl4030_pdata = {
- ? ? ? .irq_base ? ? ? = TWL4030_IRQ_BASE,
- ? ? ? .irq_end ? ? ? ?= TWL4030_IRQ_END,
-
- ? ? ? /* platform_data for children goes here */
- ? ? ? .usb ? ? ? ? ? ?= &igep3_twl4030_usb_data,
- ? ? ? .gpio ? ? ? ? ? = &igep3_twl4030_gpio_pdata,
- ? ? ? .vmmc1 ? ? ? ? ?= &igep3_vmmc1,
- ? ? ? .vio ? ? ? ? ? ?= &igep3_vio,
-};
-
-static int __init igep3_i2c_init(void)
-{
- ? ? ? omap3_pmic_init("twl4030", &igep3_twl4030_pdata);
-
- ? ? ? return 0;
-}
-
-#if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE)
-static struct gpio igep3_wlan_bt_gpios[] __initdata = {
- ? ? ? { IGEP3_GPIO_WIFI_NPD, ? ?GPIOF_OUT_INIT_HIGH, "GPIO_WIFI_NPD" ? ?},
- ? ? ? { IGEP3_GPIO_WIFI_NRESET, GPIOF_OUT_INIT_HIGH, "GPIO_WIFI_NRESET" },
- ? ? ? { IGEP3_GPIO_BT_NRESET, ? GPIOF_OUT_INIT_HIGH, "GPIO_BT_NRESET" ? },
-};
-
-static void __init igep3_wifi_bt_init(void)
-{
- ? ? ? int err;
-
- ? ? ? /* Configure MUX values for W-LAN + Bluetooth GPIO's */
- ? ? ? omap_mux_init_gpio(IGEP3_GPIO_WIFI_NPD, OMAP_PIN_OUTPUT);
- ? ? ? omap_mux_init_gpio(IGEP3_GPIO_WIFI_NRESET, OMAP_PIN_OUTPUT);
- ? ? ? omap_mux_init_gpio(IGEP3_GPIO_BT_NRESET, OMAP_PIN_OUTPUT);
-
- ? ? ? /* Set GPIO's for ?W-LAN + Bluetooth combo module */
- ? ? ? err = gpio_request_array(igep3_wlan_bt_gpios,
- ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?ARRAY_SIZE(igep3_wlan_bt_gpios));
- ? ? ? if (err) {
- ? ? ? ? ? ? ? pr_warning("IGEP3: Could not obtain WIFI/BT gpios\n");
- ? ? ? ? ? ? ? return;
- ? ? ? }
-
- ? ? ? gpio_export(IGEP3_GPIO_WIFI_NPD, 0);
- ? ? ? gpio_export(IGEP3_GPIO_WIFI_NRESET, 0);
- ? ? ? gpio_export(IGEP3_GPIO_BT_NRESET, 0);
-
- ? ? ? gpio_set_value(IGEP3_GPIO_WIFI_NRESET, 0);
- ? ? ? udelay(10);
- ? ? ? gpio_set_value(IGEP3_GPIO_WIFI_NRESET, 1);
-}
-#else
-void __init igep3_wifi_bt_init(void) {}
-#endif
-
-static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
- ? ? ? .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
- ? ? ? .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
- ? ? ? .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
- ? ? ? .phy_reset = true,
- ? ? ? .reset_gpio_port[0] = -EINVAL,
- ? ? ? .reset_gpio_port[1] = IGEP3_GPIO_USBH_NRESET,
- ? ? ? .reset_gpio_port[2] = -EINVAL,
-};
-
-#ifdef CONFIG_OMAP_MUX
-static struct omap_board_mux board_mux[] __initdata = {
- ? ? ? OMAP3_MUX(I2C2_SDA, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
- ? ? ? { .reg_offset = OMAP_MUX_TERMINATOR },
-};
-#endif
-
-static void __init igep3_init(void)
-{
- ? ? ? omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
-
- ? ? ? /* Register I2C busses and drivers */
- ? ? ? igep3_i2c_init();
- ? ? ? platform_add_devices(igep3_devices, ARRAY_SIZE(igep3_devices));
- ? ? ? omap_serial_init();
- ? ? ? usb_musb_init(NULL);
- ? ? ? usbhs_init(&usbhs_bdata);
-
- ? ? ? igep3_flash_init();
- ? ? ? igep3_leds_init();
-
- ? ? ? /*
- ? ? ? ?* WLAN-BT combo module from MuRata which has a Marvell WLAN
- ? ? ? ?* (88W8686) + CSR Bluetooth chipset. Uses SDIO interface.
- ? ? ? ?*/
- ? ? ? igep3_wifi_bt_init();
-
-}
-
-MACHINE_START(IGEP0030, "IGEP OMAP3 module")
- ? ? ? .boot_params ? ?= 0x80000100,
- ? ? ? .reserve ? ? ? ?= omap_reserve,
- ? ? ? .map_io ? ? ? ? = omap3_map_io,
- ? ? ? .init_early ? ? = igep3_init_early,
- ? ? ? .init_irq ? ? ? = omap_init_irq,
- ? ? ? .init_machine ? = igep3_init,
- ? ? ? .timer ? ? ? ? ?= &omap_timer,
-MACHINE_END
--
Quoted 3 lines

1.7.3.1

#16 lore raw

cover omap: merge IGEP v2 and v3

In reply to Mike Rapoport

Hi Mike,

2011/5/12 Mike Rapoport <[email protected]>:

Quoted 8 lines

Hi Tony,

I'm resending this with the correct arm-linux mailing list cc'ed.. Just discard the first set, sorry for the noise...

This is yet another attempt to reduce code duplication in the board files :) Only build tested, since I don't have the hardware, so I belive an Ack from Enric is required.

Against which tree is based your work ?

Cheers,
Enric

Quoted 18 lines

Mike Rapoport (4):
?omap: igep0020: name refactoring for future merge with IGEP3 ?omap: igep0020: minor refactoring
?omap: igep0020: add support for IGEP3
?omap: drop board-igep0030.c

?arch/arm/mach-omap2/Kconfig ? ? ? ? ?| ? ?1 +
?arch/arm/mach-omap2/Makefile ? ? ? ? | ? ?2 -
?arch/arm/mach-omap2/board-igep0020.c | ?286 +++++++++++++---------
?arch/arm/mach-omap2/board-igep0030.c | ?438 ----------------------------------

?4 files changed, 174 insertions(+), 553 deletions(-) ?delete mode 100644 arch/arm/mach-omap2/board-igep0030.c

--
1.7.3.1

#17 lore raw

cover omap: merge IGEP v2 and v3

Hi Enric,

Quoted 5 lines · Enric Balletb?? i Serra

Hi Mike,

2011/5/12 Mike Rapoport <[email protected]>:

Quoted 2 lines

Hi Tony,

Quoted 8 lines
Quoted 6 lines

I'm resending this with the correct arm-linux mailing list cc'ed.. Just discard the first set, sorry for the noise...

This is yet another attempt to reduce code duplication in the board files :) Only build tested, since I don't have the hardware, so I belive an Ack from Enric is required.

Against which tree is based your work ?

It's based on devel-cleaup branch in Tony's linux-omap tree.

Quoted 25 lines

Cheers,
Enric

Quoted 14 lines

Mike Rapoport (4):
??omap: igep0020: name refactoring for future merge with IGEP3 ??omap: igep0020: minor refactoring
??omap: igep0020: add support for IGEP3
??omap: drop board-igep0030.c

??arch/arm/mach-omap2/Kconfig ?? ?? ?? ?? ??| ?? ??1 + ??arch/arm/mach-omap2/Makefile ?? ?? ?? ?? | ?? ??2 - ??arch/arm/mach-omap2/board-igep0020.c | ??286 +++++++++++++--------- ??arch/arm/mach-omap2/board-igep0030.c | ??438 ---------------------------------- ??4 files changed, 174 insertions(+), 553 deletions(-)
??delete mode 100644 arch/arm/mach-omap2/board-igep0030.c

Quoted 4 lines

--
1.7.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html