Skip to contentSkip to conversation

stargate2 and imote2 board file merge

RFC PATCH New Jonathan Cameron 3 participants 6 messages Jun 6, 2010 – Jun 12, 2010

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

RFC PATCH 1/1 stargate2 and imote2 board file merge

---
These two boards are extremely similar in many ways and hence the board configs overlap a lot. This patch merges the two board files. Do people think this is worth doing? Traditionally we always built a kernel supporting both devices anyway but the ifdefs allow one to be picked if people really want to.

There are a couple of annoying really minor differences in wiring that result in most of the non shared code (leds on gpios on the imote2 and on the da9030 led drivers on the stargate2).

 arch/arm/mach-pxa/Makefile    |    2 +-
 arch/arm/mach-pxa/imote2.c    |  590 -----------------------------------
 arch/arm/mach-pxa/stargate2.c |  679 +++++++++++++++++++++++++++--------------
 3 files changed, 454 insertions(+), 817 deletions(-)
arch/arm/mach-pxa/Makefile +1 -1
index b8f1f4b..31d80ba 100644
@@ -51,7 +51,7 @@ obj-$(CONFIG_MACH_CAPC7117)     += capc7117.o mxm8x10.o
 obj-$(CONFIG_ARCH_GUMSTIX)	+= gumstix.o
 obj-$(CONFIG_GUMSTIX_AM200EPD)	+= am200epd.o
 obj-$(CONFIG_GUMSTIX_AM300EPD)	+= am300epd.o
-obj-$(CONFIG_MACH_INTELMOTE2)   += imote2.o
+obj-$(CONFIG_MACH_INTELMOTE2)	+= stargate2.o
 obj-$(CONFIG_MACH_STARGATE2)	+= stargate2.o
 obj-$(CONFIG_MACH_XCEP)         += xcep.o
 obj-$(CONFIG_MACH_TRIZEPS4)	+= trizeps4.o
arch/arm/mach-pxa/imote2.c deleted +0 -590

590 lines not on this page · raw message

arch/arm/mach-pxa/stargate2.c +453 -226

802 lines not on this page · raw message

Signature · 1 line
1.7.0.4
#1 lore raw

RFC PATCH 1/1 stargate2 and imote2 board file merge

Hello.

Quoted 7 lines · Jonathan Cameron

---
These two boards are extremely similar in many ways and hence the board configs overlap a lot. This patch merges the two board files. Do people think this is worth doing? Traditionally we always built a kernel supporting both devices anyway but the ifdefs allow one to be picked if people really want to.

I find it an interesting idea. We have done this on EZX with 6 devices. One thing that jumps into my face is that we should provide a way to let people know that the stargate2.c file does indeed also provide support for imote2. At least updated comments in KConfig and the header of the c file would be needed. That would allow people to discover it during configuration or greping.

I don't know much about the Crossbow product palette but maybe we should even rename it to crossbow.c

Quoted 4 lines
 arch/arm/mach-pxa/Makefile    |    2 +-
 arch/arm/mach-pxa/imote2.c    |  590 -----------------------------------
 arch/arm/mach-pxa/stargate2.c |  679 +++++++++++++++++++++++++++--------------
 3 files changed, 454 insertions(+), 817 deletions(-)

Given that we can eliminate nearly 400 lines of code and one board file I think it is worth it. I looked over the patch and it does look good so far. Will give it a runtime test the next days. If that truns out well I'm fine to ack it.

regards
Stefan Schmidt

#2 lore raw

RFC PATCH 1/1 stargate2 and imote2 board file merge

Quoted 11 lines · Stefan Schmidt

Hello.

Quoted 7 lines · Jonathan Cameron

---
These two boards are extremely similar in many ways and hence the board configs overlap a lot. This patch merges the two board files. Do people think this is worth doing? Traditionally we always built a kernel supporting both devices anyway but the ifdefs allow one to be picked if people really want to.

Quoted 5 lines

I find it an interesting idea. We have done this on EZX with 6 devices. One thing that jumps into my face is that we should provide a way to let people know that the stargate2.c file does indeed also provide support for imote2. At least updated comments in KConfig and the header of the c file would be needed. That would allow people to discover it during configuration or greping.

Not sure we care particularly in the kconfig as it doesn't make any difference to someone configuring. Either way they just select the platforms they want. As for the c, greping will still work, it'll just get the machine definition rather than the comments at the top. Still I agree a few comments wouldn't hurt!

Quoted 3 lines

I don't know much about the Crossbow product palette but maybe we should even rename it to crossbow.c

Sadly not. The devices were both originally Intel Research. They sold the imote2 to crossbow. I think they gave the stargate2 designs to UCLA but I haven't seen any sign of them doing anything with them and no one has posted anything to the platformx users list for a while. To complicate things further the imote2 is now owned by Memsic after they bought the relevant bit of Crossbow. No idea what their plans are.

I'm inclined just to pick one or the other. Perhaps we go with imote2 as I suspect there are a lot more them out there! Can't even use platformx (Intel's code word for these sorts of devices) as that covered the original stargate.

Quoted 9 lines
Quoted 5 lines
 arch/arm/mach-pxa/Makefile    |    2 +-
 arch/arm/mach-pxa/imote2.c    |  590 -----------------------------------
 arch/arm/mach-pxa/stargate2.c |  679 +++++++++++++++++++++++++++--------------
 3 files changed, 454 insertions(+), 817 deletions(-)

Given that we can eliminate nearly 400 lines of code and one board file I think it is worth it. I looked over the patch and it does look good so far. Will give it a runtime test the next days. If that truns out well I'm fine to ack it.

:) I'll admit I haven't tested it myself yet. Didn't have the debug board to hand to be able to flash it to an imote2 and my sg2's were all in use testing the radio driver (that is dependent on mac802154 mainlining). One day we will have these devices fully supported in mainline.

Jonathan

#3 lore raw

RFC PATCH 1/1 stargate2 and imote2 board file merge

Hello.

Quoted 16 lines · Jonathan Cameron
Quoted 10 lines · Stefan Schmidt
Quoted 7 lines · Jonathan Cameron

---
These two boards are extremely similar in many ways and hence the board configs overlap a lot. This patch merges the two board files. Do people think this is worth doing? Traditionally we always built a kernel supporting both devices anyway but the ifdefs allow one to be picked if people really want to.

Quoted 5 lines

I find it an interesting idea. We have done this on EZX with 6 devices. One thing that jumps into my face is that we should provide a way to let people know that the stargate2.c file does indeed also provide support for imote2. At least updated comments in KConfig and the header of the c file would be needed. That would allow people to discover it during configuration or greping.

Quoted 4 lines

Not sure we care particularly in the kconfig as it doesn't make any difference to someone configuring. Either way they just select the platforms they want. As for the c, greping will still work, it'll just get the machine definition rather than the comments at the top. Still I agree a few comments wouldn't hurt!

Yeah, I somehow missed that imote2 is still available as before in Kconfig just maps to another board file. My bad. That fine then.

Quoted 11 lines
Quoted 2 lines

I don't know much about the Crossbow product palette but maybe we should even rename it to crossbow.c

Sadly not. The devices were both originally Intel Research. They sold the imote2 to crossbow. I think they gave the stargate2 designs to UCLA but I haven't seen any sign of them doing anything with them and no one has posted anything to the platformx users list for a while. To complicate things further the imote2 is now owned by Memsic after they bought the relevant bit of Crossbow. No idea what their plans are.

I'm inclined just to pick one or the other. Perhaps we go with imote2 as I suspect there are a lot more them out there! Can't even use platformx (Intel's code word for these sorts of devices) as that covered the original stargate.

Thanks for the background info. I'm fine with either one.

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
 arch/arm/mach-pxa/Makefile    |    2 +-
 arch/arm/mach-pxa/imote2.c    |  590 -----------------------------------
 arch/arm/mach-pxa/stargate2.c |  679 +++++++++++++++++++++++++++--------------
 3 files changed, 454 insertions(+), 817 deletions(-)
Quoted 8 lines
Quoted 3 lines

Given that we can eliminate nearly 400 lines of code and one board file I think it is worth it. I looked over the patch and it does look good so far. Will give it a runtime test the next days. If that truns out well I'm fine to ack it.

:) I'll admit I haven't tested it myself yet. Didn't have the debug board to hand to be able to flash it to an imote2 and my sg2's were all in use testing the radio driver (that is dependent on mac802154 mainlining). One day we will have these devices fully supported in mainline.

I should be able to flash it onto the imote2 today or tomorrow. Will let you know my results.

mfg
Stefan Schmidt

#4 lore raw

RFC PATCH 1/1 stargate2 and imote2 board file merge

Hello.

Quoted 9 lines · Stefan Schmidt
Quoted 4 lines · Jonathan Cameron

:) I'll admit I haven't tested it myself yet. Didn't have the debug board to hand to be able to flash it to an imote2 and my sg2's were all in use testing the radio driver (that is dependent on mac802154 mainlining). One day we will have these devices fully supported in mainline.

I should be able to flash it onto the imote2 today or tomorrow. Will let you know my results.

I can confirm that it boots fine on my imote2.

I guess its Eric's call if he would like to see them merged.

regards
Stefan Schmidt

Applied
#5 lore raw

RFC PATCH 1/1 stargate2 and imote2 board file merge

Quoted 10 lines · Stefan Schmidt

Hello.

Quoted 7 lines · Stefan Schmidt
Quoted 4 lines · Jonathan Cameron

:) I'll admit I haven't tested it myself yet. ?Didn't have the debug board to hand to be able to flash it to an imote2 and my sg2's were all in use testing the radio driver (that is dependent on mac802154 mainlining). ?One day we will have these devices fully supported in mainline.

Quoted 9 lines
Quoted 2 lines

I should be able to flash it onto the imote2 today or tomorrow. Will let you know my results.

I can confirm that it boots fine on my imote2.

I guess its Eric's call if he would like to see them merged.

Patches reducing duplication are always welcome, and this looks good to me. Thanks for the testing.

Applied to 'devel'.