common: Move relocate_code() to init.h
This is an init function so move it out of the common header. Avoid using the typedef so that we don't have to include the global_data header file. Also tidy up the function style in comments while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
1444998230
commit
941338725d
@ -14,7 +14,7 @@
|
||||
#include <asm/macro.h>
|
||||
|
||||
/*
|
||||
* void relocate_code (addr_moni)
|
||||
* void relocate_code(addr_moni)
|
||||
*
|
||||
* This function relocates the monitor code.
|
||||
* x0 holds the destination address.
|
||||
|
@ -386,7 +386,7 @@ _start:
|
||||
/******************************************************************************/
|
||||
|
||||
/*
|
||||
* void relocate_code (addr_sp, gd, addr_moni)
|
||||
* void relocate_code(addr_sp, gd, addr_moni)
|
||||
*
|
||||
* This "function" does not return, instead it continues in RAM
|
||||
* after relocating the monitor code.
|
||||
|
@ -150,7 +150,7 @@ _start:
|
||||
/******************************************************************************/
|
||||
|
||||
/*
|
||||
* void relocate_code (addr_sp, gd, addr_moni)
|
||||
* void relocate_code(addr_sp, gd, addr_moni)
|
||||
*
|
||||
* This "function" does not return, instead it continues in RAM
|
||||
* after relocating the monitor code.
|
||||
|
@ -229,7 +229,7 @@ _after_flashbar_copy:
|
||||
/******************************************************************************/
|
||||
|
||||
/*
|
||||
* void relocate_code (addr_sp, gd, addr_moni)
|
||||
* void relocate_code(addr_sp, gd, addr_moni)
|
||||
*
|
||||
* This "function" does not return, instead it continues in RAM
|
||||
* after relocating the monitor code.
|
||||
|
@ -155,7 +155,7 @@ _start:
|
||||
/******************************************************************************/
|
||||
|
||||
/*
|
||||
* void relocate_code (addr_sp, gd, addr_moni)
|
||||
* void relocate_code(addr_sp, gd, addr_moni)
|
||||
*
|
||||
* This "function" does not return, instead it continues in RAM
|
||||
* after relocating the monitor code.
|
||||
|
@ -165,7 +165,7 @@ _start:
|
||||
/******************************************************************************/
|
||||
|
||||
/*
|
||||
* void relocate_code (addr_sp, gd, addr_moni)
|
||||
* void relocate_code(addr_sp, gd, addr_moni)
|
||||
*
|
||||
* This "function" does not return, instead it continues in RAM
|
||||
* after relocating the monitor code.
|
||||
|
@ -514,7 +514,7 @@ _start:
|
||||
/******************************************************************************/
|
||||
|
||||
/*
|
||||
* void relocate_code (addr_sp, gd, addr_moni)
|
||||
* void relocate_code(addr_sp, gd, addr_moni)
|
||||
*
|
||||
* This "function" does not return, instead it continues in RAM
|
||||
* after relocating the monitor code.
|
||||
|
@ -155,7 +155,7 @@ _start:
|
||||
/******************************************************************************/
|
||||
|
||||
/*
|
||||
* void relocate_code (addr_sp, gd, addr_moni)
|
||||
* void relocate_code(addr_sp, gd, addr_moni)
|
||||
*
|
||||
* This "function" does not return, instead it continues in RAM
|
||||
* after relocating the monitor code.
|
||||
|
@ -28,6 +28,7 @@
|
||||
|
||||
#include <common.h>
|
||||
#include <cpu_func.h>
|
||||
#include <init.h>
|
||||
#include <asm/relocs.h>
|
||||
#include <asm/sections.h>
|
||||
|
||||
|
@ -223,7 +223,7 @@ call_board_init_f:
|
||||
j board_init_f ! jump to board_init_f() in lib/board.c
|
||||
|
||||
/*
|
||||
* void relocate_code (addr_sp, gd, addr_moni)
|
||||
* void relocate_code(addr_sp, gd, addr_moni)
|
||||
*
|
||||
* This "function" does not return, instead it continues in RAM
|
||||
* after relocating the monitor code.
|
||||
|
@ -147,7 +147,7 @@ _reloc:
|
||||
* We'll call the board_init_r from here since this isn't
|
||||
* supposed to return.
|
||||
*
|
||||
* void relocate_code (ulong sp, gd_t *global_data,
|
||||
* void relocate_code(ulong sp, gd_t *global_data,
|
||||
* ulong reloc_addr)
|
||||
* __attribute__ ((noreturn));
|
||||
*/
|
||||
|
@ -804,7 +804,7 @@ flush_dcache:
|
||||
/*-------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* void relocate_code (addr_sp, gd, addr_moni)
|
||||
* void relocate_code(addr_sp, gd, addr_moni)
|
||||
*
|
||||
* This "function" does not return, instead it continues in RAM
|
||||
* after relocating the monitor code.
|
||||
|
@ -1549,7 +1549,7 @@ write_tlb:
|
||||
blr
|
||||
|
||||
/*
|
||||
* void relocate_code (addr_sp, gd, addr_moni)
|
||||
* void relocate_code(addr_sp, gd, addr_moni)
|
||||
*
|
||||
* This "function" does not return, instead it continues in RAM
|
||||
* after relocating the monitor code.
|
||||
|
@ -636,7 +636,7 @@ in32r:
|
||||
blr
|
||||
|
||||
/*
|
||||
* void relocate_code (addr_sp, gd, addr_moni)
|
||||
* void relocate_code(addr_sp, gd, addr_moni)
|
||||
*
|
||||
* This "function" does not return, instead it continues in RAM
|
||||
* after relocating the monitor code.
|
||||
|
@ -322,7 +322,7 @@ int_return:
|
||||
/*------------------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* void relocate_code (addr_sp, gd, addr_moni)
|
||||
* void relocate_code(addr_sp, gd, addr_moni)
|
||||
*
|
||||
* This "function" does not return, instead it continues in RAM
|
||||
* after relocating the monitor code.
|
||||
|
@ -217,7 +217,7 @@ spl_call_board_init_r:
|
||||
#endif
|
||||
|
||||
/*
|
||||
* void relocate_code (addr_sp, gd, addr_moni)
|
||||
* void relocate_code(addr_sp, gd, addr_moni)
|
||||
*
|
||||
* This "function" does not return, instead it continues in RAM
|
||||
* after relocating the monitor code.
|
||||
|
@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <init.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
|
@ -273,7 +273,7 @@ _start:
|
||||
ill
|
||||
|
||||
/*
|
||||
* void relocate_code (addr_sp, gd, addr_moni)
|
||||
* void relocate_code(addr_sp, gd, addr_moni)
|
||||
*
|
||||
* This "function" does not return, instead it continues in RAM
|
||||
* after relocating the monitor code.
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <console.h>
|
||||
#include <env.h>
|
||||
#include <env_internal.h>
|
||||
#include <init.h>
|
||||
#include <ns16550.h>
|
||||
#include <malloc.h>
|
||||
#include <mmc.h>
|
||||
|
@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <init.h>
|
||||
#include <ns16550.h>
|
||||
#include <asm/io.h>
|
||||
#include <nand.h>
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <console.h>
|
||||
#include <env.h>
|
||||
#include <env_internal.h>
|
||||
#include <init.h>
|
||||
#include <asm/spl.h>
|
||||
#include <malloc.h>
|
||||
#include <ns16550.h>
|
||||
|
@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <init.h>
|
||||
#include <ns16550.h>
|
||||
#include <asm/io.h>
|
||||
#include <nand.h>
|
||||
|
@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <init.h>
|
||||
#include <ns16550.h>
|
||||
#include <asm/io.h>
|
||||
#include <nand.h>
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <common.h>
|
||||
#include <console.h>
|
||||
#include <env_internal.h>
|
||||
#include <init.h>
|
||||
#include <ns16550.h>
|
||||
#include <malloc.h>
|
||||
#include <mmc.h>
|
||||
|
@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <init.h>
|
||||
#include <mpc85xx.h>
|
||||
#include <asm/io.h>
|
||||
#include <ns16550.h>
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <console.h>
|
||||
#include <env.h>
|
||||
#include <env_internal.h>
|
||||
#include <init.h>
|
||||
#include <ns16550.h>
|
||||
#include <malloc.h>
|
||||
#include <mmc.h>
|
||||
|
@ -3,6 +3,7 @@
|
||||
* Copyright 2011 Freescale Semiconductor, Inc.
|
||||
*/
|
||||
#include <common.h>
|
||||
#include <init.h>
|
||||
#include <mpc85xx.h>
|
||||
#include <asm/io.h>
|
||||
#include <ns16550.h>
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <console.h>
|
||||
#include <env.h>
|
||||
#include <env_internal.h>
|
||||
#include <init.h>
|
||||
#include <ns16550.h>
|
||||
#include <malloc.h>
|
||||
#include <mmc.h>
|
||||
|
@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <init.h>
|
||||
#include <ns16550.h>
|
||||
#include <asm/io.h>
|
||||
#include <nand.h>
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <console.h>
|
||||
#include <env.h>
|
||||
#include <env_internal.h>
|
||||
#include <init.h>
|
||||
#include <ns16550.h>
|
||||
#include <malloc.h>
|
||||
#include <mmc.h>
|
||||
|
@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <init.h>
|
||||
#include <ns16550.h>
|
||||
#include <asm/io.h>
|
||||
#include <nand.h>
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <common.h>
|
||||
#include <console.h>
|
||||
#include <env_internal.h>
|
||||
#include <init.h>
|
||||
#include <malloc.h>
|
||||
#include <ns16550.h>
|
||||
#include <nand.h>
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <common.h>
|
||||
#include <console.h>
|
||||
#include <env_internal.h>
|
||||
#include <init.h>
|
||||
#include <malloc.h>
|
||||
#include <ns16550.h>
|
||||
#include <nand.h>
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <common.h>
|
||||
#include <console.h>
|
||||
#include <env_internal.h>
|
||||
#include <init.h>
|
||||
#include <malloc.h>
|
||||
#include <ns16550.h>
|
||||
#include <nand.h>
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <common.h>
|
||||
#include <console.h>
|
||||
#include <env_internal.h>
|
||||
#include <init.h>
|
||||
#include <malloc.h>
|
||||
#include <ns16550.h>
|
||||
#include <nand.h>
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <common.h>
|
||||
#include <console.h>
|
||||
#include <env_internal.h>
|
||||
#include <init.h>
|
||||
#include <malloc.h>
|
||||
#include <ns16550.h>
|
||||
#include <nand.h>
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <common.h>
|
||||
#include <console.h>
|
||||
#include <env_internal.h>
|
||||
#include <init.h>
|
||||
#include <asm/spl.h>
|
||||
#include <malloc.h>
|
||||
#include <ns16550.h>
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <common.h>
|
||||
#include <console.h>
|
||||
#include <env_internal.h>
|
||||
#include <init.h>
|
||||
#include <asm/spl.h>
|
||||
#include <malloc.h>
|
||||
#include <ns16550.h>
|
||||
|
@ -102,12 +102,6 @@ void fdc_hw_init (void);
|
||||
int testdram(void);
|
||||
#endif /* CONFIG_SYS_DRAM_TEST */
|
||||
|
||||
#if defined(CONFIG_ARM)
|
||||
void relocate_code(ulong);
|
||||
#else
|
||||
void relocate_code(ulong, gd_t *, ulong) __attribute__ ((noreturn));
|
||||
#endif
|
||||
|
||||
void s_init(void);
|
||||
|
||||
void upmconfig (unsigned int, unsigned int *, unsigned int);
|
||||
|
@ -12,6 +12,8 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct global_data;
|
||||
|
||||
#ifndef __ASSEMBLY__ /* put C only stuff in this section */
|
||||
|
||||
/*
|
||||
@ -228,6 +230,14 @@ void trap_init(unsigned long reloc_addr);
|
||||
*/
|
||||
void main_loop(void);
|
||||
|
||||
#if defined(CONFIG_ARM)
|
||||
void relocate_code(ulong addr_moni);
|
||||
#else
|
||||
void relocate_code(ulong start_addr_sp, struct global_data *new_gd,
|
||||
ulong relocaddr)
|
||||
__attribute__ ((noreturn));
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
/* Put only stuff here that the assembler can digest */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user