armv7: Clean up arm/snow bootblock build process.

Remove duplicated / testing code and share more driver for bootblock, romstage
and ramstage.

The __PRE_RAM__ is now also defined in bootblock build stage, since bootblock is
executed before RAM is initialized.

Change-Id: I4f5469b1545631eee1cf9f2f5df93cbe3a58268b
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: http://review.coreboot.org/2282
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
Hung-Te Lin
2013-02-04 14:38:03 +08:00
committed by Ronald G. Minnich
parent c720d8d5d4
commit 5f83f6cb7a
18 changed files with 43 additions and 667 deletions

View File

@@ -52,7 +52,7 @@ struct clk_bit_info {
s8 prediv_bit;
};
/* FIXME(dhendrix) conflicts with stp-common/clk.h */
/* FIXME(dhendrix) conflicts with s5p-common/clk.h */
#if 0
unsigned long get_pll_clk(int pllreg);
unsigned long get_arm_clk(void);

View File

@@ -9,6 +9,7 @@
bootblock-y += clock_init.c
bootblock-y += clock.c
bootblock-y += pinmux.c
bootblock-y += power.c
bootblock-y += soc.c
bootblock-y += uart.c

View File

@@ -24,6 +24,7 @@
#ifndef __EXYNOS_CLOCK_INIT_H
#define __EXYNOS_CLOCK_INIT_H
#include "dmc.h"
/* These are the ratio's for configuring ARM clock */
struct arm_clk_ratios {

View File

@@ -25,6 +25,7 @@
#include <common.h>
#include <arch/hlt.h>
#include <arch/io.h>
#include <arch/hlt.h>
#include <console/console.h>
#include <cpu/samsung/exynos5250/cpu.h>
#include <cpu/samsung/exynos5250/power.h>

View File

@@ -211,4 +211,7 @@ void uart_tx_byte(unsigned char data)
{
exynos5_uart_tx_byte(data);
}
void uart_tx_flush(void) {
}
#endif

View File

@@ -221,22 +221,11 @@ void board_i2c_init(const void *blob)
/*
* MULTI BUS I2C support
*/
/*
* FIXME(dhendrix): not sure why this had to be guarded, but the code
* should probably go into an exynos5-specific .c file if it really is
* not generic.
*/
//#ifdef CONFIG_EXYNOS5
static void i2c_bus_init(struct s3c24x0_i2c_bus *i2c, unsigned int bus)
{
exynos_pinmux_config(i2c->id, 0);
i2c_ch_init(i2c->regs, CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
}
//#else
//#error "should not be here"
//static void i2c_bus_init(struct s3c24x0_i2c_bus *i2c, unsigned int bus) {}
//#endif
#ifdef CONFIG_I2C_MULTI_BUS
int i2c_set_bus_num(unsigned int bus)