summaryrefslogtreecommitdiff
path: root/lib_ppc
Commit message (Collapse)AuthorAgeLines
* ppc: Loose GOT access in IRQJoakim Tjernlund2010-01-26-0/+50
| | | | | | | | Using the GOT in IRQ handlers requires r14 to be -ffixed-r14. Avoid this by relocatate transfer_to_handler too. This will allow to free up r14 later on. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
* mpc512x: Add display of reset status registerDetlev Zundel2010-01-24-3/+4
| | | | | | | | Content of the RSR is put into gd early so we can output it together with the CPU info. The clearing of gd in board_init_f is redundant for this architecture as it is done in cpu_init_f so we remove it. Signed-off-by: Detlev Zundel <dzu@denx.de>
* Merge branch 'next' of ../nextWolfgang Denk2009-12-15-13/+3
|\
| * Merge branch 'master' into nextWolfgang Denk2009-12-05-6/+1
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: board/esd/plu405/plu405.c drivers/rtc/ftrtc010.c Signed-off-by: Wolfgang Denk <wd@denx.de>
| * | Generic udelay() with watchdog supportIngo van Lil2009-12-05-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the PPC reference implementation the udelay() function is responsible for resetting the watchdog timer as frequently as needed. Most other architectures do not meet that requirement, so long-running operations might result in a watchdog reset. This patch adds a generic udelay() function which takes care of resetting the watchdog before calling an architecture-specific __udelay(). Signed-off-by: Ingo van Lil <inguin@gmx.de>
* | | mpc85xx, mpc86xx: Fix gd->cpu pointer after relocationPeter Tyser2009-12-15-0/+8
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gd->cpu pointer is set to an address located in flash when the probecpu() function is called while U-Boot is executing from flash. This pointer needs to be updated to point to an address in RAM after relocation has occurred otherwise Linux may not be able to boot due to "fdt board" crashing if flash has been erased or changed. This bug was introduced in commit a0e2066f392782730f0398095e583c87812d97f2. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Reported-by: Ed Swarthout <Ed.Swarthout@freescale.com> Tested-by: Kumar Gala <galak@kernel.crashing.org> Tested on MPC8527DS. Tested by: Ed Swarthout <Ed.Swarthout@freescale.com>
* | ppc: Move conditional compilation of kgdb.c to MakefilePeter Tyser2009-11-24-6/+1
|/ | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* mpc85xx: Fix booting on various boardsAnton Vorontsov2009-10-16-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | commit 0e870980a64584a591af775bb9c9fe9450124df9 ("8xxx: Removed CONFIG_NUM_CPUS from 85xx/86xx") breaks U-Boot on various boards, namely the ones that call get_sys_info() from board_early_init_f(). get_sys_info() calls cpu_numcores(), which depends on probecpu() being called before. But probecpu() is called after board_early_init_f(), and so cpu_numcores() returns random values, which in turn crashes get_sys_info(). To fix the issue we place probecpu() before board_early_init_f() in an initialization sequence. Booting on the following boards should be revived now: mpc8540ads mpc8541cds mpc8548cds mpc8555cds mpc8560ads mpc8568mds mpc8569mds and maybe more. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* Add bb_miiphy_init call before any ethernet bring-up code.Luigi 'Comio' Mantellini2009-10-10-0/+7
| | | | | Signed-off-by: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* ppc: Remove extable relocation fixupsPeter Tyser2009-10-03-20/+6
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* ppc: Remove board.c relocation fixupsPeter Tyser2009-10-03-50/+0
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* ppc: Check for compilers that don't support relocationPeter Tyser2009-10-03-0/+6
| | | | | | | | | | Certain ppc compilers are known not to generate the .fixup section properly. The .fixup section is necessary to create a relocatable U-Boot image. A basic check for the existence of the .fixup section should hopefully catch the majority of broken compilers which don't support relocation. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* ppc: Enable full relocation to RAMPeter Tyser2009-10-03-0/+1
| | | | | | | | | | | | | The following changes allow U-Boot to fully relocate from flash to RAM: - Remove linker scripts' .fixup sections from the .text section - Add -mrelocatable to PLATFORM_RELFLAGS for all boards - Define CONFIG_RELOC_FIXUP_WORKS for all boards Previously, U-Boot would partially relocate, but statically initialized pointers needed to be manually relocated. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* ppc: Clean up calling of phy_reset() during initPeter Tyser2009-09-22-16/+1
| | | | | | | Remove board-specific #ifdefs for calling phy_reset() during initializtion Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* ppc: Clean up calling of misc_init_r() during initPeter Tyser2009-09-22-11/+1
| | | | | | | | Remove board-specific #ifdefs for calling misc_init_r() during initializtion Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Acked-by: Heiko Schocher <hs@denx.de>
* ppc/8xxx: relocate cpu pointer in global dataKumar Gala2009-09-08-0/+4
| | | | | | | Now that we have a pointer to the cpu struct we need to relocate it once we get into ram. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* push LOAD_ADDR out to arch mk filesMike Frysinger2009-09-04-0/+2
| | | | | | | | | | Rather than maintain/extend the current ifeq($(ARCH)) mess that exists in the standalone Makefile, push the setting up of LOAD_ADDR out to the arch config.mk (and rename to STANDALONE_LOAD_ADDR in the process). This keeps the common code clean and lets the arch do whatever crazy crap it wants in its own area. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Consolidate arch-specific mem_malloc_init() implementationsPeter Tyser2009-09-04-13/+1
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Standardize mem_malloc_init() implementationPeter Tyser2009-09-04-11/+10
| | | | | | | | | | This lays the groundwork to allow architectures to share a common mem_malloc_init(). Note that the x86 implementation was not modified as it did not fit the mold of all other architectures. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Consolidate arch-specific sbrk() implementationsPeter Tyser2009-09-04-19/+0
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* 8xxx: Removed CONFIG_NUM_CPUS from 85xx/86xxPoonam Aggrwal2009-08-28-1/+4
| | | | | | | | | | | | | The number of CPUs are getting detected dynamically by checking the processor SVR value. Also removed CONFIG_NUM_CPUS references from all the platforms with 85xx/86xx processors. This can help to use the same u-boot image across the platforms. Also revamped and corrected few Freescale Copyright messages. Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* ppc: trigger WDT before starting LinuxHeiko Schocher2009-08-18-0/+2
| | | | Signed-off-by: Heiko Schocher <hs@denx.de>
* Update Freescale copyrights to remove "All Rights Reserved"Kumar Gala2009-07-29-1/+1
| | | | | | "All Rights Reserved" conflicts with the GPL. Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
* Revert "ppc: Unlock cache-as-ram in a consistent manner"Wolfgang Denk2009-07-26-3/+12
| | | | | | | | | This reverts commit 982adfc610669482a32127282fe489857a92cfe3. This patch causes problems on MPC83xx boards - flash recognition stops working. Signed-off-by: Wolfgang Denk <wd@denx.de>
* ppc: Unlock cache-as-ram in a consistent mannerPeter Tyser2009-07-23-12/+3
| | | | | | | | | | | Previously, non-e500 architectures only unlocked their data cache which was used as early RAM when booting to Linux using the "bootm" command. This change causes all PPC boards with CONFIG_SYS_INIT_RAM_LOCK defined to unlock their data cache during U-Boot's initialization. This improves U-Boot performance and provides a common cache state when booting to different OSes. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Move architecture specific config.mk files into subdirsPeter Tyser2009-07-21-0/+41
| | | | | | | | This cleans up U-Boot's toplevel directory a bit and makes the architecture 'config.mk' file naming and location similar to board and cpu 'config.mk' files Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* stdio/device: rework function naming conventionJean-Christophe PLAGNIOL-VILLARD2009-07-18-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-12-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-12-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-12-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-05-1/+1
|
* rename include/zlib.h to include/u-boot/zlib.hJean-Christophe PLAGNIOL-VILLARD2009-04-04-1/+1
| | | | | | | | | Some systems have zlib.h installed in /usr/include/. This isn't the desired file for u-boot code - we want the one in include/zlib.h. This rename will avoid the conflict. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* 85xx/86xx: Ensure MP boot page is not usedKumar Gala2009-04-01-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-20-0/+2
| | | | Signed-off-by: Stefan Roese <sr@denx.de>
* powerpc: Fix compilation warning in board.cStefan Roese2009-03-20-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-20-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-20-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-20-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-20-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-18-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-02-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-16-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: Fix roll over bug in flush_cache()Kumar Gala2009-02-10-2/+4
| | | | | | | | If we call flush_cache(0xfffff000, 0x1000) it would never terminate the loop since end = 0xffffffff and we'd roll over our counter from 0xfffffe0 to 0 (assuming a 32-byte cache line) Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* ppc: Move CONFIG_MAX_MEM_MAPPED to common config.hKumar Gala2009-02-10-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-10-1/+29
| | | | | | | 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-27-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-19-0/+8
| | | | Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* lib_ppc: rework the flush_cacheDave Liu2008-12-15-19/+17
| | | | | | | | | | - It is possible to miss flush/invalidate the last cache line, we fix it at here. - add the volatile and memory clobber. They are pointed by Scott Wood. Signed-off-by: Dave Liu <daveliu@freescale.com>
* lib_ppc: Move trap_init to occur earlierBecky Bruce2008-11-10-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>
* ppc: Fix compile warnings when !CONFIG_OF_LIBFDTPeter Tyser2008-11-02-2/+3
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>