TQMA31: add new board with i.MX31 processor
Subsystems (2)
PATCH v2 4/10 TQMA31: add new board with i.MX31 processor
---
Fixed two bugs:
a) added NFS mount option "rw" to default environment
b) added prefix $(obj) in front of .depend in Makefile. Thank you Magnus for catching that.
MAINTAINERS | 4 MAKEALL | 1 Makefile | 3 board/tqc/tqma31/Makefile | 48 ++++ board/tqc/tqma31/config.mk | 2 board/tqc/tqma31/lowlevel_init.S | 375 +++++++++++++++++++++++++++++++++ board/tqc/tqma31/tqma31.c | 95 ++++++++ board/tqc/tqma31/u-boot.lds | 72 ++++++ include/asm-arm/arch-mx31/mx31-regs.h | 42 ++++ include/configs/TQMA31.h | 271 ++++++++++++++++++++++++ 10 files changed, 913 insertions(+), 0 deletions(-) create mode 100644 board/tqc/tqma31/Makefile create mode 100644 board/tqc/tqma31/config.mk create mode 100644 board/tqc/tqma31/lowlevel_init.S create mode 100644 board/tqc/tqma31/tqma31.c create mode 100644 board/tqc/tqma31/u-boot.lds create mode 100644 include/configs/TQMA31.h
MAINTAINERS +4 -0
@@ -591,6 +591,10 @@ Michael Schwingen <[email protected]> actux3 xscale actux4 xscale +Jens Gehrlein <[email protected]> + + TQMA31 i.MX31 + ######################################################################### # x86 Systems: # # #
MAKEALL +1 -0
@@ -524,6 +524,7 @@ LIST_ARM11=" \ imx31_litekit \ imx31_phycore \ mx31ads \ + TQMA31 \ " #########################################################################
Makefile +3 -0
@@ -2664,6 +2664,9 @@ imx31_phycore_config : unconfig mx31ads_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm1136 mx31ads NULL mx31 +TQMA31_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm1136 tqma31 tqc mx31 + #======================================================================== # i386 #========================================================================
board/tqc/tqma31/Makefile new file +48 -0
48 lines not on this page · raw message
board/tqc/tqma31/config.mk new file +2 -0
@@ -0,0 +1,2 @@ +TEXT_BASE = 0x8ff00000 +
board/tqc/tqma31/lowlevel_init.S new file +375 -0
375 lines not on this page · raw message
board/tqc/tqma31/tqma31.c new file +95 -0
95 lines not on this page · raw message
board/tqc/tqma31/u-boot.lds new file +72 -0
72 lines not on this page · raw message
include/asm-arm/arch-mx31/mx31-regs.h +42 -0
53 lines not on this page · raw message
include/configs/TQMA31.h new file +271 -0
271 lines not on this page · raw message
PATCH v2 4/10 TQMA31: add new board with i.MX31 processor
Quoted 26 lines · Jens Gehrlein
Signed-off-by Jens Gehrlein <[email protected]>---
Fixed two bugs:
a) added NFS mount option "rw" to default environment
b) added prefix $(obj) in front of .depend inMakefile. Thank you Magnus for catching that.MAINTAINERS | 4 MAKEALL | 1 Makefile | 3 board/tqc/tqma31/Makefile | 48 ++++ board/tqc/tqma31/config.mk | 2 board/tqc/tqma31/lowlevel_init.S | 375 +++++++++++++++++++++++++++++++++ board/tqc/tqma31/tqma31.c | 95 ++++++++ board/tqc/tqma31/u-boot.lds | 72 ++++++ include/asm-arm/arch-mx31/mx31-regs.h | 42 ++++ include/configs/TQMA31.h | 271 ++++++++++++++++++++++++ 10 files changed, 913 insertions(+), 0 deletions(-) create mode 100644 board/tqc/tqma31/Makefile create mode 100644 board/tqc/tqma31/config.mk create mode 100644 board/tqc/tqma31/lowlevel_init.S create mode 100644 board/tqc/tqma31/tqma31.c create mode 100644 board/tqc/tqma31/u-boot.lds create mode 100644 include/configs/TQMA31.h
Review
Quoted 2 lines
(quoted diff) +2
-0+ +COBJS := tqma31.o
why not use $(BOARD)?
COBJS := $(BOARD).o
board/tqc/tqma31/Makefile
Quoted 11 lines
board/tqc/tqma31/Makefile new file +11
-0+SOBJS := lowlevel_init.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +#elif defined CONFIG_MX31_CPU_532_MHZ + /* Platform clocks */ + REG CCM_PDR0, PDR0_CSI_PODF(0x1ff) /* camera sensor interface */ \ + | PDR0_PER_PODF(8-1) /* periph. if derived from USB clock */ \ + | PDR0_HSP_PODF(4-1) /* IPU 133 MHz */ \
Please use tab instead of whitespace
Review
Quoted 1 line
(quoted diff) +1
-0+ | PDR0_NFC_PODF(7-1) /* NAND FC 19 MHz */ \
Please use tab instead of whitespace
Review
Quoted 1 line
(quoted diff) +1
-0+ | PDR0_IPG_PODF(2-1) /* peripherals 66.5 MHz */ \
Please use tab instead of whitespace
board/tqc/tqma31/lowlevel_init.S line 224
Quoted 1 line
board/tqc/tqma31/lowlevel_init.S new file +1
-0+ | PDR0_MAX_PODF(4-1) /* AHB 133 MHz */ \
Please use tab instead of whitespace
Quoted 20 lines
board/tqc/tqma31/lowlevel_init.S new file +20
-0+ | PDR0_MCU_PODF(1-1) /* core 532 MHz */ + /* MCU PLL */ + REG CCM_MPCTL, PLL_PD(1-1) | PLL_MFD(52-1) | PLL_MFI(10) | PLL_MFN(12) +#else +#error Please define CPU core frequency (CONFIG_CPU_399_MHZ or CONFIG_CPU_532_MHZ)! +#endif /* CONFIG_CPU_xxx_MHZ */ + + /* Serial PLL. Default: 1, 4, 12, 1 */ + REG CCM_SPCTL, PLL_PD(2-1) | PLL_MFD(5-1) | PLL_MFI(12) | PLL_MFN(1) +.endm /* init_sdram */ + + +/* setup SDRAM on CSD0 */ +.macro init_sdram + /* + * Enhanced SDRAM Miscellaneous Register + * Latency Hiding Enable + * LPDDR delay line measure unit is enabled + * LPDDR Delay Line is not reset + * Enable Mobile DDR SDRAM operation
board/tqc/tqma31/lowlevel_init.S line 254
Quoted 10 lines
board/tqc/tqma31/lowlevel_init.S new file +10
-0+ * Soft Reset is disabled + */ + REG ESDMISC, 0x00000004 + + /* + * Enhanced SDRAM Configuration Register 0 + * tXP 4 clock delay before new COMMAND issued to LPDDR + * tWTR tLPDDR WRITE to READ Command Delay = 2 clock + * tRP SDRAM Row Precharge Delay = 3 clock + * tMRD?SDRAM Load Mode Register to ACTIVE Command = 3 clock
you have a nice char here '<96>' in vim
Quoted 22 lines
board/tqc/tqma31/lowlevel_init.S new file +22
-0+ * tWR SDRAM WRITE to PRECHARGE Command = 3 clock + * tRAS SDRAM ACTIVE to PRECHARGE Command = 6 clock + * tRRD ACTIVE Bank A to ACTIVE Bank B Command = 2 clock + * tCAS CAS Latency = 3 clock + * tRCD SDRAM Row to Column Delay = 3 clock + * tRC SDRAM Row Cycle Delay = 13 clocks + */ + REG ESDCFG0, 0x006ac73c + + /* + * Enhanced SDRAM Control Register 0 + * Enhanced SDRAM Controller Enable = 1 + * SDRAM Controller Operating Mode = 001 Precharge Command + * Supervisor Protect = 0 User mode accesses are allowed to this + * chip select region + * ROW Row Address Width. = 011 14 Row Addresses + * COL Column Address Width = 01 9 Col Addresses + * DSIZ SDRAM Memory Data Width = 00 00 16-bit memory width + * aligned to D[31:16] + * SREFR SDRAM Refresh Rate = 000 Refresh Disabled + * (bit field reset value) + * PWDT Power Down = 00 Disabled (bit field reset value) Run Mode
board/tqc/tqma31/lowlevel_init.S line 286
Quoted 10 lines
board/tqc/tqma31/lowlevel_init.S new file +10
-0+ * FP Full Page = 0 0 Burst Length of the external memory device + * is not set to Full Page + * BL Burst Length = 0 + * PRCT Precharge Timer 000000 Disabled (Bit field reset value) + */ + REG ESDCTL0, 0x92200000 + REG 0x80000f00, 0x12344321 + + + /*
Please use tab instead of whitespace
Quoted 1 line
+ * Enhanced SDRAM Control Register 0
Please use tab instead of whitespace
Quoted 13 lines
board/tqc/tqma31/lowlevel_init.S new file +13
-0+ * Enhanced SDRAM Controller Enable = 1 + * SDRAM Controller Operating Mode = 010 Auto-Refresh Command + * Supervisor Protect = 0 User mode accesses are allowed to this + * chip select region + * ROW Row Address Width. = 011 14 Row Addresses + * COL Column Address Width = 01 9 Col Addresses + * DSIZ SDRAM Memory Data Width = 00 00 16-bit memory width + * aligned to D[31:16] + * SREFR SDRAM Refresh Rate = 000 Refresh Disabled + * (bit field reset value) + * PWDT Power Down = 00 Disabled (bit field reset value) Run Mode + * FP Full Page = 0 0 Burst Length of the external memory device + * is not set to Full Page
board/tqc/tqma31/lowlevel_init.S line 310
Quoted 10 lines
board/tqc/tqma31/lowlevel_init.S new file +10
-0+ * BL Burst Length = 0 + * PRCT Precharge Timer 000000 Disabled (Bit field reset value) + */ + REG ESDCTL0, 0xa2200000 + REG 0x80000000, 0x12344321 + REG 0x80000000, 0x12344321 + + /* + * Enhanced SDRAM Control Register 0 + * Enhanced SDRAM Controller Enable = 1
Please use tab instead of whitespace
Review
Quoted 1 line
(quoted diff) +1
-0+ * SDRAM Controller Operating Mode = 001 Precharge Command
Please use tab instead of whitespace
Review
Quoted 1 line
(quoted diff) +1
-0+ * Supervisor Protect = 0 User mode accesses are allowed to this
Please use tab instead of whitespace
Review
Quoted 2 lines
(quoted diff) +2
-0+ * chip select region + * ROW Row Address Width. = 011 14 Row Addresses
Please use tab instead of whitespace
Review
Quoted 1 line
(quoted diff) +1
-0+ * COL Column Address Width = 01 9 Col Addresses
Please use tab instead of whitespace
Review
Quoted 1 line
(quoted diff) +1
-0+ * DSIZ SDRAM Memory Data Width = 00 00 16-bit memory width
Please use tab instead of whitespace
Review
Quoted 2 lines
(quoted diff) +2
-0+ * aligned to D[31:16] + * SREFR SDRAM Refresh Rate = 000 Refresh Disabled
Please use tab instead of whitespace
Review
Quoted 2 lines
(quoted diff) +2
-0+ * (bit field reset value) + * PWDT Power Down = 00 Disabled (bit field reset value) Run Mode
Please use tab instead of whitespace
Review
Quoted 1 line
(quoted diff) +1
-0+ * FP Full Page = 0 0 Burst Length of the external memory device
Please use tab instead of whitespace
board/tqc/tqma31/lowlevel_init.S line 323
Quoted 2 lines
board/tqc/tqma31/lowlevel_init.S new file +2
-0+ * is not set to Full Page. + * BL Burst Length = 0
Please use tab instead of whitespace
Review
Quoted 1 line
(quoted diff) +1
-0+ * PRCT Precharge Timer 000000 Disabled (Bit field reset value)
Please use tab instead of whitespace
Quoted 25 lines
board/tqc/tqma31/tqma31.c new file +25
-0+*/ + REG ESDCTL0, 0xb2200000 + REG8 0x80000033, 0xda + REG8 0x81000000, 0xff + + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + + + return 0; +} + +int board_init (void ) +{ +/* WEIM burst clock runs all the time */ +__REG (WCR ) =WCR_BCM_1 ; + +setup_chipselects ();
board/tqc/tqma31/tqma31.c line 77
Quoted 10 lines
board/tqc/tqma31/tqma31.c new file +10
-0+setup_iomux (); + +/* +* FIXME: +* Replace machine type ID by symbolic define MACH_TYPE_TQMA31 as soon +* as updated file mach-types.h is available in U-Boot tree. +* Machine type ID 1810 for TQMA31 has been registered on 2008-06-25. +*/ +/* Machine type ID for ARM linux */ + gd->bd->bi_arch_number =1810 ;
No please update the mach-types.h
board/tqc/tqma31/tqma31.c line 81
Quoted 4 lines
board/tqc/tqma31/tqma31.c new file +4
-0+ +/* Address of boot parameters */ + gd->bd->bi_boot_params =0x80000100 ; +
+
include/configs/TQMA31.h line 100
Quoted 7 lines
include/configs/TQMA31.h new file +7
-0+/* +* Bank start addresses. +* 4 x 32 MiB is the maximum for user and U-Boot code. Please adapt the list +* as well as CFG_MAX_FLASH_BANKS to your TQM. Also consider dual die chips +* or single die chips, e.g. one dual die chip represents two banks. +*/ +#define CFG_FLASH_BANKS_LIST {CFG_FLASH_BASE, \
Please use tab instead of whitespace
include/configs/TQMA31.h line 101
Quoted 1 line
include/configs/TQMA31.h new file +1
-0+ CFG_FLASH_BASE + 32*1024*1024, \
please add space between operators
include/configs/TQMA31.h
Quoted 7 lines
include/configs/TQMA31.h new file +7
-0+CFG_FLASH_BASE +64 *1024 *1024 , \ + CFG_FLASH_BASE + 96*1024*1024} + +/* Max number of sectors on one chip */ +#define CFG_MAX_FLASH_SECT 259 + +/* Monitor at beginning of flash *
Best Regards,
J.
PATCH v2 4/10 TQMA31: add new board with i.MX31 processor
Hi Jean-Christophe,
Quoted 3 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 1 line
+COBJS := tqma31.o
why not use $(BOARD)?
COBJS := $(BOARD).o
Okay.
Quoted 12 lines
board/tqc/tqma31/Makefile
Quoted 11 lines
board/tqc/tqma31/Makefile new file +11
-0+SOBJS := lowlevel_init.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +#elif defined CONFIG_MX31_CPU_532_MHZ + /* Platform clocks */ + REG CCM_PDR0, PDR0_CSI_PODF(0x1ff) /* camera sensor interface */ \ + | PDR0_PER_PODF(8-1) /* periph. if derived from USB clock */ \ + | PDR0_HSP_PODF(4-1) /* IPU 133 MHz */ \Please use tab instead of whitespace
Quoted 7 lines
Review
Quoted 1 line
(quoted diff) +1
-0+ | PDR0_NFC_PODF(7-1) /* NAND FC 19 MHz */ \Please use tab instead of whitespace
Review
Quoted 1 line
(quoted diff) +1
-0+ | PDR0_IPG_PODF(2-1) /* peripherals 66.5 MHz */ \Please use tab instead of whitespace
board/tqc/tqma31/lowlevel_init.S line 224
Quoted 1 line
board/tqc/tqma31/lowlevel_init.S new file +1
-0+ | PDR0_MAX_PODF(4-1) /* AHB 133 MHz */ \Please use tab instead of whitespace
board/tqc/tqma31/lowlevel_init.S line 225
Quoted 1 line
board/tqc/tqma31/lowlevel_init.S new file +1
-0+ | PDR0_MCU_PODF(1-1) /* core 532 MHz */
Okay.
Quoted 22 lines
Quoted 22 lines
board/tqc/tqma31/lowlevel_init.S new file +22
-0+ /* MCU PLL */ + REG CCM_MPCTL, PLL_PD(1-1) | PLL_MFD(52-1) | PLL_MFI(10) | PLL_MFN(12) +#else +#error Please define CPU core frequency (CONFIG_CPU_399_MHZ or CONFIG_CPU_532_MHZ)! +#endif /* CONFIG_CPU_xxx_MHZ */ + + /* Serial PLL. Default: 1, 4, 12, 1 */ + REG CCM_SPCTL, PLL_PD(2-1) | PLL_MFD(5-1) | PLL_MFI(12) | PLL_MFN(1) +.endm /* init_sdram */ + + +/* setup SDRAM on CSD0 */ +.macro init_sdram + /* + * Enhanced SDRAM Miscellaneous Register + * Latency Hiding Enable + * LPDDR delay line measure unit is enabled + * LPDDR Delay Line is not reset + * Enable Mobile DDR SDRAM operation + * Soft Reset is disabled + */ + REG ESDMISC, 0x00000004
Quoted 8 lines
board/tqc/tqma31/lowlevel_init.S line 254
Quoted 7 lines
board/tqc/tqma31/lowlevel_init.S new file +7
-0+ + /* + * Enhanced SDRAM Configuration Register 0 + * tXP 4 clock delay before new COMMAND issued to LPDDR + * tWTR tLPDDR WRITE to READ Command Delay = 2 clock + * tRP SDRAM Row Precharge Delay = 3 clock + * tMRD?SDRAM Load Mode Register to ACTIVE Command = 3 clockyou have a nice char here '<96>' in vim
Uups. Well catched. Got this code from my colleague and missed that. Thank you.
Quoted 47 lines
board/tqc/tqma31/lowlevel_init.S line 45
Quoted 3 lines
board/tqc/tqma31/lowlevel_init.S new file +3
-0+ + + /*Please use tab instead of whitespace
Quoted 1 line
+ * Enhanced SDRAM Control Register 0
Please use tab instead of whitespace
Quoted 13 lines
board/tqc/tqma31/lowlevel_init.S new file +13
-0+ * Enhanced SDRAM Controller Enable = 1 + * SDRAM Controller Operating Mode = 010 Auto-Refresh Command + * Supervisor Protect = 0 User mode accesses are allowed to this + * chip select region + * ROW Row Address Width. = 011 14 Row Addresses + * COL Column Address Width = 01 9 Col Addresses + * DSIZ SDRAM Memory Data Width = 00 00 16-bit memory width + * aligned to D[31:16] + * SREFR SDRAM Refresh Rate = 000 Refresh Disabled + * (bit field reset value) + * PWDT Power Down = 00 Disabled (bit field reset value) Run Mode + * FP Full Page = 0 0 Burst Length of the external memory device + * is not set to Full Pageboard/tqc/tqma31/lowlevel_init.S line 310
Quoted 10 lines
board/tqc/tqma31/lowlevel_init.S new file +10
-0+ * BL Burst Length = 0 + * PRCT Precharge Timer 000000 Disabled (Bit field reset value) + */ + REG ESDCTL0, 0xa2200000 + REG 0x80000000, 0x12344321 + REG 0x80000000, 0x12344321 + + /* + * Enhanced SDRAM Control Register 0 + * Enhanced SDRAM Controller Enable = 1Please use tab instead of whitespace
Review
Quoted 1 line
(quoted diff) +1
-0+ * SDRAM Controller Operating Mode = 001 Precharge CommandPlease use tab instead of whitespace
Review
Quoted 1 line
(quoted diff) +1
-0+ * Supervisor Protect = 0 User mode accesses are allowed to thisPlease use tab instead of whitespace
Review
Quoted 2 lines
(quoted diff) +2
-0+ * chip select region + * ROW Row Address Width. = 011 14 Row AddressesPlease use tab instead of whitespace
Review
Quoted 1 line
(quoted diff) +1
-0+ * COL Column Address Width = 01 9 Col AddressesPlease use tab instead of whitespace
Review
Quoted 1 line
(quoted diff) +1
-0+ * DSIZ SDRAM Memory Data Width = 00 00 16-bit memory widthPlease use tab instead of whitespace
Review
Quoted 2 lines
(quoted diff) +2
-0+ * aligned to D[31:16] + * SREFR SDRAM Refresh Rate = 000 Refresh DisabledPlease use tab instead of whitespace
Review
Quoted 2 lines
(quoted diff) +2
-0+ * (bit field reset value) + * PWDT Power Down = 00 Disabled (bit field reset value) Run ModePlease use tab instead of whitespace
Quoted 7 lines
Review
Quoted 1 line
(quoted diff) +1
-0+ * FP Full Page = 0 0 Burst Length of the external memory devicePlease use tab instead of whitespace
board/tqc/tqma31/lowlevel_init.S line 323
Quoted 2 lines
board/tqc/tqma31/lowlevel_init.S new file +2
-0+ * is not set to Full Page. + * BL Burst Length = 0Please use tab instead of whitespace
Review
Quoted 1 line
(quoted diff) +1
-0+ * PRCT Precharge Timer 000000 Disabled (Bit field reset value)Please use tab instead of whitespace
Okay.
Quoted 28 lines
Quoted 28 lines
board/tqc/tqma31/tqma31.c new file +28
-0+*/ + REG ESDCTL0, 0xb2200000 + REG8 0x80000033, 0xda + REG8 0x81000000, 0xff + + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + + + return 0; +} + +int board_init (void ) +{ +/* WEIM burst clock runs all the time */ +__REG (WCR ) =WCR_BCM_1 ; + +setup_chipselects (); +setup_iomux (); + +/*
Quoted 8 lines
board/tqc/tqma31/tqma31.c line 77
Quoted 7 lines
board/tqc/tqma31/tqma31.c new file +7
-0+* FIXME: +* Replace machine type ID by symbolic define MACH_TYPE_TQMA31 as soon +* as updated file mach-types.h is available in U-Boot tree. +* Machine type ID 1810 for TQMA31 has been registered on 2008-06-25. +*/ +/* Machine type ID for ARM linux */ + gd->bd->bi_arch_number =1810 ;No please update the
mach-types.h
I thought this file gets updated from time to time by copying from the kernel. But after having a look into the git history of this file, it is not so. I will update directly.
Quoted 5 lines
board/tqc/tqma31/tqma31.c line 81
Quoted 4 lines
board/tqc/tqma31/tqma31.c new file +4
-0+ +/* Address of boot parameters */ + gd->bd->bi_boot_params =0x80000100 ; ++
Quoted 8 lines
include/configs/TQMA31.h line 100
Quoted 7 lines
include/configs/TQMA31.h new file +7
-0+/* +* Bank start addresses. +* 4 x 32 MiB is the maximum for user and U-Boot code. Please adapt the list +* as well as CFG_MAX_FLASH_BANKS to your TQM. Also consider dual die chips +* or single die chips, e.g. one dual die chip represents two banks. +*/ +#define CFG_FLASH_BANKS_LIST {CFG_FLASH_BASE, \Please use tab instead of whitespace
Okay.
Quoted 3 lines
include/configs/TQMA31.h line 101
Quoted 1 line
include/configs/TQMA31.h new file +1
-0+ CFG_FLASH_BASE + 32*1024*1024, \please add space between operators
Okay.
Thank you very much for catching all these silly mistakes.
A last question:
When I want to "reply all", your e-mail address doesn't appear in the to-field. I have to add the address manually. Is this intended?
Kind regards,
Jens
PATCH v2 4/10 TQMA31: add new board with i.MX31 processor
Quoted 6 lines
Thank you very much for catching all these silly mistakes.
A last question:
When I want to "reply all", your e-mail address doesn't appear in the to-field. I have to add the address manually. Is this intended?
wierd, in the mail i'm not in the CC but in the FROM
Best Regards,
J.
PATCH v2 4/10 TQMA31: add new board with i.MX31 processor
In reply to Jens Gehrleininclude/configs/TQMA31.h line 58
Quoted 3 lines · In message <[email protected]> you wrote:
include/configs/TQMA31.h new file +2
-0+/* Timer tick */ +#define CFG_HZ 32768
CFG_HZ is a constant and has to be 1000.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Hokey religions and ancient weapons are no substitute for a good blaster at your side. - Han Solo
PATCH v2 4/10 TQMA31: add new board with i.MX31 processor
Quoted 5 lines · Wolfgang Denk
include/configs/TQMA31.h line 58
Quoted 2 lines · In message <[email protected]> you wrote:
include/configs/TQMA31.h new file +2
-0+/* Timer tick */ +#define CFG_HZ 32768
CFG_HZis a constant and has to be 1000.
I know, we had a discussion earlier about that issue (see "i.MX31:
question about CFG_HZ and CKIL" of 7th May). The situation is as follows:
The TQMA31, as well as the mx32ads use the General Purpose Timer 1, which is feeded by a 32768 clock (possibly imx31_litekit and imx31_phycore with 32000 Hz? I don't know.). The prescale divider can only be an integer. 32768/1000 = non-integer.
The counter is just read. There are no real interrupts (I mention it, because you wrote about this earlier).
The origin source code is from U-Boot V2, I suppose. Guennadi used it for the mx31ads.
Currently, I see only one way to solve this:
1. Patch the common file cpu/arm1136/mx31/interrupts.c, function interrupt_init(), so that the prescaler divides by 33. Alternatively, also make the divider a board specific define.
2. Patch all mx31 board config header files with CFG_HZ 1000.
3. All mx31 boards have to be tested.
The following is impossible:
- changing the HW
- using an internal clock, because maximum is 1000 Hz * 4096 = 4096000 Hz (the maximum divider is 4096). All internal clocks are much higher. Please for correction if I'm wrong.
What do you suggest to do and who does it?
And while we are at the timers:
The udelay function is the next problem:
udelay cannot go below 1/(32768 Hz) = 30.5 micros
The current function inserts a theoretical nop if the requested usec value is below 1000. Therefore, IMHO, this timer is relatively imprecise, because the resulting delay is below 1 microsecond. IMHO, this all because of that slow input clock.
Kind regards,
Jens
PATCH v2 4/10 TQMA31: add new board with i.MX31 processor
Quoted 5 lines · In message <[email protected]> you wrote:
The TQMA31, as well as the mx32ads use the General Purpose Timer 1, which is feeded by a 32768 clock (possibly
imx31_litekitandimx31_phycorewith 32000 Hz? I don't know.). The prescale divider can only be an integer. 32768/1000 = non-integer.
I think other architectures hav / had similar issues. See for example the MIPS fixes that were added some time ago.
Quoted 6 lines
Currently, I see only one way to solve this:
1. Patch the common filecpu/arm1136/mx31/interrupts.c, functioninterrupt_init(), so that the prescaler divides by 33. Alternatively, also make the divider a board specific define.
2. Patch all mx31 board config header files withCFG_HZ1000.
3. All mx31 boards have to be tested.
Sounds like a plan.
Quoted 7 lines
And while we are at the timers:
The udelay function is the next problem:
udelay cannot go below 1/(32768 Hz) = 30.5 micros
The current function inserts a theoretical nop if the requested usec value is below 1000. Therefore, IMHO, this timer is relatively imprecise, because the resulting delay is below 1 microsecond. IMHO, this all because of that slow input clock.
How is this handled in Linux? I don't think they would let this go through?
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Speed of a tortoise breaking the sound barrier = 1 Machturtle
PATCH v2 4/10 TQMA31: add new board with i.MX31 processor
Quoted 8 lines · Wolfgang Denk
Quoted 4 lines · In message <[email protected]> you wrote:
The TQMA31, as well as the mx32ads use the General Purpose Timer 1, which is feeded by a 32768 clock (possibly
imx31_litekitandimx31_phycorewith 32000 Hz? I don't know.). The prescale divider can only be an integer. 32768/1000 = non-integer.I think other architectures hav / had similar issues. See for example the MIPS fixes that were added some time ago.
I'll take a look.
Quoted 8 lines
Quoted 6 lines
Currently, I see only one way to solve this:
1. Patch the common filecpu/arm1136/mx31/interrupts.c, functioninterrupt_init(), so that the prescaler divides by 33. Alternatively, also make the divider a board specific define.
2. Patch all mx31 board config header files withCFG_HZ1000.
3. All mx31 boards have to be tested.Sounds like a plan.
What do you mean?
It's just a proposal and I like to read comments from others, especially those, who wrote this code.
Quoted 10 lines
Quoted 7 lines
And while we are at the timers:
The udelay function is the next problem:
udelay cannot go below 1/(32768 Hz) = 30.5 micros
The current function inserts a theoretical nop if the requested usec value is below 1000. Therefore, IMHO, this timer is relatively imprecise, because the resulting delay is below 1 microsecond. IMHO, this all because of that slow input clock.How is this handled in Linux? I don't think they would let this go through?
I don't no. Where can I start to have a look on? According to experience, timer handling in Linux is much more complex.
Question: Why did you accept all the initial patches for cpu/arm1136/mx31/interrupts.c and for the boards mx31ads, imx31_litekit, imx31_phycore?
Kind regards,
Jens
PATCH v2 4/10 TQMA31: add new board with i.MX31 processor
Quoted 4 lines · In message <[email protected]> you wrote:
Question: Why did you accept all the initial patches for
cpu/arm1136/mx31/interrupts.cand for the boards mx31ads,imx31_litekit,imx31_phycore?
Nobody raised concerns, and I did not notice problems either. I do not claim to catch 100% of all issues (I don't even claim to review all postings).
But when I see a problem, I say so.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The following statement is not true. The previous statement is true.
PATCH v2 4/10 TQMA31: add new boardwith i.MX31 processor
u-boot-users-bounces at lists.sourceforge.net wrote on :
Quoted 9 lines
Quoted 4 lines · In message <[email protected]> you wrote:
Question: Why did you accept all the initial patches for
cpu/arm1136/mx31/interrupts.cand for the boards mx31ads,imx31_litekit,imx31_phycore?Nobody raised concerns, and I did not notice problems either. I do not claim to catch 100% of all issues (I don't even claim to review all postings).
If I could remember correctly, we (TQS) paid DENX for the U-Boot porting of the mx31ads board. It is a little bit surprising that now the patch for our own i.mx31 based board is not accepted, although we used the mx31ads port as basis. The reason for paying the mx31ads port was to get an accepted basis for a common i.mx31 board into the official U-Boot tree, to have a stable basis for further portings of i.mx31 boards (and to give something back to the great U-Boot community which is hopefully useful for many other users).
Best Regards,
Martin Krause
--
TQ-Systems GmbH
Muehlstrasse 2, Gut Delling, D-82229 Seefeld
Amtsgericht Muenchen, HRB 105 018, UST-IdNr. DE 811 607 913
Geschaeftsfuehrer: Dipl.-Ing. (FH) Detlef Schneider, Dipl.-Ing. (FH) Ruediger Stahl
http://www.tq-group.com
PATCH v2 4/10 TQMA31: add new board with i.MX31 processor
In reply to Jens GehrleinQuoted 20 lines · Jens Gehrlein
Quoted 8 lines · Wolfgang Denk
Quoted 4 lines · In message <[email protected]> you wrote:
The TQMA31, as well as the mx32ads use the General Purpose Timer 1, which is feeded by a 32768 clock (possibly
imx31_litekitandimx31_phycorewith 32000 Hz? I don't know.). The prescale divider can only be an integer. 32768/1000 = non-integer.I think other architectures hav / had similar issues. See for example the MIPS fixes that were added some time ago.
I'll take a look.
Quoted 7 lines
Quoted 6 lines
Currently, I see only one way to solve this:
1. Patch the common filecpu/arm1136/mx31/interrupts.c, functioninterrupt_init(), so that the prescaler divides by 33. Alternatively, also make the divider a board specific define.
2. Patch all mx31 board config header files withCFG_HZ1000.
3. All mx31 boards have to be tested.
Quoted 5 lines
Quoted 1 line
Sounds like a plan.
What do you mean?
It's just a proposal and I like to read comments from others, especially those, who wrote this code.
Ok, let's fix it then. Unfortunately, I don't think I will have time for this _soon_, but I definitely will try to convret all i.MX31 platforms to CFG_HZ == 1000 ASAP. Jean-Christophe, what would you prefer, first accept patches as they are (i.e., with CFG_HZ ~= 1000) and then fix all i.MX31 platforms or first fix the existing boards and then commit an updated patch with CFG_HZ == 1000?
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
PATCH v2 4/10 TQMA31: add new board with i.MX31 processor
In reply to Wolfgang DenkQuoted 27 lines · Wolfgang Denk
Quoted 5 lines · In message <[email protected]> you wrote:
The TQMA31, as well as the mx32ads use the General Purpose Timer 1, which is feeded by a 32768 clock (possibly
imx31_litekitandimx31_phycorewith 32000 Hz? I don't know.). The prescale divider can only be an integer. 32768/1000 = non-integer.I think other architectures hav / had similar issues. See for example the MIPS fixes that were added some time ago.
Quoted 6 lines
Currently, I see only one way to solve this:
1. Patch the common filecpu/arm1136/mx31/interrupts.c, functioninterrupt_init(), so that the prescaler divides by 33. Alternatively, also make the divider a board specific define.
2. Patch all mx31 board config header files withCFG_HZ1000.
3. All mx31 boards have to be tested.Sounds like a plan.
Quoted 7 lines
And while we are at the timers:
The udelay function is the next problem:
udelay cannot go below 1/(32768 Hz) = 30.5 micros
The current function inserts a theoretical nop if the requested usec value is below 1000. Therefore, IMHO, this timer is relatively imprecise, because the resulting delay is below 1 microsecond. IMHO, this all because of that slow input clock.
Quoted 2 lines
How is this handled in Linux? I don't think they would let this go through?
Linux uses the high frequency timer, or better said, the same timer with a high frequency input source.
Regards,
Sascha
Signature · 4 lines
Pengutronix e.K. - Linux Solutions for Science and Industry ----------------------------------------------------------- Kontakt-Informationen finden Sie im Header dieser Mail oder auf der Webseite -> http://www.pengutronix.de/impressum/ <-
PATCH v2 4/10 TQMA31: add new board with i.MX31 processor
In reply to Jens GehrleinHi,
Quoted 6 lines · Jens Gehrlein
Quoted 5 lines · Wolfgang Denk
include/configs/TQMA31.h line 58
Quoted 2 lines · In message <[email protected]> you wrote:
include/configs/TQMA31.h new file +2
-0+/* Timer tick */ +#define CFG_HZ 32768
CFG_HZis a constant and has to be 1000.
Why is it a board specific define then?
Quoted 9 lines
I know, we had a discussion earlier about that issue (see "i.MX31:
question aboutCFG_HZand CKIL" of 7th May). The situation is as follows:The TQMA31, as well as the mx32ads use the General Purpose Timer 1, which is feeded by a 32768 clock (possibly
imx31_litekitandimx31_phycorewith 32000 Hz? I don't know.). The prescale divider can only be an integer. 32768/1000 = non-integer.
Quoted 4 lines
The counter is just read. There are no real interrupts (I mention it, because you wrote about this earlier).
The origin source code is from U-Boot V2, I suppose. Guennadi used it for the mx31ads.
Not quite correct, I wrote the original mx31 code for U-Boot V1 and then ported it to V2. I think Guennadis work is based on the V1 work.
Quoted 8 lines
Currently, I see only one way to solve this:
1. Patch the common filecpu/arm1136/mx31/interrupts.c, functioninterrupt_init(), so that the prescaler divides by 33. Alternatively, also make the divider a board specific define.
2. Patch all mx31 board config header files withCFG_HZ1000.
3. All mx31 boards have to be tested.
Quoted 5 lines
The following is impossible:
- changing the HW
- using an internal clock, because maximum is 1000 Hz * 4096 = 4096000 Hz (the maximum divider is 4096). All internal clocks are much higher. Please for correction if I'm wrong.
You could add a software divider in get_timer(). But I think it's better to define CFG_HZ to whatever the timer frequency is. At least 49 boards do it.
Regards
Sascha
Signature · 4 lines
Pengutronix e.K. - Linux Solutions for Science and Industry ----------------------------------------------------------- Kontakt-Informationen finden Sie im Header dieser Mail oder auf der Webseite -> http://www.pengutronix.de/impressum/ <-
PATCH v2 4/10 TQMA31: add new board with i.MX31 processor
Quoted 4 lines · In message <[email protected]> you wrote:
Quoted 2 lines
Quoted 2 lines
CFG_HZis a constant and has to be 1000.Why is it a board specific define then?
Historical reasons only. When PPCBoot was created, I played with that parameter to get a feeling for the involved overhead, etc. This should really be removed, but as you know too many boards depend on this.
Quoted 3 lines
You could add a software divider in
get_timer(). But I think it's better to defineCFG_HZto whatever the timer frequency is. At least 49 boards do it.
That's what I mean: many boards need fixing.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A man either lives life as it happens to him, meets it head-on and
licks it, or he turns his back on it and starts to wither away.
-- Dr. Boyce, "The Menagerie" ("The Cage"), stardate unknownPATCH v2 4/10 TQMA31: add new board with i.MX31 processor
Quoted 11 lines · Wolfgang Denk
Quoted 4 lines · In message <[email protected]> you wrote:
Quoted 2 lines
Quoted 2 lines
CFG_HZis a constant and has to be 1000.Why is it a board specific define then?
Historical reasons only. When PPCBoot was created, I played with that parameter to get a feeling for the involved overhead, etc. This should really be removed, but as you know too many boards depend on this.
Quoted 5 lines
Quoted 3 lines
You could add a software divider in
get_timer(). But I think it's better to defineCFG_HZto whatever the timer frequency is. At least 49 boards do it.That's what I mean: many boards need fixing.
How about using the Linux clocksource framework for U-Boot? I did this for V2 and it works like a charm. The timer implementation is straight forward. You only have to setup a free running timer and return its value, so there's not much to do wrong when implementing new timers. Currently U-Boot has many timing functions like get_timer, get_timer_masked, reset_timer, reset_timer_masked, udelay and I suppose most people do not understand the meaning of those functions, as the differing implementations show.
Not that I volunteer to do this job though :(
Regards,
Sascha
Signature · 4 lines
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Hannoversche Str. 2, 31134 Hildesheim, Germany
Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9PATCH v2 4/10 TQMA31: add new board with i.MX31 processor
Quoted 2 lines · In message <[email protected]> you wrote:
How about using the Linux clocksource framework for U-Boot? I did this
I have to admit that I don't know how big that code is?
Quoted 4 lines
Currently U-Boot has many timing functions like
get_timer,get_timer_masked,reset_timer,reset_timer_masked, udelay and I suppose most people do not understand the meaning of those functions, as the differing implementations show.
I have to admit that I don't have a clue why get_timer_masked orreset_timer_masked would be needed. Originally (see the PPC
implementation), there was only get_timer, reset_timer, and udelay (and IIRC reset_timer was not even necessary).
Quoted 1 line
Not that I volunteer to do this job though :(
What a pity :-)
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Ever try. Ever fail. No matter. Try again. Fail again. Fail better.
-- S. BeckettPATCH v2 4/10 TQMA31: add new board with i.MX31 processor
Quoted 5 lines · Wolfgang Denk
Quoted 2 lines · In message <[email protected]> you wrote:
How about using the Linux clocksource framework for U-Boot? I did this
I have to admit that I don't know how big that code is?
Somewhere next to nothing:
/*
* clock.c - generic clocksource implementation
*
* This file contains the clocksource implementation from the Linux
* kernel originally by John Stultz
*
* Copyright (C) 2004, 2005 IBM, John Stultz (johnstul at us.ibm.com)
* Copyright (c) 2007 Sascha Hauer <[email protected]>, Pengutronix *
* See file CREDITS for list of people who contributed to this
* project.
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <common.h>
#include <asm-generic/div64.h>
#include <clock.h>
static struct clocksource *current_clock;
static uint64_t time_ns;
/**
* get_time_ns - get current timestamp in nanoseconds */uint64_t get_time_ns(void)
{
struct clocksource *cs = current_clock;
uint64_t cycle_now, cycle_delta;
uint64_t ns_offset;
/* read clocksource: */
cycle_now = cs->read();
/* calculate the delta since the last call: */
cycle_delta = (cycle_now - cs->cycle_last) & cs->mask;
/* convert to nanoseconds: */
ns_offset = cyc2ns(cs, cycle_delta);
cs->cycle_last = cycle_now;
time_ns += ns_offset;
return time_ns;
}EXPORT_SYMBOL(get_time_ns);
/**
* clocksource_hz2mult - calculates mult from hz and shift
* @hz: Clocksource frequency in Hz
* @shift_constant: Clocksource shift factor
*
* Helper functions that converts a hz counter
* frequency to a timsource multiplier, given the
* clocksource shift value
*/uint32_t clocksource_hz2mult(uint32_t hz, uint32_t shift_constant)
{
/* hz = cyc/(Billion ns)
* mult/2^shift = ns/cyc
* mult = ns/cyc * 2^shift
* mult = 1Billion/hz * 2^shift
* mult = 1000000000 * 2^shift / hz
* mult = (1000000000<<shift) / hz
*/
uint64_t tmp = ((uint64_t)1000000000) << shift_constant;
tmp += hz/2; /* round for do_div */
do_div(tmp, hz);
return (uint32_t)tmp;
}int is_timeout(uint64_t start_ns, uint64_t time_offset_ns) {
if (start_ns + time_offset_ns < get_time_ns()) return 1; else return 0; }
EXPORT_SYMBOL(is_timeout);
void udelay(unsigned long usecs)
{
uint64_t start = get_time_ns();
while(!is_timeout(start, usecs * 1000));
}EXPORT_SYMBOL(udelay);
void mdelay(unsigned long msecs)
{
uint64_t start = get_time_ns();
while(!is_timeout(start, msecs * 1000000));
}EXPORT_SYMBOL(mdelay);
int init_clock(struct clocksource *cs)
{
current_clock = cs;
return 0;
}The clocksource driver itself adds another 100 lines of code (for mx31). The implementation of udelay shows how to implement timeouts, the main usage of timing functions.
Regards,
Sascha
Signature · 5 lines
--
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Hannoversche Str. 2, 31134 Hildesheim, Germany
Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9PATCH v2 4/10 TQMA31: add new board with i.MX31 processor
In reply to Jens Gehrleinboard/tqc/tqma31/Makefile line 3
Quoted 9 lines · Jens Gehrlein
board/tqc/tqma31/Makefile new file +3
-0@@ -0,0 +1,48 @@ +# +# Copyright (C) 2008, Guennadi Liakhovetski <[email protected]> +# Copyright (C) 2008, Jens Gehrlein <[email protected]>
Thanks for the credit, but, although IANAL, I think, one does not _have_ to preserve the copyright of the original file when it gets copied to a new one. Otherwise most open-source files would have a veeeery long list of Copyrights:-) Am I right?
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
PATCH v2 4/10 TQMA31: add new board with i.MX31 processor
Quoted 6 lines · In message <[email protected]> you wrote:
board/tqc/tqma31/Makefile line 3
Quoted 3 lines
board/tqc/tqma31/Makefile new file +2
-0+# Copyright (C) 2008, Guennadi Liakhovetski <[email protected]> +# Copyright (C) 2008, Jens Gehrlein <[email protected]>Thanks for the credit, but, although IANAL, I think, one does not _have_ to preserve the copyright of the original file when it gets copied to a
Yes, of course you do. If you copy code, you *must* honour existing copyrights and have not any right to remove these.
Quoted 2 lines
new one. Otherwise most open-source files would have a veeeery long list of Copyrights:-) Am I right?
No, you are fundamentally wrong.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Brain off-line, please wait.
PATCH v2 4/10 TQMA31: add new board with i.MX31 processor
Quoted 10 lines · Wolfgang Denk
Quoted 6 lines · In message <[email protected]> you wrote:
board/tqc/tqma31/Makefile line 3
Quoted 3 lines
board/tqc/tqma31/Makefile new file +2
-0+# Copyright (C) 2008, Guennadi Liakhovetski <[email protected]> +# Copyright (C) 2008, Jens Gehrlein <[email protected]>Thanks for the credit, but, although IANAL, I think, one does not _have_ to preserve the copyright of the original file when it gets copied to a
Yes, of course you do. If you copy code, you *must* honour existing copyrights and have not any right to remove these.
hm, starting from how many lines of code? Copy-paste is one of the main programming technics, as we all know:-) If you copy one line, you don't have to transfer all copyrights over, do you?
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
PATCH v2 4/10 TQMA31: add new board with i.MX31 processor
Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 3 lines
Yes, of course you do. If you copy code, you *must* honour existing copyrights and have not any right to remove these.
hm, starting from how many lines of code? Copy-paste is one of the main programming technics, as we all know:-) If you copy one line, you don't have to transfer all copyrights over, do you?
I don't know of any "official" rules, but anything above the 5...10 lines limit should be properly attributed.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de A morsel of genuine history is a thing so rare as to be always valuable. - Thomas Jefferson
PATCH v2 4/10 TQMA31: add new board with i.MX31 processor
In reply to Guennadi LiakhovetskiHi Guennadi,
Quoted 16 lines · Guennadi Liakhovetski
board/tqc/tqma31/Makefile line 3
Quoted 9 lines · Jens Gehrlein
board/tqc/tqma31/Makefile new file +3
-0@@ -0,0 +1,48 @@ +# +# Copyright (C) 2008, Guennadi Liakhovetski <[email protected]> +# Copyright (C) 2008, Jens Gehrlein <[email protected]>Thanks for the credit, but, although IANAL, I think, one does not _have_ to preserve the copyright of the original file when it gets copied to a new one. Otherwise most open-source files would have a veeeery long list of Copyrights:-) Am I right?
I didn't quite understand. So what should I remove:
- your name?
- my name?
- all?
- in all files (much work)?
Thanks.
Neither I'm a lawyer. I just had a look to other source files, were it's done similar.
Kind regards,
Jens
PATCH v2 4/10 TQMA31: add new board with i.MX31 processor
Quoted 2 lines · In message <[email protected]> you wrote:
I didn't quite understand. So what should I remove:
Nothing shall be removed. Guennadi was wrong.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Is truth not truth for all? -- Natira, "For the World is Hollow and I have Touched the Sky", stardate 5476.4.
PATCH v2 4/10 TQMA31: add new board with i.MX31 processor
In reply to Guennadi LiakhovetskiQuoted 17 lines · Guennadi Liakhovetski
board/tqc/tqma31/Makefile line 3
Quoted 9 lines · Jens Gehrlein
board/tqc/tqma31/Makefile new file +3
-0@@ -0,0 +1,48 @@ +# +# Copyright (C) 2008, Guennadi Liakhovetski <[email protected]> +# Copyright (C) 2008, Jens Gehrlein <[email protected]>Thanks for the credit, but, although IANAL, I think, one does not _have_ to preserve the copyright of the original file when it gets copied to a new one. Otherwise most open-source files would have a veeeery long list of Copyrights:-) Am I right?
Quoted 2 lines
Thanks
Guennadi
IANAL, but I play one on Groklaw sometimes, much to PJ's chagrin. ;-)
This is a squishy area. It is dependent on what of the original work survives the modification and whether the surviving pieces are copyrightable. It also depends on what country you are contemplating suing in.
<http://en.wikipedia.org/wiki/Limitations_and_exceptions_to_copyright>
Things that must be done in certain ways are not copyrightable, so Makefiles are pretty marginal to start with IMHO.
<http://en.wikipedia.org/wiki/Threshold_of_originality>
My opinion is to leave the original copyright notice in there and err on the side of preserving reasonable copyright notices. The lawyers will be happy to tell us that we did it wrong if it ever came to a lawsuit, and I would prefer that they tell us that we had a useless copyright notice in the file rather than tell us that we should have had a notice but didn't...
Best regards,
gvb