t132: own main() for romstage
There's no reason to duplicate code in the mainboards. Therefore, drive the flow of romstage boot in the SoC. This allows for easier scaling with multiple devices. BUG=None BRANCH=None TEST=Built and booted to same place as before. Change-Id: I0d4df84034b19353daad0da1f722b820596c4f55 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/205992 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
This commit is contained in:
parent
a6bce0cbed
commit
de4310af6f
6 changed files with 13 additions and 12 deletions
|
|
@ -32,8 +32,7 @@ bootblock-y += bootblock.c
|
|||
bootblock-y += pmic.c
|
||||
bootblock-y += reset.c
|
||||
|
||||
romstage-y += romstage.c
|
||||
romstage-y += reset.c
|
||||
romstage-y += sdram_configs.c
|
||||
|
||||
ramstage-y += mainboard.c
|
||||
ramstage-y += mainboard.c
|
||||
|
|
|
|||
|
|
@ -18,8 +18,7 @@
|
|||
*/
|
||||
|
||||
#include <console/console.h>
|
||||
#include <soc/nvidia/tegra132/sdram.h>
|
||||
#include "sdram_configs.h"
|
||||
#include <soc/sdram_configs.h>
|
||||
|
||||
static struct sdram_params sdram_configs[] = {
|
||||
#include "bct/sdram-hynix-2GB-924.inc" /* ram_code = 0000 */
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ romstage-y += spi.c
|
|||
romstage-y += i2c.c
|
||||
romstage-y += dma.c
|
||||
romstage-y += monotonic_timer.c
|
||||
romstage-y += romstage.c
|
||||
romstage-y += sdram.c
|
||||
romstage-y += sdram_lp0.c
|
||||
romstage-y += ../tegra/gpio.c
|
||||
|
|
|
|||
|
|
@ -68,7 +68,8 @@ void main(void)
|
|||
|
||||
printk(BIOS_INFO, "T132 bootblock: Mainboard bootblock init done\n");
|
||||
|
||||
entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA, "fallback/romstage");
|
||||
entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA,
|
||||
CONFIG_CBFS_PREFIX "/romstage");
|
||||
|
||||
if (entry) {
|
||||
printk(BIOS_INFO, "T132 bootblock: jumping to romstage\n");
|
||||
|
|
|
|||
|
|
@ -17,12 +17,12 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef __MAINBOARD_GOOGLE_RUSH_SDRAM_CONFIG_H__
|
||||
#define __MAINBOARD_GOOGLE_RUSH_SDRAM_CONFIG_H__
|
||||
#ifndef __SOC_NVIDIA_TEGRA132_SDRAM_CONFIGS_H__
|
||||
#define __SOC_NVIDIA_TEGRA132_SDRAM_CONFIGS_H__
|
||||
|
||||
#include <soc/nvidia/tegra132/sdram_param.h>
|
||||
#include <soc/nvidia/tegra132/sdram.h>
|
||||
|
||||
/* Loads SDRAM configurations for current system. */
|
||||
const struct sdram_params *get_sdram_config(void);
|
||||
|
||||
#endif /* __MAINBOARD_GOOGLE_RUSH_SDRAM_CONFIG_H__ */
|
||||
#endif /* __SOC_NVIDIA_TEGRA132_SDRAM_CONFIGS_H__ */
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
#include <console/console.h>
|
||||
#include <arch/exception.h>
|
||||
|
||||
#include "sdram_configs.h"
|
||||
#include <soc/sdram_configs.h>
|
||||
#include <soc/nvidia/tegra132/sdram.h>
|
||||
|
||||
void main(void)
|
||||
|
|
@ -40,6 +40,7 @@ void main(void)
|
|||
|
||||
while (1);
|
||||
|
||||
entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA, "fallback/ramstage");
|
||||
stage_exit(entry);
|
||||
entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA,
|
||||
CONFIG_CBFS_PREFIX "/ramstage");
|
||||
stage_exit(entry);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue