[U-Boot-Users] RE: [uClinux-dev] New u-boot patch for Coldfire 5272/5282

Hello all,
I'm working on porting u-boot for the Arrow M5282ARB eval board. I'm starting from the M5282EVB board, and have identified the that I need to change the flach.c file and obviously the m5282evb.c file, But what other parts of the code do I need to touch to configure it to the new board?
Thanks for all the help so far.
Stuart Wood
-----Original Message----- From: uclinux-dev-bounces@uclinux.org [mailto:uclinux-dev-bounces@uclinux.org]On Behalf Of Bernhard Kuhn Sent: Tuesday, December 30, 2003 10:40 AM To: Wolfgang Denk Cc: u-boot-users@lists.sourceforge.net; uClinux development list Subject: [uClinux-dev] New u-boot patch for Coldfire 5272/5282
Hi Wolfgang, hi u-boot and uclinux list members,
during the hollydays, i took myself some time to do most of the cleanups necessary for the u-boot coldfire port to be added to the CVS tree. I think that the attached patch now technically complies, but there are still the copyright issues for the following files:
include/asm-m68k/m5282.h include/asm-m68k/mcfuart.h include/asm-m68k/mcftimer.h include/asm-m68k/fec.h
BTW.: as fec.h derived from 8xx_immap.h and that file doesn't provide a GPL or other open source header, we may have a new copyright issue with that file as well (include/asm-ppc/8xx_immap.h).
For details on the patch, please have a look at my comments for each of your comments. below. The patch is against the u-boot CVS tree dated 27th of December (u-boot 1.0.1).
I successfully tested the bootloader with an M5272C3. As i don't have a M5272EVB on hand, i don't know if that one will work, but at least it compiles.
doc/README.coldfire is not yet updated for seperated pre-loader and bdm utilites. Neither i have set up a download facility for these seperate packages. I will send the pre-loaders and the BDM related files in seperate mails, so that they are at least available to the public.
best regards
Bernhard
Wolfgang Denk wrote:
- "include/asm-m68k/8xx_immap.h" does not make any sense to me - why do you copy a MPC8xx specific file to the "include/asm-m68k/" header tree? Omitted.
File renamed to "fec.h". Deleted non-fec related definitions, structures and prototypes.
- "include/asm-m68k/arch-coldfire/dummy.h" is effectively an empty file which is nowhere referenced. Omitted.
File deleted.
- "include/asm-m68k/bitops.h" reads: "Bit string operations on the ppc" -- on the PPC??? Actually the file does contain PowerPC assembler instructions which will never work on M68K. Omitted.
Cleanup done.
- "include/asm-m68k/byteorder.h" contains more PowerPC assembler instructions which will never work on M68K. Omitted.
Cleanup done.
- "include/asm-m68k/cache.h" is another verbatim copy of a PowerPC file which makes no sense for M68K. Omitted.
File deleted.
- "include/asm-m68k/io.h" is effectively an empty file - please verify that this is OK!
File ok.
- "include/asm-m68k/m5272.h" and "include/asm-m68k/m5282.h" contain this: (C) Copyright 2001, Key Technology (http://www.keyww.com) To become part of U-Boot these files must be available under GPL. If you can guarantee that we may use these files under GPL please fix the file headers.
Open issue.
- "include/asm-m68k/mcftimer.h" and "include/asm-m68k/mcfuart.h" contain this: (C) Copyright 1999-2002, Greg Ungerer (gerg@snapgear.com) (C) Copyright 2000, Lineo Inc. (www.lineo.com) To become part of U-Boot these files must be available under GPL. If you can guarantee that we may use these files under GPL please fix the file headers.
Open issue.
- "include/asm-m68k/mmu.h" contains (as a comment says): "PowerPC memory management structures" which makes no sense for M68K. Omitted.
File deleted.
- "include/asm-m68k/processor.h" is a PowerPC file which makes no sense for M68K. Omitted.
Several files such as cmd_scsi.c, lynxkdi.c, usb.c and usb_storage.c do like to include this file, so we just provide an empty one.
- "include/configs/M5272C3.h" and "include/configs/M5282EVB.h" contain neither a copyright notice nor a GPL header. Pleae fix.
Added GPL header and copyright notice.
- "lib_m68k/cache.c" is effectively an empty file. Omitted.
At least flush_cache() needs to be implemented for cmd_net.c.
- "lib_m68k/config.mk" defines "-D__linux__ -D__uClinux__", but both is most probably wrong for U-Boot. Omitted.
The bootloader compiles and runs ok without these definitions.
- "lib_m68k/ctype.c" contains the same cose as already present in "lib_generic/ctype.c". Omitted.
The generic file is used, now.
- "lib_m68k/kgdb.c" is a PowerPC file which makes no sense for M68K. Omitted.
File deleted, Makefile adopted accordingly.
- "lib_m68k/ldiv.c" contains the same cose as already present in "lib_generic/ldiv.c". Omitted.
The generic file is now used in Makefile.
- "lib_m68k/Makefile" needs major cleanup (see above). Omitted.
Fixed.
- "lib_m68k/ticks.S" is a PowerPC file which makes no sense for M68K. Omitted.
File deleted, Makefile adopted accordingly.
- "lib_m68k/time.c" contains a dummy implementation of init_timebase() [which probably makes no sense on M68K at all] - please verify that this is OK!
Ok, so far.
- All files in the "utils/coldfire/M5272C3/bdm/" directory are either missing a copyright notice and a GPL header, or they contain
proprietary
copyright notices. Omitted.
Files deleted - will be provided in seperate package.
- "cpu/coldfire/cpu_init.c" contains verbatim copy of a MPC8xx specific file which makes no sense for M68K. Omitted.
Fixed: only cpu_init_r() is implemented, but be deleted by removing the call in lib_m68k/board.cm line 364.
- "cpu/coldfire/fec.h" is effectively an empty file - please verify that this is OK!
File deleted.
- "cpu/coldfire/interrupts.c" fails to implement irq_install_handler() / irq_free_handler() / enable_interrupts() and disable_interrupts() [and probably more] functions - please verify that this is OK!
The current implementation of u-boot for coldfire is not using any interrupts. Status registers are polled.
- "cpu/coldfire/kgdb.S" is a verbatim copy of a MPC8xx specific file which makes no sense for M68K. Omitted.
File deleted
- "cpu/coldfire/kgdb.c" is broken / missing. Omitted.
File deleted
- "cpu/coldfire/speed.c" contains only dummy definitions for critical functions get_gclk_freq() and get_bus_freq() - please verify that this is OK!
To my knowladge, for the EVBs, these frequencies can only be altered by changing the crystals, so it's probably ok to not taking care about core and bus frequency for now.
participants (1)
-
Wood Stuart (ST-IN/ENG1)