Stefan, On 05/17/2011 09:41 AM, Stefan Roese wrote: > What changes did you have to make? Some 8/16 bit related changes? Or > something > else?
I changed the hard coded value of EBC0_CFG; I forced the chip->options field to have the 16 bit bus width flag set; in board_nand_select_device() I modified the value written to the NDFC_CCR register; I think that's primarily it. The hard coded registers could be made into CONFIG_SYS defines I think, but the bus width setting... Could we make a CONFIG_SYS define that specifies the width of the bus since during the spl we don't have access to the nand chip table? > It should be the goal, to use *only* the common NDFC code. If you have found > some bugs, or you need some changes for 16bit devices, we should try to > integrate them into the common code. I have seen issues with the nand_read_byte16() function in nand_base.c; it seems like the cpu_to_le16() should be the other way around: le16_to_cpu(). Other than that no bugs as far as I am aware. > One idea behind the static declarations is to not pollute the namespace. Ahh, understood. >> Likewise much of our board specific support files are copies from the >> sequoia code. Would it be better to symlink to the ones that are not >> modified? Or is it OK to just copy the relevant source files into our own >> board directory and make minor adjustments as needed? > Usually we copy those files into a new board directly. When the similarities > are too big, then we should probably think about splitting to common parts > into some other directory (arch/powerpc/cpu/ppc4xx/ppc440epx.c ???). OK, I see. Most of the code in board/amcc/sequoia is the same except for some of the sdram initialization and the sequoia.c file (which I renamed to tiger.c). Also the linker script differs slightly. How would we go about making those board files common (init.S, chip_config.c)? Regards, Alex -- Alex Waterman Computer Engineer Phone: 215-896-4920 Email: awater...@dawning.com _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot