summaryrefslogtreecommitdiffstats
path: root/lib_ppc/board.c
Commit message (Collapse)AuthorAgeFilesLines
* stdio/device: rework function naming conventionJean-Christophe PLAGNIOL-VILLARD2009-07-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far the console API uses the following naming convention: ======Extract====== typedef struct device_t; int device_register (device_t * dev); int devices_init (void); int device_deregister(char *devname); struct list_head* device_get_list(void); device_t* device_get_by_name(char* name); device_t* device_clone(device_t *dev); ======= which is too generic and confusing. Instead of using device_XX and device_t we change this into stdio_XX and stdio_dev This will also allow to add later a generic device mechanism in order to have support for multiple devices and driver instances. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Edited commit message. Signed-off-by: Wolfgang Denk <wd@denx.de>
* 83xx: Replace CONFIG_MPC83XX with CONFIG_MPC83xxPeter Tyser2009-06-121-4/+4
| | | | | | | | Use the standard lowercase "xx" capitalization that other Freescale architectures use for CPU defines to prevent confusion and errors Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
* make MODEM SUPPORT generic instead of duplicate itJean-Christophe PLAGNIOL-VILLARD2009-06-121-97/+0
| | | | | | | | | | and fix comment Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Adjusted Copyright message. Signed-off-by: Wolfgang Denk <wd@denx.de>
* lib_arch/board.c: Move malloc initialization before flash_init()Stefan Roese2009-06-121-4/+4
| | | | | | | | | | | | | | | | | | | This patch moves the malloc initialization before calling flash_init(). Upcoming changes to the NOR FLASH common CFI driver with optional MTD infrastructure and MTD concatenation support will call malloc(). And nothing really speaks against enabling malloc just a little earlier in the boot stage. Some architectures already enable malloc before calling flash_init() so they don't need any changes here. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Scott McNutt <smcnutt@psyent.com> Cc: Shinya Kuribayashi <shinya.kuribayashi@necel.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Daniel Hellstrom <daniel@gaisler.com> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: John Rigby <jcrigby@gmail.com>
* Update CHANGELOG, coding style cleanup.Wolfgang Denk2009-04-051-1/+1
|
* 85xx/86xx: Ensure MP boot page is not usedKumar Gala2009-04-011-0/+15
| | | | | | | | | | | We had a bug on 86xx in which the boot page used to bring up secondary cores was being overwritten and used for the malloc region in u-boot. We need to reserve the region of memory that the boot page is going to be put at so nothing uses it. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Becky Bruce <beckyb@kernel.crashing.org>
* powerpc: Only use eth_getenv_enetaddr() if networking is enabledStefan Roese2009-03-201-0/+2
| | | | Signed-off-by: Stefan Roese <sr@denx.de>
* powerpc: Fix compilation warning in board.cStefan Roese2009-03-201-2/+1
| | | | | | | | | | Fix this warning: board.c: In function 'board_init_r': board.c:653: warning: unused variable 'i' board.c:651: warning: unused variable 'e' Signed-off-by: Stefan Roese <sr@denx.de>
* ppc: mark global bi_enet*addr as legacyMike Frysinger2009-03-201-47/+7
| | | | | | | | | | | | | | | The environment is the canonical storage location of the mac address, so we're killing off the global data location and moving everything to querying the env directly. In the ppc case, these things are part of the legacy ABI, so keep them around but mark them as legacy so no new code will touch them. Also stop calling load_sernum_ethaddr() since all boards now implement this as a stub. Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Ben Warren <biggerbadderben@gmail.com>
* boards: get mac address from env and move load_sernum_ethaddr() to board initMike Frysinger2009-03-201-6/+0
| | | | | | | | | | | | | | | | | | | The environment is the canonical storage location of the mac address, so we're killing off the global data location and moving everything to querying the env directly. Rather than have common ppc code call a board-specific function like load_sernum_ethaddr(), have each board call it in its own board-specific misc_init_r() function. The boards that get converted here are: - kup4k/kup4x - pcs440ep - tqm8xx Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Ben Warren <biggerbadderben@gmail.com> CC: Stefan Roese <sr@denx.de>
* boards: move board_get_enetaddr() into board-specific initMike Frysinger2009-03-201-28/+0
| | | | | | | | | | | | The environment is the canonical storage location of the mac address, so we're killing off the global data location and moving everything to querying the env directly. Rather than have the common ppc code have board-specific hooks, move the board_get_enetaddr() function into the board-specific init functions. Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Ben Warren <biggerbadderben@gmail.com>
* nx823: get mac address from environmentMike Frysinger2009-03-201-4/+0
| | | | | | | | | | | | | The environment is the canonical storage location of the mac address, so we're killing off the global data location and moving everything to querying the env directly. For the nx823, the serial number is moved out of load_sernum_ethaddr() and into misc_init_r() as is the env setup. This lets us kill off the former function in the process. Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Ben Warren <biggerbadderben@gmail.com>
* 8xx, icache: enabling ICache not before running from RAMHeiko Schocher2009-03-181-2/+1
| | | | | | | with the new CONFIG_SYS_DELAYED_ICACHE config option, ICache is not enabled before code runs from RAM. Signed-off-by: Heiko Schocher <hs@denx.de>
* i2c, dtt: move dtt_init () to board_init_r ()Heiko Schocher2009-03-021-3/+3
| | | | | | | it is not necessary to init the DTTs so early, so move this init to board_init_r (). Signed-off-by: Heiko Schocher <hs@denx.de>
* Add MMC FrameworkAndy Fleming2009-02-161-0/+9
| | | | | | | | | | | | | | Here's a new framework (based roughly off the linux one) for managing MMC controllers. It handles all of the standard SD/MMC transactions, leaving the host drivers to implement only what is necessary to deal with their specific hardware. This also hooks the infrastructure into the PowerPC board code (similar to how the ethernet infrastructure now hooks in) Some of this code was contributed by Dave Liu <daveliu@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
* ppc: Move CONFIG_MAX_MEM_MAPPED to common config.hKumar Gala2009-02-101-3/+0
| | | | | | | | Moved CONFIG_MAX_MEM_MAPPED to the asm/config.h so its kept consistent between the two current users (lib_ppc/board.c, 44x SPD DDR2). Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Stefan Roese <sr@denx.de>
* mpc86xx: Add support to populate addr map based on BATsBecky Bruce2009-02-101-1/+1
| | | | | | | If CONFIG_ADDR_MAP is enabled, update the address map whenever we write a bat. Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
* SATA: do not auto-initialize during bootMike Frysinger2009-01-271-20/+0
| | | | | | | | | | | | Rather than have the board code initialize SATA automatically during boot, make the user manually run "sata init". This brings the SATA subsystem in line with common U-Boot policy. Rather than having a dedicated weak function "is_sata_supported", people can override sata_initialize() to do their weird board stuff. Then they can call the actual __sata_initialize(). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* 85xx: Add support to populate addr map based on TLB settingsKumar Gala2008-12-191-0/+8
| | | | Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* lib_ppc: Move trap_init to occur earlierBecky Bruce2008-11-101-5/+5
| | | | | | | | | | | Doing trap_init immediately once we're running from RAM means we're no longer dependent on the physical location of the flash on non-BookE platforms. Before trap_init, those platforms switch to real mode and go to 0xfff00100 on exception. After the switch, they go to 0x00000100 This makes it easier to move the flash location. Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
* rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD2008-10-181-49/+49
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Adds two more ethernet interface to 83xxrichardretanubun2008-10-181-0/+30
| | | | | | | | | Added as a convenience for other platforms that uses MPC8360 (has 8 UCC). Six eth interface is chosen because the platform I am using combines UCC1&2 and UCC3&4 as 1000 Eth and the other four UCCs as 10/100 Eth. Signed-off-by: Richard Retanubun <RichardRetanubun@RugggedCom.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Fix compiler warning in lib_ppc/board.cHeiko Schocher2008-10-151-2/+2
| | | | | | | Fix compiler warning introduced by commit 0f8cbc18 Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Wolfgang Denk <wd@denx.de>
* Do not init SATA when disabled on 8536DS.Jason Jin2008-10-141-2/+14
| | | | | | | | | | SGMII and SATA share the serdes on MPC8536 CPU, When SATA disabled and the driver still try to access the SATA registers, the cpu will hangup. This patch try to fix this by reading the serdes status before the SATA initialize. Signed-off-by: Jason Jin <Jason.jin@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com>
* rename CFG_ENV macros to CONFIG_ENVJean-Christophe PLAGNIOL-VILLARD2008-09-101-4/+4
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* rename CFG_ENV_IS_NOWHERE in CONFIG_ENV_IS_NOWHEREJean-Christophe PLAGNIOL-VILLARD2008-09-101-2/+2
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* rename CFG_ENV_IS_IN_NVRAM in CONFIG_ENV_IS_IN_NVRAMJean-Christophe PLAGNIOL-VILLARD2008-09-101-1/+1
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* rename CFG_ENV_IS_IN_EEPROM in CONFIG_ENV_IS_IN_EEPROMJean-Christophe PLAGNIOL-VILLARD2008-09-101-1/+1
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* cmd_mac: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD2008-09-101-1/+1
| | | | | | | finish remaning CFG_ID_EEPROM in CONFIG_ID_EEPROM start in commit ad8f8687b78c3e917b173f038926695383c55555 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Consolidate strmhz() implementationHaavard Skinnemoen2008-08-211-13/+0
| | | | | | | | | | ARM, i386, m68k and ppc all have identical implementations of strmhz(). Other architectures don't provide this function at all. This patch moves strmhz() into lib_generic, reducing code duplication and providing a more unified API across architectures. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
* Fix printf() format issues with sizeof_t types by using %zuWolfgang Denk2008-07-141-2/+2
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
* Fix some more print() format errors.Wolfgang Denk2008-07-101-1/+1
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* ppc4xx: Rename CONFIG_XILINX_ML300 to CONFIG_XILINX_405Michal Simek2008-07-061-1/+1
| | | | | | | | This change helps with better handling with others Xilinx based platform. Signed-off-by: Michal Simek <monstr@monstr.eu> Acked-by: Stefan Roese <sr@denx.de>
* Move conditional compilation of MPC8XXX SPI driver to MakefileBen Warren2008-07-011-2/+0
| | | | Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* FSL LAW: Keep track of LAW allocationsKumar Gala2008-06-111-1/+2
| | | | | | | | | | | | | | | 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 <galak@kernel.crashing.org> Signed-off-by: Andy Fleming <afleming@freescale.com>
* Avoid initrd and logbuffer area overlapsMarian Balakowicz2008-06-031-0/+7
| | | | | | | | | 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 <m8@semihalf.com>
* Remove prototypes of nand_init() in favor of including nand.h.Scott Wood2008-05-281-3/+1
| | | | | | Likewise with onenand_init(). Signed-off-by: Scott Wood <scottwood@freescale.com>
* Revert "Avoid initrd and logbuffer area overlaps"Wolfgang Denk2008-05-121-5/+0
| | | | | This reverts commit 1b5605ca57fbb364f4d78eeee28b974ed875e888 which breaks building on all PPC boards that don't use a log buffer.
* Avoid initrd and logbuffer area overlapsMarian Balakowicz2008-05-101-0/+5
| | | | | | | | | 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 <m8@semihalf.com>
* ppc: Cleanup get_effective_memsize() useMarian Balakowicz2008-05-101-11/+0
| | | | | | Removed duplicated effective memory size calculation code. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* lib_ppc: Revert "Make MPC83xx one step closer to full relocation."Kim Phillips2008-04-251-1/+0
| | | | | | | | This reverts commit 70431e8a7393b6b793f77957f95b999fc9a269b8 which has proven problematic getting right from the start at least on 83xx and 4xx. Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
* ppc: Revert patch 70431e8a that used _start instead of CFG_MONITOR_BASEStefan Roese2008-04-091-1/+1
| | | | | | | | | The patch 70431e8a7393b6b793f77957f95b999fc9a269b8 (Make MPC83xx one step closer to full relocation.) doesn't use CFG_MONITOR_BASE anymore. But on 4xx systems _start currently cannot be used for this calculation. So revert back to the original version for now. Signed-off-by: Stefan Roese <sr@denx.de>
* Merge branch 'master' of git://www.denx.de/git/u-boot-mpc83xxWolfgang Denk2008-04-071-2/+3
|\ | | | | | | | | | | | | | | Conflicts: lib_ppc/board.c Signed-off-by: Wolfgang Denk <wd@denx.de>
| * Make MPC83xx one step closer to full relocation.Joakim Tjernlund2008-03-281-1/+2
| | | | | | | | | | | | | | | | Remove a few absolute references to CFG_MONITOR_BASE for ppc/mpc83xx and use GOT relative reference. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
| * mpc8323erdb: fix EEPROM page size and get MAC from EEPROMMichael Barkowski2008-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes eeprom page size so that you can now write more than 64 bytes at a time. It also makes the board take MAC addresses, if found, from EEPROM. User should place up to 4 addresses at offset 0x7f00, for eth{,1,2,3}addr. Any unused addresses should be zero. This group of four six-byte values should have it's CRC at the end. crc32 and eeprom commands can be used to accomplish this. If CRC fails, MAC addresses come from the environment. If CRC succeeds, the environment is overwritten at startup. Signed-off-by: Michael Barkowski <michael.barkowski@freescale.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
* | ppc: Set CFG_MEM_TOP_HIDE to 0 if not already definedStefan Roese2008-03-271-0/+4
| | | | | | | | Signed-off-by: Stefan Roese <sr@denx.de>
* | ppc: Add CFG_MEM_TOP_HIDE option to hide memory area that doesn't get "touched"Stefan Roese2008-03-271-0/+13
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 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 board ports in arch/powerpc with bootwrapper support, which recalculate the memory size from the SDRAM controller setup, will have to get fixed in Linux additionally. This patch enables this config option on some PPC440EPx boards as a workaround for the CHIP 11 errata. Here the description from the AMCC documentation: CHIP_11: End of memory range area restricted access. Category: 3 Overview: The 440EPx DDR controller does not acknowledge any transaction which is determined to be crossing over the end-of-memory-range boundary, even if the starting address is within valid memory space. Any such transaction from any PLB4 master will result in a PLB time-out on PLB4 bus. Impact: In case of such misaligned bursts, PLB4 masters will not retrieve any data at all, just the available data up to the end of memory, especially the 440 CPU. For example, if a CPU instruction required an operand located in memory within the last 7 words of memory, the DCU master would burst read 8 words to update the data cache and cross over the end-of-memory-range boundary. Such a DCU read would not be answered by the DDR controller, resulting in a PLB4 time-out and ultimately in a Machine Check interrupt. The data would be inaccessible to the CPU. Workaround: Forbid any application to access the last 256 bytes of DDR memory. For example, make your operating system believe that the last 256 bytes of DDR memory are absent. AMCC has a patch that does this, available for Linux. This patch sets CFG_MEM_TOP_HIDE for the following 440EPx boards: lwmon5, korat, sequoia The other remaining 440EPx board were intentionally not included since it is not clear to me, if they use the end of ram for some other purpose. This is unclear, since these boards have CONFIG_PRAM defined and even comments like this: PMC440.h: /* esd expects pram at end of physical memory. * So no logbuffer at the moment. */ It is strongly recommended to not use the last 256 bytes on those boards too. Patches from the board maintainers are welcome. Signed-off-by: Stefan Roese <sr@denx.de>
* ata: enable the sata initialize on boot upDave Liu2008-03-261-0/+8
| | | | Signed-off-by: Dave Liu <daveliu@freescale.com>
* ppc: Allow boards to specify how much memory they can mapKumar Gala2008-03-251-0/+11
| | | | | | | | For historical reasons we limited the stack to 256M because some boards could only map that much via BATS. However newer boards are capable of mapping more memory (for example 85xx is capble of doing up to 2G). Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* The patch introduces the alternative configuration of the log buffer for the ↵Yuri Tikhonov2008-03-181-0/+4
| | | | | | | | | | | | | | lwmon5 board: the storage for the log-buffer itself is OCM(on-chip memory), the log-buffer header is moved to six GPT registers (PPC440EPX_GPT0_COMP1, ..., PPC440EPX_GPT0_COMP5). To enable this, alternative, configuration the U-Boot board configuration file for lwmon5 includes the definitions of alternative addresses for header (CONFIG_ALT_LH_ADDR) and buffer (CONFIG_ALT_LB_ADDR). The Linux shall be configured with the CONFIG_ALT_LB_LOCATION option set, and has the BOARD_ALT_LH_ADDR and BOARD_ALT_LB_ADDR constants defined in the lwmon5 board-specific header (arch/ppc/platforms/4xx/lwmon5.h). Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
OpenPOWER on IntegriCloud