diff --git a/CHANGELOG b/CHANGELOG index ccebd4ef58ee2c41907773eca7245a9e611da473..b880a3cab750d229910fc7272f058e7508bc38e8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,3716 @@ +commit 8915f1189c1d29d8be7f4de325702d90a8988219 +Author: Paul Gortmaker +Date: Wed Jul 9 17:50:45 2008 -0400 + + e1000: add support for 82545GM 64bit PCI-X copper variant + + This PCI-X e1000 variant works by just adding in the correct + PCI IDs in the appropriate places. + + Signed-off-by: Paul Gortmaker + +commit 21ae6ca0315afdbc65dc3e95ffd5763e6773d030 +Author: Daniel Hellstrom +Date: Wed Jul 9 12:34:11 2008 +0000 + + SPARC: Build error fix + + (introduced by commit 391fd93ab23e15ab3dd58a54f5b609024009c378) + + This patch makes SPARC targets build again. It is caused by + phys_addr_t and phys_size_t being defined in the wrong header + file. include/lmb.h need those typedefs to build. + + Signed-off-by: Daniel Hellstrom + +commit 11ccc33fa21acce108f6b4a6936e3271af904c64 +Author: Marcel Ziswiler +Date: Wed Jul 9 08:17:15 2008 +0200 + + Many spelling fixes in README. + + Signed-off-by: Marcel Ziswiler + +commit dbab0691d2533560f7e91b92ae844046a9ad1df3 +Author: Marcel Ziswiler +Date: Wed Jul 9 08:17:06 2008 +0200 + + Minor spelling fix in comment. + + Signed-off-by: Marcel Ziswiler + +commit 89134ea1f67208fd3160bdbb0b9eaab4eab98484 +Author: Hugo Villeneuve +Date: Tue Jul 8 14:54:58 2008 -0400 + + Round the serial port clock divisor value returned by calc_divisor() + + Round the serial port clock divisor value returned by + calc_divisor(). + + Signed-off-by: Hugo Villeneuve + Signed-off-by: John Roberts + +commit 9d2e3947b2944e5bb85b4335533f8c93c58445fe +Author: Scott Wood +Date: Wed Jul 9 17:47:52 2008 -0500 + + NAND: ifdef-protect most of nand.h when using legacy NAND. + + Some macros such as NAND_CTL_SETALE conflict between current and legacy + NAND, being defined by the subsystem in the former case and the board + config file in the latter. + + Signed-off-by: Scott Wood + +commit 2b1fa9d383cbbb7d347c1583bd6ca4e181ba8e9e +Author: Hugo Villeneuve +Date: Tue Jul 8 11:02:05 2008 -0400 + + ARM: Fix for wrong patch version applied for Lyrtech SFF-SDR board (ARM926EJS) + + ARM: Fix for incorrect version of patch applied when + adding support for the Lyrtech SFF-SDR board. + + Signed-off-by: Hugo Villeneuve + Signed-off-by: Philip Balister, OpenSDR + +commit 47042b363ee5022b8180c65d3f4558e7972c79cd +Author: Kyungmin Park +Date: Tue Jul 8 09:08:40 2008 +0900 + + Remove useless print message at apollon + + Remove useless print message at apollon + + Signed-off-by: Kyungmin Park + +commit 98874ff329d4a5b32c467b43f6e966e1aa68479f +Author: Andy Fleming +Date: Mon Jul 7 14:24:39 2008 -0500 + + Fix LMB type issues + + The LMB code now uses phys_addr_t and phys_size_t. Also, there were a couple + of casting problems in the bootm code that called the LMB functions. + + Signed-off-by: Andy Fleming + +commit da8693a91b8eef75ade8de50a1b2ce035bc5fb54 +Author: Kumar Gala +Date: Mon Jul 7 09:39:06 2008 -0500 + + Fix compiler warnings + + gcc-4.3.x generates the following: + + bootm.c: In function 'do_bootm_linux': + bootm.c:208: warning: cast from pointer to integer of different size + bootm.c:215: warning: cast from pointer to integer of different size + + Signed-off-by: Kumar Gala + +commit 5bb12dbd7ae03189b6c13d8737b5a1b37c3df698 +Author: Harald Welte +Date: Mon Jul 7 15:40:39 2008 +0800 + + Remove code duplication for setting the default environment + + common/env_common.c (default_env): new function that resets the environment to + the default value + common/env_common.c (env_relocate): use default_env instead of own copy + common/env_nand.c (env_relocate_spec): use default_env instead of own copy + include/environment.h: added default_env prototype + + Signed-off-by: Werner Almesberger + Signed-off-by: Harald Welte + +commit 99c2b434d37863df5dda5207a53760c6506fc2be +Author: Marcel Ziswiler +Date: Sun Jun 22 16:13:46 2008 +0200 + + NAND: Fix warning due to missing env_ptr casts to u_char * in env_nand.c. + + The writeenv() and readenv() calls introduced by the recently added bad block + management for environment variables were missing casts therefore producing + compile time warnings. + While at it fixing some typo in a comment and indentation. + + Signed-off-by: Marcel Ziswiler + Signed-off-by: Scott Wood + +commit 3167c5386ea1c98b638be5d8763ef6d5938ef1bd +Author: Scott Wood +Date: Fri Jun 20 12:38:57 2008 -0500 + + NAND: Rename DEBUG to MTDDEBUG to avoid namespace pollution. + + This is particularly problematic now that non-NAND-specific code is + including , and thus all debugging code is being compiled + regardless of whether it was requested, as reported by Scott McNutt + . + + Signed-off-by: Scott Wood + +commit c3bf1ad7baa1b0dd989dedc260b7098b6089ae05 +Author: Haavard Skinnemoen +Date: Thu Jun 12 19:27:58 2008 +0200 + + mmc: Move atmel_mci driver into drivers/mmc + + This makes it easier to use the driver on other platforms. + + Signed-off-by: Haavard Skinnemoen + Acked-by: Jean-Chritophe PLAGNIOL-VILLARD + +commit d2d54ea449639f3d1a6007e333ab9fcc609a18f0 +Author: Haavard Skinnemoen +Date: Thu Jun 12 19:27:57 2008 +0200 + + avr32: Use CONFIG_ATMEL_MCI to select the atmel_mci driver + + After we move the atmel_mci driver into drivers/mmc, we can't select + it with CONFIG_MMC anymore. Introduce a new symbol specifically for + this driver so that there's no ambiguity. + + Signed-off-by: Haavard Skinnemoen + Acked-by: Jean-Chritophe PLAGNIOL-VILLARD + +commit 5ce13051a48c62bda9723df3b4778c492fb47f36 +Author: Haavard Skinnemoen +Date: Thu Jun 12 19:27:56 2008 +0200 + + Create drivers/mmc subdirectory + + In order to consolidate more of the various MMC drivers around the + tree, we must first have a common place to put them. + + Signed-off-by: Haavard Skinnemoen + Acked-by: Jean-Chritophe PLAGNIOL-VILLARD + +commit b502611b51f02718c2d1117d4981dabceb5af6de +Author: Joakim Tjernlund +Date: Sun Jul 6 12:30:09 2008 +0200 + + Change env_get_char from a global function ptr to a function + + This avoids an early global data reference. + + Signed-off-by: Joakim Tjernlund + +commit 27269417ade432189b234d9fbac98b54e37b978c +Author: Matvejchikov Ilya +Date: Sun Jul 6 13:57:58 2008 +0400 + + Some copy-n-paste fixes in printf usage + + Signed-off-by: Matvejchikov Ilya + +commit 0e6989b9faf1588e8723535539e88a0df3c71356 +Author: Matvejchikov Ilya +Date: Sun Jul 6 13:57:00 2008 +0400 + + FDT memory and pci node fixes for MPC8260ADS + + Signed-off-by: Matvejchikov Ilya + +commit dc4b0b38d4aadf08826f6c31270f1eecd27964fd +Author: Andrew Klossner +Date: Mon Jul 7 06:41:14 2008 -0700 + + Fix printf errors. + + The compiler will help find mismatches between printf formats and + arguments if you let it. This patch adds the necessary attributes to + declarations in include/common.h, then begins to correct the resulting + compiler warnings. Some of these were bugs, e.g., "$d" instead of + "%d" and incorrect arguments. Others were just annoying, like + int-long mismatches on a system where both are 32 bits. It's worth + fixing the annoying errors to catch the real ones. + + Signed-off-by: Andrew Klossner + +commit 417faf285b2527acb2de24c5cd3e2621d385408c +Author: Becky Bruce +Date: Wed Jul 9 11:09:41 2008 -0500 + + Allow print_size to print in GB + + Signed-off-by: Becky Bruce + +commit e7c374529c87525c9aa463e0557c287887ae4e9e +Author: Jason McMullan +Date: Sun Jun 8 23:56:00 2008 -0400 + + mips: When booting Linux images, add 'ethaddr' and 'eth1addr' to the environment + + Add 'ethaddr' and 'eth1addr' to the Linux kernel environment if + they are set in the U-Boot environment. + + Signed-off-by: Jason McMullan + Signed-off-by: Shinya Kuribayashi + +commit 0192d7d56e9320819dea262f49789ae18fdd2c72 +Author: Stefan Roese +Date: Tue Jul 8 12:57:14 2008 +0200 + + jedec_flash: Fix AM29DL800BB device ID + + As pointed out by Jerry Hicks, this patch corrects the device ID of + the Spansion AM29DL800BB NOR device. Verified against latest Spansion + datasheet (rev C4 from Dezember 2006). + + Signed-off-by: Stefan Roese + +commit 689c1b30caacba3fbca0b1813facb3ab70b6cd63 +Author: Nobuhiro Iwamatsu +Date: Mon Jul 7 11:22:37 2008 +0900 + + sh: Fix compile error sh7763rdp board + + Disable SH ether driver. + + Signed-off-by: Nobuhiro Iwamatsu + +commit 9e23fe0560b84e324dc5f0ff8813dab2aa34f074 +Author: Nobuhiro Iwamatsu +Date: Tue Jul 8 12:03:24 2008 +0900 + + sh: Fix SH-boards compile error + + By Cleanup out-or-tree building for some boards (.depend) + (commit:c8a3b109f07f02342d097b30908965f7261d9f15) + because filse ware changed, some SH-boards have compile error. + I revised this problem. + + Signed-off-by: Nobuhiro Iwamatsu + +commit 63676841ca2d603b13765f3f7b72ff1a61c23f90 +Author: Hugo Villeneuve +Date: Wed Jun 18 12:10:33 2008 -0400 + + Remove duplicate code in cpu/arm926ejs/davinci/lxt972.c. + + Remove duplicate code in cpu/arm926ejs/davinci/lxt972.c. + + Remove duplicate code in a if/else block in + cpu/arm926ejs/davinci/lxt972.c. + Fixed style issues. + + Signed-off-by: Hugo Villeneuve + Signed-off-by: Ben Warren + +commit fec61431a003f5778bafa2624073a571af8bec9f +Author: Hugo Villeneuve +Date: Wed Jun 18 12:10:31 2008 -0400 + + Remove duplicate definitions in include/lxt971a.h. + + Remove duplicate definitions in include/lxt971a.h. + + Remove duplicate registers and bits definitions in + include/lxt971a.h for standard MII registers, and + use values in include/miiphy.h instead. + + Signed-off-by: Hugo Villeneuve + Signed-off-by: Ben Warren + +commit 9751ee0990f467941da0b095a4e995f863672d7a +Author: Nobuhiro Iwamatsu +Date: Wed Jun 11 21:05:00 2008 +0900 + + net: sh: Renesas SH7763 Ethernet device support + + Renesas SH7763 has 2 channel Ethernet device. + This is 10/100/1000 Base support. + But this patch check 10/100 Base only. + + Signed-off-by: Nobuhiro Iwamatsu + Signed-off-by: Ben Warren + +commit 873d97aabc0b1c8822ed1d87e8c5c8ae0a7e4ae9 +Author: Nobuhiro Iwamatsu +Date: Tue Jun 17 16:28:05 2008 +0900 + + sh: Update Renesas R2DPlus board + + New NOR Flash board support and remove old type flash board config. + And Remove network setting from config file. + + Signed-off-by: Nobuhiro Iwamatsu + Signed-off-by: Nobuhiro Iwamatsu + +commit ec39d479d2003f15e86e23ebc4e02a1c9a3a181c +Author: Nobuhiro Iwamatsu +Date: Tue Jun 17 16:28:01 2008 +0900 + + sh: Update Renesas R7780MP board + + New NOR Flash board support and remove network setting from config file. + + Signed-off-by: Nobuhiro Iwamatsu + Signed-off-by: Nobuhiro Iwamatsu + +commit c001cd604e9f133743effbddb1c215b48e761c5a +Author: Nobuhiro Iwamatsu +Date: Tue Jun 17 16:27:56 2008 +0900 + + sh: Update Renesas Migo-R board + + Remove network setting from config file. + + Signed-off-by: Nobuhiro Iwamatsu + Signed-off-by: Nobuhiro Iwamatsu + +commit f9599eca7cb5ebe40e5305c8006dced6ecc5cd9e +Author: Nobuhiro Iwamatsu +Date: Tue Jun 17 16:27:52 2008 +0900 + + sh: Update Hitachi MS7722SE board + + Remove network setting from config file. + + Signed-off-by: Nobuhiro Iwamatsu + Signed-off-by: Nobuhiro Iwamatsu + +commit 26209e48e8791670c93108029a5c31a30016c6df +Author: Nobuhiro Iwamatsu +Date: Tue Jun 17 16:27:48 2008 +0900 + + sh: Cleanup source code of SH7763RDP + + Signed-off-by: Nobuhiro Iwamatsu + Signed-off-by: Nobuhiro Iwamatsu + +commit 5cd5b2c96ef0025762931349d350287aec03ab47 +Author: Nobuhiro Iwamatsu +Date: Tue Jun 17 16:27:44 2008 +0900 + + sh: Cleanup source code of R2DPlus + + Signed-off-by: Nobuhiro Iwamatsu + Signed-off-by: Nobuhiro Iwamatsu + +commit 4ec7e915cfaa31b392755dd2c8231e64736d2ea8 +Author: Nobuhiro Iwamatsu +Date: Tue Jun 17 16:27:41 2008 +0900 + + sh: Cleanup source code of R7780MP + + Signed-off-by: Nobuhiro Iwamatsu + Signed-off-by: Nobuhiro Iwamatsu + +commit 0955ef34c0454ae2ee59a78657a0f01fb3ef16d6 +Author: Nobuhiro Iwamatsu +Date: Tue Jun 17 16:27:38 2008 +0900 + + sh: Cleanup source code of MS7722SE + + Signed-off-by: Nobuhiro Iwamatsu + Signed-off-by: Nobuhiro Iwamatsu + +commit 1d7b31d97b34ccb6f9b20a2465864998b0bf2691 +Author: Nobuhiro Iwamatsu +Date: Tue Jun 17 16:27:34 2008 +0900 + + sh: Cleanup source code of MS7720SE + + Signed-off-by: Nobuhiro Iwamatsu + Signed-off-by: Nobuhiro Iwamatsu + +commit 3ab4827cbe409488ebea1a2ee5094783f2672214 +Author: Wolfgang Denk +Date: Mon Jul 7 00:45:03 2008 +0200 + + SH: fix out of tree building + + Signed-off-by: Wolfgang Denk + +commit 9047bfa1e737d787be460387dd6f45737eeceb10 +Author: Nobuhiro Iwamatsu +Date: Thu Jul 3 23:16:06 2008 +0900 + + net: smc911x: Fix typo + + Signed-off-by: Nobuhiro Iwamatsu + +commit 5ed546fdd0ca46a165661c2009fa743d9c9fceca +Author: Andre Schwarz +Date: Wed Jul 2 18:54:08 2008 +0200 + + update mvBL-M7 board config + + update mvBL-M7 config file to use UBOOT_VERSION and define + CONFIG_HIGH_BATS. + + Signed-off-by: Andre Schwarz + +commit 5cacc5d0ec52678a5eb83ecda5c3bcb22eb47f30 +Author: Nobuhiro Iwamatsu +Date: Mon Jun 30 17:45:01 2008 +0900 + + net: fix compile problem in smc911x driver. + + Signed-off-by: Nobuhiro Iwamatsu + Acked-by: Ben Warren + +commit 9fea65a6c469b1b474b27446feb58738baba2d31 +Author: Michal Simek +Date: Tue Jun 24 09:54:09 2008 +0200 + + ppc4xx: Rename CONFIG_XILINX_ML300 to CONFIG_XILINX_405 + + This change helps with better handling with others + Xilinx based platform. + + Signed-off-by: Michal Simek + Acked-by: Stefan Roese + +commit cbb6289569ae4fc6e2d676528e46ffcc72d743d0 +Author: Nobuhiro Iwamatsu +Date: Tue Jun 17 13:07:11 2008 +0900 + + net: ne2000: Move dev_addr variable from grobal to local. + + Signed-off-by: Nobuhiro Iwamatsu + Signed-off-by: Ben Warren + +commit dd7e5fa5f847188f78f62f2c52de6cb3def3ecdb +Author: Nobuhiro Iwamatsu +Date: Tue Jun 17 13:07:15 2008 +0900 + + net: ne2000: Fix compile error of NE2000 + + If enable DEBUG, can not compile ne2000 driver. + + Signed-off-by: Nobuhiro Iwamatsu + Signed-off-by: Ben Warren + +commit dd35479a50f6c7c31ea491c07c5200c6dfd06a24 +Author: Ben Warren +Date: Mon Jun 23 22:57:27 2008 -0700 + + Add mechanisms for CPU and board-specific Ethernet initialization + + This patch is the first step in cleaning up net/eth.c, by moving Ethernet + initialization to CPU or board-specific code. Initial implementation is + only on the Freescale TSEC controller, but others will be added soon. + + Signed-off-by: Ben Warren + +commit 7754f2be5d1835d263aad21b5a629526f3e680b0 +Author: Wolfgang Denk +Date: Sun Jul 6 01:21:46 2008 +0200 + + include/sha256.h: fix file permissions. + + Signed-off-by: Wolfgang Denk + +commit d3bcdf838e2991d58571308fa6e04ca335bc06e8 +Author: Patrice Vilchez +Date: Tue May 27 11:15:29 2008 +0200 + + [AT91SAM9] Fix NAND FLASH timings + + Fix NAND FLASH timings for at91sam9x evaluation kits. + + New timings are based on application note + "NAND Flash Support on AT91SAM9 Microcontrollers" available at + http://atmel.com/dyn/resources/prod_documents/doc6255.pdf + + Signed-off-by: Patrice Vilchez + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + Acked-by: Stelian Pop + +commit 19bd688484322fe62d1a66c8299da6ff9e967ff9 +Author: Stelian Pop +Date: Thu May 22 00:15:40 2008 +0200 + + Fix boot from NOR due to incorrect reset delay. + + AT91 RSTC registers are battery-backuped, so their values + are not reset across power cycles. One of those registers, + the AT91_RSTC_MR register, is being modified by U-Boot, in + the ethernet initialisation routine, to generate a 500ms + user reset. + + Unfortunately, this value is not being restored afterwards, + causing subsequent resets to also last for 500ms. + + This long reset sequence causes problems (at least) in the + boot sequence from NOR: by the time the CPU tries to load + a program from the NOR flash, the latter is still in reset + and not yet available. + + Additionaly, this patch fixes a bug in the original code which + caused the reset delay to last for 2s instead of 500ms. + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit f492dd636fbbae529e17533995bc6e5813c007f6 +Author: Wolfgang Denk +Date: Fri Jul 4 20:11:49 2008 +0200 + + Update CHANGELOG + + Signed-off-by: Wolfgang Denk + +commit 5e6e350fc489aa19402f1e79037dd8c0a4bbd73d +Author: Wolfgang Denk +Date: Fri Jul 4 20:07:35 2008 +0200 + + CCM/SCM boards: fix out of tree building + + Signed-off-by: Wolfgang Denk + +commit ab4c3a490df9a964711556d2a05b0c787db45fde +Author: Wolfgang Denk +Date: Thu Jul 3 23:22:27 2008 +0200 + + SCM board: fix build errors. + + Signed-off-by: Wolfgang Denk + +commit a566466f17ba0e2d2b6c250e77da678fb932470d +Author: Wolfgang Denk +Date: Thu Jul 3 23:06:36 2008 +0200 + + IAD210 board: fix ``"ALIGN" redefined'' warning. + + Signed-off-by: Wolfgang Denk + +commit ad756314797c16fa5dca23e115aab881011f164f +Author: Wolfgang Denk +Date: Thu Jul 3 23:00:24 2008 +0200 + + CCM board: fix build errors. + + Signed-off-by: Wolfgang Denk + +commit f16ed51702cb9fb6fa2e019bbc0fcd1466b57c3b +Author: Andre Schwarz +Date: Wed Jul 2 18:54:08 2008 +0200 + + update mvBL-M7 board config + + update mvBL-M7 config file to use UBOOT_VERSION. + + Signed-off-by: Andre Schwarz + Signed-off-by: Kim Phillips + +commit ced209c50e80c25f13c083099b05044048d21f4f +Author: Wolfgang Denk +Date: Thu Jul 3 22:39:21 2008 +0200 + + sacsng board: fix warnings "suggest explicit braces to avoid ambiguous 'else'" + + Signed-off-by: Wolfgang Denk + +commit 4ff170a8180a79da4cdaab1b30d58cd7b6be565e +Author: Wolfgang Denk +Date: Thu Jul 3 22:34:08 2008 +0200 + + Cleanup: fix "expected specifier-qualifier-list before 'phys_size_t'" errors + + Signed-off-by: Wolfgang Denk + +commit 730f298485984b011b6ee8f4acb511cb45a843dd +Author: Wolfgang Denk +Date: Thu Jul 3 22:04:17 2008 +0200 + + lmb: fix "implicit declaration of function 'lmb_free'" warning + + Signed-off-by: Wolfgang Denk + +commit 322ef5e28d2dc62571afc699b00add22a8e006e4 +Author: Wolfgang Denk +Date: Wed Jul 2 23:53:23 2008 +0200 + + Cleanup: remove redundant deleting on *~ files + + Signed-off-by: Wolfgang Denk + +commit c8a3b109f07f02342d097b30908965f7261d9f15 +Author: Wolfgang Denk +Date: Wed Jul 2 23:49:18 2008 +0200 + + Cleanup out-or-tree building for some boards (.depend) + + Signed-off-by: Wolfgang Denk + +commit a30cc5a340e7f8f5f85a0e08e7f6c4106ce117c4 +Author: Wolfgang Denk +Date: Wed Jul 2 23:38:50 2008 +0200 + + Cleanup: fix out-of-tree building for some boards + + Signed-off-by: Wolfgang Denk + +commit 461fa68d20861811487944d22291db5a13410e20 +Author: Wolfgang Denk +Date: Wed Jul 2 23:00:14 2008 +0200 + + Cleanup: replace hard-wired $(AR) 'crv' settings by $(ARFLAGS) + + Signed-off-by: Wolfgang Denk + +commit 5981ebd32017e062b08aa6747cf591276f2db779 +Author: Detlev Zundel +Date: Fri Jun 20 22:26:24 2008 +0200 + + fdt: Fix typo in variable name. + + Signed-off-by: Detlev Zundel + +commit a7a5982cd0f3482f88225af4da7795bc4f6cb9bc +Author: Gary Jennejohn +Date: Thu Jun 19 11:11:19 2008 +0200 + + Add logos for RRvision board + + Signed-off-by: Gary Jennejohn + +commit ee4ae38342142237ca85913f88ee570c1eb5ca7c +Author: Esben Haabendal +Date: Wed Jun 18 11:03:57 2008 +0200 + + mpc8260: add fdt_fixup_ethernet support + + Add support for updating mac-address and local-mac-address in fdt for + all MPC8260 targets. + + Signed-off-by: Esben Haabendal + +commit f6a69559d64498a04e1e0b087a9b920e5775f866 +Author: Steven A. Falco +Date: Thu Jun 12 13:24:42 2008 -0400 + + cmd_nvedit.c: clean up syntax highlighting + + My text-editor (vim) has a bit of trouble syntax-highlighting the + cmd_nvedit.c file, because it apparently does not parse C + ifdef/else/endif. The following patch does not change the behavior of + the code at all, but does allow the editor to properly + syntax-highlight the file. + + Signed-off-by: Steve Falco + +commit 75678c807a6272ecc5541eb32898c93887f08400 +Author: Steven A. Falco +Date: Thu Jun 12 13:22:12 2008 -0400 + + Make setenv() return status + + Currently, the setenv function does not return an error code. + This patch allows to test for errors. + + Signed-off-by: Steve Falco + +commit 4928e97c8531283ca9b368b7c29a8a12e726562a +Author: Kumar Gala +Date: Wed Jun 11 10:14:06 2008 -0500 + + PPC: Added fls, fls64, __ilog2_u64, and ffs64 to bitops + + fls64, __ilog2_u64, ffs64 are variants that work on an u64, + and fls is used to implement them. + + Signed-off-by: Kumar Gala + +commit 83002a77cbdf383015ca384eff5fa31722d8e571 +Author: Magnus Lilja +Date: Mon Jun 9 22:58:48 2008 +0200 + + i.MX31: Cleanup comments in lowlevel_init.S. + + Signed-off-by: Magnus Lilja + +commit f8cc312bbee69257d741dc9f4062f4a0f5adf609 +Author: Ben Warren +Date: Sun Jun 8 23:28:33 2008 -0700 + + Move conditional compilation of MPC8XXX SPI driver to Makefile + + Signed-off-by: Ben Warren + +commit d92ea21bafb674ee2bf27447970b047845e7b0a2 +Author: Juergen Kilb +Date: Sun Jun 8 17:59:53 2008 +0200 + + i.MX31: fixed CTRL-C detection + + The Register URXD contains status information in bits [15..8]. + With status bit 15 set, CTRL-C was reported as 0x8003 instead + of 0x03. Therefore CTRL-C was not detected. + To solve this, bits [15..8] were masked out now. + + Signed-off-by: Juergen Kilb + Acked-by: Felix Radensky + +commit b571afde0295b007a45055ee49f8822c753a5651 +Author: Jean-Christophe PLAGNIOL-VILLARD +Date: Sat Jun 7 12:29:52 2008 +0200 + + add SHA256 support + + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + Signed-off-by: Francesco Albanese + +commit 3bab76a26e03df4ff81342fcc16393ce37d9766b +Author: Marian Balakowicz +Date: Fri Jun 6 23:07:40 2008 +0200 + + Delay FIT format check on sector based devices + + Global FIT image operations like format check cannot be performed on + a first sector data, defer them to the point when whole FIT image was + uploaded to a system RAM. + + Signed-off-by: Marian Balakowicz + Partial ('cmd_nand' case) Acked-by: Grant Erickson + NAND and DOC bits Acked-by: Scott Wood + +commit 9810263afec5ac5f38f92963bb3b6d799e4331d0 +Author: Dave Liu +Date: Tue Jun 3 17:38:19 2008 +0800 + + sata: wait for device updating signature to host + + The driver need wait for the device updating signature to host. + If we don't wait for it, the driver can not detect the device(disk) + when the system powers up. + + Signed-off-by: Dave Liu + +commit 745d8a0d3cea82e6d1753e14afb4588c34761b15 +Author: Stefan Roese +Date: Sat Jun 28 14:56:17 2008 +0200 + + ppc4xx: Fix 460EX errata with CPU lockup upon high AHB traffic + + This patch implements a fix provided by AMCC so that the lockup upon + simultanious traffic on AHB USB OTG, USB 2.0 and SATA doesn't occur + anymore: + + Set SDR0_AHB_CFG[A2P_INCR4] (bit 24) and clear SDR0_AHB_CFG[A2P_PROT2] + (bit 25) for a new 460EX errata regarding concurrent use of AHB USB OTG, + USB 2.0 host and SATA. + + This errata is not officially available yet. I'll update the comment + to add the errata number later. + + Signed-off-by: Stefan Roese + +commit 8b616edb118e37d05f6401389eaee1c636b22828 +Author: Stuart Wood +Date: Mon Jun 2 16:42:19 2008 -0400 + + serial_pl010.c: add watchdog support + + Signed-off-by: Stuart Wood + +commit 86d3273e2b7be3fffb45e20c08535d6ad3aded6b +Author: Stuart Wood +Date: Mon Jun 2 16:40:08 2008 -0400 + + jffs2_1pass.c: add watchdog support + + Signed-off-by: Stuart Wood + +commit 5744ddc6637fea4f7b911a54a5fa860cb81a5d89 +Author: Sascha Laue +Date: Fri May 30 09:48:14 2008 +0200 + + Configure DSP POST; add watchdog reset to diag command + + Signed-off-by: Sascha Laue + +commit f13526517859bf6b573e23ff47199e107d1009b5 +Author: Tor Krill +Date: Thu May 29 10:40:17 2008 +0200 + + Add sata sil3114 support + + Signed-off-by: Tor Krill + +commit e093a247628228100f405b6d7f6b1bfc16141938 +Author: Wolfgang Denk +Date: Sat Jun 28 23:34:37 2008 +0200 + + Coding Style Cleanup + + Signed-off-by: Wolfgang Denk + +commit 01db232dd7a0ceb81208a9f2545720c80e5bfd83 +Author: Wolfgang Denk +Date: Sat Jun 28 23:16:01 2008 +0200 + + Update CHANGELOG + + Signed-off-by: Wolfgang Denk + +commit c7f879ec2b389c4f2bf726b293bd516f4c692e03 +Author: Hugo Villeneuve +Date: Wed May 21 13:58:41 2008 -0400 + + ARM: Add support for Lyrtech SFF-SDR board (ARM926EJS) + + This patch adds support for the Lyrtech SFF-SDR board, + based on the TI DaVinci architecture (ARM926EJS). + + Signed-off-by: Hugo Villeneuve + Signed-off-by: Philip Balister + Signed-off-by: Wolfgang Denk + +commit 341188b9ccaa8d4462d772cc067aca8d7618633a +Author: Haavard Skinnemoen +Date: Thu May 22 11:09:59 2008 +0200 + + MMC: Consolidate MMC/SD command definitions + + This moves the MMC and SD Card command definitions from + include/asm/arch/mmc.h into include/mmc.h. These definitions are + given by the MMC and SD Card standards, not by any particular + architecture. + + There's a lot more room for consolidation in the MMC drivers which + I'm hoping to get done eventually, but this patch is a start. + + Compile-tested for all avr32 boards as well as lpc2292sodimm and + lubbock. This should cover all three mmc drivers in the tree. + + Signed-off-by: Haavard Skinnemoen + +commit fa60edfc4c952626e048c0e065f654b3c1822fa5 +Author: Kyungmin Park +Date: Wed May 21 14:38:08 2008 +0900 + + Use better Ethernet timings for apollon board + + Signed-off-by: Kyungmin Park + +commit 41c5eaa7253ed82bbae1eda5667755872c615164 +Author: Andy Fleming +Date: Mon Jun 16 13:58:56 2008 -0500 + + Resize device tree to allow space for board changes and the chosen node + + Current code requires that a compiled device tree have space added to the end to + leave room for extra nodes added by board code (and the chosen node). This + requires that device tree creators anticipate how much space U-Boot will add to + the tree, which is absurd. Ideally, the code would resize and/or relocate the + tree when it needed more space, but this would require a systemic change to the + fdt code, which is non-trivial. Instead, we resize the tree inside + boot_relocate_fdt, reserving either the remainder of the bootmap (in the case + where the fdt is inside the bootmap), or adding CFG_FDT_PAD bytes to the size. + + Signed-off-by: Andy Fleming + +commit 7570a9941fc565922078679a72d246fe208d696d +Author: Andy Fleming +Date: Mon Jun 16 13:58:55 2008 -0500 + + Fix an underflow bug in __lmb_alloc_base + + __lmb_alloc_base can underflow if it fails to find free space. This was fixed + in linux with commit d9024df02ffe74d723d97d552f86de3b34beb8cc. This patch + merely updates __lmb_alloc_base to resemble the current version in Linux. + + Signed-off-by: Andy Fleming + +commit 63796c4e61b207d2e635729d41b7a7f7d188b03c +Author: Andy Fleming +Date: Mon Jun 16 13:58:54 2008 -0500 + + Add lmb_free + + lmb_free allows us to unreserve some memory so we can use lmb_alloc_base or + lmb_reserve to temporarily reserve some memory. + + Signed-off-by: Andy Fleming + +commit 4b03ac8b5102ad95f9fede7d13fa236977593e7d +Author: Andy Fleming +Date: Mon Jun 16 13:58:53 2008 -0500 + + Add ALIGN() macro + + ALIGN() returns the smallest aligned value greater than the passed + in address or size. Taken from Linux. + + Signed-off-by: Andy Fleming + +commit 93262af85e3e9d9974c6c08fbd37a9a72e090ca2 +Author: Stefan Roese +Date: Tue Jun 24 17:15:22 2008 +0200 + + ppc4xx: Fix compilation problems with phys_size_t + + This patch includes before in some 4xx + board specific files where it has been missing. + + Signed-off-by: Stefan Roese + +commit 28eab0d77352b84885f938759bf2612b7bf0bc44 +Author: Haavard Skinnemoen +Date: Mon May 19 12:26:38 2008 +0200 + + Conditionally add -fno-stack-protector to CFLAGS + + When compile-testing on powerpc, I get errors like this: + + net/nfs.c:422: undefined reference to `__stack_chk_fail_local' + + This seems to be because -fstack-protector is on by default, so + let's explicitly disable it on all architectures that support the + option. + + The Ubuntu toolchain is affected by this problem, and according to + Mike Frysinger, Gentoo has been running with SSP enabled for years. + More and more distros are turning SSP on by default, so this problem + is likely to get worse in the future. + + Also, powerpc just happens to be one of the arches I do + compile-testing on. There may be other arches affected by this too. + + Signed-off-by: Haavard Skinnemoen + +commit dfd3be881c03a26e31f0dea4a42e76061fa610ac +Author: Jean-Christophe PLAGNIOL-VILLARD +Date: Sun May 18 19:09:52 2008 +0200 + + pcmcia/ti_pci1410a: Move compile condition to the Makefile + + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 72d5d5f7b5c74a188df238ec6dd824d80c74857a +Author: Jean-Christophe PLAGNIOL-VILLARD +Date: Sun May 18 19:09:51 2008 +0200 + + pxa_pcmcia: Move compile condition to the Makefile + + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit c9eff32881fb429101c937cf8c268f1d42e5c2a9 +Author: Jean-Christophe PLAGNIOL-VILLARD +Date: Sun May 18 19:09:50 2008 +0200 + + marabun_pcmcia: Move compile condition to the Makefile + + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 6a19c46cae43c16c528eddefae3db97134f1915d +Author: Andre Schwarz +Date: Mon Jun 23 13:25:34 2008 +0200 + + fix non-working mvBL-M7 + + Add missing #define CONFIG_HIGH_BATS in mvBL-M7 board config file. + + Signed-off-by: Andre Schwarz + Signed-off-by: Kim Phillips + +commit 846f1574ddddeda2bc227655e687308695f41cdc +Author: Andre Schwarz +Date: Mon Jun 23 11:40:56 2008 +0200 + + fix system config overwrite @ MPC834x and MPC8313 + + During 83xx setup the "System I/O configuration register high" gets + overwritten with user defined value if CFG_SICRH is defined. + + Regarding to the MPC834x manual (Table 5-28 reve.1) bits 28+29 of SICRH + must keep their reset value regardless of configuration. + + On my board (using RGMII) those bits are set after reset - yet it's + unclear where they come from. + + The patch keeps both bits on MPC834x and MPC8313. + + Signed-off-by: Andre Schwarz + Signed-off-by: Kim Phillips + +commit 4890246a2c5df90a74e2941e3673a49bbd36aee9 +Author: Kim Phillips +Date: Tue Jun 17 17:45:27 2008 -0500 + + mpc83xx: move CPU_TYPE_ENTRY over to processor.h + + to avoid this: + + cpu.c:47:1: warning: "CPU_TYPE_ENTRY" redefined + In file included from cpu.c:33: + /home/kim/git/u-boot/include/asm/processor.h:982:1: warning: this is the location of the previous definition + + Signed-off-by: Kim Phillips + +commit aac7a5095b968d6c9a3e6422f31b4ad203cac9c8 +Author: Stefan Roese +Date: Mon Jun 23 11:15:09 2008 +0200 + + ppc4xx: Fix problem in gpio_config() + + As pointed out by Guennadi Liakhovetski (thanks), pin2 is already shifted + left by one. So the additional shift is bogus. + + Signed-off-by: Stefan Roese + +commit 40777812316fc252c941665c0f60c148fd79d50f +Author: Detlev Zundel +Date: Fri Jun 20 22:24:05 2008 +0200 + + fdt: Fix typo in variable name. + + Signed-off-by: Detlev Zundel + +commit 5f723a3b98c630bde33de74351f2121691fdef14 +Author: Haavard Skinnemoen +Date: Fri Jun 20 10:41:05 2008 +0200 + + avr32: Enable SPI flash support on ATNGW100 + + The ATNGW100 has 8MB DataFlash on board. Give users access to it through + the new SPI flash framework. + + Signed-off-by: Haavard Skinnemoen + +commit 5605ef6b5802921cbefe6a933a9dea3497396b5c +Author: Haavard Skinnemoen +Date: Fri Jun 20 12:44:28 2008 +0200 + + avr32: Fix SPI portmux initialization + + Use the new GPIO manipulation functions to set up the chip select lines, + and make sure both busses use GPIO for chip select control. + + Signed-off-by: Haavard Skinnemoen + +commit 4688f9e34a87e825aed34d07c9ca7a273e6fc8ab +Author: Peter Ma +Date: Sun Jun 1 22:59:24 2008 -0700 + + avr32: Add GPIO manipulation functions + + Adds GPIO manipulation functions for AVR32 AP7 platform. + + Signed-off-by: Peter Ma + [haavard.skinnemoen@atmel.com: coding style fixup, slight simplification] + Signed-off-by: Haavard Skinnemoen + +commit b4fe1a71090c73efc6e4188eed188b2ff67fc02a +Author: Wolfgang Grandegger +Date: Thu Jun 5 13:02:30 2008 +0200 + + MPC8360ERDK: adapt NAND interface for the re-written FSL NAND UPM driver + + This patch is based on the following patch sent a few minutes ago: + "NAND FSL UPM: driver re-write using the hwcontrol callback" + It is untested, of course. Anton, could you please give it a try. + + Signed-off-by: Wolfgang Grandegger + Acked-by: Anton Vorontsov + +commit 96026d42fa4e646d28318c0a1438aac4b2017909 +Author: Anatolij Gustschin +Date: Thu Jun 12 12:40:11 2008 +0200 + + Fix 4xx build issue + + Building for 4xx doesn't work since commit 4dbdb768: + + In file included from 4xx_pcie.c:28: + include/asm/processor.h:971: error: expected ')' before 'ver' + make[1]: *** [4xx_pcie.o] Error 1 + + This patch fixes the problem. + + Signed-off-by: Anatolij Gustschin + Acked-by: Stefan Roese + Acked-by: Kumar Gala + +commit fb8c061ea05fc68d37e2a8b9f8c949d76c8d71a8 +Author: Stefan Roese +Date: Mon Jun 16 10:40:02 2008 +0200 + + cfi-flash: Fix problem in flash_toggle(), busy was not detected reliably + + This patch simplifies flash_toggle() (AMD commandset), which is used to + detect if a FLASH device is still busy with erase/program operations. On + 800MHz Canyonlands/Glacier boards (460EX/GT) the current implementation + did not detect the busy state reliably, resulting in non erased sectors + etc. This patch now simplifies this function by "just" comparing the + complete data-word instead of ANDing it with the command-word (0x40) + before the compatison. It is done the same way in the Linux implementation + chip_ready() in cfi_cmdset_0002.c. + + Signed-off-by: Stefan Roese + +commit 9e4006bca3d9fb4a2d061996771036cb01e539d3 +Author: Philip Balister +Date: Mon Jun 16 08:58:07 2008 -0400 + + NAND: Add missing declaration to non-redundant saveenv(). + + Signed-off-by: Scott Wood + +commit 2cdb7f50ac59594540fffdf8dbd7b12beac79c52 +Author: Wolfgang Grandegger +Date: Mon Jun 2 15:09:55 2008 +0200 + + MPC8360ERDK: adapt NAND interface for the re-written FSL NAND UPM driver + + Signed-off-by: Wolfgang Grandegger + Acked-by: Anton Vorontsov + Signed-off-by: Scott Wood + +commit 212ed90615c3d20fa6bd73d70d5153bd0d124e5f +Author: Stefan Roese +Date: Tue Jun 10 15:34:11 2008 +0200 + + ppc4xx: Canyonlands: Disable the RTC M41T62 square wave output + + This patch disables the square wave output of the M41T62 RTC used on + Canyonlands & Glacier. Here the explanation: + + The serial real-time clock part used in the design is an + STMicro M41T62. This part has a full-time 32KHz square wave + output that is connected to the TmrClk input to the + processor. The default state for this square wave output is + enabled so the output runs continuously when the board is + powered normally and also from the battery. The TmrClk input + to the processor goes to ground when the power is removed + from the board/processor, and therefore the running square + wave output is driving ground which drains the battery quickly. + + Signed-off-by: Stefan Roese + +commit a94f22f08f280905926219e568568964cb9eeb9d +Author: Andy Fleming +Date: Wed Jun 11 18:10:20 2008 -0500 + + Fix build issue with string.h and linux/string.h + + This commit: + commit 338cc038461a6c7709c5b86fd9a240209338a1ae + Author: Wolfgang Denk + Date: Fri Jun 6 14:28:14 2008 +0200 + + tools/mkimage: fix compiler warnings on some systems. + + Broke building on some systems, because the host's string.h was interfering + with u-boot's linux/string.h. It doesn't look like we need the u-boot one if + we're building for the host, so now we only include when building inside + u-boot. + + Signed-off-by: Andy Fleming + +commit 9973e3c614721bbf169882ffc3be266a6611cd60 +Author: Becky Bruce +Date: Mon Jun 9 16:03:40 2008 -0500 + + Change initdram() return type to phys_size_t + + This patch changes the return type of initdram() from long int to phys_size_t. + This is required for a couple of reasons: long int limits the amount of dram + to 2GB, and u-boot in general is moving over to phys_size_t to represent the + size of physical memory. phys_size_t is defined as an unsigned long on almost + all current platforms. + + This patch *only* changes the return type of the initdram function (in + include/common.h, as well as in each board's implementation of initdram). It + does not actually modify the code inside the function on any of the platforms; + platforms which wish to support more than 2GB of DRAM will need to modify + their initdram() function code. + + Build tested with MAKEALL for ppc, arm, mips, mips-el. Booted on powerpc + MPC8641HPCN. + + Signed-off-by: Becky Bruce + +commit 391fd93ab23e15ab3dd58a54f5b609024009c378 +Author: Becky Bruce +Date: Mon Jun 9 20:37:18 2008 -0500 + + Change lmb to use phys_size_t/phys_addr_t + + This updates the lmb code to use phys_size_t + and phys_addr_t instead of unsigned long. Other code + which interacts with this code, like getenv_bootm_size() + is also updated. + + Booted on MPC8641HPCN, build-tested ppc, arm, mips. + + Signed-off-by: Becky Bruce + +commit 61b09fc2952dc636017df4e7970e3de132276ba1 +Author: Becky Bruce +Date: Mon Jun 9 20:37:17 2008 -0500 + + Change print_size to take phys_size_t + + Signed-off-by: Becky Bruce + +commit b57ca3e128cc10a133ba79bc7ec3e7b50e7c8fbe +Author: Becky Bruce +Date: Mon Jun 9 20:37:16 2008 -0500 + + Change bd/gd memsize/ram_size to be phys_size_t. + + Currently, both are defined as an unsigned long, but + should be phys_size_t. This should result in no real change, + since phys_size_t is currently an unsigned long for all the + default configs. Also add print_lnum to cmd_bdinfo to deal + with the potentially wider memsize. + + Signed-off-by: Becky Bruce + +commit ba04f7010958e88a8910f2a123fee53fdc72e013 +Author: Kumar Gala +Date: Tue Jun 10 16:16:02 2008 -0500 + + FSL LAW: Add new interface to use the last free LAW + + LAWs have the concept of priority so its useful to be able to allocate + the lowest (highest number) priority. We will end up using this with the + new DDR code. + + Signed-off-by: Kumar Gala + +commit 859a86a25c569d3665ff413d1d923394b8a961f3 +Author: Kumar Gala +Date: Wed Jun 11 00:51:45 2008 -0500 + + 85xx/86xx: Move to dynamic mgmt of LAWs + + With the new LAW interface (set_next_law) we can move to letting the + system allocate which LAWs are used for what purpose. This makes life + a bit easier going forward with the new DDR code. + + Signed-off-by: Kumar Gala + Signed-off-by: Andy Fleming + Acked-by: Jon Loeliger + Acked-by: Becky Bruce + +commit f060054dadbbe7027ca088eed806a3ef1f82fdb7 +Author: Kumar Gala +Date: Wed Jun 11 00:44:10 2008 -0500 + + FSL LAW: Keep track of LAW allocations + + Make it so we keep track of which LAWs have allocated and provide + a function (set_next_law) which can allocate a LAW for us if one is + free. + + In the future we will move to doing more "dynamic" LAW allocation + since the majority of users dont really care about what LAW number + they are at. + + Also, add CONFIG_MPC8540 or CONFIG_MPC8560 to those boards which needed them + + Signed-off-by: Kumar Gala + Signed-off-by: Andy Fleming + +commit ddde74a159caa6e18b481fec01d40b885aebb566 +Author: Kumar Gala +Date: Mon Jun 9 22:31:57 2008 -0500 + + 85xx: remove dummy board_early_init_f + + A number of board ports have empty version of board_early_init_f + for no reason since we control its via CONFIG_BOARD_EARLY_INIT_F. + + Signed-off-by: Kumar Gala + +commit 81e56e9af0d43712db8efb843606a8d62eab454f +Author: Kumar Gala +Date: Mon Jun 9 18:55:38 2008 -0500 + + MPC8544DS: Update config.h + + * Enable flash progress + * remove CLEAR_LAW0 since we dont really use it + + Signed-off-by: Kumar Gala + +commit 978e81604c1b28526ed580df0fbe64eb8384e94f +Author: Kumar Gala +Date: Mon Jun 9 13:37:24 2008 -0500 + + 85xx: Remove unused and unconfigured memory test code. + + Remove unused and unconfigured DDR test code from FSL 85xx boards. + Besides, other common code exists. + + Signed-off-by: Kumar Gala + +commit a23cddde1a95f987e3fe2a720a7ec9375b7264d7 +Author: Sergei Poselenov +Date: Fri Jun 6 15:42:45 2008 +0200 + + Socrates: Added FPGA base address update in FDT. + + Signed-off-by: Sergei Poselenov + +commit fd51b0e0e620b8bc9fd4f6daa3a4fa6f5e1316f4 +Author: Sergei Poselenov +Date: Fri Jun 6 15:42:44 2008 +0200 + + Socrates: NAND support added. Changed the U-Boot base address and + + Signed-off-by: Sergei Poselenov + +commit 248ae5cfc8bf69074d1da099dc495d8e06070547 +Author: Sergei Poselenov +Date: Fri Jun 6 15:42:43 2008 +0200 + + NAND: Added support for 128-bit OOB, adapted + + Signed-off-by: Sergei Poselenov + +commit 31ca0208612f2eb57690110d7c2815953650e47b +Author: Sergei Poselenov +Date: Fri Jun 6 15:42:42 2008 +0200 + + Socrates: added missed file with UPMA configuration data. + + Signed-of-by: Sergei Poselenov + +commit 59abd15b43cab7a4d19de4ba0943837d9555f7ba +Author: Sergei Poselenov +Date: Fri Jun 6 15:42:41 2008 +0200 + + Socrates: Added FPGA mapping. LAWs and TLBs cleanup. + + Signed-off-by: Sergei Poselenov + +commit 740280e68ccc0b971e613face7eaaa8bd1382b8c +Author: Sergei Poselenov +Date: Fri Jun 6 15:42:40 2008 +0200 + + Added the upmconfig() function for 85xx. + + Signed-off-by: Sergei Poselenov + Signed-off-by: Andy Fleming + +commit d39e68514ff943930ee692cff3fde03532eb7fec +Author: Sergei Poselenov +Date: Fri Jun 6 15:42:39 2008 +0200 + + Socrates: config file cleanup. + + Signed-off-by: Sergei Poselenov + +commit e8cc3f04b124f757af4528206e60d8eb715ae083 +Author: Wolfgang Grandegger +Date: Thu Jun 5 13:12:10 2008 +0200 + + TQM85xx: Change memory map to support Flash memory > 128 MiB + + Some TQM85xx boards could be equipped with up to 1 GiB (NOR) Flash + memory. The current memory map only supports up to 128 MiB Flash. + This patch adds the configuration option CONFIG_TQM_BIGFLASH. If + set, up to 1 GiB flash is supported. To achieve this, the memory + map has to be adjusted in great parts (for example the CCSRBAR is + moved from 0xE0000000 to 0xA0000000). + + If you want to boot Linux with CONFIG_TQM_BIGFLASH set, the new + memory map also has to be considered in the kernel (changed + CCSRBAR address, changed PCI IO base address, ...). Please use + an appropriate Flat Device Tree blob (tqm8548.dtb). + + Signed-off-by: Martin Krause + Signed-off-by: Wolfgang Grandegger + +commit 1c2deff22cd6e2bf0e618fd6e09ca3eec5a8d051 +Author: Wolfgang Grandegger +Date: Thu Jun 5 13:12:09 2008 +0200 + + TQM85xx: NAND support via local bus UPMB + + This patch adds support for NAND FLASH on the TQM8548. It is disabled by + default and can be enabled for the TQM8548 modules. It is now based on + the re-written FSL NAND UPM driver. A patch has been posted earlier today + with the subject: + + "NAND FSL UPM: driver re-write using the hwcontrol callback" + + Note that the R/B pin is not supported by that module requiring to use + the specified maximum delay time. + + Note: With NAND support enabled the size of the U-Boot image exceeds + 256 KB and TEXT_BASE must therefore be set to 0xfff80000 in config.mk, + doubling the image size :-(. + + Signed-off-by: Thomas Waehner + Signed-off-by: Wolfgang Grandegger + +commit b9e8078bb3f3c48111a7081e27279938c3a445e1 +Author: Wolfgang Grandegger +Date: Thu Jun 5 13:12:08 2008 +0200 + + TQM8548: PCI express support + + This patch adds support for PCI express cards. The board support + now uses common FSL PCI init code, for both, PCI and PCIe on all + TQM85xx modules. + + Signed-off-by: Thomas Waehner + Signed-off-by: Wolfgang Grandegger + +commit 1287e0c55a2ee2c575ac9ce8e4302cd4085be876 +Author: Wolfgang Grandegger +Date: Thu Jun 5 13:12:07 2008 +0200 + + TQM8548: Basic support for the TQM8548 modules + + This patch adds basic support for the TQM8548 module from TQ-Components + (http://www.tqc.de/) including DDR2 SDRAM initialisation and support for + eTSEC 3 and 4 + + Furthermore Flash buffer write has been enabled to speed up output to + the Flash by approx. a factor of 10. + + Signed-off-by: Thomas Waehner + Signed-off-by: Wolfgang Grandegger + +commit 25991353204c78b094c3c1fec90182dcd607ab8f +Author: Wolfgang Grandegger +Date: Thu Jun 5 13:12:06 2008 +0200 + + TQM85xx: Support for Flat Device Tree + + This patch adds support for Linux kernels using the Flat Device Tree. + It also re-defines the default environment settings for booting Linux + with the FDT blob. + + Signed-off-by: Wolfgang Grandegger + +commit d9ee843d54c54776e1fdb86336ce554906a87331 +Author: Wolfgang Grandegger +Date: Thu Jun 5 13:12:05 2008 +0200 + + TQM85xx: Support for Intel 82527 compatible CAN controller + + This patch adds initialization of the UPMC RAM to support up to two + Intel 82527 compatible CAN controller on the TQM85xx modules. + + Signed-off-by: Thomas Waehner + Signed-off-by: Wolfgang Grandegger + +commit 518d5cfe72916323c746af1647764459914f555f +Author: Wolfgang Grandegger +Date: Thu Jun 5 13:12:04 2008 +0200 + + TQM85xx: Bugfix in the SDRAM initialisation + + The CS0_BNDS register is now set according to the detected + memory size. + + Signed-off-by Martin Krause + +commit 45dee2e620ccec6ac7b3548fe8979a34fd030e5d +Author: Wolfgang Grandegger +Date: Thu Jun 5 13:12:03 2008 +0200 + + TQM85xx: Fix chip select configuration for second FLASH bank + + This patch fixes the re-calculation of the automatic chip select + configuration for boards with two populated FLASH banks. + + Signed-off-by: Martin Krause + +commit 46346f27cda6fd025a496bde8f2d4aeee04aca5f +Author: Wolfgang Grandegger +Date: Thu Jun 5 13:12:02 2008 +0200 + + TQM85xx: Support for Spansion 'N' type flashes added + + The 'N' type Spansion flashes (S29GLxxxN series) have bigger sectors, + than the formerly used 'M' types (S29GLxxxM series), so the flash layout + needs to be changed -> new start address of the environment. The macro + definition CONFIG_TQM_FLASH_N_TYPE is undefined by default and must be + defined for boards with 'N' type flashes. + + Signed-off-by: Martin Krause + Signed-off-by: Wolfgang Grandegger + +commit 5d5bd838f76eade22c0ea40a500389f924d0da36 +Author: Wolfgang Grandegger +Date: Thu Jun 5 13:12:01 2008 +0200 + + TQM85xx: Fix CPM port pin configuration + + Do not configure port pins PD30/PD31 as SCC1 TxD/RxD except for the TQM8560 + board. On the other TQM85xx boards (TQM8541 and TQM8555) SCC1 is not used + as serial interface anyway. Worse, on some board variants configuring the + pins for SCC1 leads to short circuits (for example on the TQM8541-BG). + + Signed-off-by: Martin Krause + +commit b99ba1679e8cd51b023e67098c89e606e47137d2 +Author: Wolfgang Grandegger +Date: Thu Jun 5 13:12:00 2008 +0200 + + TQM85xx: Various coding style fixes + + Signed-off-by: Wolfgang Grandegger + +commit ae9e97fa96f643c8ba2b666b06a026cc8717eb00 +Author: Gerald Van Baren +Date: Tue Jun 10 22:15:58 2008 -0400 + + libfdt: Move the working_fdt pointer to cmd_fdt.c + + The working_fdt pointer was declared in common/fdt_support.c but was + not used there. Move it to common/cmd_fdt.c where it is used (it is + also used in lib_ppc/bootm.c). + + Signed-off-by: Gerald Van Baren + +commit e489b9c078e22b0d9e75f002cd2a1bd967e88f5e +Author: Kim Phillips +Date: Tue Jun 10 11:06:17 2008 -0500 + + fdt: unshadow global working fdt variable + + differentiate with local variables of the same name by renaming the + global 'fdt' variable 'working_fdt'. + + Signed-off-by: Kim Phillips + +commit e1eb0e25d9d8fd8efdfb93f670a417663f386022 +Author: Andy Fleming +Date: Tue Jun 10 18:49:34 2008 -0500 + + socrates: Fix PCI clk fix patch + + The submitted patch seems to have been more up-to-date, but an older patch was + already in the repository. This patch encompasses the differences + + Taken entirely from Sergei Poselenov + + Signed-off-by: Andy Fleming + +commit a75a57ef6e4b613c81434971e96ed70cf9ec9ba0 +Author: Wolfgang Grandegger +Date: Thu Jun 5 13:02:29 2008 +0200 + + NAND FSL UPM: driver re-write using the hwcontrol callback + + This is a re-write of the NAND FSL UPM driver using the more universal + hwcontrol callback (instead of the cmdfunc callback). Here is a brief + list of furher modifications: + + - For the time being, the UPM setup writing the UPM array has been + removed from the driver and must now be done by the board specific + code. + + - The bus width definition in "struct fsl_upm_nand" is now in bits to + comply with the corresponding Linux driver and 8, 16 and 32 bit + accesses are supported. + + - chip->dev_read is only set if fun->dev_ready != NULL, which is + required for boards not connecting the R/B pin. + + - A few issue have been fixed with MxMR bit manipulation like in the + corresponding Linux driver. + + Note: I think the "io_addr" field of "struct fsl_upm" could be removed + as well, because the address is already determined by + "nand->IO_ADDR_[RW]", but I'm not 100% sure. + + This patch has been tested on a TQM8548 modules with the NAND chip + Micron MT29F8G08FABWP. + + This patch is based on the following patches posted to this list a few + minutes ago: + + PPC: add accessor macros to clear and set bits in one shot + 83xx/85xx/86xx: add more MxMR local bus definitions + + Signed-off-by: Wolfgang Grandegger + Acked-by: Anton Vorontsov + +commit 6beecfbb542992eede5831240cd58678274683a9 +Author: Wolfgang Grandegger +Date: Thu Jun 5 13:11:59 2008 +0200 + + MPC85xx: Beautify boot output of L2 cache configuration + + The boot output is now aligned poperly with other boot output + lines, e.g.: + + FLASH: 128 MB + L2: 512 KB enabled + + Signed-off-by: Wolfgang Grandegger + +commit 398415114f0a705163a14543e9fef03f734b1ffa +Author: Wolfgang Grandegger +Date: Wed Jun 4 12:45:22 2008 +0200 + + PPC: add accessor macros to clear and set bits in one shot + + PPC: add accessor macros to clear and set bits in one shot + + This patch adds macros from linux/include/asm-powerpc/io.h to clear and + set bits in one shot using the in_be32, out_be32, etc. accessor functions. + They are very handy to manipulate bits it I/O registers. + + This patch is required for my forthcoming FSL NAND UPM driver re-write and + the support for the TQM8548 module. + + Signed-off-by: Wolfgang Grandegger + +commit 4677988c7edc070c3786d3db7994abeca3ab82a0 +Author: Wolfgang Grandegger +Date: Wed Jun 4 13:52:17 2008 +0200 + + TQM: move TQM boards to board/tqc + + Move all TQM board directories to the vendor specific directory "tqc" + for modules from TQ-Components GmbH (http://www.tqc.de). + + Signed-off-by: Wolfgang Grandegger + +commit 6fab2fe72ca5bf95280cd52cdf378af3e506eb50 +Author: Wolfgang Grandegger +Date: Mon Jun 2 12:09:30 2008 +0200 + + 83xx/85xx/86xx: add more MxMR local bus definitions + + 83xx/85xx/86xx: add more MxMR local bus definitions + + This patch adds more macro definitions for the UPM Machine Mode Registers + They are copied from "include/mpc82xx.h" to simplify the merge of all 8xxx + common local bus definitions into include/asm-ppc/fsl_lbc.h. They are + required for my forthcoming FSL NAND UPM driver re-write and the support + for the TQM8548 module. + + This patch is based on the following two patches from Anton Vorontsov: + + http://www.mail-archive.com/u-boot-users@lists.sourceforge.net/msg06511.html + http://www.mail-archive.com/u-boot-users@lists.sourceforge.net/msg06587.html + + I leave coding style violation fixes, code beautification and name + corrections to somebody else ;-(. + + Signed-off-by: Wolfgang Grandegger + +commit c8c5fc266e4499e283c293ccb972863156aa4134 +Author: Anton Vorontsov +Date: Thu May 29 18:14:56 2008 +0400 + + 83xx/85xx: further localbus cleanups + + Merge mpc85xx.h's LBC defines to fsl_lbc.h. Also, adopt ACS names + from mpc85xx.h, so ACS_0b10 renamed to ACS_DIV4, ACS_0b11 to ACS_DIV2. + + Signed-off-by: Anton Vorontsov + +commit 42dbd667c88d496882d53e22656e89b654205492 +Author: Anton Vorontsov +Date: Wed May 28 18:20:15 2008 +0400 + + 83xx/85xx/86xx: factor out Freescale Localbus defines out of mpc83xx.h + + This patch moves Freescale Localbus defines out of mpc83xx.h, so we could + use it on MPC85xx and MPC86xx processors. + + Signed-off-by: Anton Vorontsov + +commit 730b2fcf6fcd9eec3ea86fbb087c3f98aa23a769 +Author: Kumar Gala +Date: Thu May 29 11:22:06 2008 -0500 + + 85xx: Add setting of cache props in the device tree. + + Signed-off-by: Kumar Gala + +commit 4dbdb7681e243431530df0725627192a0c4aefda +Author: Kumar Gala +Date: Tue Jun 10 16:53:46 2008 -0500 + + 85xx: expose cpu identification + + The current cpu identification code is used just to return the name + of the processor at boot. There are some other locations that the name + is useful (device tree setup). Expose the functionality to other bits + of code. + + Also, drop the 'E' suffix and add it on by looking at the SVR version + when we print this out. This is mainly to allow the most flexible use + of the name. The device tree code tends to not care about the 'E' suffix. + + Signed-off-by: Kumar Gala + +commit 2329fe113d847e43cca8e4a0e4edd613b50b8492 +Author: Kim Phillips +Date: Tue Jun 10 13:25:24 2008 -0500 + + mpc83xx: MVBLM7: minor build fixups + + Signed-off-by: Kim Phillips + +commit a1293e549b56da135ef32ffca5b9d35a16aa6802 +Author: Andre Schwarz +Date: Tue Jun 10 09:14:05 2008 +0200 + + add MPC8343 based board mvBlueLYNX-M7 (board+make files) + + Add MPC8343 based board mvBlueLYNX-M7. + It's a single board stereo camera system. + Please read doc/README.mvblm7 for details. + + Signed-off-by: Andre Schwarz + Signed-off-by: Kim Phillips + +commit c005b93925ba49f07da2aa748527996d927e172f +Author: Andre Schwarz +Date: Tue Jun 10 09:13:16 2008 +0200 + + add MPC8343 based board mvBlueLYNX-M7 (doc+config) + + Add MPC8343 based board mvBlueLYNX-M7. + It's a single board stereo camera system. + Please read doc/README.mvblm7 for details. + + Signed-off-by: Andre Schwarz + Signed-off-by: Kim Phillips + +commit f9023afbdfd9f27e7c38f3cce965746e56d62dd3 +Author: Anton Vorontsov +Date: Thu May 29 18:14:56 2008 +0400 + + 83xx/85xx: further localbus cleanups + + move the BRx_* and ORx_* left behind in mpc85xx.h + + The same is needed for mpc8xx.h and mpc8260.h (defines are almost + the same, just few differences which needs some attention though). + + But the bad news for mpc8xx and mpc8260 is that there are a lot of users + of these defines. So this cleanup I'll leave for the "better times". + + Signed-off-by: Anton Vorontsov + Signed-off-by: Kim Phillips + +commit bf30bb1f7c954d7855d9b23624b33b00c50b4697 +Author: Anton Vorontsov +Date: Wed May 28 18:20:15 2008 +0400 + + 83xx/85xx/86xx: factor out Freescale Localbus defines out of mpc83xx.h + + This patch moves Freescale Localbus defines out of mpc83xx.h, so we could + use it on MPC85xx and MPC86xx processors. + + Signed-off-by: Anton Vorontsov + Acked-by: Andy Fleming + Signed-off-by: Kim Phillips + +commit d82b4fc0ce8cca95e857fc51022e841cb2dbee6a +Author: Tor Krill +Date: Mon Jun 2 15:09:30 2008 +0200 + + Add missing CSCONFIG_BANK_BIT_3 define to mpc83xx.h + + Signed-off-by: Tor Krill + Signed-off-by: Kim Phillips + +commit 3b904ccb93c3196727e2e9870cb1df903cab19ad +Author: Shinya Kuribayashi +Date: Mon Jun 9 23:37:44 2008 +0900 + + net: Conditional COBJS inclusion of network drivers + + Replace COBJS-y with appropriate driver config names. + + Signed-off-by: Shinya Kuribayashi + Signed-off-by: Ben Warren + +commit 2fb698bf50f4aff2485581a12fa634a07c040e4a +Author: Gerald Van Baren +Date: Mon Jun 9 21:02:17 2008 -0400 + + Use strncmp() for the fdt command + + Cleaner than doing multiple conditionals on characters. + + Signed-off-by: Gerald Van Baren + +commit 47abe8ab290d2721a8eeadff65b939e6af8c01b0 +Author: Gerald Van Baren +Date: Sat Jun 7 12:25:05 2008 -0400 + + The fdt boardsetup command criteria was not unique + + It was checking just for "b", which is not unique with respect to the + "boot" command. Change to check for "boa"[rdsetup]. + + Signed-off-by: Gerald Van Baren + +commit 2f08bfa9526bae4f461e043530cfb903fec0d273 +Author: David Gibson +Date: Tue May 20 17:19:11 2008 +1000 + + libfdt: Several cleanups to parameter checking + + This patch makes a couple of small cleanups to parameter checking of + libfdt functions. + + - In several functions which take a node offset, we use an + idiom involving fdt_next_tag() first to check that we have indeed been + given a node offset. This patch adds a helper function + _fdt_check_node_offset() to encapsulate this usage of fdt_next_tag(). + + - In fdt_rw.c in several places we have the expanded version + of the RW_CHECK_HEADER() macro for no particular reason. This patch + replaces those instances with an invocation of the macro; that's what + it's for. + + - In fdt_sw.c we rename the check_header_sw() function to + sw_check_header() to match the analgous function in fdt_rw.c, and we + provide an SW_CHECK_HEADER() wrapper macro as RW_CHECK_HEADER() + functions in fdt_rw.c + + Signed-off-by: David Gibson + +commit fec6d9ee7c10443f65ce1788ef818919167bbf2e +Author: Gerald Van Baren +Date: Tue Jun 3 20:34:45 2008 -0400 + + Remove the deprecated CONFIG_OF_FLAT_TREE + + Use CONFIG_OF_LIBFDT instead to support flattened device trees. It is + cleaner, has better functionality, and is better supported. + + Signed-off-by: Gerald Van Baren + +commit 62bcdda293efa752f8281fbd9da03822b27ce82f +Author: Gerald Van Baren +Date: Tue Jun 3 20:26:29 2008 -0400 + + Change the stxxst to CONFIG_OF_LIBFDT + + This was configured to use the deprecated CONFIG_OF_FLAT_TREE, change + to CONFIG_OF_LIBFDT. + + WARNING: It appears that this board lost its ability to boot via a + flattened device tree prior to this changeset. + + WARNING: This conversion was untested because I do not have a board to + test it on. + + Signed-off-by: Gerald Van Baren + +commit 589c04271d129729a8b01391453851ab9cc4069c +Author: Gerald Van Baren +Date: Tue Jun 3 20:24:58 2008 -0400 + + Convert mpc7448hpc2 to CONFIG_OF_LIBFDT + + This was configured to use the deprecated CONFIG_OF_FLAT_TREE, change + to CONFIG_OF_LIBFDT. + + WARNING: This conversion is untested because I do not have a board to + test it on. + + NOTE: The FDT blob (DTS) must have an /aliases/ethernet0 and (optionally) + /aliases/ethernet1 property for the ethernet to work. + + Signed-off-by: Gerald Van Baren + +commit ee1e35bede91debc8bff9b02f75574486033b652 +Author: Kumar Gala +Date: Thu May 29 01:21:24 2008 -0500 + + 85xx: Only use PORPLLSR[DDR_Ratio] on platforms that define it + + Signed-off-by: Kumar Gala + +commit 3b9519fc50802436e417c839e69df7b2016cade5 +Author: Becky Bruce +Date: Wed May 14 13:10:04 2008 -0500 + + MPC85xx: Change traps.c to not reference non-addressable memory + + Currently, END_OF_RAM is used by the trap code to determine if + we should attempt to access the stack pointer or not. However, + on systems with a lot of RAM, only a subset of the RAM is + guaranteed to be mapped in and accessible. Change END_OF_RAM + to use get_effective_memsize() instead of using the raw ram + size out of the bd. + + Signed-off-by: Becky Bruce + +commit 7faddaecea52f585f538fdf9c2e61f85a789b19c +Author: Nobuhiro Iwamatsu +Date: Mon Jun 9 13:39:57 2008 +0900 + + sh: Renesas Solutions SH7763RDP board support + + SH7763RDP has SCIF, NOR Flash, Ethernet, USB host, LCDC and MMC. + In this patch, support SCIF, NOR Flash, and Ethernet. + + Signed-off-by: Nobuhiro Iwamatsu + Signed-off-by: Nobuhiro Iwamatsu + +commit 60179098a95eaa972007d7ec58e4c1588029720f +Author: Nobuhiro Iwamatsu +Date: Fri Jun 6 16:24:13 2008 +0900 + + sh: Add support Renesas SH7763 + + Renesas SH7763 has 3 SCIF, MMC, LCDC, Ethernet and other. + This patch supprts CPU register's header file. + + Signed-off-by: Nobuhiro Iwamatsu + Signed-off-by: Nobuhiro Iwamatsu + +commit 08c5fabe181d663eec0feba5ecd02c0b78934a52 +Author: Nobuhiro Iwamatsu +Date: Fri Jun 6 16:16:08 2008 +0900 + + sh: SH7763 SCIF support + + SH7763 has 3 SCIF channels. SCIF0 and 1 are same register constitution, + but only SCIF2 is different. This patch work all SCIF channel. + + Signed-off-by: Nobuhiro Iwamatsu + Signed-off-by: Nobuhiro Iwamatsu + +commit 79b51ff8205f0354d5300570614c1d2db499679c +Author: Shinya Kuribayashi +Date: Sat Jun 7 20:51:59 2008 +0900 + + [MIPS] cpu/mips/Makefile: Split [CS]OBJS onto separate lines + + Also get rid of some #ifdefs in *.c files. + + Signed-off-by: Shinya Kuribayashi + +commit 8bde63eb3f79d68f693201528dafc8ae7aa087de +Author: Shinya Kuribayashi +Date: Sat Jun 7 20:51:56 2008 +0900 + + [MIPS] Rename Alchemy processor configs into CONFIG_SOC_* + + CONFIG_SOC_AU1X00 + + Common Alchemy Au1x00 stuff. All Alchemy processor based machines + need to have this config as a system type specifier. + + CONFIG_SOC_AU1000, CONFIG_SOC_AU1100, CONFIG_SOC_AU1200, + CONFIG_SOC_AU1500, CONFIG_SOC_AU1550 + + Machine type specifiers. Each port should have one of aboves. + + Signed-off-by: Shinya Kuribayashi + +commit cc49cadeeb8bb2f0ae3fdc13af7051ae59f083bc +Author: Stuart Wood +Date: Fri May 30 16:05:28 2008 -0400 + + env_nand.c: Added bad block management for environment variables + + Modified to check for bad blocks and to skipping over them when + CFG_ENV_RANGE has been defined. + CFG_ENV_RANGE must be larger than CFG_ENV_SIZE and aligned to the NAND + flash block size. + + Signed-off-by: Stuart Wood + Signed-off-by: Scott Wood + +commit 279726bd00558e80263d44581c44167625b7fb9a +Author: Becky Bruce +Date: Wed May 14 13:09:58 2008 -0500 + + MPC86xx: Change traps.c to not reference non-addressable memory + + Currently, END_OF_RAM is used by the trap code to determine if + we should attempt to access the stack pointer or not. However, + on systems with a lot of RAM, only a subset of the RAM is + guaranteed to be mapped in and accessible. Change END_OF_RAM + to use get_effective_memsize() instead of using the raw ram + size out of the bd to prevent us from trying to access + non-mapped memory. + + Signed-off-by: Becky Bruce + +commit 338cc038461a6c7709c5b86fd9a240209338a1ae +Author: Wolfgang Denk +Date: Fri Jun 6 14:28:14 2008 +0200 + + tools/mkimage: fix compiler warnings on some systems. + + Signed-off-by: Wolfgang Denk + +commit b2815f79288d4da7a3ba18bdbd05120ce09d5622 +Author: Stefan Roese +Date: Fri Jun 6 16:10:41 2008 +0200 + + ppc4xx: Fix misspelled CONFIG_440SPE/440EPX/GRX config options + + We use upper case letters for the AMCC processor defines (like + CONFIG_440SPE) in U-Boot. So the 440SPe is labeled CONFIG_440SPE and + not CONFIG_440SPe. This patch fixes the last misspelled config options. + + Signed-off-by: Stefan Roese + +commit 72675dc6c06a48846d180106161d49dd714383cc +Author: Stefan Roese +Date: Fri Jun 6 15:55:21 2008 +0200 + + ppc4xx: Unify AMCC's board config files (part 3/3) + + This patch series unifies the AMCC eval board ports by introducing + a common include header for all AMCC eval boards: + + include/configs/amcc-common.h + + This header now includes all common configuration options/defines which + are removed from the board specific headers. + + The reason for this is ease of maintenance and unified look and feel + of all AMCC boards. + + Signed-off-by: Stefan Roese + +commit 490f204096d6e2c9940f67816f154a8125bab116 +Author: Stefan Roese +Date: Fri Jun 6 15:55:03 2008 +0200 + + ppc4xx: Unify AMCC's board config files (part 2/3) + + This patch series unifies the AMCC eval board ports by introducing + a common include header for all AMCC eval boards: + + include/configs/amcc-common.h + + This header now includes all common configuration options/defines which + are removed from the board specific headers. + + The reason for this is ease of maintenance and unified look and feel + of all AMCC boards. + + Signed-off-by: Stefan Roese + +commit a8a11a9ed046b480a16e47a158f8f5300028dfa6 +Author: Stefan Roese +Date: Fri Jun 6 15:54:31 2008 +0200 + + ppc4xx: Unify AMCC's board config files (part 1/3) + + This patch series unifies the AMCC eval board ports by introducing + a common include header for all AMCC eval boards: + + include/configs/amcc-common.h + + This header now includes all common configuration options/defines which + are removed from the board specific headers. + + The reason for this is ease of maintenance and unified look and feel + of all AMCC boards. + + Signed-off-by: Stefan Roese + +commit 0e38c938ed4bcadb4f4fc1419a541431e94fc202 +Author: Remy Bohmer +Date: Thu Jun 5 13:03:36 2008 +0200 + + DM9000 fix status check fail 0x6d error for trizeps board + + According to the Application Notes of the DM9000, only the 2 bits 0:1 of + the status byte need to be checked to identify a valid packet in the fifo + + But, The several different Application Notes do not all speak the same + language on these bits. They do not disagree, but only 1 Application Note + noted explicitly that only these 2 bits need to be checked. + Even the datasheets do not mention anything about these 2 bits. + + Because the old code, and the kernel check the whole byte, I left this piece + untouched. + + However, I tested all board/DM9000[A|E|EP] devices with this 2 bit check, so + it should work. + + Notice, that the 2nd iteration through this receive loop (when a 2nd packet is + in the fifo) is much shorter now, compared to the older U-boot driver code, + so that we can maybe run into a hardware condition now that was never seen + before, or maybe was seen very unfrequently. + + Additionaly added a cleanup of a stack variable. + + Signed-off-by: Remy Bohmer + Signed-off-by: Ben Warren + +commit 7daf2ebe9196dd67131a06d85049c3a8a08ca413 +Author: Shinya Kuribayashi +Date: Thu Jun 5 22:29:00 2008 +0900 + + [MIPS] Update header + + - Fix traditional KSEG names + - Replace PHYSADDR with CPHYSADDR + + Signed-off-by: Shinya Kuribayashi + +commit f0d5a6f060d00358b85c62a921a423ea8df71184 +Author: Shinya Kuribayashi +Date: Thu Jun 5 22:29:00 2008 +0900 + + [MIPS] mips_config.mk: Misc fixes + + - Kill redundant `-pipe' (this will be added by $(TOPDIR)/config.mk) + - Modify comments + + Signed-off-by: Shinya Kuribayashi + +commit 5f64d21c9a2998794f255b469165b91f092dfc2d +Author: Shinya Kuribayashi +Date: Thu Jun 5 22:29:00 2008 +0900 + + [MIPS] Kill unused inclusions + + Signed-off-by: Shinya Kuribayashi + +commit a55d48174cfd1a5bc184159513f48dcbbe409c83 +Author: Shinya Kuribayashi +Date: Thu Jun 5 22:29:00 2008 +0900 + + [MIPS] lib_mips/time.c: Fix CP0 count register usage and timer routines + + MIPS port has two problems in timer routines. One is now we assume CFG_HZ + equals to CP0 counter frequency, but this is wrong. CFG_HZ has to be 1000 + in the U-Boot system. + + The other is we don't have a proper time management counter like timestamp + other ARCHs have. We need the 32-bit millisecond clock counter. + + This patch introduces timestamp and CYCLES_PER_JIFFY. timestamp is a + 32-bit non-overflowing CFG_HZ counter, and CYCLES_PER_JIFFY is the number + of calculated CP0 counter cycles in a CFG_HZ. + + STRATEGY: + + * Fix improper CFG_HZ value to have 1000 + + * Use CFG_MIPS_TIMER_FREQ for timer counter frequency, instead. + + * timer_init: initialize timestamp and set up the first timer expiration. + Note that we don't need to initialize CP0 count/compare registers here + as they have been already zeroed out on the system reset. Leave them as + they are. + + * get_timer: calculate how many timestamps have been passed, then return + base-relative timestamp. Make sure we can easily count missed timestamps + regardless of CP0 count/compare value. + + * get_ticks: return the current timestamp, that is get_timer(0). + + Most parts are from good old Linux v2.6.16 kernel. + + v2: + - Remove FIXME comments as they turned out to be trivial. + - Use CP0 compare register as a global variable for expirelo. + - Kill a global variable 'cycles_per_jiffy'. Use #define CYCLES_PER_JIFFY + instead. + + Signed-off-by: Shinya Kuribayashi + +commit 199e4f657c8af42efe3fb3ba1d1104eb6bb28c25 +Author: Shinya Kuribayashi +Date: Thu Jun 5 22:29:00 2008 +0900 + + [MIPS] lib_mips/time.c: Fix udelay + + What we have to do is just to wait for given micro-seconds. No need to + take into account current time, get_timer and CFG_HZ. + + Signed-off-by: Shinya Kuribayashi + +commit c7e38e413ae69120d3e51f132c7cb1d6b3514d03 +Author: Shinya Kuribayashi +Date: Thu Jun 5 22:28:59 2008 +0900 + + [MIPS] lib_mips/time.c: Replace CP0 access functions with existing macros + + We already have many pre-defined CP0 access macros in . + This patch replaces mips_{compare,count}_set and mips_count_get with + existing macros. + + Signed-off-by: Shinya Kuribayashi + +commit 6b52cfe16cd539935e32bd8cf19146522e462a4d +Author: Remy Bohmer +Date: Tue Jun 3 15:48:17 2008 +0200 + + Get rid of annoying/superfluous bad-checksum warning message + + U-boot can complain a lot about 'checksum bad' when it is attached to the network. + It is annoying for ordinary users who start to doubt the network connection + in general when they see messages like this. + + This is caused by the routine NetCksumOk() which cannot handle IP-headers longer + than 20 bytes. Those packages can be ignored anyway by U-boot, so we trash them + now before checking the checksum. + + Signed-off-by: Remy Bohmer + Signed-off-by: Ben Warren + +commit d6ee5fa40c26970d39990c6fc4a2f20a97822650 +Author: Remy Bohmer +Date: Wed Jun 4 10:47:25 2008 +0200 + + Fix order for reading rx-status registers in 32bit mode of DM9000 + + A last minute cleanup before submitting the DM9000A patch series yesterday introduced + a bug in reading the rx-status registers in 32bit mode only. + This patch repairs this. + + Signed-off-by: Remy Bohmer + Signed-off-by: Ben Warren + +commit 98291e2e689096420465074cce926b226d2e71b4 +Author: Remy Bohmer +Date: Tue Jun 3 15:26:26 2008 +0200 + + DM9000: Some minor code cleanups + + Some lines of the U-boot DM9000x driver are longer than 80 characters, or + need some other minor cleanup. + + Signed-off-by: Remy Bohmer + Signed-off-by: Ben Warren + +commit 850ba7555dbd4ca8d14fc475b864d534797adab3 +Author: Remy Bohmer +Date: Tue Jun 3 15:26:25 2008 +0200 + + DM9000: Make driver work properly for DM9000A + + The DM9000A network controller does not work with the U-boot DM9000x driver. + Analysis showed that many incoming packets are lost. + + The DM9000A Application Notes V1.20 (section 5.6.1) recommend that the poll to + check for a valid rx packet be done on the interrupt status register, not + directly by performing the dummy read and the rx status check as is currently + the case in the u-boot driver. + + When the recommended poll is done as suggested the driver starts working + correctly on 10Mbit/HD, but on 100MBit/FD packets come in faster so that there + can be more than 1 package in the fifo at the same time. + + The driver must perform the rx-status check in a loop and read and handle all + packages until there is no more left _after_ the interrupt RX flag is set. + + This change has been tested with DM9000A, DM9000E, DM9000EP. + + Signed-off-by: Remy Bohmer + Signed-off-by: Ben Warren + +commit fbcb7ece0ea1e364180f1cf963e0fa0ce7f6560d +Author: Remy Bohmer +Date: Tue Jun 3 15:26:24 2008 +0200 + + DM9000: Improve eth_reset() routine + + According to the application notes of the DM9000 v1.22 chapter 5.2 bullet 2, the + reset procedure must be done twice to properly reset the DM9000 by means of software. + This errata is not needed anymore for the DM9000A, but it does not bother it. + + This change has been tested with DM9000A, DM9000E, DM9000EP. + + Signed-off-by: Remy Bohmer + Signed-off-by: Ben Warren + +commit acba31847fad9ae40708cc2c9f3a634ec35f3416 +Author: Remy Bohmer +Date: Tue Jun 3 15:26:23 2008 +0200 + + DM9000: improve eth_send() routine + + The eth_send routine of the U-boot DM9000x driver does not match the + DM9000 or DM9000A application notes/programming guides. + + This change improves the stability of the DM9000A network controller. + + This change has been tested with DM9000A, DM9000E, DM9000EP. + + Signed-off-by: Remy Bohmer + Signed-off-by: Ben Warren + +commit 134e266253c02a7832560da59d394989c4f64453 +Author: Remy Bohmer +Date: Tue Jun 3 15:26:22 2008 +0200 + + DM9000: repair debug logging + + It seems that the debugging code of the DM9000x driver in U-boot has not been + compiled for a long time, because it cannot compile... + + Also rearranged some loglines to get more useful info while debugging. + + Signed-off-by: Remy Bohmer + Signed-off-by: Ben Warren + +commit a101361bfe23c120321e45d114c0603b8e0763e9 +Author: Remy Bohmer +Date: Tue Jun 3 15:26:21 2008 +0200 + + DM9000: Add data bus-width auto detection. + + The U-boot DM9000x driver contains a compile time bus-width definition for + the databus connected to the network controller. + + This compile check makes the code unclear, inflexible and is unneccessary. + It can be asked to the network controller what its bus-width is by reading bits + 6 and 7 of the interrupt status register. + + The linux kernel already uses a runtime mechanism to determine this bus-width, + so the implementation below looks somewhat like that implementation. + + This change has been tested with DM9000A, DM9000E, DM9000EP. + + Signed-off-by: Remy Bohmer + Signed-off-by: Ben Warren + +commit 63a0afa0c32e5f4ea98a9439542870072437404d +Author: Stefan Roese +Date: Wed Jun 4 19:19:20 2008 +0200 + + ppc4xx: Fix problem with SDRAM init in bamboo NAND booting port + + This patch fixes a problem spotted by Eugene O'Brian (thanks Eugene) + introduced by the commit: + + ppc4xx/NAND_SPL: Consolidate 405 and 440 NAND booting code in start.S + + With this patch SDRAM will get initialized again and booting from NAND + is working again. + + Signed-off-by: Stefan Roese + Acked-by: Eugene O'Brien + +commit 9ef1cbef1a649e3779298b0e663be4865cbbbfbc +Author: Wolfgang Denk +Date: Tue May 27 14:19:30 2008 +0200 + + Socrates: Fix PCI bus frequency report + + Signed-off-by: Sergei Poselenov + +commit 8ec6e332eace0ee78c71ee5f645d12b06813b86f +Author: Tor Krill +Date: Thu May 29 11:10:30 2008 +0200 + + Fix incorrect switch for IF_TYPE in part.c + + Use correct field in block_dev_desc_t when writing interface type in + dev_print. Error introduced in 574b3195. + + Also added fix from Martin Krause + + Signed-off-by: Tor Krill + +commit b64b8a0bd310935b70af69ac970952f2b364ae56 +Author: Andre Schwarz +Date: Tue May 27 10:25:39 2008 +0200 + + Add size #defines for Altera Cyclone-II EP2C8 and EP2C20. + + Signed-off-by: Andre Schwarz + +commit 35ef877f0a8f6232cdef748f442fed5accb2b641 +Author: Peter Tyser +Date: Thu May 22 18:56:52 2008 -0500 + + Additional fix to readline_into_buffer() with CONFIG_CMDLINE_EDITING before relocating + + Removed unneeded command line history initialization. Also, the original + code would access the 'initted' variable before relocation to SDRAM + which resulted in erratic behavior since the bss is not initialized when + executing from flash. + + Signed-off-by: Peter Tyser + +commit 22f371b63038a4ecab04068877c1089e51a01ba1 +Author: Grant Erickson +Date: Wed May 21 13:28:30 2008 -0700 + + PPC4xx: Simplified post_word_{load, store} + + This patch simplifies post_word_{load,store} by using the preprocessor + to eliminate redundant, copy-and-pasted code. + + Signed-off-by: Grant Erickson + +commit 9c048b523413ae5f3ff34e00cf57569c3368ab51 +Author: Vasiliy Leoenenko +Date: Wed May 7 21:25:33 2008 +0400 + + cfi_flash: enable M18 flash chips family support. + + Added new command set ID. Buffered write command processing is changed + in order to support M18 flash chips family. + + Signed-off-by: Alexey Korolev + Signed-off-by: Vasiliy Leonenko + +commit 93c56f212ccdadc182018f0769cb284426b88f1d +Author: Vasiliy Leoenenko +Date: Wed May 7 21:24:44 2008 +0400 + + cfi_flash: support of long cmd in U-boot. + + Some NOR flash chips needs support of commands with length grether than max + value size of uchar. For example all M18 family chips use 0x1ff command in + buffered write mode as value of program loops count. + + Signed-off-by: Alexey Korolev + Signed-off-by: Vasiliy Leonenko + +commit 4d91d1df2f16b511ab80dec50c80e050ba0d841e +Author: Stefan Roese +Date: Fri May 16 11:06:06 2008 +0200 + + DTT: Issue one-shot command on AD7414 (LM75 code) to read temp + + On AD7414 the first value upon bootup is not read correctly. + This is most likely because of the 800ms update time of the + temp register in normal update mode. To get current values + each time we issue the "dtt" command including upon powerup + we switch into one-short mode. + + This patch fixes the problem on AD7414 equipped boards (Sequoia, + Canyonlands etc), that temp value printed in the bootup log was + incorrect. + + Signed-off-by: Stefan Roese + +commit de5bfcf7b0425e032be12698252dbaa6b65a28c0 +Author: Matthias Fuchs +Date: Fri May 30 16:55:06 2008 +0200 + + ppc4xx: Cleanup CPCI405 variant's config file + + This patch removes some dead code from CPCI405 board's + config files. JFFS2 support is also removed. It's not used and + CPCI4052 does not build anymore without some size reduction. + + Signed-off-by: Matthias Fuchs + +commit 2918eb9d42bc705fcbd18c9fcc39d15ff2843c65 +Author: Kenneth Johansson +Date: Thu May 29 16:32:33 2008 +0200 + + Remove shell variable UNDEF_SYM. + + UNDEF_SYM is a shell variable in the main Makefile used to force the + linker to add all u-boot commands to the final image. It has no use here. + + Signed-off-by: Kenneth Johansson + +commit 8c66497e06bf803489c589df58ee591d71033274 +Author: Haavard Skinnemoen +Date: Fri May 16 11:10:35 2008 +0200 + + Add support for environment in SPI flash + + This is pretty incomplete...it doesn't handle reading the environment + before relocation, it doesn't support redundant environment, and it + doesn't support embedded environment. But apart from that, it does + seem to work. + + Signed-off-by: Haavard Skinnemoen + +commit b6368467e6a97f225e0a5fd7bfc5c7598ef5ddc4 +Author: Haavard Skinnemoen +Date: Fri May 16 11:10:34 2008 +0200 + + SPI Flash: Add "sf" command + + This adds a new command, "sf" which can be used to manipulate SPI + flash. Currently, initialization, reading, writing and erasing is + supported. + + Signed-off-by: Haavard Skinnemoen + +commit d25ce7d24cc0f93881559f4009175ea305af65e8 +Author: Haavard Skinnemoen +Date: Fri May 16 11:10:33 2008 +0200 + + SPI Flash subsystem + + This adds a new SPI flash subsystem. + + Currently, only AT45 DataFlash in non-power-of-two mode is supported, + but some preliminary support for other flash types is in place as + well. + + Signed-off-by: Haavard Skinnemoen + +commit 60445cb5c3eb77ed1a07f2d908eef09174483698 +Author: Hans-Christian Egtvedt +Date: Fri May 16 11:10:32 2008 +0200 + + atmel_spi: Driver for the Atmel SPI controller + + This adds a driver for the SPI controller found on most AT91 and AVR32 + chips, implementing the new SPI API. + + Changed in v4: + - Update to new API + - Handle zero-length transfers appropriately. The user may send a + zero-length SPI transfer with SPI_XFER_END set in order to + deactivate the chip select after a series of transfers with chip + select active. This is useful e.g. when polling the status + register of DataFlash. + + Signed-off-by: Haavard Skinnemoen + +commit d255bb0e78d1cac5b7c8c98cb77a095f5f16de0d +Author: Haavard Skinnemoen +Date: Fri May 16 11:10:31 2008 +0200 + + SPI API improvements + + This patch gets rid of the spi_chipsel table and adds a handful of new + functions that makes the SPI layer cleaner and more flexible. + + Instead of the spi_chipsel table, each board that wants to use SPI + gets to implement three hooks: + * spi_cs_activate(): Activates the chipselect for a given slave + * spi_cs_deactivate(): Deactivates the chipselect for a given slave + * spi_cs_is_valid(): Determines if the given bus/chipselect + combination can be activated. + + Not all drivers may need those extra functions however. If that's the + case, the board code may just leave them out (assuming they know what + the driver needs) or rely on the linker to strip them out (assuming + --gc-sections is being used.) + + To set up communication parameters for a given slave, the driver needs + to call spi_setup_slave(). This returns a pointer to an opaque + spi_slave struct which must be passed as a parameter to subsequent SPI + calls. This struct can be freed by calling spi_free_slave(), but most + driver probably don't want to do this. + + Before starting one or more SPI transfers, the driver must call + spi_claim_bus() to gain exclusive access to the SPI bus and initialize + the hardware. When all transfers are done, the driver must call + spi_release_bus() to make the bus available to others, and possibly + shut down the SPI controller hardware. + + spi_xfer() behaves mostly the same as before, but it now takes a + spi_slave parameter instead of a spi_chipsel function pointer. It also + got a new parameter, flags, which is used to specify chip select + behaviour. This may be extended with other flags in the future. + + This patch has been build-tested on all powerpc and arm boards + involved. I have not tested NIOS since I don't have a toolchain for it + installed, so I expect some breakage there even though I've tried + fixing up everything I could find by visual inspection. + + I have run-time tested this on AVR32 ATNGW100 using the atmel_spi and + DataFlash drivers posted as a follow-up. I'd like some help testing + other boards that use the existing SPI API. + + But most of all, I'd like some comments on the new API. Is this stuff + usable for everyone? If not, why? + + Changed in v4: + - Build fixes for various boards, drivers and commands + - Provide common struct spi_slave definition that can be extended by + drivers + - Pass a struct spi_slave * to spi_cs_activate and spi_cs_deactivate + - Make default bus and mode build-time configurable + - Override default SPI bus ID and mode on mx32ads and imx31_litekit. + + Changed in v3: + - Add opaque struct spi_slave for controller-specific data associated + with a slave. + - Add spi_claim_bus() and spi_release_bus() + - Add spi_free_slave() + - spi_setup() is now called spi_setup_slave() and returns a + struct spi_slave + - soft_spi now supports four SPI modes (CPOL|CPHA) + - Add bus parameter to spi_setup_slave() + - Convert the new i.MX32 SPI driver + - Convert the new MC13783 RTC driver + + Changed in v2: + - Convert the mpc8xxx_spi driver and the mpc8349emds board to the + new API. + + Signed-off-by: Haavard Skinnemoen + Tested-by: Guennadi Liakhovetski + +commit 289011207d999b2e4085150d2aa30d547ad9b800 +Author: Haavard Skinnemoen +Date: Fri May 16 11:10:30 2008 +0200 + + Move definition of container_of() to common.h + + AVR32 and AT91SAM9 both have their own identical definitions of + container_of() taken from the Linux kernel. Move it to common.h so + that all architectures can use it. + + container_of() is already used by some drivers, and will be used + extensively by the new and improved SPI API. + + Signed-off-by: Haavard Skinnemoen + +commit 110e006fe67fb4a6e1719ae6956c79b7ffc0148b +Author: Haavard Skinnemoen +Date: Fri May 16 11:08:11 2008 +0200 + + soft_i2c: Pull SDA high before reading + + Spotted by Dean Capindale. + + Systems that support open-drain GPIO properly are allowed provide an + empty I2C_TRISTATE define. However, this means that we need to be + careful not to drive SDA low when the slave is expected to respond. + + This patch adds a missing I2C_SDA(1) to read_byte() required to + tristate the SDA line on systems that support open-drain GPIO. + + Signed-off-by: Haavard Skinnemoen + +commit 3c1de1a6d36be9eee284a6c596a86e94f19cc5b2 +Author: Stefan Roese +Date: Mon May 19 11:34:53 2008 +0200 + + ppc4xx: Remove implementations of testdram() + + This patch removes the used testdram() implementations of the board + that are maintained by myself. + + Signed-off-by: Stefan Roese + +commit bbeff30cbd1c5d551eb0ad1c2239ec01844c0b0a +Author: Stefan Roese +Date: Mon Jun 2 17:37:28 2008 +0200 + + ppc4xx: Remove superfluous dram_init() call or replace it by initdram() + + Historically the 405 U-Boot port had a dram_init() call in early init + stage. This function was still called from start.S and most of the time + coded in assembler. This is not needed anymore (since a long time) and + boards should implement the common initdram() function in C instead. + + This patch now removed the dram_init() call from start.S and removes the + empty implementations that are scattered through most of the 405 board + ports. Some older board ports really implement this dram_init() though. + These are: + + csb272 + csb472 + ERIC + EXBITGEN + W7OLMC + W7OLMG + + I changed those boards to call this assembler dram_init() function now + from their board specific initdram() instead. This *should* work, but please + test again on those platforms. And it is perhaps a good idea that those + boards use some common 405 SDRAM initialization code from cpu/ppc4xx at + some time. So further patches welcome here. + + Signed-off-by: Stefan Roese + +commit 192f90e272b3989ee7b4a666d1fdab831f20f8d2 +Author: Stefan Roese +Date: Mon Jun 2 17:22:11 2008 +0200 + + ppc4xx: Use new 4xx SDRAM controller enable defines in common ECC code + + Signed-off-by: Stefan Roese + +commit 39b32be18cd33b53a84065edcd4e465165cc5564 +Author: Stefan Roese +Date: Mon Jun 2 17:20:03 2008 +0200 + + ppc4xx: Fix common ECC generation code for 440GP style platforms + + This patch makes the common 4xx ECC code really usable on 440GP style + platforms. + + Since the IBM DDR controller used on 440GP/GX/EP/GR is not register + compatible to the IBM DDR/2 controller used on 405EX/440SP/SPe/460EX/GT + we need to make some processor dependant defines used later on by the + driver. + + Signed-off-by: Stefan Roese + +commit ec724f883ee3f3925e6c55027e8ffa70ada83303 +Author: Stefan Roese +Date: Mon Jun 2 17:13:55 2008 +0200 + + ppc4xx: Change Kilauea to use the common DDR2 init function + + This patch changes the kilauea and kilauea_nand (for NAND booting) + board port to not use a board specific DDR2 init routine anymore. Now + the common code from cpu/ppc4xx is used. + + Thanks to Grant Erickson for all his basic work on this 405EX early + bootup. + + Signed-off-by: Stefan Roese + +commit 17ceb069b85fbb9269c4dc09b2c237f88334c5ba +Author: Stefan Roese +Date: Mon Jun 2 14:59:21 2008 +0200 + + ppc4xx: Consolidate PPC4xx SDRAM/DDR/DDR2 defines, part2 + + This patch now adds a new header file (asm-ppc/ppc4xx-sdram.h) for all + ppc4xx related SDRAM/DDR/DDR2 controller defines. + + Signed-off-by: Stefan Roese + +commit 36ea16f6a066ccb046e91ebce4f326b69f4c0569 +Author: Stefan Roese +Date: Mon Jun 2 14:57:41 2008 +0200 + + ppc4xx: Consolidate PPC4xx SDRAM/DDR/DDR2 defines, part1 + + This patch removes all SDRAM related defines from the PPC4xx headers + ppc405.h and ppc440.h. This is needed since now some 405 PPC's use + the same SDRAM controller as 440 systems do (like 405EX and 440SP). + + It also introduces new defines for the equipped SDRAM controller based on + which PPC variant is used. There new defines are: + + used on 405GR/CR/EP and some Xilinx Virtex boards. + + used on 440GP/GX/EP/GR. + + used on 440EPx/GRx. + + used on 405EX/r/440SP/SPe/460EX/GT. + + Signed-off-by: Stefan Roese + +commit 64852d09e06dd6db2b2db2a3c59bc2db176a54d6 +Author: Stefan Roese +Date: Mon Jun 2 14:35:44 2008 +0200 + + ppc4xx/NAND_SPL: Consolidate 405 and 440 NAND booting code in start.S + + This patch consolidates the 405 and 440 parts of the NAND booting code + selected via CONFIG_NAND_SPL. Now common code is used to initialize the + SDRAM by calling initdram() and to "copy/relocate" to SDRAM/OCM/etc. + Only *after* running from this location, nand_boot() is called. + + Please note that the initsdram() call is now moved from nand_boot.c + to start.S. I experienced problems with some boards like Kilauea + (405EX), which don't have internal SRAM (OCM) and relocation needs to + be done to SDRAM before the NAND controller can get accessed. When + initdram() is called later on in nand_boot(), this can lead to problems + with variables in the bss sections like nand_ecc_pos[]. + + Signed-off-by: Stefan Roese + Acked-by: Scott Wood + +commit 8a24c07ba5da2c72ad1f05e3eb8a463750200c98 +Author: Grant Erickson +Date: Thu May 22 14:44:24 2008 -0700 + + ppc4xx: Enable Primordial Stack for 40x and Unify ECC Handling + + This patch (Part 2 of 2): + + * Rolls up a suite of changes to enable correct primordial stack and + global data handling when the data cache is used for such a purpose + for PPC40x-variants (i.e. CFG_INIT_DCACHE_CS). + + * Related to the first, unifies DDR2 SDRAM and ECC initialization by + eliminating redundant ECC initialization implementations and moving + redundant SDRAM initialization out of board code into shared 4xx + code. + + * Enables MCSR visibility on the 405EX(r). + + * Enables the use of the data cache for initial RAM on + both AMCC's Kilauea and Makalu and removes a redundant + CFG_POST_MEMORY flag from each board's CONFIG_POST value. + + - Removed, per Stefan Roese's request, defunct memory.c file for + Makalu and rolled sdram_init from it into makalu.c. + + With respect to the 4xx DDR initialization and ECC unification, there + is certainly more work that can and should be done (file renaming, + etc.). However, that can be handled at a later date on a second or + third pass. As it stands, this patch moves things forward in an + incremental yet positive way for those platforms that utilize this + code and the features associated with it. + + Signed-off-by: Grant Erickson + Signed-off-by: Stefan Roese + +commit c821b5f120bedf73867513466412587c6912a8f8 +Author: Grant Erickson +Date: Thu May 22 14:44:14 2008 -0700 + + ppc4xx: Enable Primordial Stack for 40x and Unify ECC Handling + + This patch (Part 1 of 2): + + * Rolls up a suite of changes to enable correct primordial stack and + global data handling when the data cache is used for such a purpose + for PPC40x-variants (i.e. CFG_INIT_DCACHE_CS). + + * Related to the first, unifies DDR2 SDRAM and ECC initialization by + eliminating redundant ECC initialization implementations and moving + redundant SDRAM initialization out of board code into shared 4xx + code. + + * Enables MCSR visibility on the 405EX(r). + + * Enables the use of the data cache for initial RAM on + both AMCC's Kilauea and Makalu and removes a redundant + CFG_POST_MEMORY flag from each board's CONFIG_POST value. + + - Removed, per Stefan Roese's request, defunct memory.c file for + Makalu and rolled sdram_init from it into makalu.c. + + With respect to the 4xx DDR initialization and ECC unification, there + is certainly more work that can and should be done (file renaming, + etc.). However, that can be handled at a later date on a second or + third pass. As it stands, this patch moves things forward in an + incremental yet positive way for those platforms that utilize this + code and the features associated with it. + + Signed-off-by: Grant Erickson + Signed-off-by: Stefan Roese + +commit a439680019e06171d4a5694b7992accce87f590e +Author: Grant Erickson +Date: Wed May 21 13:28:30 2008 -0700 + + PPC4xx: Simplified post_word_{load, store} + + This patch simplifies post_word_{load,store} by using the preprocessor + to eliminate redundant, copy-and-pasted code. + + Signed-off-by: Grant Erickson + +commit f979690ee337450b2030aba128f95b7a8d9881c0 +Author: Kumar Gala +Date: Thu May 15 15:13:08 2008 -0500 + + Fix warnings from gcc-4.3.0 build on a ppc host + + * The cfi_flash.c memset fix actual allows the board to boot so there is + a bit more going on here than just resolving warnings associated with + uninitialized variables. + + * include/asm/bitops.h:302: warning: '__swab32p' is static but used in + inline function 'ext2_find_next_zero_bit' which is not static + + Signed-off-by: Kumar Gala + +commit 9b124a68346ce9605b6e1fcf79e1021541cdba9e +Author: Becky Bruce +Date: Wed May 14 13:09:51 2008 -0500 + + MPC512x: Change traps.c to not reference non-addressable memory + + Currently, END_OF_RAM is used by the trap code to determine if + we should attempt to access the stack pointer or not. However, + on systems with a lot of RAM, only a subset of the RAM is + guaranteed to be mapped in and accessible. Change END_OF_RAM + to use get_effective_memsize() instead of using the raw ram + size out of the bd. + + Signed-off-by: Becky Bruce + +commit 81673e9ae14b771cd13faf19947192599cae3959 +Author: Kumar Gala +Date: Tue May 13 19:01:54 2008 -0500 + + Make sure common.h is the first include. + + If common.h isn't first we can get CONFIG_ options defined in the + board config file ignored. This can cause an issue if any of those + config options impact the size of types of data structures + (eg CONFIG_PHYS_64BIT). + + Signed-off-by: Kumar Gala + +commit 95d449ad4de79dd32b1705b8a4d3550f1e9081e3 +Author: Marian Balakowicz +Date: Tue May 13 15:53:29 2008 +0200 + + Avoid initrd and logbuffer area overlaps + + Add logbuffer to reserved LMB areas to prevent initrd allocation + from overlaping with it. + + Make sure to use correct logbuffer base address. + + Signed-off-by: Marian Balakowicz + +commit 6956d53d9934862507f83f0e3255dfd4662e7482 +Author: Sascha Laue +Date: Tue May 13 13:29:54 2008 +0200 + + lwmon5: add memory-pattern-test to FPGA POST. + +commit e34a0e911b6a1568d0ca864234fbd0ee060d9b35 +Author: Becky Bruce +Date: Thu May 8 19:02:51 2008 -0500 + + PPC: 86xx Add bat registers to reginfo command + + Signed-off-by: Becky Bruce + +commit d5b9b8cdb8b6eb3a8b0f5d9909d69ccc9c703ed9 +Author: Becky Bruce +Date: Fri May 9 15:41:35 2008 -0500 + + PPC: Add print_bats() to lib_ppc/bat_rw.c + + This function prints the values of all the BAT register + pairs - I needed this for debug earlier this week; adding it to + lib_ppc so others can use it (and add it to reginfo commands + if so desired). + + Signed-off-by: Becky Bruce + +commit c148f24c15743a02e855636e6bed013bd121f7f2 +Author: Becky Bruce +Date: Thu May 15 21:29:04 2008 -0500 + + PPC: Change lib_ppc/bat_rw.c to use high bats + + Currently, this code only deals with BATs 0-3, which makes + it useless on systems that support BATs 4-7. Add the + support for these registers. + + Signed-off-by: Becky Bruce + +commit 31d826722434931e1152a09d140187dcf72f8aac +Author: Becky Bruce +Date: Thu May 8 19:02:12 2008 -0500 + + PPC: Create and use CONFIG_HIGH_BATS + + Change all code that conditionally operates on high bat + registers (that is, BATs 4-7) to look at CONFIG_HIGH_BATS + instead of the myriad ways this is done now. Define the option + for every config for which high bats are supported (and + enabled by early boot, on parts where they're not always + enabled) + + Signed-off-by: Becky Bruce + +commit aa3b8bf9c30065bb2ea852799d32db5020598495 +Author: Wolfgang Grandegger +Date: Wed May 28 19:55:19 2008 +0200 + + E1000: Add support for the 82541GI LF Intel Pro 1000 GT Desktop Adapter + + Signed-off-by: Wolfgang Grandegger + Signed-off-by: Ben Warren + +commit ff36fbb2e7583fb808eef773f511489c7a9c2df3 +Author: TsiChung Liew +Date: Wed May 28 13:06:25 2008 -0500 + + ColdFire: Add 10 base ethernet support for mcf5445x + + Signed-off-by: TsiChung Liew + Signed-off-by: Ben Warren + +commit 1a9fcc4b765599db24fa9c32293599f24c7a19ba +Author: Jason McMullan +Date: Fri May 30 00:53:38 2008 +0900 + + mips: Add an 'include/asm/errno.h', like all other architectures + + All other u-boot architectures have an include/asm/errno.h, so + this change adds it to the mips include/asm-mips headers also. + + Stolen from Linux 2.6.25. + + Signed-off-by: Jason McMullan + +commit e2ad8426624bac457acc6925b6ff408e9bf20466 +Author: Shinya Kuribayashi +Date: Fri May 30 00:53:38 2008 +0900 + + [MIPS] : Update coprocessor register access macros + + Signed-off-by: Shinya Kuribayashi + +commit 1a3adac81c292f2ee76e43cdeb2fbe8f915fe194 +Author: Shinya Kuribayashi +Date: Fri May 30 00:53:38 2008 +0900 + + [MIPS] : Update register / bit field definitions + + Signed-off-by: Shinya Kuribayashi + +commit bf462ae450a7f2eeeddc699ed345b391e3263540 +Author: Shinya Kuribayashi +Date: Fri May 30 00:53:37 2008 +0900 + + [MIPS] : CodinygStyle cleanups + + No functional changes. + + Signed-off-by: Shinya Kuribayashi + +commit 89a1550ec6b74452274a7a23127936e2c7eec711 +Author: Jason McMullan +Date: Fri May 30 00:53:37 2008 +0900 + + mips: If CONFIG_CMD_SPI is defined, call spi_init() + + The mips architecture currently does not call 'spi_init()' in the generic + board initialization routine is CONFIG_CMD_SPI is defined. + + This patch rectifies that problem. + + Signed-off-by: Jason McMullan + Signed-off-by: Shinya Kuribayashi + +commit e996bc339b0f39f6c0b29b1455ba7eb318b023d3 +Author: Jason McMullan +Date: Fri May 30 00:53:37 2008 +0900 + + [MIPS] lib_mips/board.c: Add nand_init + + This patch adds the standard 'nand_init()' call to the mips generic + 'board_init_r()' call, bringing MIPS in line with the other architectures. + + Signed-off-by: Jason McMullan + Signed-off-by: Shinya Kuribayashi + +commit d6ac2ed893c2168738aee01579d6283af8d37045 +Author: Scott Wood +Date: Thu May 22 10:49:46 2008 -0500 + + Remove prototypes of nand_init() in favor of including nand.h. + + Likewise with onenand_init(). + + Signed-off-by: Scott Wood + +commit 229c56f07a82eacda8c8720cb146fc9be0f6db54 +Author: Scott Wood +Date: Thu May 22 10:49:00 2008 -0500 + + Make onenand_uboot.h self-sufficient. + + Don't assume types are provided by previously included headers. + + Signed-off-by: Scott Wood + +commit 9723bbb46abb7b2ca24eead5114a3faa58060c20 +Author: Dirk Behme +Date: Wed Jan 16 14:26:59 2008 +0100 + + nand: Correct NAND erase percentage output + + For NAND erase sizes smaller than one NAND erase block, erase + percentage output becomes grater than 100% e.g. + + -- cut -- + > nand info + Device 0: NAND 64MiB 1,8V 8-bit, sector size 16 KiB + > nand erase 0x100000 0x2000 + NAND erase: device 0 offset 0x100000, size 0x2000 + Erasing at 0x100000 -- 200% complete. + OK + > + -- cut -- + + Correct this and give user a warning that more is erased than specified: + + -- cut -- + > nand erase 0x100000 0x2000 + NAND erase: device 0 offset 0x100000, size 0x2000 + Warning: Erase size 0x00002000 smaller than one erase block 0x00004000 + Erasing 0x00004000 instead + Erasing at 0x100000 -- 100% complete. + OK + > + -- cut -- + + Signed-off-by: Dirk Behme + +commit 5922db6c0948506be91e0de44e7a6863a18a417f +Author: Stelian Pop +Date: Tue May 13 17:31:24 2008 +0200 + + Cleanup nand_info[] declaration. + + The nand_info array is declared as extern in several .c files. + Those days, nand.h contains a reference to the array, so there is + no need to declare it elsewhere. + + Signed-off-by: Stelian Pop + Signed-off-by: Scott Wood + +commit 135f0a7488af2947adbe4b40b79280bdfe5e9886 +Author: Scott Wood +Date: Mon May 19 09:30:43 2008 -0500 + + NAND: Provide a sane default for NAND_MAX_CHIPS. + + This allows the header to be included regardless of whether a board's + config file provides NAND-related defininitions. + + Signed-off-by: Scott Wood + +commit a8092c021d27f27f4b323b7d49979ca01b3fc19d +Author: Haavard Skinnemoen +Date: Mon May 26 12:19:10 2008 +0200 + + avr32: Fix theoretical race in udelay() + + If the specified delay is very short, the cycle counter may go past the + "end" time we are waiting for before we get around to reading it. + + Fix it by checking the different between the cycle count "now" and the + cycle count at the beginning. This will work as long as the delay + measured in number of cycles is below 2^31. + + Signed-off-by: Haavard Skinnemoen + +commit 48ea623eae8674793372e3e7c95e72e5a44d7a95 +Author: Haavard Skinnemoen +Date: Wed May 21 13:01:09 2008 +0200 + + avr32: Compile atmel_mci.o conditionally + + Remove #ifdef CONFIG_MMC from the source file and use conditional + compilation in the Makefile instead. + + Signed-off-by: Haavard Skinnemoen + +commit e92a5bf8330654e33ac13f6b3058634e58f5d1c0 +Author: Haavard Skinnemoen +Date: Thu May 22 12:28:25 2008 +0200 + + avr32: Fix wrong error flags in atmel_mci driver + + Make sure we check for CRC errors when sending commands that use CRC + checking. + + Reported-by: Gururaja Hebbar K R + Signed-off-by: Haavard Skinnemoen + +commit 7a96ddadd13e6ac9a829affce9b6f8823f580e49 +Author: Haavard Skinnemoen +Date: Wed May 21 11:10:59 2008 +0200 + + avr32: Fix two warnings in atmel_mci.c + + The warnings are harmless but annoying. Let's fix them. + + Signed-off-by: Haavard Skinnemoen + +commit a23e277c4a3a2bbc42d237aae29da3a8971e757f +Author: Haavard Skinnemoen +Date: Mon May 19 11:36:28 2008 +0200 + + avr32: Rework SDRAM initialization code + + This cleans up the SDRAM initialization and related code a bit, and + allows faster booting. + + * Add definitions for EBI and internal SRAM to asm/arch/memory-map.h + * Remove memory test from sdram_init() and make caller responsible + for verifying the SDRAM and determining its size. + * Remove base_address member from struct sdram_config (was sdram_info) + * Add data_bits member to struct sdram_config and kill CFG_SDRAM_16BIT + * Add support for a common STK1000 hack: 16MB SDRAM instead of 8. + + Signed-off-by: Haavard Skinnemoen + +commit 95107b7c028806919630bf02c653aa8f4f867c94 +Author: Haavard Skinnemoen +Date: Mon May 19 11:27:37 2008 +0200 + + avr32: Do stricter stack checking in the exception handler + + Don't do a stack dump if the stack pointer is outside the memory area + reserved for stack. + + Signed-off-by: Haavard Skinnemoen + +commit caf83ea888a0220f41747d0b7748fa43b4a4bd49 +Author: Haavard Skinnemoen +Date: Fri May 2 15:32:57 2008 +0200 + + avr32: Use the same entry point for reset and exception handling + + Since the reset vector is always aligned to a very large boundary, we + can save a couple of KB worth of alignment padding by placing the + exception vectors at the same address. + + Deciding which one it is is easy: If we're handling an exception, the + CPU is in Exception mode. If we're starting up after reset, the CPU is + in Supervisor mode. So this adds a very minimal overhead to the reset + path (only executed once) and the exception handling path (normally + never executed at all.) + + Signed-off-by: Haavard Skinnemoen + +commit 0c16eed2189a190bd5655b33c029f809a9b31128 +Author: Haavard Skinnemoen +Date: Fri May 2 15:24:22 2008 +0200 + + avr32: Put memset in its own section + + All C code is compiled with -ffunction-sections -fdata-sections. + Assembly functions should get their own sections as well so that + everything looks consistent. + + Signed-off-by: Haavard Skinnemoen + +commit 3ace2527ba80bd2fe1bceaab50d0b3c4fb5dd020 +Author: Haavard Skinnemoen +Date: Fri May 2 15:21:40 2008 +0200 + + avr32: Rename pm_init() as clk_init() and make SoC-specific + + pm_init() was always more about clock initialization than anything + else. Dealing with PLLs, clock gating and such is also inherently + SoC-specific, so move it into a SoC-specific directory. + + Signed-off-by: Haavard Skinnemoen + +commit 4f5972c3b2454c22957f2842cfe64ec8118e015b +Author: Haavard Skinnemoen +Date: Wed Apr 30 16:15:57 2008 +0200 + + avr32: Use new-style Makefile for the at32ap platform + + This makes it easier to avoid compiling certain files later. + + Signed-off-by: Haavard Skinnemoen + +commit a9b2bb78a1bd8ebdb633509bdd1c8134d527b213 +Author: Haavard Skinnemoen +Date: Wed Apr 30 14:36:47 2008 +0200 + + avr32: Remove unused file cpu/at32ap/pm.c + + Signed-off-by: Haavard Skinnemoen + +commit 44453b25b06426eef0b7b2fa7c026fdf19ce34f2 +Author: Haavard Skinnemoen +Date: Wed Apr 30 14:19:28 2008 +0200 + + avr32: Clean up the HMATRIX code + + Rework the HMATRIX configuration interface so that it becomes easier + to configure the HMATRIX for boards with special needs, and add new + parts. + + The HMATRIX header file has been split into a general, + chip-independent part with register definitions, etc. and a + chip-specific part with SFR bitfield definitions and master/slave + identifiers. + + Signed-off-by: Haavard Skinnemoen + +commit 0a2e48792dd372c90b80059f3235e67a567e16fc +Author: Haavard Skinnemoen +Date: Thu Nov 22 12:14:11 2007 +0100 + + avr32: Add support for the ATSTK1006 board + + This is a replacement for ATSTK1002 with 64MB SDRAM and NAND flash on + board. It's currently in production and will be available soon. + + Signed-off-by: Haavard Skinnemoen + +commit 781eb9a1e4af4bd34c138e6126ec5cc6dd4b5440 +Author: Haavard Skinnemoen +Date: Tue Apr 29 12:53:05 2008 +0200 + + avr32: Get rid of the .flashprog section + + The .flashprog section was only needed back when we were running + directly from flash, and it's even more useless on NGW100 since it + uses the CFI flash driver which never used this workaround in the + first place. + + Remove it on STK1000 as well, and get rid of all the associated code and + annotations. + + Signed-off-by: Haavard Skinnemoen + +commit cdd42c0c7a5205fc380912d83229069a71ea3abf +Author: Haavard Skinnemoen +Date: Wed Apr 30 13:09:56 2008 +0200 + + avr32: Use correct condition around macb clock accessors + + get_macb_pclk_rate() and get_macb_hclk_rate() should be available when + the chip has a MACB controller, not when it has a USART. + + Signed-off-by: Haavard Skinnemoen + +commit f793a3581901ff39c2abb94012d9bbc8573ccf02 +Author: David Brownell +Date: Wed Apr 16 22:57:58 2008 -0700 + + avr32: Disable the AP7000 internal watchdog on startup + + This patch forces the watchdog off in all cases. That will at least + get rid of the constant reboot cycle, though it won't let the watchdog + actually run in the new kernels: its probe() comes up with a polite + warning. + + Signed-off-by: Haavard Skinnemoen + +commit 55ac7a7490b55da56659f95d82a0c83b9756df27 +Author: David Brownell +Date: Fri Feb 22 12:54:39 2008 -0800 + + avr32: stk1002 and ngw100 convergence + + Make STK1002 and NGW100 boards act more alike: + - STK boards can use as many arguments as NGW + - STK boards don't need to manage FPGAs either + - NGW commands should match STK ones + + Also spell U-Boot right in prompts for STK1002 and NGW100. + + Signed-off-by: David Brownell + [haavard.skinnemoen@atmel.com: update STK100[34] as well] + Signed-off-by: Haavard Skinnemoen + +commit 5e1882df6a3efc7de5524d28cea4ecde7d163d54 +Author: Sergei Poselenov +Date: Tue May 27 13:47:00 2008 +0200 + + Socrates: Fix PCI bus frequency report + + Signed-off-by: Sergei Poselenov + +commit 791e1dba8de76ad8e762a7badb869f224a1f8b82 +Author: Sergei Poselenov +Date: Tue May 27 11:49:13 2008 +0200 + + Socrates: Added USB support. + + Signed-off-by: Sergei Poselenov + +commit 5a904e5637cff1d708dc67098004f83ba9e84c54 +Author: Sergei Poselenov +Date: Tue May 27 11:35:02 2008 +0200 + + USB: add new configuration variable CONFIG_PCI_OHCI_DEVNO + + In case of several PCI USB controllers on a board this variable + specifys which controller to use. + See doc/README.generic_usb_ohci for details. + + Signed-off-by: Sergei Poselenov + +commit 2f7468aeba60e1288030a8d007c4e63bd3f13221 +Author: Sergei Poselenov +Date: Tue May 27 10:36:07 2008 +0200 + + Socrates: add support for DS75 Digital Thermo Sensor on I2C bus. + + Signed-off-by: Sergei Poselenov + +commit 83e9d7a2614d4006b92690afa3390c291734267e +Author: Sergei Poselenov +Date: Mon May 26 18:16:04 2008 +0200 + + Socrates: Config file cleanup. + + Signed-off-by: Sergei Poselenov + +commit 602cac1389b755b223272f2328a47e6f8c240848 +Author: Jean-Christophe PLAGNIOL-VILLARD +Date: Sat May 24 12:47:46 2008 +0200 + + MAKEALL: add at91 list + + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 290ef6436838b1cc013bd67e0e0495c9eb3e23c0 +Author: Ron Madrid +Date: Fri May 23 15:37:05 2008 -0700 + + Add Marvell 88E1118 support for TSEC + + Signed-off-by: Ron Madrid + Signed-off-by: Ben Warren + +commit 557b377d8bfc8b833b6e749457bcdfa298331a24 +Author: Jens Gehrlein +Date: Mon May 5 14:06:11 2008 +0200 + + smc911x: add 16 bit support + + Signed-off-by: Jens Gehrlein + Signed-off-by: Ben Warren + +commit c918261c6d9f265f88baf70f8a73dfe6f0cb9596 +Author: Christian Eggers +Date: Wed May 21 22:12:00 2008 +0200 + + USB: replace old swap_ with proper endianess conversion macros + + Signed-off-by: Christian Eggers + Signed-off-by: Markus Klotzbuecher + +commit fb63939b4fe140849cdba69f9e64a3e0e2f3ce1c +Author: Christian Eggers +Date: Wed May 21 21:29:10 2008 +0200 + + Fix endianess conversion in usb_ohci.c + + Signed-off-by: Christian Eggers + Signed-off-by: Markus Klotzbuecher + +commit 477434c63c2ea5baa5c6c4e43500786f436511ff +Author: Sergei Poselenov +Date: Thu May 22 01:15:53 2008 +0200 + + USB: add support for multiple PCI OHCI controllers + + Add new configuration variable CONFIG_PCI_OHCI_DEVNO. + In case of several PCI USB controllers on a board this variable + specifys which controller to use. + + Also add USB support for sokrates board. + + See doc/README.generic_usb_ohci for details. + + Signed-off-by: Sergei Poselenov + Signed-off-by: Markus Klotzbuecher + +commit ce6754df61cbe23b5b73d095a00ac9a8504b3d77 +Author: Wolfgang Denk +Date: Wed May 21 16:56:08 2008 +0200 + + Fix some whitespace issues + + introduced by 53677ef18 "Big white-space cleanup." + + Signed-off-by: Wolfgang Denk + +commit 4416603aeb06861b468b06a981e52c3ff805db7b +Author: York Sun +Date: Mon May 12 14:36:39 2008 -0500 + + Make ads5121 out-of-tree compiling safe + + Reuse the existing DIU driver in board/freescale/common. + + Signed-off-by: York Sun + +commit 0e1bad47cd345c76c91a64caf41011e431b62599 +Author: York Sun +Date: Mon May 5 10:20:01 2008 -0500 + + Adding DIU support for Freescale 5121ADS + + Add DIU and cfb console support to FSL 5121ADS board. + + Use #define CONFIG_VIDEO in config file to enable fb console. + + Signed-off-by: York Sun + +commit a48ff68d235e671176f6b496c44246dbe5e0a93f +Author: York Sun +Date: Mon May 5 10:20:00 2008 -0500 + + Replace DPRINTF with debug + + Remove DPRINTF macro and replace it with generic debug macro. + + Signed-off-by: York Sun + +commit 3b80c5f574ad7f6e1c55a68f42752b427fdf778d +Author: York Sun +Date: Mon May 5 10:19:59 2008 -0500 + + Move pixel clock setting to board file + + The clock divider has different format in 5121 and 8610. This patch moves it to + board specific code. + + Signed-off-by: York Sun + +commit 53677ef18e25c97ac613349087c5cb33ae5a2741 +Author: Wolfgang Denk +Date: Tue May 20 16:00:29 2008 +0200 + + Big white-space cleanup. + + This commit gets rid of a huge amount of silly white-space issues. + Especially, all sequences of SPACEs followed by TAB characters get + removed (unless they appear in print statements). + + Also remove all embedded "vim:" and "vi:" statements which hide + indentation problems. + + Signed-off-by: Wolfgang Denk + +commit 2f845dc2bdf461bfee9fa25823f769f5db9eba0b +Author: Sergei Poselenov +Date: Thu May 8 17:46:23 2008 +0200 + + socrates: fix second TSEC configuration (it is actually TSEC3) + + Signed-off-by: Sergei Poselenov + +commit 793670c3c0f0f72caead62f0be9fc3d9fbc6060f +Author: Sergei Poselenov +Date: Thu May 8 14:17:08 2008 +0200 + + Fixed reset for socrates + + Signed-off-by: Sergei Poselenov + +commit e18575d5f589a62e19c70d471d4b4e27cad3af56 +Author: Sergei Poselenov +Date: Wed May 7 15:10:49 2008 +0200 + + socrates: changes to support FDT + + Signed-off-by: Sergei Poselenov + Signed-off-by: Wolfgang Denk + +commit 5d108ac8f435924c624cd6aaacd44f35f5cf94c0 +Author: Sergei Poselenov +Date: Wed Apr 30 11:42:50 2008 +0200 + + Initial support for "Socrates" board + + Signed-off-by: Sergei Poselenov + +commit 0e15ddd11f1a84c465e434eb051d2ef08ef02b9b +Author: Yuri Tikhonov +Date: Thu May 8 15:46:42 2008 +0200 + + POST: replace the LOGBUFF_INITIALIZED flag in gd->post_log_word (1 << 31) with the GD_FLG_LOGINIT flag in gd->flags. + + This way we become able to utilize the full post_log_word for POST + activities (overwise, POST ECC, which has 0x8000 ID, could be + erroneously treated as started in post_output_backlog() even if there + was actually no POST ECC run (because of OCM POST failure, for + example). + + Signed-off-by: Yuri Tikhonov + +commit 7845d49094c81321021b50a4dbb8864d2f3777e4 +Author: Yuri Tikhonov +Date: Thu May 8 15:46:02 2008 +0200 + + POST: mark OCM test as POST_STOP + + Signed-off-by: Ilya Yanok + +commit 28a385065882d6cb6ac5f443311ff87887ed7c13 +Author: Yuri Tikhonov +Date: Thu May 8 15:45:26 2008 +0200 + + POST: add POST_STOP flag + + Don't run futher tests in case of a test fails that is marked as + POST_STOP. + + Signed-off-by: Ilya Yanok + Signed-off-by: Yuri Tikhonov + +commit a525145d8110d15b4389d23c3ea8a78f22509d3f +Author: Yuri Tikhonov +Date: Thu May 8 15:44:16 2008 +0200 + + POST: switch CFG_POST_OCM with CFG_POST_CODEC (workaround) + + Switch the OCM testid with the codec one. The reason is that current + implementation requires the POST_ROM testid to fit into lower 16 + bits, and the codec test will never run with POST_ROM hopefully. + + Signed-off-by: Ilya Yanok + +commit 8b96c788d58f7cb85a89ee3f19c9b335d22443cd +Author: Yuri Tikhonov +Date: Thu May 8 15:43:28 2008 +0200 + + lwmon5: enable OCM post test on lwmon5 board + + Signed-off-by: Ilya Yanok + +commit 6e8ec682268493b8d098f99e17b1ce71b4448977 +Author: Yuri Tikhonov +Date: Thu May 8 15:42:47 2008 +0200 + + POST: OCM test added. + + Added OCM test to POST layer. This version runs before all other tests + but doesn't yet interrupt post sequence on failure. + + Signed-off-by: Ilya Yanok + Signed-off-by: Yuri Tikhonov + +commit 6891260bdd935a382c95d9fa333922b0dfded68a +Author: Yuri Tikhonov +Date: Thu May 8 15:40:39 2008 +0200 + + POST: typo fix + + Signed-off-by: Ilya Yanok + +commit 727f63334676e760877d43bfb8f0e9331ac8b101 +Author: Hebbar +Date: Tue May 20 02:16:36 2008 -0700 + + common/usb.c: fix incorrect escape sequence + + Signed off by: Gururaja Hebbar + +commit 4ce1e23b5e12283579828b3d23e8fd6e1328a7aa +Author: York Sun +Date: Thu May 15 15:26:27 2008 -0500 + + Fix 8313ERDB board configuration + + Change LCRR clock ratio from 2 to 4 to commodate VSC7385. + Correct TSEC1 vs TSEC2 assignment. + Define ETHADDR and ETH1ADDR always. + + Signed-off-by: York Sun + Signed-off-by: Timur Tabi + +commit 2c289e320dcfb3760e99cf1d765cb067194a1202 +Author: Jon Loeliger +Date: Mon May 19 09:47:25 2008 -0500 + + mpc86xx: Removed unused and unconfigured memory test code. + + Besides, other common code exists. + + Signed-off-by: Jon Loeliger + +commit 180a90abdae72587c0f679edf8991455e559440d +Author: Wolfgang Denk +Date: Mon May 19 12:47:11 2008 +0200 + + Release v1.3.3 + + Update CHANGELOG for release. + + Signed-off-by: Wolfgang Denk + commit 16bedc661de0dae767b1377d8413373a3fbcfa79 Author: Stefan Roese Date: Mon May 19 07:14:38 2008 +0200 @@ -88,6 +3801,17 @@ Date: Wed May 14 23:34:53 2008 +0200 Signed-off-by: Wolfgang Denk +commit 0c11935cd62ca1f65eeb228ff4c848440d4553bf +Author: Gary Jennejohn +Date: Wed May 14 13:39:22 2008 +0200 + + ppc4xx: QUAD100HD: Allow the environment to be put into flash. + + After moving TEXT_BASE the value for CFG_ENV_ADDR was incorrect. Also + use a redundant environment. + + Signed-off-by: Gary Jennejohn + commit cda2a4a9961fd4341b7db305cb22fc05957e8b77 Author: Wolfgang Denk Date: Wed May 14 13:55:30 2008 +0200 @@ -166,6 +3890,19 @@ Date: Tue May 13 23:15:52 2008 +0200 Signed-off-by: Wolfgang Denk +commit 54694a91428f6c3280fe1ee0923488a1e7e8dbc4 +Author: Stelian Pop +Date: Tue May 13 17:31:24 2008 +0200 + + Cleanup nand_info[] declaration. + + The nand_info array is declared as extern in several .c files. + Those days, nand.h contains a reference to the array, so there is + no need to declare it elsewhere. + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + commit 70fab1908fc1734a403711eaabbef546bc4b77dc Author: Stefan Roese Date: Tue May 13 20:22:01 2008 +0200 @@ -221,6 +3958,308 @@ Date: Sun May 11 23:13:57 2008 +0200 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD +commit 67e3beb52c320b0a31cf030716c99392cde2d532 +Author: Stelian Pop +Date: Fri May 9 21:46:51 2008 +0200 + + AT91: Cleanup unused config header file definitions. + + CONFIG_ENV_OVERWRITE is commented out in the config header files, + so let's cleanup the files by removing the whole definition. + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 19883aede2ac0a522493bfb2b35a7dbb200071b1 +Author: Stelian Pop +Date: Thu May 8 14:52:34 2008 +0200 + + Support AT91CAP9 revC CPUs + + The AT91CAP9 revC CPU has a few differences over the previous, + revB CPU which was distributed in small quantities only (revA was + an internal Atmel product only). + + The revC silicon needs a special initialisation sequence to + switch from the internal (imprecise) RC oscillator to the + external 32k clock. + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 098b7b4b441b12c2a64dd517930f43c793542759 +Author: Stelian Pop +Date: Thu May 8 14:52:33 2008 +0200 + + Use custom logo for Atmel boards + + This patch adds a custom vendor logo for the Atmel AT91 boards. + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 761c70b80cdd3bead40146b96a8e713d6ae01632 +Author: Stelian Pop +Date: Thu May 8 14:52:32 2008 +0200 + + AT91SAM9RLEK: hook up the ATMEL LCD driver + + This patch makes the necessary adaptations (PIO configurations and + defines in config header file) to hook up the Atmel LCD driver to the + AT91SAM9RLEK board. + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 56a2479cd7fecabdd91348a775b2801dd2e65c7f +Author: Stelian Pop +Date: Thu May 8 14:52:31 2008 +0200 + + AT91SAM9263EK: hook up the ATMEL LCD driver + + This patch makes the necessary adaptations (PIO configurations and + defines in config header file) to hook up the Atmel LCD driver to the + AT91SAM9263EK board. + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 820f2a958325061a446115f3035e48e4726b3390 +Author: Stelian Pop +Date: Thu May 8 14:52:30 2008 +0200 + + AT91SAM9261EK: hook up the ATMEL LCD driver + + This patch makes the necessary adaptations (PIO configurations and + defines in config header file) to hook up the Atmel LCD driver to the + AT91SAM9261EK board. + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit c139b17d20c8371c1e0a8d7fb27c11050cf86304 +Author: Stelian Pop +Date: Thu May 8 14:52:29 2008 +0200 + + AT91CAP9ADK: hook up the ATMEL LCD driver + + This patch makes the necessary adaptations (PIO configurations and + defines in config header file) to hook up the Atmel LCD driver to the + AT91CAP9ADK board. + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 39cf480484fcce5c04a590ee1c30be0c17b02c34 +Author: Stelian Pop +Date: Fri May 9 21:57:18 2008 +0200 + + Add ATMEL LCD driver + + This patch adds support for the ATMEL LCDC driver which is used on some + AT91 and AVR platforms. + + Is has been tested with the AT91CAP9ADK, AT91SAM9261EK, AT91SAM9263EK and + AT91SAM9RLEK boards. Adaptation for AVR32 should probably be easy. + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 2118ebb44dc40f8117c94950fd95799a9ef821b2 +Author: Stelian Pop +Date: Thu May 8 18:52:25 2008 +0200 + + AT91SAM9RLEK support + + This patch adds support for the AT91SAM9RL chip and the AT91SAM9RLEK + board. + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 8e429b3eee23927c1222679f6b6f53667b21595c +Author: Stelian Pop +Date: Thu May 8 18:52:23 2008 +0200 + + AT91SAM9263EK support + + This patch adds support for the AT91SAM9263 chip and the AT91SAM9263EK + board. + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit d99a8ff66d8ae87e5c87590ed2e4ead629540607 +Author: Stelian Pop +Date: Thu May 8 20:52:22 2008 +0200 + + AT91SAM9261EK support + + This patch adds support for the AT91SAM9261 chip and the AT91SAM9261EK + board. + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 86c8c8a414988c50104a3b02c29f50af2be738c0 +Author: Stelian Pop +Date: Thu May 8 20:52:21 2008 +0200 + + AT91SAM9260EK: Fix dataflash offsets in CONFIG_BOOTCOMMAND + + This patch fixes the dataflash offsets used in CONFIG_BOOTCOMMAND + in order to cope with the changes in DataFlash partitionning scheme + (cset c3a60cb3). + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 96996ac25d5222611a8888968db6e53a6d3726da +Author: Stelian Pop +Date: Thu May 8 20:52:20 2008 +0200 + + AT91SAM9260EK: Normalize BOOTARGS + + This patch adapts CONFIG_BOOTARGS to the chosen boot method (boot from + DataFlash or from NAND), and gives to Linux a fully specified mtdparts + variable. + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 79f0cb6e9c54d31a1d9e3f5e226a9bebc3c3a47a +Author: Stelian Pop +Date: Thu May 8 20:52:19 2008 +0200 + + AT91SAM9260EK: Normalize SPI timings + + This patch changes the SPI timings to closely match the ones + used by the Linux kernel and the Atmel's own bootstrap project. + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit c1212b2f5c5ed440bf8e9ebc8e4fd7488858b935 +Author: Stelian Pop +Date: Thu May 8 20:52:18 2008 +0200 + + AT91SAM9260EK: Handle 8 or 16 bit NAND + + The Atmel boards can handle 8 or 16 bit NAND memories. This patch + makes the support configurable in the board config header file + (CFG_NAND_DBW_8 or CFG_NAND_DBW_16). + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit ab52640fc01624e208424e527af0b7b3a5a65a12 +Author: Stelian Pop +Date: Thu May 8 20:52:17 2008 +0200 + + AT91CAP9ADK: Fix dataflash offsets in CONFIG_BOOTCOMMAND + + This patch fixes the dataflash offsets used in CONFIG_BOOTCOMMAND + in order to cope with the changes in DataFlash partitionning scheme + (cset c3a60cb3). + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 3267508ec4c9e74c39ee41c9ae6951ad185fe270 +Author: Stelian Pop +Date: Thu May 8 20:52:16 2008 +0200 + + AT91CAP9ADK: Normalize BOOTARGS + + This patch adapts CONFIG_BOOTARGS to the chosen boot method (boot from + DataFlash or from NAND), and gives to Linux a fully specified mtdparts + variable. + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 93da48b910511911ce110656e17ed733c8ac4c45 +Author: Stelian Pop +Date: Thu May 8 20:52:15 2008 +0200 + + AT91CAP9ADK: Normalize SPI timings + + This patch changes the SPI timings to closely match the ones + used by the Linux kernel and the Atmel's own bootstrap project. + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 1c90df3e148ce0a3e2c86c63b38b19d47772f2a0 +Author: Stelian Pop +Date: Thu May 8 20:52:14 2008 +0200 + + AT91CAP9ADK: Handle 8 or 16 bit NAND + + The Atmel boards can handle 8 or 16 bit NAND memories. This patch + makes the support configurable in the board config header file + (CFG_NAND_DBW_8 or CFG_NAND_DBW_16). + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 11b162bae058e96c7929e358d4adff2bee6c2cc4 +Author: Stelian Pop +Date: Thu May 8 20:52:13 2008 +0200 + + Use a common u-boot.lds file across all AT91CAP9/AT91SAM9 platforms + + All the AT91CAP9/AT91SAM9 boards have the same linker script. The patch + below avoids the duplication of u-boot.lds by putting the file in the + cpu directory instead of the board one. + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit d48abea4b89adaf5e45ea75b5e38c0d8de179ece +Author: Stelian Pop +Date: Thu May 8 20:52:12 2008 +0200 + + Add proper copyright notices in Atmel boards Makefiles + + The Makefiles for the AT91CAP9/AT91SAM9 boards have an incomplete + copyright notice. This patch adds the missing pieces. + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit e817a042cef6164bf26fee86f90326f2ec9e6745 +Author: Stelian Pop +Date: Thu May 8 20:52:11 2008 +0200 + + Add copyright information in Atmel boards partition.c + + When Ulf did the dataflash.c cleanup, he didn't add his copyright on + the new created files. This patch fixes the problem. + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 4f6c810106f4f76d83cfc57d98f4540cd45f9a19 +Author: Stelian Pop +Date: Thu May 8 20:52:10 2008 +0200 + + Update origin and copyright information in arch-at91sam9 header files + + When doing the AT91CAP9/AT91SAM9 port, a number of header files were + copied from the Linux kernel sources. This patch explicitly specifies + this origin for all the copied headers, and for those missing copyright + information, adds it. + + Additionaly, the header file 'at91sam926x_mc.h' has been superceeded + in the latest kernel sources by 'at91sam9_smc.h'. + + The copyright information has been confirmed by the AT91 Linux kernel + maintainer, Andrew Victor . + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + commit 79dd1712689d6a5031d7cbff54957049680751c7 Author: Markus Klotzbücher Date: Thu May 8 16:00:55 2008 +0200 @@ -556,6 +4595,32 @@ Date: Fri May 9 10:16:13 2008 +0200 Signed-off-by: Wolfgang Denk +commit 567fb852178dbf59529d7301620a3f3732a4b02d +Author: Stelian Pop +Date: Thu May 8 22:52:09 2008 +0200 + + Fix @ -> substitution + + When applying the AT91CAP9 patches upstream, something transformed + the '@' character into the ' ' sequence. + + The patch below restores the original form in all the places where + it has been modified (the AT91CAP9 files, the AT91SAM9260 files which + were copied from AT91CAP9, and a couple of other files where the + ' ' sequence was present). + + Signed-off-by: Stelian Pop + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 73ccb3410a0785593cda7aee455dfc51f790e281 +Author: Gary Jennejohn +Date: Mon Apr 28 14:04:32 2008 +0200 + + ppc4xx: Add the Harris QUAD100HD AMCC 405EP-based board + + Signed-off-by: Gary Jennejohn + Signed-off-by: Stefan Roese + commit ef2642625cbfb1c3695e3478d08ae515052a4950 Author: Stefan Roese Date: Thu May 8 11:10:46 2008 +0200 @@ -7221,7 +11286,7 @@ Date: Mon Mar 3 11:57:23 2008 +0000 Originally pointed out by Laurent Pinchart , see http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/22846 - Signed-off-by: Bernhard Nemec + Signed-off-by: Bernhard Nemec ganssloser.com> commit 84d0c2f1e39caff58bf765a7ab7c72da23c25ec8 Author: Kim B. Heino @@ -8451,7 +12516,7 @@ Date: Mon Feb 18 14:01:56 2008 -0600 86xx: Convert sbc8641d to use libfdt. This is the proper fix for a missing closing brace in the function - ft_cpu_setup() noticed by joe.hamman@embeddedspecialties.com. + ft_cpu_setup() noticed by joe.hamman embeddedspecialties.com. The ft_cpu_setup() function in mpc8641hpcn.c should have been removed earlier as it was under the obsolete CONFIG_OF_FLAT_TREE, but was missed. Only, the sbc8641d was nominally still using it. @@ -8846,7 +12911,7 @@ Date: Fri Feb 22 11:40:50 2008 +0000 We already have a vendor subdir for Atmel, so we should use it. - Signed-off-by: Haavard Skinnemoen + Signed-off-by: Haavard Skinnemoen atmel.com> commit 6d0943a6be99977d6d853d51749e9963d68eb192 Author: Andreas Engel @@ -8896,8 +12961,8 @@ Date: Thu Jan 3 21:15:56 2008 +0000 AT91CAP9 support : MACB changes - Signed-off-by: Stelian Pop - Acked-by: Haavard Skinnemoen + Signed-off-by: Stelian Pop popies.net> + Acked-by: Haavard Skinnemoen atmel.com> commit 6afcabf11d7321850f4feaadfee841488ace54c5 Author: Stelian Pop @@ -8913,7 +12978,7 @@ Date: Wed Jan 30 21:15:54 2008 +0000 AT91CAP9 support : cpu/ files - Signed-off-by: Stelian Pop + Signed-off-by: Stelian Pop popies.net> commit fa506a926cec348805143576c941f8e61b333cc0 Author: Stelian Pop diff --git a/CREDITS b/CREDITS index aa576827518001832effbe8e70c61c2c01d79913..3b6e57dee1d0c929fe9af6d5d5168ee98adcdcae 100644 --- a/CREDITS +++ b/CREDITS @@ -537,3 +537,8 @@ N: Timo Tuunainen E: timo.tuunainen@sysart.fi D: Support for Artila M-501 starter kit W: http://www.sysart.fi/ + +N: Philip Balister +E: philip@opensdr.com +D: Port to Lyrtech SFFSDR development board. +W: www.opensdr.com diff --git a/MAKEALL b/MAKEALL index 32caab75a9fb2f4bb85dff4b2cdbacc63396380f..e00bb9c3c430f9d79ad5ee1a4a491c20c68c58c0 100755 --- a/MAKEALL +++ b/MAKEALL @@ -503,6 +503,7 @@ LIST_ARM9=" \ voiceblue \ davinci_dvevm \ davinci_schmoogie \ + davinci_sffsdr \ davinci_sonata \ " @@ -748,7 +749,7 @@ LIST_sh3=" \ LIST_sh4=" \ ms7750se \ ms7722se \ - Migo-R \ + MigoR \ r7780mp \ r2dplus \ sh7763rdp \ diff --git a/Makefile b/Makefile index 8bfc89124d5654c8ac9334ac64c80372e668c999..6a734d13977762fbba84d9de112517faeec8e31b 100644 --- a/Makefile +++ b/Makefile @@ -220,6 +220,7 @@ LIBS += drivers/hwmon/libhwmon.a LIBS += drivers/i2c/libi2c.a LIBS += drivers/input/libinput.a LIBS += drivers/misc/libmisc.a +LIBS += drivers/mmc/libmmc.a LIBS += drivers/mtd/libmtd.a LIBS += drivers/mtd/nand/libnand.a LIBS += drivers/mtd/nand_legacy/libnand_legacy.a @@ -387,6 +388,7 @@ TAG_SUBDIRS += drivers/hwmon TAG_SUBDIRS += drivers/i2c TAG_SUBDIRS += drivers/input TAG_SUBDIRS += drivers/misc +TAG_SUBDIRS += drivers/mmc TAG_SUBDIRS += drivers/mtd TAG_SUBDIRS += drivers/mtd/nand TAG_SUBDIRS += drivers/mtd/nand_legacy @@ -2428,6 +2430,9 @@ davinci_dvevm_config : unconfig davinci_schmoogie_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs schmoogie davinci davinci +davinci_sffsdr_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs sffsdr davinci davinci + davinci_sonata_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs sonata davinci davinci @@ -2910,43 +2915,46 @@ atngw100_config : unconfig ## sh3 (Renesas SuperH) ######################################################################### mpr2_config: unconfig - @ >include/config.h - @echo "#define CONFIG_MPR2 1" >> include/config.h + @mkdir -p $(obj)include + @echo "#define CONFIG_MPR2 1" > $(obj)include/config.h @$(MKCONFIG) -a $(@:_config=) sh sh3 mpr2 ms7720se_config: unconfig - @echo "#define CONFIG_MS7720SE 1" > include/config.h + @mkdir -p $(obj)include + @echo "#define CONFIG_MS7720SE 1" > $(obj)include/config.h @$(MKCONFIG) -a $(@:_config=) sh sh3 ms7720se ######################################################################### ## sh4 (Renesas SuperH) ######################################################################### ms7750se_config: unconfig + @mkdir -p $(obj)include @echo "#define CONFIG_MS7750SE 1" > $(obj)include/config.h @$(MKCONFIG) -a $(@:_config=) sh sh4 ms7750se ms7722se_config : unconfig + @mkdir -p $(obj)include @echo "#define CONFIG_MS7722SE 1" > $(obj)include/config.h @$(MKCONFIG) -a $(@:_config=) sh sh4 ms7722se MigoR_config : unconfig - @ >include/config.h - @echo "#define CONFIG_MIGO_R 1" >> include/config.h + @mkdir -p $(obj)include + @echo "#define CONFIG_MIGO_R 1" > $(obj)include/config.h @./mkconfig -a $(@:_config=) sh sh4 MigoR r7780mp_config: unconfig - @ >include/config.h - @echo "#define CONFIG_R7780MP 1" >> include/config.h + @mkdir -p $(obj)include + @echo "#define CONFIG_R7780MP 1" > $(obj)include/config.h @./mkconfig -a $(@:_config=) sh sh4 r7780mp r2dplus_config : unconfig - @ >include/config.h - @echo "#define CONFIG_R2DPLUS 1" >> include/config.h + @mkdir -p $(obj)include + @echo "#define CONFIG_R2DPLUS 1" > $(obj)include/config.h @./mkconfig -a $(@:_config=) sh sh4 r2dplus sh7763rdp_config : unconfig - @ >include/config.h - @echo "#define CONFIG_SH7763RDP 1" >> include/config.h + @mkdir -p $(obj)include + @echo "#define CONFIG_SH7763RDP 1" > $(obj)include/config.h @./mkconfig -a $(@:_config=) sh sh4 sh7763rdp #======================================================================== diff --git a/README b/README index 62cdfd03e810734a17ef014261b805917aa5c66a..0cd01bcc60a00e9bd85be6e3fc7c641f26819312 100644 --- a/README +++ b/README @@ -74,7 +74,7 @@ git://www.denx.de/git/u-boot.git ; you can browse it online at http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=summary The "snapshot" links on this page allow you to download tarballs of -any version you might be interested in. Ofifcial releases are also +any version you might be interested in. Official releases are also available for FTP download from the ftp://ftp.denx.de/pub/u-boot/ directory. @@ -94,7 +94,7 @@ Where we come from: * Provide extended interface to Linux boot loader * S-Record download * network boot - * PCMCIA / CompactFLash / ATA disk / SCSI ... boot + * PCMCIA / CompactFlash / ATA disk / SCSI ... boot - create ARMBoot project (http://sourceforge.net/projects/armboot) - add other CPU families (starting with ARM) - create U-Boot project (http://sourceforge.net/projects/u-boot) @@ -230,7 +230,7 @@ Example: For a TQM823L module type: cd u-boot make TQM823L_config -For the Cogent platform, you need to specify the cpu type as well; +For the Cogent platform, you need to specify the CPU type as well; e.g. "make cogent_mpc8xx_config". And also configure the cogent directory according to the instructions in cogent/README. @@ -278,7 +278,7 @@ The following options need to be configured: - Motherboard Options: (if CONFIG_CMA101 or CONFIG_CMA102 are defined) Define one or more of CONFIG_LCD_HEARTBEAT - update a character position on - the lcd display every second with + the LCD display every second with a "rotator" |\-/|\-/ - Board flavour: (if CONFIG_MPC8260ADS is defined) @@ -293,7 +293,7 @@ The following options need to be configured: Define exactly one of CONFIG_MPC8240, CONFIG_MPC8245 -- 8xx CPU Options: (if using an MPC8xx cpu) +- 8xx CPU Options: (if using an MPC8xx CPU) CONFIG_8xx_GCLK_FREQ - deprecated: CPU clock if get_gclk_freq() cannot work e.g. if there is no 32KHz @@ -346,7 +346,7 @@ The following options need to be configured: CONFIG_MEMSIZE_IN_BYTES [relevant for MIPS only] - When transfering memsize parameter to linux, some versions + When transferring memsize parameter to linux, some versions expect it to be in bytes, others in MB. Define CONFIG_MEMSIZE_IN_BYTES to make it in bytes. @@ -366,7 +366,8 @@ The following options need to be configured: OF_TBCLK - The timebase frequency. OF_STDOUT_PATH - The path to the console device - boards with QUICC Engines require OF_QE to set UCC mac addresses + boards with QUICC Engines require OF_QE to set UCC MAC + addresses CONFIG_OF_BOARD_SETUP @@ -375,7 +376,7 @@ The following options need to be configured: CONFIG_OF_BOOT_CPU - This define fills in the correct boot cpu in the boot + This define fills in the correct boot CPU in the boot param header, the default value is zero if undefined. - Serial Ports: @@ -445,7 +446,7 @@ The following options need to be configured: linux_logo.h for logo. Requires CONFIG_VIDEO_LOGO CONFIG_CONSOLE_EXTRA_INFO - addional board info beside + additional board info beside the logo When CONFIG_CFB_CONSOLE is defined, video console is @@ -515,7 +516,7 @@ The following options need to be configured: The value of these goes into the environment as "ramboot" and "nfsboot" respectively, and can be used as a convenience, when switching between booting from - ram and nfs. + RAM and NFS. - Pre-Boot Commands: CONFIG_PREBOOT @@ -735,11 +736,11 @@ The following options need to be configured: Support for Intel 8254x gigabit chips. CONFIG_E1000_FALLBACK_MAC - default MAC for empty eeprom after production. + default MAC for empty EEPROM after production. CONFIG_EEPRO100 Support for Intel 82557/82559/82559ER chips. - Optional CONFIG_EEPRO100_SROM_WRITE enables eeprom + Optional CONFIG_EEPRO100_SROM_WRITE enables EEPROM write routine for first time initialisation. CONFIG_TULIP @@ -818,7 +819,7 @@ The following options need to be configured: Define the below if you wish to use the USB console. Once firmware is rebuilt from a serial console issue the command "setenv stdin usbtty; setenv stdout usbtty" and - attach your usb cable. The Unix command "dmesg" should print + attach your USB cable. The Unix command "dmesg" should print it has found a new device. The environment variable usbtty can be set to gserial or cdc_acm to enable your device to appear to a USB host as a Linux gserial device or a @@ -932,7 +933,7 @@ The following options need to be configured: assumed. For the CT69000 and SMI_LYNXEM drivers, videomode is - selected via environment 'videomode'. Two diferent ways + selected via environment 'videomode'. Two different ways are possible: - "videomode=num" 'num' is a standard LiLo mode numbers. Following standard modes are supported (* is default): @@ -1055,7 +1056,7 @@ The following options need to be configured: CONFIG_PHY_GIGE If this option is set, support for speed/duplex - detection of Gigabit PHY is included. + detection of gigabit PHY is included. CONFIG_PHY_RESET_DELAY @@ -1074,21 +1075,21 @@ The following options need to be configured: CONFIG_ETH2ADDR CONFIG_ETH3ADDR - Define a default value for ethernet address to use - for the respective ethernet interface, in case this + Define a default value for Ethernet address to use + for the respective Ethernet interface, in case this is not determined automatically. - IP address: CONFIG_IPADDR Define a default value for the IP address to use for - the default ethernet interface, in case this is not + the default Ethernet interface, in case this is not determined through e.g. bootp. - Server IP address: CONFIG_SERVERIP - Defines a default value for theIP address of a TFTP + Defines a default value for the IP address of a TFTP server to contact when using the "tftboot" command. - Multicast TFTP Mode: @@ -1096,7 +1097,7 @@ The following options need to be configured: Defines whether you want to support multicast TFTP as per rfc-2090; for example to work with atftp. Lets lots of targets - tftp down the same boot image concurrently. Note: the ethernet + tftp down the same boot image concurrently. Note: the Ethernet driver in use must provide a function: mcast() to join/leave a multicast group. @@ -1184,7 +1185,7 @@ The following options need to be configured: A printf format string which contains the ascii name of the port. Normally is set to "eth%d" which sets - eth0 for the first ethernet, eth1 for the second etc. + eth0 for the first Ethernet, eth1 for the second etc. CONFIG_CDP_CAPABILITIES @@ -1233,7 +1234,7 @@ The following options need to be configured: These enable I2C serial bus commands. Defining either of (but not both of) CONFIG_HARD_I2C or CONFIG_SOFT_I2C will - include the appropriate I2C driver for the selected cpu. + include the appropriate I2C driver for the selected CPU. This will allow you to use i2c commands at the u-boot command line (as long as you set CONFIG_CMD_I2C in @@ -1258,10 +1259,10 @@ The following options need to be configured: In both cases you will need to define CFG_I2C_SPEED to be the frequency (in Hz) at which you wish your i2c bus to run and CFG_I2C_SLAVE to be the address of this node (ie - the cpu's i2c node address). + the CPU's i2c node address). Now, the u-boot i2c code for the mpc8xx (cpu/mpc8xx/i2c.c) - sets the cpu up as a master node and so its address should + sets the CPU up as a master node and so its address should therefore be cleared to 0 (See, eg, MPC823e User's Manual p.16-473). So, set CFG_I2C_SLAVE to 0. @@ -1480,17 +1481,17 @@ The following options need to be configured: Maximum time to wait for the INIT_B line to deassert after PROB_B has been deasserted during a Virtex II FPGA configuration sequence. The default time is 500 - mS. + ms. CFG_FPGA_WAIT_BUSY Maximum time to wait for BUSY to deassert during - Virtex II FPGA configuration. The default is 5 mS. + Virtex II FPGA configuration. The default is 5 ms. CFG_FPGA_WAIT_CONFIG Time to wait after FPGA configuration. The default is - 200 mS. + 200 ms. - Configuration Management: CONFIG_IDENT_STRING @@ -1507,7 +1508,7 @@ The following options need to be configured: protects these variables from casual modification by the user. Once set, these variables are read-only, and write or delete attempts are rejected. You can - change this behviour: + change this behaviour: If CONFIG_ENV_OVERWRITE is #defined in your config file, the write protection for vendor parameters is @@ -1516,7 +1517,7 @@ The following options need to be configured: Alternatively, if you #define _both_ CONFIG_ETHADDR _and_ CONFIG_OVERWRITE_ETHADDR_ONCE, a default - ethernet address is installed in the environment, + Ethernet address is installed in the environment, which can be changed exactly ONCE by the user. [The serial# is unaffected by this, i. e. it remains read-only.] @@ -1560,7 +1561,7 @@ The following options need to be configured: Define this variable to stop the system in case of a fatal error, so that you have to reset it manually. This is probably NOT a good idea for an embedded - system where you want to system to reboot + system where you want the system to reboot automatically as fast as possible, but it may be useful during development since you can try to debug the conditions that lead to the situation. @@ -1627,7 +1628,7 @@ The following options need to be configured: - Commandline Editing and History: CONFIG_CMDLINE_EDITING - Enable editiong and History functions for interactive + Enable editing and History functions for interactive commandline input operations - Default Environment: @@ -1668,7 +1669,7 @@ The following options need to be configured: Adding this option adds support for Xilinx SystemACE chips attached via some sort of local bus. The address - of the chip must alsh be defined in the + of the chip must also be defined in the CFG_SYSTEMACE_BASE macro. For example: #define CONFIG_SYSTEMACE @@ -1734,7 +1735,7 @@ Legacy uImage format: -12 common/image.c Ramdisk data has bad checksum 11 common/image.c Ramdisk data has correct checksum 12 common/image.c Ramdisk verification complete, start loading - -13 common/image.c Wrong Image Type (not PPC Linux Ramdisk) + -13 common/image.c Wrong Image Type (not PPC Linux ramdisk) 13 common/image.c Start multifile image verification 14 common/image.c No initial ramdisk, no multifile, continue. @@ -1794,13 +1795,13 @@ Legacy uImage format: -60 common/env_common.c Environment has a bad CRC, using default - 64 net/eth.c starting with Ethernetconfiguration. + 64 net/eth.c starting with Ethernet configuration. -64 net/eth.c no Ethernet found. 65 net/eth.c Ethernet found. -80 common/cmd_net.c usage wrong 80 common/cmd_net.c before calling NetLoop() - -81 common/cmd_net.c some error in NetLoop() occured + -81 common/cmd_net.c some error in NetLoop() occurred 81 common/cmd_net.c NetLoop() back without error -82 common/cmd_net.c size == 0 (File with size 0 loaded) 82 common/cmd_net.c trying automatic boot @@ -1823,8 +1824,8 @@ FIT uImage format: 105 common/cmd_bootm.c Kernel subimage hash verification OK -105 common/cmd_bootm.c Kernel subimage is for unsupported architecture 106 common/cmd_bootm.c Architecture check OK - -106 common/cmd_bootm.c Kernel subimage has wrong typea - 107 common/cmd_bootm.c Kernel subimge type OK + -106 common/cmd_bootm.c Kernel subimage has wrong type + 107 common/cmd_bootm.c Kernel subimage type OK -107 common/cmd_bootm.c Can't get kernel subimage data/size 108 common/cmd_bootm.c Got kernel subimage data/size -108 common/cmd_bootm.c Wrong image type (not legacy, FIT) @@ -1837,7 +1838,7 @@ FIT uImage format: 120 common/image.c Start initial ramdisk verification -120 common/image.c Ramdisk FIT image has incorrect format 121 common/image.c Ramdisk FIT image has correct format - 122 common/image.c No Ramdisk subimage unit name, using configuration + 122 common/image.c No ramdisk subimage unit name, using configuration -122 common/image.c Can't get configuration for ramdisk subimage 123 common/image.c Ramdisk unit name specified -124 common/image.c Can't get ramdisk subimage node offset @@ -1851,13 +1852,13 @@ FIT uImage format: 129 common/image.c Can't get ramdisk load address -129 common/image.c Got ramdisk load address - -130 common/cmd_doc.c Icorrect FIT image format + -130 common/cmd_doc.c Incorrect FIT image format 131 common/cmd_doc.c FIT image format OK - -140 common/cmd_ide.c Icorrect FIT image format + -140 common/cmd_ide.c Incorrect FIT image format 141 common/cmd_ide.c FIT image format OK - -150 common/cmd_nand.c Icorrect FIT image format + -150 common/cmd_nand.c Incorrect FIT image format 151 common/cmd_nand.c FIT image format OK @@ -1866,7 +1867,7 @@ Modem Support: [so far only for SMDK2400 and TRAB boards] -- Modem support endable: +- Modem support enable: CONFIG_MODEM_SUPPORT - RTS/CTS Flow control enable: @@ -1882,11 +1883,11 @@ Modem Support: There are common interrupt_init() and timer_interrupt() for all PPC archs. interrupt_init() calls interrupt_init_cpu() - for cpu specific initialization. interrupt_init_cpu() + for CPU specific initialization. interrupt_init_cpu() should set decrementer_count to appropriate value. If - cpu resets decrementer automatically after interrupt + CPU resets decrementer automatically after interrupt (ppc4xx) it should set decrementer_count to zero. - timer_interrupt() calls timer_interrupt_cpu() for cpu + timer_interrupt() calls timer_interrupt_cpu() for CPU specific handling. If board has watchdog / status_led / other_activity_monitor it works automatically from general timer_interrupt(). @@ -1896,7 +1897,7 @@ Modem Support: In the target system modem support is enabled when a specific key (key combination) is pressed during power-on. Otherwise U-Boot will boot normally - (autoboot). The key_pressed() fuction is called from + (autoboot). The key_pressed() function is called from board_init(). Currently key_pressed() is a dummy function, returning 1 and thus enabling modem initialization. @@ -1904,7 +1905,7 @@ Modem Support: If there are no modem init strings in the environment, U-Boot proceed to autoboot; the previous output (banner, info printfs) will be - supressed, though. + suppressed, though. See also: doc/README.Modem @@ -1960,7 +1961,7 @@ Configuration Settings: - CFG_MEM_TOP_HIDE (PPC only): If CFG_MEM_TOP_HIDE is defined in the board config header, this specified memory area will get subtracted from the top - (end) of ram and won't get "touched" at all by U-Boot. By + (end) of RAM and won't get "touched" at all by U-Boot. By fixing up gd->ram_size the Linux kernel should gets passed the now "corrected" memory size and won't touch it either. This should work for arch/ppc and arch/powerpc. Only Linux @@ -2055,8 +2056,8 @@ Configuration Settings: The two-step approach is usually more reliable, since you can check if the download worked before you erase - the flash, but in some situations (when sytem RAM is - too limited to allow for a tempory copy of the + the flash, but in some situations (when system RAM is + too limited to allow for a temporary copy of the downloaded image) this option may be very useful. - CFG_FLASH_CFI: @@ -2086,11 +2087,11 @@ Configuration Settings: column displays, 15 (3..1) for 40 column displays. - CFG_RX_ETH_BUFFER: - Defines the number of ethernet receive buffers. On some - ethernet controllers it is recommended to set this value + Defines the number of Ethernet receive buffers. On some + Ethernet controllers it is recommended to set this value to 8 or even higher (EEPRO100 or 405 EMAC), since all buffers can be full shortly after enabling the interface - on high ethernet traffic. + on high Ethernet traffic. Defaults to 4 if not defined. The following definitions that deal with the placement and management @@ -2158,7 +2159,7 @@ following configurations: CFG_ENV_SIZE_REDUND These settings describe a second storage area used to hold - a redundand copy of the environment data, so that there is + a redundant copy of the environment data, so that there is a valid backup copy in case there is a power failure during a "saveenv" operation. @@ -2176,14 +2177,14 @@ accordingly! - CFG_ENV_ADDR: - CFG_ENV_SIZE: - These two #defines are used to determin the memory area you + These two #defines are used to determine the memory area you want to use for environment. It is assumed that this memory can just be read and written to, without any special provision. BE CAREFUL! The first access to the environment happens quite early in U-Boot initalization (when we try to get the setting of for the -console baudrate). You *MUST* have mappend your NVRAM area then, or +console baudrate). You *MUST* have mapped your NVRAM area then, or U-Boot will hang. Please note that even with NVRAM we still use a copy of the @@ -2332,14 +2333,14 @@ Low Level (hardware related) configuration options: CFG_ISA_IO_STRIDE - defines the spacing between fdc chipset registers + defines the spacing between FDC chipset registers (default value 1) CFG_ISA_IO_OFFSET defines the offset of register from address. It depends on which part of the data bus is connected to - the fdc chipset. (default value 0) + the FDC chipset. (default value 0) If CFG_ISA_IO_STRIDE CFG_ISA_IO_OFFSET and CFG_FDC_DRIVE_NUMBER are undefined, they take their @@ -2535,7 +2536,7 @@ Low Level (hardware related) configuration options: Normally these variables MUST NOT be defined. The only exception is when U-Boot is loaded (to RAM) by some other boot loader or by a debugger which - performs these intializations itself. + performs these initializations itself. Building the Software: @@ -2570,7 +2571,7 @@ Note: for some board special configuration names may exist; check if additional information is available from the board vendor; for instance, the TQM823L systems are available without (standard) or with LCD support. You can select such additional "features" - when chosing the configuration, i. e. + when choosing the configuration, i. e. make TQM823L_config - will configure for a plain TQM823L, i. e. no LCD support @@ -2773,7 +2774,7 @@ Some configuration options can be set using Environment Variables: for use by the bootm command. See also "bootm_size" environment variable. Address defined by "bootm_low" is also the base of the initial memory mapping for the Linux - kernel -- see the descripton of CFG_BOOTMAPSZ. + kernel -- see the description of CFG_BOOTMAPSZ. bootm_size - Memory range available for image processing in the bootm command can be restricted. This variable is given as @@ -2880,7 +2881,7 @@ Some configuration options can be set using Environment Variables: themselves. npe_ucode - see CONFIG_IXP4XX_NPE_EXT_UCOD - if set load address for the npe microcode + if set load address for the NPE microcode tftpsrcport - If this is set, the value is used for TFTP's UDP source port. @@ -2889,7 +2890,7 @@ Some configuration options can be set using Environment Variables: destination port instead of the Well Know Port 69. vlan - When set to a value < 4095 the traffic over - ethernet is encapsulated/received over 802.1q + Ethernet is encapsulated/received over 802.1q VLAN tagged frames. The following environment variables may be used and automatically @@ -2967,14 +2968,14 @@ General rules: executed anyway. (2) If you execute several variables with one call to run (i. e. - calling run with a list af variables as arguments), any failing + calling run with a list of variables as arguments), any failing command will cause "run" to terminate, i. e. the remaining variables are not executed. Note for Redundant Ethernet Interfaces: ======================================= -Some boards come with redundant ethernet interfaces; U-Boot supports +Some boards come with redundant Ethernet interfaces; U-Boot supports such configurations and is capable of automatic selection of a "working" interface when needed. MAC assignment works as follows: @@ -3315,7 +3316,7 @@ parameters. You can check and modify this variable using the Memory: 15208k available (700k kernel code, 444k data, 32k init) [c0000000,c1000000] ... -If you want to boot a Linux kernel with initial ram disk, you pass +If you want to boot a Linux kernel with initial RAM disk, you pass the memory addresses of both the kernel and the initrd image (PPBCOOT format!) to the "bootm" command: @@ -3625,13 +3626,13 @@ locked as (mis-) used as memory, etc. require any physical RAM backing up the cache. The cleverness is that the cache is being used as a temporary supply of necessary storage before the SDRAM controller is setup. It's - beyond the scope of this list to expain the details, but you + beyond the scope of this list to explain the details, but you can see how this works by studying the cache architecture and operation in the architecture and processor-specific manuals. OCM is On Chip Memory, which I believe the 405GP has 4K. It is another option for the system designer to use as an - initial stack/ram area prior to SDRAM being available. Either + initial stack/RAM area prior to SDRAM being available. Either option should work for you. Using CS 4 should be fine if your board designers haven't used it for something that would cause you grief during the initial boot! It is frequently not @@ -3656,7 +3657,7 @@ code for the initialization procedures: * Initialized global data (data segment) is read-only. Do not attempt to write it. -* Do not use any unitialized global data (or implicitely initialized +* Do not use any uninitialized global data (or implicitely initialized as zero data - BSS segment) at all - this is undefined, initiali- zation is performed later (when relocating to RAM). @@ -3768,7 +3769,7 @@ System Initialization: ---------------------- In the reset configuration, U-Boot starts at the reset entry point -(on most PowerPC systens at address 0x00000100). Because of the reset +(on most PowerPC systems at address 0x00000100). Because of the reset configuration for CS0# this is a mirror of the onboard Flash memory. To be able to re-map memory U-Boot then jumps to its link address. To be able to implement the initialization code in C, a (small!) diff --git a/board/MigoR/Makefile b/board/MigoR/Makefile index 5a9d651afb5e5318c4d73de33b7e77c354ae321f..661b59d005047dbec090b5a4af8a8c4be7ac89eb 100644 --- a/board/MigoR/Makefile +++ b/board/MigoR/Makefile @@ -24,25 +24,29 @@ include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).a -OBJS := migo_r.o +COBJS := migo_r.o SOBJS := lowlevel_init.o +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + $(LIB): $(OBJS) $(SOBJS) - $(AR) crv $@ $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### -.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) - $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ +# defines $(obj).depend target +include $(SRCTREE)/rules.mk --include .depend +sinclude $(obj).depend ######################################################################### diff --git a/board/actux1/Makefile b/board/actux1/Makefile index 83611e7c03f2bbc7e5510846da53c6c308e9e495..b7cc6e11d55294f9a705290af8c434427cc42e84 100644 --- a/board/actux1/Makefile +++ b/board/actux1/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/actux2/Makefile b/board/actux2/Makefile index 37fd2622abd9e59e644b9ec6bc62c9e620464cff..5ef3bdaeabf2fbac08a5cdfb13e5b2040be54b0b 100644 --- a/board/actux2/Makefile +++ b/board/actux2/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/actux3/Makefile b/board/actux3/Makefile index f6168c3e7f14b0c952a9c31fc608ed44dd3512c2..2cd6d84a1756527fe1421c10349dc4fcb5e015ba 100644 --- a/board/actux3/Makefile +++ b/board/actux3/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/actux4/Makefile b/board/actux4/Makefile index 845af93fe6611f547e29b42e08e436218592fb61..b82fc62e9eb4d7dae8223c69b50681600043010b 100644 --- a/board/actux4/Makefile +++ b/board/actux4/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/adder/Makefile b/board/adder/Makefile index b2ffd288331284b86a8a904e37d4e04d46b59171..6b3706daaeea622debda670da175b2865375e0be 100644 --- a/board/adder/Makefile +++ b/board/adder/Makefile @@ -41,7 +41,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/ads5121/Makefile b/board/ads5121/Makefile index f4dacce285b13481f8d2e3bf27d6214f537c39d1..52d0d3c58c4157cdec4c2b3eebe14440755bf6c4 100644 --- a/board/ads5121/Makefile +++ b/board/ads5121/Makefile @@ -45,7 +45,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/adsvix/Makefile b/board/adsvix/Makefile index 214c7dbe450209a0cd745145aacc2024714a7b1e..05601b48d1dee4e5371e43c15a97708b4c7f0ec1 100644 --- a/board/adsvix/Makefile +++ b/board/adsvix/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/alaska/Makefile b/board/alaska/Makefile index 27475ea4d70ab8354e2d208cb72ede2fd190862b..5297e81435708ede2b4ebef823d370b62e5291d0 100644 --- a/board/alaska/Makefile +++ b/board/alaska/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/alaska/flash.c b/board/alaska/flash.c index 383491f566b1de2249d114d9133a34d86657fe9f..715616063ce21e63e14e31007899ddf059f8f3d2 100644 --- a/board/alaska/flash.c +++ b/board/alaska/flash.c @@ -670,7 +670,7 @@ static int write_data (flash_info_t * info, ulong dest, FPW data) /* Check if Flash is (sufficiently) erased */ if ((*addr & data) != data) { - printf ("not erased at %08lx (%lx)\n", (ulong) addr, *addr); + printf ("not erased at %08lx (%lx)\n", (ulong)addr, (ulong)*addr); return (2); } /* Disable interrupts which might cause a timeout here */ @@ -712,7 +712,7 @@ static int write_data_block (flash_info_t * info, ulong src, ulong dest) for (i = 0; i < WR_BLOCK; i++) if ((*dstaddr++ & 0xff) != 0xff) { printf ("not erased at %08lx (%lx)\n", - (ulong) dstaddr, *dstaddr); + (ulong)dstaddr, (ulong)*dstaddr); return (2); } diff --git a/board/altera/dk1c20/Makefile b/board/altera/dk1c20/Makefile index 6af83890a8a2ad860463210755c62e58427557b1..60ac6e6b70411cd604feb7c435fdbf672546a271 100644 --- a/board/altera/dk1c20/Makefile +++ b/board/altera/dk1c20/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/altera/dk1s10/Makefile b/board/altera/dk1s10/Makefile index 6af83890a8a2ad860463210755c62e58427557b1..60ac6e6b70411cd604feb7c435fdbf672546a271 100644 --- a/board/altera/dk1s10/Makefile +++ b/board/altera/dk1s10/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/altera/ep1c20/Makefile b/board/altera/ep1c20/Makefile index 7a8caf7c11ebf48b83b07acc61356f1ce754d78f..acad2aad85d9dd6b3662c50090d9d469c3f03c59 100644 --- a/board/altera/ep1c20/Makefile +++ b/board/altera/ep1c20/Makefile @@ -43,7 +43,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/altera/ep1s10/Makefile b/board/altera/ep1s10/Makefile index 7a8caf7c11ebf48b83b07acc61356f1ce754d78f..acad2aad85d9dd6b3662c50090d9d469c3f03c59 100644 --- a/board/altera/ep1s10/Makefile +++ b/board/altera/ep1s10/Makefile @@ -43,7 +43,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/altera/ep1s40/Makefile b/board/altera/ep1s40/Makefile index 7a8caf7c11ebf48b83b07acc61356f1ce754d78f..acad2aad85d9dd6b3662c50090d9d469c3f03c59 100644 --- a/board/altera/ep1s40/Makefile +++ b/board/altera/ep1s40/Makefile @@ -43,7 +43,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/amcc/acadia/Makefile b/board/amcc/acadia/Makefile index c56b2733a93d1ec3edfb1c0d22fc96306375df5d..9abb29d85f262c461eec8f49c25250854a569a69 100644 --- a/board/amcc/acadia/Makefile +++ b/board/amcc/acadia/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend *~ + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/amcc/bamboo/Makefile b/board/amcc/bamboo/Makefile index d01cc49e2ce6a3914867367087fc98158d900ec5..0649799889c5b4cf069ac07b780ab0456c54f2a7 100644 --- a/board/amcc/bamboo/Makefile +++ b/board/amcc/bamboo/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/amcc/bubinga/Makefile b/board/amcc/bubinga/Makefile index 50fecc6d486a404480d5b733758d8e05203fcb21..1939d51688b5b9c3ceb07c47525578af88e53e91 100644 --- a/board/amcc/bubinga/Makefile +++ b/board/amcc/bubinga/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/amcc/canyonlands/Makefile b/board/amcc/canyonlands/Makefile index 7a2eaa5163e41675a19ba94e0279213fe712acd9..2aeead60f915d20a98bb36d20e2a079a546ace33 100644 --- a/board/amcc/canyonlands/Makefile +++ b/board/amcc/canyonlands/Makefile @@ -40,7 +40,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/amcc/canyonlands/canyonlands.c b/board/amcc/canyonlands/canyonlands.c index e0e0211a675488cbfa4f75d0d91e889a81e986e5..e9eba49c4bab86b02074c2967135369499430c9a 100644 --- a/board/amcc/canyonlands/canyonlands.c +++ b/board/amcc/canyonlands/canyonlands.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -393,6 +394,7 @@ int misc_init_r(void) u32 sdr0_srst1 = 0; u32 eth_cfg; u32 pvr = get_pvr(); + u8 val; /* * Set EMAC mode/configuration (GMII, SGMII, RGMII...). @@ -420,6 +422,15 @@ int misc_init_r(void) sdr0_srst1 &= ~SDR0_SRST1_AHB; mtsdr(SDR0_SRST1, sdr0_srst1); + /* + * RTC/M41T62: + * Disable square wave output: Batterie will be drained + * quickly, when this output is not disabled + */ + val = i2c_reg_read(CFG_I2C_RTC_ADDR, 0xa); + val &= ~0x40; + i2c_reg_write(CFG_I2C_RTC_ADDR, 0xa, val); + return 0; } diff --git a/board/amcc/ebony/Makefile b/board/amcc/ebony/Makefile index 5da96e9e1c846aaab582cd468654ae8debc73520..6ab1a26b15b5338d60a5cefc03b14b8b1567872a 100644 --- a/board/amcc/ebony/Makefile +++ b/board/amcc/ebony/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/amcc/katmai/Makefile b/board/amcc/katmai/Makefile index d06a402d1751aed5520cbab4507c0372d4e38274..318016d2ceba110bf812c80a4b9f661c09cb85b7 100644 --- a/board/amcc/katmai/Makefile +++ b/board/amcc/katmai/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend *~ + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/amcc/katmai/cmd_katmai.c b/board/amcc/katmai/cmd_katmai.c index 439be4fa9da033cea5a5905db250f7facc18cd75..703d225606959d352cc3b10a6ef3665eec40c01c 100644 --- a/board/amcc/katmai/cmd_katmai.c +++ b/board/amcc/katmai/cmd_katmai.c @@ -176,7 +176,7 @@ static int do_bootstrap(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #endif } #ifdef DEBUG - printf(" pin strap0 to write in i2c = %x\n", data); + printf(" pin strap0 to write in i2c = %lx\n", data); #endif /* DEBUG */ if (i2c_write(chip, 0, 1, (uchar *)&data, 4) != 0) @@ -201,7 +201,7 @@ static int do_bootstrap(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) data |= 0x05A50000; #ifdef DEBUG - printf(" pin strap1 to write in i2c = %x\n", data); + printf(" pin strap1 to write in i2c = %lx\n", data); #endif /* DEBUG */ udelay(1000); diff --git a/board/amcc/kilauea/Makefile b/board/amcc/kilauea/Makefile index 981ef3a97e848f792309e21ddcf53bf83ac47ea3..df0a68f5d543f1f8c47668253a48149b33317fd1 100644 --- a/board/amcc/kilauea/Makefile +++ b/board/amcc/kilauea/Makefile @@ -37,7 +37,7 @@ clean: rm -f $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend *~ + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/amcc/luan/Makefile b/board/amcc/luan/Makefile index 5da96e9e1c846aaab582cd468654ae8debc73520..6ab1a26b15b5338d60a5cefc03b14b8b1567872a 100644 --- a/board/amcc/luan/Makefile +++ b/board/amcc/luan/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/amcc/makalu/Makefile b/board/amcc/makalu/Makefile index 4def0d44d5090f6a17757aeb8f67fa7aa0872196..dc3edc11aa863caa67a01ed9daab07370f55cae2 100644 --- a/board/amcc/makalu/Makefile +++ b/board/amcc/makalu/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend *~ + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/amcc/ocotea/Makefile b/board/amcc/ocotea/Makefile index a758650e591c91304541ac05581f99063b9b3e33..6ab1a26b15b5338d60a5cefc03b14b8b1567872a 100644 --- a/board/amcc/ocotea/Makefile +++ b/board/amcc/ocotea/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend *~ + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/amcc/sequoia/Makefile b/board/amcc/sequoia/Makefile index e1c9ad4d694c4d80a1fb8aaba37ba7c5a1c5e07e..a5d501079a294183de5854a3c940e4e0c8de0e8a 100644 --- a/board/amcc/sequoia/Makefile +++ b/board/amcc/sequoia/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/amcc/taihu/Makefile b/board/amcc/taihu/Makefile index 9731c6e332a5011a9976af03ce1ec6b307027888..0b9f970ead324ffef9128021765b37db691e10f0 100644 --- a/board/amcc/taihu/Makefile +++ b/board/amcc/taihu/Makefile @@ -37,7 +37,7 @@ clean: rm -f $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/amcc/taishan/Makefile b/board/amcc/taishan/Makefile index 462af001b4876a7b49417d8292bf4b6a8e306eb6..9d20e0f6bfbc5142b7c6a3e57eac3bab646bb7d3 100644 --- a/board/amcc/taishan/Makefile +++ b/board/amcc/taishan/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/amcc/walnut/Makefile b/board/amcc/walnut/Makefile index 50fecc6d486a404480d5b733758d8e05203fcb21..1939d51688b5b9c3ceb07c47525578af88e53e91 100644 --- a/board/amcc/walnut/Makefile +++ b/board/amcc/walnut/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/amcc/yosemite/Makefile b/board/amcc/yosemite/Makefile index 261e5d49cca695eb3542f293f8f6ac91fb1e6dde..b93f2c3890ef77b66ed5f5a3afa2365c1501963b 100644 --- a/board/amcc/yosemite/Makefile +++ b/board/amcc/yosemite/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/amcc/yucca/Makefile b/board/amcc/yucca/Makefile index 9f42279b46686897373977a8b5792c2af9e7ed72..0ff522c31cf496a1daaee1f6f05d6c2d390c81cd 100644 --- a/board/amcc/yucca/Makefile +++ b/board/amcc/yucca/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend *~ + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/amirix/ap1000/Makefile b/board/amirix/ap1000/Makefile index 7b99d314f992890737bbb94c52391f0761ddf581..d0729348a977710cf235da41c66ad2b26ce83dd5 100644 --- a/board/amirix/ap1000/Makefile +++ b/board/amirix/ap1000/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/amirix/ap1000/serial.c b/board/amirix/ap1000/serial.c index 5e9e3a31eeae14c18a4a1c11406ef64aa29569a2..508e8804031b4ceedea8ca81f0d7c3b58847208c 100644 --- a/board/amirix/ap1000/serial.c +++ b/board/amirix/ap1000/serial.c @@ -19,9 +19,9 @@ * */ +#include #include #include -#include #include #include diff --git a/board/apollon/Makefile b/board/apollon/Makefile index 5348f2d3025827f2d6d58e8bb6db532113fcb540..9bac9a6c0abb4bbeaf3c0b3cab6de18cce0c6bca 100644 --- a/board/apollon/Makefile +++ b/board/apollon/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/apollon/apollon.c b/board/apollon/apollon.c index 7e39817a0f43c13c7bebf74415a5a281ca2fa37b..8efa7039512b29fa428a2b7bb95abaf9ad79a73e 100644 --- a/board/apollon/apollon.c +++ b/board/apollon/apollon.c @@ -153,10 +153,8 @@ void ether_init(void) do { __raw_writew(0x1, LAN_RESET_REGISTER); udelay(100); - if (cnt == 0) { - printf("1. eth reset err\n"); + if (cnt == 0) goto eth_reset_err_out; - } --cnt; } while (__raw_readw(LAN_RESET_REGISTER) != 0x1); @@ -165,10 +163,8 @@ void ether_init(void) do { __raw_writew(0x0, LAN_RESET_REGISTER); udelay(100); - if (cnt == 0) { - printf("2. eth reset err\n"); + if (cnt == 0) goto eth_reset_err_out; - } --cnt; } while (__raw_readw(LAN_RESET_REGISTER) != 0x0000); udelay(1000); diff --git a/board/apollon/mem.h b/board/apollon/mem.h index 5bc96faa957f41a518eaf0833380d40bc0ef039a..d4636f405111a18766ed2165f5224691fbfa63af 100644 --- a/board/apollon/mem.h +++ b/board/apollon/mem.h @@ -67,7 +67,7 @@ # define APOLLON_24XX_GPMC_CONFIG7_0 (0x00000e40|(APOLLON_CS0_BASE >> 24)) /* CS1: Ethernet */ -# define APOLLON_24XX_GPMC_CONFIG1_1 0x00011200 +# define APOLLON_24XX_GPMC_CONFIG1_1 0x00011203 # define APOLLON_24XX_GPMC_CONFIG2_1 0x001F1F01 # define APOLLON_24XX_GPMC_CONFIG3_1 0x00080803 # define APOLLON_24XX_GPMC_CONFIG4_1 0x1C0b1C0a diff --git a/board/armadillo/Makefile b/board/armadillo/Makefile index 1380e92cf6d07de47ab6e0bbf83794b0d209c0b7..b18e42bff30c707cdc938eea2af6ada9a205da90 100644 --- a/board/armadillo/Makefile +++ b/board/armadillo/Makefile @@ -43,7 +43,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/assabet/Makefile b/board/assabet/Makefile index 872c7fbff85ac91a26e6393d667e553d1cd70937..03f0762a3bd41c77e91b7d0783917b7f999d692f 100644 --- a/board/assabet/Makefile +++ b/board/assabet/Makefile @@ -41,7 +41,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/atmel/at91cap9adk/Makefile b/board/atmel/at91cap9adk/Makefile index f2b9c12ada6185294b2f88ea9a22bfd8c0996e80..2d2ff2cbb9701a7735a18134101046ddf54d2338 100644 --- a/board/atmel/at91cap9adk/Makefile +++ b/board/atmel/at91cap9adk/Makefile @@ -45,7 +45,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/atmel/at91cap9adk/at91cap9adk.c b/board/atmel/at91cap9adk/at91cap9adk.c index a3eaf1922412a7e603b852417257367c615fe2d8..c5082a0925e8ee0348cf0f9efe789c48c71a70c4 100644 --- a/board/atmel/at91cap9adk/at91cap9adk.c +++ b/board/atmel/at91cap9adk/at91cap9adk.c @@ -196,7 +196,7 @@ static void at91cap9_macb_hw_init(void) /* Need to reset PHY -> 500ms reset */ at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY | - AT91_RSTC_ERSTL | (0x0D << 8) | + (AT91_RSTC_ERSTL & (0x0D << 8)) | AT91_RSTC_URSTEN); at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_EXTRST); @@ -204,6 +204,11 @@ static void at91cap9_macb_hw_init(void) /* Wait for end hardware reset */ while (!(at91_sys_read(AT91_RSTC_SR) & AT91_RSTC_NRSTL)); + /* Restore NRST value */ + at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY | + (AT91_RSTC_ERSTL & (0x0 << 8)) | + AT91_RSTC_URSTEN); + /* Re-enable pull-up */ writel(pin_to_mask(AT91_PIN_PB22) | pin_to_mask(AT91_PIN_PB25) | diff --git a/board/atmel/at91rm9200dk/Makefile b/board/atmel/at91rm9200dk/Makefile old mode 100755 new mode 100644 index 5b4cdcfc391f1923c18ced61dedfe5609b487a5a..2d806d06685b362873ee66a13e6a3412f68968c2 --- a/board/atmel/at91rm9200dk/Makefile +++ b/board/atmel/at91rm9200dk/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/atmel/at91sam9260ek/Makefile b/board/atmel/at91sam9260ek/Makefile index f93540a02e1686a27d96de9fd60459f3107027e4..7c8a612e479966eaaa20294e4fdc5ed77afa2636 100644 --- a/board/atmel/at91sam9260ek/Makefile +++ b/board/atmel/at91sam9260ek/Makefile @@ -45,7 +45,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/atmel/at91sam9260ek/at91sam9260ek.c b/board/atmel/at91sam9260ek/at91sam9260ek.c index ef4d486be57309dcb77ed168e59cf6a5b04cff41..836a0c40bf2d9c2ad9b1d5e1d0488afdd108fc39 100644 --- a/board/atmel/at91sam9260ek/at91sam9260ek.c +++ b/board/atmel/at91sam9260ek/at91sam9260ek.c @@ -80,8 +80,8 @@ static void at91sam9260ek_nand_hw_init(void) /* Configure SMC CS3 for NAND/SmartMedia */ at91_sys_write(AT91_SMC_SETUP(3), - AT91_SMC_NWESETUP_(0) | AT91_SMC_NCS_WRSETUP_(0) | - AT91_SMC_NRDSETUP_(0) | AT91_SMC_NCS_RDSETUP_(0)); + AT91_SMC_NWESETUP_(1) | AT91_SMC_NCS_WRSETUP_(0) | + AT91_SMC_NRDSETUP_(1) | AT91_SMC_NCS_RDSETUP_(0)); at91_sys_write(AT91_SMC_PULSE(3), AT91_SMC_NWEPULSE_(3) | AT91_SMC_NCS_WRPULSE_(3) | AT91_SMC_NRDPULSE_(3) | AT91_SMC_NCS_RDPULSE_(3)); @@ -149,7 +149,7 @@ static void at91sam9260ek_macb_hw_init(void) /* Need to reset PHY -> 500ms reset */ at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY | - AT91_RSTC_ERSTL | (0x0D << 8) | + (AT91_RSTC_ERSTL & (0x0D << 8)) | AT91_RSTC_URSTEN); at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_EXTRST); @@ -159,7 +159,7 @@ static void at91sam9260ek_macb_hw_init(void) /* Restore NRST value */ at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY | - AT91_RSTC_ERSTL | (0x0 << 8) | + (AT91_RSTC_ERSTL & (0x0 << 8)) | AT91_RSTC_URSTEN); /* Re-enable pull-up */ diff --git a/board/atmel/at91sam9261ek/Makefile b/board/atmel/at91sam9261ek/Makefile index 7702a9c90348948a636c6b95676b1c90b5e34b32..d7b063dec8dfc780e59d4af0610b71232f435738 100644 --- a/board/atmel/at91sam9261ek/Makefile +++ b/board/atmel/at91sam9261ek/Makefile @@ -45,7 +45,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/atmel/at91sam9261ek/at91sam9261ek.c b/board/atmel/at91sam9261ek/at91sam9261ek.c index 3de234ce3e7303a1930dca04f9d1ade753b1e87e..647aab52566dfbc4bc7bb503abe20a65f2c54cc5 100644 --- a/board/atmel/at91sam9261ek/at91sam9261ek.c +++ b/board/atmel/at91sam9261ek/at91sam9261ek.c @@ -82,13 +82,13 @@ static void at91sam9261ek_nand_hw_init(void) /* Configure SMC CS3 for NAND/SmartMedia */ at91_sys_write(AT91_SMC_SETUP(3), - AT91_SMC_NWESETUP_(0) | AT91_SMC_NCS_WRSETUP_(0) | - AT91_SMC_NRDSETUP_(0) | AT91_SMC_NCS_RDSETUP_(0)); + AT91_SMC_NWESETUP_(1) | AT91_SMC_NCS_WRSETUP_(0) | + AT91_SMC_NRDSETUP_(1) | AT91_SMC_NCS_RDSETUP_(0)); at91_sys_write(AT91_SMC_PULSE(3), - AT91_SMC_NWEPULSE_(2) | AT91_SMC_NCS_WRPULSE_(5) | - AT91_SMC_NRDPULSE_(2) | AT91_SMC_NCS_RDPULSE_(5)); + AT91_SMC_NWEPULSE_(3) | AT91_SMC_NCS_WRPULSE_(3) | + AT91_SMC_NRDPULSE_(3) | AT91_SMC_NCS_RDPULSE_(3)); at91_sys_write(AT91_SMC_CYCLE(3), - AT91_SMC_NWECYCLE_(7) | AT91_SMC_NRDCYCLE_(7)); + AT91_SMC_NWECYCLE_(5) | AT91_SMC_NRDCYCLE_(5)); at91_sys_write(AT91_SMC_MODE(3), AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | @@ -97,7 +97,7 @@ static void at91sam9261ek_nand_hw_init(void) #else /* CFG_NAND_DBW_8 */ AT91_SMC_DBW_8 | #endif - AT91_SMC_TDF_(1)); + AT91_SMC_TDF_(2)); at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9261_ID_PIOC); diff --git a/board/atmel/at91sam9263ek/Makefile b/board/atmel/at91sam9263ek/Makefile index 5adb0bc853a0525bf07e6466a7a1f9a25e22383a..00a6b00ddfa4a6543d31c9b01fb2dc1c6b64887a 100644 --- a/board/atmel/at91sam9263ek/Makefile +++ b/board/atmel/at91sam9263ek/Makefile @@ -45,7 +45,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/atmel/at91sam9263ek/at91sam9263ek.c b/board/atmel/at91sam9263ek/at91sam9263ek.c index ba7fc71d75e70ad715ad3f358695a36fa90fa937..927fc912c94fac932a5f6a5c83ed338463afd621 100644 --- a/board/atmel/at91sam9263ek/at91sam9263ek.c +++ b/board/atmel/at91sam9263ek/at91sam9263ek.c @@ -83,8 +83,8 @@ static void at91sam9263ek_nand_hw_init(void) /* Configure SMC CS3 for NAND/SmartMedia */ at91_sys_write(AT91_SMC_SETUP(3), - AT91_SMC_NWESETUP_(0) | AT91_SMC_NCS_WRSETUP_(0) | - AT91_SMC_NRDSETUP_(0) | AT91_SMC_NCS_RDSETUP_(0)); + AT91_SMC_NWESETUP_(1) | AT91_SMC_NCS_WRSETUP_(0) | + AT91_SMC_NRDSETUP_(1) | AT91_SMC_NCS_RDSETUP_(0)); at91_sys_write(AT91_SMC_PULSE(3), AT91_SMC_NWEPULSE_(3) | AT91_SMC_NCS_WRPULSE_(3) | AT91_SMC_NRDPULSE_(3) | AT91_SMC_NCS_RDPULSE_(3)); @@ -147,7 +147,7 @@ static void at91sam9263ek_macb_hw_init(void) /* Need to reset PHY -> 500ms reset */ at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY | - AT91_RSTC_ERSTL | (0x0D << 8) | + (AT91_RSTC_ERSTL & (0x0D << 8)) | AT91_RSTC_URSTEN); at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_EXTRST); @@ -155,6 +155,11 @@ static void at91sam9263ek_macb_hw_init(void) /* Wait for end hardware reset */ while (!(at91_sys_read(AT91_RSTC_SR) & AT91_RSTC_NRSTL)); + /* Restore NRST value */ + at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY | + (AT91_RSTC_ERSTL & (0x0 << 8)) | + AT91_RSTC_URSTEN); + /* Re-enable pull-up */ writel(pin_to_mask(AT91_PIN_PC25), pin_to_controller(AT91_PIN_PC0) + PIO_PUER); diff --git a/board/atmel/at91sam9rlek/Makefile b/board/atmel/at91sam9rlek/Makefile index a86a9269f0177c6a4e333276625c4ac3c62be0d4..90029cb8729c2e2c53beecf6898094a324d882ec 100644 --- a/board/atmel/at91sam9rlek/Makefile +++ b/board/atmel/at91sam9rlek/Makefile @@ -45,7 +45,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/atmel/at91sam9rlek/at91sam9rlek.c b/board/atmel/at91sam9rlek/at91sam9rlek.c index 10423d25928128b8090a27de87678a01f3dad916..509e7c38e15c7cd9db46a3d335c1fab1a8a14655 100644 --- a/board/atmel/at91sam9rlek/at91sam9rlek.c +++ b/board/atmel/at91sam9rlek/at91sam9rlek.c @@ -82,13 +82,13 @@ static void at91sam9rlek_nand_hw_init(void) /* Configure SMC CS3 for NAND/SmartMedia */ at91_sys_write(AT91_SMC_SETUP(3), - AT91_SMC_NWESETUP_(0) | AT91_SMC_NCS_WRSETUP_(0) | - AT91_SMC_NRDSETUP_(0) | AT91_SMC_NCS_RDSETUP_(0)); + AT91_SMC_NWESETUP_(1) | AT91_SMC_NCS_WRSETUP_(0) | + AT91_SMC_NRDSETUP_(1) | AT91_SMC_NCS_RDSETUP_(0)); at91_sys_write(AT91_SMC_PULSE(3), - AT91_SMC_NWEPULSE_(2) | AT91_SMC_NCS_WRPULSE_(5) | - AT91_SMC_NRDPULSE_(2) | AT91_SMC_NCS_RDPULSE_(5)); + AT91_SMC_NWEPULSE_(3) | AT91_SMC_NCS_WRPULSE_(3) | + AT91_SMC_NRDPULSE_(3) | AT91_SMC_NCS_RDPULSE_(3)); at91_sys_write(AT91_SMC_CYCLE(3), - AT91_SMC_NWECYCLE_(7) | AT91_SMC_NRDCYCLE_(7)); + AT91_SMC_NWECYCLE_(5) | AT91_SMC_NRDCYCLE_(5)); at91_sys_write(AT91_SMC_MODE(3), AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | @@ -97,7 +97,7 @@ static void at91sam9rlek_nand_hw_init(void) #else /* CFG_NAND_DBW_8 */ AT91_SMC_DBW_8 | #endif - AT91_SMC_TDF_(1)); + AT91_SMC_TDF_(2)); at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9RL_ID_PIOD); diff --git a/board/atmel/atngw100/atngw100.c b/board/atmel/atngw100/atngw100.c index 375f0e7e1777cfb499e8b262b93462d4aa3d1aad..f2c3e79799616ea4cb6c7be67490ae235c14e80e 100644 --- a/board/atmel/atngw100/atngw100.c +++ b/board/atmel/atngw100/atngw100.c @@ -60,6 +60,9 @@ int board_early_init_f(void) #if defined(CONFIG_MMC) gpio_enable_mmci(); #endif +#if defined(CONFIG_ATMEL_SPI) + gpio_enable_spi0(1 << 0); +#endif return 0; } @@ -89,3 +92,25 @@ void board_init_info(void) gd->bd->bi_phy_id[0] = 0x01; gd->bd->bi_phy_id[1] = 0x03; } + +/* SPI chip select control */ +#ifdef CONFIG_ATMEL_SPI +#include + +#define ATNGW100_DATAFLASH_CS_PIN GPIO_PIN_PA3 + +int spi_cs_is_valid(unsigned int bus, unsigned int cs) +{ + return bus == 0 && cs == 0; +} + +void spi_cs_activate(struct spi_slave *slave) +{ + gpio_set_value(ATNGW100_DATAFLASH_CS_PIN, 0); +} + +void spi_cs_deactivate(struct spi_slave *slave) +{ + gpio_set_value(ATNGW100_DATAFLASH_CS_PIN, 1); +} +#endif /* CONFIG_ATMEL_SPI */ diff --git a/board/atum8548/Makefile b/board/atum8548/Makefile index ac4e5838557b5b959cfe158b0c284f0be8630b1d..d2e689f1faf64963d5c5ee0d2d56b99bb271b166 100644 --- a/board/atum8548/Makefile +++ b/board/atum8548/Makefile @@ -42,7 +42,7 @@ clean: rm -f $(OBJS) $(SOBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/barco/barco.c b/board/barco/barco.c index 72e7e0b0506e4353424ab8f56a6f50c521429e27..f8b2084c454cf9362bfcce9bfe8552ff9cad810e 100644 --- a/board/barco/barco.c +++ b/board/barco/barco.c @@ -177,7 +177,7 @@ unsigned update_flash (unsigned char *buf) write_flash ((char *)buf, (*buf) & 0xFE); *((unsigned char *)0xFF800000) = 0xF0; udelay (100); - printf ("buf [%#010x] %#010x\n", buf, (*buf)); + printf ("buf [%#010x] %#010x\n", (unsigned)buf, (*buf)); /* XXX - fall through??? */ case BOOT_WORKING : return BOOT_WORKING; @@ -273,10 +273,10 @@ void barcobcd_boot (void) /* give length of the kernel image to bootm */ sprintf (bootm_args[0],"%x",start->size); /* give address of the kernel image to bootm */ - sprintf (bootm_args[1],"%x",buf); + sprintf (bootm_args[1],"%x",(unsigned)buf); printf ("flash address: %#10x\n",start->address+8); - printf ("buf address: %#10x\n",buf); + printf ("buf address: %#10x\n",(unsigned)buf); /* aha, we reserve 8 bytes here... */ for (cnt = 0; cnt < start->size ; cnt++) { diff --git a/board/bc3450/Makefile b/board/bc3450/Makefile index d0e147e4ba004a1b96abb26f6da0bea4478c9581..9c1d0cc5612bb23cd87513b7c88ba23e5f53066b 100644 --- a/board/bc3450/Makefile +++ b/board/bc3450/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/bf533-ezkit/Makefile b/board/bf533-ezkit/Makefile index 6688095d23237544afabafc0b68236355d169f9d..b2d7acffee5721e3d1e3dff19eee8cc60fa880ff 100644 --- a/board/bf533-ezkit/Makefile +++ b/board/bf533-ezkit/Makefile @@ -46,7 +46,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/bf533-stamp/Makefile b/board/bf533-stamp/Makefile index 1115df8327bf70a4b8f7cc25c00fd617cc5aab05..21f6ad1b45a923354d2234320e9775bbd0670f70 100644 --- a/board/bf533-stamp/Makefile +++ b/board/bf533-stamp/Makefile @@ -46,7 +46,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/bf537-stamp/Makefile b/board/bf537-stamp/Makefile index ea8c43680b834e1ca5abe481878fffabb3cf2730..e5481bfc55577a7717a74d9e0859da6b3fdbaac1 100644 --- a/board/bf537-stamp/Makefile +++ b/board/bf537-stamp/Makefile @@ -46,7 +46,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/bf561-ezkit/Makefile b/board/bf561-ezkit/Makefile index 73bef24baf35e291eafce3603eb26c7d196fede7..a1a4433fc1bcd899b7acd305a0e634009c916a7d 100644 --- a/board/bf561-ezkit/Makefile +++ b/board/bf561-ezkit/Makefile @@ -46,7 +46,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/canmb/Makefile b/board/canmb/Makefile index 23d410d14e67f2e9245b5564b4abc49c43f05f6e..b6b67d8e720c64a0c8f640a54bebb62a46c23fa0 100644 --- a/board/canmb/Makefile +++ b/board/canmb/Makefile @@ -42,7 +42,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/cerf250/Makefile b/board/cerf250/Makefile index 50d07b80226b56979150f7a94e1a89bbae6d3d4e..a806b184920d2abff6c5be38bffec1124943029b 100644 --- a/board/cerf250/Makefile +++ b/board/cerf250/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/cm4008/Makefile b/board/cm4008/Makefile index f53404148ae37cf4e13e19523ad57dd870f3f97c..cd3f962f28af4ca40981241668be8fdec599c2a4 100644 --- a/board/cm4008/Makefile +++ b/board/cm4008/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/cm41xx/Makefile b/board/cm41xx/Makefile index 5c20477d5d2ce596dcae26f477b3313499bc6e0c..952a8ae21bc61321632d739a4e39b6c29f33d156 100644 --- a/board/cm41xx/Makefile +++ b/board/cm41xx/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/cm5200/Makefile b/board/cm5200/Makefile index 8ebdb1aa28b7ce15e6980eedb96aa1ed7d17a365..d76e13a07868c680cc14df9a10cad3aa5413f0fe 100644 --- a/board/cm5200/Makefile +++ b/board/cm5200/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/cm5200/cm5200.c b/board/cm5200/cm5200.c index 3e952d869f7e6100ae3963509a293a81eceb8863..24e8db0c60b7cd730150daf42a4afea4d13d1182 100644 --- a/board/cm5200/cm5200.c +++ b/board/cm5200/cm5200.c @@ -275,7 +275,7 @@ static void ft_blob_update(void *blob, bd_t *bd) ret = fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize); if (ret < 0) { - printf("ft_blob_update): cannot set /memory/reg " + printf("ft_blob_update(): cannot set /memory/reg " "property err:%s\n", fdt_strerror(ret)); } } diff --git a/board/cmc_pu2/Makefile b/board/cmc_pu2/Makefile old mode 100755 new mode 100644 index f7a136034edaf80d0dcd51e11c29971c1df8bb9e..9745ebd37817a0159d959c297a3950b7c4d2a4e9 --- a/board/cmc_pu2/Makefile +++ b/board/cmc_pu2/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/cmi/Makefile b/board/cmi/Makefile index 6a4230486f1ec4acbe24020c4f316847caf8d79c..aeebb9ecb5f0eeda1e0719df729fbb6ed4aa4874 100644 --- a/board/cmi/Makefile +++ b/board/cmi/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/cogent/Makefile b/board/cogent/Makefile index ced04dd725cbbaaffc372c767729471ba909d2fa..afa134558f66236bd14680eacb9e5267103c0641 100644 --- a/board/cogent/Makefile +++ b/board/cogent/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/cradle/Makefile b/board/cradle/Makefile index 90a790793615a248d3f8d6dd392a21ab6796a404..1ae785db5fc749aea01fe2c38b850eaaa422d8d4 100644 --- a/board/cradle/Makefile +++ b/board/cradle/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/cray/L1/Makefile b/board/cray/L1/Makefile index cfdd60e0562ac29b72ede73af69b4c0009236b13..21b513c29fab7be8d3157b74dafa5c9578ba3d96 100644 --- a/board/cray/L1/Makefile +++ b/board/cray/L1/Makefile @@ -43,7 +43,7 @@ clean: $(obj)bootscript.image $(obj)bootscript.o distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend $(obj)$(BOARD).o : $(src)$(BOARD).c $(obj)bootscript.o diff --git a/board/csb226/Makefile b/board/csb226/Makefile index eee8f135252e32eba13931e797d305e8626a670c..c12dbea9cdd7db3802087cacb8f036da048a6c82 100644 --- a/board/csb226/Makefile +++ b/board/csb226/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/csb272/Makefile b/board/csb272/Makefile index 703a25c979e8c499af6ebeda9774e47aeb2dbe48..6d42bff750547ccecc7df71c876caca0135e5cfb 100644 --- a/board/csb272/Makefile +++ b/board/csb272/Makefile @@ -42,7 +42,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/csb472/Makefile b/board/csb472/Makefile index 703a25c979e8c499af6ebeda9774e47aeb2dbe48..6d42bff750547ccecc7df71c876caca0135e5cfb 100644 --- a/board/csb472/Makefile +++ b/board/csb472/Makefile @@ -42,7 +42,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/csb637/Makefile b/board/csb637/Makefile index ce263aa84e519597bea10a0b823dab75f8477faf..ab28434a319848d48a2dda972edf52d19aceb58c 100644 --- a/board/csb637/Makefile +++ b/board/csb637/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/dave/B2/Makefile b/board/dave/B2/Makefile index 56b286f85eea28887a7a768504c12e45f0e12ba2..e70d2c8e37c14e8f950831af453a94d70c3c9a0b 100644 --- a/board/dave/B2/Makefile +++ b/board/dave/B2/Makefile @@ -43,7 +43,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/dave/PPChameleonEVB/Makefile b/board/dave/PPChameleonEVB/Makefile index cb7becb4db99892035b645b30a868d975a034773..1869f8ceee8d7c49b2f1af8db6bcd1ecdcde860c 100644 --- a/board/dave/PPChameleonEVB/Makefile +++ b/board/dave/PPChameleonEVB/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/davinci/dv-evm/Makefile b/board/davinci/dv-evm/Makefile index fa0013811d43f7e33a1d073c29cd7c02b1547a23..579efe2623004a91a5397ab72cbef8538775417b 100644 --- a/board/davinci/dv-evm/Makefile +++ b/board/davinci/dv-evm/Makefile @@ -41,7 +41,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak *~ .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### # This is for $(obj).depend target diff --git a/board/davinci/schmoogie/Makefile b/board/davinci/schmoogie/Makefile index fa0013811d43f7e33a1d073c29cd7c02b1547a23..579efe2623004a91a5397ab72cbef8538775417b 100644 --- a/board/davinci/schmoogie/Makefile +++ b/board/davinci/schmoogie/Makefile @@ -41,7 +41,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak *~ .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### # This is for $(obj).depend target diff --git a/board/davinci/sffsdr/Makefile b/board/davinci/sffsdr/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..fb31ee42b2575520dbd707efd90a0fb9241d8ff9 --- /dev/null +++ b/board/davinci/sffsdr/Makefile @@ -0,0 +1,52 @@ +# +# (C) Copyright 2000, 2001, 2002 +# Wolfgang Denk, DENX Software Engineering, wd@denx.de. +# +# Copyright (C) 2007 Sergey Kubushyn +# +# 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 as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# 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 $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).a + +COBJS := $(BOARD).o +SOBJS := board_init.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +######################################################################### +# This is for $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +######################################################################### diff --git a/board/davinci/sffsdr/board_init.S b/board/davinci/sffsdr/board_init.S new file mode 100644 index 0000000000000000000000000000000000000000..22d8adc18ca305d36eea2a29dacf21e952b8d0be --- /dev/null +++ b/board/davinci/sffsdr/board_init.S @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2007 Sergey Kubushyn + * + * Board-specific low level initialization code. Called at the very end + * of cpu/arm926ejs/davinci/lowlevel_init.S. Just returns if there is no + * initialization required. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * 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 + +.globl dv_board_init +dv_board_init: + + mov pc, lr diff --git a/board/davinci/sffsdr/config.mk b/board/davinci/sffsdr/config.mk new file mode 100644 index 0000000000000000000000000000000000000000..f3b23d1c83596441a709c690c15d872e707714de --- /dev/null +++ b/board/davinci/sffsdr/config.mk @@ -0,0 +1,23 @@ +# +# (C) Copyright 2002 +# Gary Jennejohn, DENX Software Engineering, +# David Mueller, ELSOFT AG, +# +# Copyright (C) 2008 Lyrtech +# Copyright (C) 2008 Philip Balister, OpenSDR +# +# Lyrtech SFF SDR board (ARM926EJS) cpu +# +# SFF SDR board has 1 bank of 128 MB DDR RAM +# Physical Address: +# 8000'0000 to 87FF'FFFF +# +# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000 +# (mem base + reserved) +# +# Integrity kernel is expected to be at 8000'0000, entry 8000'00D0, +# up to 81FF'FFFF (uses up to 32 MB of memory for text, heap, etc). +# +# we load ourself to 8400'0000 to provide at least 32MB spacing +# between us and the Integrity kernel image +TEXT_BASE = 0x84000000 diff --git a/board/davinci/sffsdr/sffsdr.c b/board/davinci/sffsdr/sffsdr.c new file mode 100644 index 0000000000000000000000000000000000000000..b73484ae2b45e9cec3e3f8e567b69d7727489c89 --- /dev/null +++ b/board/davinci/sffsdr/sffsdr.c @@ -0,0 +1,310 @@ +/* + * Copyright (C) 2007 Sergey Kubushyn + * + * Copyright (C) 2008 Lyrtech + * Copyright (C) 2008 Philip Balister, OpenSDR + * + * Parts are shamelessly stolen from various TI sources, original copyright + * follows: + * + * Copyright (C) 2004 Texas Instruments. + * + * 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 as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include + +#define DAVINCI_A3CR (0x01E00014) /* EMIF-A CS3 config register. */ +#define DAVINCI_A3CR_VAL (0x3FFFFFFD) /* EMIF-A CS3 value for FPGA. */ + +#define INTEGRITY_SYSCFG_OFFSET 0x7E8 +#define INTEGRITY_CHECKWORD_OFFSET 0x7F8 +#define INTEGRITY_CHECKWORD_VALUE 0x10ADBEEF + +DECLARE_GLOBAL_DATA_PTR; + +extern void timer_init(void); +extern int eth_hw_init(void); +extern phy_t phy; + + +/* Works on Always On power domain only (no PD argument) */ +void lpsc_on(unsigned int id) +{ + dv_reg_p mdstat, mdctl; + + if (id >= DAVINCI_LPSC_GEM) + return; /* Don't work on DSP Power Domain */ + + mdstat = REG_P(PSC_MDSTAT_BASE + (id * 4)); + mdctl = REG_P(PSC_MDCTL_BASE + (id * 4)); + + while (REG(PSC_PTSTAT) & 0x01); + + if ((*mdstat & 0x1f) == 0x03) + return; /* Already on and enabled */ + + *mdctl |= 0x03; + + /* Special treatment for some modules as for sprue14 p.7.4.2 */ + switch (id) { + case DAVINCI_LPSC_VPSSSLV: + case DAVINCI_LPSC_EMAC: + case DAVINCI_LPSC_EMAC_WRAPPER: + case DAVINCI_LPSC_MDIO: + case DAVINCI_LPSC_USB: + case DAVINCI_LPSC_ATA: + case DAVINCI_LPSC_VLYNQ: + case DAVINCI_LPSC_UHPI: + case DAVINCI_LPSC_DDR_EMIF: + case DAVINCI_LPSC_AEMIF: + case DAVINCI_LPSC_MMC_SD: + case DAVINCI_LPSC_MEMSTICK: + case DAVINCI_LPSC_McBSP: + case DAVINCI_LPSC_GPIO: + *mdctl |= 0x200; + break; + } + + REG(PSC_PTCMD) = 0x01; + + while (REG(PSC_PTSTAT) & 0x03); + while ((*mdstat & 0x1f) != 0x03); /* Probably an overkill... */ +} + +#if !defined(CFG_USE_DSPLINK) +void dsp_on(void) +{ + int i; + + if (REG(PSC_PDSTAT1) & 0x1f) + return; /* Already on */ + + REG(PSC_GBLCTL) |= 0x01; + REG(PSC_PDCTL1) |= 0x01; + REG(PSC_PDCTL1) &= ~0x100; + REG(PSC_MDCTL_BASE + (DAVINCI_LPSC_GEM * 4)) |= 0x03; + REG(PSC_MDCTL_BASE + (DAVINCI_LPSC_GEM * 4)) &= 0xfffffeff; + REG(PSC_MDCTL_BASE + (DAVINCI_LPSC_IMCOP * 4)) |= 0x03; + REG(PSC_MDCTL_BASE + (DAVINCI_LPSC_IMCOP * 4)) &= 0xfffffeff; + REG(PSC_PTCMD) = 0x02; + + for (i = 0; i < 100; i++) { + if (REG(PSC_EPCPR) & 0x02) + break; + } + + REG(PSC_CHP_SHRTSW) = 0x01; + REG(PSC_PDCTL1) |= 0x100; + REG(PSC_EPCCR) = 0x02; + + for (i = 0; i < 100; i++) { + if (!(REG(PSC_PTSTAT) & 0x02)) + break; + } + + REG(PSC_GBLCTL) &= ~0x1f; +} +#endif /* CFG_USE_DSPLINK */ + +int board_init(void) +{ + /* arch number of the board */ + gd->bd->bi_arch_number = MACH_TYPE_SFFSDR; + + /* address of boot parameters */ + gd->bd->bi_boot_params = LINUX_BOOT_PARAM_ADDR; + + /* Workaround for TMS320DM6446 errata 1.3.22 */ + REG(PSC_SILVER_BULLET) = 0; + + /* Power on required peripherals */ + lpsc_on(DAVINCI_LPSC_EMAC); + lpsc_on(DAVINCI_LPSC_EMAC_WRAPPER); + lpsc_on(DAVINCI_LPSC_MDIO); + lpsc_on(DAVINCI_LPSC_I2C); + lpsc_on(DAVINCI_LPSC_UART0); + lpsc_on(DAVINCI_LPSC_TIMER1); + lpsc_on(DAVINCI_LPSC_GPIO); + +#if !defined(CFG_USE_DSPLINK) + /* Powerup the DSP */ + dsp_on(); +#endif /* CFG_USE_DSPLINK */ + + /* Bringup UART0 out of reset */ + REG(UART0_PWREMU_MGMT) = 0x0000e003; + + /* Enable GIO3.3V cells used for EMAC */ + REG(VDD3P3V_PWDN) = 0; + + /* Enable UART0 MUX lines */ + REG(PINMUX1) |= 1; + + /* Enable EMAC and AEMIF pins */ + REG(PINMUX0) = 0x80000c1f; + + /* Enable I2C pin Mux */ + REG(PINMUX1) |= (1 << 7); + + /* Set the Bus Priority Register to appropriate value */ + REG(VBPR) = 0x20; + + timer_init(); + + return(0); +} + +/* Read ethernet MAC address from Integrity data structure inside EEPROM. */ +int read_mac_address(uint8_t *buf) +{ + u_int32_t value, mac[2], address; + + /* Read Integrity data structure checkword. */ + if (i2c_read(CFG_I2C_EEPROM_ADDR, INTEGRITY_CHECKWORD_OFFSET, + CFG_I2C_EEPROM_ADDR_LEN, (uint8_t *) &value, 4)) + goto err; + if (value != INTEGRITY_CHECKWORD_VALUE) + return 1; + + /* Read SYSCFG structure offset. */ + if (i2c_read(CFG_I2C_EEPROM_ADDR, INTEGRITY_SYSCFG_OFFSET, + CFG_I2C_EEPROM_ADDR_LEN, (uint8_t *) &value, 4)) + goto err; + address = 0x800 + (int) value; /* Address of SYSCFG structure. */ + + /* Read NET CONFIG structure offset. */ + if (i2c_read(CFG_I2C_EEPROM_ADDR, address, + CFG_I2C_EEPROM_ADDR_LEN, (uint8_t *) &value, 4)) + goto err; + address = 0x800 + (int) value; /* Address of NET CONFIG structure. */ + address += 12; /* Address of NET INTERFACE CONFIG structure. */ + + /* Read NET INTERFACE CONFIG 2 structure offset. */ + if (i2c_read(CFG_I2C_EEPROM_ADDR, address, + CFG_I2C_EEPROM_ADDR_LEN, (uint8_t *) &value, 4)) + goto err; + address = 0x800 + 16 + (int) value; /* Address of NET INTERFACE + * CONFIG 2 structure. */ + + /* Read MAC address. */ + if (i2c_read(CFG_I2C_EEPROM_ADDR, address, + CFG_I2C_EEPROM_ADDR_LEN, (uint8_t *) &mac[0], 8)) + goto err; + + buf[0] = mac[0] >> 24; + buf[1] = mac[0] >> 16; + buf[2] = mac[0] >> 8; + buf[3] = mac[0]; + buf[4] = mac[1] >> 24; + buf[5] = mac[1] >> 16; + + return 0; + +err: + printf("Read from EEPROM @ 0x%02x failed\n", CFG_I2C_EEPROM_ADDR); + return 1; +} + +/* Platform dependent initialisation. */ +int misc_init_r(void) +{ + int i; + u_int8_t i2cbuf; + u_int8_t env_enetaddr[6], eeprom_enetaddr[6]; + char *tmp = getenv("ethaddr"); + char *end; + int clk; + + /* EMIF-A CS3 configuration for FPGA. */ + REG(DAVINCI_A3CR) = DAVINCI_A3CR_VAL; + + clk = ((REG(PLL2_PLLM) + 1) * 27) / ((REG(PLL2_DIV2) & 0x1f) + 1); + + printf("ARM Clock: %dMHz\n", ((REG(PLL1_PLLM) + 1) * 27) / 2); + printf("DDR Clock: %dMHz\n", (clk / 2)); + + /* Configure I2C switch (PCA9543) to enable channel 0. */ + i2cbuf = CFG_I2C_PCA9543_ENABLE_CH0; + if (i2c_write(CFG_I2C_PCA9543_ADDR, 0, + CFG_I2C_PCA9543_ADDR_LEN, &i2cbuf, 1)) { + printf("Write to MUX @ 0x%02x failed\n", CFG_I2C_PCA9543_ADDR); + return 1; + } + + /* Read Ethernet MAC address from the U-Boot environment. */ + for (i = 0; i < 6; i++) { + env_enetaddr[i] = tmp ? simple_strtoul(tmp, &end, 16) : 0; + if (tmp) + tmp = (*end) ? end+1 : end; + } + + /* Read Ethernet MAC address from EEPROM. */ + if (read_mac_address(eeprom_enetaddr) == 0) { + if (memcmp(env_enetaddr, "\0\0\0\0\0\0", 6) != 0 && + memcmp(env_enetaddr, eeprom_enetaddr, 6) != 0) { + printf("\nWarning: MAC addresses don't match:\n"); + printf("\tHW MAC address: " + "%02X:%02X:%02X:%02X:%02X:%02X\n", + eeprom_enetaddr[0], eeprom_enetaddr[1], + eeprom_enetaddr[2], eeprom_enetaddr[3], + eeprom_enetaddr[4], eeprom_enetaddr[5]); + printf("\t\"ethaddr\" value: " + "%02X:%02X:%02X:%02X:%02X:%02X\n", + env_enetaddr[0], env_enetaddr[1], + env_enetaddr[2], env_enetaddr[3], + env_enetaddr[4], env_enetaddr[5]) ; + debug("### Set MAC addr from environment\n"); + memcpy(eeprom_enetaddr, env_enetaddr, 6); + } + if (!tmp) { + char ethaddr[20]; + + sprintf(ethaddr, "%02X:%02X:%02X:%02X:%02X:%02X", + eeprom_enetaddr[0], eeprom_enetaddr[1], + eeprom_enetaddr[2], eeprom_enetaddr[3], + eeprom_enetaddr[4], eeprom_enetaddr[5]) ; + debug("### Set environment from HW MAC addr = \"%s\"\n", + ethaddr); + setenv("ethaddr", ethaddr); + } + } + + if (!eth_hw_init()) { + printf("Ethernet init failed\n"); + } else { + printf("ETH PHY: %s\n", phy.name); + } + + /* On this platform, U-Boot is copied in RAM by the UBL, + * so we are always in the relocated state. */ + gd->flags |= GD_FLG_RELOC; + + return(0); +} + +int dram_init(void) +{ + gd->bd->bi_dram[0].start = PHYS_SDRAM_1; + gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; + + return(0); +} diff --git a/board/davinci/sffsdr/u-boot.lds b/board/davinci/sffsdr/u-boot.lds new file mode 100644 index 0000000000000000000000000000000000000000..a4fcd1a9bb4916f6755ee71cf24fcb3071347fdf --- /dev/null +++ b/board/davinci/sffsdr/u-boot.lds @@ -0,0 +1,52 @@ +/* + * (C) Copyright 2002 + * Gary Jennejohn, DENX Software Engineering, + * + * 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 as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * 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 + */ + +OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") +OUTPUT_ARCH(arm) +ENTRY(_start) +SECTIONS +{ + . = 0x00000000; + . = ALIGN(4); + .text : + { + cpu/arm926ejs/start.o (.text) + *(.text) + } + . = ALIGN(4); + .rodata : { *(.rodata) } + . = ALIGN(4); + .data : { *(.data) } + . = ALIGN(4); + .got : { *(.got) } + + . = .; + __u_boot_cmd_start = .; + .u_boot_cmd : { *(.u_boot_cmd) } + __u_boot_cmd_end = .; + + . = ALIGN(4); + __bss_start = .; + .bss (NOLOAD) : { *(.bss) } + _end = .; +} diff --git a/board/davinci/sonata/Makefile b/board/davinci/sonata/Makefile index fa0013811d43f7e33a1d073c29cd7c02b1547a23..579efe2623004a91a5397ab72cbef8538775417b 100644 --- a/board/davinci/sonata/Makefile +++ b/board/davinci/sonata/Makefile @@ -41,7 +41,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak *~ .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### # This is for $(obj).depend target diff --git a/board/delta/Makefile b/board/delta/Makefile index 72133286091e9099e8910dd4f223b6797e75ed56..648e00c3146fc37c560a0d1d312cc3a4533b34da 100644 --- a/board/delta/Makefile +++ b/board/delta/Makefile @@ -40,7 +40,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/dnp1110/Makefile b/board/dnp1110/Makefile index a024e550aa31c407d5770ea5647abcf7c6eeff26..c56e9d1e817e2e50611c82ff03bf2558b74dda00 100644 --- a/board/dnp1110/Makefile +++ b/board/dnp1110/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/eltec/bab7xx/Makefile b/board/eltec/bab7xx/Makefile index f4b0b07d965990cf8da8902c1b58bf7c1a41a0f6..1e76d25f7a4a2ccd9fe874b9218efd6ab68c5ed1 100644 --- a/board/eltec/bab7xx/Makefile +++ b/board/eltec/bab7xx/Makefile @@ -40,7 +40,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/eltec/elppc/Makefile b/board/eltec/elppc/Makefile index 5ab96233ff2fab2fce2f8f907172321f72b6f2ab..24cbfeee39f9d7d876f94ae59c6e2ac27158a894 100644 --- a/board/eltec/elppc/Makefile +++ b/board/eltec/elppc/Makefile @@ -40,7 +40,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/emk/top5200/Makefile b/board/emk/top5200/Makefile index b257739b0f59d4d39e005ee2afe604bfdd710655..86b887029f0a49c1eefb3958d59183c26074dbec 100644 --- a/board/emk/top5200/Makefile +++ b/board/emk/top5200/Makefile @@ -42,7 +42,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/ep7312/Makefile b/board/ep7312/Makefile index 45ee6cd084597ed466975422684658f2f2ae7fd0..776a444eed3a5aa0ad643ab9b70765e6e55b2f9c 100644 --- a/board/ep7312/Makefile +++ b/board/ep7312/Makefile @@ -43,7 +43,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/ep8248/Makefile b/board/ep8248/Makefile index be7e213a9b5d311794d855554c720ec083c2051b..dc40d9b94a6dd89e249b38cbfa6e5b830fc11afd 100644 --- a/board/ep8248/Makefile +++ b/board/ep8248/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/ep8260/Makefile b/board/ep8260/Makefile index f75249fc6a048f0971026ac458bb269fe9bf06ad..b8bf320347e1af91a37d6f0c8b665fa152a6e812 100644 --- a/board/ep8260/Makefile +++ b/board/ep8260/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/ep82xxm/Makefile b/board/ep82xxm/Makefile index 349be1f8dc5271db7e350e089b43c7fe73a74732..c69c475a8dcda8a50ef78e34694e1655568a576f 100644 --- a/board/ep82xxm/Makefile +++ b/board/ep82xxm/Makefile @@ -37,7 +37,7 @@ clean: rm -f $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend *~ + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/ep88x/Makefile b/board/ep88x/Makefile index b2ffd288331284b86a8a904e37d4e04d46b59171..6b3706daaeea622debda670da175b2865375e0be 100644 --- a/board/ep88x/Makefile +++ b/board/ep88x/Makefile @@ -41,7 +41,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/eric/Makefile b/board/eric/Makefile index f27fca6d7bb1faf1911657672d9a286d6afc2d74..81a455202a7c5f85edd665205aab7417544844c7 100644 --- a/board/eric/Makefile +++ b/board/eric/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/adciop/Makefile b/board/esd/adciop/Makefile index 4283300d8916d576c0a0f9ecd0a8f95514b14f1d..0fadf814ef4f562886f8785671f2759d8274d9e7 100644 --- a/board/esd/adciop/Makefile +++ b/board/esd/adciop/Makefile @@ -42,7 +42,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/apc405/Makefile b/board/esd/apc405/Makefile index c57cd6bb52f157188df4f7986bb565f40d484d51..911460655732b5ddfd8b04302e9fb007f43d60bd 100644 --- a/board/esd/apc405/Makefile +++ b/board/esd/apc405/Makefile @@ -43,7 +43,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/ar405/Makefile b/board/esd/ar405/Makefile index 4d75868ea84c86c2292e7311d25ebdd66318642d..ba92b24c8dcb61b86996cdfd663c9812d4846523 100644 --- a/board/esd/ar405/Makefile +++ b/board/esd/ar405/Makefile @@ -41,7 +41,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/ash405/Makefile b/board/esd/ash405/Makefile index 308f752d095dc9b8c877dd4daefd592dc0177b52..98acb4b7712b5648d4fa528ce0c0613c6515d592 100644 --- a/board/esd/ash405/Makefile +++ b/board/esd/ash405/Makefile @@ -43,7 +43,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/canbt/Makefile b/board/esd/canbt/Makefile index 4d75868ea84c86c2292e7311d25ebdd66318642d..ba92b24c8dcb61b86996cdfd663c9812d4846523 100644 --- a/board/esd/canbt/Makefile +++ b/board/esd/canbt/Makefile @@ -41,7 +41,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/cms700/Makefile b/board/esd/cms700/Makefile index 0d4ab2d13a943da890511c0e18076da3e3a3b669..1093c52756b40b0c02801fd86945824b0b891274 100644 --- a/board/esd/cms700/Makefile +++ b/board/esd/cms700/Makefile @@ -49,7 +49,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/cpci2dp/Makefile b/board/esd/cpci2dp/Makefile index 2d4e189977d8adf9d0b04632632b595647fa0d63..9a5607f69574bc29c9897b5ce8962a4185f81893 100644 --- a/board/esd/cpci2dp/Makefile +++ b/board/esd/cpci2dp/Makefile @@ -41,7 +41,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/cpci405/Makefile b/board/esd/cpci405/Makefile index ce7876c414e2f38a096c8507774689f3559f3874..3867bd809c3bc4d656c985d59290210913f6bd48 100644 --- a/board/esd/cpci405/Makefile +++ b/board/esd/cpci405/Makefile @@ -41,7 +41,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/cpci5200/Makefile b/board/esd/cpci5200/Makefile index 673a5b9662c73d4721fa68a7b69ac728e4518e29..4a640f663806c319c10376ee335e2d534149ad4f 100644 --- a/board/esd/cpci5200/Makefile +++ b/board/esd/cpci5200/Makefile @@ -47,7 +47,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/cpciiser4/Makefile b/board/esd/cpciiser4/Makefile index 4d75868ea84c86c2292e7311d25ebdd66318642d..ba92b24c8dcb61b86996cdfd663c9812d4846523 100644 --- a/board/esd/cpciiser4/Makefile +++ b/board/esd/cpciiser4/Makefile @@ -41,7 +41,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/dasa_sim/Makefile b/board/esd/dasa_sim/Makefile index 082236593a171027f2231c2e54c394a04b462d92..d736af8b97aaef542537091959f74c44491c882d 100644 --- a/board/esd/dasa_sim/Makefile +++ b/board/esd/dasa_sim/Makefile @@ -42,7 +42,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/dp405/Makefile b/board/esd/dp405/Makefile index df487662fd2853404c5dabebcf93802c92324818..86bd4461debd6350f02ffeb2a5bd4bd8a3620128 100644 --- a/board/esd/dp405/Makefile +++ b/board/esd/dp405/Makefile @@ -46,7 +46,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/du405/Makefile b/board/esd/du405/Makefile index 4d75868ea84c86c2292e7311d25ebdd66318642d..ba92b24c8dcb61b86996cdfd663c9812d4846523 100644 --- a/board/esd/du405/Makefile +++ b/board/esd/du405/Makefile @@ -41,7 +41,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/du440/Makefile b/board/esd/du440/Makefile index e996a0a8c3d09d47cc5bd2265a7352c9ddd16e20..909d007c47dedbdf362569c5c04626f7d7dabc38 100644 --- a/board/esd/du440/Makefile +++ b/board/esd/du440/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/du440/du440.c b/board/esd/du440/du440.c index 3dbb2e135cc4df73a3e946cb25f8387647dfe25e..8765cc1f3e10bce4953087053947bb47d9c1e2de 100644 --- a/board/esd/du440/du440.c +++ b/board/esd/du440/du440.c @@ -956,9 +956,9 @@ int do_time(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ret = run_command (cmd, 0); end = get_ticks(); - printf("ticks=%d\n", (ulong)(end - start)); + printf("ticks=%ld\n", (ulong)(end - start)); us = (ulong)((1000L * (end - start)) / (get_tbclk() / 1000)); - printf("usec=%d\n", us); + printf("usec=%ld\n", us); return ret; } diff --git a/board/esd/hh405/Makefile b/board/esd/hh405/Makefile index 0e5e57a5adeecdd66a8dffd821702b97432134cf..c57d90cf6fed304f5257010ecd59be1a7e5c7042 100644 --- a/board/esd/hh405/Makefile +++ b/board/esd/hh405/Makefile @@ -44,7 +44,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/hub405/Makefile b/board/esd/hub405/Makefile index 308f752d095dc9b8c877dd4daefd592dc0177b52..98acb4b7712b5648d4fa528ce0c0613c6515d592 100644 --- a/board/esd/hub405/Makefile +++ b/board/esd/hub405/Makefile @@ -43,7 +43,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/mecp5200/Makefile b/board/esd/mecp5200/Makefile index 45efdb0dec4c0176a4e2840363a08013394255f4..3fbb9099691d25955ec3a79fbb7a33dd3367c218 100644 --- a/board/esd/mecp5200/Makefile +++ b/board/esd/mecp5200/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/ocrtc/Makefile b/board/esd/ocrtc/Makefile index 99d87c44ff3941c70815bba23f642252eb39838c..edf3c5686290e595c7173021d6c47748a0006d17 100644 --- a/board/esd/ocrtc/Makefile +++ b/board/esd/ocrtc/Makefile @@ -41,7 +41,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/pci405/Makefile b/board/esd/pci405/Makefile index 53f217fb2aecb7733980ed74baa8573ee2bb2923..862e88d39f51a05d051ba1c2c2a24dcfba39048c 100644 --- a/board/esd/pci405/Makefile +++ b/board/esd/pci405/Makefile @@ -43,7 +43,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/pf5200/Makefile b/board/esd/pf5200/Makefile index 2e5431570449c477d986b24cfc5ac2dd82cf8e5f..efd24feef84e4d1cd0d77aaa590dd7ee4a0382a4 100644 --- a/board/esd/pf5200/Makefile +++ b/board/esd/pf5200/Makefile @@ -48,7 +48,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/plu405/Makefile b/board/esd/plu405/Makefile index 0e5e57a5adeecdd66a8dffd821702b97432134cf..c57d90cf6fed304f5257010ecd59be1a7e5c7042 100644 --- a/board/esd/plu405/Makefile +++ b/board/esd/plu405/Makefile @@ -44,7 +44,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/pmc405/Makefile b/board/esd/pmc405/Makefile index 50d0963d26fc10acf3bbed40b7fb834edb88c5a2..12c1ba730cbfdc21f0d11adf233827c9412fa361 100644 --- a/board/esd/pmc405/Makefile +++ b/board/esd/pmc405/Makefile @@ -46,7 +46,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/pmc440/Makefile b/board/esd/pmc440/Makefile index 68b566c4a6e029c2ddcd8f8fa84a7af07173cbd4..8c09efae7bbe60f1042729c9c637320e6306c43c 100644 --- a/board/esd/pmc440/Makefile +++ b/board/esd/pmc440/Makefile @@ -44,7 +44,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/voh405/Makefile b/board/esd/voh405/Makefile index 308f752d095dc9b8c877dd4daefd592dc0177b52..98acb4b7712b5648d4fa528ce0c0613c6515d592 100644 --- a/board/esd/voh405/Makefile +++ b/board/esd/voh405/Makefile @@ -43,7 +43,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/vom405/Makefile b/board/esd/vom405/Makefile index df487662fd2853404c5dabebcf93802c92324818..86bd4461debd6350f02ffeb2a5bd4bd8a3620128 100644 --- a/board/esd/vom405/Makefile +++ b/board/esd/vom405/Makefile @@ -46,7 +46,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/esd/wuh405/Makefile b/board/esd/wuh405/Makefile index 308f752d095dc9b8c877dd4daefd592dc0177b52..98acb4b7712b5648d4fa528ce0c0613c6515d592 100644 --- a/board/esd/wuh405/Makefile +++ b/board/esd/wuh405/Makefile @@ -43,7 +43,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/evb4510/Makefile b/board/evb4510/Makefile index 4f98d702d5350decdc13cf3588fd5d0af9187a13..3ab1aa038b05de8f839d57e0febd425ccf7e1ff1 100644 --- a/board/evb4510/Makefile +++ b/board/evb4510/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/exbitgen/Makefile b/board/exbitgen/Makefile index 5e297afedc68b7506605a50601f419fa22042ffa..4f752a86b45bd6c242667de64a82f463d6ab9c0a 100644 --- a/board/exbitgen/Makefile +++ b/board/exbitgen/Makefile @@ -40,7 +40,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/exbitgen/exbitgen.c b/board/exbitgen/exbitgen.c index 0b08a39f90ded230671def5ebd2f82f341e37bc4..dc07d3df0636a30e771334c103adf9074b361374 100644 --- a/board/exbitgen/exbitgen.c +++ b/board/exbitgen/exbitgen.c @@ -1,6 +1,6 @@ +#include #include #include -#include #include "exbitgen.h" void sdram_init(void); diff --git a/board/exbitgen/flash.c b/board/exbitgen/flash.c index ae88994b2cc241f414a30f6f4876b7ad5a9527a3..4dd53828767c68a229800db58fe08d8c501e7e1d 100644 --- a/board/exbitgen/flash.c +++ b/board/exbitgen/flash.c @@ -28,10 +28,10 @@ * Chris Hallinan - DS4.COM, Inc. - clh@net1plus.com */ +#include #include #include #include -#include flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ diff --git a/board/freescale/common/Makefile b/board/freescale/common/Makefile index 6340b418ea1b8fb9ebaa9ea7a1f88a5414372025..508e3b569b20a8484e3c1099ed4e307749b36cd0 100644 --- a/board/freescale/common/Makefile +++ b/board/freescale/common/Makefile @@ -53,7 +53,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/freescale/m5275evb/Makefile b/board/freescale/m5275evb/Makefile index 9a0fa80538736518531928c6a8c27d78b10a423c..ef0b19ed2cc661eec6a8f3e0405d1ceb12a36fa2 100644 --- a/board/freescale/m5275evb/Makefile +++ b/board/freescale/m5275evb/Makefile @@ -23,18 +23,22 @@ include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).a OBJS = $(BOARD).o mii.o +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + $(LIB): .depend $(OBJS) - $(AR) crv $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) ######################################################################### -.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) - $(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ +# defines $(obj).depend target +include $(SRCTREE)/rules.mk -sinclude .depend +sinclude $(obj).depend ######################################################################### diff --git a/board/freescale/mpc7448hpc2/Makefile b/board/freescale/mpc7448hpc2/Makefile index e3d757d5dd1d03b25b3a19d711c8975de996b75b..995afbcd5ceee86089533a32d6fb01e014fe64c5 100644 --- a/board/freescale/mpc7448hpc2/Makefile +++ b/board/freescale/mpc7448hpc2/Makefile @@ -40,7 +40,7 @@ clean: .PHONY: distclean distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/freescale/mpc8260ads/Makefile b/board/freescale/mpc8260ads/Makefile index de7d847a5fc6d51ce0b1739297973fabd4e8a9db..e1d4af0f904b0e3987574a1e3559142030013eee 100644 --- a/board/freescale/mpc8260ads/Makefile +++ b/board/freescale/mpc8260ads/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/freescale/mpc8260ads/mpc8260ads.c b/board/freescale/mpc8260ads/mpc8260ads.c index 6f683f031bd8dfd3ffed1cadfc1f137a24750ad2..8ab7d356c4f54e34e0d31c3f40f3536df593fd40 100644 --- a/board/freescale/mpc8260ads/mpc8260ads.c +++ b/board/freescale/mpc8260ads/mpc8260ads.c @@ -46,6 +46,10 @@ #ifdef CONFIG_PCI #include #endif +#ifdef CONFIG_OF_LIBFDT +#include +#include +#endif /* * I/O Port configuration table @@ -544,3 +548,26 @@ void pci_init_board(void) pci_mpc8250_init(&hose); } #endif + +#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) +void ft_blob_update(void *blob, bd_t *bd) +{ + int ret; + + ret = fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize); + + if (ret < 0) { + printf("ft_blob_update(): cannot set /memory/reg " + "property err:%s\n", fdt_strerror(ret)); + } +} + +void ft_board_setup(void *blob, bd_t *bd) +{ + ft_cpu_setup(blob, bd); +#ifdef CONFIG_PCI + ft_pci_setup(blob, bd); +#endif + ft_blob_update(blob, bd); +} +#endif diff --git a/board/freescale/mpc8266ads/Makefile b/board/freescale/mpc8266ads/Makefile index 291a1c95666dee0629d9d7ea2f73f33a01b9833d..4ffb83f783fd91b1804b502bee8ba079fb9502a9 100644 --- a/board/freescale/mpc8266ads/Makefile +++ b/board/freescale/mpc8266ads/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/freescale/mpc8313erdb/Makefile b/board/freescale/mpc8313erdb/Makefile index e97ba812c9759be04bbee7a4a59af84fa970c48a..7c34c5e1641a64fd69a670837c85a3f9cd430959 100644 --- a/board/freescale/mpc8313erdb/Makefile +++ b/board/freescale/mpc8313erdb/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/freescale/mpc8315erdb/Makefile b/board/freescale/mpc8315erdb/Makefile index e97ba812c9759be04bbee7a4a59af84fa970c48a..7c34c5e1641a64fd69a670837c85a3f9cd430959 100644 --- a/board/freescale/mpc8315erdb/Makefile +++ b/board/freescale/mpc8315erdb/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/freescale/mpc8323erdb/Makefile b/board/freescale/mpc8323erdb/Makefile index acc954488f54bdb8e0b99991dad67d2649b49a35..c95f90eaab82d6797b6c797d1f00ed7a50687b14 100644 --- a/board/freescale/mpc8323erdb/Makefile +++ b/board/freescale/mpc8323erdb/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/freescale/mpc832xemds/Makefile b/board/freescale/mpc832xemds/Makefile index 5ec7a871d4dbbc82e79adc409265d1f62b9877b9..a97116c39170246dd2327718637dd1234791c672 100644 --- a/board/freescale/mpc832xemds/Makefile +++ b/board/freescale/mpc832xemds/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/freescale/mpc8349emds/Makefile b/board/freescale/mpc8349emds/Makefile index 5ec7a871d4dbbc82e79adc409265d1f62b9877b9..a97116c39170246dd2327718637dd1234791c672 100644 --- a/board/freescale/mpc8349emds/Makefile +++ b/board/freescale/mpc8349emds/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/freescale/mpc8349emds/mpc8349emds.c b/board/freescale/mpc8349emds/mpc8349emds.c index 4d57fafc9ad33d9661b356148d587ccc32be0365..9a312c37b67af0283c6bacb42bdc01c833668162 100644 --- a/board/freescale/mpc8349emds/mpc8349emds.c +++ b/board/freescale/mpc8349emds/mpc8349emds.c @@ -253,7 +253,7 @@ void sdram_init(void) /* * The following are used to control the SPI chip selects for the SPI command. */ -#ifdef CONFIG_HARD_SPI +#ifdef CONFIG_MPC8XXX_SPI #define SPI_CS_MASK 0x80000000 diff --git a/board/freescale/mpc8349itx/Makefile b/board/freescale/mpc8349itx/Makefile index 265e3410371780cb4fa2a7ad4074f635ca4d9cb6..c81ba662fa114b75261e517ab6139d4f85c8665a 100644 --- a/board/freescale/mpc8349itx/Makefile +++ b/board/freescale/mpc8349itx/Makefile @@ -37,7 +37,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/freescale/mpc8360emds/Makefile b/board/freescale/mpc8360emds/Makefile index 5ec7a871d4dbbc82e79adc409265d1f62b9877b9..a97116c39170246dd2327718637dd1234791c672 100644 --- a/board/freescale/mpc8360emds/Makefile +++ b/board/freescale/mpc8360emds/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/freescale/mpc8360erdk/Makefile b/board/freescale/mpc8360erdk/Makefile index 53e0c482760b7b050a34c44b605e4e72b1315a28..d1735041f967dd820fff1bfa49e60fef6c752124 100644 --- a/board/freescale/mpc8360erdk/Makefile +++ b/board/freescale/mpc8360erdk/Makefile @@ -40,7 +40,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/freescale/mpc8360erdk/nand.c b/board/freescale/mpc8360erdk/nand.c index e1e790b34fa660f20ea5263bbc2c614ab0410e78..8b44a0f38c3c4b7d5eedb5406cfe7c016db4b0e1 100644 --- a/board/freescale/mpc8360erdk/nand.c +++ b/board/freescale/mpc8360erdk/nand.c @@ -39,6 +39,24 @@ static const u32 upm_array[] = { 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc01, /* Words 60 to 63 */ }; +static void upm_setup(struct fsl_upm *upm) +{ + int i; + + /* write upm array */ + out_be32(upm->mxmr, MxMR_OP_WARR); + + for (i = 0; i < 64; i++) { + out_be32(upm->mdr, upm_array[i]); + out_8(upm->io_addr, 0x0); + } + + /* normal operation */ + out_be32(upm->mxmr, MxMR_OP_NORM); + while (in_be32(upm->mxmr) != MxMR_OP_NORM) + eieio(); +} + static int dev_ready(void) { if (in_be32(&im->qepio.ioport[4].pdat) & 0x00002000) { @@ -52,10 +70,9 @@ static int dev_ready(void) static struct fsl_upm_nand fun = { .upm = { - .array = upm_array, .io_addr = (void *)CFG_NAND_BASE, }, - .width = 1, + .width = 8, .upm_cmd_offset = 8, .upm_addr_offset = 16, .dev_ready = dev_ready, @@ -68,5 +85,8 @@ int board_nand_init(struct nand_chip *nand) fun.upm.mxmr = &im->lbus.mamr; fun.upm.mdr = &im->lbus.mdr; fun.upm.mar = &im->lbus.mar; + + upm_setup(&fun.upm); + return fsl_upm_nand_init(nand, &fun); } diff --git a/board/freescale/mpc837xemds/Makefile b/board/freescale/mpc837xemds/Makefile index 5ec7a871d4dbbc82e79adc409265d1f62b9877b9..a97116c39170246dd2327718637dd1234791c672 100644 --- a/board/freescale/mpc837xemds/Makefile +++ b/board/freescale/mpc837xemds/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/freescale/mpc837xerdb/Makefile b/board/freescale/mpc837xerdb/Makefile index 5ec7a871d4dbbc82e79adc409265d1f62b9877b9..a97116c39170246dd2327718637dd1234791c672 100644 --- a/board/freescale/mpc837xerdb/Makefile +++ b/board/freescale/mpc837xerdb/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/freescale/mpc8540ads/Makefile b/board/freescale/mpc8540ads/Makefile index be243885be641cdc9af3bb01aa39535c368fcef3..2d71cbc516a6fe78cd98fdeb0da9c84a59d1d37a 100644 --- a/board/freescale/mpc8540ads/Makefile +++ b/board/freescale/mpc8540ads/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(OBJS) $(SOBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/freescale/mpc8541cds/Makefile b/board/freescale/mpc8541cds/Makefile index 3ae2e97577d21ed2e0aaf2311690e99baf1f1e3b..98f153056d5c3821df09df368579b475cb505611 100644 --- a/board/freescale/mpc8541cds/Makefile +++ b/board/freescale/mpc8541cds/Makefile @@ -41,7 +41,7 @@ clean: rm -f $(OBJS) $(SOBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/freescale/mpc8544ds/Makefile b/board/freescale/mpc8544ds/Makefile index 53368b22b89fc4b0eec26b6814fddaba6a7dc1df..3a5ea00e80e528e10be1f9ce69c9420c397765e7 100644 --- a/board/freescale/mpc8544ds/Makefile +++ b/board/freescale/mpc8544ds/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(OBJS) $(SOBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/freescale/mpc8548cds/Makefile b/board/freescale/mpc8548cds/Makefile index 3ae2e97577d21ed2e0aaf2311690e99baf1f1e3b..98f153056d5c3821df09df368579b475cb505611 100644 --- a/board/freescale/mpc8548cds/Makefile +++ b/board/freescale/mpc8548cds/Makefile @@ -41,7 +41,7 @@ clean: rm -f $(OBJS) $(SOBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/freescale/mpc8555cds/Makefile b/board/freescale/mpc8555cds/Makefile index 3ae2e97577d21ed2e0aaf2311690e99baf1f1e3b..98f153056d5c3821df09df368579b475cb505611 100644 --- a/board/freescale/mpc8555cds/Makefile +++ b/board/freescale/mpc8555cds/Makefile @@ -41,7 +41,7 @@ clean: rm -f $(OBJS) $(SOBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/freescale/mpc8560ads/Makefile b/board/freescale/mpc8560ads/Makefile index be243885be641cdc9af3bb01aa39535c368fcef3..2d71cbc516a6fe78cd98fdeb0da9c84a59d1d37a 100644 --- a/board/freescale/mpc8560ads/Makefile +++ b/board/freescale/mpc8560ads/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(OBJS) $(SOBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/freescale/mpc8568mds/Makefile b/board/freescale/mpc8568mds/Makefile index 8294d3bf43cc1f82d2ba2bfefbf611cca67a67b0..ecdc4d3c22b15a07dba94599da69423e89f26bea 100644 --- a/board/freescale/mpc8568mds/Makefile +++ b/board/freescale/mpc8568mds/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(OBJS) $(SOBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/freescale/mpc8610hpcd/Makefile b/board/freescale/mpc8610hpcd/Makefile index e17a9cb8e6db3083c7ea9a82e4501cf722b350e2..a457c32e861a87cf2111450401f4cdb09a439333 100644 --- a/board/freescale/mpc8610hpcd/Makefile +++ b/board/freescale/mpc8610hpcd/Makefile @@ -41,7 +41,7 @@ clean: .PHONY: distclean distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/freescale/mpc8641hpcn/Makefile b/board/freescale/mpc8641hpcn/Makefile index 115df0532baabd7dc9d3864f6a70f470393f7fcd..c096e1552eabcd7067e2e3e6b483e40f90de705b 100644 --- a/board/freescale/mpc8641hpcn/Makefile +++ b/board/freescale/mpc8641hpcn/Makefile @@ -39,7 +39,7 @@ clean: .PHONY: distclean distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/funkwerk/vovpn-gw/Makefile b/board/funkwerk/vovpn-gw/Makefile index a9a9299a83b987e1fd94a0ca5984702a415c9512..493422d390af18206e07db93ebe9c5c28909e247 100644 --- a/board/funkwerk/vovpn-gw/Makefile +++ b/board/funkwerk/vovpn-gw/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/g2000/Makefile b/board/g2000/Makefile index 3c5aa8680a355afaa542094a98cdc7c71cace1ae..1c60447e85483ac51c5d52c111cc9804538f0649 100644 --- a/board/g2000/Makefile +++ b/board/g2000/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/gaisler/gr_cpci_ax2000/Makefile b/board/gaisler/gr_cpci_ax2000/Makefile index d58f50d99f9a2d0a196ab48143a2872851157701..4a5d73b47c13b1e4311c52878581ff5428a3f5e9 100644 --- a/board/gaisler/gr_cpci_ax2000/Makefile +++ b/board/gaisler/gr_cpci_ax2000/Makefile @@ -40,7 +40,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/gaisler/gr_ep2s60/Makefile b/board/gaisler/gr_ep2s60/Makefile index d58f50d99f9a2d0a196ab48143a2872851157701..4a5d73b47c13b1e4311c52878581ff5428a3f5e9 100644 --- a/board/gaisler/gr_ep2s60/Makefile +++ b/board/gaisler/gr_ep2s60/Makefile @@ -40,7 +40,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/gaisler/gr_xc3s_1500/Makefile b/board/gaisler/gr_xc3s_1500/Makefile index d58f50d99f9a2d0a196ab48143a2872851157701..4a5d73b47c13b1e4311c52878581ff5428a3f5e9 100644 --- a/board/gaisler/gr_xc3s_1500/Makefile +++ b/board/gaisler/gr_xc3s_1500/Makefile @@ -40,7 +40,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/gaisler/grsim/Makefile b/board/gaisler/grsim/Makefile index 6295109563853a6d3fcc59ed406a45144fc05a48..56123dc07b3ca9c62b52302f366b0dd7faeb8e35 100644 --- a/board/gaisler/grsim/Makefile +++ b/board/gaisler/grsim/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/gaisler/grsim_leon2/Makefile b/board/gaisler/grsim_leon2/Makefile index 6295109563853a6d3fcc59ed406a45144fc05a48..56123dc07b3ca9c62b52302f366b0dd7faeb8e35 100644 --- a/board/gaisler/grsim_leon2/Makefile +++ b/board/gaisler/grsim_leon2/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/gcplus/Makefile b/board/gcplus/Makefile index 8a95d83703c726ad3aae1e7b701d850dc11c0024..7bc636bb9c1faf8d2bf6eef4bd4623cca8975a43 100644 --- a/board/gcplus/Makefile +++ b/board/gcplus/Makefile @@ -41,7 +41,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/gw8260/Makefile b/board/gw8260/Makefile index 17012dd71d7a4422fa8e54511688172f8b0cf87e..cb3c566d3195771fb5c2b067facf7931dac89a9e 100644 --- a/board/gw8260/Makefile +++ b/board/gw8260/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/hmi1001/Makefile b/board/hmi1001/Makefile index ddfd2ef8afe023bfe5c017ead825bff259cf59fb..442e2d0df25c1719bc48681008793e7f697ff541 100644 --- a/board/hmi1001/Makefile +++ b/board/hmi1001/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/icecube/Makefile b/board/icecube/Makefile index 7762ed301563ff78dd60ab4d8bfdb7d5ea66ea04..c94e24fc6a683dff273d5ec91f764bb2c8e6702c 100644 --- a/board/icecube/Makefile +++ b/board/icecube/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/ids8247/ids8247.c b/board/ids8247/ids8247.c index 8ec4cd717995b708a39cdb22efd51356690cddd6..44fc79cd58d7ff1ab0fdf1bf3011e297dd68040f 100644 --- a/board/ids8247/ids8247.c +++ b/board/ids8247/ids8247.c @@ -334,7 +334,7 @@ void ft_blob_update(void *blob, bd_t *bd) ret = fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize); if (ret < 0) { - printf("ft_blob_update): cannot set /memory/reg " + printf("ft_blob_update(): cannot set /memory/reg " "property err:%s\n", fdt_strerror(ret)); } } diff --git a/board/impa7/Makefile b/board/impa7/Makefile index b64d85f751c74b3348b03858d19ae66461c9e7ff..4cb13b74ab795bbb24ee9dcf15c9a6fcca4e9348 100644 --- a/board/impa7/Makefile +++ b/board/impa7/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/imx31_litekit/Makefile b/board/imx31_litekit/Makefile index ea8c8897a9e60687fadfd2f654e59b1cda0bda07..218d9684a12febf06e69529a31a41e41e76b8c7d 100644 --- a/board/imx31_litekit/Makefile +++ b/board/imx31_litekit/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/imx31_litekit/lowlevel_init.S b/board/imx31_litekit/lowlevel_init.S index 9d96db8b488b669683d1ddc846ddddbdefe2b411..0003a4242464afec9e892b41b86cf270238f2718 100644 --- a/board/imx31_litekit/lowlevel_init.S +++ b/board/imx31_litekit/lowlevel_init.S @@ -62,9 +62,9 @@ lowlevel_init: REG 0x43FAC26C, 0 /* SDCLK */ REG 0x43FAC270, 0 /* CAS */ REG 0x43FAC274, 0 /* RAS */ - REG 0x43FAC27C, 0x1000 /* CS2 CSD0) */ + REG 0x43FAC27C, 0x1000 /* CS2 (CSD0) */ REG 0x43FAC284, 0 /* DQM3 */ - REG 0x43FAC288, 0 /* DQM2, DQM1, DQM0, SD31-SD0, A25-A0, MA10 0x288..0x2DC) */ + REG 0x43FAC288, 0 /* DQM2, DQM1, DQM0, SD31-SD0, A25-A0, MA10 (0x288..0x2DC) */ REG 0x43FAC28C, 0 REG 0x43FAC290, 0 REG 0x43FAC294, 0 diff --git a/board/imx31_phycore/Makefile b/board/imx31_phycore/Makefile index cb0e8e83f3db05fee64f4db81da9a1f65e039dc1..5ed2b4bd9fee298f468f8ca304261c364801c09e 100644 --- a/board/imx31_phycore/Makefile +++ b/board/imx31_phycore/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/imx31_phycore/lowlevel_init.S b/board/imx31_phycore/lowlevel_init.S index 70f30c0cd942f5fe20e9f87e6872cd5235b1a3fa..c5d6eb05fe20bfae98206385c238549070a56bb3 100644 --- a/board/imx31_phycore/lowlevel_init.S +++ b/board/imx31_phycore/lowlevel_init.S @@ -63,9 +63,9 @@ lowlevel_init: REG 0x43FAC26C, 0 /* SDCLK */ REG 0x43FAC270, 0 /* CAS */ REG 0x43FAC274, 0 /* RAS */ - REG 0x43FAC27C, 0x1000 /* CS2 CSD0) */ + REG 0x43FAC27C, 0x1000 /* CS2 (CSD0) */ REG 0x43FAC284, 0 /* DQM3 */ - REG 0x43FAC288, 0 /* DQM2, DQM1, DQM0, SD31-SD0, A25-A0, MA10 0x288..0x2DC) */ + REG 0x43FAC288, 0 /* DQM2, DQM1, DQM0, SD31-SD0, A25-A0, MA10 (0x288..0x2DC) */ REG 0x43FAC28C, 0 REG 0x43FAC290, 0 REG 0x43FAC294, 0 diff --git a/board/inka4x0/Makefile b/board/inka4x0/Makefile index ddfd2ef8afe023bfe5c017ead825bff259cf59fb..442e2d0df25c1719bc48681008793e7f697ff541 100644 --- a/board/inka4x0/Makefile +++ b/board/inka4x0/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/innokom/Makefile b/board/innokom/Makefile index 71c6bba364e64cc281c451bccf017422b2fcb4f4..afae217242cd32b590ff385807dd7c1961cbc4e6 100644 --- a/board/innokom/Makefile +++ b/board/innokom/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/integratorap/Makefile b/board/integratorap/Makefile index 505121e07111fb74aaec5259387b85b90fd4bdd4..f78de3a1001be8561e9e23dab640b6eb7ee38710 100644 --- a/board/integratorap/Makefile +++ b/board/integratorap/Makefile @@ -43,7 +43,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/integratorcp/Makefile b/board/integratorcp/Makefile index e15ef73e2f691642d0cf80f940357fe14a5cce1e..9201accb266c54fe3940b59485d3e5f135b87d50 100644 --- a/board/integratorcp/Makefile +++ b/board/integratorcp/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/iphase4539/Makefile b/board/iphase4539/Makefile index 3a28f5caf0defa155258873107374123b960cee1..877afde1ced3768c9787a1fa1f8bf1e25f3e4564 100644 --- a/board/iphase4539/Makefile +++ b/board/iphase4539/Makefile @@ -40,7 +40,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/ispan/Makefile b/board/ispan/Makefile index b2ffd288331284b86a8a904e37d4e04d46b59171..6b3706daaeea622debda670da175b2865375e0be 100644 --- a/board/ispan/Makefile +++ b/board/ispan/Makefile @@ -41,7 +41,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/ixdp425/Makefile b/board/ixdp425/Makefile index 5d4feb0f708c5d9e5bd407f60e8bb32556a09694..efeb31dba76f0935ca748ac390fc677d68b49b5d 100644 --- a/board/ixdp425/Makefile +++ b/board/ixdp425/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/jse/Makefile b/board/jse/Makefile index e858c83f73243658b3139effd00a158f2ac16d7a..6be03ac541db12619d1761f267d6f0b26ff69ac5 100644 --- a/board/jse/Makefile +++ b/board/jse/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/jupiter/Makefile b/board/jupiter/Makefile index aed3af000f16bb3ef017ac598b7b89c73b0ecd39..aa80a71982054dadc686ec11f5a263a350b34787 100644 --- a/board/jupiter/Makefile +++ b/board/jupiter/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/kb9202/Makefile b/board/kb9202/Makefile index 0207d1222a963eb4b862ce72809f851f755fe1ac..363f6657eed03914ae3d12c7f27461b4a0530ac8 100644 --- a/board/kb9202/Makefile +++ b/board/kb9202/Makefile @@ -41,7 +41,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/korat/Makefile b/board/korat/Makefile index fa19e6feaad64e8f0728e132d836cf75ce536ccb..df74774bf7e2bf9a3a1d660f3eda4e1a7ca2d153 100644 --- a/board/korat/Makefile +++ b/board/korat/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/korat/korat.c b/board/korat/korat.c index a7b4b27c6d3bab70f7ebe3343c8e164708f193b6..51874ea8db2668248a136b075db3861e2810718e 100644 --- a/board/korat/korat.c +++ b/board/korat/korat.c @@ -26,12 +26,15 @@ */ #include +#include #include +#include #include +#include #include -#include #include -#include +#include +#include DECLARE_GLOBAL_DATA_PTR; @@ -566,43 +569,15 @@ int checkboard(void) return 0; } -#if defined(CFG_DRAM_TEST) -int testdram(void) +#if defined(CONFIG_PCI) && defined(CONFIG_PCI_PNP) +/* + * Assign interrupts to PCI devices. + */ +void korat_pci_fixup_irq(struct pci_controller *hose, pci_dev_t dev) { - unsigned long *mem = (unsigned long *)0; - const unsigned long kend = (1024 / sizeof(unsigned long)); - unsigned long k, n; - - mtmsr(0); - - /* TODO: find correct size of SDRAM */ - for (k = 0; k < CFG_MBYTES_SDRAM; - ++k, mem += (1024 / sizeof(unsigned long))) { - if ((k & 1023) == 0) - printf("%3d MB\r", k / 1024); - - memset(mem, 0xaaaaaaaa, 1024); - for (n = 0; n < kend; ++n) { - if (mem[n] != 0xaaaaaaaa) { - printf("SDRAM test fails at: %08x\n", - (uint) & mem[n]); - return 1; - } - } - - memset(mem, 0x55555555, 1024); - for (n = 0; n < kend; ++n) { - if (mem[n] != 0x55555555) { - printf("SDRAM test fails at: %08x\n", - (uint) & mem[n]); - return 1; - } - } - } - printf("SDRAM test passes\n"); - return 0; + pci_hose_write_config_byte(hose, dev, PCI_INTERRUPT_LINE, VECNUM_EIR2); } -#endif /* defined(CFG_DRAM_TEST) */ +#endif /* * pci_pre_init @@ -654,6 +629,10 @@ int pci_pre_init(struct pci_controller *hose) addr = (addr & ~plb1_acr_wrp_mask) | plb1_acr_wrp_2deep; mtdcr(plb1_acr, addr); +#if defined(CONFIG_PCI_PNP) + hose->fixup_irq = korat_pci_fixup_irq; +#endif + return 1; } #endif /* defined(CONFIG_PCI) */ @@ -779,3 +758,24 @@ int post_hotkeys_pressed(void) return 0; /* No hotkeys supported */ } #endif /* CONFIG_POST */ + +#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) +void ft_board_setup(void *blob, bd_t *bd) +{ + u32 val[4]; + int rc; + + ft_cpu_setup(blob, bd); + + /* Fixup NOR mapping */ + val[0] = 1; /* chip select number */ + val[1] = 0; /* always 0 */ + val[2] = gd->bd->bi_flashstart; + val[3] = gd->bd->bi_flashsize - CFG_FLASH0_SIZE; + rc = fdt_find_and_setprop(blob, "/plb/opb/ebc", "ranges", + val, sizeof(val), 1); + if (rc) + printf("Unable to update property NOR mapping, err=%s\n", + fdt_strerror(rc)); +} +#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */ diff --git a/board/lart/Makefile b/board/lart/Makefile index cbc07bd88a58ec14e59d7ed0ffc467abbd9380d0..9eeaa990bab26814157d7b05fcba9db2ea21ef92 100644 --- a/board/lart/Makefile +++ b/board/lart/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/linkstation/Makefile b/board/linkstation/Makefile index 8d92d8a6c7b29b23e93dd8781e92545f4ab33f7d..8f4da0c978bcb9c3dbf8882513ffe077d36ad726 100644 --- a/board/linkstation/Makefile +++ b/board/linkstation/Makefile @@ -31,7 +31,7 @@ SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(OBJS)) $(LIB): $(obj).depend $(OBJS) - $(AR) crv $@ $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) ######################################################################### diff --git a/board/logodl/Makefile b/board/logodl/Makefile index 0c88a6e59043a2e516401ec86f779c69a5dd2fb6..0795b6b2af894b4cf633343e5326deda1952c2df 100644 --- a/board/logodl/Makefile +++ b/board/logodl/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/lpc2292sodimm/Makefile b/board/lpc2292sodimm/Makefile index 18a95d7f9b8983ae8ebb08f977153f3f86be0279..4eeb03258b88f3c0cb4bede34046d8382f71a3dd 100644 --- a/board/lpc2292sodimm/Makefile +++ b/board/lpc2292sodimm/Makefile @@ -33,7 +33,7 @@ OBJS := $(addprefix $(obj),$(COBJS)) SOBJS := $(addprefix $(obj),$(SOBJTS)) $(LIB): $(obj).depend $(OBJS) $(SOBJS) - $(AR) crv $@ $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) clean: rm -f $(SOBJS) $(OBJS) diff --git a/board/lpd7a40x/Makefile b/board/lpd7a40x/Makefile index 0e302d961fc9e76af4356b15745236b9ca345478..446fd5bb82b3d6d67c2f5d387db7c5d0d5634cef 100644 --- a/board/lpd7a40x/Makefile +++ b/board/lpd7a40x/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/lubbock/Makefile b/board/lubbock/Makefile index 8e397b411c9e6496243a35b2725f799f4dce505f..65923070c41ae2c1c7883431d0d2ecb36efce3f5 100644 --- a/board/lubbock/Makefile +++ b/board/lubbock/Makefile @@ -40,7 +40,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/lwmon5/Makefile b/board/lwmon5/Makefile index 2a9357146c5999e3af7d04fc8f54a7e78aa2da38..5bb266f799d69f6dc5f341609f6df2c75a180a4c 100644 --- a/board/lwmon5/Makefile +++ b/board/lwmon5/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/lwmon5/sdram.c b/board/lwmon5/sdram.c index 0a13831156ca81d4532d1b4ad044f057e6de3dde..189e824073dc6b679820275f8406ca1ff99fced6 100644 --- a/board/lwmon5/sdram.c +++ b/board/lwmon5/sdram.c @@ -84,7 +84,7 @@ void board_add_ram_info(int use_default) puts(" (ECC not"); get_sys_info(&board_cfg); - printf(" enabled, %d MHz", (board_cfg.freqPLB * 2) / 1000000); + printf(" enabled, %ld MHz", (board_cfg.freqPLB * 2) / 1000000); mfsdram(DDR0_03, val); val = DDR0_03_CASLAT_DECODE(val); diff --git a/board/m501sk/Makefile b/board/m501sk/Makefile index b403095f16d88e2b5831a274921b9c901ff19a53..c562c600a412f8286a3b6d8722adba180d0b8153 100644 --- a/board/m501sk/Makefile +++ b/board/m501sk/Makefile @@ -34,13 +34,13 @@ OBJS := $(addprefix $(obj),$(COBJS)) SOBJS := $(addprefix $(obj),$(SOBJS)) $(LIB): $(OBJS) $(SOBJS) - $(AR) crv $@ $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/mcc200/Makefile b/board/mcc200/Makefile index 5869119697ed48b32d0bee3491ee78b6965b1957..e6e81ce3c10b999ea96eef277313214c90d86cce 100644 --- a/board/mcc200/Makefile +++ b/board/mcc200/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/mgcoge/Makefile b/board/mgcoge/Makefile index 1a1424406f1435d93d62c67844c8827d4ec79ff5..d4087ccbb67959f37bdb25a9e34e0ed4583a6c85 100644 --- a/board/mgcoge/Makefile +++ b/board/mgcoge/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/mgcoge/mgcoge.c b/board/mgcoge/mgcoge.c index 89ced1eca7b0c09a8befc4e3cd2527f19c9052cf..51b6dc60168338ecb33f19c370bc0e13e3c49be0 100644 --- a/board/mgcoge/mgcoge.c +++ b/board/mgcoge/mgcoge.c @@ -307,7 +307,7 @@ void ft_blob_update(void *blob, bd_t *bd) ret = fdt_setprop(blob, nodeoffset, "reg", memory_data, sizeof(memory_data)); if (ret < 0) - printf("ft_blob_update): cannot set /memory/reg " + printf("ft_blob_update(): cannot set /memory/reg " "property err:%s\n", fdt_strerror(ret)); } else { @@ -327,7 +327,7 @@ void ft_blob_update(void *blob, bd_t *bd) ret = fdt_setprop(blob, nodeoffset, "ranges", flash_data, sizeof(flash_data)); if (ret < 0) - printf("ft_blob_update): cannot set /localbus/ranges " + printf("ft_blob_update(): cannot set /localbus/ranges " "property err:%s\n", fdt_strerror(ret)); } else { @@ -341,7 +341,7 @@ void ft_blob_update(void *blob, bd_t *bd) ret = fdt_setprop(blob, nodeoffset, "mac-address", bd->bi_enetaddr, sizeof(uchar) * 6); if (ret < 0) - printf("ft_blob_update): cannot set /soc/cpm/ethernet/mac-address " + printf("ft_blob_update(): cannot set /soc/cpm/ethernet/mac-address " "property err:%s\n", fdt_strerror(ret)); } else { diff --git a/board/mgsuvd/mgsuvd.c b/board/mgsuvd/mgsuvd.c index d81cafbb43803cf8f4481f2877b5db7b942eab18..c51ea7e76eb997db7cad580f10c78c9bd72aeca5 100644 --- a/board/mgsuvd/mgsuvd.c +++ b/board/mgsuvd/mgsuvd.c @@ -164,7 +164,7 @@ void ft_blob_update(void *blob, bd_t *bd) ret = fdt_setprop(blob, nodeoffset, "reg", memory_data, sizeof(memory_data)); if (ret < 0) - printf("ft_blob_update): cannot set /memory/reg " + printf("ft_blob_update(): cannot set /memory/reg " "property err:%s\n", fdt_strerror(ret)); } else { @@ -180,7 +180,7 @@ void ft_blob_update(void *blob, bd_t *bd) ret = fdt_setprop(blob, nodeoffset, "ranges", flash_data, sizeof(flash_data)); if (ret < 0) - printf("ft_blob_update): cannot set /localbus/ranges " + printf("ft_blob_update(): cannot set /localbus/ranges " "property err:%s\n", fdt_strerror(ret)); } else { @@ -195,7 +195,7 @@ void ft_blob_update(void *blob, bd_t *bd) ret = fdt_setprop(blob, nodeoffset, "brg-frequency", brg_data, sizeof(brg_data)); if (ret < 0) - printf("ft_blob_update): cannot set /soc/cpm/brg-frequency " + printf("ft_blob_update(): cannot set /soc/cpm/brg-frequency " "property err:%s\n", fdt_strerror(ret)); } else { @@ -209,7 +209,7 @@ void ft_blob_update(void *blob, bd_t *bd) ret = fdt_setprop(blob, nodeoffset, "mac-address", bd->bi_enetaddr, sizeof(uchar) * 6); if (ret < 0) - printf("ft_blob_update): cannot set /soc/cpm/scc/mac-address " + printf("ft_blob_update(): cannot set /soc/cpm/scc/mac-address " "property err:%s\n", fdt_strerror(ret)); } else { diff --git a/board/ml2/Makefile b/board/ml2/Makefile index 731e8fea11e5627e233e5df110c9794a314f96a8..2a9366656f5da1b27275536b5c9f47c4bb32fd75 100644 --- a/board/ml2/Makefile +++ b/board/ml2/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/ml2/serial.c b/board/ml2/serial.c index 659314572a1a8ac36fc23bec86e22a6a031cc47f..c18815bf88a38bbbe5e95334ed0921afced90e35 100644 --- a/board/ml2/serial.c +++ b/board/ml2/serial.c @@ -19,9 +19,9 @@ * */ +#include #include #include -#include #include #include diff --git a/board/modnet50/Makefile b/board/modnet50/Makefile index 45141fd9e51a92b105494b564237f61e24d29709..bee5a8668be40cafe39acc521df5bd9d21d21fb6 100644 --- a/board/modnet50/Makefile +++ b/board/modnet50/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/motionpro/Makefile b/board/motionpro/Makefile index 698ead195cb1a41dd90801243b9a8876e2ae0a70..22ce8e64f292a3e687aaadb4e56cdd0d36e455f9 100644 --- a/board/motionpro/Makefile +++ b/board/motionpro/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/mp2usb/Makefile b/board/mp2usb/Makefile index 423d77da3bb78f4e8f586f29356b324152b2ffb9..67efd725db9850686c0c4c2692ef0f31ccf1c855 100644 --- a/board/mp2usb/Makefile +++ b/board/mp2usb/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/mpc8540eval/Makefile b/board/mpc8540eval/Makefile index 28d6cb9976e01b39caea1008c3d46629242f5b7e..325d6d572211c4cc287155962031241452e27211 100644 --- a/board/mpc8540eval/Makefile +++ b/board/mpc8540eval/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(OBJS) $(SOBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/mpl/mip405/Makefile b/board/mpl/mip405/Makefile index f8f4329f7325992b3b47ae53cea4004396640723..53bf84658661ea5feaf5c01d0d89fc84e955acce 100644 --- a/board/mpl/mip405/Makefile +++ b/board/mpl/mip405/Makefile @@ -44,7 +44,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/mpl/pati/Makefile b/board/mpl/pati/Makefile index 82c97d6d5d35d7ec0a011a6872beda29a79fad83..adeba69ee04bc7b0eb293d9137ee1fceb91fad3a 100644 --- a/board/mpl/pati/Makefile +++ b/board/mpl/pati/Makefile @@ -42,7 +42,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/mpl/pip405/Makefile b/board/mpl/pip405/Makefile index 72143f0911e1f147a453004c2c592841719b4d8c..590c7da5bb390f43eaaa424d5a9bc727f74fb405 100644 --- a/board/mpl/pip405/Makefile +++ b/board/mpl/pip405/Makefile @@ -47,7 +47,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/mpl/vcma9/Makefile b/board/mpl/vcma9/Makefile index 209322e51c15d257c5964bccca529a6a3d7c1b92..10bcb3b0a744fa7255cc4ba359eba1cc79fa58ce 100644 --- a/board/mpl/vcma9/Makefile +++ b/board/mpl/vcma9/Makefile @@ -44,7 +44,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/mpr2/Makefile b/board/mpr2/Makefile index 17ca17ec5b27e014c4e48ed31ecf92a5b3de013f..9f8fb807aba43a8ce39806c4af7f2170a2757b91 100644 --- a/board/mpr2/Makefile +++ b/board/mpr2/Makefile @@ -30,25 +30,29 @@ include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).a -OBJS := mpr2.o +COBJS := mpr2.o SOBJS := lowlevel_init.o +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + $(LIB): $(OBJS) $(SOBJS) - $(AR) crv $@ $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### -.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) - $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ +# defines $(obj).depend target +include $(SRCTREE)/rules.mk --include .depend +sinclude $(obj).depend ######################################################################### diff --git a/board/ms7720se/Makefile b/board/ms7720se/Makefile index d1af93700ea367fbf1fd405fea9a1cf8545ab811..18745ecff3c8845ee5e889d208eec2e1aea690aa 100644 --- a/board/ms7720se/Makefile +++ b/board/ms7720se/Makefile @@ -27,25 +27,29 @@ include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).a -OBJS := ms7720se.o +COBJS := ms7720se.o SOBJS := lowlevel_init.o +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + $(LIB): $(OBJS) $(SOBJS) - $(AR) crv $@ $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### -.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) - $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ +# defines $(obj).depend target +include $(SRCTREE)/rules.mk --include .depend +sinclude $(obj).depend ######################################################################### diff --git a/board/ms7720se/ms7720se.c b/board/ms7720se/ms7720se.c index ad76c0b2c74dc315e4654c0e1a8ca6b717f75f2e..af62cdfd282851fb93c509aca3ae7b35131f5c31 100644 --- a/board/ms7720se/ms7720se.c +++ b/board/ms7720se/ms7720se.c @@ -40,7 +40,6 @@ int checkboard(void) int board_init(void) { - return 0; } diff --git a/board/ms7722se/Makefile b/board/ms7722se/Makefile index 6dec0136c2efcb51aace5c23a941b00ac2e9a6e3..b203b6d4c7c4cf4744fc64e018b43d59449e6d99 100644 --- a/board/ms7722se/Makefile +++ b/board/ms7722se/Makefile @@ -24,25 +24,29 @@ include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).a -OBJS := ms7722se.o +COBJS := ms7722se.o SOBJS := lowlevel_init.o +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + $(LIB): $(OBJS) $(SOBJS) - $(AR) crv $@ $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### -.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) - $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ +# defines $(obj).depend target +include $(SRCTREE)/rules.mk --include .depend +sinclude $(obj).depend ######################################################################### diff --git a/board/ms7722se/ms7722se.c b/board/ms7722se/ms7722se.c index 0d3d55cf5cabf66e2facd32c24c5b659c7c532a0..cf02242299fbf227955acb2df764873a810c57a1 100644 --- a/board/ms7722se/ms7722se.c +++ b/board/ms7722se/ms7722se.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 + * Copyright (C) 2007,2008 * Nobuhiro Iwamatsu * * Copyright (C) 2007 @@ -43,7 +43,7 @@ int board_init(void) return 0; } -int dram_init (void) +int dram_init(void) { DECLARE_GLOBAL_DATA_PTR; @@ -53,7 +53,7 @@ int dram_init (void) return 0; } -void led_set_state (unsigned short value) +void led_set_state(unsigned short value) { - *((volatile unsigned short *) LED_BASE) = (value & 0xFF); + writew(value & 0xFF, LED_BASE); } diff --git a/board/ms7750se/Makefile b/board/ms7750se/Makefile index f81d56cb44b8067916dbfb9e127a1d164379d12e..01ddf69201e4ec510a5a5df75d9c8eecb8d68111 100644 --- a/board/ms7750se/Makefile +++ b/board/ms7750se/Makefile @@ -19,25 +19,29 @@ # include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).a -OBJS := ms7750se.o +COBJS := ms7750se.o SOBJS := lowlevel_init.o +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + $(LIB): $(OBJS) $(SOBJS) - $(AR) crv $@ $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend -################################################################# +######################################################################### -.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) - $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ +# defines $(obj).depend target +include $(SRCTREE)/rules.mk --include .depend +sinclude $(obj).depend -################################################################# +######################################################################### diff --git a/board/munices/Makefile b/board/munices/Makefile index 09c63c3ee4ed82342b6c53c5114e0b5fea81f069..5862bed5cc2a4ccfac05287073e03ebd8da1b4af 100644 --- a/board/munices/Makefile +++ b/board/munices/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/mvblm7/Makefile b/board/mvblm7/Makefile index 84cd14a87e3612c284419e1a03a025f6b7e833b3..cfbecfbe8f9ddedc1796adc8207cf40f32aecb8f 100644 --- a/board/mvblm7/Makefile +++ b/board/mvblm7/Makefile @@ -37,7 +37,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/mvblm7/mvblm7.c b/board/mvblm7/mvblm7.c index 41cb39dc9c99171a359aac6a557a9f20ac4fd6fe..b07f91393c2acf589c35069ee1de41c91b842e86 100644 --- a/board/mvblm7/mvblm7.c +++ b/board/mvblm7/mvblm7.c @@ -45,8 +45,8 @@ int fixed_sdram(void) msize = CFG_DDR_SIZE; for (ddr_size = msize << 20, ddr_size_log2 = 0; - (ddr_size > 1); - ddr_size = ddr_size >> 1, ddr_size_log2++) { + (ddr_size > 1); + ddr_size = ddr_size >> 1, ddr_size_log2++) { if (ddr_size & 1) return -1; } @@ -90,7 +90,7 @@ phys_size_t initdram(int board_type) int checkboard(void) { - puts("Board: Matrix Vision mvBlueLYNX-M7 " MV_VERSION "\n"); + puts("Board: Matrix Vision mvBlueLYNX-M7\n"); return 0; } @@ -127,21 +127,21 @@ u8 *dhcp_vendorex_proc(u8 *popt) #ifdef CONFIG_HARD_SPI int spi_cs_is_valid(unsigned int bus, unsigned int cs) { - return bus == 0 && cs == 0; + return bus == 0 && cs == 0; } void spi_cs_activate(struct spi_slave *slave) { - volatile gpio83xx_t *iopd = &((immap_t *)CFG_IMMR)->gpio[0]; + volatile gpio83xx_t *iopd = &((immap_t *)CFG_IMMR)->gpio[0]; - iopd->dat &= ~MVBLM7_MMC_CS; + iopd->dat &= ~MVBLM7_MMC_CS; } void spi_cs_deactivate(struct spi_slave *slave) { - volatile gpio83xx_t *iopd = &((immap_t *)CFG_IMMR)->gpio[0]; + volatile gpio83xx_t *iopd = &((immap_t *)CFG_IMMR)->gpio[0]; - iopd->dat |= ~MVBLM7_MMC_CS; + iopd->dat |= ~MVBLM7_MMC_CS; } #endif diff --git a/board/mx1ads/Makefile b/board/mx1ads/Makefile index 14a8b81c96dfbe1c1c4d8e7c67819c498889c71d..b68b1bdd25dec95826e4380f81f857a7ded06069 100644 --- a/board/mx1ads/Makefile +++ b/board/mx1ads/Makefile @@ -43,7 +43,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/mx1fs2/Makefile b/board/mx1fs2/Makefile index 516a8b90f3fdcd338d2e04e4454958b7a80023a2..f81f7acd578f5308b3dea1db6f58f7aa781713a4 100644 --- a/board/mx1fs2/Makefile +++ b/board/mx1fs2/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/mx31ads/Makefile b/board/mx31ads/Makefile index dfadd9685c25e0658fa4454893ec16f43b597c17..a12f39174beaf379264431db5380e75cd97d0076 100644 --- a/board/mx31ads/Makefile +++ b/board/mx31ads/Makefile @@ -35,7 +35,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/netstal/hcu4/Makefile b/board/netstal/hcu4/Makefile index 53df61edbb80cb6a50a4261f49e8f8d670c75b1d..6722d53927e45f896ed3705fa4874ab435aedecb 100644 --- a/board/netstal/hcu4/Makefile +++ b/board/netstal/hcu4/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/netstal/hcu5/Makefile b/board/netstal/hcu5/Makefile index 5ffae65ea18342c5df7a719f1fb59b52df405646..445677104c8f2d26c294186e06847f60db1ffa54 100644 --- a/board/netstal/hcu5/Makefile +++ b/board/netstal/hcu5/Makefile @@ -40,7 +40,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/netstal/mcu25/Makefile b/board/netstal/mcu25/Makefile index 53df61edbb80cb6a50a4261f49e8f8d670c75b1d..6722d53927e45f896ed3705fa4874ab435aedecb 100644 --- a/board/netstal/mcu25/Makefile +++ b/board/netstal/mcu25/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/netstar/Makefile b/board/netstar/Makefile index 88da2b948385fe1b454b962abb2114cc79350092..8d911b845bd48f1b54c2e24333ac3a263635337b 100644 --- a/board/netstar/Makefile +++ b/board/netstar/Makefile @@ -84,7 +84,7 @@ clean: $(obj)crcek.bin distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/ns9750dev/Makefile b/board/ns9750dev/Makefile index b5203775a84d2e3d198b4723b1f08aa3cb7b8081..2ffed99f7a93a1e7da7f37d19d2c0842cd3bf77f 100644 --- a/board/ns9750dev/Makefile +++ b/board/ns9750dev/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/o2dnt/Makefile b/board/o2dnt/Makefile index f356bd39c788ed342a80a66fe19edd8ad696d345..58afd7b6597326d80a3e899be5814b9271731c95 100644 --- a/board/o2dnt/Makefile +++ b/board/o2dnt/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/omap1510inn/Makefile b/board/omap1510inn/Makefile index fe4b8d6524e60d20b7bcf65258c77f8fa8a35eed..cd222dbc16454940c910c53a18d2f67d1f8ca6a0 100644 --- a/board/omap1510inn/Makefile +++ b/board/omap1510inn/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/omap1610inn/Makefile b/board/omap1610inn/Makefile index c375bc135364c6a0b3a884bb7fe455d0abf41be0..1adcad64e08733dfbb49d9bb3e78a9f0d7b8aff0 100644 --- a/board/omap1610inn/Makefile +++ b/board/omap1610inn/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/omap2420h4/Makefile b/board/omap2420h4/Makefile index 2f2645a76baa8338363f055224457423b5cdeee8..f39eef0adb1642ab9df715de6e4f971c5a2f988b 100644 --- a/board/omap2420h4/Makefile +++ b/board/omap2420h4/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/omap5912osk/Makefile b/board/omap5912osk/Makefile index 8e14c699d30d99f4566cf5d03e3491bdde9f6f3c..e9bb0ecd724630b7b63ac3fa0f9c3eae2f40ab5d 100644 --- a/board/omap5912osk/Makefile +++ b/board/omap5912osk/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/omap730p2/Makefile b/board/omap730p2/Makefile index 104ff4e912459c58c0f25f8b275f271fea1ccd8d..0d7ae6145cc2e048d5117e91272eafb24e0885a6 100644 --- a/board/omap730p2/Makefile +++ b/board/omap730p2/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/pcs440ep/Makefile b/board/pcs440ep/Makefile index 2a3cfbe1b333b5ad07eedc337ec23a9c5dcc2103..40446884c8a32d8c86d8223fef94a82a1fb2468f 100644 --- a/board/pcs440ep/Makefile +++ b/board/pcs440ep/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/pleb2/Makefile b/board/pleb2/Makefile index fef0eb3094e176e453be474f7739230c72ed5d1d..faa26911b82374d459e40bf9f0973b30e6602581 100644 --- a/board/pleb2/Makefile +++ b/board/pleb2/Makefile @@ -40,7 +40,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/pm520/Makefile b/board/pm520/Makefile index 7762ed301563ff78dd60ab4d8bfdb7d5ea66ea04..c94e24fc6a683dff273d5ec91f764bb2c8e6702c 100644 --- a/board/pm520/Makefile +++ b/board/pm520/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/pm854/Makefile b/board/pm854/Makefile index be243885be641cdc9af3bb01aa39535c368fcef3..2d71cbc516a6fe78cd98fdeb0da9c84a59d1d37a 100644 --- a/board/pm854/Makefile +++ b/board/pm854/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(OBJS) $(SOBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/pm856/Makefile b/board/pm856/Makefile index be243885be641cdc9af3bb01aa39535c368fcef3..2d71cbc516a6fe78cd98fdeb0da9c84a59d1d37a 100644 --- a/board/pm856/Makefile +++ b/board/pm856/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(OBJS) $(SOBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/ppmc7xx/Makefile b/board/ppmc7xx/Makefile index 5fbefeb71c269900126c7091747091322ce11434..22332fb3dc4b21fddb0b3cfec5117397d04a5a09 100644 --- a/board/ppmc7xx/Makefile +++ b/board/ppmc7xx/Makefile @@ -40,7 +40,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/ppmc8260/Makefile b/board/ppmc8260/Makefile index 7fd545b9d5c89128f561068a8e24641381248a83..1d56d161836b073208076039e9ea438b05fde213 100644 --- a/board/ppmc8260/Makefile +++ b/board/ppmc8260/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/prodrive/alpr/Makefile b/board/prodrive/alpr/Makefile index 00dc180bbd30d218e65bfb85f646330b143644a7..ef3accbf1881f5ba9da3f203ebe945eeb57d7cda 100644 --- a/board/prodrive/alpr/Makefile +++ b/board/prodrive/alpr/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend *~ + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/prodrive/p3mx/Makefile b/board/prodrive/p3mx/Makefile index bf74a5a83b0da42df944ddeff4f04682dbbbf1f0..8456df36300adfee4a80014e91a77f7a34e837c5 100644 --- a/board/prodrive/p3mx/Makefile +++ b/board/prodrive/p3mx/Makefile @@ -43,7 +43,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend *~ + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/prodrive/p3p440/Makefile b/board/prodrive/p3p440/Makefile index 261e5d49cca695eb3542f293f8f6ac91fb1e6dde..b93f2c3890ef77b66ed5f5a3afa2365c1501963b 100644 --- a/board/prodrive/p3p440/Makefile +++ b/board/prodrive/p3p440/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/prodrive/pdnb3/Makefile b/board/prodrive/pdnb3/Makefile index 096db6f7af67265c16646edb24d1ef517608c53e..d07f25f98185eb72d5e2ca2c802f1728c16eced6 100644 --- a/board/prodrive/pdnb3/Makefile +++ b/board/prodrive/pdnb3/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/psyent/pci5441/Makefile b/board/psyent/pci5441/Makefile index 3639cbaf587bc9ab813da4353afd9950e361e681..301b4a0a5d2bff1b96106d294e6e5e2bce6edff4 100644 --- a/board/psyent/pci5441/Makefile +++ b/board/psyent/pci5441/Makefile @@ -43,7 +43,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/psyent/pk1c20/Makefile b/board/psyent/pk1c20/Makefile index 2568a68ede6d444de15483ca676863a727879aff..e23a17bc3182f0daddeb75d97facc9c0b5426e76 100644 --- a/board/psyent/pk1c20/Makefile +++ b/board/psyent/pk1c20/Makefile @@ -43,7 +43,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/pxa255_idp/Makefile b/board/pxa255_idp/Makefile index 32399f0e94040a35156d5ecb5acaf0c230bca5d3..4892b42bc156d8d44dd6504d39cdcbe9cb62b399 100644 --- a/board/pxa255_idp/Makefile +++ b/board/pxa255_idp/Makefile @@ -40,7 +40,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/quad100hd/Makefile b/board/quad100hd/Makefile index 252ad5a45fbd951aa133148ecdf836d66f243ab8..f9db112e7cf951a05a7b0f745b36b03739042c6a 100644 --- a/board/quad100hd/Makefile +++ b/board/quad100hd/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/r2dplus/Makefile b/board/r2dplus/Makefile index ed609ea67e38c4aae802960eeb43e21176930a9a..e96a8aa9866e035f966da84385f5cbefa98b0a1c 100644 --- a/board/r2dplus/Makefile +++ b/board/r2dplus/Makefile @@ -19,25 +19,29 @@ # include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).a -OBJS := r2dplus.o +COBJS := r2dplus.o SOBJS := lowlevel_init.o +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + $(LIB): $(OBJS) $(SOBJS) - $(AR) crv $@ $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend -################################################################# +######################################################################### -.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) - $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ +# defines $(obj).depend target +include $(SRCTREE)/rules.mk --include .depend +sinclude $(obj).depend -################################################################# +######################################################################### diff --git a/board/r2dplus/r2dplus.c b/board/r2dplus/r2dplus.c index 2ee3ea2f3fcb7d5085fdd3e1d4896bf973e2bd5b..8fb8ff667a328a026895507fa708fd6162c7616f 100644 --- a/board/r2dplus/r2dplus.c +++ b/board/r2dplus/r2dplus.c @@ -24,6 +24,7 @@ #include #include #include +#include #include int checkboard(void) @@ -37,7 +38,7 @@ int board_init(void) return 0; } -int dram_init (void) +int dram_init(void) { DECLARE_GLOBAL_DATA_PTR; @@ -52,25 +53,26 @@ int board_late_init(void) return 0; } -#define FPGA_BASE 0xA4000000 -#define FPGA_CFCTL (FPGA_BASE + 0x04) -#define FPGA_CFPOW (FPGA_BASE + 0x06) -#define FPGA_CFCDINTCLR (FPGA_BASE + 0x2A) +#define FPGA_BASE 0xA4000000 +#define FPGA_CFCTL (FPGA_BASE + 0x04) +#define CFCTL_EN (0x432) +#define FPGA_CFPOW (FPGA_BASE + 0x06) +#define CFPOW_ON (0x02) +#define FPGA_CFCDINTCLR (FPGA_BASE + 0x2A) +#define CFCDINTCLR_EN (0x01) -void ide_set_reset (int idereset) +void ide_set_reset(int idereset) { /* if reset = 1 IDE reset will be asserted */ - if (idereset){ - (*(vu_short *)FPGA_CFCTL) = 0x432; - (*(vu_short *)FPGA_CFPOW) |= 0x02; - (*(vu_short *)FPGA_CFCDINTCLR) = 0x01; + if (idereset) { + outw(CFCTL_EN, FPGA_CFCTL); /* CF enable */ + outw(inw(FPGA_CFPOW)|CFPOW_ON, FPGA_CFPOW); /* Power OM */ + outw(CFCDINTCLR_EN, FPGA_CFCDINTCLR); /* Int clear */ } } -#if defined(CONFIG_PCI) static struct pci_controller hose; void pci_init_board(void) { - pci_sh7751_init( &hose ); + pci_sh7751_init(&hose); } -#endif /* CONFIG_PCI */ diff --git a/board/r7780mp/Makefile b/board/r7780mp/Makefile index 554dca1d5fee4df3d7291f7b3e937e647f7668a2..c100e7e2ade847b941a133f0596de2a16cecc26c 100644 --- a/board/r7780mp/Makefile +++ b/board/r7780mp/Makefile @@ -20,25 +20,29 @@ include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).a -OBJS := r7780mp.o +COBJS := r7780mp.o SOBJS := lowlevel_init.o +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + $(LIB): $(OBJS) $(SOBJS) - $(AR) crv $@ $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### -.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) - $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ +# defines $(obj).depend target +include $(SRCTREE)/rules.mk --include .depend +sinclude $(obj).depend ######################################################################### diff --git a/board/r7780mp/r7780mp.c b/board/r7780mp/r7780mp.c index 1a37711d6fa9b17ff1e4d2617864c3a99ebab652..19c35d34949d5107a1ab7d3fc63cd8d3e30e4d1b 100644 --- a/board/r7780mp/r7780mp.c +++ b/board/r7780mp/r7780mp.c @@ -38,12 +38,12 @@ int checkboard(void) int board_init(void) { /* SCIF Enable */ - *(vu_short*)PHCR = 0x0000; + writew(0x0, PHCR); return 0; } -int dram_init (void) +int dram_init(void) { DECLARE_GLOBAL_DATA_PTR; @@ -53,29 +53,27 @@ int dram_init (void) return 0; } -void led_set_state (unsigned short value) +void led_set_state(unsigned short value) { } -void ide_set_reset (int idereset) +void ide_set_reset(int idereset) { /* if reset = 1 IDE reset will be asserted */ - if (idereset){ - (*(vu_short *)FPGA_CFCTL) = 0x432; + if (idereset) { + writew(0x432, FPGA_CFCTL); #if defined(CONFIG_R7780MP) - (*(vu_short *)FPGA_CFPOW) |= 0x01; + writew(inw(FPGA_CFPOW)|0x01, FPGA_CFPOW); #else - (*(vu_short *)FPGA_CFPOW) |= 0x02; + writew(inw(FPGA_CFPOW)|0x02, FPGA_CFPOW); #endif - (*(vu_short *)FPGA_CFCDINTCLR) = 0x01; + writew(0x01, FPGA_CFCDINTCLR); } } -#if defined(CONFIG_PCI) static struct pci_controller hose; void pci_init_board(void) { - pci_sh7780_init( &hose ); + pci_sh7780_init(&hose); } -#endif diff --git a/board/rattler/Makefile b/board/rattler/Makefile index be7e213a9b5d311794d855554c720ec083c2051b..dc40d9b94a6dd89e249b38cbfa6e5b830fc11afd 100644 --- a/board/rattler/Makefile +++ b/board/rattler/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/rpxsuper/Makefile b/board/rpxsuper/Makefile index 4b0dc25d57a52645f9d077feaaff1287e5bb2d9f..a749e26cce6ccf440941c586650e8ebb13c8791e 100644 --- a/board/rpxsuper/Makefile +++ b/board/rpxsuper/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/sacsng/Makefile b/board/sacsng/Makefile index 9bb9c1552596edcdb715fefb99aef100da025c0a..de8a5b2a0de67d08327122c72a5f46afb25245be 100644 --- a/board/sacsng/Makefile +++ b/board/sacsng/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/sacsng/sacsng.c b/board/sacsng/sacsng.c index ecbe0211e9b984e8e58e2717fc12dbf2960f5b18..c00f14ee604a4b318b3df09a111743d82f1c61c3 100644 --- a/board/sacsng/sacsng.c +++ b/board/sacsng/sacsng.c @@ -22,8 +22,8 @@ * MA 02111-1307 USA */ -#include #include +#include #include #include #include diff --git a/board/sandburst/karef/Makefile b/board/sandburst/karef/Makefile index 3b094ce1d48657b56601a70a777d01dcebc96e43..49d240c4cac13f426061efe21c1312867aaa7933 100644 --- a/board/sandburst/karef/Makefile +++ b/board/sandburst/karef/Makefile @@ -56,7 +56,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend *~ + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/sandburst/metrobox/Makefile b/board/sandburst/metrobox/Makefile index c143e5e8ca89e03ed3c01959fa2f5f40c95e2466..eb149108ac5f43d1420b795045947e5bef951768 100644 --- a/board/sandburst/metrobox/Makefile +++ b/board/sandburst/metrobox/Makefile @@ -54,7 +54,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend *~ + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/sbc2410x/Makefile b/board/sbc2410x/Makefile index a68c3832af30b808f9ed62f523051c168b547f0e..95f2ad120d215038e2864e1ac071f6e6ff34f145 100644 --- a/board/sbc2410x/Makefile +++ b/board/sbc2410x/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/sbc405/Makefile b/board/sbc405/Makefile index 3c5aa8680a355afaa542094a98cdc7c71cace1ae..1c60447e85483ac51c5d52c111cc9804538f0649 100644 --- a/board/sbc405/Makefile +++ b/board/sbc405/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/sbc8260/Makefile b/board/sbc8260/Makefile index 422dbc7139efec93a5bd7eb3bb653ea36dead58c..034a55169c16480a85b3d9e122ed7cd40f28e572 100644 --- a/board/sbc8260/Makefile +++ b/board/sbc8260/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/sbc8349/Makefile b/board/sbc8349/Makefile index 02cf569b5b858d2477b3058fcf22211c61dc0fbd..fd6bb2d29a03e5bf382d20d6dfa14ecfcd8fef00 100644 --- a/board/sbc8349/Makefile +++ b/board/sbc8349/Makefile @@ -37,7 +37,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/sbc8548/Makefile b/board/sbc8548/Makefile index 4b2a9f61bcafcee24f5c31a677389fbb9488245a..bb96d95a3a061f707bd3f8837cd2cdc6af5a0aec 100644 --- a/board/sbc8548/Makefile +++ b/board/sbc8548/Makefile @@ -41,7 +41,7 @@ clean: rm -f $(OBJS) $(SOBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/sbc8560/Makefile b/board/sbc8560/Makefile index 4b2a9f61bcafcee24f5c31a677389fbb9488245a..bb96d95a3a061f707bd3f8837cd2cdc6af5a0aec 100644 --- a/board/sbc8560/Makefile +++ b/board/sbc8560/Makefile @@ -41,7 +41,7 @@ clean: rm -f $(OBJS) $(SOBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/sbc8641d/Makefile b/board/sbc8641d/Makefile index 115df0532baabd7dc9d3864f6a70f470393f7fcd..c096e1552eabcd7067e2e3e6b483e40f90de705b 100644 --- a/board/sbc8641d/Makefile +++ b/board/sbc8641d/Makefile @@ -39,7 +39,7 @@ clean: .PHONY: distclean distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/sc3/Makefile b/board/sc3/Makefile index 4cc2b4171ca2c5a382a7756a8e67225a2c1c76cb..88989bd1c36b3d6248d17a3978127c8ccb33e959 100644 --- a/board/sc3/Makefile +++ b/board/sc3/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/sc520_cdp/Makefile b/board/sc520_cdp/Makefile index e19be51c30f0b56e56d39808edf1d5f4e04c041b..0d2800d5e4268860c3e007d39e038526689c7b92 100644 --- a/board/sc520_cdp/Makefile +++ b/board/sc520_cdp/Makefile @@ -42,7 +42,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/sc520_spunk/Makefile b/board/sc520_spunk/Makefile index 226c756bf4edef6abf0f421b82e2531300e56d50..e04172e3b9b890e4a95a39beea049aa5c4395cf1 100644 --- a/board/sc520_spunk/Makefile +++ b/board/sc520_spunk/Makefile @@ -42,7 +42,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/scb9328/Makefile b/board/scb9328/Makefile index 85b6b0474c41b0f7cb83cab26d3fadc3381e7996..3bac4776d7f7a75e790f8e10624af90770ecc38a 100644 --- a/board/scb9328/Makefile +++ b/board/scb9328/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/sh7763rdp/Makefile b/board/sh7763rdp/Makefile index 9e63ea7dc0b44986fc9c5dfbdf773884a74d68d3..62a683d57f5f5653c7f9bf754dbe8562178c0451 100644 --- a/board/sh7763rdp/Makefile +++ b/board/sh7763rdp/Makefile @@ -23,25 +23,29 @@ include $(TOPDIR)/config.mk -LIB = lib$(BOARD).a +LIB = $(obj)lib$(BOARD).a -OBJS := sh7763rdp.o +COBJS := sh7763rdp.o SOBJS := lowlevel_init.o +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + $(LIB): $(OBJS) $(SOBJS) - $(AR) crv $@ $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### -.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) - $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ +# defines $(obj).depend target +include $(SRCTREE)/rules.mk --include .depend +sinclude $(obj).depend ######################################################################### diff --git a/board/sh7763rdp/lowlevel_init.S b/board/sh7763rdp/lowlevel_init.S index 19428924129a9ac3249a7ab8697afa3189cb2b63..2a44eee1ad517647526aed75b7595c8eca704820 100644 --- a/board/sh7763rdp/lowlevel_init.S +++ b/board/sh7763rdp/lowlevel_init.S @@ -348,4 +348,3 @@ SR_MASK_D: .long 0xEFFFFF0F WDTST_D: .long 0x5A000FFF WDTCSR_D: .long 0xA5000000 WDTBST_D: .long 0x55000000 - diff --git a/board/sh7763rdp/sh7763rdp.c b/board/sh7763rdp/sh7763rdp.c index 6f9501b47ff4acf7991d0296ffbb730457d5723e..92ac7b7a96b8b7d2e1901ebea225b5b200f5d0ae 100644 --- a/board/sh7763rdp/sh7763rdp.c +++ b/board/sh7763rdp/sh7763rdp.c @@ -49,19 +49,20 @@ int board_init(void) { vu_short dat; - *(vu_short *)(CPU_CMDREG) |= 0x0001; + /* Enable mode */ + writew(inw(CPU_CMDREG)|0x0001, CPU_CMDREG); /* GPIO Setting (eth1) */ - dat = *(vu_short *)(PSEL1); - *(vu_short *)PSEL1 = ((dat & ~0xff00) | 0x2400); - *(vu_short *)PFCR = 0; - *(vu_short *)PGCR = 0; - *(vu_short *)PHCR = 0; + dat = inw(PSEL1); + writew(((dat & ~0xff00) | 0x2400), PSEL1); + writew(0, PFCR); + writew(0, PGCR); + writew(0, PHCR); return 0; } -int dram_init (void) +int dram_init(void) { DECLARE_GLOBAL_DATA_PTR; @@ -71,6 +72,6 @@ int dram_init (void) return 0; } -void led_set_state (unsigned short value) +void led_set_state(unsigned short value) { } diff --git a/board/sh7763rdp/u-boot.lds b/board/sh7763rdp/u-boot.lds index 8f8229baacbe5443d63c7f9c53d57d61395fa036..c07f0d80ed01bd2a179c7bafb6b176f1c96eefe6 100644 --- a/board/sh7763rdp/u-boot.lds +++ b/board/sh7763rdp/u-boot.lds @@ -103,4 +103,3 @@ SECTIONS PROVIDE (_end = .); } - diff --git a/board/shannon/Makefile b/board/shannon/Makefile index 37774a90c44f2ba6e450a8179f956dbdbdfa7272..16ed4cf4138ccbdbb7c09c673ed5bbf9021ad188 100644 --- a/board/shannon/Makefile +++ b/board/shannon/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/siemens/CCM/Makefile b/board/siemens/CCM/Makefile index e053c7d66113f8587ed14e30063a40de103a1018..c5695f98cbd04255f36c5e97bf2e7d6239ee4c58 100644 --- a/board/siemens/CCM/Makefile +++ b/board/siemens/CCM/Makefile @@ -22,23 +22,30 @@ # include $(TOPDIR)/config.mk + ifneq ($(OBJTREE),$(SRCTREE)) $(shell mkdir -p $(obj)../common) -$(shell mkdir -p $(obj)../../tqm8xx) +$(shell mkdir -p $(obj)../../tqc/tqm8xx) endif LIB = $(obj)lib$(BOARD).a COBJS = ccm.o flash.o fpga_ccm.o ../common/fpga.o \ - ../../tqm8xx/load_sernum_ethaddr.o + ../../tqc/tqm8xx/load_sernum_ethaddr.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) SOBJS := $(addprefix $(obj),$(SOBJS)) -$(LIB): $(obj).depend $(OBJS) +$(LIB): $(OBJS) $(AR) $(ARFLAGS) $@ $(OBJS) +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + ######################################################################### # defines $(obj).depend target diff --git a/board/siemens/IAD210/atm.c b/board/siemens/IAD210/atm.c index c77e35912ed60f987a52ea118dfbcab5fa58afd0..1b27f336b2bde4b217ce8f139601227c960ee40e 100644 --- a/board/siemens/IAD210/atm.c +++ b/board/siemens/IAD210/atm.c @@ -1,4 +1,3 @@ - #include #include #include @@ -7,7 +6,7 @@ #include #define SYNC __asm__("sync") -#define ALIGN(p, a) ((char *)(((uint32)(p)+(a)-1) & ~((uint32)(a)-1))) +#define MY_ALIGN(p, a) ((char *)(((uint32)(p)+(a)-1) & ~((uint32)(a)-1))) #define FALSE 1 #define TRUE 0 @@ -160,7 +159,7 @@ int atmMemInit() g_atm.csram = &csram[0]; memset(&(g_atm.csram), 0x00, g_atm.csram_size); - g_atm.int_reload_ptr = (uint32 *)ALIGN(g_atm.csram, 4); + g_atm.int_reload_ptr = (uint32 *)MY_ALIGN(g_atm.csram, 4); g_atm.rbd_base_ptr = (struct atm_bd_t *)(g_atm.int_reload_ptr + NUM_INT_ENTRIES); g_atm.tbd_base_ptr = (struct atm_bd_t *)(g_atm.rbd_base_ptr + total_num_rbd); diff --git a/board/siemens/SCM/Makefile b/board/siemens/SCM/Makefile index edc18200070907e99c5815dff6d2ab59ca0b2577..6ef49c2ce92ddb44d4b365b44271a7c53444a4ac 100644 --- a/board/siemens/SCM/Makefile +++ b/board/siemens/SCM/Makefile @@ -22,23 +22,30 @@ # include $(TOPDIR)/config.mk + ifneq ($(OBJTREE),$(SRCTREE)) $(shell mkdir -p $(obj)../common) -$(shell mkdir -p $(obj)../../tqm8xx/) +$(shell mkdir -p $(obj)../../tqc/tqm8xx) endif LIB = $(obj)lib$(BOARD).a COBJS = scm.o flash.o fpga_scm.o ../common/fpga.o \ - ../../tqm8xx/load_sernum_ethaddr.o + ../../tqc/tqm8xx/load_sernum_ethaddr.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) SOBJS := $(addprefix $(obj),$(SOBJS)) -$(LIB): $(obj).depend $(OBJS) +$(LIB): $(OBJS) $(AR) $(ARFLAGS) $@ $(OBJS) +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + ######################################################################### # defines $(obj).depend target diff --git a/board/siemens/SMN42/Makefile b/board/siemens/SMN42/Makefile index 2c7b54b081ecb0673e77678e1c11559a8419424c..4e75b6f7a3b11002afe9b54b02efdb19a3726147 100644 --- a/board/siemens/SMN42/Makefile +++ b/board/siemens/SMN42/Makefile @@ -33,7 +33,7 @@ OBJS := $(addprefix $(obj),$(COBJS)) SOBJS := $(addprefix $(obj),$(SOBJTS)) $(LIB): $(obj).depend $(OBJS) $(SOBJS) - $(AR) crv $@ $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) clean: rm -f $(SOBJS) $(OBJS) diff --git a/board/smdk2400/Makefile b/board/smdk2400/Makefile index 57c76e5b30d7265b746c648e728d66bec6e0c739..90cb2b8f60210f960d71e5020d3291d18fbdd3a0 100644 --- a/board/smdk2400/Makefile +++ b/board/smdk2400/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/smdk2410/Makefile b/board/smdk2410/Makefile index 8617b27f6e0b022c74859be26fedb2d5e25eb832..5d0cd722d031f209556a697be16b5b86080cd4d6 100644 --- a/board/smdk2410/Makefile +++ b/board/smdk2410/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/socrates/Makefile b/board/socrates/Makefile index 11503ebe17198bedeaa452d6c9fef56f2ef7b234..a41fead8f4426168bd7c89bc483a450bc26abee9 100644 --- a/board/socrates/Makefile +++ b/board/socrates/Makefile @@ -41,7 +41,7 @@ clean: rm -f $(OBJS) $(SOBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/socrates/upm_table.h b/board/socrates/upm_table.h index f26d8a7b3411ee5c362e6bc61a0114f4d0b22f5c..ea64a59a0cb56f746f8e81f0e6336303d071cabe 100644 --- a/board/socrates/upm_table.h +++ b/board/socrates/upm_table.h @@ -34,22 +34,22 @@ /* UPM Table Configuration Code for FPGA access */ static const unsigned int UPMTableA[] = { - 0x00fcfc00, 0x00fcfc00, 0x00fcfc00, 0x00fcfc00, //Words 0 to 3 - 0x00fcfc00, 0x00fcfc00, 0x00fcfc00, 0x00fcfc05, //Words 4 to 7 - 0x00fcfc00, 0x00fcfc00, 0x00fcfc04, 0x00fcfc04, //Words 8 to 11 - 0x00fcfc04, 0x00fcfc04, 0x00fcfc04, 0x00fcfc04, //Words 12 to 15 - 0x00fcfc04, 0x00fcfc04, 0x00fcfc00, 0xfffffc00, //Words 16 to 19 - 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc01, //Words 20 to 23 - 0x0ffffc00, 0x0ffffc00, 0x0ffffc00, 0x00f3fc04, //Words 24 to 27 - 0x0ffffc00, 0xfffffc01, 0xfffffc00, 0xfffffc01, //Words 28 to 31 - 0x0ffffc00, 0x00f3fc04, 0x00f3fc04, 0x00f3fc04, //Words 32 to 35 - 0x00f3fc04, 0x00f3fc04, 0x00f3fc04, 0x00f3fc04, //Words 36 to 39 - 0x00f3fc04, 0x0ffffc00, 0xfffffc00, 0xfffffc00, //Words 40 to 43 - 0xfffffc01, 0xfffffc00, 0xfffffc00, 0xfffffc01, //Words 44 to 47 - 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00, //Words 48 to 51 - 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00, //Words 52 to 55 - 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc01, //Words 56 to 59 - 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc01 //Words 60 to 63 + 0x00fcfc00, 0x00fcfc00, 0x00fcfc00, 0x00fcfc00, /* Words 0 to 3 */ + 0x00fcfc00, 0x00fcfc00, 0x00fcfc00, 0x00fcfc05, /* Words 4 to 7 */ + 0x00fcfc00, 0x00fcfc00, 0x00fcfc04, 0x00fcfc04, /* Words 8 to 11 */ + 0x00fcfc04, 0x00fcfc04, 0x00fcfc04, 0x00fcfc04, /* Words 12 to 15 */ + 0x00fcfc04, 0x00fcfc04, 0x00fcfc00, 0xfffffc00, /* Words 16 to 19 */ + 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc01, /* Words 20 to 23 */ + 0x0ffffc00, 0x0ffffc00, 0x0ffffc00, 0x00f3fc04, /* Words 24 to 27 */ + 0x0ffffc00, 0xfffffc01, 0xfffffc00, 0xfffffc01, /* Words 28 to 31 */ + 0x0ffffc00, 0x00f3fc04, 0x00f3fc04, 0x00f3fc04, /* Words 32 to 35 */ + 0x00f3fc04, 0x00f3fc04, 0x00f3fc04, 0x00f3fc04, /* Words 36 to 39 */ + 0x00f3fc04, 0x0ffffc00, 0xfffffc00, 0xfffffc00, /* Words 40 to 43 */ + 0xfffffc01, 0xfffffc00, 0xfffffc00, 0xfffffc01, /* Words 44 to 47 */ + 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00, /* Words 48 to 51 */ + 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00, /* Words 52 to 55 */ + 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc01, /* Words 56 to 59 */ + 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc01 /* Words 60 to 63 */ }; #endif diff --git a/board/sorcery/Makefile b/board/sorcery/Makefile index e02916f708b68479250509ffb173c279cfb8f602..434d3489801f08a4e55d8d958d822f7fd6616e9e 100644 --- a/board/sorcery/Makefile +++ b/board/sorcery/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/ssv/adnpesc1/Makefile b/board/ssv/adnpesc1/Makefile index 5b87b75e764ce04b93957657601067126575a61a..40f04b81f021cb79ae124c7c9dbab1cb9264c0cc 100644 --- a/board/ssv/adnpesc1/Makefile +++ b/board/ssv/adnpesc1/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/stxgp3/Makefile b/board/stxgp3/Makefile index 28d6cb9976e01b39caea1008c3d46629242f5b7e..325d6d572211c4cc287155962031241452e27211 100644 --- a/board/stxgp3/Makefile +++ b/board/stxgp3/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(OBJS) $(SOBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/stxssa/Makefile b/board/stxssa/Makefile index f1f5d0b1bfe01f3f3187786f800898231fdc47c7..e29cf95e3cd660a6574b94fb7ada2d83108aa2a4 100644 --- a/board/stxssa/Makefile +++ b/board/stxssa/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(OBJS) $(SOBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/sx1/Makefile b/board/sx1/Makefile index 609ca75c4dd2a35bda7d1f967057ad3140d01cd1..4c11030ed6aae1a2b3caa9ab1aba3d4aa7437e3a 100644 --- a/board/sx1/Makefile +++ b/board/sx1/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/total5200/Makefile b/board/total5200/Makefile index 10e5fc34060c7eaa9993c25b75852110bca8a317..a8abd7d7811da984b79fdff51b8a7746aeacbe7e 100644 --- a/board/total5200/Makefile +++ b/board/total5200/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/tqc/tqm5200/Makefile b/board/tqc/tqm5200/Makefile index a5ce7bd46f77a1906118018752cd28d6ce9a6d9e..ce125e2b9608242da97930d1011f30d507184049 100644 --- a/board/tqc/tqm5200/Makefile +++ b/board/tqc/tqm5200/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend cam5200_flash.o: cam5200_flash.c $(CC) $(CFLAGS) -fno-strict-aliasing -c -o $@ $< diff --git a/board/tqc/tqm834x/Makefile b/board/tqc/tqm834x/Makefile index 4c0d20417e5a5c49ab74a1f43adff896888368e1..8889726aebdbbc1dc67cd2802dd15e20ae46cd88 100644 --- a/board/tqc/tqm834x/Makefile +++ b/board/tqc/tqm834x/Makefile @@ -40,7 +40,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/tqc/tqm85xx/Makefile b/board/tqc/tqm85xx/Makefile index 8ea07f246863f12d75b668de186c48c4f23bf759..adda9d45b793ccca3e2cb7b3fba63ad5adb301e9 100644 --- a/board/tqc/tqm85xx/Makefile +++ b/board/tqc/tqm85xx/Makefile @@ -44,7 +44,7 @@ clean: rm -f $(OBJS) $(SOBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/tqc/tqm85xx/nand.c b/board/tqc/tqm85xx/nand.c index fe3b31f0470e6dc877578ac659d4effd167d6ecb..9c5c12c844ea8f8334ae578f2d4eb65d483a45e5 100644 --- a/board/tqc/tqm85xx/nand.c +++ b/board/tqc/tqm85xx/nand.c @@ -59,7 +59,7 @@ struct upm_freq { /* UPM pattern for bus clock = 25 MHz */ static const u32 upm_patt_25[] = { - /* Offset *//* UPM Read Single RAM array entry -> NAND Read Data */ + /* Offset */ /* UPM Read Single RAM array entry -> NAND Read Data */ /* 0x00 */ 0x0ff32000, 0x0fa32000, 0x3fb32005, 0xfffffc00, /* 0x04 */ 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00, @@ -92,7 +92,7 @@ static const u32 upm_patt_25[] = { /* UPM pattern for bus clock = 33.3 MHz */ static const u32 upm_patt_33[] = { - /* Offset *//* UPM Read Single RAM array entry -> NAND Read Data */ + /* Offset */ /* UPM Read Single RAM array entry -> NAND Read Data */ /* 0x00 */ 0x0ff32000, 0x0fa32100, 0x3fb32005, 0xfffffc00, /* 0x04 */ 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00, @@ -125,7 +125,7 @@ static const u32 upm_patt_33[] = { /* UPM pattern for bus clock = 41.7 MHz */ static const u32 upm_patt_42[] = { - /* Offset *//* UPM Read Single RAM array entry -> NAND Read Data */ + /* Offset */ /* UPM Read Single RAM array entry -> NAND Read Data */ /* 0x00 */ 0x0ff32000, 0x0fa32100, 0x3fb32005, 0xfffffc00, /* 0x04 */ 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00, @@ -158,7 +158,7 @@ static const u32 upm_patt_42[] = { /* UPM pattern for bus clock = 50 MHz */ static const u32 upm_patt_50[] = { - /* Offset *//* UPM Read Single RAM array entry -> NAND Read Data */ + /* Offset */ /* UPM Read Single RAM array entry -> NAND Read Data */ /* 0x00 */ 0x0ff33000, 0x0fa33100, 0x0fa33005, 0xfffffc00, /* 0x04 */ 0xfffffc00, 0xfffffc00, 0xfffffc00, 0xfffffc00, @@ -191,7 +191,7 @@ static const u32 upm_patt_50[] = { /* UPM pattern for bus clock = 66.7 MHz */ static const u32 upm_patt_67[] = { - /* Offset *//* UPM Read Single RAM array entry -> NAND Read Data */ + /* Offset */ /* UPM Read Single RAM array entry -> NAND Read Data */ /* 0x00 */ 0x0ff33000, 0x0fe33000, 0x0fa33100, 0x0fa33000, /* 0x04 */ 0x0fa33005, 0xfffffc00, 0xfffffc00, 0xfffffc00, @@ -224,7 +224,7 @@ static const u32 upm_patt_67[] = { /* UPM pattern for bus clock = 83.3 MHz */ static const u32 upm_patt_83[] = { - /* Offset *//* UPM Read Single RAM array entry -> NAND Read Data */ + /* Offset */ /* UPM Read Single RAM array entry -> NAND Read Data */ /* 0x00 */ 0x0ff33000, 0x0fe33000, 0x0fa33100, 0x0fa33000, /* 0x04 */ 0x0fa33005, 0xfffffc00, 0xfffffc00, 0xfffffc00, @@ -257,7 +257,7 @@ static const u32 upm_patt_83[] = { /* UPM pattern for bus clock = 100 MHz */ static const u32 upm_patt_100[] = { - /* Offset *//* UPM Read Single RAM array entry -> NAND Read Data */ + /* Offset */ /* UPM Read Single RAM array entry -> NAND Read Data */ /* 0x00 */ 0x0ff33100, 0x0fe33000, 0x0fa33200, 0x0fa33000, /* 0x04 */ 0x0fa33005, 0xfffffc00, 0xfffffc00, 0xfffffc00, @@ -290,7 +290,7 @@ static const u32 upm_patt_100[] = { /* UPM pattern for bus clock = 133.3 MHz */ static const u32 upm_patt_133[] = { - /* Offset *//* UPM Read Single RAM array entry -> NAND Read Data */ + /* Offset */ /* UPM Read Single RAM array entry -> NAND Read Data */ /* 0x00 */ 0x0ff33100, 0x0fe33000, 0x0fa33300, 0x0fa33000, /* 0x04 */ 0x0fa33000, 0x0fa33005, 0xfffffc00, 0xfffffc00, @@ -323,7 +323,7 @@ static const u32 upm_patt_133[] = { /* UPM pattern for bus clock = 166.7 MHz */ static const u32 upm_patt_167[] = { - /* Offset *//* UPM Read Single RAM array entry -> NAND Read Data */ + /* Offset */ /* UPM Read Single RAM array entry -> NAND Read Data */ /* 0x00 */ 0x0ff33200, 0x0fe33000, 0x0fa33300, 0x0fa33300, /* 0x04 */ 0x0fa33005, 0xfffffc00, 0xfffffc00, 0xfffffc00, diff --git a/board/trab/Makefile b/board/trab/Makefile index fbe1c3640fc661ab1218d8a83d9c1eaff316ed7d..2402577a509eca25c65eb9afcd234e94ea14fead 100644 --- a/board/trab/Makefile +++ b/board/trab/Makefile @@ -60,7 +60,7 @@ clean: rm -f $(SOBJS) $(OBJS) $(OBJS_FKT) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/trizepsiv/Makefile b/board/trizepsiv/Makefile index 115e17ded925339fefc84e52cb8f394221a454e9..44c0d495ef2702445edcb0945ba5c1397f622d62 100644 --- a/board/trizepsiv/Makefile +++ b/board/trizepsiv/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/uc101/Makefile b/board/uc101/Makefile index ddfd2ef8afe023bfe5c017ead825bff259cf59fb..442e2d0df25c1719bc48681008793e7f697ff541 100644 --- a/board/uc101/Makefile +++ b/board/uc101/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/v38b/Makefile b/board/v38b/Makefile index b21bd6f6c5240c74eff0bc27faf4e1ca6d718cfb..0b227dac0f294ab4eedcdfe5c58b0544fcdf8470 100644 --- a/board/v38b/Makefile +++ b/board/v38b/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/versatile/Makefile b/board/versatile/Makefile index 1fad0a7ee34065a9915ac267b06d57613c89fb97..044a429899d4fc8d65d550ea70d63e98d6fbaf9f 100644 --- a/board/versatile/Makefile +++ b/board/versatile/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/voiceblue/Makefile b/board/voiceblue/Makefile index 9386bb0e7af420d071e5c861d3c4356047ff0db6..e7c1cbb3127b9e48bc1391d41389d21f4a6e2dbf 100644 --- a/board/voiceblue/Makefile +++ b/board/voiceblue/Makefile @@ -62,7 +62,7 @@ clean: distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/w7o/Makefile b/board/w7o/Makefile index 46b8c8923a62c0cc49b726e81bf5250c6d5590ce..e481bb2880c61a9997e57d3aea25d2e66c2c4cbd 100644 --- a/board/w7o/Makefile +++ b/board/w7o/Makefile @@ -43,7 +43,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/wepep250/Makefile b/board/wepep250/Makefile index 58a70ccd75c4d6f754cb3d712a20eb07c631c00d..0669b0ebbae1c5636261e9fa04b5a3dc4ec1f56d 100644 --- a/board/wepep250/Makefile +++ b/board/wepep250/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/xaeniax/Makefile b/board/xaeniax/Makefile index 9a79f7d98128fcd379331ea5d5dd0782975a155a..7dd2ea04a6958fbd3208aedef1b23126f7020dce 100644 --- a/board/xaeniax/Makefile +++ b/board/xaeniax/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/xilinx/ml300/Makefile b/board/xilinx/ml300/Makefile index 05ad23524f1d8455beef77eada6d40aef6f3419e..9215d77bb0d890eb5479273854cb9a6c5d1788cb 100644 --- a/board/xilinx/ml300/Makefile +++ b/board/xilinx/ml300/Makefile @@ -58,7 +58,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/xilinx/ml300/serial.c b/board/xilinx/ml300/serial.c index ba41f856e4aacda6bd44f62c348a7a735d2dd5ff..993dfa30f6e6516a1dedcbed37844658db7a5c60 100644 --- a/board/xilinx/ml300/serial.c +++ b/board/xilinx/ml300/serial.c @@ -36,9 +36,9 @@ * */ +#include #include #include -#include #include #include diff --git a/board/xilinx/ml401/Makefile b/board/xilinx/ml401/Makefile index ee9b6d5d2984ed68b7c391d819644cec2b39ded2..10b47b2ae54cb1436c8b68960685912695055e84 100644 --- a/board/xilinx/ml401/Makefile +++ b/board/xilinx/ml401/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/xilinx/xupv2p/Makefile b/board/xilinx/xupv2p/Makefile index ee9b6d5d2984ed68b7c391d819644cec2b39ded2..10b47b2ae54cb1436c8b68960685912695055e84 100644 --- a/board/xilinx/xupv2p/Makefile +++ b/board/xilinx/xupv2p/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/xm250/Makefile b/board/xm250/Makefile index 0a6eb320acaf9c08b721914dac247f344d8c12b1..a174f66199e0802bf2cb9c0e30bc8c9531dcd932 100644 --- a/board/xm250/Makefile +++ b/board/xm250/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/xpedite1k/Makefile b/board/xpedite1k/Makefile index 5da96e9e1c846aaab582cd468654ae8debc73520..6ab1a26b15b5338d60a5cefc03b14b8b1567872a 100644 --- a/board/xpedite1k/Makefile +++ b/board/xpedite1k/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/xsengine/Makefile b/board/xsengine/Makefile index 3f80a1d515f0f4db6c1bd5422a8b8e6a1837548e..fc239358b2362466b016273eb714f585c1c59c6b 100644 --- a/board/xsengine/Makefile +++ b/board/xsengine/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/zeus/Makefile b/board/zeus/Makefile index f0d4e9f3f42180b9be4f4f0375aa9e4d70278315..55fb4c4343f0279dbeeea84ed053844c2c178a17 100644 --- a/board/zeus/Makefile +++ b/board/zeus/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/zeus/zeus.c b/board/zeus/zeus.c index 0113d4845e4e3b967fdbe4bab3758247cfb20546..33d971ab024d33b5c9841474dcb3815e57f6bcfe 100644 --- a/board/zeus/zeus.c +++ b/board/zeus/zeus.c @@ -280,7 +280,7 @@ static int restore_default(void) } else { crc = crc32(0, (u8 *)(buf + 4), FACTORY_RESET_ENV_SIZE - 4); if (crc != *(u32 *)buf) { - printf("ERROR: crc mismatch %08lx %08lx\n", crc, *(u32 *)buf); + printf("ERROR: crc mismatch %08x %08x\n", crc, *(u32 *)buf); return -1; } diff --git a/board/zpc1900/Makefile b/board/zpc1900/Makefile index be7e213a9b5d311794d855554c720ec083c2051b..dc40d9b94a6dd89e249b38cbfa6e5b830fc11afd 100644 --- a/board/zpc1900/Makefile +++ b/board/zpc1900/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/board/zylonite/Makefile b/board/zylonite/Makefile index d72dc98f01a1a02bef6d436d845311538142892c..89542356b7c2dd4b439e0989248bb36b71d82f61 100644 --- a/board/zylonite/Makefile +++ b/board/zylonite/Makefile @@ -39,7 +39,7 @@ clean: rm -f $(SOBJS) $(OBJS) distclean: clean - rm -f $(LIB) core *.bak .depend + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c index 5bb39d8db98dc0145d362e039833aa659cf0888a..caa467d02681f86fefadbb7c6c7a02e74ded0c59 100644 --- a/common/cmd_bdinfo.c +++ b/common/cmd_bdinfo.c @@ -60,18 +60,18 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #endif print_num ("bootflags", bd->bi_bootflags ); #if defined(CONFIG_405GP) || defined(CONFIG_405CR) || \ - defined(CONFIG_405EP) || defined(CONFIG_XILINX_ML300) || \ + defined(CONFIG_405EP) || defined(CONFIG_XILINX_405) || \ defined(CONFIG_440EP) || defined(CONFIG_440GR) || \ defined(CONFIG_440EPX) || defined(CONFIG_440GRX) || \ defined(CONFIG_440SP) || defined(CONFIG_440SPE) print_str ("procfreq", strmhz(buf, bd->bi_procfreq)); print_str ("plb_busfreq", strmhz(buf, bd->bi_plb_busfreq)); -#if defined(CONFIG_405GP) || defined(CONFIG_405EP) || defined(CONFIG_XILINX_ML300) || \ +#if defined(CONFIG_405GP) || defined(CONFIG_405EP) || defined(CONFIG_XILINX_405) || \ defined(CONFIG_440EP) || defined(CONFIG_440GR) || defined(CONFIG_440SPE) || \ defined(CONFIG_440EPX) || defined(CONFIG_440GRX) print_str ("pci_busfreq", strmhz(buf, bd->bi_pci_busfreq)); #endif -#else /* ! CONFIG_405GP, CONFIG_405CR, CONFIG_405EP, CONFIG_XILINX_ML300, CONFIG_440EP CONFIG_440GR */ +#else /* ! CONFIG_405GP, CONFIG_405CR, CONFIG_405EP, CONFIG_XILINX_405, CONFIG_440EP CONFIG_440GR */ #if defined(CONFIG_CPM2) print_str ("vco", strmhz(buf, bd->bi_vco)); print_str ("sccfreq", strmhz(buf, bd->bi_sccfreq)); @@ -82,7 +82,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) print_str ("cpmfreq", strmhz(buf, bd->bi_cpmfreq)); #endif print_str ("busfreq", strmhz(buf, bd->bi_busfreq)); -#endif /* CONFIG_405GP, CONFIG_405CR, CONFIG_405EP, CONFIG_XILINX_ML300, CONFIG_440EP CONFIG_440GR */ +#endif /* CONFIG_405GP, CONFIG_405CR, CONFIG_405EP, CONFIG_XILINX_405, CONFIG_440EP CONFIG_440GR */ #if defined(CONFIG_MPC8220) print_str ("inpfreq", strmhz(buf, bd->bi_inpfreq)); print_str ("flbfreq", strmhz(buf, bd->bi_flbfreq)); diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 959689ea7a8e824e434d69c885ec6b8194f8b56d..f701ab6f7c6af48efb16997aecd2e3b8ef1812bb 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -613,7 +613,7 @@ static void *boot_get_kernel (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] return NULL; } - debug (" kernel data at 0x%08lx, len = 0x%08lx (%d)\n", + debug (" kernel data at 0x%08lx, len = 0x%08lx (%ld)\n", *os_data, *os_len, *os_len); return (void *)img_addr; diff --git a/common/cmd_doc.c b/common/cmd_doc.c index 83aba3744e96dd40be2cf65507bfa25ace03605b..d7b2f535f3d5b11825082d50ee156c42977302b5 100644 --- a/common/cmd_doc.c +++ b/common/cmd_doc.c @@ -206,7 +206,7 @@ int do_docboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) image_header_t *hdr; int rcode = 0; #if defined(CONFIG_FIT) - const void *fit_hdr; + const void *fit_hdr = NULL; #endif show_boot_progress (34); @@ -275,12 +275,6 @@ int do_docboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #if defined(CONFIG_FIT) case IMAGE_FORMAT_FIT: fit_hdr = (const void *)addr; - if (!fit_check_format (fit_hdr)) { - show_boot_progress (-130); - puts ("** Bad FIT image format\n"); - return 1; - } - show_boot_progress (131); puts ("Fit image detected...\n"); cnt = fit_get_size (fit_hdr); @@ -304,8 +298,15 @@ int do_docboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #if defined(CONFIG_FIT) /* This cannot be done earlier, we need complete FIT image in RAM first */ - if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) - fit_print_contents ((const void *)addr); + if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) { + if (!fit_check_format (fit_hdr)) { + show_boot_progress (-130); + puts ("** Bad FIT image format\n"); + return 1; + } + show_boot_progress (131); + fit_print_contents (fit_hdr); + } #endif /* Loading ok, update default load address */ diff --git a/common/cmd_fdc.c b/common/cmd_fdc.c index 0293d186ab8813a9b41ed17e8476a42d2cee030b..e4fbf29a2213d3ce278e7df60436a76e175c393f 100644 --- a/common/cmd_fdc.c +++ b/common/cmd_fdc.c @@ -787,7 +787,7 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) char *ep; int rcode = 0; #if defined(CONFIG_FIT) - const void *fit_hdr; + const void *fit_hdr = NULL; #endif switch (argc) { @@ -847,10 +847,6 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #if defined(CONFIG_FIT) case IMAGE_FORMAT_FIT: fit_hdr = (const void *)addr; - if (!fit_check_format (fit_hdr)) { - puts ("** Bad FIT image format\n"); - return 1; - } puts ("Fit image detected...\n"); imsize = fit_get_size (fit_hdr); @@ -879,8 +875,13 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #if defined(CONFIG_FIT) /* This cannot be done earlier, we need complete FIT image in RAM first */ - if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) - fit_print_contents ((const void *)addr); + if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) { + if (!fit_check_format (fit_hdr)) { + puts ("** Bad FIT image format\n"); + return 1; + } + fit_print_contents (fit_hdr); + } #endif /* Loading ok, update default load address */ diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c index 97b9dd76caeaffdcb03d9b087456a0bf88ad9e34..d3b19ddc1f4a8d278868af55ddb5b20f6e1d9eb5 100644 --- a/common/cmd_fdt.c +++ b/common/cmd_fdt.c @@ -451,14 +451,14 @@ static int fdt_valid(void) if (err == -FDT_ERR_BADVERSION) { if (fdt_version(working_fdt) < FDT_FIRST_SUPPORTED_VERSION) { - printf (" - too old, fdt $d < %d", + printf (" - too old, fdt %d < %d", fdt_version(working_fdt), FDT_FIRST_SUPPORTED_VERSION); working_fdt = NULL; } if (fdt_last_comp_version(working_fdt) > FDT_LAST_SUPPORTED_VERSION) { - printf (" - too new, fdt $d > %d", + printf (" - too new, fdt %d > %d", fdt_version(working_fdt), FDT_LAST_SUPPORTED_VERSION); working_fdt = NULL; @@ -546,7 +546,7 @@ static int fdt_parse_prop(char **newval, int count, char *data, int *len) newp = newval[++stridx]; } if (*newp != ']') { - printf("Unexpected character '%c'\n", *newval); + printf("Unexpected character '%c'\n", *newp); return 1; } } else { @@ -763,7 +763,7 @@ static int fdt_print(const char *pathp, char *prop, int depth) } break; case FDT_NOP: - printf("/* NOP */\n", &tabs[MAX_LEVEL - level]); + printf("%s/* NOP */\n", &tabs[MAX_LEVEL - level]); break; case FDT_END: return 1; diff --git a/common/cmd_ide.c b/common/cmd_ide.c index 65607022eb47c9bb2e8f418dd8ea96323e1647a7..97a873d1c96a517f3e96db09038f44f1ea421083 100644 --- a/common/cmd_ide.c +++ b/common/cmd_ide.c @@ -367,7 +367,7 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) image_header_t *hdr; int rcode = 0; #if defined(CONFIG_FIT) - const void *fit_hdr; + const void *fit_hdr = NULL; #endif show_boot_progress (41); @@ -465,12 +465,6 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #if defined(CONFIG_FIT) case IMAGE_FORMAT_FIT: fit_hdr = (const void *)addr; - if (!fit_check_format (fit_hdr)) { - show_boot_progress (-140); - puts ("** Bad FIT image format\n"); - return 1; - } - show_boot_progress (141); puts ("Fit image detected...\n"); cnt = fit_get_size (fit_hdr); @@ -496,8 +490,15 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #if defined(CONFIG_FIT) /* This cannot be done earlier, we need complete FIT image in RAM first */ - if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) - fit_print_contents ((const void *)addr); + if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) { + if (!fit_check_format (fit_hdr)) { + show_boot_progress (-140); + puts ("** Bad FIT image format\n"); + return 1; + } + show_boot_progress (141); + fit_print_contents (fit_hdr); + } #endif /* Loading ok, update default load address */ diff --git a/common/cmd_nand.c b/common/cmd_nand.c index 37198d21e8c6e1638f112a63205884317fba5af4..cc7c5ba2419725800a4ac6146752b7b25e92719e 100644 --- a/common/cmd_nand.c +++ b/common/cmd_nand.c @@ -55,11 +55,11 @@ static int nand_dump(nand_info_t *nand, ulong off) off &= ~(nand->oobblock - 1); i = nand_read_raw(nand, buf, off, nand->oobblock, nand->oobsize); if (i < 0) { - printf("Error (%d) reading page %08x\n", i, off); + printf("Error (%d) reading page %08lx\n", i, off); free(buf); return 1; } - printf("Page %08x dump:\n", off); + printf("Page %08lx dump:\n", off); i = nand->oobblock >> 4; p = buf; while (i--) { printf( "\t%02x %02x %02x %02x %02x %02x %02x %02x" @@ -149,7 +149,7 @@ out: if (*size == nand->size) puts("whole chip\n"); else - printf("offset 0x%x, size 0x%x\n", *off, *size); + printf("offset 0x%lx, size 0x%x\n", *off, *size); return 0; } @@ -181,7 +181,7 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) putc('\n'); for (i = 0; i < CFG_MAX_NAND_DEVICE; i++) { if (nand_info[i].name) - printf("Device %d: %s, sector size %lu KiB\n", + printf("Device %d: %s, sector size %u KiB\n", i, nand_info[i].name, nand_info[i].erasesize >> 10); } @@ -238,7 +238,7 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) printf("\nDevice %d bad blocks:\n", nand_curr_device); for (off = 0; off < nand->size; off += nand->erasesize) if (nand_block_isbad(nand, off)) - printf(" %08x\n", off); + printf(" %08lx\n", off); return 0; } @@ -417,7 +417,7 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) if (off == nand->size - nand->oobblock || (s != last_status && off != 0)) { - printf("%08x - %08x: %8d pages %s%s%s\n", + printf("%08lx - %08lx: %8lu pages %s%s%s\n", block_start, off-1, (off-block_start)/nand->oobblock, @@ -484,7 +484,7 @@ static int nand_load_image(cmd_tbl_t *cmdtp, nand_info_t *nand, image_header_t *hdr; int jffs2 = 0; #if defined(CONFIG_FIT) - const void *fit_hdr; + const void *fit_hdr = NULL; #endif s = strchr(cmd, '.'); @@ -526,12 +526,6 @@ static int nand_load_image(cmd_tbl_t *cmdtp, nand_info_t *nand, #if defined(CONFIG_FIT) case IMAGE_FORMAT_FIT: fit_hdr = (const void *)addr; - if (!fit_check_format (fit_hdr)) { - show_boot_progress (-150); - puts ("** Bad FIT image format\n"); - return 1; - } - show_boot_progress (151); puts ("Fit image detected...\n"); cnt = fit_get_size (fit_hdr); @@ -564,8 +558,15 @@ static int nand_load_image(cmd_tbl_t *cmdtp, nand_info_t *nand, #if defined(CONFIG_FIT) /* This cannot be done earlier, we need complete FIT image in RAM first */ - if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) - fit_print_contents ((const void *)addr); + if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) { + if (!fit_check_format (fit_hdr)) { + show_boot_progress (-150); + puts ("** Bad FIT image format\n"); + return 1; + } + show_boot_progress (151); + fit_print_contents (fit_hdr); + } #endif /* Loading ok, update default load address */ @@ -952,7 +953,7 @@ int do_nandboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) image_header_t *hdr; int rcode = 0; #if defined(CONFIG_FIT) - const void *fit_hdr; + const void *fit_hdr = NULL; #endif show_boot_progress (52); @@ -1021,12 +1022,6 @@ int do_nandboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #if defined(CONFIG_FIT) case IMAGE_FORMAT_FIT: fit_hdr = (const void *)addr; - if (!fit_check_format (fit_hdr)) { - show_boot_progress (-150); - puts ("** Bad FIT image format\n"); - return 1; - } - show_boot_progress (151); puts ("Fit image detected...\n"); cnt = fit_get_size (fit_hdr); @@ -1050,8 +1045,15 @@ int do_nandboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #if defined(CONFIG_FIT) /* This cannot be done earlier, we need complete FIT image in RAM first */ - if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) - fit_print_contents ((const void *)addr); + if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) { + if (!fit_check_format (fit_hdr)) { + show_boot_progress (-150); + puts ("** Bad FIT image format\n"); + return 1; + } + show_boot_progress (151); + fit_print_contents (fit_hdr); + } #endif /* Loading ok, update default load address */ diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index 49f134a92e51eb797be0eada8429870905fe59e0..85a0f94f0fec0a0a11d2d39fd8d95a25b3e2f2fa 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -180,11 +180,12 @@ int _do_setenv (int flag, int argc, char *argv[]) * Ethernet Address and serial# can be set only once, * ver is readonly. */ + if ( #ifdef CONFIG_HAS_UID /* Allow serial# forced overwrite with 0xdeaf4add flag */ - if ( ((strcmp (name, "serial#") == 0) && (flag != 0xdeaf4add)) || + ((strcmp (name, "serial#") == 0) && (flag != 0xdeaf4add)) || #else - if ( (strcmp (name, "serial#") == 0) || + (strcmp (name, "serial#") == 0) || #endif ((strcmp (name, "ethaddr") == 0) #if defined(CONFIG_OVERWRITE_ETHADDR_ONCE) && defined(CONFIG_ETHADDR) @@ -380,13 +381,13 @@ int _do_setenv (int flag, int argc, char *argv[]) return 0; } -void setenv (char *varname, char *varvalue) +int setenv (char *varname, char *varvalue) { char *argv[4] = { "setenv", varname, varvalue, NULL }; if (varvalue == NULL) - _do_setenv (0, 2, argv); + return _do_setenv (0, 2, argv); else - _do_setenv (0, 3, argv); + return _do_setenv (0, 3, argv); } #ifdef CONFIG_HAS_UID diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c index 69028f3b6bd800023078fbab2f62cc4446b5702b..e648f7d6014eb1bf31f8eb972b6d222e6a582bfa 100644 --- a/common/cmd_scsi.c +++ b/common/cmd_scsi.c @@ -212,7 +212,7 @@ int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) image_header_t *hdr; int rcode = 0; #if defined(CONFIG_FIT) - const void *fit_hdr; + const void *fit_hdr = NULL; #endif switch (argc) { @@ -291,10 +291,6 @@ int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #if defined(CONFIG_FIT) case IMAGE_FORMAT_FIT: fit_hdr = (const void *)addr; - if (!fit_check_format (fit_hdr)) { - puts ("** Bad FIT image format\n"); - return 1; - } puts ("Fit image detected...\n"); cnt = fit_get_size (fit_hdr); @@ -317,8 +313,13 @@ int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #if defined(CONFIG_FIT) /* This cannot be done earlier, we need complete FIT image in RAM first */ - if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) - fit_print_contents ((const void *)addr); + if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) { + if (!fit_check_format (fit_hdr)) { + puts ("** Bad FIT image format\n"); + return 1; + } + fit_print_contents (fit_hdr); + } #endif /* Loading ok, update default load address */ diff --git a/common/cmd_usb.c b/common/cmd_usb.c index 9be86b874d5679798a0fb8c91308371f9516ce54..30caa98ea738020832b78dcdd15c7595e4a03025 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -316,7 +316,7 @@ int do_usbboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) image_header_t *hdr; block_dev_desc_t *stor_dev; #if defined(CONFIG_FIT) - const void *fit_hdr; + const void *fit_hdr = NULL; #endif switch (argc) { @@ -404,10 +404,6 @@ int do_usbboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #if defined(CONFIG_FIT) case IMAGE_FORMAT_FIT: fit_hdr = (const void *)addr; - if (!fit_check_format (fit_hdr)) { - puts ("** Bad FIT image format\n"); - return 1; - } puts ("Fit image detected...\n"); cnt = fit_get_size (fit_hdr); @@ -430,8 +426,13 @@ int do_usbboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #if defined(CONFIG_FIT) /* This cannot be done earlier, we need complete FIT image in RAM first */ - if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) - fit_print_contents ((const void *)addr); + if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT) { + if (!fit_check_format (fit_hdr)) { + puts ("** Bad FIT image format\n"); + return 1; + } + fit_print_contents (fit_hdr); + } #endif /* Loading ok, update default load address */ @@ -553,13 +554,24 @@ int do_usb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } if (strncmp(argv[1],"part",4) == 0) { - int devno, ok; - for (ok=0, devno=0; devnotype!=DEV_TYPE_UNKNOWN) { + ok++; + if (devno) + printf("\n"); + printf("print_part of %x\n",devno); + print_part(stor_dev); + } + } + } + else { + devno=simple_strtoul(argv[2], NULL, 16); stor_dev=usb_stor_get_dev(devno); if (stor_dev->type!=DEV_TYPE_UNKNOWN) { ok++; - if (devno) - printf("\n"); printf("print_part of %x\n",devno); print_part(stor_dev); } diff --git a/common/env_common.c b/common/env_common.c index e6df9a5883db38e45f909ad9500a7f6253c4cd12..d51c2114de2e29b17944ed8911ae315c8f5d2281 100644 --- a/common/env_common.c +++ b/common/env_common.c @@ -50,7 +50,6 @@ extern void env_relocate_spec (void); extern uchar env_get_char_spec(int); static uchar env_get_char_init (int index); -uchar (*env_get_char)(int) = env_get_char_init; /************************************************************************ * Default settings to be used when no valid environment is found @@ -183,6 +182,19 @@ uchar env_get_char_memory (int index) } #endif +uchar env_get_char (int index) +{ + uchar c; + + /* if relocated to RAM */ + if (gd->flags & GD_FLG_RELOC) + c = env_get_char_memory(index); + else + c = env_get_char_init(index); + + return (c); +} + uchar *env_get_addr (int index) { if (gd->env_valid) { @@ -192,6 +204,23 @@ uchar *env_get_addr (int index) } } +void set_default_env(void) +{ + if (sizeof(default_environment) > ENV_SIZE) { + puts ("*** Error - default environment is too large\n\n"); + return; + } + + memset(env_ptr, 0, sizeof(env_t)); + memcpy(env_ptr->data, default_environment, + sizeof(default_environment)); +#ifdef CFG_REDUNDAND_ENVIRONMENT + env_ptr->flags = 0xFF; +#endif + env_crc_update (); + gd->env_valid = 1; +} + void env_relocate (void) { DEBUGF ("%s[%d] offset = 0x%lx\n", __FUNCTION__,__LINE__, @@ -216,11 +245,6 @@ void env_relocate (void) DEBUGF ("%s[%d] malloced ENV at %p\n", __FUNCTION__,__LINE__,env_ptr); #endif - /* - * After relocation to RAM, we can always use the "memory" functions - */ - env_get_char = env_get_char_memory; - if (gd->env_valid == 0) { #if defined(CONFIG_GTH) || defined(CFG_ENV_IS_NOWHERE) /* Environment not changable */ puts ("Using default environment\n\n"); @@ -228,22 +252,7 @@ void env_relocate (void) puts ("*** Warning - bad CRC, using default environment\n\n"); show_boot_progress (-60); #endif - - if (sizeof(default_environment) > ENV_SIZE) - { - puts ("*** Error - default environment is too large\n\n"); - return; - } - - memset (env_ptr, 0, sizeof(env_t)); - memcpy (env_ptr->data, - default_environment, - sizeof(default_environment)); -#ifdef CFG_REDUNDAND_ENVIRONMENT - env_ptr->flags = 0xFF; -#endif - env_crc_update (); - gd->env_valid = 1; + set_default_env(); } else { env_relocate_spec (); diff --git a/common/env_nand.c b/common/env_nand.c index a48e98e50911f8aa31fe7e922b9290da61e4ae44..104f0856af2a3af7254d06451c47bee4485e89df 100644 --- a/common/env_nand.c +++ b/common/env_nand.c @@ -95,8 +95,8 @@ uchar env_get_char_spec (int index) /* this is called before nand_init() * so we can't read Nand to validate env data. * Mark it OK for now. env_relocate() in env_common.c - * will call our relocate function which will does - * the real validation. + * will call our relocate function which does the real + * validation. * * When using a NAND boot image (like sequoia_nand), the environment * can be embedded or attached to the U-Boot image in NAND flash. This way @@ -230,6 +230,7 @@ int saveenv(void) { size_t total; int ret = 0; + nand_erase_options_t nand_erase_options; nand_erase_options.length = CFG_ENV_RANGE; nand_erase_options.quiet = 0; @@ -245,7 +246,7 @@ int saveenv(void) puts ("Writing to Nand... "); total = CFG_ENV_SIZE; - if (writeenv(CFG_ENV_OFFSET, env_ptr)) { + if (writeenv(CFG_ENV_OFFSET, (u_char *) env_ptr)) { puts("FAILED!\n"); return 1; } @@ -348,7 +349,7 @@ void env_relocate_spec (void) int ret; total = CFG_ENV_SIZE; - ret = readenv(CFG_ENV_OFFSET, env_ptr); + ret = readenv(CFG_ENV_OFFSET, (u_char *) env_ptr); if (ret || total != CFG_ENV_SIZE) return use_default(); @@ -362,19 +363,7 @@ void env_relocate_spec (void) static void use_default() { puts ("*** Warning - bad CRC or NAND, using default environment\n\n"); - - if (default_environment_size > CFG_ENV_SIZE){ - puts ("*** Error - default environment is too large\n\n"); - return; - } - - memset (env_ptr, 0, sizeof(env_t)); - memcpy (env_ptr->data, - default_environment, - default_environment_size); - env_ptr->crc = crc32(0, env_ptr->data, ENV_SIZE); - gd->env_valid = 1; - + set_default_env(); } #endif diff --git a/common/fdt_support.c b/common/fdt_support.c index e58b294ee58835d302e5decd8d319d9b4595ff27..382822820455b5333123b1dd1e931015f27dc0bd 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -63,7 +63,7 @@ int fdt_find_and_setprop(void *fdt, const char *node, const char *prop, } #ifdef CONFIG_OF_STDOUT_VIA_ALIAS -static int fdt_fixup_stdout(void *fdt, int choosenoff) +static int fdt_fixup_stdout(void *fdt, int chosenoff) { int err = 0; #ifdef CONFIG_CONS_INDEX @@ -82,7 +82,7 @@ static int fdt_fixup_stdout(void *fdt, int choosenoff) err = -FDT_ERR_NOSPACE; if (p) { memcpy(p, path, len); - err = fdt_setprop(fdt, choosenoff, + err = fdt_setprop(fdt, chosenoff, "linux,stdout-path", p, len); free(p); } diff --git a/common/main.c b/common/main.c index 046da6f23ca488d02f3fb900c48fc2b96caafb9e..79ad2912a751c6097e524dca9b7224990f30fb96 100644 --- a/common/main.c +++ b/common/main.c @@ -509,7 +509,7 @@ void reset_cmd_timeout(void) */ #define putnstr(str,n) do { \ - printf ("%.*s", n, str); \ + printf ("%.*s", (int)n, str); \ } while (0) #define CTL_CH(c) ((c) - 'a' + 1) diff --git a/config.mk b/config.mk index b08b7a7593657a2e7f9f9f316924117df815934e..1dac29be57ba3f79d3eb94c126139c37d7b6679e 100644 --- a/config.mk +++ b/config.mk @@ -172,6 +172,8 @@ else CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes endif +CFLAGS += $(call cc-option,-fno-stack-protector) + # avoid trigraph warnings while parsing pci.h (produced by NIOS gcc-2.9) # this option have to be placed behind -Wall -- that's why it is here ifeq ($(ARCH),nios) diff --git a/cpu/arm1136/mx31/serial.c b/cpu/arm1136/mx31/serial.c index 1cad8f9d8c57e42a788ac9e96742017bfdb23381..f498599419d8e5743d0cac394736e8121dd68b38 100644 --- a/cpu/arm1136/mx31/serial.c +++ b/cpu/arm1136/mx31/serial.c @@ -63,6 +63,7 @@ #define URXD_FRMERR (1<<12) #define URXD_BRK (1<<11) #define URXD_PRERR (1<<10) +#define URXD_RX_DATA (0xFF) #define UCR1_ADEN (1<<15) /* Auto dectect interrupt */ #define UCR1_ADBR (1<<14) /* Auto detect baud rate */ #define UCR1_TRDYEN (1<<13) /* Transmitter ready interrupt enable */ @@ -165,7 +166,7 @@ void serial_setbrg (void) int serial_getc (void) { while (__REG(UART_PHYS + UTS) & UTS_RXEMPTY); - return __REG(UART_PHYS + URXD); + return (__REG(UART_PHYS + URXD) & URXD_RX_DATA); /* mask out status from upper word */ } void serial_putc (const char c) diff --git a/cpu/arm920t/at91rm9200/lxt972.c b/cpu/arm920t/at91rm9200/lxt972.c index 4edcc9a1b9da8a398fdb914d1934522d128010a0..260d393cf0a3ae6134daec7fddd5dddfb7ec68a5 100644 --- a/cpu/arm920t/at91rm9200/lxt972.c +++ b/cpu/arm920t/at91rm9200/lxt972.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #ifdef CONFIG_DRIVER_ETHER @@ -51,8 +52,8 @@ unsigned int lxt972_IsPhyConnected (AT91PS_EMAC p_mac) unsigned short Id1, Id2; at91rm9200_EmacEnableMDIO (p_mac); - at91rm9200_EmacReadPhy (p_mac, PHY_COMMON_ID1, &Id1); - at91rm9200_EmacReadPhy (p_mac, PHY_COMMON_ID2, &Id2); + at91rm9200_EmacReadPhy(p_mac, PHY_PHYIDR1, &Id1); + at91rm9200_EmacReadPhy(p_mac, PHY_PHYIDR2, &Id2); at91rm9200_EmacDisableMDIO (p_mac); if ((Id1 == (0x0013)) && ((Id2 & 0xFFF0) == 0x78E0)) @@ -169,18 +170,18 @@ UCHAR lxt972_AutoNegotiate (AT91PS_EMAC p_mac, int *status) unsigned short value; /* Set lxt972 control register */ - if (!at91rm9200_EmacReadPhy (p_mac, PHY_COMMON_CTRL, &value)) + if (!at91rm9200_EmacReadPhy (p_mac, PHY_BMCR, &value)) return FALSE; /* Restart Auto_negotiation */ - value |= PHY_COMMON_CTRL_RES_AUTO; - if (!at91rm9200_EmacWritePhy (p_mac, PHY_COMMON_CTRL, &value)) + value |= PHY_BMCR_RST_NEG; + if (!at91rm9200_EmacWritePhy (p_mac, PHY_BMCR, &value)) return FALSE; /*check AutoNegotiate complete */ udelay (10000); - at91rm9200_EmacReadPhy (p_mac, PHY_COMMON_STAT, &value); - if (!(value & PHY_COMMON_STAT_AN_COMP)) + at91rm9200_EmacReadPhy(p_mac, PHY_BMSR, &value); + if (!(value & PHY_BMSR_AUTN_COMP)) return FALSE; return (lxt972_GetLinkSpeed (p_mac)); diff --git a/cpu/arm926ejs/davinci/lxt972.c b/cpu/arm926ejs/davinci/lxt972.c index 6eeb6e5ee9274821fc6a64ba8625c3bd2dbb337a..8130b48de023af27bdcacaa6ed3d0cf5fb5cbcea 100644 --- a/cpu/arm926ejs/davinci/lxt972.c +++ b/cpu/arm926ejs/davinci/lxt972.c @@ -27,6 +27,7 @@ #include #include +#include #include #include @@ -36,11 +37,11 @@ int lxt972_is_phy_connected(int phy_addr) { - u_int16_t id1, id2; + u_int16_t id1, id2; - if (!dm644x_eth_phy_read(phy_addr, PHY_COMMON_ID1, &id1)) + if (!dm644x_eth_phy_read(phy_addr, PHY_PHYIDR1, &id1)) return(0); - if (!dm644x_eth_phy_read(phy_addr, PHY_COMMON_ID2, &id2)) + if (!dm644x_eth_phy_read(phy_addr, PHY_PHYIDR2, &id2)) return(0); if ((id1 == (0x0013)) && ((id2 & 0xfff0) == 0x78e0)) @@ -51,8 +52,8 @@ int lxt972_is_phy_connected(int phy_addr) int lxt972_get_link_speed(int phy_addr) { - u_int16_t stat1, tmp; - volatile emac_regs* emac = (emac_regs *)EMAC_BASE_ADDR; + u_int16_t stat1, tmp; + volatile emac_regs *emac = (emac_regs *)EMAC_BASE_ADDR; if (!dm644x_eth_phy_read(phy_addr, PHY_LXT971_STAT2, &stat1)) return(0); @@ -70,37 +71,23 @@ int lxt972_get_link_speed(int phy_addr) if (!dm644x_eth_phy_read(phy_addr, PHY_LXT971_DIG_CFG, &tmp)) return(0); - /* Speed doesn't matter, there is no setting for it in EMAC... */ - if (stat1 & PHY_LXT971_STAT2_100BTX) { - if (stat1 & PHY_LXT971_STAT2_DUPLEX_MODE) { - /* set DM644x EMAC for Full Duplex */ - emac->MACCONTROL = EMAC_MACCONTROL_MIIEN_ENABLE | EMAC_MACCONTROL_FULLDUPLEX_ENABLE; - } else { - /*set DM644x EMAC for Half Duplex */ - emac->MACCONTROL = EMAC_MACCONTROL_MIIEN_ENABLE; - } - - return(1); + if (stat1 & PHY_LXT971_STAT2_DUPLEX_MODE) { + /* set DM644x EMAC for Full Duplex */ + emac->MACCONTROL = EMAC_MACCONTROL_MIIEN_ENABLE | + EMAC_MACCONTROL_FULLDUPLEX_ENABLE; } else { - if (stat1 & PHY_LXT971_STAT2_DUPLEX_MODE) { - /* set DM644x EMAC for Full Duplex */ - emac->MACCONTROL = EMAC_MACCONTROL_MIIEN_ENABLE | EMAC_MACCONTROL_FULLDUPLEX_ENABLE; - } else { - /*set DM644x EMAC for Half Duplex */ - emac->MACCONTROL = EMAC_MACCONTROL_MIIEN_ENABLE; - } - - return(1); + /*set DM644x EMAC for Half Duplex */ + emac->MACCONTROL = EMAC_MACCONTROL_MIIEN_ENABLE; } - return(0); + return(1); } int lxt972_init_phy(int phy_addr) { - int ret = 1; + int ret = 1; if (!lxt972_get_link_speed(phy_addr)) { /* Try another time */ @@ -116,22 +103,21 @@ int lxt972_init_phy(int phy_addr) int lxt972_auto_negotiate(int phy_addr) { - u_int16_t tmp; - + u_int16_t tmp; - if (!dm644x_eth_phy_read(phy_addr, PHY_COMMON_CTRL, &tmp)) + if (!dm644x_eth_phy_read(phy_addr, PHY_BMCR, &tmp)) return(0); /* Restart Auto_negotiation */ - tmp |= PHY_COMMON_CTRL_RES_AUTO; - dm644x_eth_phy_write(phy_addr, PHY_COMMON_CTRL, tmp); + tmp |= PHY_BMCR_RST_NEG; + dm644x_eth_phy_write(phy_addr, PHY_BMCR, tmp); /*check AutoNegotiate complete */ udelay (10000); - if (!dm644x_eth_phy_read(phy_addr, PHY_COMMON_STAT, &tmp)) + if (!dm644x_eth_phy_read(phy_addr, PHY_BMSR, &tmp)) return(0); - if (!(tmp & PHY_COMMON_STAT_AN_COMP)) + if (!(tmp & PHY_BMSR_AUTN_COMP)) return(0); return (lxt972_get_link_speed(phy_addr)); diff --git a/cpu/arm926ejs/davinci/nand.c b/cpu/arm926ejs/davinci/nand.c index ffc770fd1b9f7eb160f58cc5188587ead0c0a71a..36468e6c3a00920d95a9c0f08c2e75e7bf160d87 100644 --- a/cpu/arm926ejs/davinci/nand.c +++ b/cpu/arm926ejs/davinci/nand.c @@ -240,7 +240,8 @@ static int nand_davinci_compare_ecc(u_int8_t *ecc_nand, u_int8_t *ecc_calc, u_in return 0; case 1: /* Uncorrectable error */ - DEBUG (MTD_DEBUG_LEVEL0, "ECC UNCORRECTED_ERROR 1\n"); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "ECC UNCORRECTED_ERROR 1\n"); return(-1); case 12: /* Correctable error */ @@ -256,7 +257,9 @@ static int nand_davinci_compare_ecc(u_int8_t *ecc_nand, u_int8_t *ecc_calc, u_in find_bit = (ecc_bit[5] << 2) + (ecc_bit[3] << 1) + ecc_bit[1]; - DEBUG (MTD_DEBUG_LEVEL0, "Correcting single bit ECC error at offset: %d, bit: %d\n", find_byte, find_bit); + MTDDEBUG (MTD_DEBUG_LEVEL0, "Correcting single bit ECC " + "error at offset: %d, bit: %d\n", + find_byte, find_bit); page_data[find_byte] ^= (1 << find_bit); @@ -266,7 +269,8 @@ static int nand_davinci_compare_ecc(u_int8_t *ecc_nand, u_int8_t *ecc_calc, u_in if (ecc_calc[0] == 0 && ecc_calc[1] == 0 && ecc_calc[2] == 0) return(0); } - DEBUG (MTD_DEBUG_LEVEL0, "UNCORRECTED_ERROR default\n"); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "UNCORRECTED_ERROR default\n"); return(-1); } } diff --git a/cpu/at32ap/Makefile b/cpu/at32ap/Makefile index d16c58b77388f368a4d680f2480fa8d30e3f1f33..33dc427681516961e9a71f2ed58127b416fc11ab 100644 --- a/cpu/at32ap/Makefile +++ b/cpu/at32ap/Makefile @@ -35,7 +35,6 @@ COBJS-y += exception.o COBJS-y += cache.o COBJS-y += interrupts.o COBJS-y += pio.o -COBJS-$(CONFIG_MMC) += atmel_mci.o SRCS := $(START-y:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) diff --git a/cpu/at32ap/at32ap700x/gpio.c b/cpu/at32ap/at32ap700x/gpio.c index 3da35d4fe231c4c882c0551113a9b2e8dbcd3d0d..56ba2f90c69a5c9ede9fc0c013f144ad0e6a3cee 100644 --- a/cpu/at32ap/at32ap700x/gpio.c +++ b/cpu/at32ap/at32ap700x/gpio.c @@ -149,24 +149,27 @@ void gpio_enable_mmci(void) #ifdef AT32AP700x_CHIP_HAS_SPI void gpio_enable_spi0(unsigned long cs_mask) { - u32 pa_mask = 0; - gpio_select_periph_A(GPIO_PIN_PA0, 0); /* MISO */ gpio_select_periph_A(GPIO_PIN_PA1, 0); /* MOSI */ gpio_select_periph_A(GPIO_PIN_PA2, 0); /* SCK */ - if (cs_mask & (1 << 0)) - pa_mask |= 1 << 3; /* NPCS0 */ - if (cs_mask & (1 << 1)) - pa_mask |= 1 << 4; /* NPCS1 */ - if (cs_mask & (1 << 2)) - pa_mask |= 1 << 5; /* NPCS2 */ - if (cs_mask & (1 << 3)) - pa_mask |= 1 << 20; /* NPCS3 */ - - __raw_writel(pa_mask, PIOA_BASE + 0x00); - __raw_writel(pa_mask, PIOA_BASE + 0x30); - __raw_writel(pa_mask, PIOA_BASE + 0x10); + /* Set up NPCSx as GPIO outputs, initially high */ + if (cs_mask & (1 << 0)) { + gpio_set_value(GPIO_PIN_PA3, 1); + gpio_select_pio(GPIO_PIN_PA3, GPIOF_OUTPUT); + } + if (cs_mask & (1 << 1)) { + gpio_set_value(GPIO_PIN_PA4, 1); + gpio_select_pio(GPIO_PIN_PA4, GPIOF_OUTPUT); + } + if (cs_mask & (1 << 2)) { + gpio_set_value(GPIO_PIN_PA5, 1); + gpio_select_pio(GPIO_PIN_PA5, GPIOF_OUTPUT); + } + if (cs_mask & (1 << 3)) { + gpio_set_value(GPIO_PIN_PA20, 1); + gpio_select_pio(GPIO_PIN_PA20, GPIOF_OUTPUT); + } } void gpio_enable_spi1(unsigned long cs_mask) @@ -175,13 +178,22 @@ void gpio_enable_spi1(unsigned long cs_mask) gpio_select_periph_B(GPIO_PIN_PB1, 0); /* MOSI */ gpio_select_periph_B(GPIO_PIN_PB5, 0); /* SCK */ - if (cs_mask & (1 << 0)) - gpio_select_periph_B(GPIO_PIN_PB2, 0); /* NPCS0 */ - if (cs_mask & (1 << 1)) - gpio_select_periph_B(GPIO_PIN_PB3, 0); /* NPCS1 */ - if (cs_mask & (1 << 2)) - gpio_select_periph_B(GPIO_PIN_PB4, 0); /* NPCS2 */ - if (cs_mask & (1 << 3)) - gpio_select_periph_A(GPIO_PIN_PA27, 0); /* NPCS3 */ + /* Set up NPCSx as GPIO outputs, initially high */ + if (cs_mask & (1 << 0)) { + gpio_set_value(GPIO_PIN_PB2, 1); + gpio_select_pio(GPIO_PIN_PB2, GPIOF_OUTPUT); + } + if (cs_mask & (1 << 1)) { + gpio_set_value(GPIO_PIN_PB3, 1); + gpio_select_pio(GPIO_PIN_PB3, GPIOF_OUTPUT); + } + if (cs_mask & (1 << 2)) { + gpio_set_value(GPIO_PIN_PB4, 1); + gpio_select_pio(GPIO_PIN_PB4, GPIOF_OUTPUT); + } + if (cs_mask & (1 << 3)) { + gpio_set_value(GPIO_PIN_PA27, 1); + gpio_select_pio(GPIO_PIN_PA27, GPIOF_OUTPUT); + } } #endif diff --git a/cpu/at32ap/pio.c b/cpu/at32ap/pio.c index 9ba0b8ea8b26f189d1c39042908a7939dc570905..f64004b65913a2f299ca218257b109223ef446d2 100644 --- a/cpu/at32ap/pio.c +++ b/cpu/at32ap/pio.c @@ -58,3 +58,59 @@ void gpio_select_periph_B(unsigned int pin, int use_pullup) else pio2_writel(base, PUDR, mask); } + +void gpio_select_pio(unsigned int pin, unsigned long gpiof_flags) +{ + void *base = gpio_pin_to_addr(pin); + uint32_t mask = 1 << (pin & 0x1f); + + if (!base) + panic("Invalid GPIO pin %u\n", pin); + + if (gpiof_flags & GPIOF_OUTPUT) { + if (gpiof_flags & GPIOF_MULTIDRV) + pio2_writel(base, MDER, mask); + else + pio2_writel(base, MDDR, mask); + pio2_writel(base, PUDR, mask); + pio2_writel(base, OER, mask); + } else { + if (gpiof_flags & GPIOF_PULLUP) + pio2_writel(base, PUER, mask); + else + pio2_writel(base, PUDR, mask); + if (gpiof_flags & GPIOF_DEGLITCH) + pio2_writel(base, IFER, mask); + else + pio2_writel(base, IFDR, mask); + pio2_writel(base, ODR, mask); + } + + pio2_writel(base, PER, mask); +} + +void gpio_set_value(unsigned int pin, int value) +{ + void *base = gpio_pin_to_addr(pin); + uint32_t mask = 1 << (pin & 0x1f); + + if (!base) + panic("Invalid GPIO pin %u\n", pin); + + if (value) + pio2_writel(base, SODR, mask); + else + pio2_writel(base, CODR, mask); +} + +int gpio_get_value(unsigned int pin) +{ + void *base = gpio_pin_to_addr(pin); + int value; + + if (!base) + panic("Invalid GPIO pin %u\n", pin); + + value = pio2_readl(base, PDSR); + return (value >> (pin & 0x1f)) & 1; +} diff --git a/cpu/mpc8260/cpu.c b/cpu/mpc8260/cpu.c index 414759e74c6749a1432a430fdb151bd5fbd3e333..4d5d141ea2667820a31e58ddbf107c82d17fd523 100644 --- a/cpu/mpc8260/cpu.c +++ b/cpu/mpc8260/cpu.c @@ -305,6 +305,11 @@ void ft_cpu_setup (void *blob, bd_t *bd) { char * cpu_path = "/cpus/" OF_CPU; +#if defined(CONFIG_HAS_ETH0) || defined(CONFIG_HAS_ETH1) ||\ + defined(CONFIG_HAS_ETH2) || defined(CONFIG_HAS_ETH3) + fdt_fixup_ethernet(blob, bd); +#endif + do_fixup_by_path_u32(blob, cpu_path, "bus-frequency", bd->bi_busfreq, 1); do_fixup_by_path_u32(blob, cpu_path, "timebase-frequency", OF_TBCLK, 1); do_fixup_by_path_u32(blob, cpu_path, "clock-frequency", bd->bi_intfreq, 1); diff --git a/cpu/mpc8260/pci.c b/cpu/mpc8260/pci.c index 75c6ab298566a7eef530940300081bcc9d963bca..940f5c0a100f19ca12a2d7b22a72986ba7542046 100644 --- a/cpu/mpc8260/pci.c +++ b/cpu/mpc8260/pci.c @@ -33,6 +33,10 @@ #include #include #include +#ifdef CONFIG_OF_LIBFDT +#include +#include +#endif #if defined CONFIG_MPC8266ADS || defined CONFIG_MPC8272 || defined CONFIG_PM826 DECLARE_GLOBAL_DATA_PTR; @@ -449,4 +453,12 @@ void pci_mpc8250_init (struct pci_controller *hose) immap->im_pci.pci_emr |= cpu_to_le32 (PCI_ERROR_PCI_NO_RSP); } +#if defined(CONFIG_OF_LIBFDT) +void ft_pci_setup(void *blob, bd_t *bd) +{ + do_fixup_by_prop_u32(blob, "device_type", "pci", 4, + "clock-frequency", bd->pci_clk, 1); +} +#endif + #endif /* CONFIG_PCI */ diff --git a/cpu/mpc83xx/cpu.c b/cpu/mpc83xx/cpu.c index 36de78d270877ebaa8727c5db81878d2e135d1f2..52e4476d850d8c5bf99139e90e21c7ebf80e5688 100644 --- a/cpu/mpc83xx/cpu.c +++ b/cpu/mpc83xx/cpu.c @@ -44,7 +44,6 @@ int checkcpu(void) char buf[32]; int i; -#define CPU_TYPE_ENTRY(x) {#x, SPR_##x} const struct cpu_type { char name[15]; u32 partid; @@ -358,3 +357,23 @@ int dma_xfer(void *dest, u32 count, void *src) return ((int)dma_check()); } #endif /*CONFIG_DDR_ECC*/ + +#ifdef CONFIG_TSEC_ENET +/* Default initializations for TSEC controllers. To override, + * create a board-specific function called: + * int board_eth_init(bd_t *bis) + */ + +extern int tsec_initialize(bd_t * bis, int index, char *devname); + +int cpu_eth_init(bd_t *bis) +{ +#if defined(CONFIG_TSEC1) + tsec_initialize(bis, 0, CONFIG_TSEC1_NAME); +#endif +#if defined(CONFIG_TSEC2) + tsec_initialize(bis, 1, CONFIG_TSEC2_NAME); +#endif + return 0; +} +#endif diff --git a/cpu/mpc83xx/cpu_init.c b/cpu/mpc83xx/cpu_init.c index fb184d816b62eb74962babb281b2028621ea2095..67c9e570c31d46710c614f3d9ca594d8453d9d9a 100644 --- a/cpu/mpc83xx/cpu_init.c +++ b/cpu/mpc83xx/cpu_init.c @@ -181,8 +181,13 @@ void cpu_init_f (volatile immap_t * im) /* System General Purpose Register */ #ifdef CFG_SICRH +#if defined(CONFIG_MPC834X) || defined(CONFIG_MPC8313) + /* regarding to MPC34x manual rev.1 bits 28..29 must be preserved */ + im->sysconf.sicrh = (im->sysconf.sicrh & 0x0000000C) | CFG_SICRH; +#else im->sysconf.sicrh = CFG_SICRH; #endif +#endif #ifdef CFG_SICRL im->sysconf.sicrl = CFG_SICRL; #endif diff --git a/cpu/mpc85xx/cpu.c b/cpu/mpc85xx/cpu.c index 2b7e753ece156e8fdfa83fb2e1d6e55b10d13289..0d50549f2d8cb49905eb2d999a49ce3c658b8b4b 100644 --- a/cpu/mpc85xx/cpu.c +++ b/cpu/mpc85xx/cpu.c @@ -59,7 +59,7 @@ struct cpu_type cpu_type_list [] = { CPU_TYPE_ENTRY(8572, 8572_E), }; -struct cpu_type *identify_cpu(uint ver) +struct cpu_type *identify_cpu(u32 ver) { int i; for (i = 0; i < ARRAY_SIZE(cpu_type_list); i++) @@ -323,7 +323,7 @@ void upmconfig (uint upm, uint * table, uint size) /* Find the address for the dummy write transaction */ for (brp = &lbc->br0, orp = &lbc->or0, i = 0; i < 8; i++, brp += 2, orp += 2) { - + /* Look for a valid BR with selected UPM */ if ((in_be32(brp) & (BR_V | upmmask)) == (BR_V | upmmask)) { dummy = (volatile u8*)(in_be32(brp) >> BR_BA_SHIFT); @@ -353,3 +353,33 @@ void upmconfig (uint upm, uint * table, uint size) } out_be32(mxmr, loopval); /* OP_NORMAL */ } + +#if defined(CONFIG_TSEC_ENET) || defined(CONFIGMPC85XX_FEC) +/* Default initializations for TSEC controllers. To override, + * create a board-specific function called: + * int board_eth_init(bd_t *bis) + */ + +extern int tsec_initialize(bd_t * bis, int index, char *devname); + +int cpu_eth_init(bd_t *bis) +{ +#if defined(CONFIG_TSEC1) + tsec_initialize(bis, 0, CONFIG_TSEC1_NAME); +#endif +#if defined(CONFIG_TSEC2) + tsec_initialize(bis, 1, CONFIG_TSEC2_NAME); +#endif +#if defined(CONFIG_MPC85XX_FEC) + tsec_initialize(bis, 2, CONFIG_MPC85XX_FEC_NAME); +#else +#if defined(CONFIG_TSEC3) + tsec_initialize(bis, 2, CONFIG_TSEC3_NAME); +#endif +#if defined(CONFIG_TSEC4) + tsec_initialize(bis, 3, CONFIG_TSEC4_NAME); +#endif +#endif + return 0; +} +#endif diff --git a/cpu/mpc85xx/traps.c b/cpu/mpc85xx/traps.c index fd36658cb077a2bd8c57a719c089d02515bb0184..0eab69448c1b67dc6ee6117fabcccfe55e93a690 100644 --- a/cpu/mpc85xx/traps.c +++ b/cpu/mpc85xx/traps.c @@ -216,10 +216,10 @@ MachineCheckException(struct pt_regs *regs) if (machinecheck_count > 1) { regs->nip += 4; /* skip offending instruction */ - printf("Skipping current instr, Returning to 0x%08x\n", + printf("Skipping current instr, Returning to 0x%08lx\n", regs->nip); } else { - printf("Returning back to 0x%08x\n",regs->nip); + printf("Returning back to 0x%08lx\n",regs->nip); } } @@ -302,7 +302,7 @@ ExtIntException(struct pt_regs *regs) printf("External Interrupt Exception at PC: %lx, SR: %lx, vector=%lx", regs->nip, regs->msr, regs->trap); vect = pic->iack0; - printf(" irq IACK0@%05x=%d\n",&pic->iack0,vect); + printf(" irq IACK0@%05x=%d\n",(int)&pic->iack0,vect); show_regs(regs); print_backtrace((unsigned long *)regs->gpr[1]); machinecheck_count++; @@ -310,7 +310,7 @@ ExtIntException(struct pt_regs *regs) printf("Returning back to 0x%08x\n",regs->nip); #else regs->nip += 4; /* skip offending instruction */ - printf("Skipping current instr, Returning to 0x%08x\n",regs->nip); + printf("Skipping current instr, Returning to 0x%08lx\n",regs->nip); #endif } diff --git a/cpu/mpc86xx/cpu.c b/cpu/mpc86xx/cpu.c index 4a9905d6851aa728c09f23f6ab48a9456bf0ce4f..ecea5b0643896211960c4821ab9e11acae94f5c5 100644 --- a/cpu/mpc86xx/cpu.c +++ b/cpu/mpc86xx/cpu.c @@ -304,3 +304,29 @@ void mpc86xx_reginfo(void) printf("\tBR7\t0x%08X\tOR7\t0x%08X \n", in_be32(&lbc->br7), in_be32(&lbc->or7)); } + +#ifdef CONFIG_TSEC_ENET +/* Default initializations for TSEC controllers. To override, + * create a board-specific function called: + * int board_eth_init(bd_t *bis) + */ + +extern int tsec_initialize(bd_t * bis, int index, char *devname); + +int cpu_eth_init(bd_t *bis) +{ +#if defined(CONFIG_TSEC1) + tsec_initialize(bis, 0, CONFIG_TSEC1_NAME); +#endif +#if defined(CONFIG_TSEC2) + tsec_initialize(bis, 1, CONFIG_TSEC2_NAME); +#endif +#if defined(CONFIG_TSEC3) + tsec_initialize(bis, 2, CONFIG_TSEC3_NAME); +#endif +#if defined(CONFIG_TSEC4) + tsec_initialize(bis, 3, CONFIG_TSEC4_NAME); +#endif + return 0; +} +#endif /* CONFIG_TSEC_ENET */ diff --git a/cpu/ppc4xx/44x_spd_ddr2.c b/cpu/ppc4xx/44x_spd_ddr2.c index c28fc463b5a025ccbff89ef72a5e6531b26afb7e..a27e276f25ca75b5c53f300c00f87c9e80a5df91 100644 --- a/cpu/ppc4xx/44x_spd_ddr2.c +++ b/cpu/ppc4xx/44x_spd_ddr2.c @@ -137,6 +137,20 @@ #define MY_TLB_WORD2_I_ENABLE TLB_WORD2_I_ENABLE /* disable caching on SDRAM */ #endif +/* + * Newer PPC's like 440SPe, 460EX/GT can be equipped with more than 2GB of SDRAM. + * To support such configurations, we "only" map the first 2GB via the TLB's. We + * need some free virtual address space for the remaining peripherals like, SoC + * devices, FLASH etc. + * + * Note that ECC is currently not supported on configurations with more than 2GB + * SDRAM. This is because we only map the first 2GB on such systems, and therefore + * the ECC parity byte of the remaining area can't be written. + */ +#ifndef CONFIG_MAX_MEM_MAPPED +#define CONFIG_MAX_MEM_MAPPED ((phys_size_t)2 << 30) +#endif + /* * Board-specific Platform code can reimplement spd_ddr_init_hang () if needed */ @@ -181,7 +195,7 @@ typedef enum ddr_cas_id { /*-----------------------------------------------------------------------------+ * Prototypes *-----------------------------------------------------------------------------*/ -static unsigned long sdram_memsize(void); +static phys_size_t sdram_memsize(void); static void get_spd_info(unsigned long *dimm_populated, unsigned char *iic0_dimm_addr, unsigned long num_dimm_banks); @@ -306,9 +320,9 @@ static unsigned char spd_read(uchar chip, uint addr) /*-----------------------------------------------------------------------------+ * sdram_memsize *-----------------------------------------------------------------------------*/ -static unsigned long sdram_memsize(void) +static phys_size_t sdram_memsize(void) { - unsigned long mem_size; + phys_size_t mem_size; unsigned long mcopt2; unsigned long mcstat; unsigned long mb0cf; @@ -364,6 +378,8 @@ static unsigned long sdram_memsize(void) mem_size+=4096; break; default: + printf("WARNING: Unsupported bank size (SDSZ=0x%lx)!\n" + , sdsz); mem_size=0; break; } @@ -371,8 +387,7 @@ static unsigned long sdram_memsize(void) } } - mem_size *= 1024 * 1024; - return(mem_size); + return mem_size << 20; } /*-----------------------------------------------------------------------------+ @@ -400,7 +415,7 @@ phys_size_t initdram(int board_type) unsigned long val; ddr_cas_id_t selected_cas = DDR_CAS_5; /* preset to silence compiler */ int write_recovery; - unsigned long dram_size = 0; + phys_size_t dram_size = 0; num_dimm_banks = sizeof(iic0_dimm_addr); @@ -558,6 +573,12 @@ phys_size_t initdram(int board_type) /* get installed memory size */ dram_size = sdram_memsize(); + /* + * Limit size to 2GB + */ + if (dram_size > CONFIG_MAX_MEM_MAPPED) + dram_size = CONFIG_MAX_MEM_MAPPED; + /* and program tlb entries for this size (dynamic) */ /* @@ -595,7 +616,7 @@ phys_size_t initdram(int board_type) */ set_mcsr(get_mcsr()); - return dram_size; + return sdram_memsize(); } static void get_spd_info(unsigned long *dimm_populated, @@ -839,8 +860,8 @@ static void check_rank_number(unsigned long *dimm_populated, if (dimm_rank > MAXRANKS) { - printf("ERROR: DRAM DIMM detected with %d ranks in " - "slot %d is not supported.\n", dimm_rank, dimm_num); + printf("ERROR: DRAM DIMM detected with %lu ranks in " + "slot %lu is not supported.\n", dimm_rank, dimm_num); printf("Only %d ranks are supported for all DIMM.\n", MAXRANKS); printf("Replace the DIMM module with a supported DIMM.\n\n"); spd_ddr_init_hang (); @@ -1041,7 +1062,7 @@ static void program_copt1(unsigned long *dimm_populated, dimm_32bit = TRUE; break; default: - printf("WARNING: Detected a DIMM with a data width of %d bits.\n", + printf("WARNING: Detected a DIMM with a data width of %lu bits.\n", data_width); printf("Only DIMMs with 32 or 64 bit DDR-SDRAM widths are supported.\n"); break; @@ -1594,7 +1615,7 @@ static void program_mode(unsigned long *dimm_populated, printf("Make sure the PLB speed is within the supported range of the DIMMs.\n"); printf("cas3=%d cas4=%d cas5=%d\n", cas_3_0_available, cas_4_0_available, cas_5_0_available); - printf("sdram_freq=%d cycle3=%d cycle4=%d cycle5=%d\n\n", + printf("sdram_freq=%lu cycle3=%lu cycle4=%lu cycle5=%lu\n\n", sdram_freq, cycle_3_0_clk, cycle_4_0_clk, cycle_5_0_clk); spd_ddr_init_hang (); } @@ -2133,15 +2154,15 @@ static void program_memory_queue(unsigned long *dimm_populated, unsigned long num_dimm_banks) { unsigned long dimm_num; - unsigned long rank_base_addr; + phys_size_t rank_base_addr; unsigned long rank_reg; - unsigned long rank_size_bytes; + phys_size_t rank_size_bytes; unsigned long rank_size_id; unsigned long num_ranks; unsigned long baseadd_size; unsigned long i; unsigned long bank_0_populated = 0; - unsigned long total_size = 0; + phys_size_t total_size = 0; /*------------------------------------------------------------------ * Reset the rank_base_address. @@ -2289,6 +2310,11 @@ static void program_ecc(unsigned long *dimm_populated, if (ecc == 0) return; + if (sdram_memsize() > CONFIG_MAX_MEM_MAPPED) { + printf("\nWarning: Can't enable ECC on systems with more than 2GB of SDRAM!\n"); + return; + } + mfsdram(SDRAM_MCOPT1, mcopt1); mfsdram(SDRAM_MCOPT2, mcopt2); @@ -2441,6 +2467,7 @@ static int short_mem_test(void) u32 bxcf; int i; int j; + phys_size_t base_addr; u32 test[NUMMEMTESTS][NUMMEMWORDS] = { {0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF}, @@ -2467,10 +2494,17 @@ static int short_mem_test(void) if ((bxcf & SDRAM_BXCF_M_BE_MASK) == SDRAM_BXCF_M_BE_ENABLE) { /* Bank is enabled */ + /* + * Only run test on accessable memory (below 2GB) + */ + base_addr = SDRAM_RXBAS_SDBA_DECODE(mfdcr_any(SDRAM_R0BAS+bxcr_num)); + if (base_addr >= CONFIG_MAX_MEM_MAPPED) + continue; + /*------------------------------------------------------------------ * Run the short memory test. *-----------------------------------------------------------------*/ - membase = (u32 *)(SDRAM_RXBAS_SDBA_DECODE(mfdcr_any(SDRAM_R0BAS+bxcr_num))); + membase = (u32 *)(u32)base_addr; for (i = 0; i < NUMMEMTESTS; i++) { for (j = 0; j < NUMMEMWORDS; j++) { diff --git a/cpu/ppc4xx/4xx_enet.c b/cpu/ppc4xx/4xx_enet.c index c40e0ca48098bfbf4d22af3214c67efba47b6fcd..4e863dc91187433155c19ff1624e496b00812cf6 100644 --- a/cpu/ppc4xx/4xx_enet.c +++ b/cpu/ppc4xx/4xx_enet.c @@ -1076,7 +1076,7 @@ static int ppc_4xx_eth_init (struct eth_device *dev, bd_t * bis) bd_cached = (u32)malloc_aligned(MAL_ALLOC_SIZE, 4096); if (!bd_cached) { - printf("%s: Error allocating MAL descriptor buffers!\n"); + printf("%s: Error allocating MAL descriptor buffers!\n", __func__); return -1; } diff --git a/cpu/ppc4xx/4xx_pcie.c b/cpu/ppc4xx/4xx_pcie.c index 503facca30631e9b427219647af722bd0c3e1d80..d50a538e38ab1a055c2182f170d5e449ebf8b542 100644 --- a/cpu/ppc4xx/4xx_pcie.c +++ b/cpu/ppc4xx/4xx_pcie.c @@ -615,22 +615,20 @@ int __ppc4xx_init_pcie_port_hw(int port, int rootport) #if defined(CONFIG_460EX) || defined(CONFIG_460GT) int __ppc4xx_init_pcie_port_hw(int port, int rootport) { - u32 val = 1 << 24; + u32 val; u32 utlset1; - if (rootport) { + if (rootport) val = PTYPE_ROOT_PORT << 20; - utlset1 = 0x21222222; - } else { + else val = PTYPE_LEGACY_ENDPOINT << 20; - utlset1 = 0x20222222; - } if (port == 0) { val |= LNKW_X1 << 12; + utlset1 = 0x20000000; } else { val |= LNKW_X4 << 12; - utlset1 |= 0x00101101; + utlset1 = 0x20101101; } SDR_WRITE(SDRN_PESDR_DLPSET(port), val); diff --git a/cpu/ppc4xx/cpu_init.c b/cpu/ppc4xx/cpu_init.c index 1e9423a89bf18ea06de44b62259528b4d9e03d9c..ac6427905161809ca8b733cbfc13cccc0c3d5695 100644 --- a/cpu/ppc4xx/cpu_init.c +++ b/cpu/ppc4xx/cpu_init.c @@ -138,8 +138,8 @@ void reconfigure_pll(u32 new_cpu_freq) void cpu_init_f (void) { -#if defined(CONFIG_WATCHDOG) - unsigned long val; +#if defined(CONFIG_WATCHDOG) || defined(CONFIG_460EX) + u32 val; #endif reconfigure_pll(CFG_PLL_RECONFIG); @@ -272,6 +272,22 @@ cpu_init_f (void) reset_4xx_watchdog(); #endif /* CONFIG_WATCHDOG */ + +#if defined(CONFIG_460EX) + /* + * Set SDR0_AHB_CFG[A2P_INCR4] (bit 24) and + * clear SDR0_AHB_CFG[A2P_PROT2] (bit 25) for a new 460EX errata + * regarding concurrent use of AHB USB OTG, USB 2.0 host and SATA + */ + mfsdr(SDR0_AHB_CFG, val); + val |= 0x80; + val &= ~0x40; + mtsdr(SDR0_AHB_CFG, val); + mfsdr(SDR0_USB2HOST_CFG, val); + val &= ~0xf00; + val |= 0x400; + mtsdr(SDR0_USB2HOST_CFG, val); +#endif /* CONFIG_460EX */ } /* diff --git a/cpu/ppc4xx/denali_spd_ddr2.c b/cpu/ppc4xx/denali_spd_ddr2.c index 3bd637567c3f0b728c38866c317e62fa88f3aec1..670fc5c6ed376365e9269182b3121d2de0b1077e 100644 --- a/cpu/ppc4xx/denali_spd_ddr2.c +++ b/cpu/ppc4xx/denali_spd_ddr2.c @@ -339,7 +339,7 @@ static void get_spd_info(unsigned long dimm_ranks[], "\n", dimm_num, ranks_on_dimm); if (ranks_on_dimm > max_ranks_per_dimm) { printf("WARNING: DRAM DIMM in slot %lu has %lu " - "ranks.\n"); + "ranks.\n", dimm_num, ranks_on_dimm); if (1 == max_ranks_per_dimm) { printf("Only one rank will be used.\n"); } else { @@ -668,8 +668,8 @@ static void program_ddr0_03(unsigned long dimm_ranks[], "and 5.0 are supported.\n"); printf("Make sure the PLB speed is within the supported range " "of the DIMMs.\n"); - printf("sdram_freq=%d cycle2=%d cycle3=%d cycle4=%d " - "cycle5=%d\n\n", sdram_freq, cycle_2_0_clk, + printf("sdram_freq=%ld cycle2=%ld cycle3=%ld cycle4=%ld " + "cycle5=%ld\n\n", sdram_freq, cycle_2_0_clk, cycle_3_0_clk, cycle_4_0_clk, cycle_5_0_clk); spd_ddr_init_hang(); } @@ -1248,7 +1248,7 @@ void board_add_ram_info(int use_default) if (!is_ecc_enabled()) { printf(" not"); } - printf(" enabled, %d MHz", (2 * get_bus_freq(0)) / 1000000); + printf(" enabled, %ld MHz", (2 * get_bus_freq(0)) / 1000000); mfsdram(DDR0_03, val); printf(", CL%d)", DDR0_03_CASLAT_LIN_DECODE(val) >> 1); diff --git a/cpu/ppc4xx/gpio.c b/cpu/ppc4xx/gpio.c index 37d3fa8ef74652e7477be0600cde41e4d12a6257..df99f5314b5772d39e1fe71747ac712a15fb3053 100644 --- a/cpu/ppc4xx/gpio.c +++ b/cpu/ppc4xx/gpio.c @@ -1,5 +1,5 @@ /* - * (C) Copyright 2007 + * (C) Copyright 2007-2008 * Stefan Roese, DENX Software Engineering, sr@denx.de. * * See file CREDITS for list of people who contributed to this @@ -52,7 +52,7 @@ void gpio_config(int pin, int in_out, int gpio_alt, int out_val) } mask = 0x80000000 >> pin; - mask2 = 0xc0000000 >> (pin2 << 1); + mask2 = 0xc0000000 >> pin2; /* first set TCR to 0 */ out_be32((void *)GPIO0_TCR + offs, in_be32((void *)GPIO0_TCR + offs) & ~mask); diff --git a/cpu/ppc4xx/speed.c b/cpu/ppc4xx/speed.c index ef47ffc952198c35b287253b441c2445d2b3a815..34bd7214e727e89db6ed3d15bcf1f19e8ec09598 100644 --- a/cpu/ppc4xx/speed.c +++ b/cpu/ppc4xx/speed.c @@ -754,7 +754,7 @@ ulong get_OPB_freq (void) return sys_info.freqOPB; } -#elif defined(CONFIG_XILINX_ML300) +#elif defined(CONFIG_XILINX_405) extern void get_sys_info (sys_info_t * sysInfo); extern ulong get_PCI_freq (void); diff --git a/cpu/ppc4xx/tlb.c b/cpu/ppc4xx/tlb.c index f44822dbab0dcfddbf4b4ce5ac34e65fa47b8258..24a9a9cc283f49000716b2513a3589bf5de80cbd 100644 --- a/cpu/ppc4xx/tlb.c +++ b/cpu/ppc4xx/tlb.c @@ -316,12 +316,12 @@ static void program_tlb_addr(u64 phys_addr, virt_addr += TLB_1KB_SIZE; } } else { - printf("ERROR: no TLB size exists for the base address 0x%0X.\n", + printf("ERROR: no TLB size exists for the base address 0x%llx.\n", phys_addr); } if (rc != 0) - printf("ERROR: no TLB entries available for the base addr 0x%0X.\n", + printf("ERROR: no TLB entries available for the base addr 0x%llx.\n", phys_addr); } diff --git a/cpu/ppc4xx/traps.c b/cpu/ppc4xx/traps.c index 8b7e32a17bc643ece8a49a50ad565b87507d4e4f..55154b6f0110c262fb264a4e2bcfda7387f0174e 100644 --- a/cpu/ppc4xx/traps.c +++ b/cpu/ppc4xx/traps.c @@ -214,7 +214,7 @@ MachineCheckException(struct pt_regs *regs) } #if defined(CONFIG_440EPX) || defined(CONFIG_440GRX) mfsdram(DDR0_00, val) ; - printf("DDR0: DDR0_00 %p\n", val); + printf("DDR0: DDR0_00 %lx\n", val); val = (val >> 16) & 0xff; if (val & 0x80) printf("DDR0: At least one interrupt active\n"); @@ -263,44 +263,44 @@ MachineCheckException(struct pt_regs *regs) break; default: mfsdram(DDR0_01, value2); - printf("DDR0: No DDR0 error know 0x%x %p\n", val, value2); + printf("DDR0: No DDR0 error know 0x%lx %x\n", val, value2); } mfsdram(DDR0_23, val); if (((val >> 16) & 0xff) && corr_ecc) - printf("DDR0: Syndrome for correctable ECC event 0x%x\n", + printf("DDR0: Syndrome for correctable ECC event 0x%lx\n", (val >> 16) & 0xff); mfsdram(DDR0_23, val); if (((val >> 8) & 0xff) && uncorr_ecc) - printf("DDR0: Syndrome for uncorrectable ECC event 0x%x\n", + printf("DDR0: Syndrome for uncorrectable ECC event 0x%lx\n", (val >> 8) & 0xff); mfsdram(DDR0_33, val); if (val) printf("DDR0: Address of command that caused an " - "Out-of-Range interrupt %p\n", val); + "Out-of-Range interrupt %lx\n", val); mfsdram(DDR0_34, val); if (val && uncorr_ecc) - printf("DDR0: Address of uncorrectable ECC event %p\n", val); + printf("DDR0: Address of uncorrectable ECC event %lx\n", val); mfsdram(DDR0_35, val); if (val && uncorr_ecc) - printf("DDR0: Address of uncorrectable ECC event %p\n", val); + printf("DDR0: Address of uncorrectable ECC event %lx\n", val); mfsdram(DDR0_36, val); if (val && uncorr_ecc) - printf("DDR0: Data of uncorrectable ECC event 0x%08x\n", val); + printf("DDR0: Data of uncorrectable ECC event 0x%08lx\n", val); mfsdram(DDR0_37, val); if (val && uncorr_ecc) - printf("DDR0: Data of uncorrectable ECC event 0x%08x\n", val); + printf("DDR0: Data of uncorrectable ECC event 0x%08lx\n", val); mfsdram(DDR0_38, val); if (val && corr_ecc) - printf("DDR0: Address of correctable ECC event %p\n", val); + printf("DDR0: Address of correctable ECC event %lx\n", val); mfsdram(DDR0_39, val); if (val && corr_ecc) - printf("DDR0: Address of correctable ECC event %p\n", val); + printf("DDR0: Address of correctable ECC event %lx\n", val); mfsdram(DDR0_40, val); if (val && corr_ecc) - printf("DDR0: Data of correctable ECC event 0x%08x\n", val); + printf("DDR0: Data of correctable ECC event 0x%08lx\n", val); mfsdram(DDR0_41, val); if (val && corr_ecc) - printf("DDR0: Data of correctable ECC event 0x%08x\n", val); + printf("DDR0: Data of correctable ECC event 0x%08lx\n", val); #endif /* CONFIG_440EPX */ #endif /* CONFIG_440 */ show_regs(regs); diff --git a/cpu/pxa/mmc.c b/cpu/pxa/mmc.c index 039ce0f579a5bd084fe4185c194e56484e8ebec2..4495a808f5157c7aa1e14d1e19eba6e25c9d1601 100644 --- a/cpu/pxa/mmc.c +++ b/cpu/pxa/mmc.c @@ -119,7 +119,7 @@ mmc_block_read(uchar * dst, ulong src, ulong len) MMC_RDTO = 0xffff; MMC_NOB = 1; MMC_BLKLEN = len; - mmc_cmd(MMC_CMD_READ_BLOCK, argh, argl, + mmc_cmd(MMC_CMD_READ_SINGLE_BLOCK, argh, argl, MMC_CMDAT_R1 | MMC_CMDAT_READ | MMC_CMDAT_BLOCK | MMC_CMDAT_DATA_EN); @@ -568,7 +568,7 @@ mmc_init(int verbose) MMC_SPI = MMC_SPI_DISABLE; /* reset */ - mmc_cmd(MMC_CMD_RESET, 0, 0, MMC_CMDAT_INIT | MMC_CMDAT_R0); + mmc_cmd(MMC_CMD_GO_IDLE_STATE, 0, 0, MMC_CMDAT_INIT | MMC_CMDAT_R0); udelay(200000); retries = 3; while (retries--) { @@ -578,7 +578,10 @@ mmc_init(int verbose) break; } - resp = mmc_cmd(SD_CMD_APP_OP_COND, 0x0020, 0, MMC_CMDAT_R3 | (retries < 2 ? 0 : MMC_CMDAT_INIT)); /* Select 3.2-3.3 and 3.3-3.4V */ + /* Select 3.2-3.3 and 3.3-3.4V */ + resp = mmc_cmd(SD_CMD_APP_SEND_OP_COND, 0x0020, 0, + MMC_CMDAT_R3 | (retries < 2 ? 0 + : MMC_CMDAT_INIT)); if (resp[0] & 0x80000000) { mmc_dev.if_type = IF_TYPE_SD; debug("Detected SD card\n"); @@ -616,7 +619,7 @@ mmc_init(int verbose) memcpy(cid_resp, resp, sizeof(cid_resp)); /* MMC exists, get CSD too */ - resp = mmc_cmd(MMC_CMD_SET_RCA, 0, 0, MMC_CMDAT_R1); + resp = mmc_cmd(MMC_CMD_SET_RELATIVE_ADDR, 0, 0, MMC_CMDAT_R1); if (IF_TYPE_SD == mmc_dev.if_type) rca = ((resp[0] & 0xffff0000) >> 16); resp = mmc_cmd(MMC_CMD_SEND_CSD, rca, 0, MMC_CMDAT_R2); diff --git a/cpu/pxa/start.S b/cpu/pxa/start.S index 1cdb7091d712b9aa6912e5e87b94b9e551b361c3..23005e20f97af1884aa55da7a54b20fbc58f23bc 100644 --- a/cpu/pxa/start.S +++ b/cpu/pxa/start.S @@ -128,7 +128,7 @@ relocate: /* relocate U-Boot to RAM */ copy_loop: ldmia r0!, {r3-r10} /* copy from source address [r0] */ stmia r1!, {r3-r10} /* copy to target address [r1] */ - cmp r0, r2 /* until source end addreee [r2] */ + cmp r0, r2 /* until source end address [r2] */ ble copy_loop #endif /* !CONFIG_SKIP_RELOCATE_UBOOT */ diff --git a/cpu/sh3/Makefile b/cpu/sh3/Makefile index 7679248bfee99efa54c3effd4b88dab765d0a63d..587413d2e15ec3ec8d7c3133b4197778ddd4b0df 100644 --- a/cpu/sh3/Makefile +++ b/cpu/sh3/Makefile @@ -31,19 +31,27 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(CPU).a -START = start.o -OBJS = cpu.o interrupts.o watchdog.o time.o cache.o +SOBJS = start.o +COBJS = cpu.o interrupts.o watchdog.o time.o cache.o -all: .depend $(START) $(LIB) +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) -$(LIB): $(OBJS) - $(AR) crv $@ $(OBJS) +$(LIB): $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### -.depend: Makefile $(START:.o=.S) $(OBJS:.o=.c) - $(CC) -M $(CFLAGS) $(START:.o=.S) $(OBJS:.o=.c) > $@ +# defines $(obj).depend target +include $(SRCTREE)/rules.mk -sinclude .depend +sinclude $(obj).depend ######################################################################### diff --git a/cpu/sh4/Makefile b/cpu/sh4/Makefile index 1bb8bd7729e88341e52a577048df7e1532875855..d3c5eef6be205397b669d84f51fc85938e49c12f 100644 --- a/cpu/sh4/Makefile +++ b/cpu/sh4/Makefile @@ -28,19 +28,27 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(CPU).a -START = start.o -OBJS = cpu.o interrupts.o watchdog.o time.o cache.o +SOBJS = start.o +COBJS = cpu.o interrupts.o watchdog.o time.o cache.o -all: .depend $(START) $(LIB) +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) -$(LIB): $(OBJS) - $(AR) crv $@ $(OBJS) +$(LIB): $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend ######################################################################### -.depend: Makefile $(START:.o=.S) $(OBJS:.o=.c) - $(CC) -M $(CFLAGS) $(START:.o=.S) $(OBJS:.o=.c) > $@ +# defines $(obj).depend target +include $(SRCTREE)/rules.mk -sinclude .depend +sinclude $(obj).depend ######################################################################### diff --git a/doc/README.mvblm7 b/doc/README.mvblm7 index 6a4088806dbd1ad424c66bb6c40dd063d5c748d2..3ee9396540b45b1924f873512da3032625b4cb24 100644 --- a/doc/README.mvblm7 +++ b/doc/README.mvblm7 @@ -11,7 +11,7 @@ Matrix Vision mvBlueLYNX-M7 (mvBL-M7) 2 System Components -2.1 CPU +2.1 CPU Freescale MPC8343VRAGDB CPU running at 400MHz core and 266MHz csb. 512MByte DDR-II memory @ 133MHz. 8 MByte Nor Flash on local bus. @@ -23,7 +23,7 @@ Matrix Vision mvBlueLYNX-M7 (mvBL-M7) 2.2 PCI A miniPCI Type-III socket is present. PCI clock fixed at 66MHz. - + 2.3 FPGA Altera Cyclone-II EP2C20/35 with PCI DMA engines. Connects to dual Matrix Vision specific CCD/CMOS sensor interfaces. @@ -82,4 +82,3 @@ Matrix Vision mvBlueLYNX-M7 (mvBL-M7) 2. Initrd - name is stored in "initrd_name" 3. device tree blob - name is stored in "dtb_name" Fallback files are the flash versions. - diff --git a/drivers/block/Makefile b/drivers/block/Makefile index 5f1298dcdc4039de2d93263cad35d8a6bd1b0d10..a09cd2a603b1661b7a4f625c9e8d83a69542526c 100644 --- a/drivers/block/Makefile +++ b/drivers/block/Makefile @@ -29,6 +29,7 @@ COBJS-y += ahci.o COBJS-y += ata_piix.o COBJS-$(CONFIG_FSL_SATA) += fsl_sata.o COBJS-$(CONFIG_LIBATA) += libata.o +COBJS-$(CONFIG_SATA_SIL3114) += sata_sil3114.o COBJS-y += sil680.o COBJS-y += sym53c8xx.o COBJS-y += systemace.o diff --git a/drivers/block/fsl_sata.c b/drivers/block/fsl_sata.c index d14f5bc6bf8e5de12f78cbe38df1159147d37e7d..d441a30ed511b184f5019905c419456623f24c1a 100644 --- a/drivers/block/fsl_sata.c +++ b/drivers/block/fsl_sata.c @@ -248,6 +248,10 @@ int init_sata(int dev) else printf(" %s ", sata->name); + /* Wait PHY RDY signal changed for 500ms */ + ata_wait_register(®->hstatus, HSTATUS_PHY_RDY, + HSTATUS_PHY_RDY, 500); + /* Check PHYRDY */ val32 = in_le32(®->hstatus); if (val32 & HSTATUS_PHY_RDY) { @@ -258,6 +262,10 @@ int init_sata(int dev) return -1; } + /* Wait for signature updated, which is 1st D2H */ + ata_wait_register(®->hstatus, HSTATUS_SIGNATURE, + HSTATUS_SIGNATURE, 10000); + if (val32 & HSTATUS_SIGNATURE) { sig = in_le32(®->sig); debug("Signature updated, the sig =%08x\n\r", sig); diff --git a/drivers/block/sata_sil3114.c b/drivers/block/sata_sil3114.c new file mode 100644 index 0000000000000000000000000000000000000000..8399737ff53981de1f2c6bc42eaff241b2707cb0 --- /dev/null +++ b/drivers/block/sata_sil3114.c @@ -0,0 +1,839 @@ +/* + * Copyright (C) Excito Elektronik i Skåne AB, All rights reserved. + * Author: Tor Krill + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * 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 + * + * This is a driver for Silicon Image sil3114 sata chip modelled on + * the ata_piix driver + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "sata_sil3114.h" + +/* Convert sectorsize to wordsize */ +#define ATA_SECTOR_WORDS (ATA_SECT_SIZE/2) + +/* Forwards */ +u8 sil3114_spin_up (int num); +u8 sil3114_spin_down (int num); +static int sata_bus_softreset (int num); +static void sata_identify (int num, int dev); +static u8 check_power_mode (int num); +static void sata_port (struct sata_ioports *ioport); +static void set_Feature_cmd (int num, int dev); +static u8 sata_busy_wait (struct sata_ioports *ioaddr, int bits, + unsigned int max, u8 usealtstatus); +static u8 sata_chk_status (struct sata_ioports *ioaddr, u8 usealtstatus); +static void msleep (int count); + +static u32 iobase[6] = { 0, 0, 0, 0, 0, 0}; /* PCI BAR registers for device */ +extern block_dev_desc_t sata_dev_desc[CFG_SATA_MAX_DEVICE]; + +static struct sata_port port[CFG_SATA_MAX_DEVICE]; + +static void output_data (struct sata_ioports *ioaddr, u16 * sect_buf, int words) +{ + while (words--) { + __raw_writew (*sect_buf++, (void *)ioaddr->data_addr); + } +} + +static int input_data (struct sata_ioports *ioaddr, u16 * sect_buf, int words) +{ + while (words--) { + *sect_buf++ = __raw_readw ((void *)ioaddr->data_addr); + } + return 0; +} + +static int sata_bus_softreset (int num) +{ + u8 status = 0; + + port[num].dev_mask = 1; + + port[num].ctl_reg = 0x08; /*Default value of control reg */ + writeb (port[num].ctl_reg, port[num].ioaddr.ctl_addr); + udelay (10); + writeb (port[num].ctl_reg | ATA_SRST, port[num].ioaddr.ctl_addr); + udelay (10); + writeb (port[num].ctl_reg, port[num].ioaddr.ctl_addr); + + /* spec mandates ">= 2ms" before checking status. + * We wait 150ms, because that was the magic delay used for + * ATAPI devices in Hale Landis's ATADRVR, for the period of time + * between when the ATA command register is written, and then + * status is checked. Because waiting for "a while" before + * checking status is fine, post SRST, we perform this magic + * delay here as well. + */ + msleep (150); + status = sata_busy_wait (&port[num].ioaddr, ATA_BUSY, 300, 0); + while ((status & ATA_BUSY)) { + msleep (100); + status = sata_busy_wait (&port[num].ioaddr, ATA_BUSY, 3, 0); + } + + if (status & ATA_BUSY) { + printf ("ata%u is slow to respond,plz be patient\n", port); + } + + while ((status & ATA_BUSY)) { + msleep (100); + status = sata_chk_status (&port[num].ioaddr, 0); + } + + if (status & ATA_BUSY) { + printf ("ata%u failed to respond : ", port); + printf ("bus reset failed\n"); + port[num].dev_mask = 0; + return 1; + } + return 0; +} + +static void sata_identify (int num, int dev) +{ + u8 cmd = 0, status = 0, devno = num; + u16 iobuf[ATA_SECTOR_WORDS]; + u64 n_sectors = 0; + + memset (iobuf, 0, sizeof (iobuf)); + + if (!(port[num].dev_mask & 0x01)) { + printf ("dev%d is not present on port#%d\n", dev, num); + return; + } + + debug ("port=%d dev=%d\n", num, dev); + + status = 0; + cmd = ATA_CMD_ID_ATA; /*Device Identify Command */ + writeb (cmd, port[num].ioaddr.command_addr); + readb (port[num].ioaddr.altstatus_addr); + udelay (10); + + status = sata_busy_wait (&port[num].ioaddr, ATA_BUSY, 1000, 0); + if (status & ATA_ERR) { + printf ("\ndevice not responding\n"); + port[num].dev_mask &= ~0x01; + return; + } + + input_data (&port[num].ioaddr, iobuf, ATA_SECTOR_WORDS); + + ata_swap_buf_le16 (iobuf, ATA_SECTOR_WORDS); + + debug ("Specific config: %x\n", iobuf[2]); + + /* we require LBA and DMA support (bits 8 & 9 of word 49) */ + if (!ata_id_has_dma (iobuf) || !ata_id_has_lba (iobuf)) { + debug ("ata%u: no dma/lba\n", num); + } +#ifdef DEBUG + ata_dump_id (iobuf); +#endif + n_sectors = ata_id_n_sectors (iobuf); + + if (n_sectors == 0) { + port[num].dev_mask &= ~0x01; + return; + } + ata_id_c_string (iobuf, (unsigned char *)sata_dev_desc[devno].revision, + ATA_ID_FW_REV, sizeof (sata_dev_desc[devno].revision)); + ata_id_c_string (iobuf, (unsigned char *)sata_dev_desc[devno].vendor, + ATA_ID_PROD, sizeof (sata_dev_desc[devno].vendor)); + ata_id_c_string (iobuf, (unsigned char *)sata_dev_desc[devno].product, + ATA_ID_SERNO, sizeof (sata_dev_desc[devno].product)); + + /* TODO - atm we asume harddisk ie not removable */ + sata_dev_desc[devno].removable = 0; + + sata_dev_desc[devno].lba = (u32) n_sectors; + debug ("lba=0x%x\n", sata_dev_desc[devno].lba); + +#ifdef CONFIG_LBA48 + if (iobuf[83] & (1 << 10)) { + sata_dev_desc[devno].lba48 = 1; + } else { + sata_dev_desc[devno].lba48 = 0; + } +#endif + + /* assuming HD */ + sata_dev_desc[devno].type = DEV_TYPE_HARDDISK; + sata_dev_desc[devno].blksz = ATA_SECT_SIZE; + sata_dev_desc[devno].lun = 0; /* just to fill something in... */ +} + +static void set_Feature_cmd (int num, int dev) +{ + u8 status = 0; + + if (!(port[num].dev_mask & 0x01)) { + debug ("dev%d is not present on port#%d\n", dev, num); + return; + } + + writeb (SETFEATURES_XFER, port[num].ioaddr.feature_addr); + writeb (XFER_PIO_4, port[num].ioaddr.nsect_addr); + writeb (0, port[num].ioaddr.lbal_addr); + writeb (0, port[num].ioaddr.lbam_addr); + writeb (0, port[num].ioaddr.lbah_addr); + + writeb (ATA_DEVICE_OBS, port[num].ioaddr.device_addr); + writeb (ATA_CMD_SET_FEATURES, port[num].ioaddr.command_addr); + + udelay (50); + msleep (150); + + status = sata_busy_wait (&port[num].ioaddr, ATA_BUSY, 5000, 0); + if ((status & (ATA_BUSY | ATA_ERR))) { + printf ("Error : status 0x%02x\n", status); + port[num].dev_mask &= ~0x01; + } +} + +u8 sil3114_spin_down (int num) +{ + u8 status = 0; + + debug ("Spin down disk\n"); + + if (!(port[num].dev_mask & 0x01)) { + debug ("Device ata%d is not present\n", num); + return 1; + } + + if ((status = check_power_mode (num)) == 0x00) { + debug ("Already in standby\n"); + return 0; + } + + if (status == 0x01) { + printf ("Failed to check power mode on ata%d\n", num); + return 1; + } + + if (!((status = sata_chk_status (&port[num].ioaddr, 0)) & ATA_DRDY)) { + printf ("Device ata%d not ready\n", num); + return 1; + } + + writeb (0x00, port[num].ioaddr.feature_addr); + + writeb (0x00, port[num].ioaddr.nsect_addr); + writeb (0x00, port[num].ioaddr.lbal_addr); + writeb (0x00, port[num].ioaddr.lbam_addr); + writeb (0x00, port[num].ioaddr.lbah_addr); + + writeb (ATA_DEVICE_OBS, port[num].ioaddr.device_addr); + writeb (ATA_CMD_STANDBY, port[num].ioaddr.command_addr); + + status = sata_busy_wait (&port[num].ioaddr, ATA_BUSY, 30000, 0); + if ((status & (ATA_BUSY | ATA_ERR))) { + printf ("Error waiting for disk spin down: status 0x%02x\n", + status); + port[num].dev_mask &= ~0x01; + return 1; + } + return 0; +} + +u8 sil3114_spin_up (int num) +{ + u8 status = 0; + + debug ("Spin up disk\n"); + + if (!(port[num].dev_mask & 0x01)) { + debug ("Device ata%d is not present\n", num); + return 1; + } + + if ((status = check_power_mode (num)) != 0x00) { + if (status == 0x01) { + printf ("Failed to check power mode on ata%d\n", num); + return 1; + } else { + /* should be up and running already */ + return 0; + } + } + + if (!((status = sata_chk_status (&port[num].ioaddr, 0)) & ATA_DRDY)) { + printf ("Device ata%d not ready\n", num); + return 1; + } + + debug ("Stautus of device check: %d\n", status); + + writeb (0x00, port[num].ioaddr.feature_addr); + + writeb (0x00, port[num].ioaddr.nsect_addr); + writeb (0x00, port[num].ioaddr.lbal_addr); + writeb (0x00, port[num].ioaddr.lbam_addr); + writeb (0x00, port[num].ioaddr.lbah_addr); + + writeb (ATA_DEVICE_OBS, port[num].ioaddr.device_addr); + writeb (ATA_CMD_IDLE, port[num].ioaddr.command_addr); + + status = sata_busy_wait (&port[num].ioaddr, ATA_BUSY, 30000, 0); + if ((status & (ATA_BUSY | ATA_ERR))) { + printf ("Error waiting for disk spin up: status 0x%02x\n", + status); + port[num].dev_mask &= ~0x01; + return 1; + } + + /* Wait for disk to enter Active state */ + do { + msleep (10); + status = check_power_mode (num); + } while ((status == 0x00) || (status == 0x80)); + + if (status == 0x01) { + printf ("Falied waiting for disk to spin up\n"); + return 1; + } + + return 0; +} + +/* Return value is not the usual here + * 0x00 - Device stand by + * 0x01 - Operation failed + * 0x80 - Device idle + * 0xff - Device active +*/ +static u8 check_power_mode (int num) +{ + u8 status = 0; + u8 res = 0; + if (!(port[num].dev_mask & 0x01)) { + debug ("Device ata%d is not present\n", num); + return 1; + } + + if (!(sata_chk_status (&port[num].ioaddr, 0) & ATA_DRDY)) { + printf ("Device ata%d not ready\n", num); + return 1; + } + + writeb (0, port[num].ioaddr.feature_addr); + writeb (0, port[num].ioaddr.nsect_addr); + writeb (0, port[num].ioaddr.lbal_addr); + writeb (0, port[num].ioaddr.lbam_addr); + writeb (0, port[num].ioaddr.lbah_addr); + + writeb (ATA_DEVICE_OBS, port[num].ioaddr.device_addr); + writeb (ATA_CMD_CHK_POWER, port[num].ioaddr.command_addr); + + status = sata_busy_wait (&port[num].ioaddr, ATA_BUSY, 5000, 0); + if ((status & (ATA_BUSY | ATA_ERR))) { + printf + ("Error waiting for check power mode complete : status 0x%02x\n", + status); + port[num].dev_mask &= ~0x01; + return 1; + } + res = readb (port[num].ioaddr.nsect_addr); + debug ("Check powermode: %d\n", res); + return res; + +} + +static void sata_port (struct sata_ioports *ioport) +{ + ioport->data_addr = ioport->cmd_addr + ATA_REG_DATA; + ioport->error_addr = ioport->cmd_addr + ATA_REG_ERR; + ioport->feature_addr = ioport->cmd_addr + ATA_REG_FEATURE; + ioport->nsect_addr = ioport->cmd_addr + ATA_REG_NSECT; + ioport->lbal_addr = ioport->cmd_addr + ATA_REG_LBAL; + ioport->lbam_addr = ioport->cmd_addr + ATA_REG_LBAM; + ioport->lbah_addr = ioport->cmd_addr + ATA_REG_LBAH; + ioport->device_addr = ioport->cmd_addr + ATA_REG_DEVICE; + ioport->status_addr = ioport->cmd_addr + ATA_REG_STATUS; + ioport->command_addr = ioport->cmd_addr + ATA_REG_CMD; +} + +static u8 wait_for_irq (int num, unsigned int max) +{ + + u32 port = iobase[5]; + switch (num) { + case 0: + port += VND_TF_CNST_CH0; + break; + case 1: + port += VND_TF_CNST_CH1; + break; + case 2: + port += VND_TF_CNST_CH2; + break; + case 3: + port += VND_TF_CNST_CH3; + break; + default: + return 1; + } + + do { + if (readl (port) & VND_TF_CNST_INTST) { + break; + } + udelay (1000); + max--; + } while ((max > 0)); + + return (max == 0); +} + +static u8 sata_busy_wait (struct sata_ioports *ioaddr, int bits, + unsigned int max, u8 usealtstatus) +{ + u8 status; + + do { + if (!((status = sata_chk_status (ioaddr, usealtstatus)) & bits)) { + break; + } + udelay (1000); + max--; + } while ((status & bits) && (max > 0)); + + return status; +} + +static u8 sata_chk_status (struct sata_ioports *ioaddr, u8 usealtstatus) +{ + if (!usealtstatus) { + return readb (ioaddr->status_addr); + } else { + return readb (ioaddr->altstatus_addr); + } +} + +static void msleep (int count) +{ + int i; + + for (i = 0; i < count; i++) + udelay (1000); +} + +/* Read up to 255 sectors + * + * Returns sectors read +*/ +static u8 do_one_read (int device, ulong block, u8 blkcnt, u16 * buff, + uchar lba48) +{ + + u8 sr = 0; + u8 status; + u64 blknr = (u64) block; + + if (!(sata_chk_status (&port[device].ioaddr, 0) & ATA_DRDY)) { + printf ("Device ata%d not ready\n", device); + return 0; + } + + /* Set up transfer */ +#ifdef CONFIG_LBA48 + if (lba48) { + /* write high bits */ + writeb (0, port[device].ioaddr.nsect_addr); + writeb ((blknr >> 24) & 0xFF, port[device].ioaddr.lbal_addr); + writeb ((blknr >> 32) & 0xFF, port[device].ioaddr.lbam_addr); + writeb ((blknr >> 40) & 0xFF, port[device].ioaddr.lbah_addr); + } +#endif + writeb (blkcnt, port[device].ioaddr.nsect_addr); + writeb (((blknr) >> 0) & 0xFF, port[device].ioaddr.lbal_addr); + writeb ((blknr >> 8) & 0xFF, port[device].ioaddr.lbam_addr); + writeb ((blknr >> 16) & 0xFF, port[device].ioaddr.lbah_addr); + +#ifdef CONFIG_LBA48 + if (lba48) { + writeb (ATA_LBA, port[device].ioaddr.device_addr); + writeb (ATA_CMD_PIO_READ_EXT, port[device].ioaddr.command_addr); + } else +#endif + { + writeb (ATA_LBA | ((blknr >> 24) & 0xF), + port[device].ioaddr.device_addr); + writeb (ATA_CMD_PIO_READ, port[device].ioaddr.command_addr); + } + + status = sata_busy_wait (&port[device].ioaddr, ATA_BUSY, 10000, 1); + + if (status & ATA_BUSY) { + u8 err = 0; + + printf ("Device %d not responding status %d\n", device, status); + err = readb (port[device].ioaddr.error_addr); + printf ("Error reg = 0x%x\n", err); + + return (sr); + } + while (blkcnt--) { + + if (wait_for_irq (device, 500)) { + printf ("ata%u irq failed\n", device); + return sr; + } + + status = sata_chk_status (&port[device].ioaddr, 0); + if (status & ATA_ERR) { + printf ("ata%u error %d\n", device, + readb (port[device].ioaddr.error_addr)); + return sr; + } + /* Read one sector */ + input_data (&port[device].ioaddr, buff, ATA_SECTOR_WORDS); + buff += ATA_SECTOR_WORDS; + sr++; + + } + return sr; +} + +ulong sata_read (int device, ulong block, lbaint_t blkcnt, void *buff) +{ + ulong n = 0, sread; + u16 *buffer = (u16 *) buff; + u8 status = 0; + u64 blknr = (u64) block; + unsigned char lba48 = 0; + +#ifdef CONFIG_LBA48 + if (blknr > 0xfffffff) { + if (!sata_dev_desc[device].lba48) { + printf ("Drive doesn't support 48-bit addressing\n"); + return 0; + } + /* more than 28 bits used, use 48bit mode */ + lba48 = 1; + } +#endif + + while (blkcnt > 0) { + + if (blkcnt > 255) { + sread = 255; + } else { + sread = blkcnt; + } + + status = do_one_read (device, blknr, sread, buffer, lba48); + if (status != sread) { + printf ("Read failed\n"); + return n; + } + + blkcnt -= sread; + blknr += sread; + n += sread; + buffer += sread * ATA_SECTOR_WORDS; + } + return n; +} + +ulong sata_write (int device, ulong block, lbaint_t blkcnt, const void *buff) +{ + ulong n = 0; + u16 *buffer = (u16 *) buff; + unsigned char status = 0, num = 0; + u64 blknr = (u64) block; +#ifdef CONFIG_LBA48 + unsigned char lba48 = 0; + + if (blknr > 0xfffffff) { + if (!sata_dev_desc[device].lba48) { + printf ("Drive doesn't support 48-bit addressing\n"); + return 0; + } + /* more than 28 bits used, use 48bit mode */ + lba48 = 1; + } +#endif + /*Port Number */ + num = device; + + while (blkcnt-- > 0) { + status = sata_busy_wait (&port[num].ioaddr, ATA_BUSY, 500, 0); + if (status & ATA_BUSY) { + printf ("ata%u failed to respond\n", port[num].port_no); + return n; + } +#ifdef CONFIG_LBA48 + if (lba48) { + /* write high bits */ + writeb (0, port[num].ioaddr.nsect_addr); + writeb ((blknr >> 24) & 0xFF, + port[num].ioaddr.lbal_addr); + writeb ((blknr >> 32) & 0xFF, + port[num].ioaddr.lbam_addr); + writeb ((blknr >> 40) & 0xFF, + port[num].ioaddr.lbah_addr); + } +#endif + writeb (1, port[num].ioaddr.nsect_addr); + writeb ((blknr >> 0) & 0xFF, port[num].ioaddr.lbal_addr); + writeb ((blknr >> 8) & 0xFF, port[num].ioaddr.lbam_addr); + writeb ((blknr >> 16) & 0xFF, port[num].ioaddr.lbah_addr); +#ifdef CONFIG_LBA48 + if (lba48) { + writeb (ATA_LBA, port[num].ioaddr.device_addr); + writeb (ATA_CMD_PIO_WRITE_EXT, port[num].ioaddr.command_addr); + } else +#endif + { + writeb (ATA_LBA | ((blknr >> 24) & 0xF), + port[num].ioaddr.device_addr); + writeb (ATA_CMD_PIO_WRITE, port[num].ioaddr.command_addr); + } + + msleep (50); + /*may take up to 4 sec */ + status = sata_busy_wait (&port[num].ioaddr, ATA_BUSY, 4000, 0); + if ((status & (ATA_DRQ | ATA_BUSY | ATA_ERR)) != ATA_DRQ) { + printf ("Error no DRQ dev %d blk %ld: sts 0x%02x\n", + device, (ulong) blknr, status); + return (n); + } + + output_data (&port[num].ioaddr, buffer, ATA_SECTOR_WORDS); + readb (port[num].ioaddr.altstatus_addr); + udelay (50); + + ++n; + ++blknr; + buffer += ATA_SECTOR_WORDS; + } + return n; +} + +/* Driver implementation */ +static u8 sil_get_device_cache_line (pci_dev_t pdev) +{ + u8 cache_line = 0; + pci_read_config_byte (pdev, PCI_CACHE_LINE_SIZE, &cache_line); + return cache_line; +} + +int init_sata (int dev) +{ + static u8 init_done = 0; + static int res = 1; + pci_dev_t devno; + u8 cls = 0; + u16 cmd = 0; + u32 sconf = 0; + + if (init_done) { + return res; + } + + init_done = 1; + + if ((devno = pci_find_device (SIL_VEND_ID, SIL3114_DEVICE_ID, 0)) == -1) { + res = 1; + return res; + } + + /* Read out all BARs, even though we only use MMIO from BAR5 */ + pci_read_config_dword (devno, PCI_BASE_ADDRESS_0, &iobase[0]); + pci_read_config_dword (devno, PCI_BASE_ADDRESS_1, &iobase[1]); + pci_read_config_dword (devno, PCI_BASE_ADDRESS_2, &iobase[2]); + pci_read_config_dword (devno, PCI_BASE_ADDRESS_3, &iobase[3]); + pci_read_config_dword (devno, PCI_BASE_ADDRESS_4, &iobase[4]); + pci_read_config_dword (devno, PCI_BASE_ADDRESS_5, &iobase[5]); + + if ((iobase[0] == 0xFFFFFFFF) || (iobase[1] == 0xFFFFFFFF) || + (iobase[2] == 0xFFFFFFFF) || (iobase[3] == 0xFFFFFFFF) || + (iobase[4] == 0xFFFFFFFF) || (iobase[5] == 0xFFFFFFFF)) { + printf ("Error no base addr for SATA controller\n"); + res = 1; + return res; + } + + /* mask off unused bits */ + iobase[0] &= 0xfffffffc; + iobase[1] &= 0xfffffff8; + iobase[2] &= 0xfffffffc; + iobase[3] &= 0xfffffff8; + iobase[4] &= 0xfffffff0; + iobase[5] &= 0xfffffc00; + + /* from sata_sil in Linux kernel */ + cls = sil_get_device_cache_line (devno); + if (cls) { + cls >>= 3; + cls++; /* cls = (line_size/8)+1 */ + writel (cls << 8 | cls, iobase[5] + VND_FIFOCFG_CH0); + writel (cls << 8 | cls, iobase[5] + VND_FIFOCFG_CH1); + writel (cls << 8 | cls, iobase[5] + VND_FIFOCFG_CH2); + writel (cls << 8 | cls, iobase[5] + VND_FIFOCFG_CH3); + } else { + printf ("Cache line not set. Driver may not function\n"); + } + + /* Enable operation */ + pci_read_config_word (devno, PCI_COMMAND, &cmd); + cmd |= PCI_COMMAND_MASTER | PCI_COMMAND_IO | PCI_COMMAND_MEMORY; + pci_write_config_word (devno, PCI_COMMAND, cmd); + + /* Disable interrupt usage */ + pci_read_config_dword (devno, VND_SYSCONFSTAT, &sconf); + sconf |= (VND_SYSCONFSTAT_CHN_0_INTBLOCK | VND_SYSCONFSTAT_CHN_1_INTBLOCK); + pci_write_config_dword (devno, VND_SYSCONFSTAT, sconf); + + res = 0; + return res; +} + +/* Check if device is connected to port */ +int sata_bus_probe (int portno) +{ + u32 port = iobase[5]; + u32 val; + switch (portno) { + case 0: + port += VND_SSTATUS_CH0; + break; + case 1: + port += VND_SSTATUS_CH1; + break; + case 2: + port += VND_SSTATUS_CH2; + break; + case 3: + port += VND_SSTATUS_CH3; + break; + default: + return 0; + } + val = readl (port); + if ((val & SATA_DET_PRES) == SATA_DET_PRES) { + return 1; + } else { + return 0; + } +} + +int sata_phy_reset (int portno) +{ + u32 port = iobase[5]; + u32 val; + switch (portno) { + case 0: + port += VND_SCONTROL_CH0; + break; + case 1: + port += VND_SCONTROL_CH1; + break; + case 2: + port += VND_SCONTROL_CH2; + break; + case 3: + port += VND_SCONTROL_CH3; + break; + default: + return 0; + } + val = readl (port); + writel (val | SATA_SC_DET_RST, port); + msleep (150); + writel (val & ~SATA_SC_DET_RST, port); + return 0; +} + +int scan_sata (int dev) +{ + /* A bit brain dead, but the code has a legacy */ + switch (dev) { + case 0: + port[0].port_no = 0; + port[0].ioaddr.cmd_addr = iobase[5] + VND_TF0_CH0; + port[0].ioaddr.altstatus_addr = port[0].ioaddr.ctl_addr = + (iobase[5] + VND_TF2_CH0) | ATA_PCI_CTL_OFS; + port[0].ioaddr.bmdma_addr = iobase[5] + VND_BMDMA_CH0; + break; + case 1: + port[1].port_no = 0; + port[1].ioaddr.cmd_addr = iobase[5] + VND_TF0_CH1; + port[1].ioaddr.altstatus_addr = port[1].ioaddr.ctl_addr = + (iobase[5] + VND_TF2_CH1) | ATA_PCI_CTL_OFS; + port[1].ioaddr.bmdma_addr = iobase[5] + VND_BMDMA_CH1; + break; + case 2: + port[2].port_no = 0; + port[2].ioaddr.cmd_addr = iobase[5] + VND_TF0_CH2; + port[2].ioaddr.altstatus_addr = port[2].ioaddr.ctl_addr = + (iobase[5] + VND_TF2_CH2) | ATA_PCI_CTL_OFS; + port[2].ioaddr.bmdma_addr = iobase[5] + VND_BMDMA_CH2; + break; + case 3: + port[3].port_no = 0; + port[3].ioaddr.cmd_addr = iobase[5] + VND_TF0_CH3; + port[3].ioaddr.altstatus_addr = port[3].ioaddr.ctl_addr = + (iobase[5] + VND_TF2_CH3) | ATA_PCI_CTL_OFS; + port[3].ioaddr.bmdma_addr = iobase[5] + VND_BMDMA_CH3; + break; + default: + printf ("Tried to scan unknown port: ata%d\n", dev); + return 1; + } + + /* Initialize other registers */ + sata_port (&port[dev].ioaddr); + + /* Check for attached device */ + if (!sata_bus_probe (dev)) { + port[dev].port_state = 0; + debug ("SATA#%d port is not present\n", dev); + } else { + debug ("SATA#%d port is present\n", dev); + if (sata_bus_softreset (dev)) { + /* soft reset failed, try a hard one */ + sata_phy_reset (dev); + if (sata_bus_softreset (dev)) { + port[dev].port_state = 0; + } else { + port[dev].port_state = 1; + } + } else { + port[dev].port_state = 1; + } + } + if (port[dev].port_state == 1) { + /* Probe device and set xfer mode */ + sata_identify (dev, 0); + set_Feature_cmd (dev, 0); + } + + return 0; +} diff --git a/drivers/block/sata_sil3114.h b/drivers/block/sata_sil3114.h new file mode 100644 index 0000000000000000000000000000000000000000..8f2301ac95a31886741e9cada09439120759dd9c --- /dev/null +++ b/drivers/block/sata_sil3114.h @@ -0,0 +1,147 @@ +/* + * Copyright (C) Excito Elektronik i Skåne AB, All rights reserved. + * Author: Tor Krill + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * 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 + */ + +#ifndef SATA_SIL3114_H +#define SATA_SIL3114_H + +struct sata_ioports { + unsigned long cmd_addr; + unsigned long data_addr; + unsigned long error_addr; + unsigned long feature_addr; + unsigned long nsect_addr; + unsigned long lbal_addr; + unsigned long lbam_addr; + unsigned long lbah_addr; + unsigned long device_addr; + unsigned long status_addr; + unsigned long command_addr; + unsigned long altstatus_addr; + unsigned long ctl_addr; + unsigned long bmdma_addr; + unsigned long scr_addr; +}; + +struct sata_port { + unsigned char port_no; /* primary=0, secondary=1 */ + struct sata_ioports ioaddr; /* ATA cmd/ctl/dma reg blks */ + unsigned char ctl_reg; + unsigned char last_ctl; + unsigned char port_state; /* 1-port is available and */ + /* 0-port is not available */ + unsigned char dev_mask; +}; + +/* Missing ata defines */ +#define ATA_CMD_STANDBY 0xE2 +#define ATA_CMD_STANDBYNOW1 0xE0 +#define ATA_CMD_IDLE 0xE3 +#define ATA_CMD_IDLEIMMEDIATE 0xE1 + +/* Defines for SIL3114 chip */ + +/* PCI defines */ +#define SIL_VEND_ID 0x1095 +#define SIL3114_DEVICE_ID 0x3114 + +/* some vendor specific registers */ +#define VND_SYSCONFSTAT 0x88 /* System Configuration Status and Command */ +#define VND_SYSCONFSTAT_CHN_0_INTBLOCK (1<<22) +#define VND_SYSCONFSTAT_CHN_1_INTBLOCK (1<<23) +#define VND_SYSCONFSTAT_CHN_2_INTBLOCK (1<<24) +#define VND_SYSCONFSTAT_CHN_3_INTBLOCK (1<<25) + +/* internal registers mapped by BAR5 */ +/* SATA Control*/ +#define VND_SCONTROL_CH0 0x100 +#define VND_SCONTROL_CH1 0x180 +#define VND_SCONTROL_CH2 0x300 +#define VND_SCONTROL_CH3 0x380 + +#define SATA_SC_IPM_T2P (1<<16) +#define SATA_SC_IPM_T2S (2<<16) +#define SATA_SC_SPD_1_5 (1<<4) +#define SATA_SC_SPD_3_0 (2<<4) +#define SATA_SC_DET_RST (1) /* ATA Reset sequence */ +#define SATA_SC_DET_PDIS (4) /* PHY Disable */ + +/* SATA Status */ +#define VND_SSTATUS_CH0 0x104 +#define VND_SSTATUS_CH1 0x184 +#define VND_SSTATUS_CH2 0x304 +#define VND_SSTATUS_CH3 0x384 + +#define SATA_SS_IPM_ACTIVE (1<<8) +#define SATA_SS_IPM_PARTIAL (2<<8) +#define SATA_SS_IPM_SLUMBER (6<<8) +#define SATA_SS_SPD_1_5 (1<<4) +#define SATA_SS_SPD_3_0 (2<<4) +#define SATA_DET_P_NOPHY (1) /* Device presence but no PHY connection established */ +#define SATA_DET_PRES (3) /* Device presence and active PHY */ +#define SATA_DET_OFFLINE (4) /* Device offline or in loopback mode */ + +/* Task file registers in BAR5 mapping */ +#define VND_TF0_CH0 0x80 +#define VND_TF0_CH1 0xc0 +#define VND_TF0_CH2 0x280 +#define VND_TF0_CH3 0x2c0 +#define VND_TF1_CH0 0x88 +#define VND_TF1_CH1 0xc8 +#define VND_TF1_CH2 0x288 +#define VND_TF1_CH3 0x2c8 +#define VND_TF2_CH0 0x88 +#define VND_TF2_CH1 0xc8 +#define VND_TF2_CH2 0x288 +#define VND_TF2_CH3 0x2c8 + +#define VND_BMDMA_CH0 0x00 +#define VND_BMDMA_CH1 0x08 +#define VND_BMDMA_CH2 0x200 +#define VND_BMDMA_CH3 0x208 +#define VND_BMDMA2_CH0 0x10 +#define VND_BMDMA2_CH1 0x18 +#define VND_BMDMA2_CH2 0x210 +#define VND_BMDMA2_CH3 0x218 + +/* FIFO control */ +#define VND_FIFOCFG_CH0 0x40 +#define VND_FIFOCFG_CH1 0x44 +#define VND_FIFOCFG_CH2 0x240 +#define VND_FIFOCFG_CH3 0x244 + +/* Task File configuration and status */ +#define VND_TF_CNST_CH0 0xa0 +#define VND_TF_CNST_CH1 0xe0 +#define VND_TF_CNST_CH2 0x2a0 +#define VND_TF_CNST_CH3 0x2e0 + +#define VND_TF_CNST_BFCMD (1<<1) +#define VND_TF_CNST_CHNRST (1<<2) +#define VND_TF_CNST_VDMA (1<<10) +#define VND_TF_CNST_INTST (1<<11) +#define VND_TF_CNST_WDTO (1<<12) +#define VND_TF_CNST_WDEN (1<<13) +#define VND_TF_CNST_WDIEN (1<<14) + +/* for testing */ +#define VND_SSDR 0x04c /* System Software Data Register */ +#define VND_FMACS 0x050 /* Flash Memory Address control and status */ + +#endif diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..3dc031b438d6c8b845e1103f9c1d3ecb4bcfea19 --- /dev/null +++ b/drivers/mmc/Makefile @@ -0,0 +1,46 @@ +# +# (C) Copyright 2006 +# Wolfgang Denk, DENX Software Engineering, wd@denx.de. +# +# 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 as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# 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 $(TOPDIR)/config.mk + +LIB := $(obj)libmmc.a + +COBJS-$(CONFIG_ATMEL_MCI) += atmel_mci.o + +COBJS := $(COBJS-y) +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +all: $(LIB) + +$(LIB): $(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +######################################################################### diff --git a/cpu/at32ap/atmel_mci.c b/drivers/mmc/atmel_mci.c similarity index 99% rename from cpu/at32ap/atmel_mci.c rename to drivers/mmc/atmel_mci.c index 3795addf05af60ca10e69d6e6d8e7bf086e7f3b1..61aa1849c24a3374776eea5487f5eb630ca22f1d 100644 --- a/cpu/at32ap/atmel_mci.c +++ b/drivers/mmc/atmel_mci.c @@ -349,7 +349,7 @@ static int sd_init_card(struct mmc_cid *cid, int verbose) mmc_idle_cards(); for (i = 0; i < 1000; i++) { - ret = mmc_acmd(MMC_ACMD_SD_SEND_OP_COND, CFG_MMC_OP_COND, + ret = mmc_acmd(SD_CMD_APP_SEND_OP_COND, CFG_MMC_OP_COND, resp, R3 | NID); if (ret || (resp[0] & 0x80000000)) break; @@ -367,7 +367,7 @@ static int sd_init_card(struct mmc_cid *cid, int verbose) mmc_dump_cid(cid); /* Get RCA of the card that responded */ - ret = mmc_cmd(MMC_CMD_SD_SEND_RELATIVE_ADDR, 0, resp, R6 | NCR); + ret = mmc_cmd(SD_CMD_SEND_RELATIVE_ADDR, 0, resp, R6 | NCR); if (ret) return ret; diff --git a/cpu/at32ap/atmel_mci.h b/drivers/mmc/atmel_mci.h similarity index 100% rename from cpu/at32ap/atmel_mci.h rename to drivers/mmc/atmel_mci.h diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index d505bc8e87b2d8475941c8e908b3ec92bc1af77f..c0ea97be70ec2316530d665bb9b76625e9c1cce8 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -581,20 +581,16 @@ static int flash_toggle (flash_info_t * info, flash_sect_t sect, flash_make_cmd (info, cmd, &cword); switch (info->portwidth) { case FLASH_CFI_8BIT: - retval = ((flash_read8(addr) & cword.c) != - (flash_read8(addr) & cword.c)); + retval = flash_read8(addr) != flash_read8(addr); break; case FLASH_CFI_16BIT: - retval = ((flash_read16(addr) & cword.w) != - (flash_read16(addr) & cword.w)); + retval = flash_read16(addr) != flash_read16(addr); break; case FLASH_CFI_32BIT: - retval = ((flash_read32(addr) & cword.l) != - (flash_read32(addr) & cword.l)); + retval = flash_read32(addr) != flash_read32(addr); break; case FLASH_CFI_64BIT: - retval = ((flash_read64(addr) & cword.ll) != - (flash_read64(addr) & cword.ll)); + retval = flash_read64(addr) != flash_read64(addr); break; default: retval = 0; diff --git a/drivers/mtd/jedec_flash.c b/drivers/mtd/jedec_flash.c index b958d1723a2a5acc690d12627670bdffd8a21daa..9845e9364ed06078dee9b46910f9ce5cc79993a8 100644 --- a/drivers/mtd/jedec_flash.c +++ b/drivers/mtd/jedec_flash.c @@ -42,7 +42,7 @@ #define MANUFACTURER_SST 0x00BF /* AMD */ -#define AM29DL800BB 0x22C8 +#define AM29DL800BB 0x22CB #define AM29DL800BT 0x224A #define AM29F800BB 0x2258 diff --git a/drivers/mtd/nand/nand.c b/drivers/mtd/nand/nand.c index 27b5792bcc95aed29149949ec4c0aae7fb7d3187..e44470eb6cc8a7b79088a2a2ccec61c7174477aa 100644 --- a/drivers/mtd/nand/nand.c +++ b/drivers/mtd/nand/nand.c @@ -70,7 +70,7 @@ void nand_init(void) if (nand_curr_device == -1) nand_curr_device = i; } - printf("%lu MiB\n", size / (1024 * 1024)); + printf("%u MiB\n", size / (1024 * 1024)); #ifdef CFG_NAND_SELECT_DEVICE /* diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 740d3fcc3737e637c731daa93ca4e93fd737b8d3..6416d1529e9d1440d4f89042cc2502ff1006b36f 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -962,7 +962,9 @@ static int nand_write_page (struct mtd_info *mtd, struct nand_chip *this, int pa status = this->waitfunc (mtd, this, FL_WRITING); /* See if device thinks it succeeded */ if (status & 0x01) { - DEBUG (MTD_DEBUG_LEVEL0, "%s: " "Failed write, page 0x%08x, ", __FUNCTION__, page); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "%s: Failed write, page 0x%08x, ", + __FUNCTION__, page); return -EIO; } } else { @@ -1010,7 +1012,9 @@ static int nand_verify_pages (struct mtd_info *mtd, struct nand_chip *this, int for (j = 0; j < eccsteps; j++) { /* Loop through and verify the data */ if (this->verify_buf(mtd, &this->data_poi[datidx], mtd->eccsize)) { - DEBUG (MTD_DEBUG_LEVEL0, "%s: " "Failed write verify, page 0x%08x ", __FUNCTION__, page); + MTDDEBUG (MTD_DEBUG_LEVEL0, "%s: " + "Failed write verify, page 0x%08x ", + __FUNCTION__, page); goto out; } datidx += mtd->eccsize; @@ -1018,7 +1022,9 @@ static int nand_verify_pages (struct mtd_info *mtd, struct nand_chip *this, int if (!hweccbytes) continue; if (this->verify_buf(mtd, &this->oob_buf[oobofs], hweccbytes)) { - DEBUG (MTD_DEBUG_LEVEL0, "%s: " "Failed write verify, page 0x%08x ", __FUNCTION__, page); + MTDDEBUG (MTD_DEBUG_LEVEL0, "%s: " + "Failed write verify, page 0x%08x ", + __FUNCTION__, page); goto out; } oobofs += hweccbytes; @@ -1029,7 +1035,9 @@ static int nand_verify_pages (struct mtd_info *mtd, struct nand_chip *this, int */ if (oobmode) { if (this->verify_buf(mtd, &oob_buf[oobofs], mtd->oobsize - hweccbytes * eccsteps)) { - DEBUG (MTD_DEBUG_LEVEL0, "%s: " "Failed write verify, page 0x%08x ", __FUNCTION__, page); + MTDDEBUG (MTD_DEBUG_LEVEL0, "%s: " + "Failed write verify, page 0x%08x ", + __FUNCTION__, page); goto out; } } else { @@ -1042,9 +1050,11 @@ static int nand_verify_pages (struct mtd_info *mtd, struct nand_chip *this, int for (i = 0; i < ecccnt; i++) { int idx = oobsel->eccpos[i]; if (oobdata[idx] != oob_buf[oobofs + idx] ) { - DEBUG (MTD_DEBUG_LEVEL0, + MTDDEBUG (MTD_DEBUG_LEVEL0, "%s: Failed ECC write " - "verify, page 0x%08x, " "%6i bytes were succesful\n", __FUNCTION__, page, i); + "verify, page 0x%08x, " + "%6i bytes were succesful\n", + __FUNCTION__, page, i); goto out; } } @@ -1131,11 +1141,13 @@ static int nand_read_ecc (struct mtd_info *mtd, loff_t from, size_t len, int oobreadlen; - DEBUG (MTD_DEBUG_LEVEL3, "nand_read_ecc: from = 0x%08x, len = %i\n", (unsigned int) from, (int) len); + MTDDEBUG (MTD_DEBUG_LEVEL3, "nand_read_ecc: from = 0x%08x, len = %i\n", + (unsigned int) from, (int) len); /* Do not allow reads past end of device */ if ((from + len) > mtd->size) { - DEBUG (MTD_DEBUG_LEVEL0, "nand_read_ecc: Attempt read beyond end of device\n"); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "nand_read_ecc: Attempt read beyond end of device\n"); *retlen = 0; return -EINVAL; } @@ -1252,7 +1264,7 @@ static int nand_read_ecc (struct mtd_info *mtd, loff_t from, size_t len, * generator for an error, reads back the syndrome and * does the error correction on the fly */ if (this->correct_data(mtd, &data_poi[datidx], &oob_data[i], &ecc_code[i]) == -1) { - DEBUG (MTD_DEBUG_LEVEL0, "nand_read_ecc: " + MTDDEBUG (MTD_DEBUG_LEVEL0, "nand_read_ecc: " "Failed ECC read, page 0x%08x on chip %d\n", page, chipnr); ecc_failed++; } @@ -1291,7 +1303,9 @@ static int nand_read_ecc (struct mtd_info *mtd, loff_t from, size_t len, } if (ecc_status == -1) { - DEBUG (MTD_DEBUG_LEVEL0, "nand_read_ecc: " "Failed ECC read, page 0x%08x\n", page); + MTDDEBUG (MTD_DEBUG_LEVEL0, "nand_read_ecc: " + "Failed ECC read, page 0x%08x\n", + page); ecc_failed++; } } @@ -1388,7 +1402,8 @@ static int nand_read_oob (struct mtd_info *mtd, loff_t from, size_t len, size_t struct nand_chip *this = mtd->priv; int blockcheck = (1 << (this->phys_erase_shift - this->page_shift)) - 1; - DEBUG (MTD_DEBUG_LEVEL3, "nand_read_oob: from = 0x%08x, len = %i\n", (unsigned int) from, (int) len); + MTDDEBUG (MTD_DEBUG_LEVEL3, "nand_read_oob: from = 0x%08x, len = %i\n", + (unsigned int) from, (int) len); /* Shift to get page */ page = (int)(from >> this->page_shift); @@ -1402,7 +1417,8 @@ static int nand_read_oob (struct mtd_info *mtd, loff_t from, size_t len, size_t /* Do not allow reads past end of device */ if ((from + len) > mtd->size) { - DEBUG (MTD_DEBUG_LEVEL0, "nand_read_oob: Attempt read beyond end of device\n"); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "nand_read_oob: Attempt read beyond end of device\n"); *retlen = 0; return -EINVAL; } @@ -1488,7 +1504,8 @@ int nand_read_raw (struct mtd_info *mtd, uint8_t *buf, loff_t from, size_t len, /* Do not allow reads past end of device */ if ((from + len) > mtd->size) { - DEBUG (MTD_DEBUG_LEVEL0, "nand_read_raw: Attempt read beyond end of device\n"); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "nand_read_raw: Attempt read beyond end of device\n"); return -EINVAL; } @@ -1626,14 +1643,16 @@ static int nand_write_ecc (struct mtd_info *mtd, loff_t to, size_t len, u_char *oobbuf, *bufstart; int ppblock = (1 << (this->phys_erase_shift - this->page_shift)); - DEBUG (MTD_DEBUG_LEVEL3, "nand_write_ecc: to = 0x%08x, len = %i\n", (unsigned int) to, (int) len); + MTDDEBUG (MTD_DEBUG_LEVEL3, "nand_write_ecc: to = 0x%08x, len = %i\n", + (unsigned int) to, (int) len); /* Initialize retlen, in case of early exit */ *retlen = 0; /* Do not allow write past end of device */ if ((to + len) > mtd->size) { - DEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: Attempt to write past end of page\n"); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "nand_write_ecc: Attempt to write past end of page\n"); return -EINVAL; } @@ -1695,7 +1714,8 @@ static int nand_write_ecc (struct mtd_info *mtd, loff_t to, size_t len, */ ret = nand_write_page (mtd, this, page, &oobbuf[oob], oobsel, (--numpages > 0)); if (ret) { - DEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: write_page failed %d\n", ret); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "nand_write_ecc: write_page failed %d\n", ret); goto out; } /* Next oob page */ @@ -1719,7 +1739,8 @@ static int nand_write_ecc (struct mtd_info *mtd, loff_t to, size_t len, page - startpage, oobbuf, oobsel, chipnr, (eccbuf != NULL)); if (ret) { - DEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: verify_pages failed %d\n", ret); + MTDDEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: " + "verify_pages failed %d\n", ret); goto out; } *retlen = written; @@ -1752,7 +1773,8 @@ cmp: if (!ret) *retlen = written; else - DEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: verify_pages failed %d\n", ret); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "nand_write_ecc: verify_pages failed %d\n", ret); out: /* Deselect and wake up anyone waiting on the device */ @@ -1777,7 +1799,8 @@ static int nand_write_oob (struct mtd_info *mtd, loff_t to, size_t len, size_t * int column, page, status, ret = -EIO, chipnr; struct nand_chip *this = mtd->priv; - DEBUG (MTD_DEBUG_LEVEL3, "nand_write_oob: to = 0x%08x, len = %i\n", (unsigned int) to, (int) len); + MTDDEBUG (MTD_DEBUG_LEVEL3, "nand_write_oob: to = 0x%08x, len = %i\n", + (unsigned int) to, (int) len); /* Shift to get page */ page = (int) (to >> this->page_shift); @@ -1791,7 +1814,8 @@ static int nand_write_oob (struct mtd_info *mtd, loff_t to, size_t len, size_t * /* Do not allow write past end of page */ if ((column + len) > mtd->oobsize) { - DEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: Attempt to write past end of page\n"); + MTDDEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: " + "Attempt to write past end of page\n"); return -EINVAL; } @@ -1821,8 +1845,9 @@ static int nand_write_oob (struct mtd_info *mtd, loff_t to, size_t len, size_t * this->cmdfunc (mtd, NAND_CMD_SEQIN, mtd->oobblock, page & this->pagemask); if (!ffchars) { if (!(ffchars = kmalloc (mtd->oobsize, GFP_KERNEL))) { - DEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: " - "No memory for padding array, need %d bytes", mtd->oobsize); + MTDDEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: " + "No memory for padding array, " + "need %d bytes", mtd->oobsize); ret = -ENOMEM; goto out; } @@ -1847,7 +1872,8 @@ static int nand_write_oob (struct mtd_info *mtd, loff_t to, size_t len, size_t * /* See if device thinks it succeeded */ if (status & 0x01) { - DEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: " "Failed write, page 0x%08x\n", page); + MTDDEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: " + "Failed write, page 0x%08x\n", page); ret = -EIO; goto out; } @@ -1859,7 +1885,8 @@ static int nand_write_oob (struct mtd_info *mtd, loff_t to, size_t len, size_t * this->cmdfunc (mtd, NAND_CMD_READOOB, column, page & this->pagemask); if (this->verify_buf(mtd, buf, len)) { - DEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: " "Failed write verify, page 0x%08x\n", page); + MTDDEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: " + "Failed write verify, page 0x%08x\n", page); ret = -EIO; goto out; } @@ -1919,12 +1946,14 @@ static int nand_writev_ecc (struct mtd_info *mtd, const struct kvec *vecs, unsig for (i = 0; i < count; i++) total_len += (int) vecs[i].iov_len; - DEBUG (MTD_DEBUG_LEVEL3, - "nand_writev: to = 0x%08x, len = %i, count = %ld\n", (unsigned int) to, (unsigned int) total_len, count); + MTDDEBUG (MTD_DEBUG_LEVEL3, + "nand_writev: to = 0x%08x, len = %i, count = %ld\n", + (unsigned int) to, (unsigned int) total_len, count); /* Do not allow write past end of page */ if ((to + total_len) > mtd->size) { - DEBUG (MTD_DEBUG_LEVEL0, "nand_writev: Attempted write past end of device\n"); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "nand_writev: Attempted write past end of device\n"); return -EINVAL; } @@ -2117,24 +2146,26 @@ int nand_erase_nand (struct mtd_info *mtd, struct erase_info *instr, int allowbb int page, len, status, pages_per_block, ret, chipnr; struct nand_chip *this = mtd->priv; - DEBUG (MTD_DEBUG_LEVEL3, - "nand_erase: start = 0x%08x, len = %i\n", (unsigned int) instr->addr, (unsigned int) instr->len); + MTDDEBUG (MTD_DEBUG_LEVEL3, "nand_erase: start = 0x%08x, len = %i\n", + (unsigned int) instr->addr, (unsigned int) instr->len); /* Start address must align on block boundary */ if (instr->addr & ((1 << this->phys_erase_shift) - 1)) { - DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: Unaligned address\n"); + MTDDEBUG (MTD_DEBUG_LEVEL0, "nand_erase: Unaligned address\n"); return -EINVAL; } /* Length must align on block boundary */ if (instr->len & ((1 << this->phys_erase_shift) - 1)) { - DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: Length not block aligned\n"); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "nand_erase: Length not block aligned\n"); return -EINVAL; } /* Do not allow erase past end of device */ if ((instr->len + instr->addr) > mtd->size) { - DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: Erase past end of device\n"); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "nand_erase: Erase past end of device\n"); return -EINVAL; } @@ -2156,7 +2187,8 @@ int nand_erase_nand (struct mtd_info *mtd, struct erase_info *instr, int allowbb /* Check the WP bit */ /* Check, if it is write protected */ if (nand_check_wp(mtd)) { - DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: Device is write protected!!!\n"); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "nand_erase: Device is write protected!!!\n"); instr->state = MTD_ERASE_FAILED; goto erase_exit; } @@ -2186,7 +2218,8 @@ int nand_erase_nand (struct mtd_info *mtd, struct erase_info *instr, int allowbb /* See if block erase succeeded */ if (status & 0x01) { - DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: " "Failed erase, page 0x%08x\n", page); + MTDDEBUG (MTD_DEBUG_LEVEL0, "nand_erase: " + "Failed erase, page 0x%08x\n", page); instr->state = MTD_ERASE_FAILED; instr->fail_addr = (page << this->page_shift); goto erase_exit; @@ -2229,7 +2262,7 @@ static void nand_sync (struct mtd_info *mtd) { struct nand_chip *this = mtd->priv; - DEBUG (MTD_DEBUG_LEVEL3, "nand_sync: called\n"); + MTDDEBUG (MTD_DEBUG_LEVEL3, "nand_sync: called\n"); /* Grab the lock and see if the device is available */ nand_get_device (this, mtd, FL_SYNCING); diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c index eff76d717ca3970f2c82c6fd12f34482a22a546e..a97743b45e80d08568d5f6f9406d35197049ef93 100644 --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c @@ -1038,8 +1038,8 @@ int nand_isbad_bbt (struct mtd_info *mtd, loff_t offs, int allowbbt) block = (int) (offs >> (this->bbt_erase_shift - 1)); res = (this->bbt[block >> 3] >> (block & 0x06)) & 0x03; - DEBUG (MTD_DEBUG_LEVEL2, "nand_isbad_bbt(): bbt info for offs 0x%08x: (block %d) 0x%02x\n", - (unsigned int)offs, res, block >> 1); + MTDDEBUG (MTD_DEBUG_LEVEL2, "nand_isbad_bbt(): bbt info for offs 0x%08x: " + "(block %d) 0x%02x\n", (unsigned int)offs, res, block >> 1); switch ((int)res) { case 0x00: return 0; diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c index c82f77b55587ef601472e0e027f51f852e81c168..828cc338adbd4da11ba113c6b29cb6a6175a635b 100644 --- a/drivers/mtd/nand/nand_util.c +++ b/drivers/mtd/nand/nand_util.c @@ -154,7 +154,7 @@ int nand_erase_opts(nand_info_t *meminfo, const nand_erase_options_t *opts) } if (erase_length < meminfo->erasesize) { - printf("Warning: Erase size 0x%08x smaller than one " \ + printf("Warning: Erase size 0x%08lx smaller than one " \ "erase block 0x%08x\n",erase_length, meminfo->erasesize); printf(" Erasing 0x%08x instead\n", meminfo->erasesize); erase_length = meminfo->erasesize; @@ -498,7 +498,7 @@ int nand_write_opts(nand_info_t *meminfo, const nand_write_options_t *opts) * on (slow) serial consoles */ if (percent != percent_complete) { - printf("\rWriting data at 0x%x " + printf("\rWriting data at 0x%lx " "-- %3d%% complete.", mtdoffset, percent); percent_complete = percent; @@ -678,7 +678,7 @@ int nand_read_opts(nand_info_t *meminfo, const nand_read_options_t *opts) */ if (percent != percent_complete) { if (!opts->quiet) - printf("\rReading data from 0x%x " + printf("\rReading data from 0x%lx " "-- %3d%% complete.", mtdoffset, percent); percent_complete = percent; diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index d1b9f8f5464e0e380e96bb5eecf7ca3e1b9ccd00..d32e38255805ed423f972e0f5c2e793602e60570 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c @@ -293,22 +293,22 @@ static int onenand_wait(struct mtd_info *mtd, int state) ctrl = this->read_word(this->base + ONENAND_REG_CTRL_STATUS); if (ctrl & ONENAND_CTRL_ERROR) { - DEBUG(MTD_DEBUG_LEVEL0, - "onenand_wait: controller error = 0x%04x\n", ctrl); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "onenand_wait: controller error = 0x%04x\n", ctrl); return -EAGAIN; } if (ctrl & ONENAND_CTRL_LOCK) { - DEBUG(MTD_DEBUG_LEVEL0, - "onenand_wait: it's locked error = 0x%04x\n", ctrl); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "onenand_wait: it's locked error = 0x%04x\n", ctrl); return -EIO; } if (interrupt & ONENAND_INT_READ) { ecc = this->read_word(this->base + ONENAND_REG_ECC_STATUS); if (ecc & ONENAND_ECC_2BIT_ALL) { - DEBUG(MTD_DEBUG_LEVEL0, - "onenand_wait: ECC error = 0x%04x\n", ecc); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "onenand_wait: ECC error = 0x%04x\n", ecc); return -EBADMSG; } } @@ -524,13 +524,14 @@ static int onenand_read_ecc(struct mtd_info *mtd, loff_t from, size_t len, int thislen; int ret = 0; - DEBUG(MTD_DEBUG_LEVEL3, "onenand_read_ecc: from = 0x%08x, len = %i\n", - (unsigned int)from, (int)len); + MTDDEBUG (MTD_DEBUG_LEVEL3, "onenand_read_ecc: " + "from = 0x%08x, len = %i\n", + (unsigned int)from, (int)len); /* Do not allow reads past end of device */ if ((from + len) > mtd->size) { - DEBUG(MTD_DEBUG_LEVEL0, - "onenand_read_ecc: Attempt read beyond end of device\n"); + MTDDEBUG (MTD_DEBUG_LEVEL0, "onenand_read_ecc: " + "Attempt read beyond end of device\n"); *retlen = 0; return -EINVAL; } @@ -561,8 +562,8 @@ static int onenand_read_ecc(struct mtd_info *mtd, loff_t from, size_t len, break; if (ret) { - DEBUG(MTD_DEBUG_LEVEL0, - "onenand_read_ecc: read failed = %d\n", ret); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "onenand_read_ecc: read failed = %d\n", ret); break; } @@ -615,16 +616,17 @@ int onenand_read_oob(struct mtd_info *mtd, loff_t from, size_t len, int read = 0, thislen, column; int ret = 0; - DEBUG(MTD_DEBUG_LEVEL3, "onenand_read_oob: from = 0x%08x, len = %i\n", - (unsigned int)from, (int)len); + MTDDEBUG (MTD_DEBUG_LEVEL3, "onenand_read_oob: " + "from = 0x%08x, len = %i\n", + (unsigned int)from, (int)len); /* Initialize return length value */ *retlen = 0; /* Do not allow reads past end of device */ if (unlikely((from + len) > mtd->size)) { - DEBUG(MTD_DEBUG_LEVEL0, - "onenand_read_oob: Attempt read beyond end of device\n"); + MTDDEBUG (MTD_DEBUG_LEVEL0, "onenand_read_oob: " + "Attempt read beyond end of device\n"); return -EINVAL; } @@ -652,8 +654,8 @@ int onenand_read_oob(struct mtd_info *mtd, loff_t from, size_t len, break; if (ret) { - DEBUG(MTD_DEBUG_LEVEL0, - "onenand_read_oob: read failed = %d\n", ret); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "onenand_read_oob: read failed = %d\n", ret); break; } @@ -733,23 +735,24 @@ static int onenand_write_ecc(struct mtd_info *mtd, loff_t to, size_t len, int written = 0; int ret = 0; - DEBUG(MTD_DEBUG_LEVEL3, "onenand_write_ecc: to = 0x%08x, len = %i\n", - (unsigned int)to, (int)len); + MTDDEBUG (MTD_DEBUG_LEVEL3, "onenand_write_ecc: " + "to = 0x%08x, len = %i\n", + (unsigned int)to, (int)len); /* Initialize retlen, in case of early exit */ *retlen = 0; /* Do not allow writes past end of device */ if (unlikely((to + len) > mtd->size)) { - DEBUG(MTD_DEBUG_LEVEL0, - "onenand_write_ecc: Attempt write to past end of device\n"); + MTDDEBUG (MTD_DEBUG_LEVEL0, "onenand_write_ecc: " + "Attempt write to past end of device\n"); return -EINVAL; } /* Reject writes, which are not page aligned */ if (unlikely(NOTALIGNED(to)) || unlikely(NOTALIGNED(len))) { - DEBUG(MTD_DEBUG_LEVEL0, - "onenand_write_ecc: Attempt to write not page aligned data\n"); + MTDDEBUG (MTD_DEBUG_LEVEL0, "onenand_write_ecc: " + "Attempt to write not page aligned data\n"); return -EINVAL; } @@ -772,8 +775,8 @@ static int onenand_write_ecc(struct mtd_info *mtd, loff_t to, size_t len, ret = this->wait(mtd, FL_WRITING); if (ret) { - DEBUG(MTD_DEBUG_LEVEL0, - "onenand_write_ecc: write filaed %d\n", ret); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "onenand_write_ecc: write filaed %d\n", ret); break; } @@ -782,8 +785,8 @@ static int onenand_write_ecc(struct mtd_info *mtd, loff_t to, size_t len, /* Only check verify write turn on */ ret = onenand_verify_page(mtd, (u_char *) buf, to, block, page); if (ret) { - DEBUG(MTD_DEBUG_LEVEL0, - "onenand_write_ecc: verify failed %d\n", ret); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "onenand_write_ecc: verify failed %d\n", ret); break; } @@ -836,16 +839,17 @@ int onenand_write_oob(struct mtd_info *mtd, loff_t to, size_t len, int column, status; int written = 0; - DEBUG(MTD_DEBUG_LEVEL3, "onenand_write_oob: to = 0x%08x, len = %i\n", - (unsigned int)to, (int)len); + MTDDEBUG (MTD_DEBUG_LEVEL3, "onenand_write_oob: " + "to = 0x%08x, len = %i\n", + (unsigned int)to, (int)len); /* Initialize retlen, in case of early exit */ *retlen = 0; /* Do not allow writes past end of device */ if (unlikely((to + len) > mtd->size)) { - DEBUG(MTD_DEBUG_LEVEL0, - "onenand_write_oob: Attempt write to past end of device\n"); + MTDDEBUG (MTD_DEBUG_LEVEL0, "onenand_write_oob: " + "Attempt write to past end of device\n"); return -EINVAL; } @@ -904,28 +908,29 @@ int onenand_erase(struct mtd_info *mtd, struct erase_info *instr) int len; int ret = 0; - DEBUG(MTD_DEBUG_LEVEL3, "onenand_erase: start = 0x%08x, len = %i\n", - (unsigned int)instr->addr, (unsigned int)instr->len); + MTDDEBUG (MTD_DEBUG_LEVEL3, "onenand_erase: start = 0x%08x, len = %i\n", + (unsigned int)instr->addr, (unsigned int)instr->len); block_size = (1 << this->erase_shift); /* Start address must align on block boundary */ if (unlikely(instr->addr & (block_size - 1))) { - DEBUG(MTD_DEBUG_LEVEL0, "onenand_erase: Unaligned address\n"); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "onenand_erase: Unaligned address\n"); return -EINVAL; } /* Length must align on block boundary */ if (unlikely(instr->len & (block_size - 1))) { - DEBUG(MTD_DEBUG_LEVEL0, - "onenand_erase: Length not block aligned\n"); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "onenand_erase: Length not block aligned\n"); return -EINVAL; } /* Do not allow erase past end of device */ if (unlikely((instr->len + instr->addr) > mtd->size)) { - DEBUG(MTD_DEBUG_LEVEL0, - "onenand_erase: Erase past end of device\n"); + MTDDEBUG (MTD_DEBUG_LEVEL0, + "onenand_erase: Erase past end of device\n"); return -EINVAL; } @@ -950,12 +955,12 @@ int onenand_erase(struct mtd_info *mtd, struct erase_info *instr) /* Check, if it is write protected */ if (ret) { if (ret == -EPERM) - DEBUG(MTD_DEBUG_LEVEL0, - "onenand_erase: Device is write protected!!!\n"); + MTDDEBUG (MTD_DEBUG_LEVEL0, "onenand_erase: " + "Device is write protected!!!\n"); else - DEBUG(MTD_DEBUG_LEVEL0, - "onenand_erase: Failed erase, block %d\n", - (unsigned)(addr >> this->erase_shift)); + MTDDEBUG (MTD_DEBUG_LEVEL0, "onenand_erase: " + "Failed erase, block %d\n", + (unsigned)(addr >> this->erase_shift)); instr->state = MTD_ERASE_FAILED; instr->fail_addr = addr; goto erase_exit; @@ -988,7 +993,7 @@ int onenand_erase(struct mtd_info *mtd, struct erase_info *instr) */ void onenand_sync(struct mtd_info *mtd) { - DEBUG(MTD_DEBUG_LEVEL3, "onenand_sync: called\n"); + MTDDEBUG (MTD_DEBUG_LEVEL3, "onenand_sync: called\n"); /* Grab the lock and see if the device is available */ onenand_get_device(mtd, FL_SYNCING); diff --git a/drivers/mtd/onenand/onenand_bbt.c b/drivers/mtd/onenand/onenand_bbt.c index 5a610ee5ea8b3fc381da19104112f227ce82e176..87344ab65f194e7c204657ba7790d694f8a82911 100644 --- a/drivers/mtd/onenand/onenand_bbt.c +++ b/drivers/mtd/onenand/onenand_bbt.c @@ -156,9 +156,9 @@ static int onenand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt) block = (int)(offs >> (bbm->bbt_erase_shift - 1)); res = (bbm->bbt[block >> 3] >> (block & 0x06)) & 0x03; - DEBUG(MTD_DEBUG_LEVEL2, - "onenand_isbad_bbt: bbt info for offs 0x%08x: (block %d) 0x%02x\n", - (unsigned int)offs, block >> 1, res); + MTDDEBUG (MTD_DEBUG_LEVEL2, + "onenand_isbad_bbt: bbt info for offs 0x%08x: (block %d) 0x%02x\n", + (unsigned int)offs, block >> 1, res); switch ((int)res) { case 0x00: diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 84be2887569eaa4534f35aa55f65b02bb423cc77..bcf31cbe278a41fc6e95c380e967a6eeace4370d 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -66,6 +66,7 @@ COBJS-$(CONFIG_ULI526X) += uli526x.o COBJS-$(CONFIG_VSC7385_ENET) += vsc7385.o COBJS-$(CONFIG_XILINX_EMAC) += xilinx_emac.o COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o +COBJS-$(CONFIG_SH_ETHER) += sh_eth.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c index c31029ab5502c34971d74c6185150af03e3e64a1..060b5189968e32dbc2c8db6fcfb40f8a9de97a6d 100644 --- a/drivers/net/e1000.c +++ b/drivers/net/e1000.c @@ -75,6 +75,7 @@ static struct pci_device_id supported[] = { {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82544GC_LOM}, {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82540EM}, {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82545EM_COPPER}, + {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82545GM_COPPER}, {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82546EB_COPPER}, {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82545EM_FIBER}, {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82546EB_FIBER}, @@ -636,6 +637,7 @@ e1000_set_mac_type(struct e1000_hw *hw) hw->mac_type = e1000_82540; break; case E1000_DEV_ID_82545EM_COPPER: + case E1000_DEV_ID_82545GM_COPPER: case E1000_DEV_ID_82545EM_FIBER: hw->mac_type = e1000_82545; break; diff --git a/drivers/net/e1000.h b/drivers/net/e1000.h index 23b2eb9b498a80ccb4e49a20740b34e3ba245a8f..c258bc2383e6526ab0bf1e12a18ee4cd0569c19f 100644 --- a/drivers/net/e1000.h +++ b/drivers/net/e1000.h @@ -217,13 +217,14 @@ struct e1000_phy_stats { #define E1000_DEV_ID_82544GC_LOM 0x100D #define E1000_DEV_ID_82540EM 0x100E #define E1000_DEV_ID_82540EM_LOM 0x1015 +#define E1000_DEV_ID_82545GM_COPPER 0x1026 #define E1000_DEV_ID_82545EM_COPPER 0x100F #define E1000_DEV_ID_82545EM_FIBER 0x1011 #define E1000_DEV_ID_82546EB_COPPER 0x1010 #define E1000_DEV_ID_82546EB_FIBER 0x1012 #define E1000_DEV_ID_82541ER 0x1078 #define E1000_DEV_ID_82541GI_LF 0x107C -#define NUM_DEV_IDS 15 +#define NUM_DEV_IDS 16 #define NODE_ADDRESS_SIZE 6 #define ETH_LENGTH_OF_ADDRESS 6 diff --git a/drivers/net/ne2000.c b/drivers/net/ne2000.c index 2da57b68bc280897dd9365b880656375c9774ed5..ec92485cbe78794423aff5e71ae623369f588a97 100644 --- a/drivers/net/ne2000.c +++ b/drivers/net/ne2000.c @@ -758,8 +758,6 @@ static hw_info_t hw_info[] = { #define NR_INFO (sizeof(hw_info)/sizeof(hw_info_t)) -u8 dev_addr[6]; - #define PCNET_CMD 0x00 #define PCNET_DATAPORT 0x10 /* NatSemi-defined port window offset. */ #define PCNET_RESET 0x1f /* Issue a read to reset, a write to clear. */ @@ -769,14 +767,14 @@ static void pcnet_reset_8390(void) { int i, r; - PRINTK("nic base is %lx\n", nic_base); + PRINTK("nic base is %lx\n", nic.base); n2k_outb(E8390_NODMA + E8390_PAGE0+E8390_STOP, E8390_CMD); - PRINTK("cmd (at %lx) is %x\n", nic_base + E8390_CMD, n2k_inb(E8390_CMD)); + PRINTK("cmd (at %lx) is %x\n", nic.base + E8390_CMD, n2k_inb(E8390_CMD)); n2k_outb(E8390_NODMA+E8390_PAGE1+E8390_STOP, E8390_CMD); - PRINTK("cmd (at %lx) is %x\n", nic_base + E8390_CMD, n2k_inb(E8390_CMD)); + PRINTK("cmd (at %lx) is %x\n", nic.base + E8390_CMD, n2k_inb(E8390_CMD)); n2k_outb(E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD); - PRINTK("cmd (at %lx) is %x\n", nic_base + E8390_CMD, n2k_inb(E8390_CMD)); + PRINTK("cmd (at %lx) is %x\n", nic.base + E8390_CMD, n2k_inb(E8390_CMD)); n2k_outb(E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD); n2k_outb(n2k_inb(PCNET_RESET), PCNET_RESET); @@ -852,8 +850,6 @@ int __get_prom(u8* mac_addr) return 0; } -u32 nic_base; - /* U-boot specific routines */ static u8 *pbuf = NULL; @@ -879,6 +875,7 @@ void uboot_push_tx_done(int key, int val) { int eth_init(bd_t *bd) { int r; + u8 dev_addr[6]; char ethaddr[20]; PRINTK("### eth_init\n"); @@ -901,7 +898,6 @@ int eth_init(bd_t *bd) { } #endif - nic_base = CONFIG_DRIVER_NE2000_BASE; nic.base = (u8 *) CONFIG_DRIVER_NE2000_BASE; r = get_prom(dev_addr); diff --git a/drivers/net/ns7520_eth.c b/drivers/net/ns7520_eth.c index 37411dfeb12633a8771689b61e98688e506f5903..e19c22325577a98797f959b5735d32a939b04d12 100644 --- a/drivers/net/ns7520_eth.c +++ b/drivers/net/ns7520_eth.c @@ -387,8 +387,8 @@ static int ns7520_eth_reset(void) ns7520_mii_get_clock_divisor(nPhyMaxMdioClock); /* reset PHY */ - ns7520_mii_write(PHY_COMMON_CTRL, PHY_COMMON_CTRL_RESET); - ns7520_mii_write(PHY_COMMON_CTRL, 0); + ns7520_mii_write(PHY_BMCR, PHY_BMCR_RESET); + ns7520_mii_write(PHY_BMCR, 0); udelay(3000); /* [2] p.70 says at least 300us reset recovery time. */ @@ -438,26 +438,23 @@ static void ns7520_link_auto_negotiate(void) /* run auto-negotation */ /* define what we are capable of */ - ns7520_mii_write(PHY_COMMON_AUTO_ADV, - PHY_COMMON_AUTO_ADV_100BTXFD | - PHY_COMMON_AUTO_ADV_100BTX | - PHY_COMMON_AUTO_ADV_10BTFD | - PHY_COMMON_AUTO_ADV_10BT | - PHY_COMMON_AUTO_ADV_802_3); + ns7520_mii_write(PHY_ANAR, + PHY_ANLPAR_TXFD | + PHY_ANLPAR_TX | + PHY_ANLPAR_10FD | + PHY_ANLPAR_10 | + PHY_ANLPAR_PSB_802_3); /* start auto-negotiation */ - ns7520_mii_write(PHY_COMMON_CTRL, - PHY_COMMON_CTRL_AUTO_NEG | - PHY_COMMON_CTRL_RES_AUTO); + ns7520_mii_write(PHY_BMCR, PHY_BMCR_AUTON | PHY_BMCR_RST_NEG); /* wait for completion */ ulStartJiffies = get_timer(0); while (get_timer(0) < ulStartJiffies + NS7520_MII_NEG_DELAY) { - uiStatus = ns7520_mii_read(PHY_COMMON_STAT); + uiStatus = ns7520_mii_read(PHY_BMSR); if ((uiStatus & - (PHY_COMMON_STAT_AN_COMP | PHY_COMMON_STAT_LNK_STAT)) - == - (PHY_COMMON_STAT_AN_COMP | PHY_COMMON_STAT_LNK_STAT)) { + (PHY_BMSR_AUTN_COMP | PHY_BMSR_LS)) == + (PHY_BMSR_AUTN_COMP | PHY_BMSR_LS)) { /* lucky we are, auto-negotiation succeeded */ ns7520_link_print_changed(); ns7520_link_update_egcr(); @@ -518,14 +515,13 @@ static void ns7520_link_print_changed(void) DEBUG_FN(DEBUG_LINK); - uiControl = ns7520_mii_read(PHY_COMMON_CTRL); + uiControl = ns7520_mii_read(PHY_BMCR); - if ((uiControl & PHY_COMMON_CTRL_AUTO_NEG) == - PHY_COMMON_CTRL_AUTO_NEG) { - /* PHY_COMMON_STAT_LNK_STAT is only set on autonegotiation */ - uiStatus = ns7520_mii_read(PHY_COMMON_STAT); + if ((uiControl & PHY_BMCR_AUTON) == PHY_BMCR_AUTON) { + /* PHY_BMSR_LS is only set on autonegotiation */ + uiStatus = ns7520_mii_read(PHY_BMSR); - if (!(uiStatus & PHY_COMMON_STAT_LNK_STAT)) { + if (!(uiStatus & PHY_BMSR_LS)) { printk(KERN_WARNING NS7520_DRIVER_NAME ": link down\n"); /* @TODO Linux: carrier_off */ @@ -586,12 +582,12 @@ static char ns7520_mii_identify_phy(void) DEBUG_FN(DEBUG_MII); - phyDetected = (PhyType) uiID1 = ns7520_mii_read(PHY_COMMON_ID1); + phyDetected = (PhyType) uiID1 = ns7520_mii_read(PHY_PHYIDR1); switch (phyDetected) { case PHY_LXT971A: szName = "LXT971A"; - uiID2 = ns7520_mii_read(PHY_COMMON_ID2); + uiID2 = ns7520_mii_read(PHY_PHYIDR2); nPhyMaxMdioClock = PHY_LXT971_MDIO_MAX_CLK; cRes = 1; break; diff --git a/drivers/net/ns8382x.c b/drivers/net/ns8382x.c index 0b9a3ae66d3ecd4823dfc8620faa8cafa602f3d9..bb5843815fc7bc46bbc622577005b5264a36a472 100644 --- a/drivers/net/ns8382x.c +++ b/drivers/net/ns8382x.c @@ -770,14 +770,14 @@ ns8382x_send(struct eth_device *dev, volatile void *packet, int length) for (i = 0; (tx_stat = le32_to_cpu(txd.cmdsts)) & DescOwn; i++) { if (i >= TOUT_LOOP) { - printf ("%s: tx error buffer not ready: txd.cmdsts %#X\n", + printf ("%s: tx error buffer not ready: txd.cmdsts %#lX\n", dev->name, tx_stat); goto Done; } } if (!(tx_stat & DescPktOK)) { - printf("ns8382x_send: Transmit error, Tx status %X.\n", tx_stat); + printf("ns8382x_send: Transmit error, Tx status %lX.\n", tx_stat); goto Done; } #ifdef NS8382X_DEBUG diff --git a/drivers/net/ns9750_eth.c b/drivers/net/ns9750_eth.c index 0559710ccf62d570ee2e08eb9531ef3210eb71b8..cade831ac90662d1c08e50f40ee27405ef803064 100644 --- a/drivers/net/ns9750_eth.c +++ b/drivers/net/ns9750_eth.c @@ -37,7 +37,7 @@ #include "ns9750_eth.h" /* for Ethernet and PHY */ -/* some definition to make transistion to linux easier */ +/* some definition to make transition to linux easier */ #define NS9750_DRIVER_NAME "eth" #define KERN_WARNING "Warning:" @@ -399,8 +399,8 @@ static int ns9750_eth_reset (void) ns9750_mii_get_clock_divisor (nPhyMaxMdioClock); /* reset PHY */ - ns9750_mii_write (PHY_COMMON_CTRL, PHY_COMMON_CTRL_RESET); - ns9750_mii_write (PHY_COMMON_CTRL, 0); + ns9750_mii_write(PHY_BMCR, PHY_BMCR_RESET); + ns9750_mii_write(PHY_BMCR, 0); /* @TODO check time */ udelay (3000); /* [2] p.70 says at least 300us reset recovery time. But @@ -455,26 +455,26 @@ static void ns9750_link_force (void) DEBUG_FN (DEBUG_LINK); - uiControl = ns9750_mii_read (PHY_COMMON_CTRL); - uiControl &= ~(PHY_COMMON_CTRL_SPD_MA | - PHY_COMMON_CTRL_AUTO_NEG | PHY_COMMON_CTRL_DUPLEX); + uiControl = ns9750_mii_read(PHY_BMCR); + uiControl &= ~(PHY_BMCR_SPEED_MASK | + PHY_BMCR_AUTON | PHY_BMCR_DPLX); uiLastLinkStatus = 0; if ((ucLinkMode & FS_EEPROM_AUTONEG_SPEED_MASK) == FS_EEPROM_AUTONEG_SPEED_100) { - uiControl |= PHY_COMMON_CTRL_SPD_100; + uiControl |= PHY_BMCR_100MB; uiLastLinkStatus |= PHY_LXT971_STAT2_100BTX; } else - uiControl |= PHY_COMMON_CTRL_SPD_10; + uiControl |= PHY_BMCR_10_MBPS; if ((ucLinkMode & FS_EEPROM_AUTONEG_DUPLEX_MASK) == FS_EEPROM_AUTONEG_DUPLEX_FULL) { - uiControl |= PHY_COMMON_CTRL_DUPLEX; + uiControl |= PHY_BMCR_DPLX; uiLastLinkStatus |= PHY_LXT971_STAT2_DUPLEX_MODE; } - ns9750_mii_write (PHY_COMMON_CTRL, uiControl); + ns9750_mii_write(PHY_BMCR, uiControl); ns9750_link_print_changed (); ns9750_link_update_egcr (); @@ -495,25 +495,23 @@ static void ns9750_link_auto_negotiate (void) /* run auto-negotation */ /* define what we are capable of */ - ns9750_mii_write (PHY_COMMON_AUTO_ADV, - PHY_COMMON_AUTO_ADV_100BTXFD | - PHY_COMMON_AUTO_ADV_100BTX | - PHY_COMMON_AUTO_ADV_10BTFD | - PHY_COMMON_AUTO_ADV_10BT | - PHY_COMMON_AUTO_ADV_802_3); + ns9750_mii_write(PHY_ANAR, + PHY_ANLPAR_TXFD | + PHY_ANLPAR_TX | + PHY_ANLPAR_10FD | + PHY_ANLPAR_10 | + PHY_ANLPAR_PSB_802_3); /* start auto-negotiation */ - ns9750_mii_write (PHY_COMMON_CTRL, - PHY_COMMON_CTRL_AUTO_NEG | - PHY_COMMON_CTRL_RES_AUTO); + ns9750_mii_write(PHY_BMCR, PHY_BMCR_AUTON | PHY_BMCR_RST_NEG); /* wait for completion */ ulStartJiffies = get_ticks (); while (get_ticks () < ulStartJiffies + NS9750_MII_NEG_DELAY) { - uiStatus = ns9750_mii_read (PHY_COMMON_STAT); + uiStatus = ns9750_mii_read(PHY_BMSR); if ((uiStatus & - (PHY_COMMON_STAT_AN_COMP | PHY_COMMON_STAT_LNK_STAT)) == - (PHY_COMMON_STAT_AN_COMP | PHY_COMMON_STAT_LNK_STAT)) { + (PHY_BMSR_AUTN_COMP | PHY_BMSR_LS)) == + (PHY_BMSR_AUTN_COMP | PHY_BMSR_LS)) { /* lucky we are, auto-negotiation succeeded */ ns9750_link_print_changed (); ns9750_link_update_egcr (); @@ -571,14 +569,13 @@ static void ns9750_link_print_changed (void) DEBUG_FN (DEBUG_LINK); - uiControl = ns9750_mii_read (PHY_COMMON_CTRL); + uiControl = ns9750_mii_read(PHY_BMCR); - if ((uiControl & PHY_COMMON_CTRL_AUTO_NEG) == - PHY_COMMON_CTRL_AUTO_NEG) { - /* PHY_COMMON_STAT_LNK_STAT is only set on autonegotiation */ - uiStatus = ns9750_mii_read (PHY_COMMON_STAT); + if ((uiControl & PHY_BMCR_AUTON) == PHY_BMCR_AUTON) { + /* PHY_BMSR_LS is only set on autonegotiation */ + uiStatus = ns9750_mii_read(PHY_BMSR); - if (!(uiStatus & PHY_COMMON_STAT_LNK_STAT)) { + if (!(uiStatus & PHY_BMSR_LS)) { printk (KERN_WARNING NS9750_DRIVER_NAME ": link down\n"); /* @TODO Linux: carrier_off */ @@ -592,7 +589,7 @@ static void ns9750_link_print_changed (void) /* mask out all uninteresting parts */ } - /* other PHYs must store there link information in + /* other PHYs must store their link information in uiStatus as PHY_LXT971 */ } } else { @@ -637,12 +634,12 @@ static char ns9750_mii_identify_phy (void) DEBUG_FN (DEBUG_MII); - phyDetected = (PhyType) uiID1 = ns9750_mii_read (PHY_COMMON_ID1); + phyDetected = (PhyType) uiID1 = ns9750_mii_read(PHY_PHYIDR1); switch (phyDetected) { case PHY_LXT971A: szName = "LXT971A"; - uiID2 = ns9750_mii_read (PHY_COMMON_ID2); + uiID2 = ns9750_mii_read(PHY_PHYIDR2); nPhyMaxMdioClock = PHY_LXT971_MDIO_MAX_CLK; cRes = 1; break; diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c index 7423bc0eb8e01565f779d9b35c0d03e2390409a5..d069afbe227b6f414f662c120713c15f85a21d85 100644 --- a/drivers/net/rtl8169.c +++ b/drivers/net/rtl8169.c @@ -392,7 +392,7 @@ static int rtl8169_init_board(struct eth_device *dev) /* if unknown chip, assume array element #0, original RTL-8169 in this case */ printf("PCI device %s: unknown chip version, assuming RTL-8169\n", dev->name); - printf("PCI device: TxConfig = 0x%hX\n", (unsigned long) RTL_R32(TxConfig)); + printf("PCI device: TxConfig = 0x%lX\n", (unsigned long) RTL_R32(TxConfig)); tpc->chipset = 0; match: diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c new file mode 100644 index 0000000000000000000000000000000000000000..9e3cf98b3b633191efb780ca44dab5a240101516 --- /dev/null +++ b/drivers/net/sh_eth.c @@ -0,0 +1,603 @@ +/* + * sh_eth.c - Driver for Renesas SH7763's ethernet controler. + * + * Copyright (C) 2008 Renesas Solutions Corp. + * Copyright (c) 2008 Nobuhiro Iwamatsu + * Copyright (c) 2007 Carlos Munoz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include + +#include "sh_eth.h" + +#ifndef CONFIG_SH_ETHER_USE_PORT +# error "Please define CONFIG_SH_ETHER_USE_PORT" +#endif +#ifndef CONFIG_SH_ETHER_PHY_ADDR +# error "Please define CONFIG_SH_ETHER_PHY_ADDR" +#endif + +extern int eth_init(bd_t *bd); +extern void eth_halt(void); +extern int eth_rx(void); +extern int eth_send(volatile void *packet, int length); + +static struct dev_info_s *dev; + +/* + * Bits are written to the PHY serially using the + * PIR register, just like a bit banger. + */ +static void sh_eth_mii_write_phy_bits(int port, u32 val, int len) +{ + int i; + u32 pir; + + /* Bit positions is 1 less than the number of bits */ + for (i = len - 1; i >= 0; i--) { + /* Write direction, bit to write, clock is low */ + pir = 2 | ((val & 1 << i) ? 1 << 2 : 0); + outl(pir, PIR(port)); + udelay(1); + /* Write direction, bit to write, clock is high */ + pir = 3 | ((val & 1 << i) ? 1 << 2 : 0); + outl(pir, PIR(port)); + udelay(1); + /* Write direction, bit to write, clock is low */ + pir = 2 | ((val & 1 << i) ? 1 << 2 : 0); + outl(pir, PIR(port)); + udelay(1); + } +} + +static void sh_eth_mii_bus_release(int port) +{ + /* Read direction, clock is low */ + outl(0, PIR(port)); + udelay(1); + /* Read direction, clock is high */ + outl(1, PIR(port)); + udelay(1); + /* Read direction, clock is low */ + outl(0, PIR(port)); + udelay(1); +} + +static void sh_eth_mii_ind_bus_release(int port) +{ + /* Read direction, clock is low */ + outl(0, PIR(port)); + udelay(1); +} + +static int sh_eth_mii_read_phy_bits(int port, u32 * val, int len) +{ + int i; + u32 pir; + + *val = 0; + for (i = len - 1; i >= 0; i--) { + /* Read direction, clock is high */ + outl(1, PIR(port)); + udelay(1); + /* Read bit */ + pir = inl(PIR(port)); + *val |= (pir & 8) ? 1 << i : 0; + /* Read direction, clock is low */ + outl(0, PIR(port)); + udelay(1); + } + + return 0; +} + +#define PHY_INIT 0xFFFFFFFF +#define PHY_READ 0x02 +#define PHY_WRITE 0x01 +/* + * To read a phy register, mii managements frames are sent to the phy. + * The frames look like this: + * pre (32 bits): 0xffff ffff + * st (2 bits): 01 + * op (2bits): 10: read 01: write + * phyad (5 bits): xxxxx + * regad (5 bits): xxxxx + * ta (Bus release): + * data (16 bits): read data + */ +static u32 sh_eth_mii_read_phy_reg(int port, u8 phy_addr, int reg) +{ + u32 val; + + /* Sent mii management frame */ + /* pre */ + sh_eth_mii_write_phy_bits(port, PHY_INIT, 32); + /* st (start of frame) */ + sh_eth_mii_write_phy_bits(port, 0x1, 2); + /* op (code) */ + sh_eth_mii_write_phy_bits(port, PHY_READ, 2); + /* phy address */ + sh_eth_mii_write_phy_bits(port, phy_addr, 5); + /* Register to read */ + sh_eth_mii_write_phy_bits(port, reg, 5); + + /* Bus release */ + sh_eth_mii_bus_release(port); + + /* Read register */ + sh_eth_mii_read_phy_bits(port, &val, 16); + + return val; +} + +/* + * To write a phy register, mii managements frames are sent to the phy. + * The frames look like this: + * pre (32 bits): 0xffff ffff + * st (2 bits): 01 + * op (2bits): 10: read 01: write + * phyad (5 bits): xxxxx + * regad (5 bits): xxxxx + * ta (2 bits): 10 + * data (16 bits): write data + * idle (Independent bus release) + */ +static void sh_eth_mii_write_phy_reg(int port, u8 phy_addr, int reg, u16 val) +{ + /* Sent mii management frame */ + /* pre */ + sh_eth_mii_write_phy_bits(port, PHY_INIT, 32); + /* st (start of frame) */ + sh_eth_mii_write_phy_bits(port, 0x1, 2); + /* op (code) */ + sh_eth_mii_write_phy_bits(port, PHY_WRITE, 2); + /* phy address */ + sh_eth_mii_write_phy_bits(port, phy_addr, 5); + /* Register to read */ + sh_eth_mii_write_phy_bits(port, reg, 5); + /* ta */ + sh_eth_mii_write_phy_bits(port, PHY_READ, 2); + /* Write register data */ + sh_eth_mii_write_phy_bits(port, val, 16); + + /* Independent bus release */ + sh_eth_mii_ind_bus_release(port); +} + +void eth_halt(void) +{ +} + +int eth_send(volatile void *packet, int len) +{ + int port = dev->port; + struct port_info_s *port_info = &dev->port_info[port]; + int timeout; + int rc = 0; + + if (!packet || len > 0xffff) { + printf("eth_send: Invalid argument\n"); + return -EINVAL; + } + + /* packet must be a 4 byte boundary */ + if ((int)packet & (4 - 1)) { + printf("eth_send: packet not 4 byte alligned\n"); + return -EFAULT; + } + + /* Update tx descriptor */ + port_info->tx_desc_cur->td2 = ADDR_TO_PHY(packet); + port_info->tx_desc_cur->td1 = len << 16; + /* Must preserve the end of descriptor list indication */ + if (port_info->tx_desc_cur->td0 & TD_TDLE) + port_info->tx_desc_cur->td0 = TD_TACT | TD_TFP | TD_TDLE; + else + port_info->tx_desc_cur->td0 = TD_TACT | TD_TFP; + + /* Restart the transmitter if disabled */ + if (!(inl(EDTRR(port)) & EDTRR_TRNS)) + outl(EDTRR_TRNS, EDTRR(port)); + + /* Wait until packet is transmitted */ + timeout = 1000; + while (port_info->tx_desc_cur->td0 & TD_TACT && timeout--) + udelay(100); + + if (timeout < 0) { + printf("eth_send: transmit timeout\n"); + rc = -1; + goto err; + } + +err: + port_info->tx_desc_cur++; + if (port_info->tx_desc_cur >= port_info->tx_desc_base + NUM_TX_DESC) + port_info->tx_desc_cur = port_info->tx_desc_base; + + return rc; +} + +int eth_rx(void) +{ + int port = dev->port; + struct port_info_s *port_info = &dev->port_info[port]; + int len = 0; + volatile u8 *packet; + + /* Check if the rx descriptor is ready */ + if (!(port_info->rx_desc_cur->rd0 & RD_RACT)) { + /* Check for errors */ + if (!(port_info->rx_desc_cur->rd0 & RD_RFE)) { + len = port_info->rx_desc_cur->rd1 & 0xffff; + packet = (volatile u8 *) + ADDR_TO_P2(port_info->rx_desc_cur->rd2); + NetReceive(packet, len); + } + + /* Make current descriptor available again */ + if (port_info->rx_desc_cur->rd0 & RD_RDLE) + port_info->rx_desc_cur->rd0 = RD_RACT | RD_RDLE; + else + port_info->rx_desc_cur->rd0 = RD_RACT; + + /* Point to the next descriptor */ + port_info->rx_desc_cur++; + if (port_info->rx_desc_cur >= + port_info->rx_desc_base + NUM_RX_DESC) + port_info->rx_desc_cur = port_info->rx_desc_base; + } + + /* Restart the receiver if disabled */ + if (!(inl(EDRRR(port)) & EDRRR_R)) + outl(EDRRR_R, EDRRR(port)); + + return len; +} + +#define EDMR_INIT_CNT 1000 +static int sh_eth_reset(struct dev_info_s *dev) +{ + int port = dev->port; + int i; + + /* Start e-dmac transmitter and receiver */ + outl(EDSR_ENALL, EDSR(port)); + + /* Perform a software reset and wait for it to complete */ + outl(EDMR_SRST, EDMR(port)); + for (i = 0; i < EDMR_INIT_CNT; i++) { + if (!(inl(EDMR(port)) & EDMR_SRST)) + break; + udelay(1000); + } + + if (i == EDMR_INIT_CNT) { + printf("Error: Software reset timeout\n"); + return -1; + } + return 0; +} + +static int sh_eth_tx_desc_init(struct dev_info_s *dev) +{ + int port = dev->port; + struct port_info_s *port_info = &dev->port_info[port]; + u32 tmp_addr; + struct tx_desc_s *cur_tx_desc; + int i; + + /* Allocate tx descriptors. They must be TX_DESC_SIZE bytes + aligned */ + if (!(port_info->tx_desc_malloc = malloc(NUM_TX_DESC * + sizeof(struct tx_desc_s) + + TX_DESC_SIZE - 1))) { + printf("Error: malloc failed\n"); + return -ENOMEM; + } + tmp_addr = (u32) (((int)port_info->tx_desc_malloc + TX_DESC_SIZE - 1) & + ~(TX_DESC_SIZE - 1)); + /* Make sure we use a P2 address (non-cacheable) */ + port_info->tx_desc_base = (struct tx_desc_s *)ADDR_TO_P2(tmp_addr); + + port_info->tx_desc_cur = port_info->tx_desc_base; + + /* Initialize all descriptors */ + for (cur_tx_desc = port_info->tx_desc_base, i = 0; i < NUM_TX_DESC; + cur_tx_desc++, i++) { + cur_tx_desc->td0 = 0x00; + cur_tx_desc->td1 = 0x00; + cur_tx_desc->td2 = 0x00; + } + + /* Mark the end of the descriptors */ + cur_tx_desc--; + cur_tx_desc->td0 |= TD_TDLE; + + /* Point the controller to the tx descriptor list. Must use physical + addresses */ + outl(ADDR_TO_PHY(port_info->tx_desc_base), TDLAR(port)); + outl(ADDR_TO_PHY(port_info->tx_desc_base), TDFAR(port)); + outl(ADDR_TO_PHY(cur_tx_desc), TDFXR(port)); + outl(0x01, TDFFR(port));/* Last discriptor bit */ + + return 0; +} + +static int sh_eth_rx_desc_init(struct dev_info_s *dev) +{ + int port = dev->port; + struct port_info_s *port_info = &dev->port_info[port]; + u32 tmp_addr; + struct rx_desc_s *cur_rx_desc; + u8 *rx_buf; + int i; + + /* Allocate rx descriptors. They must be RX_DESC_SIZE bytes + aligned */ + if (!(port_info->rx_desc_malloc = malloc(NUM_RX_DESC * + sizeof(struct rx_desc_s) + + RX_DESC_SIZE - 1))) { + printf("Error: malloc failed\n"); + return -ENOMEM; + } + tmp_addr = (u32) (((int)port_info->rx_desc_malloc + RX_DESC_SIZE - 1) & + ~(RX_DESC_SIZE - 1)); + /* Make sure we use a P2 address (non-cacheable) */ + port_info->rx_desc_base = (struct rx_desc_s *)ADDR_TO_P2(tmp_addr); + + port_info->rx_desc_cur = port_info->rx_desc_base; + + /* Allocate rx data buffers. They must be 32 bytes aligned and in + P2 area */ + if (!(port_info->rx_buf_malloc = malloc(NUM_RX_DESC * MAX_BUF_SIZE + + 31))) { + printf("Error: malloc failed\n"); + free(port_info->rx_desc_malloc); + port_info->rx_desc_malloc = NULL; + return -ENOMEM; + } + tmp_addr = (u32)(((int)port_info->rx_buf_malloc + (32 - 1)) & + ~(32 - 1)); + port_info->rx_buf_base = (u8 *)ADDR_TO_P2(tmp_addr); + + /* Initialize all descriptors */ + for (cur_rx_desc = port_info->rx_desc_base, + rx_buf = port_info->rx_buf_base, i = 0; + i < NUM_RX_DESC; cur_rx_desc++, rx_buf += MAX_BUF_SIZE, i++) { + cur_rx_desc->rd0 = RD_RACT; + cur_rx_desc->rd1 = MAX_BUF_SIZE << 16; + cur_rx_desc->rd2 = (u32) ADDR_TO_PHY(rx_buf); + } + + /* Mark the end of the descriptors */ + cur_rx_desc--; + cur_rx_desc->rd0 |= RD_RDLE; + + /* Point the controller to the rx descriptor list */ + outl(ADDR_TO_PHY(port_info->rx_desc_base), RDLAR(port)); + outl(ADDR_TO_PHY(port_info->rx_desc_base), RDFAR(port)); + outl(ADDR_TO_PHY(cur_rx_desc), RDFXR(port)); + outl(RDFFR_RDLF, RDFFR(port)); + + return 0; +} + +static void sh_eth_desc_free(struct dev_info_s *dev) +{ + int port = dev->port; + struct port_info_s *port_info = &dev->port_info[port]; + + if (port_info->tx_desc_malloc) { + free(port_info->tx_desc_malloc); + port_info->tx_desc_malloc = NULL; + } + + if (port_info->rx_desc_malloc) { + free(port_info->rx_desc_malloc); + port_info->rx_desc_malloc = NULL; + } + + if (port_info->rx_buf_malloc) { + free(port_info->rx_buf_malloc); + port_info->rx_buf_malloc = NULL; + } +} + +static int sh_eth_desc_init(struct dev_info_s *dev) +{ + int rc; + + if ((rc = sh_eth_tx_desc_init(dev)) || (rc = sh_eth_rx_desc_init(dev))) { + sh_eth_desc_free(dev); + return rc; + } + + return 0; +} + +static int sh_eth_phy_config(struct dev_info_s *dev) +{ + int port = dev->port; + struct port_info_s *port_info = &dev->port_info[port]; + int timeout; + u32 val; + /* Reset phy */ + sh_eth_mii_write_phy_reg(port, port_info->phy_addr, PHY_CTRL, PHY_C_RESET); + timeout = 10; + while (timeout--) { + val = sh_eth_mii_read_phy_reg(port, port_info->phy_addr, PHY_CTRL); + if (!(val & PHY_C_RESET)) + break; + udelay(50000); + } + if (timeout < 0) { + printf("%s phy reset timeout\n", __func__); + return -1; + } + + /* Advertise 100/10 baseT full/half duplex */ + sh_eth_mii_write_phy_reg(port, port_info->phy_addr, PHY_ANA, + (PHY_A_FDX|PHY_A_HDX|PHY_A_10FDX|PHY_A_10HDX|PHY_A_EXT)); + /* Autonegotiation, normal operation, full duplex, enable tx */ + sh_eth_mii_write_phy_reg(port, port_info->phy_addr, PHY_CTRL, + (PHY_C_ANEGEN|PHY_C_RANEG)); + /* Wait for autonegotiation to complete */ + timeout = 100; + while (timeout--) { + val = sh_eth_mii_read_phy_reg(port, port_info->phy_addr, 1); + if (val & PHY_S_ANEGC) + break; + udelay(50000); + } + if (timeout < 0) { + printf("sh_eth_phy_config() phy auto-negotiation failed\n"); + return -1; + } + + return 0; +} + +static int sh_eth_config(struct dev_info_s *dev, bd_t * bd) +{ + int port = dev->port; + struct port_info_s *port_info = &dev->port_info[port]; + u32 val; + u32 phy_status; + int rc; + + /* Configure e-dmac registers */ + outl((inl(EDMR(port)) & ~EMDR_DESC_R) | EDMR_EL, EDMR(port)); + outl(0, EESIPR(port)); + outl(0, TRSCER(port)); + outl(0, TFTR(port)); + outl((FIFO_SIZE_T | FIFO_SIZE_R), FDR(port)); + outl(RMCR_RST, RMCR(port)); + outl(0, RPADIR(port)); + outl((FIFO_F_D_RFF | FIFO_F_D_RFD), FCFTR(port)); + + /* Configure e-mac registers */ + outl(0, ECSIPR(port)); + + /* Set Mac address */ + val = bd->bi_enetaddr[0] << 24 | bd->bi_enetaddr[1] << 16 | + bd->bi_enetaddr[2] << 8 | bd->bi_enetaddr[3]; + outl(val, MAHR(port)); + + val = bd->bi_enetaddr[4] << 8 | bd->bi_enetaddr[5]; + outl(val, MALR(port)); + + outl(RFLR_RFL_MIN, RFLR(port)); + outl(0, PIPR(port)); + outl(APR_AP, APR(port)); + outl(MPR_MP, MPR(port)); + outl(TPAUSER_TPAUSE, TPAUSER(port)); + + /* Configure phy */ + if ((rc = sh_eth_phy_config(dev))) + return rc; + + /* Read phy status to finish configuring the e-mac */ + phy_status = sh_eth_mii_read_phy_reg(dev->port, + dev->port_info[dev->port].phy_addr, + 1); + + /* Set the transfer speed */ + if (phy_status & (PHY_S_100X_F|PHY_S_100X_H)) { + printf("100Base/"); + outl(GECMR_100B, GECMR(port)); + } else { + printf("10Base/"); + outl(GECMR_10B, GECMR(port)); + } + + /* Check if full duplex mode is supported by the phy */ + if (phy_status & (PHY_S_100X_F|PHY_S_10T_F)) { + printf("Full\n"); + outl((ECMR_CHG_DM|ECMR_RE|ECMR_TE|ECMR_DM), ECMR(port)); + } else { + printf("Half\n"); + outl((ECMR_CHG_DM|ECMR_RE|ECMR_TE), ECMR(port)); + } + return 0; +} + +static int sh_eth_start(struct dev_info_s *dev) +{ + /* + * Enable the e-dmac receiver only. The transmitter will be enabled when + * we have something to transmit + */ + outl(EDRRR_R, EDRRR(dev->port)); + + return 0; +} + +static int sh_eth_get_mac(bd_t *bd) +{ + char *s, *e; + int i; + + s = getenv("ethaddr"); + if (s != NULL) { + for (i = 0; i < 6; ++i) { + bd->bi_enetaddr[i] = s ? simple_strtoul(s, &e, 16) : 0; + if (s) + s = (*e) ? e + 1 : e; + } + } else { + puts("Please set MAC address\n"); + } + return 0; +} + +int eth_init(bd_t *bd) +{ + int rc; + /* Allocate main device information structure */ + if (!(dev = malloc(sizeof(*dev)))) { + printf("eth_init: malloc failed\n"); + return -ENOMEM; + } + + memset(dev, 0, sizeof(*dev)); + + dev->port = CONFIG_SH_ETHER_USE_PORT; + dev->port_info[dev->port].phy_addr = CONFIG_SH_ETHER_PHY_ADDR; + + sh_eth_get_mac(bd); + + if ((rc = sh_eth_reset(dev)) || (rc = sh_eth_desc_init(dev))) + goto err; + + if ((rc = sh_eth_config(dev, bd)) || (rc = sh_eth_start(dev))) + goto err_desc; + + return 0; + +err_desc: + sh_eth_desc_free(dev); +err: + free(dev); + printf("eth_init: Failed\n"); + return rc; +} diff --git a/drivers/net/sh_eth.h b/drivers/net/sh_eth.h new file mode 100644 index 0000000000000000000000000000000000000000..9cf0ea0b9e7cd635903bd30fccdb817585025d15 --- /dev/null +++ b/drivers/net/sh_eth.h @@ -0,0 +1,446 @@ +/* + * sh_eth.h - Driver for Renesas SH7763's gigabit ethernet controler. + * + * Copyright (C) 2008 Renesas Solutions Corp. + * Copyright (c) 2008 Nobuhiro Iwamatsu + * Copyright (c) 2007 Carlos Munoz + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include + +#define SHETHER_NAME "sh_eth" + +/* Malloc returns addresses in the P1 area (cacheable). However we need to + use area P2 (non-cacheable) */ +#define ADDR_TO_P2(addr) ((((int)(addr) & ~0xe0000000) | 0xa0000000)) + +/* The ethernet controller needs to use physical addresses */ +#define ADDR_TO_PHY(addr) ((int)(addr) & ~0xe0000000) + +/* Number of supported ports */ +#define MAX_PORT_NUM 2 + +/* Buffers must be big enough to hold the largest ethernet frame. Also, rx + buffers must be a multiple of 32 bytes */ +#define MAX_BUF_SIZE (48 * 32) + +/* The number of tx descriptors must be large enough to point to 5 or more + frames. If each frame uses 2 descriptors, at least 10 descriptors are needed. + We use one descriptor per frame */ +#define NUM_TX_DESC 8 + +/* The size of the tx descriptor is determined by how much padding is used. + 4, 20, or 52 bytes of padding can be used */ +#define TX_DESC_PADDING 4 +#define TX_DESC_SIZE (12 + TX_DESC_PADDING) + +/* Tx descriptor. We always use 4 bytes of padding */ +struct tx_desc_s { + volatile u32 td0; + u32 td1; + u32 td2; /* Buffer start */ + u32 padding; +}; + +/* There is no limitation in the number of rx descriptors */ +#define NUM_RX_DESC 8 + +/* The size of the rx descriptor is determined by how much padding is used. + 4, 20, or 52 bytes of padding can be used */ +#define RX_DESC_PADDING 4 +#define RX_DESC_SIZE (12 + RX_DESC_PADDING) + +/* Rx descriptor. We always use 4 bytes of padding */ +struct rx_desc_s { + volatile u32 rd0; + volatile u32 rd1; + u32 rd2; /* Buffer start */ + u32 padding; +}; + +struct port_info_s { + struct tx_desc_s *tx_desc_malloc; + struct tx_desc_s *tx_desc_base; + struct tx_desc_s *tx_desc_cur; + struct rx_desc_s *rx_desc_malloc; + struct rx_desc_s *rx_desc_base; + struct rx_desc_s *rx_desc_cur; + u8 *rx_buf_malloc; + u8 *rx_buf_base; + u8 mac_addr[6]; + u8 phy_addr; +}; + +struct dev_info_s { + int port; + struct port_info_s port_info[MAX_PORT_NUM]; +}; + +/* Register Address */ +#define BASE_IO_ADDR 0xfee00000 + +#define EDSR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0000) + +#define TDLAR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0010) +#define TDFAR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0014) +#define TDFXR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0018) +#define TDFFR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x001c) + +#define RDLAR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0030) +#define RDFAR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0034) +#define RDFXR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0038) +#define RDFFR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x003c) + +#define EDMR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0400) +#define EDTRR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0408) +#define EDRRR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0410) +#define EESR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0428) +#define EESIPR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0430) +#define TRSCER(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0438) +#define TFTR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0448) +#define FDR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0450) +#define RMCR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0458) +#define RPADIR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0460) +#define FCFTR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0468) +#define ECMR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0500) +#define RFLR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0508) +#define ECSIPR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0518) +#define PIR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0520) +#define PIPR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x052c) +#define APR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0554) +#define MPR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0558) +#define TPAUSER(port) (BASE_IO_ADDR + 0x800 * (port) + 0x0564) +#define GECMR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x05b0) +#define MALR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x05c8) +#define MAHR(port) (BASE_IO_ADDR + 0x800 * (port) + 0x05c0) + +/* + * Register's bits + * Copy from Linux driver source code + */ +#ifdef CONFIG_CPU_SH7763 +/* EDSR */ +enum EDSR_BIT { + EDSR_ENT = 0x01, EDSR_ENR = 0x02, +}; +#define EDSR_ENALL (EDSR_ENT|EDSR_ENR) +#endif + +/* EDMR */ +enum DMAC_M_BIT { + EDMR_DL1 = 0x20, EDMR_DL0 = 0x10, +#ifdef CONFIG_CPU_SH7763 + EDMR_SRST = 0x03, + EMDR_DESC_R = 0x30, /* Descriptor reserve size */ + EDMR_EL = 0x40, /* Litte endian */ +#else /* CONFIG_CPU_SH7763 */ + EDMR_SRST = 0x01, +#endif +}; + +/* RFLR */ +#define RFLR_RFL_MIN 0x05EE /* Recv Frame length 1518 byte */ + +/* EDTRR */ +enum DMAC_T_BIT { +#ifdef CONFIG_CPU_SH7763 + EDTRR_TRNS = 0x03, +#else + EDTRR_TRNS = 0x01, +#endif +}; + +/* GECMR */ +enum GECMR_BIT { + GECMR_1000B = 0x01, GECMR_100B = 0x40, GECMR_10B = 0x00, +}; + +/* EDRRR*/ +enum EDRRR_R_BIT { + EDRRR_R = 0x01, +}; + +/* TPAUSER */ +enum TPAUSER_BIT { + TPAUSER_TPAUSE = 0x0000ffff, + TPAUSER_UNLIMITED = 0, +}; + +/* BCFR */ +enum BCFR_BIT { + BCFR_RPAUSE = 0x0000ffff, + BCFR_UNLIMITED = 0, +}; + +/* PIR */ +enum PIR_BIT { + PIR_MDI = 0x08, PIR_MDO = 0x04, PIR_MMD = 0x02, PIR_MDC = 0x01, +}; + +/* PSR */ +enum PHY_STATUS_BIT { PHY_ST_LINK = 0x01, }; + +/* EESR */ +enum EESR_BIT { +#ifndef CONFIG_CPU_SH7763 + EESR_TWB = 0x40000000, +#else + EESR_TWB = 0xC0000000, + EESR_TC1 = 0x20000000, + EESR_TUC = 0x10000000, + EESR_ROC = 0x80000000, +#endif + EESR_TABT = 0x04000000, + EESR_RABT = 0x02000000, EESR_RFRMER = 0x01000000, +#ifndef CONFIG_CPU_SH7763 + EESR_ADE = 0x00800000, +#endif + EESR_ECI = 0x00400000, + EESR_FTC = 0x00200000, EESR_TDE = 0x00100000, + EESR_TFE = 0x00080000, EESR_FRC = 0x00040000, + EESR_RDE = 0x00020000, EESR_RFE = 0x00010000, +#ifndef CONFIG_CPU_SH7763 + EESR_CND = 0x00000800, +#endif + EESR_DLC = 0x00000400, + EESR_CD = 0x00000200, EESR_RTO = 0x00000100, + EESR_RMAF = 0x00000080, EESR_CEEF = 0x00000040, + EESR_CELF = 0x00000020, EESR_RRF = 0x00000010, + rESR_RTLF = 0x00000008, EESR_RTSF = 0x00000004, + EESR_PRE = 0x00000002, EESR_CERF = 0x00000001, +}; + + +#ifdef CONFIG_CPU_SH7763 +# define TX_CHECK (EESR_TC1 | EESR_FTC) +# define EESR_ERR_CHECK (EESR_TWB | EESR_TABT | EESR_RABT | EESR_RDE \ + | EESR_RFRMER | EESR_TFE | EESR_TDE | EESR_ECI) +# define TX_ERROR_CEHCK (EESR_TWB | EESR_TABT | EESR_TDE | EESR_TFE) + +#else +# define TX_CHECK (EESR_FTC | EESR_CND | EESR_DLC | EESR_CD | EESR_RTO) +# define EESR_ERR_CHECK (EESR_TWB | EESR_TABT | EESR_RABT | EESR_RDE \ + | EESR_RFRMER | EESR_ADE | EESR_TFE | EESR_TDE | EESR_ECI) +# define TX_ERROR_CEHCK (EESR_TWB | EESR_TABT | EESR_ADE | EESR_TDE | EESR_TFE) +#endif + +/* EESIPR */ +enum DMAC_IM_BIT { + DMAC_M_TWB = 0x40000000, DMAC_M_TABT = 0x04000000, + DMAC_M_RABT = 0x02000000, + DMAC_M_RFRMER = 0x01000000, DMAC_M_ADF = 0x00800000, + DMAC_M_ECI = 0x00400000, DMAC_M_FTC = 0x00200000, + DMAC_M_TDE = 0x00100000, DMAC_M_TFE = 0x00080000, + DMAC_M_FRC = 0x00040000, DMAC_M_RDE = 0x00020000, + DMAC_M_RFE = 0x00010000, DMAC_M_TINT4 = 0x00000800, + DMAC_M_TINT3 = 0x00000400, DMAC_M_TINT2 = 0x00000200, + DMAC_M_TINT1 = 0x00000100, DMAC_M_RINT8 = 0x00000080, + DMAC_M_RINT5 = 0x00000010, DMAC_M_RINT4 = 0x00000008, + DMAC_M_RINT3 = 0x00000004, DMAC_M_RINT2 = 0x00000002, + DMAC_M_RINT1 = 0x00000001, +}; + +/* Receive descriptor bit */ +enum RD_STS_BIT { + RD_RACT = 0x80000000, RD_RDLE = 0x40000000, + RD_RFP1 = 0x20000000, RD_RFP0 = 0x10000000, + RD_RFE = 0x08000000, RD_RFS10 = 0x00000200, + RD_RFS9 = 0x00000100, RD_RFS8 = 0x00000080, + RD_RFS7 = 0x00000040, RD_RFS6 = 0x00000020, + RD_RFS5 = 0x00000010, RD_RFS4 = 0x00000008, + RD_RFS3 = 0x00000004, RD_RFS2 = 0x00000002, + RD_RFS1 = 0x00000001, +}; +#define RDF1ST RD_RFP1 +#define RDFEND RD_RFP0 +#define RD_RFP (RD_RFP1|RD_RFP0) + +/* RDFFR*/ +enum RDFFR_BIT { + RDFFR_RDLF = 0x01, +}; + +/* FCFTR */ +enum FCFTR_BIT { + FCFTR_RFF2 = 0x00040000, FCFTR_RFF1 = 0x00020000, + FCFTR_RFF0 = 0x00010000, FCFTR_RFD2 = 0x00000004, + FCFTR_RFD1 = 0x00000002, FCFTR_RFD0 = 0x00000001, +}; +#define FIFO_F_D_RFF (FCFTR_RFF2|FCFTR_RFF1|FCFTR_RFF0) +#define FIFO_F_D_RFD (FCFTR_RFD2|FCFTR_RFD1|FCFTR_RFD0) + +/* Transfer descriptor bit */ +enum TD_STS_BIT { +#ifdef CONFIG_CPU_SH7763 + TD_TACT = 0x80000000, +#else + TD_TACT = 0x7fffffff, +#endif + TD_TDLE = 0x40000000, TD_TFP1 = 0x20000000, + TD_TFP0 = 0x10000000, +}; +#define TDF1ST TD_TFP1 +#define TDFEND TD_TFP0 +#define TD_TFP (TD_TFP1|TD_TFP0) + +/* RMCR */ +enum RECV_RST_BIT { RMCR_RST = 0x01, }; +/* ECMR */ +enum FELIC_MODE_BIT { +#ifdef CONFIG_CPU_SH7763 + ECMR_TRCCM=0x04000000, ECMR_RCSC= 0x00800000, ECMR_DPAD= 0x00200000, + ECMR_RZPF = 0x00100000, +#endif + ECMR_ZPF = 0x00080000, ECMR_PFR = 0x00040000, ECMR_RXF = 0x00020000, + ECMR_TXF = 0x00010000, ECMR_MCT = 0x00002000, ECMR_PRCEF = 0x00001000, + ECMR_PMDE = 0x00000200, ECMR_RE = 0x00000040, ECMR_TE = 0x00000020, + ECMR_ILB = 0x00000008, ECMR_ELB = 0x00000004, ECMR_DM = 0x00000002, + ECMR_PRM = 0x00000001, +}; + +#ifdef CONFIG_CPU_SH7763 +#define ECMR_CHG_DM (ECMR_TRCCM | ECMR_RZPF | ECMR_ZPF | ECMR_PFR | ECMR_RXF | \ + ECMR_TXF | ECMR_MCT) +#else +#define ECMR_CHG_DM (ECMR_ZPF | ECMR_PFR ECMR_RXF | ECMR_TXF | ECMR_MCT) +#endif + +/* ECSR */ +enum ECSR_STATUS_BIT { +#ifndef CONFIG_CPU_SH7763 + ECSR_BRCRX = 0x20, ECSR_PSRTO = 0x10, +#endif + ECSR_LCHNG = 0x04, + ECSR_MPD = 0x02, ECSR_ICD = 0x01, +}; + +#ifdef CONFIG_CPU_SH7763 +# define ECSR_INIT (ECSR_ICD | ECSIPR_MPDIP) +#else +# define ECSR_INIT (ECSR_BRCRX | ECSR_PSRTO | \ + ECSR_LCHNG | ECSR_ICD | ECSIPR_MPDIP) +#endif + +/* ECSIPR */ +enum ECSIPR_STATUS_MASK_BIT { +#ifndef CONFIG_CPU_SH7763 + ECSIPR_BRCRXIP = 0x20, ECSIPR_PSRTOIP = 0x10, +#endif + ECSIPR_LCHNGIP = 0x04, + ECSIPR_MPDIP = 0x02, ECSIPR_ICDIP = 0x01, +}; + +#ifdef CONFIG_CPU_SH7763 +# define ECSIPR_INIT (ECSIPR_LCHNGIP | ECSIPR_ICDIP | ECSIPR_MPDIP) +#else +# define ECSIPR_INIT (ECSIPR_BRCRXIP | ECSIPR_PSRTOIP | ECSIPR_LCHNGIP | \ + ECSIPR_ICDIP | ECSIPR_MPDIP) +#endif + +/* APR */ +enum APR_BIT { + APR_AP = 0x00000004, +}; + +/* MPR */ +enum MPR_BIT { + MPR_MP = 0x00000006, +}; + +/* TRSCER */ +enum DESC_I_BIT { + DESC_I_TINT4 = 0x0800, DESC_I_TINT3 = 0x0400, DESC_I_TINT2 = 0x0200, + DESC_I_TINT1 = 0x0100, DESC_I_RINT8 = 0x0080, DESC_I_RINT5 = 0x0010, + DESC_I_RINT4 = 0x0008, DESC_I_RINT3 = 0x0004, DESC_I_RINT2 = 0x0002, + DESC_I_RINT1 = 0x0001, +}; + +/* RPADIR */ +enum RPADIR_BIT { + RPADIR_PADS1 = 0x20000, RPADIR_PADS0 = 0x10000, + RPADIR_PADR = 0x0003f, +}; + +#ifdef CONFIG_CPU_SH7763 +# define RPADIR_INIT (0x00) +#else +# define RPADIR_INIT (RPADIR_PADS1) +#endif + +/* FDR */ +enum FIFO_SIZE_BIT { + FIFO_SIZE_T = 0x00000700, FIFO_SIZE_R = 0x00000007, +}; + +enum PHY_OFFSETS { + PHY_CTRL = 0, PHY_STAT = 1, PHY_IDT1 = 2, PHY_IDT2 = 3, + PHY_ANA = 4, PHY_ANL = 5, PHY_ANE = 6, + PHY_16 = 16, +}; + +/* PHY_CTRL */ +enum PHY_CTRL_BIT { + PHY_C_RESET = 0x8000, PHY_C_LOOPBK = 0x4000, PHY_C_SPEEDSL = 0x2000, + PHY_C_ANEGEN = 0x1000, PHY_C_PWRDN = 0x0800, PHY_C_ISO = 0x0400, + PHY_C_RANEG = 0x0200, PHY_C_DUPLEX = 0x0100, PHY_C_COLT = 0x0080, +}; +#define DM9161_PHY_C_ANEGEN 0 /* auto nego special */ + +/* PHY_STAT */ +enum PHY_STAT_BIT { + PHY_S_100T4 = 0x8000, PHY_S_100X_F = 0x4000, PHY_S_100X_H = 0x2000, + PHY_S_10T_F = 0x1000, PHY_S_10T_H = 0x0800, PHY_S_ANEGC = 0x0020, + PHY_S_RFAULT = 0x0010, PHY_S_ANEGA = 0x0008, PHY_S_LINK = 0x0004, + PHY_S_JAB = 0x0002, PHY_S_EXTD = 0x0001, +}; + +/* PHY_ANA */ +enum PHY_ANA_BIT { + PHY_A_NP = 0x8000, PHY_A_ACK = 0x4000, PHY_A_RF = 0x2000, + PHY_A_FCS = 0x0400, PHY_A_T4 = 0x0200, PHY_A_FDX = 0x0100, + PHY_A_HDX = 0x0080, PHY_A_10FDX = 0x0040, PHY_A_10HDX = 0x0020, + PHY_A_SEL = 0x001e, + PHY_A_EXT = 0x0001, +}; + +/* PHY_ANL */ +enum PHY_ANL_BIT { + PHY_L_NP = 0x8000, PHY_L_ACK = 0x4000, PHY_L_RF = 0x2000, + PHY_L_FCS = 0x0400, PHY_L_T4 = 0x0200, PHY_L_FDX = 0x0100, + PHY_L_HDX = 0x0080, PHY_L_10FDX = 0x0040, PHY_L_10HDX = 0x0020, + PHY_L_SEL = 0x001f, +}; + +/* PHY_ANE */ +enum PHY_ANE_BIT { + PHY_E_PDF = 0x0010, PHY_E_LPNPA = 0x0008, PHY_E_NPA = 0x0004, + PHY_E_PRX = 0x0002, PHY_E_LPANEGA = 0x0001, +}; + +/* DM9161 */ +enum PHY_16_BIT { + PHY_16_BP4B45 = 0x8000, PHY_16_BPSCR = 0x4000, PHY_16_BPALIGN = 0x2000, + PHY_16_BP_ADPOK = 0x1000, PHY_16_Repeatmode = 0x0800, + PHY_16_TXselect = 0x0400, + PHY_16_Rsvd = 0x0200, PHY_16_RMIIEnable = 0x0100, + PHY_16_Force100LNK = 0x0080, + PHY_16_APDLED_CTL = 0x0040, PHY_16_COLLED_CTL = 0x0020, + PHY_16_RPDCTR_EN = 0x0010, + PHY_16_ResetStMch = 0x0008, PHY_16_PreamSupr = 0x0004, + PHY_16_Sleepmode = 0x0002, + PHY_16_RemoteLoopOut = 0x0001, +}; diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 7555cb967b8941c125d93be7b0de156e2c83ea25..1484b0b69693bd6564b23cdeac177cf2d85934de 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c @@ -33,7 +33,7 @@ CONFIG_DRIVER_SMC911X_16_BIT shall be set" #endif -#ifdef CONFIG_DRIVER_SMC911X_32_BIT +#if defined (CONFIG_DRIVER_SMC911X_32_BIT) static inline u32 reg_read(u32 addr) { return *(volatile u32*)addr; @@ -42,7 +42,7 @@ static inline void reg_write(u32 addr, u32 val) { *(volatile u32*)addr = val; } -#elif CONFIG_DRIVER_SMC911X_16_BIT +#elif defined (CONFIG_DRIVER_SMC911X_16_BIT) static inline u32 reg_read(u32 addr) { volatile u16 *addr_16 = (u16 *)addr; @@ -597,7 +597,7 @@ int eth_init(bd_t *bd) val = reg_read(BYTE_TEST); if (val != 0x87654321) { - printf(DRIVERNAME ": Invalid chip endian 0x08%x\n", val); + printf(DRIVERNAME ": Invalid chip endian 0x%08x\n", val); goto err_out; } diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index b3ae3b152c490f17736846f271f0613cd0ee7235..16180cbe51ae5bd8112b95767622c02e06526b2a 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -411,6 +411,40 @@ void pci_cfgfunc_do_nothing(struct pci_controller *hose, extern int pciauto_config_device(struct pci_controller *hose, pci_dev_t dev); extern void pciauto_config_init(struct pci_controller *hose); +int __pci_skip_dev(struct pci_controller *hose, pci_dev_t dev) +{ + /* + * Check if pci device should be skipped in configuration + */ + if (dev == PCI_BDF(hose->first_busno, 0, 0)) { +#if defined(CONFIG_PCI_CONFIG_HOST_BRIDGE) /* don't skip host bridge */ + /* + * Only skip configuration if "pciconfighost" is not set + */ + if (getenv("pciconfighost") == NULL) + return 1; +#else + return 1; +#endif + } + + return 0; +} +int pci_skip_dev(struct pci_controller *hose, pci_dev_t dev) + __attribute__((weak, alias("__pci_skip_dev"))); + +#ifdef CONFIG_PCI_SCAN_SHOW +int __pci_print_dev(struct pci_controller *hose, pci_dev_t dev) +{ + if (dev == PCI_BDF(hose->first_busno, 0, 0)) + return 0; + + return 1; +} +int pci_print_dev(struct pci_controller *hose, pci_dev_t dev) + __attribute__((weak, alias("__pci_print_dev"))); +#endif /* CONFIG_PCI_SCAN_SHOW */ + int pci_hose_scan_bus(struct pci_controller *hose, int bus) { unsigned int sub_bus, found_multi=0; @@ -423,21 +457,10 @@ int pci_hose_scan_bus(struct pci_controller *hose, int bus) for (dev = PCI_BDF(bus,0,0); dev < PCI_BDF(bus,PCI_MAX_PCI_DEVICES-1,PCI_MAX_PCI_FUNCTIONS-1); - dev += PCI_BDF(0,0,1)) - { - /* Skip our host bridge */ - if ( dev == PCI_BDF(hose->first_busno,0,0) ) { -#if defined(CONFIG_PCI_CONFIG_HOST_BRIDGE) /* don't skip host bridge */ - /* - * Only skip hostbridge configuration if "pciconfighost" is not set - */ - if (getenv("pciconfighost") == NULL) { - continue; /* Skip our host bridge */ - } -#else - continue; /* Skip our host bridge */ -#endif - } + dev += PCI_BDF(0,0,1)) { + + if (pci_skip_dev(hose, dev)) + continue; if (PCI_FUNC(dev) && !found_multi) continue; @@ -473,15 +496,14 @@ int pci_hose_scan_bus(struct pci_controller *hose, int bus) hose->fixup_irq(hose, dev); #ifdef CONFIG_PCI_SCAN_SHOW - /* Skip our host bridge */ - if ( dev != PCI_BDF(hose->first_busno,0,0) ) { - unsigned char int_line; - - pci_hose_read_config_byte(hose, dev, PCI_INTERRUPT_LINE, - &int_line); - printf(" %02x %02x %04x %04x %04x %02x\n", - PCI_BUS(dev), PCI_DEV(dev), vendor, device, class, - int_line); + if (pci_print_dev(hose, dev)) { + unsigned char int_line; + + pci_hose_read_config_byte(hose, dev, PCI_INTERRUPT_LINE, + &int_line); + printf(" %02x %02x %04x %04x %04x %02x\n", + PCI_BUS(dev), PCI_DEV(dev), vendor, device, class, + int_line); } #endif } diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile index ac4378a0bd9a6c0b78644b6c0a0b3f7668c0c9e1..ba251d0984af2c580cfb5b13ea51da7d54c511db 100644 --- a/drivers/pcmcia/Makefile +++ b/drivers/pcmcia/Makefile @@ -27,11 +27,11 @@ LIB := $(obj)libpcmcia.a COBJS-$(CONFIG_I82365) += i82365.o COBJS-y += mpc8xx_pcmcia.o -COBJS-y += pxa_pcmcia.o +COBJS-$(CONFIG_PXA_PCMCIA) += pxa_pcmcia.o COBJS-y += rpx_pcmcia.o -COBJS-y += ti_pci1410a.o +COBJS-$(CONFIG_IDE_TI_CARDBUS) += ti_pci1410a.o COBJS-y += tqm8xx_pcmcia.o -COBJS-y += marubun_pcmcia.o +COBJS-$(CONFIG_MARUBUN_PCCARD) += marubun_pcmcia.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/drivers/pcmcia/marubun_pcmcia.c b/drivers/pcmcia/marubun_pcmcia.c index a21309233456425a27338fa24e82379928a4a26e..d075ba37cd4262be2d8e9e4304e53cc7aadced5e 100644 --- a/drivers/pcmcia/marubun_pcmcia.c +++ b/drivers/pcmcia/marubun_pcmcia.c @@ -31,12 +31,11 @@ #define CONFIG_PCMCIA #endif -#if defined(CONFIG_CMD_IDE) +#if defined(CONFIG_CMD_IDE) #define CONFIG_PCMCIA #endif -#if defined(CONFIG_PCMCIA) \ - && (defined(CONFIG_MARUBUN_PCCARD)) +#if defined(CONFIG_PCMCIA) /* MR-SHPC-01 register */ #define MRSHPC_MODE (CFG_MARUBUN_MRSHPC + 4) @@ -112,4 +111,4 @@ int pcmcia_off (void) return 0; } -#endif /* CONFIG_MARUBUN_PCCARD */ +#endif /* CONFIG_PCMCIA */ diff --git a/drivers/pcmcia/pxa_pcmcia.c b/drivers/pcmcia/pxa_pcmcia.c index 65427efdbde88cd037fe9044e114beb3e09f3eae..11d8590d7bb9915ef53ebc2552bd7652b733c0da 100644 --- a/drivers/pcmcia/pxa_pcmcia.c +++ b/drivers/pcmcia/pxa_pcmcia.c @@ -1,8 +1,6 @@ #include #include -#ifdef CONFIG_PXA_PCMCIA - #include #include #include @@ -93,5 +91,3 @@ int pcmcia_off (void) return 0; } #endif - -#endif /* CONFIG_PXA_PCMCIA */ diff --git a/drivers/pcmcia/ti_pci1410a.c b/drivers/pcmcia/ti_pci1410a.c index 208ca50a743ecb88b56ab8daa6665f85d19ee65f..c876d0c402556126d2953af71f30ac35b297be51 100644 --- a/drivers/pcmcia/ti_pci1410a.c +++ b/drivers/pcmcia/ti_pci1410a.c @@ -64,7 +64,7 @@ #include -#if defined(CONFIG_CMD_PCMCIA) && defined(CONFIG_IDE_TI_CARDBUS) +#if defined(CONFIG_CMD_PCMCIA) int pcmcia_on(int ide_base_bus); @@ -662,4 +662,4 @@ static int identify(volatile uchar *p) return 0; /* don't know */ } -#endif /* CONFIG_IDE_TI_CARDBUS */ +#endif /* CONFIG_CMD_PCMCIA */ diff --git a/drivers/rtc/m41t60.c b/drivers/rtc/m41t60.c index 8a32ea0748f6bf3aea682e2f44e3ba972542d8c9..ef135cab3831f399f6bf0d1e5dafb610aa452eab 100644 --- a/drivers/rtc/m41t60.c +++ b/drivers/rtc/m41t60.c @@ -241,7 +241,7 @@ void rtc_reset(void) if (l <= 0x3F) { if ((data[RTC_CTRL] & 0x3F) != l) { - printf("Setting RTC calibration to 0x%02X\n", + printf("Setting RTC calibration to 0x%02lX\n", l); data[RTC_CTRL] &= 0xC0; data[RTC_CTRL] |= (uchar) l; diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index 76425d87901ff13930b02183e9347349e0aa8c0e..182ca2d149ead9aba81003418e0e6c418dec2890 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -144,8 +144,13 @@ static int calc_divisor (NS16550_t port) #else #define MODE_X_DIV 16 #endif - return (CFG_NS16550_CLK / MODE_X_DIV / gd->baudrate); + /* Compute divisor value. Normally, we should simply return: + * CFG_NS16550_CLK) / MODE_X_DIV / gd->baudrate + * but we need to round that value by adding 0.5 or 8/16. + * Rounding is especially important at high baud rates. + */ + return (((16 * CFG_NS16550_CLK) / MODE_X_DIV / gd->baudrate) + 8) / 16; } #if !defined(CONFIG_SERIAL_MULTI) diff --git a/drivers/serial/serial_pl010.c b/drivers/serial/serial_pl010.c index 417b6aeda646afbf95fce370eba7ed3c198f52f4..134ed0967fb77b0d8d5e17e0e67c49dfc897e645 100644 --- a/drivers/serial/serial_pl010.c +++ b/drivers/serial/serial_pl010.c @@ -29,6 +29,7 @@ /* Should be fairly simple to make it work with the PL010 as well */ #include +#include #ifdef CFG_PL010_SERIAL @@ -137,7 +138,8 @@ void serial_setbrg (void) static void pl010_putc (int portnum, char c) { /* Wait until there is space in the FIFO */ - while (IO_READ (port[portnum] + UART_PL01x_FR) & UART_PL01x_FR_TXFF); + while (IO_READ (port[portnum] + UART_PL01x_FR) & UART_PL01x_FR_TXFF) + WATCHDOG_RESET(); /* Send the character */ IO_WRITE (port[portnum] + UART_PL01x_DR, c); @@ -148,7 +150,8 @@ static int pl010_getc (int portnum) unsigned int data; /* Wait until there is data in the FIFO */ - while (IO_READ (port[portnum] + UART_PL01x_FR) & UART_PL01x_FR_RXFE); + while (IO_READ (port[portnum] + UART_PL01x_FR) & UART_PL01x_FR_RXFE) + WATCHDOG_RESET(); data = IO_READ (port[portnum] + UART_PL01x_DR); @@ -164,6 +167,7 @@ static int pl010_getc (int portnum) static int pl010_tstc (int portnum) { + WATCHDOG_RESET(); return !(IO_READ (port[portnum] + UART_PL01x_FR) & UART_PL01x_FR_RXFE); } diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile index e66e0ee092f341fc87af6d2dafbfc417e079cf54..4f7b679eeb2f86e48ec6c571bfa6e0b2004d2c06 100644 --- a/drivers/spi/Makefile +++ b/drivers/spi/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk LIB := $(obj)libspi.a -COBJS-y += mpc8xxx_spi.o +COBJS-$(CONFIG_MPC8XXX_SPI) += mpc8xxx_spi.o COBJS-$(CONFIG_ATMEL_SPI) += atmel_spi.o COBJS-$(CONFIG_MXC_SPI) += mxc_spi.o diff --git a/drivers/spi/mpc8xxx_spi.c b/drivers/spi/mpc8xxx_spi.c index 136fb50052f1902c1cc285f0dfe46b880a3cbe8e..9eaf9860b4f83d720cffa7661c5c24a3fdc397d7 100644 --- a/drivers/spi/mpc8xxx_spi.c +++ b/drivers/spi/mpc8xxx_spi.c @@ -22,7 +22,6 @@ */ #include -#if defined(CONFIG_MPC8XXX_SPI) && defined(CONFIG_HARD_SPI) #include #include @@ -180,4 +179,3 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, return 0; } -#endif /* CONFIG_HARD_SPI */ diff --git a/drivers/usb/usbdcore.c b/drivers/usb/usbdcore.c index 308c7ceccc648d4874016ef510a50c7099c1bbe3..a621ce7a399128e4451c2d6aa5c24de8a89f0eb1 100644 --- a/drivers/usb/usbdcore.c +++ b/drivers/usb/usbdcore.c @@ -146,12 +146,9 @@ struct usb_string_descriptor *usbd_get_string (__u8 index) static struct usb_configuration_instance *usbd_device_configuration_instance (struct usb_device_instance *device, unsigned int port, unsigned int configuration) { - /* XXX */ - configuration = configuration ? configuration - 1 : 0; - - if (configuration >= device->configurations) { + if (configuration >= device->configurations) return NULL; - } + return device->configuration_instance_array + configuration; } diff --git a/drivers/usb/usbdcore_ep0.c b/drivers/usb/usbdcore_ep0.c index 1e44f322a7977513630df0011ec852e6f0351750..cf3f3826cbfc08de3097fd9d1a4b061b25604a11 100644 --- a/drivers/usb/usbdcore_ep0.c +++ b/drivers/usb/usbdcore_ep0.c @@ -235,8 +235,8 @@ static int ep0_get_descriptor (struct usb_device_instance *device, return -1; } /*dbg_ep0(2, "%d %d", index, device_descriptor->bNumConfigurations); */ - if (index > device_descriptor->bNumConfigurations) { - dbg_ep0 (0, "index too large: %d > %d", index, + if (index >= device_descriptor->bNumConfigurations) { + dbg_ep0 (0, "index too large: %d >= %d", index, device_descriptor-> bNumConfigurations); return -1; @@ -571,14 +571,8 @@ int ep0_recv_setup (struct urb *urb) case USB_REQ_SET_CONFIGURATION: /* c.f. 9.4.7 - the top half of wValue is reserved */ - /* */ - if ((device->configuration = - le16_to_cpu (request->wValue) & 0xFF80) != 0) { - /* c.f. 9.4.7 - zero is the default or addressed state, in our case this */ - /* is the same is configuration zero */ - serial_printf("error setting dev->config to zero!\n"); - device->configuration = 0; /* TBR - ?????? */ - } + device->configuration = le16_to_cpu(request->wValue) & 0xff; + /* reset interface and alternate settings */ device->interface = device->alternate = 0; diff --git a/examples/test_burst.c b/examples/test_burst.c index f09707ff907b6b2cdcc0119f7ce383ba10906e49..3157bc8b00e4c79bdb2e00f84f6bddaa4e937b9a 100644 --- a/examples/test_burst.c +++ b/examples/test_burst.c @@ -173,7 +173,7 @@ static int test_burst_start (unsigned long size, unsigned long pattern) int i, n; int res = 1; - printf ("Test pattern %08x ...", pattern); + printf ("Test pattern %08lx ...", pattern); n = size / 4; @@ -248,7 +248,7 @@ static void test_desc(unsigned long size) { printf( "The following tests will be conducted:\n" - "1) Map %d-byte region of physical RAM at 0x%08x\n" + "1) Map %ld-byte region of physical RAM at 0x%08x\n" " into two virtual regions:\n" " one cached at 0x%08x and\n" " the the other uncached at 0x%08x.\n", @@ -277,8 +277,8 @@ static void test_error( p[1] = val; p[2] = pattern; - printf ("\nError at step %s, addr %08x: read %08x, pattern %08x", - step, addr, val, pattern); + printf ("\nError at step %s, addr %08lx: read %08lx, pattern %08lx", + (unsigned long)step, addr, val, pattern); } static void signal_init(void) diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c index 7e27ee18a2a4fcb6b9b83703f7829eff973f0387..d1423c1cdae973b48055c71bbe4dcfcdf14cf293 100644 --- a/fs/jffs2/jffs2_1pass.c +++ b/fs/jffs2/jffs2_1pass.c @@ -116,6 +116,7 @@ #include #include #include +#include #if defined(CONFIG_CMD_JFFS2) @@ -1185,6 +1186,8 @@ jffs2_1pass_build_lists(struct part_info * part) oldoffset = offset; } + WATCHDOG_RESET(); + node = (struct jffs2_unknown_node *) get_node_mem((u32)part->offset + offset); if (node->magic == JFFS2_MAGIC_BITMASK && hdr_crc(node)) { /* if its a fragment add it */ diff --git a/include/asm-arm/arch-pxa/mmc.h b/include/asm-arm/arch-pxa/mmc.h index 9440d80b500b583ee243f85d1843c8eed4f09436..85e144b682d7b199de65623a86a4f3b8662f218f 100644 --- a/include/asm-arm/arch-pxa/mmc.h +++ b/include/asm-arm/arch-pxa/mmc.h @@ -110,23 +110,6 @@ #define MMC_DEFAULT_RCA 1 #define MMC_BLOCK_SIZE 512 -#define MMC_CMD_RESET 0 -#define MMC_CMD_SEND_OP_COND 1 -#define MMC_CMD_ALL_SEND_CID 2 -#define MMC_CMD_SET_RCA 3 -#define MMC_CMD_SELECT_CARD 7 -#define MMC_CMD_SEND_CSD 9 -#define MMC_CMD_SEND_CID 10 -#define MMC_CMD_SEND_STATUS 13 -#define MMC_CMD_SET_BLOCKLEN 16 -#define MMC_CMD_READ_BLOCK 17 -#define MMC_CMD_RD_BLK_MULTI 18 -#define MMC_CMD_WRITE_BLOCK 24 -#define MMC_CMD_APP_CMD 55 - -#define SD_CMD_APP_SET_BUS_WIDTH 6 -#define SD_CMD_APP_OP_COND 41 - #define MMC_MAX_BLOCK_SIZE 512 #define MMC_R1_IDLE_STATE 0x01 diff --git a/include/asm-arm/mach-types.h b/include/asm-arm/mach-types.h index aaf2ea20c9b2b7f11b962010a00785ee5a01e8fd..b347857c9fc1bfc5c1f0bb8f0a0c413c920bb595 100644 --- a/include/asm-arm/mach-types.h +++ b/include/asm-arm/mach-types.h @@ -1595,6 +1595,7 @@ extern unsigned int __machine_arch_type; #define MACH_TYPE_P300 1602 #define MACH_TYPE_XDACOMET 1603 #define MACH_TYPE_DEXFLEX2 1604 +#define MACH_TYPE_SFFSDR 1657 #ifdef CONFIG_ARCH_EBSA110 # ifdef machine_arch_type @@ -16500,6 +16501,18 @@ extern unsigned int __machine_arch_type; # define machine_is_schmoogie() (0) #endif +#ifdef CONFIG_MACH_SFFSDR +# ifdef machine_arch_type +# undef machine_arch_type +# define machine_arch_type __machine_arch_type +# else +# define machine_arch_type MACH_TYPE_SFFSDR +# endif +# define machine_is_sffsdr() (machine_arch_type == MACH_TYPE_SFFSDR) +#else +# define machine_is_sffsdr() (0) +#endif + #ifdef CONFIG_MACH_AZTOOL # ifdef machine_arch_type # undef machine_arch_type diff --git a/include/asm-arm/u-boot-arm.h b/include/asm-arm/u-boot-arm.h index 41e7a8f7d3f9640063548376345d794d51a5d4e3..4ee5a327e5f594da73c28d4ccbea8718513141c0 100644 --- a/include/asm-arm/u-boot-arm.h +++ b/include/asm-arm/u-boot-arm.h @@ -52,7 +52,7 @@ void setup_revision_tag (struct tag **params); /* To be fixed! */ /* ------------------------------------------------------------ */ /* common/cmd_nvedit.c */ -void setenv (char *, char *); +int setenv (char *, char *); /* cpu/.../interrupt.c */ void reset_timer_masked (void); diff --git a/include/asm-avr32/arch-at32ap700x/gpio.h b/include/asm-avr32/arch-at32ap700x/gpio.h index ef20ceaab7cfc85d5e2807b2cad8061f56ffbc2d..8c922c7c65a94a104c1697b66635d4ca5271efc5 100644 --- a/include/asm-avr32/arch-at32ap700x/gpio.h +++ b/include/asm-avr32/arch-at32ap700x/gpio.h @@ -180,6 +180,11 @@ #define GPIO_PIN_PE25 (GPIO_PIOE_BASE + 25) #define GPIO_PIN_PE26 (GPIO_PIOE_BASE + 26) +#define GPIOF_PULLUP 0x00000001 /* (not-OUT) Enable pull-up */ +#define GPIOF_OUTPUT 0x00000002 /* (OUT) Enable output driver */ +#define GPIOF_DEGLITCH 0x00000004 /* (IN) Filter glitches */ +#define GPIOF_MULTIDRV 0x00000008 /* Enable multidriver option */ + static inline void *gpio_pin_to_addr(unsigned int pin) { switch (pin >> 5) { @@ -200,6 +205,9 @@ static inline void *gpio_pin_to_addr(unsigned int pin) void gpio_select_periph_A(unsigned int pin, int use_pullup); void gpio_select_periph_B(unsigned int pin, int use_pullup); +void gpio_select_pio(unsigned int pin, unsigned long gpiof_flags); +void gpio_set_value(unsigned int pin, int value); +int gpio_get_value(unsigned int pin); void gpio_enable_ebi(void); diff --git a/include/asm-avr32/arch-at32ap700x/mmc.h b/include/asm-avr32/arch-at32ap700x/mmc.h index 6a33fef5a81ac28cad83d8fc8d40968a6a339939..9caba9168e65818c8ee3e87e9916181b6b106795 100644 --- a/include/asm-avr32/arch-at32ap700x/mmc.h +++ b/include/asm-avr32/arch-at32ap700x/mmc.h @@ -71,25 +71,6 @@ struct mmc_csd u8 one:1; }; -/* MMC Command numbers */ -#define MMC_CMD_GO_IDLE_STATE 0 -#define MMC_CMD_SEND_OP_COND 1 -#define MMC_CMD_ALL_SEND_CID 2 -#define MMC_CMD_SET_RELATIVE_ADDR 3 -#define MMC_CMD_SD_SEND_RELATIVE_ADDR 3 -#define MMC_CMD_SET_DSR 4 -#define MMC_CMD_SELECT_CARD 7 -#define MMC_CMD_SEND_CSD 9 -#define MMC_CMD_SEND_CID 10 -#define MMC_CMD_SEND_STATUS 13 -#define MMC_CMD_SET_BLOCKLEN 16 -#define MMC_CMD_READ_SINGLE_BLOCK 17 -#define MMC_CMD_READ_MULTIPLE_BLOCK 18 -#define MMC_CMD_WRITE_BLOCK 24 -#define MMC_CMD_APP_CMD 55 - -#define MMC_ACMD_SD_SEND_OP_COND 41 - #define R1_ILLEGAL_COMMAND (1 << 22) #define R1_APP_CMD (1 << 5) diff --git a/include/asm-ppc/bitops.h b/include/asm-ppc/bitops.h index 4e9c608341eb11a12a6a9ff268e34173855e4910..daa66cf9185bbc19967c22a4aa4f65629c472fcd 100644 --- a/include/asm-ppc/bitops.h +++ b/include/asm-ppc/bitops.h @@ -152,6 +152,7 @@ extern __inline__ int test_bit(int nr, __const__ volatile void *addr) } /* Return the bit position of the most significant 1 bit in a word */ +/* - the result is undefined when x == 0 */ extern __inline__ int __ilog2(unsigned int x) { int lz; @@ -167,6 +168,57 @@ extern __inline__ int ffz(unsigned int x) return __ilog2(x & -x); } +/* + * fls: find last (most-significant) bit set. + * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32. + * + * On powerpc, __ilog2(0) returns -1, but this is not safe in general + */ +static __inline__ int fls(unsigned int x) +{ + return __ilog2(x) + 1; +} + +/** + * fls64 - find last set bit in a 64-bit word + * @x: the word to search + * + * This is defined in a similar way as the libc and compiler builtin + * ffsll, but returns the position of the most significant set bit. + * + * fls64(value) returns 0 if value is 0 or the position of the last + * set bit if value is nonzero. The last (most significant) bit is + * at position 64. + */ +#if BITS_PER_LONG == 32 +static inline int fls64(__u64 x) +{ + __u32 h = x >> 32; + if (h) + return fls(h) + 32; + return fls(x); +} +#elif BITS_PER_LONG == 64 +static inline int fls64(__u64 x) +{ + if (x == 0) + return 0; + return __ilog2(x) + 1; +} +#else +#error BITS_PER_LONG not 32 or 64 +#endif + +static inline int __ilog2_u64(u64 n) +{ + return fls64(n) - 1; +} + +static inline int ffs64(u64 x) +{ + return __ilog2_u64(x & -x) + 1ull; +} + #ifdef __KERNEL__ /* diff --git a/include/asm-ppc/ppc4xx-sdram.h b/include/asm-ppc/ppc4xx-sdram.h index 83931f17f53b32b979328fff9a029fae739dfc44..e151f0c11399d9476cc145895170374f6486f68b 100644 --- a/include/asm-ppc/ppc4xx-sdram.h +++ b/include/asm-ppc/ppc4xx-sdram.h @@ -284,8 +284,8 @@ #if defined(CONFIG_440SPE) || \ defined(CONFIG_460EX) || defined(CONFIG_460GT) #define SDRAM_RXBAS_SDBA_MASK 0xFFE00000 /* Base address */ -#define SDRAM_RXBAS_SDBA_ENCODE(n) ((((u32)(n))&0xFFE00000)>>2) -#define SDRAM_RXBAS_SDBA_DECODE(n) ((((u32)(n))&0xFFE00000)<<2) +#define SDRAM_RXBAS_SDBA_ENCODE(n) ((u32)(((phys_size_t)(n) >> 2) & 0xFFE00000)) +#define SDRAM_RXBAS_SDBA_DECODE(n) ((((phys_size_t)(n)) & 0xFFE00000) << 2) #endif /* CONFIG_440SPE */ #if defined(CONFIG_440SP) #define SDRAM_RXBAS_SDBA_MASK 0xFF800000 /* Base address */ diff --git a/include/asm-ppc/processor.h b/include/asm-ppc/processor.h index 139e6869df767f1ae0ca39508a76a74914f28624..10fd478baba6a91dda629b6d6d1544b0e7d96f40 100644 --- a/include/asm-ppc/processor.h +++ b/include/asm-ppc/processor.h @@ -968,10 +968,17 @@ struct cpu_type { u32 soc_ver; }; -struct cpu_type *identify_cpu(uint ver); +struct cpu_type *identify_cpu(u32 ver); +#if defined(CONFIG_MPC85xx) #define CPU_TYPE_ENTRY(n, v) \ { .name = #n, .soc_ver = SVR_##v, } +#else +#if defined(CONFIG_MPC83XX) +#define CPU_TYPE_ENTRY(x) {#x, SPR_##x} +#endif +#endif + #ifndef CONFIG_MACH_SPECIFIC extern int _machine; diff --git a/include/asm-sparc/io.h b/include/asm-sparc/io.h index 2a27d06798d763276286e7b11dac6accaa299844..ede0b1a8dbfda828bbe404453a2be183314108d0 100644 --- a/include/asm-sparc/io.h +++ b/include/asm-sparc/io.h @@ -70,7 +70,6 @@ * that can be used to access the memory range with the caching * properties specified by "flags". */ -typedef unsigned long phys_addr_t; #define MAP_NOCACHE (0) #define MAP_WRCOMBINE (0) diff --git a/include/asm-sparc/types.h b/include/asm-sparc/types.h index 69f93d60b8179dab57cd88dde5fde425532008c1..2cf974a7a9cf5e805f1d1937a6c20ca2b26a3fc9 100644 --- a/include/asm-sparc/types.h +++ b/include/asm-sparc/types.h @@ -65,6 +65,9 @@ typedef unsigned long long u64; /* DMA addresses are 32-bits wide */ typedef u32 dma_addr_t; +typedef unsigned long phys_addr_t; +typedef unsigned long phys_size_t; + #endif /* __KERNEL__ */ #endif /* __ASSEMBLY__ */ diff --git a/include/common.h b/include/common.h index fd5adb3d6db444b43f86a3b73d9b6f69053ed1b6..2fcb1fd379f93ca2443bbfdbb627a7d2cc96f3d5 100644 --- a/include/common.h +++ b/include/common.h @@ -243,9 +243,9 @@ char *getenv (char *); int getenv_r (char *name, char *buf, unsigned len); int saveenv (void); #ifdef CONFIG_PPC /* ARM version to be fixed! */ -void inline setenv (char *, char *); +int inline setenv (char *, char *); #else -void setenv (char *, char *); +int setenv (char *, char *); #ifdef CONFIG_HAS_UID void forceenv (char *, char *); #endif @@ -607,8 +607,10 @@ ulong simple_strtoul(const char *cp,char **endp,unsigned int base); unsigned long long simple_strtoull(const char *cp,char **endp,unsigned int base); #endif long simple_strtol(const char *cp,char **endp,unsigned int base); -void panic(const char *fmt, ...); -int sprintf(char * buf, const char *fmt, ...); +void panic(const char *fmt, ...) + __attribute__ ((format (__printf__, 1, 2))); +int sprintf(char * buf, const char *fmt, ...) + __attribute__ ((format (__printf__, 2, 3))); int vsprintf(char *buf, const char *fmt, va_list args); /* lib_generic/crc32.c */ @@ -630,7 +632,8 @@ int disable_ctrlc (int); /* 1 to disable, 0 to enable Control-C detect */ */ /* serial stuff */ -void serial_printf (const char *fmt, ...); +void serial_printf (const char *fmt, ...) + __attribute__ ((format (__printf__, 1, 2))); /* stdin */ int getc(void); @@ -639,7 +642,8 @@ int tstc(void); /* stdout */ void putc(const char c); void puts(const char *s); -void printf(const char *fmt, ...); +void printf(const char *fmt, ...) + __attribute__ ((format (__printf__, 1, 2))); void vprintf(const char *fmt, va_list args); /* stderr */ @@ -656,7 +660,8 @@ void vprintf(const char *fmt, va_list args); #define stderr 2 #define MAX_FILES 3 -void fprintf(int file, const char *fmt, ...); +void fprintf(int file, const char *fmt, ...) + __attribute__ ((format (__printf__, 2, 3))); void fputs(int file, const char *s); void fputc(int file, const char c); int ftstc(int file); @@ -682,6 +687,9 @@ void __attribute__((weak)) show_boot_progress (int val); #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) +#define ALIGN(x,a) __ALIGN_MASK((x),(typeof(x))(a)-1) +#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) + /* Multicore arch functions */ #ifdef CONFIG_MP int cpu_status(int nr); diff --git a/include/configs/MPC8260ADS.h b/include/configs/MPC8260ADS.h index 23508f9f5ae13e6826843bb25423fda5fe5a6b36..59d0bdbeb2e419f6d9cd79c4dcf071cc6a4a6603 100644 --- a/include/configs/MPC8260ADS.h +++ b/include/configs/MPC8260ADS.h @@ -197,6 +197,13 @@ #define CONFIG_BAUDRATE 115200 +#define CONFIG_OF_LIBFDT 1 +#define CONFIG_OF_BOARD_SETUP 1 +#if defined(CONFIG_OF_LIBFDT) +#define OF_CPU "cpu@0" +#define OF_TBCLK (bd->bi_busfreq / 4) +#endif + /* * BOOTP options */ diff --git a/include/configs/MPC8349EMDS.h b/include/configs/MPC8349EMDS.h index 37e3ca40b3f52c3ec57d2b57c807a764c8ac7aa4..870583845d9ca706e6b492067a4e10f500196eec 100644 --- a/include/configs/MPC8349EMDS.h +++ b/include/configs/MPC8349EMDS.h @@ -355,7 +355,6 @@ /* SPI */ #define CONFIG_MPC8XXX_SPI -#define CONFIG_HARD_SPI /* SPI with hardware support */ #undef CONFIG_SOFT_SPI /* SPI bit-banged */ /* GPIOs. Used as SPI chip selects */ diff --git a/include/configs/MVBLM7.h b/include/configs/MVBLM7.h index 349ca14bbaf869953a0ed546cd3b292ceaea8035..b412655b6dd05a42273ab46f4abac863768712fb 100644 --- a/include/configs/MVBLM7.h +++ b/include/configs/MVBLM7.h @@ -27,7 +27,7 @@ #ifndef __CONFIG_H #define __CONFIG_H -#define MV_VERSION "v1.0.1" +#include /* * High Level Configuration Options @@ -262,7 +262,7 @@ #define CFG_ENV_ADDR_REDUND (CFG_ENV_ADDR+CFG_ENV_SIZE) #define CFG_ENV_SIZE_REDUND CFG_ENV_SIZE -#define CONFIG_LOADS_ECHO +#define CONFIG_LOADS_ECHO #define CFG_LOADS_BAUD_CHANGE /* @@ -336,6 +336,7 @@ #define CFG_HID0_FINAL CFG_HID0_INIT #define CFG_HID2 HID2_HBE +#define CONFIG_HIGH_BATS 1 /* DDR */ #define CFG_IBAT0L (CFG_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) @@ -446,7 +447,7 @@ "mv_dtb_addr=" MV_DTB_ADDR "\0" \ "mv_dtb_addr_ram=" MV_DTB_ADDR_RAM "\0" \ "dtb_name=" MV_DTB_NAME "\0" \ - "mv_version=" MV_VERSION "\0" \ + "mv_version=" U_BOOT_VERSION "\0" \ "dhcp_client_id=" MV_CI "\0" \ "dhcp_vendor-class-identifier=" MV_VCI "\0" \ "netretry=no\0" \ diff --git a/include/configs/MigoR.h b/include/configs/MigoR.h index 99e1179e6816824ea81656fdbd9ff84ce4ebe68c..fa0e5db0216c1deaffb47b74b2222acc92ede00b 100644 --- a/include/configs/MigoR.h +++ b/include/configs/MigoR.h @@ -45,10 +45,6 @@ #define CONFIG_BAUDRATE 115200 #define CONFIG_BOOTDELAY 3 #define CONFIG_BOOTARGS "console=ttySC0,115200 root=1f01" -#define CONFIG_NETMASK 255.255.255.0 -#define CONFIG_IPADDR 192.168.10.100 -#define CONFIG_SERVERIP 192.168.10.77 -#define CONFIG_GATEWAYIP 192.168.10.77 #define CONFIG_VERSION_VARIABLE #undef CONFIG_SHOW_BOOT_PROGRESS diff --git a/include/configs/atngw100.h b/include/configs/atngw100.h index 3fc9975637152f11b6c204e1151245c95cdc7e9d..84d235ea9d5eeecb2eccc352c7d9f6f6974f577f 100644 --- a/include/configs/atngw100.h +++ b/include/configs/atngw100.h @@ -114,6 +114,8 @@ #define CONFIG_CMD_FAT #define CONFIG_CMD_JFFS2 #define CONFIG_CMD_MMC +#define CONFIG_CMD_SF +#define CONFIG_CMD_SPI #undef CONFIG_CMD_AUTOSCRIPT #undef CONFIG_CMD_FPGA @@ -126,6 +128,11 @@ #define CFG_NR_PIOS 5 #define CFG_HSDRAMC 1 #define CONFIG_MMC 1 +#define CONFIG_ATMEL_MCI 1 +#define CONFIG_ATMEL_SPI 1 + +#define CONFIG_SPI_FLASH 1 +#define CONFIG_SPI_FLASH_ATMEL 1 #define CFG_DCACHE_LINESZ 32 #define CFG_ICACHE_LINESZ 32 diff --git a/include/configs/atstk1002.h b/include/configs/atstk1002.h index ba18eb63c7f4da584de708f563d3f1ae1e05e6af..90910bb98a5e50ea5704d668d6e69a670ec5c245 100644 --- a/include/configs/atstk1002.h +++ b/include/configs/atstk1002.h @@ -153,6 +153,7 @@ #define CFG_NR_PIOS 5 #define CFG_HSDRAMC 1 #define CONFIG_MMC 1 +#define CONFIG_ATMEL_MCI 1 #define CFG_DCACHE_LINESZ 32 #define CFG_ICACHE_LINESZ 32 diff --git a/include/configs/atstk1003.h b/include/configs/atstk1003.h index a528ddfb0e92f178f013d912e6deced06d8b66e6..03472a8869ca63ec811ba49c076361e59d9a2e81 100644 --- a/include/configs/atstk1003.h +++ b/include/configs/atstk1003.h @@ -136,6 +136,7 @@ #define CONFIG_PIO2 1 #define CFG_HSDRAMC 1 #define CONFIG_MMC 1 +#define CONFIG_ATMEL_MCI 1 #define CFG_DCACHE_LINESZ 32 #define CFG_ICACHE_LINESZ 32 diff --git a/include/configs/atstk1004.h b/include/configs/atstk1004.h index fc9585e84d2d21eeca8d0e23ca88d6a672e35529..07add821a94e55b6665224479fb9c00aa2568063 100644 --- a/include/configs/atstk1004.h +++ b/include/configs/atstk1004.h @@ -136,6 +136,7 @@ #define CONFIG_PIO2 1 #define CFG_HSDRAMC 1 #define CONFIG_MMC 1 +#define CONFIG_ATMEL_MCI 1 #define CFG_DCACHE_LINESZ 32 #define CFG_ICACHE_LINESZ 32 diff --git a/include/configs/atstk1006.h b/include/configs/atstk1006.h index 9fd49a53a34d30c0490624d482596b4a5810d624..f9af67540a093243473a369e520d836262683e2a 100644 --- a/include/configs/atstk1006.h +++ b/include/configs/atstk1006.h @@ -153,6 +153,7 @@ #define CFG_NR_PIOS 5 #define CFG_HSDRAMC 1 #define CONFIG_MMC 1 +#define CONFIG_ATMEL_MCI 1 #define CFG_DCACHE_LINESZ 32 #define CFG_ICACHE_LINESZ 32 diff --git a/include/configs/davinci_sffsdr.h b/include/configs/davinci_sffsdr.h new file mode 100644 index 0000000000000000000000000000000000000000..0e49e6c15924ece655508195eced27bfe9a4f62a --- /dev/null +++ b/include/configs/davinci_sffsdr.h @@ -0,0 +1,150 @@ +/* + * Copyright (C) 2007 Sergey Kubushyn + * + * Copyright (C) 2008 Lyrtech + * Copyright (C) 2008 Philip Balister, OpenSDR + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * 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 + */ + +#ifndef __CONFIG_H +#define __CONFIG_H +#include + +/* Board */ +#define SFFSDR +#define CFG_NAND_LARGEPAGE +#define CFG_USE_NAND +#define CFG_USE_DSPLINK /* This is to prevent U-Boot from + * powering ON the DSP. */ +/* SoC Configuration */ +#define CONFIG_ARM926EJS /* arm926ejs CPU core */ +#define CONFIG_SYS_CLK_FREQ 297000000 /* Arm Clock frequency */ +#define CFG_TIMERBASE 0x01c21400 /* use timer 0 */ +#define CFG_HZ_CLOCK 27000000 /* Timer Input clock freq */ +#define CFG_HZ 1000 +/* EEPROM definitions for Atmel 24LC64 EEPROM chip */ +#define CFG_I2C_EEPROM_ADDR_LEN 2 +#define CFG_I2C_EEPROM_ADDR 0x50 +#define CFG_EEPROM_PAGE_WRITE_BITS 5 +#define CFG_EEPROM_PAGE_WRITE_DELAY_MS 20 +/* Memory Info */ +#define CFG_MALLOC_LEN (0x10000 + 256*1024) /* malloc() len */ +#define CFG_GBL_DATA_SIZE 128 /* reserved for initial data */ +#define CFG_MEMTEST_START 0x80000000 /* memtest start address */ +#define CFG_MEMTEST_END 0x81000000 /* 16MB RAM test */ +#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ +#define CONFIG_STACKSIZE (256*1024) /* regular stack */ +#define PHYS_SDRAM_1 0x80000000 /* DDR Start */ +#define PHYS_SDRAM_1_SIZE 0x08000000 /* DDR size 128MB */ +#define DDR_4BANKS /* 4-bank DDR2 (128MB) */ +/* Serial Driver info */ +#define CFG_NS16550 +#define CFG_NS16550_SERIAL +#define CFG_NS16550_REG_SIZE 4 /* NS16550 register size */ +#define CFG_NS16550_COM1 0x01c20000 /* Base address of UART0 */ +#define CFG_NS16550_CLK 27000000 /* Input clock to NS16550 */ +#define CONFIG_CONS_INDEX 1 /* use UART0 for console */ +#define CONFIG_BAUDRATE 115200 /* Default baud rate */ +#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } +/* I2C Configuration */ +#define CONFIG_HARD_I2C +#define CONFIG_DRIVER_DAVINCI_I2C +#define CFG_I2C_SPEED 80000 /* 100Kbps won't work, silicon bug */ +#define CFG_I2C_SLAVE 10 /* Bogus, master-only in U-Boot */ +/* Network & Ethernet Configuration */ +#define CONFIG_DRIVER_TI_EMAC +#define CONFIG_MII +#define CONFIG_BOOTP_DEFAULT +#define CONFIG_BOOTP_DNS +#define CONFIG_BOOTP_DNS2 +#define CONFIG_BOOTP_SEND_HOSTNAME +#define CONFIG_NET_RETRY_COUNT 10 +#define CONFIG_OVERWRITE_ETHADDR_ONCE +/* Flash & Environment */ +#undef CFG_ENV_IS_IN_FLASH +#define CFG_NO_FLASH +#define CFG_ENV_IS_IN_NAND /* U-Boot env in NAND Flash */ +#define CFG_ENV_SECT_SIZE 2048 /* Env sector Size */ +#define CFG_ENV_SIZE SZ_128K +#define CONFIG_SKIP_LOWLEVEL_INIT /* U-Boot is loaded by a bootloader */ +#define CONFIG_SKIP_RELOCATE_UBOOT /* to a proper address, init done */ +#define CFG_NAND_BASE 0x02000000 +#define CFG_NAND_HW_ECC +#define CFG_MAX_NAND_DEVICE 1 /* Max number of NAND devices */ +#define NAND_MAX_CHIPS 1 +#define CFG_ENV_OFFSET 0x0 /* Block 0--not used by bootcode */ +/* I2C switch definitions for PCA9543 chip */ +#define CFG_I2C_PCA9543_ADDR 0x70 +#define CFG_I2C_PCA9543_ADDR_LEN 0 /* Single register. */ +#define CFG_I2C_PCA9543_ENABLE_CH0 0x01 /* Enable channel 0. */ +/* U-Boot general configuration */ +#undef CONFIG_USE_IRQ /* No IRQ/FIQ in U-Boot */ +#define CONFIG_MISC_INIT_R +#define CONFIG_BOOTDELAY 5 /* Autoboot after 5 seconds. */ +#define CONFIG_BOOTFILE "uImage" /* Boot file name */ +#define CFG_PROMPT "U-Boot > " /* Monitor Command Prompt */ +#define CFG_CBSIZE 1024 /* Console I/O Buffer Size */ +#define CFG_PBSIZE \ + (CFG_CBSIZE + sizeof(CFG_PROMPT) + 16) /* Print buffer size */ +#define CFG_MAXARGS 16 /* max number of command args */ +#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ +#define CFG_LOAD_ADDR 0x80700000 /* Default Linux kernel + * load address. */ +#define CONFIG_VERSION_VARIABLE +#define CONFIG_AUTO_COMPLETE /* Won't work with hush so far, + * may be later */ +#define CFG_HUSH_PARSER +#define CFG_PROMPT_HUSH_PS2 "> " +#define CONFIG_CMDLINE_EDITING +#define CFG_LONGHELP +#define CONFIG_CRC32_VERIFY +#define CONFIG_MX_CYCLIC +/* Linux Information */ +#define LINUX_BOOT_PARAM_ADDR 0x80000100 +#define CONFIG_CMDLINE_TAG +#define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_BOOTARGS \ + "mem=56M " \ + "console=ttyS0,115200n8 " \ + "root=/dev/nfs rw noinitrd ip=dhcp " \ + "nfsroot=${serverip}:/nfsroot/sffsdr " \ + "eth0=${ethaddr}" +#define CONFIG_BOOTCOMMAND \ + "nand read 87A00000 100000 300000;" \ + "bootelf 87A00000" +/* U-Boot commands */ +#include +#define CONFIG_CMD_ASKENV +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_DIAG +#define CONFIG_CMD_I2C +#define CONFIG_CMD_MII +#define CONFIG_CMD_PING +#define CONFIG_CMD_SAVES +#define CONFIG_CMD_NAND +#define CONFIG_CMD_EEPROM +#undef CONFIG_CMD_BDI +#undef CONFIG_CMD_FPGA +#undef CONFIG_CMD_SETGETDCR +#undef CONFIG_CMD_FLASH +#undef CONFIG_CMD_IMLS +/* KGDB support (if any) */ +#ifdef CONFIG_CMD_KGDB +#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ +#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */ +#endif +#endif /* __CONFIG_H */ diff --git a/include/configs/katmai.h b/include/configs/katmai.h index d3789bd67a89fac1c1b835d1ed2511faacd22a69..f07e470683a61ef00789c2db48c5ef831757ac92 100644 --- a/include/configs/katmai.h +++ b/include/configs/katmai.h @@ -40,6 +40,13 @@ #define CONFIG_SYS_CLK_FREQ 33333333 /* external freq to pll */ #define CFG_4xx_RESET_TYPE 0x2 /* use chip reset on this board */ +/* + * Enable this board for more than 2GB of SDRAM + */ +#define CONFIG_PHYS_64BIT +#define CONFIG_VERY_BIG_RAM +#define CONFIG_MAX_MEM_MAPPED ((phys_size_t)2 << 30) + /* * Include common defines/options for all AMCC eval boards */ diff --git a/include/configs/korat.h b/include/configs/korat.h index 765566697f9fec94ed81a3ea3e1b387a2ab2cb12..4ca4ed00667e0b0a650c51c8c2b6e3119a19397f 100644 --- a/include/configs/korat.h +++ b/include/configs/korat.h @@ -129,7 +129,7 @@ #define CFG_ENV_SECT_SIZE 0x20000 /* size of one complete sector */ #define CFG_ENV_ADDR (CFG_FLASH1_TOP - CFG_ENV_SECT_SIZE) -#define CFG_ENV_SIZE 0x2000 /* Total Size of Environment Sector */ +#define CFG_ENV_SIZE 0x2000 /* Total Size of Environment Sector */ /* Address and size of Redundant Environment Sector */ #define CFG_ENV_ADDR_REDUND (CFG_ENV_ADDR - CFG_ENV_SECT_SIZE) @@ -145,7 +145,6 @@ #define CONFIG_DDR_ECC /* Use ECC when available */ #define SPD_EEPROM_ADDRESS {0x50} #define CONFIG_PROG_SDRAM_TLB -#define CFG_DRAM_TEST #define CFG_MEM_TOP_HIDE (4 << 10) /* don't use last 4kbytes */ /* 440EPx errata CHIP 11 */ @@ -185,7 +184,7 @@ #define CFG_ROOTPATH "rootpath=/opt/eldk/ppc_4xxFP\0" /* Note: kernel_addr and ramdisk_addr assume that FLASH1 is 64 MiB. */ -#define CONFIG_EXTRA_ENV_SETTINGS \ +#define CONFIG_EXTRA_ENV_SETTINGS \ CFG_BOOTFILE \ CFG_ROOTPATH \ "netdev=eth0\0" \ @@ -216,7 +215,7 @@ #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ #define CFG_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ -#define CONFIG_IBM_EMAC4_V4 1 +#define CONFIG_IBM_EMAC4_V4 1 #define CONFIG_MII 1 /* MII PHY management */ #define CONFIG_PHY_ADDR 2 /* PHY address, See schematics */ #define CONFIG_PHY_DYNAMIC_ANEG 1 @@ -548,4 +547,8 @@ #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ #endif +/* Pass open firmware flat tree */ +#define CONFIG_OF_LIBFDT 1 +#define CONFIG_OF_BOARD_SETUP 1 + #endif /* __CONFIG_H */ diff --git a/include/configs/ml300.h b/include/configs/ml300.h index 1945918300ca8c040662ae4b2141ef58958a5159..319923ad6efe9d6444440932c840303de8b1dd05 100644 --- a/include/configs/ml300.h +++ b/include/configs/ml300.h @@ -54,6 +54,7 @@ #define CONFIG_405 1 /* This is a PPC405 CPU */ #define CONFIG_4xx 1 /* ...member of PPC4xx family */ +#define CONFIG_XILINX_405 1 #define CONFIG_XILINX_ML300 1 /* ...on a Xilinx ML300 board */ #define CONFIG_SYSTEMACE 1 diff --git a/include/configs/ms7722se.h b/include/configs/ms7722se.h index 8d92a13e1cb90b3e9d3241884baab91c796764f2..7298e55c7080267a709af6a367a8b82de12076ce 100644 --- a/include/configs/ms7722se.h +++ b/include/configs/ms7722se.h @@ -40,10 +40,6 @@ #define CONFIG_BAUDRATE 115200 #define CONFIG_BOOTDELAY 3 #define CONFIG_BOOTARGS "console=ttySC0,115200 root=1f01" -#define CONFIG_NETMASK 255.255.255.0 -#define CONFIG_IPADDR 192.168.0.22 -#define CONFIG_SERVERIP 192.168.0.1 -#define CONFIG_GATEWAYIP 192.168.0.1 #define CONFIG_VERSION_VARIABLE #undef CONFIG_SHOW_BOOT_PROGRESS diff --git a/include/configs/r2dplus.h b/include/configs/r2dplus.h index c20bacad22879e36da11a02c346e12a716b7086e..e269336e82a0b770fbe1cef0d9d2da902f03935b 100644 --- a/include/configs/r2dplus.h +++ b/include/configs/r2dplus.h @@ -35,12 +35,6 @@ #define CONFIG_BOOTARGS "console=ttySC0,115200" #define CONFIG_ENV_OVERWRITE 1 -/* Network setting */ -#define CONFIG_NETMASK 255.0.0.0 -#define CONFIG_IPADDR 10.0.192.51 -#define CONFIG_SERVERIP 10.0.0.1 -#define CONFIG_GATEWAYIP 10.0.0.1 - /* SDRAM */ #define CFG_SDRAM_BASE (0x8C000000) #define CFG_SDRAM_SIZE (0x04000000) @@ -60,45 +54,27 @@ #define CFG_LOAD_ADDR (CFG_SDRAM_BASE + 32 * 1024 * 1024) /* Address of u-boot image in Flash */ #define CFG_MONITOR_BASE (CFG_FLASH_BASE) -#define CFG_MONITOR_LEN (128 * 1024) +#define CFG_MONITOR_LEN (256 * 1024) /* Size of DRAM reserved for malloc() use */ -#define CFG_MALLOC_LEN (256 * 1024) +#define CFG_MALLOC_LEN (1024 * 1024) /* size in bytes reserved for initial data */ #define CFG_GBL_DATA_SIZE (256) #define CFG_BOOTMAPSZ (8 * 1024 * 1024) /* - * NOR Flash + * NOR Flash ( Spantion S29GL256P ) */ #define CFG_FLASH_CFI #define CFG_FLASH_CFI_DRIVER - -#if defined(CONFIG_R2DPLUS_OLD) -#define CFG_FLASH_BASE (0xA0000000) -#define CFG_MAX_FLASH_BANKS (1) /* Max number of - * Flash memory banks - */ -#define CFG_MAX_FLASH_SECT 142 -#define CFG_FLASH_BANKS_LIST { CFG_FLASH_BASE } - -#else /* CONFIG_R2DPLUS_OLD */ - #define CFG_FLASH_BASE (0xA0000000) -#define CFG_FLASH_CFI_WIDTH 0x04 /* 32bit */ -#define CFG_MAX_FLASH_BANKS (2) -#define CFG_MAX_FLASH_SECT 270 -#define CFG_FLASH_BANKS_LIST { CFG_FLASH_BASE,\ - CFG_FLASH_BASE + 0x100000,\ - CFG_FLASH_BASE + 0x400000,\ - CFG_FLASH_BASE + 0x700000, } -#endif /* CONFIG_R2DPLUS_OLD */ +#define CFG_MAX_FLASH_BANKS (1) +#define CFG_MAX_FLASH_SECT 256 +#define CFG_FLASH_BANKS_LIST { CFG_FLASH_BASE } #define CFG_ENV_IS_IN_FLASH -#define CFG_ENV_SECT_SIZE 0x20000 -#define CFG_ENV_SIZE (CFG_ENV_SECT_SIZE) -#define CFG_ENV_ADDR (CFG_MONITOR_BASE + CFG_MONITOR_LEN) -#define CFG_FLASH_ERASE_TOUT 120000 -#define CFG_FLASH_WRITE_TOUT 500 +#define CFG_ENV_SECT_SIZE 0x40000 +#define CFG_ENV_SIZE (CFG_ENV_SECT_SIZE) +#define CFG_ENV_ADDR (CFG_MONITOR_BASE + CFG_MONITOR_LEN) /* * SuperH Clock setting diff --git a/include/configs/r7780mp.h b/include/configs/r7780mp.h index 4e895806aec887766e011170e6dae5657b6b0cf3..4c82c5a2fdcab27a097d375405ba94d8cf6176ac 100644 --- a/include/configs/r7780mp.h +++ b/include/configs/r7780mp.h @@ -1,7 +1,7 @@ /* * Configuation settings for the Renesas R7780MP board * - * Copyright (C) 2007 Nobuhiro Iwamatsu + * Copyright (C) 2007,2008 Nobuhiro Iwamatsu * Copyright (C) 2008 Yusuke Goda * * See file CREDITS for list of people who contributed to this @@ -31,7 +31,8 @@ #define CONFIG_SH4A 1 #define CONFIG_CPU_SH7780 1 #define CONFIG_R7780MP 1 -#define __LITTLE_ENDIAN 1 +#define CFG_R7780MP_OLD_FLASH 1 +#define __LITTLE_ENDIAN__ 1 /* * Command line configuration. @@ -59,12 +60,6 @@ /* check for keypress on bootdelay==0 */ /*#define CONFIG_ZERO_BOOTDELAY_CHECK*/ -/* Network setting */ -#define CONFIG_NETMASK 255.0.0.0 -#define CONFIG_IPADDR 10.0.192.82 -#define CONFIG_SERVERIP 10.0.0.1 -#define CONFIG_GATEWAYIP 10.0.0.1 - #define CFG_SDRAM_BASE (0x08000000) #define CFG_SDRAM_SIZE (128 * 1024 * 1024) @@ -80,22 +75,30 @@ #define CFG_MEMTEST_START (CFG_SDRAM_BASE) #define CFG_MEMTEST_END (TEXT_BASE - 0x100000) -/* NOR Flash (S29PL127J60TFI130) */ +/* Flash board support */ #define CFG_FLASH_BASE (0xA0000000) -#define CFG_FLASH_CFI_WIDTH FLASH_CFI_32BIT -#define CFG_MAX_FLASH_BANKS (2) -#define CFG_MAX_FLASH_SECT 270 -#define CFG_FLASH_BANKS_LIST { CFG_FLASH_BASE,\ +#ifdef CFG_R7780MP_OLD_FLASH +/* NOR Flash (S29PL127J60TFI130) */ +# define CFG_FLASH_CFI_WIDTH FLASH_CFI_32BIT +# define CFG_MAX_FLASH_BANKS (2) +# define CFG_MAX_FLASH_SECT 270 +# define CFG_FLASH_BANKS_LIST { CFG_FLASH_BASE,\ CFG_FLASH_BASE + 0x100000,\ CFG_FLASH_BASE + 0x400000,\ CFG_FLASH_BASE + 0x700000, } +#else /* CFG_R7780MP_OLD_FLASH */ +/* NOR Flash (Spantion S29GL256P) */ +# define CFG_MAX_FLASH_BANKS (1) +# define CFG_MAX_FLASH_SECT 256 +# define CFG_FLASH_BANKS_LIST { CFG_FLASH_BASE } +#endif /* CFG_R7780MP_OLD_FLASH */ #define CFG_LOAD_ADDR (CFG_SDRAM_BASE + 4 * 1024 * 1024) /* Address of u-boot image in Flash */ #define CFG_MONITOR_BASE (CFG_FLASH_BASE) -#define CFG_MONITOR_LEN (112 * 1024) +#define CFG_MONITOR_LEN (256 * 1024) /* Size of DRAM reserved for malloc() use */ -#define CFG_MALLOC_LEN (256 * 1024) +#define CFG_MALLOC_LEN (1204 * 1024) /* size in bytes reserved for initial data */ #define CFG_GBL_DATA_SIZE (256) @@ -110,7 +113,7 @@ #define CFG_FLASH_EMPTY_INFO #define CFG_ENV_IS_IN_FLASH -#define CFG_ENV_SECT_SIZE (16 * 1024) +#define CFG_ENV_SECT_SIZE (256 * 1024) #define CFG_ENV_SIZE (CFG_ENV_SECT_SIZE) #define CFG_ENV_ADDR (CFG_MONITOR_BASE + CFG_MONITOR_LEN) #define CFG_FLASH_ERASE_TOUT 120000 @@ -141,8 +144,10 @@ #endif /* CONFIG_CMD_PCI */ #if defined(CONFIG_CMD_NET) -/* #define CONFIG_NET_MULTI - #define CONFIG_RTL8169 */ +/* +#define CONFIG_NET_MULTI +#define CONFIG_RTL8169 +*/ /* AX88696L Support(NE2000 base chip) */ #define CONFIG_DRIVER_NE2000 #define CONFIG_DRIVER_AX88796L diff --git a/include/configs/sacsng.h b/include/configs/sacsng.h index 4974fb43f72b293a84179ff45c02e7354f25310f..2a398e8c45c67fb8bb95b413899ca441700222d8 100644 --- a/include/configs/sacsng.h +++ b/include/configs/sacsng.h @@ -272,10 +272,14 @@ #undef SPI_INIT /* no port initialization needed */ #define SPI_READ ((immr->im_ioport.iop_pdatd & I2C_MISO) != 0) -#define SPI_SDA(bit) if(bit) immr->im_ioport.iop_pdatd |= I2C_MOSI; \ - else immr->im_ioport.iop_pdatd &= ~I2C_MOSI -#define SPI_SCL(bit) if(bit) immr->im_ioport.iop_pdatd |= I2C_SCLK; \ - else immr->im_ioport.iop_pdatd &= ~I2C_SCLK +#define SPI_SDA(bit) do { \ + if(bit) immr->im_ioport.iop_pdatd |= I2C_MOSI; \ + else immr->im_ioport.iop_pdatd &= ~I2C_MOSI; \ + } while (0) +#define SPI_SCL(bit) do { \ + if(bit) immr->im_ioport.iop_pdatd |= I2C_SCLK; \ + else immr->im_ioport.iop_pdatd &= ~I2C_SCLK; \ + } while (0) #define SPI_DELAY /* No delay is needed */ #endif /* CONFIG_SOFT_SPI */ diff --git a/include/configs/sh7763rdp.h b/include/configs/sh7763rdp.h index d537071a07d72532b233f185338748e249858edc..7713eaaf59b28bb6331f23ce6e407230702b3f72 100644 --- a/include/configs/sh7763rdp.h +++ b/include/configs/sh7763rdp.h @@ -38,11 +38,7 @@ #define CONFIG_CMD_SDRAM #define CONFIG_CMD_FLASH #define CONFIG_CMD_MEMORY -#define CONFIG_CMD_NET -#define CONFIG_CMD_PING #define CONFIG_CMD_ENV -#define CONFIG_CMD_NFS -#define CONFIG_CMD_JFFS2 #define CONFIG_BOOTDELAY -1 #define CONFIG_BOOTARGS "console=ttySC2,115200 root=1f01" @@ -66,12 +62,6 @@ #define CFG_BAUDRATE_TABLE { 115200 } /* List of legal baudrate settings for this board */ -/* Ethernet */ -#define CONFIG_SH_ETHER 1 -#define CONFIG_SH_ETHER_USE_PORT (1) -#define CONFIG_SH_ETHER_PHY_ADDR (0x01) -#define CFG_RX_ETH_BUFFER (8) - /* SDRAM */ #define CFG_SDRAM_BASE (0x8C000000) #define CFG_SDRAM_SIZE (64 * 1024 * 1024) diff --git a/include/environment.h b/include/environment.h index bf9f669127f9727c8ae15a115ab9bdb496c2f4a2..481ea733dba772dd08739f1222af6628601d59e0 100644 --- a/include/environment.h +++ b/include/environment.h @@ -107,8 +107,8 @@ typedef struct environment_s { unsigned char data[ENV_SIZE]; /* Environment data */ } env_t; -/* Pointer to function that returns a character from the environment */ -extern unsigned char (*env_get_char)(int); +/* Function that returns a character from the environment */ +unsigned char env_get_char (int); /* Function that returns a pointer to a value from the environment */ unsigned char *env_get_addr(int); @@ -117,4 +117,7 @@ unsigned char env_get_char_memory (int index); /* Function that updates CRC of the enironment */ void env_crc_update (void); +/* [re]set to the default environment */ +void set_default_env(void); + #endif /* _ENVIRONMENT_H_ */ diff --git a/include/exports.h b/include/exports.h index d6512cb3a45a1ed738ad9768d7a909469cb736cf..6377875bc9a9a151f8b182a32c32c0b1458fd7a7 100644 --- a/include/exports.h +++ b/include/exports.h @@ -22,7 +22,7 @@ void vprintf(const char *, va_list); void do_reset (void); unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base); char *getenv (char *name); -void setenv (char *varname, char *varvalue); +int setenv (char *varname, char *varvalue); long simple_strtol(const char *cp,char **endp,unsigned int base); int strcmp(const char * cs,const char * ct); #ifdef CONFIG_HAS_UID diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 71cb2d5c3b285995dbdc8fcb9b8a7dc70eeb294a..05ba375a825412d4f00ace1fd722f90aaf3e4b1f 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -201,13 +201,13 @@ static inline void mtd_erase_callback(struct erase_info *instr) #define MTD_DEBUG_LEVEL3 (3) /* Noisy */ #ifdef CONFIG_MTD_DEBUG -#define DEBUG(n, args...) \ +#define MTDDEBUG(n, args...) \ do { \ if (n <= CONFIG_MTD_DEBUG_VERBOSE) \ printk(KERN_INFO args); \ } while(0) #else /* CONFIG_MTD_DEBUG */ -#define DEBUG(n, args...) do { } while(0) +#define MTDDEBUG(n, args...) do { } while(0) #endif /* CONFIG_MTD_DEBUG */ diff --git a/include/lmb.h b/include/lmb.h index 03d76678b8dec1baa62d5947d8dd261de31b3499..14e8727f0669c5fe98a8e275191fd098986eff34 100644 --- a/include/lmb.h +++ b/include/lmb.h @@ -43,6 +43,7 @@ extern phys_addr_t lmb_alloc_base(struct lmb *lmb, phys_size_t size, ulong align extern phys_addr_t __lmb_alloc_base(struct lmb *lmb, phys_size_t size, ulong align, phys_addr_t max_addr); extern int lmb_is_reserved(struct lmb *lmb, phys_addr_t addr); +extern long lmb_free(struct lmb *lmb, phys_addr_t base, phys_size_t size); extern void lmb_dump_all(struct lmb *lmb); diff --git a/include/lxt971a.h b/include/lxt971a.h index f76c3368791616ff9ea121fb4e03977faaef2f79..72145e0aa3e0efd53b5b8b6e61d4be04522f1ef8 100644 --- a/include/lxt971a.h +++ b/include/lxt971a.h @@ -30,15 +30,6 @@ #define __LXT971A_H__ /* PHY definitions (LXT971A) [2] */ -#define PHY_COMMON_CTRL (0x00) -#define PHY_COMMON_STAT (0x01) -#define PHY_COMMON_ID1 (0x02) -#define PHY_COMMON_ID2 (0x03) -#define PHY_COMMON_AUTO_ADV (0x04) -#define PHY_COMMON_AUTO_LNKB (0x05) -#define PHY_COMMON_AUTO_EXP (0x06) -#define PHY_COMMON_AUTO_NEXT (0x07) -#define PHY_COMMON_AUTO_LNKN (0x08) #define PHY_LXT971_PORT_CFG (0x10) #define PHY_LXT971_STAT2 (0x11) #define PHY_LXT971_INT_ENABLE (0x12) @@ -47,97 +38,6 @@ #define PHY_LXT971_DIG_CFG (0x1A) #define PHY_LXT971_TX_CTRL (0x1E) -/* CTRL PHY Control Register Bit Fields */ -#define PHY_COMMON_CTRL_RESET (0x8000) -#define PHY_COMMON_CTRL_LOOPBACK (0x4000) -#define PHY_COMMON_CTRL_SPD_MA (0x2040) -#define PHY_COMMON_CTRL_SPD_10 (0x0000) -#define PHY_COMMON_CTRL_SPD_100 (0x2000) -#define PHY_COMMON_CTRL_SPD_1000 (0x0040) -#define PHY_COMMON_CTRL_SPD_RES (0x2040) -#define PHY_COMMON_CTRL_AUTO_NEG (0x1000) -#define PHY_COMMON_CTRL_POWER_DN (0x0800) -#define PHY_COMMON_CTRL_ISOLATE (0x0400) -#define PHY_COMMON_CTRL_RES_AUTO (0x0200) -#define PHY_COMMON_CTRL_DUPLEX (0x0100) -#define PHY_COMMON_CTRL_COL_TEST (0x0080) -#define PHY_COMMON_CTRL_RES1 (0x003F) - -/* STAT Status Register Bit Fields */ -#define PHY_COMMON_STAT_100BT4 (0x8000) -#define PHY_COMMON_STAT_100BXFD (0x4000) -#define PHY_COMMON_STAT_100BXHD (0x2000) -#define PHY_COMMON_STAT_10BTFD (0x1000) -#define PHY_COMMON_STAT_10BTHD (0x0800) -#define PHY_COMMON_STAT_100BT2FD (0x0400) -#define PHY_COMMON_STAT_100BT2HD (0x0200) -#define PHY_COMMON_STAT_EXT_STAT (0x0100) -#define PHY_COMMON_STAT_RES1 (0x0080) -#define PHY_COMMON_STAT_MF_PSUP (0x0040) -#define PHY_COMMON_STAT_AN_COMP (0x0020) -#define PHY_COMMON_STAT_RMT_FLT (0x0010) -#define PHY_COMMON_STAT_AN_CAP (0x0008) -#define PHY_COMMON_STAT_LNK_STAT (0x0004) -#define PHY_COMMON_STAT_JAB_DTCT (0x0002) -#define PHY_COMMON_STAT_EXT_CAP (0x0001) - -/* AUTO_ADV Auto-neg Advert Register Bit Fields */ -#define PHY_COMMON_AUTO_ADV_NP (0x8000) -#define PHY_COMMON_AUTO_ADV_RES1 (0x4000) -#define PHY_COMMON_AUTO_ADV_RMT_FLT (0x2000) -#define PHY_COMMON_AUTO_ADV_RES2 (0x1000) -#define PHY_COMMON_AUTO_ADV_AS_PAUSE (0x0800) -#define PHY_COMMON_AUTO_ADV_PAUSE (0x0400) -#define PHY_COMMON_AUTO_ADV_100BT4 (0x0200) -#define PHY_COMMON_AUTO_ADV_100BTXFD (0x0100) -#define PHY_COMMON_AUTO_ADV_100BTX (0x0080) -#define PHY_COMMON_AUTO_ADV_10BTFD (0x0040) -#define PHY_COMMON_AUTO_ADV_10BT (0x0020) -#define PHY_COMMON_AUTO_ADV_SEL_FLD_MA (0x001F) -#define PHY_COMMON_AUTO_ADV_802_9 (0x0002) -#define PHY_COMMON_AUTO_ADV_802_3 (0x0001) - -/* AUTO_LNKB Auto-neg Link Ability Register Bit Fields */ -#define PHY_COMMON_AUTO_LNKB_NP (0x8000) -#define PHY_COMMON_AUTO_LNKB_ACK (0x4000) -#define PHY_COMMON_AUTO_LNKB_RMT_FLT (0x2000) -#define PHY_COMMON_AUTO_LNKB_RES2 (0x1000) -#define PHY_COMMON_AUTO_LNKB_AS_PAUSE (0x0800) -#define PHY_COMMON_AUTO_LNKB_PAUSE (0x0400) -#define PHY_COMMON_AUTO_LNKB_100BT4 (0x0200) -#define PHY_COMMON_AUTO_LNKB_100BTXFD (0x0100) -#define PHY_COMMON_AUTO_LNKB_100BTX (0x0080) -#define PHY_COMMON_AUTO_LNKB_10BTFD (0x0040) -#define PHY_COMMON_AUTO_LNKB_10BT (0x0020) -#define PHY_COMMON_AUTO_LNKB_SEL_FLD_MA (0x001F) -#define PHY_COMMON_AUTO_LNKB_802_9 (0x0002) -#define PHY_COMMON_AUTO_LNKB_802_3 (0x0001) - -/* AUTO_EXP Auto-neg Expansion Register Bit Fields */ -#define PHY_COMMON_AUTO_EXP_RES1 (0xFFC0) -#define PHY_COMMON_AUTO_EXP_BASE_PAGE (0x0020) -#define PHY_COMMON_AUTO_EXP_PAR_DT_FLT (0x0010) -#define PHY_COMMON_AUTO_EXP_LNK_NP_CAP (0x0008) -#define PHY_COMMON_AUTO_EXP_NP_CAP (0x0004) -#define PHY_COMMON_AUTO_EXP_PAGE_REC (0x0002) -#define PHY_COMMON_AUTO_EXP_LNK_AN_CAP (0x0001) - -/* AUTO_NEXT Aut-neg Next Page Tx Register Bit Fields */ -#define PHY_COMMON_AUTO_NEXT_NP (0x8000) -#define PHY_COMMON_AUTO_NEXT_RES1 (0x4000) -#define PHY_COMMON_AUTO_NEXT_MSG_PAGE (0x2000) -#define PHY_COMMON_AUTO_NEXT_ACK_2 (0x1000) -#define PHY_COMMON_AUTO_NEXT_TOGGLE (0x0800) -#define PHY_COMMON_AUTO_NEXT_MSG (0x07FF) - -/* AUTO_LNKN Auto-neg Link Partner Rx Reg Bit Fields */ -#define PHY_COMMON_AUTO_LNKN_NP (0x8000) -#define PHY_COMMON_AUTO_LNKN_ACK (0x4000) -#define PHY_COMMON_AUTO_LNKN_MSG_PAGE (0x2000) -#define PHY_COMMON_AUTO_LNKN_ACK_2 (0x1000) -#define PHY_COMMON_AUTO_LNKN_TOGGLE (0x0800) -#define PHY_COMMON_AUTO_LNKN_MSG (0x07FF) - /* PORT_CFG Port Configuration Register Bit Fields */ #define PHY_LXT971_PORT_CFG_RES1 (0x8000) #define PHY_LXT971_PORT_CFG_FORCE_LNK (0x4000) diff --git a/include/mmc.h b/include/mmc.h index a2716959e2cc016d0115380a5c3d08fb9d2a75eb..19c76fe4cd0c0c425159d30ee57e0b91af93bfcf 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -25,6 +25,30 @@ #define _MMC_H_ #include +/* MMC command numbers */ +#define MMC_CMD_GO_IDLE_STATE 0 +#define MMC_CMD_SEND_OP_COND 1 +#define MMC_CMD_ALL_SEND_CID 2 +#define MMC_CMD_SET_RELATIVE_ADDR 3 +#define MMC_CMD_SET_DSR 4 +#define MMC_CMD_SELECT_CARD 7 +#define MMC_CMD_SEND_CSD 9 +#define MMC_CMD_SEND_CID 10 +#define MMC_CMD_SEND_STATUS 13 +#define MMC_CMD_SET_BLOCKLEN 16 +#define MMC_CMD_READ_SINGLE_BLOCK 17 +#define MMC_CMD_READ_MULTIPLE_BLOCK 18 +#define MMC_CMD_WRITE_BLOCK 24 +#define MMC_CMD_APP_CMD 55 + +/* SD Card command numbers */ +#define SD_CMD_SEND_RELATIVE_ADDR 3 +#define SD_CMD_SWITCH 6 +#define SD_CMD_SEND_IF_COND 8 + +#define SD_CMD_APP_SET_BUS_WIDTH 6 +#define SD_CMD_APP_SEND_OP_COND 41 + int mmc_init(int verbose); int mmc_read(ulong src, uchar *dst, int size); int mmc_write(uchar *src, ulong dst, int size); diff --git a/include/nand.h b/include/nand.h index 247d3465dbb0b140e4cb14fe242022ae0995ca0b..e1285cdae97a9ddbda2955bb7facb069aa6981d7 100644 --- a/include/nand.h +++ b/include/nand.h @@ -24,6 +24,9 @@ #ifndef _NAND_H_ #define _NAND_H_ +extern void nand_init(void); + +#ifndef CFG_NAND_LEGACY #include #include #include @@ -32,7 +35,6 @@ typedef struct mtd_info nand_info_t; extern int nand_curr_device; extern nand_info_t nand_info[]; -extern void nand_init(void); static inline int nand_read(nand_info_t *info, off_t ofs, size_t *len, u_char *buf) { @@ -122,4 +124,5 @@ int nand_get_lock_status(nand_info_t *meminfo, ulong offset); void board_nand_select_device(struct nand_chip *nand, int chip); #endif +#endif /* !CFG_NAND_LEGACY */ #endif diff --git a/include/ns7520_eth.h b/include/ns7520_eth.h index 123e6f4c2a7b6f255e69deb21415379842f895d6..b509697c2f21931087b167fa028c8b13a6d826db 100644 --- a/include/ns7520_eth.h +++ b/include/ns7520_eth.h @@ -24,6 +24,7 @@ #ifdef CONFIG_DRIVER_NS7520_ETHERNET +#include #include "lxt971a.h" /* The port addresses */ diff --git a/include/ns9750_eth.h b/include/ns9750_eth.h index a6e5889b7b1e9c00f0159812e339dae7874a6a20..80c721b900155f3cc164c9959a78983b428a7f92 100644 --- a/include/ns9750_eth.h +++ b/include/ns9750_eth.h @@ -31,6 +31,7 @@ #ifdef CONFIG_DRIVER_NS9750_ETHERNET +#include #include "lxt971a.h" #define NS9750_ETH_MODULE_BASE (0xA0600000) diff --git a/include/pci_ids.h b/include/pci_ids.h index d061017911598a0265727ba90542102b5ab0988c..165456bc8ccb6976cd42d34a9f7aff31e5d6d1f2 100644 --- a/include/pci_ids.h +++ b/include/pci_ids.h @@ -1827,6 +1827,7 @@ #define PCI_DEVICE_ID_INTEL_82545EM_FIBER 0x1011 #define PCI_DEVICE_ID_INTEL_82546EB_FIBER 0x1012 #define PCI_DEVICE_ID_INTEL_82540EM_LOM 0x1015 +#define PCI_DEVICE_ID_INTEL_82545GM_COPPER 0x1026 #define PCI_DEVICE_ID_INTEL_82559 0x1030 #define PCI_DEVICE_ID_INTEL_82562ET 0x1031 diff --git a/include/ppc440.h b/include/ppc440.h index 62f1680441f1af41846c7b5942fff90884eba4f6..c581f1b468a11c4bfdb6643ea0cd87a333fda9e8 100644 --- a/include/ppc440.h +++ b/include/ppc440.h @@ -2471,6 +2471,8 @@ #define AHB_TOP 0xA4 #define AHB_BOT 0xA5 +#define SDR0_AHB_CFG 0x370 +#define SDR0_USB2HOST_CFG 0x371 #endif /* CONFIG_460EX || CONFIG_460GT */ #define SDR0_SDCS_SDD (0x80000000 >> 31) diff --git a/include/sha256.h b/include/sha256.h new file mode 100644 index 0000000000000000000000000000000000000000..e38ea898c3e825c7c72c683a78bf328f764ff946 --- /dev/null +++ b/include/sha256.h @@ -0,0 +1,16 @@ +#ifndef _SHA256_H +#define _SHA256_H + +#define SHA256_SUM_LEN 32 + +typedef struct { + uint32_t total[2]; + uint32_t state[8]; + uint8_t buffer[64]; +} sha256_context; + +void sha256_starts(sha256_context * ctx); +void sha256_update(sha256_context * ctx, uint8_t * input, uint32_t length); +void sha256_finish(sha256_context * ctx, uint8_t digest[SHA256_SUM_LEN]); + +#endif /* _SHA256_H */ diff --git a/include/spi.h b/include/spi.h index 7744c2e36b057c02e9d22be42be6a6dd6a1f330d..320e50e5296ca1914cc30c36c882cf576abdd4a5 100644 --- a/include/spi.h +++ b/include/spi.h @@ -24,6 +24,15 @@ #ifndef _SPI_H_ #define _SPI_H_ +/* Controller-specific definitions: */ + +/* CONFIG_HARD_SPI triggers SPI bus initialization in PowerPC */ +#ifdef CONFIG_MPC8XXX_SPI +# ifndef CONFIG_HARD_SPI +# define CONFIG_HARD_SPI +# endif +#endif + /* SPI mode flags */ #define SPI_CPHA 0x01 /* clock phase */ #define SPI_CPOL 0x02 /* clock polarity */ diff --git a/lib_generic/Makefile b/lib_generic/Makefile index dca3a6cbdc6122900588f6521d27bebe2e0cbd23..4f6ce73ab3c4431ffc564ec6785acc216edef5bf 100644 --- a/lib_generic/Makefile +++ b/lib_generic/Makefile @@ -38,6 +38,7 @@ COBJS-y += lmb.o COBJS-y += ldiv.o COBJS-$(CONFIG_MD5) += md5.o COBJS-y += sha1.o +COBJS-$(CONFIG_SHA256) += sha256.o COBJS-y += string.o COBJS-y += vsprintf.o COBJS-y += zlib.o diff --git a/lib_generic/display_options.c b/lib_generic/display_options.c index a52fa045481545dcc6f14e782e5af94021ee465f..2dc2567410ba69636d9f51fcb0dc1d55ce019cf4 100644 --- a/lib_generic/display_options.c +++ b/lib_generic/display_options.c @@ -39,27 +39,35 @@ int display_options (void) } /* - * print sizes as "xxx kB", "xxx.y kB", "xxx MB" or "xxx.y MB" as needed; - * allow for optional trailing string (like "\n") + * print sizes as "xxx kB", "xxx.y kB", "xxx MB", "xxx.y MB", + * xxx GB, or xxx.y GB as needed; allow for optional trailing string + * (like "\n") */ void print_size (phys_size_t size, const char *s) { - ulong m, n; - ulong d = 1 << 20; /* 1 MB */ - char c = 'M'; - - if (size < d) { /* print in kB */ - c = 'k'; - d = 1 << 10; + ulong m = 0, n; + phys_size_t d = 1 << 30; /* 1 GB */ + char c = 'G'; + + if (size < d) { /* try MB */ + c = 'M'; + d = 1 << 20; + if (size < d) { /* print in kB */ + c = 'k'; + d = 1 << 10; + } } n = size / d; - m = (10 * (size - (n * d)) + (d / 2) ) / d; + /* If there's a remainder, deal with it */ + if(size % d) { + m = (10 * (size - (n * d)) + (d / 2) ) / d; - if (m >= 10) { - m -= 10; - n += 1; + if (m >= 10) { + m -= 10; + n += 1; + } } printf ("%2ld", n); diff --git a/lib_generic/lmb.c b/lib_generic/lmb.c index afe33197dec7e7b75521c8af475f63218b9839bf..6b46fa88684640d134ad7ef94217e1c57b9abfbf 100644 --- a/lib_generic/lmb.c +++ b/lib_generic/lmb.c @@ -181,6 +181,55 @@ long lmb_add(struct lmb *lmb, phys_addr_t base, phys_size_t size) return lmb_add_region(_rgn, base, size); } +long lmb_free(struct lmb *lmb, phys_addr_t base, phys_size_t size) +{ + struct lmb_region *rgn = &(lmb->reserved); + phys_addr_t rgnbegin, rgnend; + phys_addr_t end = base + size; + int i; + + rgnbegin = rgnend = 0; /* supress gcc warnings */ + + /* Find the region where (base, size) belongs to */ + for (i=0; i < rgn->cnt; i++) { + rgnbegin = rgn->region[i].base; + rgnend = rgnbegin + rgn->region[i].size; + + if ((rgnbegin <= base) && (end <= rgnend)) + break; + } + + /* Didn't find the region */ + if (i == rgn->cnt) + return -1; + + /* Check to see if we are removing entire region */ + if ((rgnbegin == base) && (rgnend == end)) { + lmb_remove_region(rgn, i); + return 0; + } + + /* Check to see if region is matching at the front */ + if (rgnbegin == base) { + rgn->region[i].base = end; + rgn->region[i].size -= size; + return 0; + } + + /* Check to see if the region is matching at the end */ + if (rgnend == end) { + rgn->region[i].size -= size; + return 0; + } + + /* + * We need to split the entry - adjust the current one to the + * beginging of the hole and add the region after hole. + */ + rgn->region[i].size = base - rgn->region[i].base; + return lmb_add_region(rgn, end, rgnend - end); +} + long lmb_reserve(struct lmb *lmb, phys_addr_t base, phys_size_t size) { struct lmb_region *_rgn = &(lmb->reserved); @@ -236,11 +285,14 @@ phys_addr_t __lmb_alloc_base(struct lmb *lmb, phys_size_t size, ulong align, phy { long i, j; phys_addr_t base = 0; + phys_addr_t res_base; for (i = lmb->memory.cnt-1; i >= 0; i--) { phys_addr_t lmbbase = lmb->memory.region[i].base; phys_size_t lmbsize = lmb->memory.region[i].size; + if (lmbsize < size) + continue; if (max_addr == LMB_ALLOC_ANYWHERE) base = lmb_align_down(lmbbase + lmbsize - size, align); else if (lmbbase < max_addr) { @@ -249,22 +301,23 @@ phys_addr_t __lmb_alloc_base(struct lmb *lmb, phys_size_t size, ulong align, phy } else continue; - while ((lmbbase <= base) && - ((j = lmb_overlaps_region(&(lmb->reserved), base, size)) >= 0) ) - base = lmb_align_down(lmb->reserved.region[j].base - size, - align); - - if ((base != 0) && (lmbbase <= base)) - break; + while (base && lmbbase <= base) { + j = lmb_overlaps_region(&lmb->reserved, base, size); + if (j < 0) { + /* This area isn't reserved, take it */ + if (lmb_add_region(&lmb->reserved, base, + lmb_align_up(size, + align)) < 0) + return 0; + return base; + } + res_base = lmb->reserved.region[j].base; + if (res_base < size) + break; + base = lmb_align_down(res_base - size, align); + } } - - if (i < 0) - return 0; - - if (lmb_add_region(&(lmb->reserved), base, lmb_align_up(size, align)) < 0) - return 0; - - return base; + return 0; } int lmb_is_reserved(struct lmb *lmb, phys_addr_t addr) diff --git a/lib_generic/sha256.c b/lib_generic/sha256.c new file mode 100644 index 0000000000000000000000000000000000000000..deb63a40b6d7218145e807850ff51cce488a7e4b --- /dev/null +++ b/lib_generic/sha256.c @@ -0,0 +1,262 @@ +/* + * FIPS-180-2 compliant SHA-256 implementation + * + * Copyright (C) 2001-2003 Christophe Devine + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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 + */ + +#ifndef USE_HOSTCC +#include +#endif /* USE_HOSTCC */ +#include +#include +#include + +/* + * 32-bit integer manipulation macros (big endian) + */ +#ifndef GET_UINT32_BE +#define GET_UINT32_BE(n,b,i) { \ + (n) = ( (unsigned long) (b)[(i) ] << 24 ) \ + | ( (unsigned long) (b)[(i) + 1] << 16 ) \ + | ( (unsigned long) (b)[(i) + 2] << 8 ) \ + | ( (unsigned long) (b)[(i) + 3] ); \ +} +#endif +#ifndef PUT_UINT32_BE +#define PUT_UINT32_BE(n,b,i) { \ + (b)[(i) ] = (unsigned char) ( (n) >> 24 ); \ + (b)[(i) + 1] = (unsigned char) ( (n) >> 16 ); \ + (b)[(i) + 2] = (unsigned char) ( (n) >> 8 ); \ + (b)[(i) + 3] = (unsigned char) ( (n) ); \ +} +#endif + +void sha256_starts(sha256_context * ctx) +{ + ctx->total[0] = 0; + ctx->total[1] = 0; + + ctx->state[0] = 0x6A09E667; + ctx->state[1] = 0xBB67AE85; + ctx->state[2] = 0x3C6EF372; + ctx->state[3] = 0xA54FF53A; + ctx->state[4] = 0x510E527F; + ctx->state[5] = 0x9B05688C; + ctx->state[6] = 0x1F83D9AB; + ctx->state[7] = 0x5BE0CD19; +} + +void sha256_process(sha256_context * ctx, uint8_t data[64]) +{ + uint32_t temp1, temp2; + uint32_t W[64]; + uint32_t A, B, C, D, E, F, G, H; + + GET_UINT32_BE(W[0], data, 0); + GET_UINT32_BE(W[1], data, 4); + GET_UINT32_BE(W[2], data, 8); + GET_UINT32_BE(W[3], data, 12); + GET_UINT32_BE(W[4], data, 16); + GET_UINT32_BE(W[5], data, 20); + GET_UINT32_BE(W[6], data, 24); + GET_UINT32_BE(W[7], data, 28); + GET_UINT32_BE(W[8], data, 32); + GET_UINT32_BE(W[9], data, 36); + GET_UINT32_BE(W[10], data, 40); + GET_UINT32_BE(W[11], data, 44); + GET_UINT32_BE(W[12], data, 48); + GET_UINT32_BE(W[13], data, 52); + GET_UINT32_BE(W[14], data, 56); + GET_UINT32_BE(W[15], data, 60); + +#define SHR(x,n) ((x & 0xFFFFFFFF) >> n) +#define ROTR(x,n) (SHR(x,n) | (x << (32 - n))) + +#define S0(x) (ROTR(x, 7) ^ ROTR(x,18) ^ SHR(x, 3)) +#define S1(x) (ROTR(x,17) ^ ROTR(x,19) ^ SHR(x,10)) + +#define S2(x) (ROTR(x, 2) ^ ROTR(x,13) ^ ROTR(x,22)) +#define S3(x) (ROTR(x, 6) ^ ROTR(x,11) ^ ROTR(x,25)) + +#define F0(x,y,z) ((x & y) | (z & (x | y))) +#define F1(x,y,z) (z ^ (x & (y ^ z))) + +#define R(t) \ +( \ + W[t] = S1(W[t - 2]) + W[t - 7] + \ + S0(W[t - 15]) + W[t - 16] \ +) + +#define P(a,b,c,d,e,f,g,h,x,K) { \ + temp1 = h + S3(e) + F1(e,f,g) + K + x; \ + temp2 = S2(a) + F0(a,b,c); \ + d += temp1; h = temp1 + temp2; \ +} + + A = ctx->state[0]; + B = ctx->state[1]; + C = ctx->state[2]; + D = ctx->state[3]; + E = ctx->state[4]; + F = ctx->state[5]; + G = ctx->state[6]; + H = ctx->state[7]; + + P(A, B, C, D, E, F, G, H, W[0], 0x428A2F98); + P(H, A, B, C, D, E, F, G, W[1], 0x71374491); + P(G, H, A, B, C, D, E, F, W[2], 0xB5C0FBCF); + P(F, G, H, A, B, C, D, E, W[3], 0xE9B5DBA5); + P(E, F, G, H, A, B, C, D, W[4], 0x3956C25B); + P(D, E, F, G, H, A, B, C, W[5], 0x59F111F1); + P(C, D, E, F, G, H, A, B, W[6], 0x923F82A4); + P(B, C, D, E, F, G, H, A, W[7], 0xAB1C5ED5); + P(A, B, C, D, E, F, G, H, W[8], 0xD807AA98); + P(H, A, B, C, D, E, F, G, W[9], 0x12835B01); + P(G, H, A, B, C, D, E, F, W[10], 0x243185BE); + P(F, G, H, A, B, C, D, E, W[11], 0x550C7DC3); + P(E, F, G, H, A, B, C, D, W[12], 0x72BE5D74); + P(D, E, F, G, H, A, B, C, W[13], 0x80DEB1FE); + P(C, D, E, F, G, H, A, B, W[14], 0x9BDC06A7); + P(B, C, D, E, F, G, H, A, W[15], 0xC19BF174); + P(A, B, C, D, E, F, G, H, R(16), 0xE49B69C1); + P(H, A, B, C, D, E, F, G, R(17), 0xEFBE4786); + P(G, H, A, B, C, D, E, F, R(18), 0x0FC19DC6); + P(F, G, H, A, B, C, D, E, R(19), 0x240CA1CC); + P(E, F, G, H, A, B, C, D, R(20), 0x2DE92C6F); + P(D, E, F, G, H, A, B, C, R(21), 0x4A7484AA); + P(C, D, E, F, G, H, A, B, R(22), 0x5CB0A9DC); + P(B, C, D, E, F, G, H, A, R(23), 0x76F988DA); + P(A, B, C, D, E, F, G, H, R(24), 0x983E5152); + P(H, A, B, C, D, E, F, G, R(25), 0xA831C66D); + P(G, H, A, B, C, D, E, F, R(26), 0xB00327C8); + P(F, G, H, A, B, C, D, E, R(27), 0xBF597FC7); + P(E, F, G, H, A, B, C, D, R(28), 0xC6E00BF3); + P(D, E, F, G, H, A, B, C, R(29), 0xD5A79147); + P(C, D, E, F, G, H, A, B, R(30), 0x06CA6351); + P(B, C, D, E, F, G, H, A, R(31), 0x14292967); + P(A, B, C, D, E, F, G, H, R(32), 0x27B70A85); + P(H, A, B, C, D, E, F, G, R(33), 0x2E1B2138); + P(G, H, A, B, C, D, E, F, R(34), 0x4D2C6DFC); + P(F, G, H, A, B, C, D, E, R(35), 0x53380D13); + P(E, F, G, H, A, B, C, D, R(36), 0x650A7354); + P(D, E, F, G, H, A, B, C, R(37), 0x766A0ABB); + P(C, D, E, F, G, H, A, B, R(38), 0x81C2C92E); + P(B, C, D, E, F, G, H, A, R(39), 0x92722C85); + P(A, B, C, D, E, F, G, H, R(40), 0xA2BFE8A1); + P(H, A, B, C, D, E, F, G, R(41), 0xA81A664B); + P(G, H, A, B, C, D, E, F, R(42), 0xC24B8B70); + P(F, G, H, A, B, C, D, E, R(43), 0xC76C51A3); + P(E, F, G, H, A, B, C, D, R(44), 0xD192E819); + P(D, E, F, G, H, A, B, C, R(45), 0xD6990624); + P(C, D, E, F, G, H, A, B, R(46), 0xF40E3585); + P(B, C, D, E, F, G, H, A, R(47), 0x106AA070); + P(A, B, C, D, E, F, G, H, R(48), 0x19A4C116); + P(H, A, B, C, D, E, F, G, R(49), 0x1E376C08); + P(G, H, A, B, C, D, E, F, R(50), 0x2748774C); + P(F, G, H, A, B, C, D, E, R(51), 0x34B0BCB5); + P(E, F, G, H, A, B, C, D, R(52), 0x391C0CB3); + P(D, E, F, G, H, A, B, C, R(53), 0x4ED8AA4A); + P(C, D, E, F, G, H, A, B, R(54), 0x5B9CCA4F); + P(B, C, D, E, F, G, H, A, R(55), 0x682E6FF3); + P(A, B, C, D, E, F, G, H, R(56), 0x748F82EE); + P(H, A, B, C, D, E, F, G, R(57), 0x78A5636F); + P(G, H, A, B, C, D, E, F, R(58), 0x84C87814); + P(F, G, H, A, B, C, D, E, R(59), 0x8CC70208); + P(E, F, G, H, A, B, C, D, R(60), 0x90BEFFFA); + P(D, E, F, G, H, A, B, C, R(61), 0xA4506CEB); + P(C, D, E, F, G, H, A, B, R(62), 0xBEF9A3F7); + P(B, C, D, E, F, G, H, A, R(63), 0xC67178F2); + + ctx->state[0] += A; + ctx->state[1] += B; + ctx->state[2] += C; + ctx->state[3] += D; + ctx->state[4] += E; + ctx->state[5] += F; + ctx->state[6] += G; + ctx->state[7] += H; +} + +void sha256_update(sha256_context * ctx, uint8_t * input, uint32_t length) +{ + uint32_t left, fill; + + if (!length) + return; + + left = ctx->total[0] & 0x3F; + fill = 64 - left; + + ctx->total[0] += length; + ctx->total[0] &= 0xFFFFFFFF; + + if (ctx->total[0] < length) + ctx->total[1]++; + + if (left && length >= fill) { + memcpy((void *) (ctx->buffer + left), (void *) input, fill); + sha256_process(ctx, ctx->buffer); + length -= fill; + input += fill; + left = 0; + } + + while (length >= 64) { + sha256_process(ctx, input); + length -= 64; + input += 64; + } + + if (length) + memcpy((void *) (ctx->buffer + left), (void *) input, length); +} + +static uint8_t sha256_padding[64] = { + 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +void sha256_finish(sha256_context * ctx, uint8_t digest[32]) +{ + uint32_t last, padn; + uint32_t high, low; + uint8_t msglen[8]; + + high = ((ctx->total[0] >> 29) + | (ctx->total[1] << 3)); + low = (ctx->total[0] << 3); + + PUT_UINT32_BE(high, msglen, 0); + PUT_UINT32_BE(low, msglen, 4); + + last = ctx->total[0] & 0x3F; + padn = (last < 56) ? (56 - last) : (120 - last); + + sha256_update(ctx, sha256_padding, padn); + sha256_update(ctx, msglen, 8); + + PUT_UINT32_BE(ctx->state[0], digest, 0); + PUT_UINT32_BE(ctx->state[1], digest, 4); + PUT_UINT32_BE(ctx->state[2], digest, 8); + PUT_UINT32_BE(ctx->state[3], digest, 12); + PUT_UINT32_BE(ctx->state[4], digest, 16); + PUT_UINT32_BE(ctx->state[5], digest, 20); + PUT_UINT32_BE(ctx->state[6], digest, 24); + PUT_UINT32_BE(ctx->state[7], digest, 28); +} diff --git a/lib_mips/bootm.c b/lib_mips/bootm.c index f813fc583100a9a15a3e1dc6fe1cea21a8d8ef2d..8fe3782b758318cfee5c2408dfab5c6e2e55f96d 100644 --- a/lib_mips/bootm.c +++ b/lib_mips/bootm.c @@ -54,6 +54,7 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[], char *commandline = getenv ("bootargs"); char env_buf[12]; int ret; + const char *cp; /* find kernel entry point */ if (images->legacy_hdr_valid) { @@ -113,6 +114,16 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[], sprintf (env_buf, "0x%X", (uint) (gd->bd->bi_flashsize)); linux_env_set ("flash_size", env_buf); + cp = getenv("ethaddr"); + if (cp != NULL) { + linux_env_set("ethaddr", cp); + } + + cp = getenv("eth1addr"); + if (cp != NULL) { + linux_env_set("eth1addr", cp); + } + if (!images->autostart) return ; diff --git a/lib_ppc/board.c b/lib_ppc/board.c index c42e08862fc87321c86261fcf8fb14f5d7f86b1b..1bc2f46d462e746222550f411e84cc75867d2b8a 100644 --- a/lib_ppc/board.c +++ b/lib_ppc/board.c @@ -90,9 +90,7 @@ void doc_init (void); defined(CONFIG_SOFT_I2C) #include #endif -#if defined(CONFIG_HARD_SPI) #include -#endif #include static char *failed = "*** failed ***\n"; @@ -627,7 +625,7 @@ void board_init_f (ulong bootflag) defined(CONFIG_440EPX) || defined(CONFIG_440GRX) bd->bi_pci_busfreq = get_PCI_freq (); bd->bi_opbfreq = get_OPB_freq (); -#elif defined(CONFIG_XILINX_ML300) +#elif defined(CONFIG_XILINX_405) bd->bi_pci_busfreq = get_PCI_freq (); #endif #endif @@ -788,7 +786,7 @@ void board_init_r (gd_t *id, ulong dest_addr) */ s = getenv ("flashchecksum"); if (s && (*s == 'y')) { - printf (" CRC: %08lX", + printf (" CRC: %08X", crc32 (0, (const unsigned char *) CFG_FLASH_BASE, flash_size) ); } diff --git a/lib_ppc/bootm.c b/lib_ppc/bootm.c index 10a0b12141e24fea1ddb9162a0872c558107d115..81803ddef3dd0aca138359374bf123a4641595b9 100644 --- a/lib_ppc/bootm.c +++ b/lib_ppc/bootm.c @@ -51,6 +51,10 @@ static int boot_relocate_fdt (struct lmb *lmb, ulong bootmap_base, #include #endif +#ifndef CFG_FDT_PAD +#define CFG_FDT_PAD 0x3000 +#endif + DECLARE_GLOBAL_DATA_PTR; extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); @@ -101,7 +105,7 @@ do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], if (size < bootm_size) { ulong base = bootmap_base + size; - printf("WARNING: adjusting available memory to %x\n", size); + printf("WARNING: adjusting available memory to %lx\n", size); lmb_reserve(lmb, base, bootm_size - size); } @@ -191,6 +195,45 @@ do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], ft_board_setup(of_flat_tree, gd->bd); #endif } + + /* Fixup the fdt memreserve now that we know how big it is */ + if (of_flat_tree) { + int j; + uint64_t addr, size; + int total = fdt_num_mem_rsv(of_flat_tree); + uint actualsize; + + for (j = 0; j < total; j++) { + fdt_get_mem_rsv(of_flat_tree, j, &addr, &size); + if (addr == (uint64_t)(u32)of_flat_tree) { + fdt_del_mem_rsv(of_flat_tree, j); + break; + } + } + + /* Delete the old LMB reservation */ + lmb_free(lmb, (phys_addr_t)(u32)of_flat_tree, + (phys_size_t)fdt_totalsize(of_flat_tree)); + + /* Calculate the actual size of the fdt */ + actualsize = fdt_off_dt_strings(of_flat_tree) + + fdt_size_dt_strings(of_flat_tree); + + /* Make it so the fdt ends on a page boundary */ + actualsize = ALIGN(actualsize, 0x1000); + actualsize = actualsize - ((uint)of_flat_tree & 0xfff); + + /* Change the fdt header to reflect the correct size */ + fdt_set_totalsize(of_flat_tree, actualsize); + of_size = actualsize; + + /* Add the new reservation */ + ret = fdt_add_mem_rsv(of_flat_tree, (uint)of_flat_tree, + of_size); + + /* Create a new LMB reservation */ + lmb_reserve(lmb, (ulong)of_flat_tree, of_size); + } #endif /* CONFIG_OF_LIBFDT */ ret = boot_ramdisk_high (lmb, rd_data_start, rd_len, &initrd_start, &initrd_end); @@ -630,7 +673,7 @@ static int boot_get_fdt (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], */ fdt_blob = (char *)fdt_addr; debug ("* fdt: raw FDT blob\n"); - printf ("## Flattened Device Tree blob at %08lx\n", fdt_blob); + printf ("## Flattened Device Tree blob at %08lx\n", (long)fdt_blob); } break; default: @@ -638,7 +681,7 @@ static int boot_get_fdt (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], goto error; } - printf (" Booting using the fdt blob at 0x%x\n", fdt_blob); + printf (" Booting using the fdt blob at 0x%x\n", (int)fdt_blob); } else if (images->legacy_hdr_valid && image_check_type (&images->legacy_hdr_os_copy, IH_TYPE_MULTI)) { @@ -657,7 +700,7 @@ static int boot_get_fdt (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], if (fdt_len) { fdt_blob = (char *)fdt_data; - printf (" Booting using the fdt at 0x%x\n", fdt_blob); + printf (" Booting using the fdt at 0x%x\n", (int)fdt_blob); if (fdt_check_header (fdt_blob) != 0) { fdt_error ("image is not a fdt"); @@ -713,22 +756,25 @@ static int boot_relocate_fdt (struct lmb *lmb, ulong bootmap_base, #endif /* - * The blob must be within CFG_BOOTMAPSZ, - * so we flag it to be copied if it is not. + * The blob needs to be inside the boot mapping. */ - if (fdt_blob >= (char *)CFG_BOOTMAPSZ) + if (fdt_blob < (char *)bootmap_base) relocate = 1; - of_len = be32_to_cpu (fdt_totalsize (fdt_blob)); + if ((fdt_blob + *of_size + CFG_FDT_PAD) >= + ((char *)CFG_BOOTMAPSZ + bootmap_base)) + relocate = 1; /* move flattend device tree if needed */ if (relocate) { int err; - ulong of_start; + ulong of_start = 0; /* position on a 4K boundary before the alloc_current */ + /* Pad the FDT by a specified amount */ + of_len = *of_size + CFG_FDT_PAD; of_start = (unsigned long)lmb_alloc_base(lmb, of_len, 0x1000, - (CFG_BOOTMAPSZ + bootmap_base)); + (CFG_BOOTMAPSZ + bootmap_base)); if (of_start == 0) { puts("device tree - allocation error\n"); @@ -736,7 +782,7 @@ static int boot_relocate_fdt (struct lmb *lmb, ulong bootmap_base, } debug ("## device tree at 0x%08lX ... 0x%08lX (len=%ld=0x%lX)\n", - (ulong)fdt_blob, (ulong)fdt_blob + of_len - 1, + (ulong)fdt_blob, (ulong)fdt_blob + *of_size - 1, of_len, of_len); printf (" Loading Device Tree to %08lx, end %08lx ... ", @@ -750,9 +796,14 @@ static int boot_relocate_fdt (struct lmb *lmb, ulong bootmap_base, puts ("OK\n"); *of_flat_tree = (char *)of_start; + *of_size = of_len; } else { *of_flat_tree = fdt_blob; - lmb_reserve(lmb, (ulong)working_fdt, of_len); + of_len = (CFG_BOOTMAPSZ + bootmap_base) - (ulong)fdt_blob; + lmb_reserve(lmb, (ulong)fdt_blob, of_len); + fdt_set_totalsize(*of_flat_tree, of_len); + + *of_size = of_len; } return 0; diff --git a/lib_sh/Makefile b/lib_sh/Makefile index 0e4fdee0935c13d80bb56cc0c9673e1161d79e67..40343812f74a23666affaef56d35e707a393b8ce 100644 --- a/lib_sh/Makefile +++ b/lib_sh/Makefile @@ -26,7 +26,7 @@ SOBJS-y += COBJS-y += board.o COBJS-y += bootm.o -#COBJS-y += time.o +# COBJS-y += time.o SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) diff --git a/lib_sh/board.c b/lib_sh/board.c index 807415c548fe27672c7835b96a3ae7fba16ef881..eb81bd97ec43c1624ce753874102892d61881502 100644 --- a/lib_sh/board.c +++ b/lib_sh/board.c @@ -112,6 +112,7 @@ static int sh_mem_env_init(void) return 0; } +#if defined(CONFIG_CMD_NET) static int sh_net_init(void) { DECLARE_GLOBAL_DATA_PTR; @@ -127,6 +128,7 @@ static int sh_net_init(void) return 0; } +#endif typedef int (init_fnc_t) (void); @@ -170,8 +172,8 @@ void sh_generic_init (void) bd_t *bd; init_fnc_t **init_fnc_ptr; - char *s; int i; + char *s; memset (gd, 0, CFG_GBL_DATA_SIZE); diff --git a/lib_sh/time.c b/lib_sh/time.c index 3d33918f28f8d7f1d537b638b77e4ccadfb8bce4..9c1dc509bb7cc757deda31db43925e02296acb6a 100644 --- a/lib_sh/time.c +++ b/lib_sh/time.c @@ -22,7 +22,7 @@ */ #include -#include +#include static void tmu_timer_start (unsigned int timer) { diff --git a/net/eth.c b/net/eth.c index 21d14961cb20e04b95ccb739184ae39a43db41fd..7fc9aeea5efb8d5f8d9dd05bc3d42a0920b4c6d1 100644 --- a/net/eth.c +++ b/net/eth.c @@ -28,6 +28,17 @@ #if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI) +/* + * CPU and board-specific Ethernet initializations. Aliased function + * signals caller to move on + */ +static int __def_eth_init(bd_t *bis) +{ + return -1; +} +int cpu_eth_init(bd_t *bis) __attribute((weak, alias("__def_eth_init"))); +int board_eth_init(bd_t *bis) __attribute((weak, alias("__def_eth_init"))); + #ifdef CFG_GT_6426x extern int gt6426x_eth_initialize(bd_t *bis); #endif @@ -55,7 +66,6 @@ extern int scc_initialize(bd_t*); extern int skge_initialize(bd_t*); extern int tsi108_eth_initialize(bd_t*); extern int uli526x_initialize(bd_t *); -extern int tsec_initialize(bd_t*, int, char *); extern int npe_initialize(bd_t *); extern int uec_initialize(int); extern int bfin_EMAC_initialize(bd_t *); @@ -165,6 +175,10 @@ int eth_initialize(bd_t *bis) #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) miiphy_init(); #endif + /* Try board-specific initialization first. If it fails or isn't + * present, try the cpu-specific initialization */ + if (board_eth_init(bis) < 0) + cpu_eth_init(bis); #if defined(CONFIG_DB64360) || defined(CONFIG_CPCI750) mv6436x_eth_initialize(bis); @@ -196,22 +210,6 @@ int eth_initialize(bd_t *bis) #if defined(CONFIG_SK98) skge_initialize(bis); #endif -#if defined(CONFIG_TSEC1) - tsec_initialize(bis, 0, CONFIG_TSEC1_NAME); -#endif -#if defined(CONFIG_TSEC2) - tsec_initialize(bis, 1, CONFIG_TSEC2_NAME); -#endif -#if defined(CONFIG_MPC85XX_FEC) - tsec_initialize(bis, 2, CONFIG_MPC85XX_FEC_NAME); -#else -# if defined(CONFIG_TSEC3) - tsec_initialize(bis, 2, CONFIG_TSEC3_NAME); -# endif -# if defined(CONFIG_TSEC4) - tsec_initialize(bis, 3, CONFIG_TSEC4_NAME); -# endif -#endif #if defined(CONFIG_UEC_ETH1) uec_initialize(0); #endif diff --git a/net/tftp.c b/net/tftp.c index ea8fea2f7e842a43a76a91a436d76c72968a5181..84d83ca97b1e9f333efe1fa780c3803ce6cadca5 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -178,7 +178,7 @@ TftpSend (void) pkt += 5 /*strlen("octet")*/ + 1; strcpy ((char *)pkt, "timeout"); pkt += 7 /*strlen("timeout")*/ + 1; - sprintf((char *)pkt, "%d", TIMEOUT); + sprintf((char *)pkt, "%lu", TIMEOUT); #ifdef ET_DEBUG printf("send option \"timeout %s\"\n", (char *)pkt); #endif diff --git a/post/post.c b/post/post.c index d31829ba162b41c30d5e0672cf5104cd725e3dfc..99dc8c9a74a3d191c894534a1b465f417eed63be 100644 --- a/post/post.c +++ b/post/post.c @@ -319,6 +319,7 @@ int post_run (char *name, int flags) } if (i < post_list_size) { + WATCHDOG_RESET(); return post_run_single (post_list + i, test_flags[i], flags, i); diff --git a/post/tests.c b/post/tests.c index a790c789d63fbf51df9a90bc2e13fdd404776970..e88d92ed7450f28aad950e2a40fb110652b297f5 100644 --- a/post/tests.c +++ b/post/tests.c @@ -240,7 +240,7 @@ struct post_test post_list[] = "DSP test", "dsp", "This test checks any connected DSP(s).", - POST_RAM | POST_MANUAL, + POST_RAM | POST_ALWAYS | POST_MANUAL, &dsp_post_test, NULL, NULL, diff --git a/tools/logos/linux_logo_ttcontrol.bmp b/tools/logos/linux_logo_ttcontrol.bmp new file mode 100644 index 0000000000000000000000000000000000000000..031d3a41ecd3c2d1a732af0a3c53b430545f61e8 Binary files /dev/null and b/tools/logos/linux_logo_ttcontrol.bmp differ diff --git a/tools/logos/linux_logo_ttcontrol_palfin.bmp b/tools/logos/linux_logo_ttcontrol_palfin.bmp new file mode 100644 index 0000000000000000000000000000000000000000..e3e38d1bf6423c7373b6e41530c24ec4d8f6da0c Binary files /dev/null and b/tools/logos/linux_logo_ttcontrol_palfin.bmp differ