IXP4xx: Add Gateworks Cambria support.
PATCH 1/1 IXP4xx: Add Gateworks Cambria support.
arch/arm/mach-ixp4xx/Kconfig +9 -1
@@ -25,6 +25,14 @@ config MACH_AVILA Avila Network Platform. For more information on this platform, see <file:Documentation/arm/IXP4xx>. +config MACH_CAMBRIA + bool "Cambria" + select PCI + help + Say 'Y' here if you want your kernel to support the Gateworks + Cambria GW2350 board. For more information on this platform, + see <file:Documentation/arm/IXP4xx>. + config MACH_LOFT bool "Loft" depends on MACH_AVILA
@@ -158,7 +166,7 @@ config CPU_IXP46X config CPU_IXP43X bool - depends on MACH_KIXRP435 + depends on MACH_KIXRP435 || MACH_CAMBRIA default y config MACH_GTWX5715
arch/arm/mach-ixp4xx/Makefile +1 -0
@@ -23,6 +23,7 @@ obj-y += common.o obj-$(CONFIG_ARCH_IXDP4XX) += ixdp425-setup.o obj-$(CONFIG_MACH_AVILA) += avila-setup.o +obj-$(CONFIG_MACH_CAMBRIA) += cambria.o obj-$(CONFIG_MACH_IXDPG425) += coyote-setup.o obj-$(CONFIG_ARCH_ADI_COYOTE) += coyote-setup.o obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-setup.o
arch/arm/mach-ixp4xx/cambria.c new file +245 -0
245 lines not on this page · raw message
arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h +7 -0
@@ -595,6 +595,13 @@#define DCMD_LENGTH 0x01fff/* length mask (max = 8K - 1) */ +/* +* EHCI USB host registers +*/ +#define IXP4XX_EHCI1_BASE_PHYS 0xCD000000 +#define IXP4XX_EHCI2_BASE_PHYS 0xCE000000 +#define IXP4XX_EHCI_REGION_SIZE 0x00000200 +/* "fuse" bits of IXP_EXP_CFG2 */ /* All IXP4xx CPUs */ #define IXP4XX_FEATURE_RCOMP (1 << 0)
arch/arm/tools/mach-types +1 -0
@@ -261,6 +261,7 @@ halibut MACH_HALIBUT HALIBUT 1439 trout MACH_TROUT TROUT 1440 tct_hammer MACH_TCT_HAMMER TCT_HAMMER 1460 herald MACH_HERALD HERALD 1461 +cambria MACH_CAMBRIA CAMBRIA 1468 sim_one MACH_SIM_ONE SIM_ONE 1476 jive MACH_JIVE JIVE 1490 sam9_l9260 MACH_SAM9_L9260 SAM9_L9260 1501
PATCH 1/1 IXP4xx: Add Gateworks Cambria support.
Hi Krzysztof,
it's great that you have decided to push upstream support for this board.
I was unable to bring up serial console with your patch. I was using latest OpenWrt trunk for rootfs, did you use the same?
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
IP-Config: Failed to open eth0
IP-Config: Failed to open eth1
IP-Config: No network devices available
Warning: unable to open an initial console. Freeing unused kernel memory: 4124K (c0427000 - c082e000)
procd: Console is alive
arch/arm/mach-ixp4xx/cambria.c line 4
Quoted 7 lines · Krzysztof Ha?asa
arch/arm/mach-ixp4xx/cambria.c new file +4
-0@@ -0,0 +1,245 @@ +/* +* Gateworks Cambria GW2350 platform support +* Portions based on OpenWRT. +*/
I'm no expert on licenses but shouldn't here at least be GPLv2 since the file originated from OpenWrt support for this board which is GPLv2.
arch/arm/mach-ixp4xx/cambria.c line 188
Quoted 9 lines
arch/arm/mach-ixp4xx/cambria.c new file +9
-0+static struct i2c_board_info __initdata cambria_i2c_board_info[] = { + { +I2C_BOARD_INFO ("ad7418" ,0x28 ), + }, + { +I2C_BOARD_INFO ("24c08" ,0x50 ), + .platform_data = &cambria_eeprom_info, + }, +};
I couldn't test this because of the console issue but in OpenWrt sources the value is 0x51 and not 0x50. Did you change it by accident?
Also, shouldn't arch/arm/configs/ixp4xx_defconfig be updated too?
Luka
PATCH 1/1 IXP4xx: Add Gateworks Cambria support.
Hi Luka,
Quoted 2 lines · Luka Perkov
I was unable to bring up serial console with your patch. I was using latest OpenWrt trunk for rootfs, did you use the same?
No, I use a different, custom initramfs.
Quoted 5 lines
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
IP-Config: Failed to open eth0
IP-Config: Failed to open eth1
IP-Config: No network devices available
Warning: unable to open an initial console.
Perhaps it wants the network console instead? Are you using "console=ttyS0,115200" or something alike? Or a /dev filesystem problems maybe?
Quoted 2 lines
I'm no expert on licenses but shouldn't here at least be GPLv2 since the file originated from OpenWrt support for this board which is GPLv2.
Of course the license is GPLv2, every Linux kernel file (except maybe some firmware and non-copyrightable code) is so licensed. See the file "COPYING"
Quoted 4 lines
Quoted 4 lines
arch/arm/mach-ixp4xx/cambria.c new file +4
-0+static struct i2c_board_info __initdata cambria_i2c_board_info[] = { + { +I2C_BOARD_INFO ("ad7418" ,0x28 ), + },
Quoted 8 lines
arch/arm/mach-ixp4xx/cambria.c line 188
Quoted 5 lines
arch/arm/mach-ixp4xx/cambria.c new file +5
-0+ { + I2C_BOARD_INFO("24c08", 0x50), + .platform_data = &cambria_eeprom_info, + }, +};I couldn't test this because of the console issue but in OpenWrt sources the value is
0x51and not0x50. Did you change it by accident?
Not really, the board simply has 24C08 at 0x50. OpenWRT does a trick with offsets here, you can't really have a 24C08 at 0x51 (possible addresses for most chips are 0x50 and 0x54). I just did it the straight way and it works fine.
Quoted 1 line
Also, shouldn't
arch/arm/configs/ixp4xx_defconfigbe updated too?
Well, probably.
Signature · 1 line
Krzysztof Halasa
PATCH 1/1 IXP4xx: Add Gateworks Cambria support.
In reply to Krzysztof HałasaQuoted 1 line · Krzysztof Ha?asa
Signed-off-by Krzysztof Ha?asa <[email protected]>
<snip>
This file seems to miss both the copyright from the code it's based on as well as most of the additional support that one has. So what's the point?
Regards,
Imre
PATCH 1/1 IXP4xx: Add Gateworks Cambria support.
Quoted 3 lines · Imre Kaloz
This file seems to miss both the copyright from the code it's based on as well as most of the additional support that one has.
So what's the point?
I have the smaller Cambria (GW2350), not the bigger one which is also supported by OpenWRT. I'm not going to blindly pick up the OpenWRT code for which I don't have the hw and which I can't really test nor maintain.
The file contains information that it's partially based on OpenWRT, is it now a bad idea to pick up fragments from one GPLv2 project (OpenWRT) and include them in another GPLv2 project (Linux kernel)? Isn't it what OpenWRT does (in the opposite direction)? Aren't all the boards (in this particular case) based on Avila and IXDP425, the devel platform?
The code doesn't carry any copyright headers maybe because in my country they aren't required, maybe because it's a trivial board support code which is mostly a list of devices and I didn't bother, and it doesn't have OpenWRT copyright because it's not a version from OpenWRT (while its parts are, as prominently stated). For precisely the same reason I list myself as the platform maintainer, I don't feel authorized to put somebody else here.
But I have an idea. I would be pleased if you submit and maintain (in the official Linux, not OpenWRT) your own version instead. It would be great if you also include Ubiquity RouterStation Pro (ATH79) and Gateworks Laguna (CNS3xxx). Those boards are supported for a long time by OpenWRT (at least there is support code there) and I'm personally using them with (stock) Linux.
Signature · 4 lines
Krzysztof Halasa Research Institute for Automation and Measurements PIAP Al. Jerozolimskie 202, 02-486 Warsaw, Poland
PATCH 1/1 IXP4xx: Add Gateworks Cambria support.
Quoted 10 lines · Krzysztof Ha?asa
Quoted 3 lines · Imre Kaloz
This file seems to miss both the copyright from the code it's based on as well as most of the additional support that one has.
So what's the point?I have the smaller Cambria (GW2350), not the bigger one which is also supported by OpenWRT. I'm not going to blindly pick up the OpenWRT code for which I don't have the hw and which I can't really test nor maintain.
So you delete portions of the code because you don't want to ask someone with the board to test your changes if needed, but given quite some people use the code for quite some time, you can also assume it works for them.
Quoted 5 lines
The file contains information that it's partially based on OpenWRT, is it now a bad idea to pick up fragments from one GPLv2 project (OpenWRT) and include them in another GPLv2 project (Linux kernel)? Isn't it what OpenWRT does (in the opposite direction)? Aren't all the boards (in this particular case) based on Avila and IXDP425, the devel platform?
OpenWrt (yeah, we spell it this way for about 10 years now) is a Linux distribution, you do mix things up a bit here.
Quoted 7 lines
The code doesn't carry any copyright headers maybe because in my country they aren't required, maybe because it's a trivial board support code which is mostly a list of devices and I didn't bother, and it doesn't have OpenWRT copyright because it's not a version from OpenWRT (while its parts are, as prominently stated). For precisely the same reason I list myself as the platform maintainer, I don't feel authorized to put somebody else here.
It's up to you if you add your copyright, but removing others' is clearly a different story legally. And I bet that's the same in your country, too.
Quoted 6 lines
But I have an idea. I would be pleased if you submit and maintain (in the official Linux, not OpenWRT) your own version instead. It would be great if you also include Ubiquity RouterStation Pro (ATH79) and Gateworks Laguna (CNS3xxx). Those boards are supported for a long time by OpenWRT (at least there is support code there) and I'm personally using them with (stock) Linux.
I'll do when I'll get around it. Both others and we've pushed a lot of code upstream. In the meantime, anyone is free to do so, including you - dumbing down the code could be justifiable in some cases (I don't think this one applies), but dropping others' copyright -- hardly.
Imre
PATCH 1/1 IXP4xx: Add Gateworks Cambria support.
Quoted 4 lines · Imre Kaloz
So you delete portions of the code because you don't want to ask someone with the board to test your changes if needed, but given quite some people use the code for quite some time, you can also assume it works for them.
No, I didn't delete any code at all. Look at the patch again, it's only adding stuff.
I have picked up parts of your code (parts of another project). GPL doesn't allow a requirement that I have to take the whole.
Quoted 1 line
OpenWrt (yeah, we spell it this way for about 10 years now)
Sorry, didn't know, I don't use it.
Quoted 1 line
is a Linux distribution, you do mix things up a bit here.
Well, at least Cambria code is not a part of the official Linux then.
Quoted 3 lines
It's up to you if you add your copyright, but removing others' is clearly a different story legally. And I bet that's the same in your country, too.
You are making things up. I didn't remove anything. I've created a derivative work of (among others) your project. The copyright for the base work doesn't apply for the derivative work, the creator of the derivative work formally holds the copyright. The GPL explicitly allows creating derivative works - actually, the whole point about GPL is encouraging derivative works. OpenWrt is based on other works in precisely the same way.
I didn't include my copyright because I didn't care a bit. The code in question is mostly a trivial list of devices, and I guess in most parts it's not even copyrightable. Remember, copyright is about the form, and there aren't two ways to express e.g. that it has a serial port (identical to other IXP4xx platforms), that it has a NOR flash (identical to others) and so on.
Quoted 4 lines
I'll do when I'll get around it. Both others and we've pushed a lot of code upstream. In the meantime, anyone is free to do so, including you
- dumbing down the code could be justifiable in some cases (I don't think this one applies), but dropping others' copyright -- hardly.
Again, creating derivative works by picking up needed parts is not dropping or dumbing anything. You are trying to force your view of what is justifiable and what does apply. There is absolutely no legal or other basis for this.
I have to say I'm disappointed. I didn't expect such reaction from you. Actually I thought I was helping your project a bit (and my project, of course). Since the former is not the case, I'm simply withdrawing my patch.
Signature · 4 lines
Krzysztof Halasa Research Institute for Automation and Measurements PIAP Al. Jerozolimskie 202, 02-486 Warsaw, Poland