Skip to contentSkip to conversation

Allow the i.mx25 3DStack target to compile.

PATCH New Jean-Christophe DUBOIS 2 participants 3 messages May 4, 2010

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

PATCH 1/1 Allow the i.mx25 3DStack target to compile.

This is a resend because I wrongly submited this pach to linux-arm mailing list instead of linux-arm-kernel.

The FEC driver is not compiling for 3Dstack evaluation board in the actual state. Fix it.

---
 arch/arm/mach-mx25/mx25pdk.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
arch/arm/mach-mx25/mx25pdk.c +4 -5
index 6f06089..cbf45c0 100644
@@ -22,7 +22,6 @@
 #include <linux/clk.h>
 #include <linux/irq.h>
 #include <linux/gpio.h>
-#include <linux/fec.h>
 #include <linux/platform_device.h>
 
 #include <mach/hardware.h>
@@ -56,8 +55,9 @@ static struct pad_desc mx25pdk_pads[] = {
 	MX25_PAD_D12__GPIO_4_8, /* FEC_RESET_B, GPIO 104 */
 };
 
-static struct fec_platform_data mx25_fec_pdata = {
-        .phy    = PHY_INTERFACE_MODE_RMII,
+static struct platform_device *platform_devices[] __initdata = {
+	&mxc_usbh2,
+        &mx25_fec_device,
 };
 
 #define FEC_ENABLE_GPIO		35
@@ -83,10 +83,9 @@ static void __init mx25pdk_init(void)
 			ARRAY_SIZE(mx25pdk_pads));
 
 	mxc_register_device(&mxc_uart_device0, &uart_pdata);
-	mxc_register_device(&mxc_usbh2, NULL);
 
 	mx25pdk_fec_reset();
-	mxc_register_device(&mx25_fec_device, &mx25_fec_pdata);
+        platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
 }
 
 static void __init mx25pdk_timer_init(void)
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 Allow the i.mx25 3DStack target to compile.

Hi Jean-Christophe,

Quoted 5 lines · Jean-Christophe DUBOIS

This is a resend because I wrongly submited this pach to linux-arm mailing list instead of linux-arm-kernel.

The FEC driver is not compiling for 3Dstack evaluation board in the actual state. Fix it.

See http://patchwork.ozlabs.org/patch/41235/ for a better alternative. For some reason this patch hasn't found its way to the mainline kernel yet. Until it does the i.MX25 PDK platform code is broken.

Quoted 3 lines
---
 arch/arm/mach-mx25/mx25pdk.c |    9 ++++-----

This file has been renamed to mach-mx25pdk.c since 2.6.34-rc2, so your patch does not apply.

baruch

Quoted 40 lines
 1 files changed, 4 insertions(+), 5 deletions(-)
arch/arm/mach-mx25/mx25pdk.c +4 -5
index 6f06089..cbf45c0 100644
@@ -22,7 +22,6 @@
 #include <linux/clk.h>
 #include <linux/irq.h>
 #include <linux/gpio.h>
-#include <linux/fec.h>
 #include <linux/platform_device.h>
 
 #include <mach/hardware.h>
@@ -56,8 +55,9 @@ static struct pad_desc mx25pdk_pads[] = {
 	MX25_PAD_D12__GPIO_4_8, /* FEC_RESET_B, GPIO 104 */
 };
 
-static struct fec_platform_data mx25_fec_pdata = {
-        .phy    = PHY_INTERFACE_MODE_RMII,
+static struct platform_device *platform_devices[] __initdata = {
+	&mxc_usbh2,
+        &mx25_fec_device,
 };
 
 #define FEC_ENABLE_GPIO		35
@@ -83,10 +83,9 @@ static void __init mx25pdk_init(void)
 			ARRAY_SIZE(mx25pdk_pads));
 
 	mxc_register_device(&mxc_uart_device0, &uart_pdata);
-	mxc_register_device(&mxc_usbh2, NULL);
 
 	mx25pdk_fec_reset();
-	mxc_register_device(&mx25_fec_device, &mx25_fec_pdata);
+        platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
 }
 
 static void __init mx25pdk_timer_init(void)
Signature · 1 line
1.7.0.4
Signature · 3 lines
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#2 lore raw

PATCH 1/1 Allow the i.mx25 3DStack target to compile.

le mardi 4 mai 2010 Baruch Siach a ?crit

Quoted 6 lines

Hi Jean-Christophe,

Quoted 3 lines · Jean-Christophe DUBOIS

This is a resend because I wrongly submited this pach to linux-arm mailing list instead of linux-arm-kernel.

Quoted 6 lines
Quoted 2 lines

The FEC driver is not compiling for 3Dstack evaluation board in the actual state. Fix it.

See http://patchwork.ozlabs.org/patch/41235/ for a better alternative. For some reason this patch hasn't found its way to the mainline kernel yet. Until it does the i.MX25 PDK platform code is broken.

OK thanks.

Strange that this platform is still broken after almost 2 kernel releases.

Quoted 8 lines
Quoted 5 lines

---

 arch/arm/mach-mx25/mx25pdk.c |    9 ++++-----

This file has been renamed to mach-mx25pdk.c since 2.6.34-rc2, so your patch does not apply.

Sure, my patch was against the latest stable (aka 2.6.33.3). Sorry about that.

Quoted 54 lines

baruch

Quoted 51 lines
 1 files changed, 4 insertions(+), 5 deletions(-)
arch/arm/mach-mx25/mx25pdk.c +0 -1
index 6f06089..cbf45c0 100644
@@ -22,7 +22,6 @@
 
 #include <linux/clk.h>
 #include <linux/irq.h>
 #include <linux/gpio.h>
 
-#include <linux/fec.h>
 

#include <linux/platform_device.h>

#include <mach/hardware.h>

arch/arm/mach-mx25/mx25pdk.c +3 -2
@@ -56,8 +55,9 @@ static struct pad_desc mx25pdk_pads[] = {
 
 	MX25_PAD_D12__GPIO_4_8, /* FEC_RESET_B, GPIO 104 */
 
 };
 
-static struct fec_platform_data mx25_fec_pdata = {
-        .phy    = PHY_INTERFACE_MODE_RMII,
+static struct platform_device *platform_devices[] __initdata = {
+	&mxc_usbh2,
+        &mx25_fec_device,
 

};

#define FEC_ENABLE_GPIO 35

arch/arm/mach-mx25/mx25pdk.c +1 -2
@@ -83,10 +83,9 @@ static void __init mx25pdk_init(void)
 
 			ARRAY_SIZE(mx25pdk_pads));
 
 	mxc_register_device(&mxc_uart_device0, &uart_pdata);
 
-	mxc_register_device(&mxc_usbh2, NULL);
 
 	mx25pdk_fec_reset();
 
-	mxc_register_device(&mx25_fec_device, &mx25_fec_pdata);
+        platform_add_devices(platform_devices,

ARRAY_SIZE(platform_devices));

}

static void __init mx25pdk_timer_init(void)