ARMv7: Drop u-boot type remains
Just a mechanical cleanup. Change-Id: I0815625e629ab0b7ae6c948144085f1bd8cabfb5 Signed-off-by: Stefan Reinauer <reinauer@google.com> Reviewed-on: http://review.coreboot.org/2408 Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Tested-by: build bot (Jenkins)
This commit is contained in:
parent
37955a21d1
commit
1cf46a7bbf
|
@ -26,13 +26,6 @@
|
||||||
|
|
||||||
#ifndef __ASSEMBLER__ /* put C only stuff in this section */
|
#ifndef __ASSEMBLER__ /* put C only stuff in this section */
|
||||||
|
|
||||||
typedef unsigned char uchar;
|
|
||||||
typedef volatile unsigned long vu_long;
|
|
||||||
typedef volatile unsigned short vu_short;
|
|
||||||
typedef volatile unsigned char vu_char;
|
|
||||||
typedef unsigned long ulong;
|
|
||||||
typedef unsigned int uint;
|
|
||||||
|
|
||||||
#include <types.h>
|
#include <types.h>
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -82,20 +75,18 @@ void __assert_fail(const char *assertion, const char *file, unsigned line,
|
||||||
|
|
||||||
typedef void (interrupt_handler_t)(void *);
|
typedef void (interrupt_handler_t)(void *);
|
||||||
|
|
||||||
//#include <asm/u-boot.h> /* boot information for Linux kernel */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return the time since boot in microseconds, This is needed for bootstage
|
* Return the time since boot in microseconds, This is needed for bootstage
|
||||||
* and should be defined in CPU- or board-specific code. If undefined then
|
* and should be defined in CPU- or board-specific code. If undefined then
|
||||||
* millisecond resolution will be used (the standard get_timer()).
|
* millisecond resolution will be used (the standard get_timer()).
|
||||||
*/
|
*/
|
||||||
ulong timer_get_boot_us(void);
|
unsigned long timer_get_boot_us(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return the current value of a monotonically increasing microsecond timer.
|
* Return the current value of a monotonically increasing microsecond timer.
|
||||||
* Granularity may be larger than 1us if hardware does not support this.
|
* Granularity may be larger than 1us if hardware does not support this.
|
||||||
*/
|
*/
|
||||||
ulong timer_get_us(void);
|
unsigned long timer_get_us(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* General Purpose Utilities
|
* General Purpose Utilities
|
||||||
|
@ -136,7 +127,7 @@ int cpu_init(void);
|
||||||
unsigned long long initdram (int);
|
unsigned long long initdram (int);
|
||||||
int display_options (void);
|
int display_options (void);
|
||||||
void print_size(unsigned long long, const char *);
|
void print_size(unsigned long long, const char *);
|
||||||
int print_buffer (ulong addr, void* data, uint width, uint count, uint linelen);
|
int print_buffer (unsigned long addr, void* data, unsigned int width, unsigned int count, unsigned int linelen);
|
||||||
|
|
||||||
/* common/main.c */
|
/* common/main.c */
|
||||||
void main_loop (void);
|
void main_loop (void);
|
||||||
|
@ -153,7 +144,7 @@ int checkboard (void);
|
||||||
int checkflash (void);
|
int checkflash (void);
|
||||||
int checkdram (void);
|
int checkdram (void);
|
||||||
int last_stage_init(void);
|
int last_stage_init(void);
|
||||||
extern ulong monitor_flash_len;
|
extern unsigned long monitor_flash_len;
|
||||||
int mac_read_from_eeprom(void);
|
int mac_read_from_eeprom(void);
|
||||||
|
|
||||||
#ifdef CONFIG_ARM
|
#ifdef CONFIG_ARM
|
||||||
|
@ -186,8 +177,8 @@ void eeprom_init (void);
|
||||||
#ifndef CONFIG_SPI
|
#ifndef CONFIG_SPI
|
||||||
int eeprom_probe (unsigned dev_addr, unsigned offset);
|
int eeprom_probe (unsigned dev_addr, unsigned offset);
|
||||||
#endif
|
#endif
|
||||||
int eeprom_read (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt);
|
int eeprom_read (unsigned dev_addr, unsigned offset, unsigned char *buffer, unsigned cnt);
|
||||||
int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt);
|
int eeprom_write (unsigned dev_addr, unsigned offset, unsigned char *buffer, unsigned cnt);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set this up regardless of board
|
* Set this up regardless of board
|
||||||
|
@ -204,8 +195,8 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned c
|
||||||
#if defined(CONFIG_SPI)
|
#if defined(CONFIG_SPI)
|
||||||
extern void spi_init_f (void);
|
extern void spi_init_f (void);
|
||||||
extern void spi_init_r (void);
|
extern void spi_init_r (void);
|
||||||
extern ssize_t spi_read (uchar *, int, uchar *, int);
|
extern ssize_t spi_read (unsigned char *, int, unsigned char *, int);
|
||||||
extern ssize_t spi_write (uchar *, int, uchar *, int);
|
extern ssize_t spi_write (unsigned char *, int, unsigned char *, int);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* $(BOARD)/$(BOARD).c */
|
/* $(BOARD)/$(BOARD).c */
|
||||||
|
@ -222,20 +213,20 @@ int testdram(void);
|
||||||
/* $(CPU)/start.S */
|
/* $(CPU)/start.S */
|
||||||
#if defined(CONFIG_5xx) || \
|
#if defined(CONFIG_5xx) || \
|
||||||
defined(CONFIG_8xx)
|
defined(CONFIG_8xx)
|
||||||
uint get_immr (uint);
|
unsigned int get_immr (unsigned int);
|
||||||
#endif
|
#endif
|
||||||
uint get_pir (void);
|
unsigned int get_pir (void);
|
||||||
#if defined(CONFIG_MPC5xxx)
|
#if defined(CONFIG_MPC5xxx)
|
||||||
uint get_svr (void);
|
unsigned int get_svr (void);
|
||||||
#endif
|
#endif
|
||||||
uint get_pvr (void);
|
unsigned int get_pvr (void);
|
||||||
uint get_svr (void);
|
unsigned int get_svr (void);
|
||||||
uint rd_ic_cst (void);
|
unsigned int rd_ic_cst (void);
|
||||||
void wr_ic_cst (uint);
|
void wr_ic_cst (unsigned int);
|
||||||
void wr_ic_adr (uint);
|
void wr_ic_adr (unsigned int);
|
||||||
uint rd_dc_cst (void);
|
unsigned int rd_dc_cst (void);
|
||||||
void wr_dc_cst (uint);
|
void wr_dc_cst (unsigned int);
|
||||||
void wr_dc_adr (uint);
|
void wr_dc_adr (unsigned int);
|
||||||
int icache_status (void);
|
int icache_status (void);
|
||||||
void icache_enable (unsigned long start, unsigned long size);
|
void icache_enable (unsigned long start, unsigned long size);
|
||||||
void icache_disable(void);
|
void icache_disable(void);
|
||||||
|
@ -243,8 +234,8 @@ int dcache_status (void);
|
||||||
void dcache_enable (unsigned long start, unsigned long size);
|
void dcache_enable (unsigned long start, unsigned long size);
|
||||||
void dcache_disable(void);
|
void dcache_disable(void);
|
||||||
void mmu_disable(void);
|
void mmu_disable(void);
|
||||||
ulong get_endaddr (void);
|
unsigned long get_endaddr (void);
|
||||||
void trap_init (ulong);
|
void trap_init (unsigned long);
|
||||||
#if defined (CONFIG_4xx) || \
|
#if defined (CONFIG_4xx) || \
|
||||||
defined (CONFIG_MPC5xxx) || \
|
defined (CONFIG_MPC5xxx) || \
|
||||||
defined (CONFIG_74xx_7xx) || \
|
defined (CONFIG_74xx_7xx) || \
|
||||||
|
@ -293,7 +284,7 @@ int checkcpu (void);
|
||||||
int checkicache (void);
|
int checkicache (void);
|
||||||
int checkdcache (void);
|
int checkdcache (void);
|
||||||
void upmconfig (unsigned int, unsigned int *, unsigned int);
|
void upmconfig (unsigned int, unsigned int *, unsigned int);
|
||||||
ulong get_tbclk (void);
|
unsigned long get_tbclk (void);
|
||||||
#if defined (CONFIG_OF_LIBFDT) && defined (CONFIG_OF_BOARD_SETUP)
|
#if defined (CONFIG_OF_LIBFDT) && defined (CONFIG_OF_BOARD_SETUP)
|
||||||
void ft_cpu_setup(void *blob, bd_t *bd);
|
void ft_cpu_setup(void *blob, bd_t *bd);
|
||||||
#endif
|
#endif
|
||||||
|
@ -332,34 +323,34 @@ int prt_mpc512xxx_clks (void);
|
||||||
int prt_mpc8220_clks (void);
|
int prt_mpc8220_clks (void);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_4xx
|
#ifdef CONFIG_4xx
|
||||||
ulong get_OPB_freq (void);
|
unsigned long get_OPB_freq (void);
|
||||||
ulong get_PCI_freq (void);
|
unsigned long get_PCI_freq (void);
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_S3C24X0) || \
|
#if defined(CONFIG_S3C24X0) || \
|
||||||
defined(CONFIG_LH7A40X) || \
|
defined(CONFIG_LH7A40X) || \
|
||||||
defined(CONFIG_S3C6400) || \
|
defined(CONFIG_S3C6400) || \
|
||||||
defined(CONFIG_EP93XX)
|
defined(CONFIG_EP93XX)
|
||||||
ulong get_FCLK (void);
|
unsigned long get_FCLK (void);
|
||||||
ulong get_HCLK (void);
|
unsigned long get_HCLK (void);
|
||||||
ulong get_PCLK (void);
|
unsigned long get_PCLK (void);
|
||||||
ulong get_UCLK (void);
|
unsigned long get_UCLK (void);
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_LH7A40X)
|
#if defined(CONFIG_LH7A40X)
|
||||||
ulong get_PLLCLK (void);
|
unsigned long get_PLLCLK (void);
|
||||||
#endif
|
#endif
|
||||||
#if defined CONFIG_INCA_IP
|
#if defined CONFIG_INCA_IP
|
||||||
uint incaip_get_cpuclk (void);
|
unsigned int incaip_get_cpuclk (void);
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_IMX)
|
#if defined(CONFIG_IMX)
|
||||||
ulong get_systemPLLCLK(void);
|
unsigned long get_systemPLLCLK(void);
|
||||||
ulong get_FCLK(void);
|
unsigned long get_FCLK(void);
|
||||||
ulong get_HCLK(void);
|
unsigned long get_HCLK(void);
|
||||||
ulong get_BCLK(void);
|
unsigned long get_BCLK(void);
|
||||||
ulong get_PERCLK1(void);
|
unsigned long get_PERCLK1(void);
|
||||||
ulong get_PERCLK2(void);
|
unsigned long get_PERCLK2(void);
|
||||||
ulong get_PERCLK3(void);
|
unsigned long get_PERCLK3(void);
|
||||||
#endif
|
#endif
|
||||||
ulong get_bus_freq (ulong);
|
unsigned long get_bus_freq (unsigned long);
|
||||||
int get_serial_clock(void);
|
int get_serial_clock(void);
|
||||||
|
|
||||||
struct pt_regs;
|
struct pt_regs;
|
||||||
|
@ -370,31 +361,31 @@ void external_interrupt (struct pt_regs *);
|
||||||
void irq_install_handler(int, interrupt_handler_t *, void *);
|
void irq_install_handler(int, interrupt_handler_t *, void *);
|
||||||
void irq_free_handler (int);
|
void irq_free_handler (int);
|
||||||
void reset_timer (void);
|
void reset_timer (void);
|
||||||
ulong get_timer (ulong base);
|
unsigned long get_timer (unsigned long base);
|
||||||
void enable_interrupts (void);
|
void enable_interrupts (void);
|
||||||
int disable_interrupts (void);
|
int disable_interrupts (void);
|
||||||
|
|
||||||
/* $(CPU)/.../commproc.c */
|
/* $(CPU)/.../commproc.c */
|
||||||
int dpram_init (void);
|
int dpram_init (void);
|
||||||
uint dpram_base(void);
|
unsigned int dpram_base(void);
|
||||||
uint dpram_base_align(uint align);
|
unsigned int dpram_base_align(unsigned int align);
|
||||||
uint dpram_alloc(uint size);
|
unsigned int dpram_alloc(unsigned int size);
|
||||||
uint dpram_alloc_align(uint size,uint align);
|
unsigned int dpram_alloc_align(unsigned int size,unsigned int align);
|
||||||
void bootcount_store (ulong);
|
void bootcount_store (unsigned long);
|
||||||
ulong bootcount_load (void);
|
unsigned long bootcount_load (void);
|
||||||
#define BOOTCOUNT_MAGIC 0xB001C041
|
#define BOOTCOUNT_MAGIC 0xB001C041
|
||||||
|
|
||||||
/* $(CPU)/.../<eth> */
|
/* $(CPU)/.../<eth> */
|
||||||
void mii_init (void);
|
void mii_init (void);
|
||||||
|
|
||||||
/* $(CPU)/.../lcd.c */
|
/* $(CPU)/.../lcd.c */
|
||||||
ulong lcd_setmem (ulong);
|
unsigned long lcd_setmem (unsigned long);
|
||||||
|
|
||||||
/* $(CPU)/.../video.c */
|
/* $(CPU)/.../video.c */
|
||||||
ulong video_setmem (ulong);
|
unsigned long video_setmem (unsigned long);
|
||||||
|
|
||||||
/* arch/$(ARCH)/lib/cache.c */
|
/* arch/$(ARCH)/lib/cache.c */
|
||||||
ulong dcache_get_line_size(void);
|
unsigned long dcache_get_line_size(void);
|
||||||
void enable_caches(void);
|
void enable_caches(void);
|
||||||
void flush_cache (unsigned long, unsigned long);
|
void flush_cache (unsigned long, unsigned long);
|
||||||
void flush_dcache_all(void);
|
void flush_dcache_all(void);
|
||||||
|
@ -409,8 +400,8 @@ void wait_ticks (unsigned long);
|
||||||
|
|
||||||
/* arch/$(ARCH)/lib/time.c */
|
/* arch/$(ARCH)/lib/time.c */
|
||||||
void __udelay (unsigned long);
|
void __udelay (unsigned long);
|
||||||
ulong usec2ticks (unsigned long usec);
|
unsigned long usec2ticks (unsigned long usec);
|
||||||
ulong ticks2usec (unsigned long ticks);
|
unsigned long ticks2usec (unsigned long ticks);
|
||||||
int init_timebase (void);
|
int init_timebase (void);
|
||||||
|
|
||||||
/* lib/qsort.c */
|
/* lib/qsort.c */
|
||||||
|
|
|
@ -240,7 +240,7 @@ static void v7_inval_tlb(void)
|
||||||
CP15ISB;
|
CP15ISB;
|
||||||
}
|
}
|
||||||
|
|
||||||
ulong dcache_get_line_size(void)
|
unsigned long dcache_get_line_size(void)
|
||||||
{
|
{
|
||||||
u32 line_len, ccsidr;
|
u32 line_len, ccsidr;
|
||||||
|
|
||||||
|
|
|
@ -148,7 +148,7 @@ static void ReadWriteByte(struct s3c24x0_i2c *i2c)
|
||||||
|
|
||||||
static void i2c_ch_init(struct s3c24x0_i2c *i2c, int speed, int slaveadd)
|
static void i2c_ch_init(struct s3c24x0_i2c *i2c, int speed, int slaveadd)
|
||||||
{
|
{
|
||||||
ulong freq, pres = 16, div;
|
unsigned long freq, pres = 16, div;
|
||||||
|
|
||||||
freq = clock_get_periph_rate(PERIPH_ID_I2C0);
|
freq = clock_get_periph_rate(PERIPH_ID_I2C0);
|
||||||
/* calculate prescaler and divisor values */
|
/* calculate prescaler and divisor values */
|
||||||
|
@ -207,7 +207,7 @@ void board_i2c_init(const void *blob)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < EXYNOS_I2C_MAX_CONTROLLERS; i++) {
|
for (i = 0; i < EXYNOS_I2C_MAX_CONTROLLERS; i++) {
|
||||||
uintptr_t reg_addr = samsung_get_base_i2c() +
|
unsigned intptr_t reg_addr = samsung_get_base_i2c() +
|
||||||
EXYNOS_I2C_SPACING * i;
|
EXYNOS_I2C_SPACING * i;
|
||||||
|
|
||||||
i2c_bus[i].regs = (struct s3c24x0_i2c_bus *)reg_addr;
|
i2c_bus[i].regs = (struct s3c24x0_i2c_bus *)reg_addr;
|
||||||
|
@ -262,7 +262,7 @@ int i2c_get_bus_num_fdt(const void *blob, int node)
|
||||||
|
|
||||||
reg = fdtdec_get_addr(blob, node, "reg");
|
reg = fdtdec_get_addr(blob, node, "reg");
|
||||||
for (i = 0; i < i2c_busses; i++)
|
for (i = 0; i < i2c_busses; i++)
|
||||||
if (reg == (fdt_addr_t)(uintptr_t)i2c_bus[i].regs)
|
if (reg == (fdt_addr_t)(unsigned intptr_t)i2c_bus[i].regs)
|
||||||
return i;
|
return i;
|
||||||
|
|
||||||
debug("%s: Can't find any matched I2C bus\n", __func__);
|
debug("%s: Can't find any matched I2C bus\n", __func__);
|
||||||
|
@ -501,10 +501,10 @@ static int i2c_transfer(struct s3c24x0_i2c *i2c,
|
||||||
return (result == I2C_OK) ? stop_bit_result : result;
|
return (result == I2C_OK) ? stop_bit_result : result;
|
||||||
}
|
}
|
||||||
|
|
||||||
int i2c_probe(uchar chip)
|
int i2c_probe(unsigned char chip)
|
||||||
{
|
{
|
||||||
struct s3c24x0_i2c_bus *i2c;
|
struct s3c24x0_i2c_bus *i2c;
|
||||||
uchar buf[1];
|
unsigned char buf[1];
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
i2c = get_bus(g_current_bus);
|
i2c = get_bus(g_current_bus);
|
||||||
|
@ -522,10 +522,10 @@ int i2c_probe(uchar chip)
|
||||||
return ret != I2C_OK;
|
return ret != I2C_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
|
int i2c_read(unsigned char chip, unsigned int addr, int alen, unsigned char *buffer, int len)
|
||||||
{
|
{
|
||||||
struct s3c24x0_i2c_bus *i2c;
|
struct s3c24x0_i2c_bus *i2c;
|
||||||
uchar xaddr[4];
|
unsigned char xaddr[4];
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (alen > 4) {
|
if (alen > 4) {
|
||||||
|
@ -568,10 +568,10 @@ int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len)
|
int i2c_write(unsigned char chip, unsigned int addr, int alen, unsigned char *buffer, int len)
|
||||||
{
|
{
|
||||||
struct s3c24x0_i2c_bus *i2c;
|
struct s3c24x0_i2c_bus *i2c;
|
||||||
uchar xaddr[4];
|
unsigned char xaddr[4];
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (alen > 4) {
|
if (alen > 4) {
|
||||||
|
|
|
@ -44,8 +44,8 @@ static void exynos_spi_rx_tx(struct exynos_spi *regs, int todo,
|
||||||
void *dinp, void const *doutp, int i)
|
void *dinp, void const *doutp, int i)
|
||||||
{
|
{
|
||||||
int rx_lvl, tx_lvl;
|
int rx_lvl, tx_lvl;
|
||||||
uint *rxp = (uint *)(dinp + (i * (32 * 1024)));
|
unsigned int *rxp = (unsigned int *)(dinp + (i * (32 * 1024)));
|
||||||
uint out_bytes, in_bytes;
|
unsigned int out_bytes, in_bytes;
|
||||||
|
|
||||||
// TODO In currrent implementation, every read/write must be aligned to
|
// TODO In currrent implementation, every read/write must be aligned to
|
||||||
// 4 bytes, otherwise you may get timeout or other unexpected results.
|
// 4 bytes, otherwise you may get timeout or other unexpected results.
|
||||||
|
|
|
@ -83,7 +83,7 @@ int init_timer(void)
|
||||||
*/
|
*/
|
||||||
unsigned long get_timer(unsigned long base)
|
unsigned long get_timer(unsigned long base)
|
||||||
{
|
{
|
||||||
ulong now = timer_get_us_down();
|
unsigned long now = timer_get_us_down();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Increment the time by the amount elapsed since the last read.
|
* Increment the time by the amount elapsed since the last read.
|
||||||
|
|
Loading…
Reference in New Issue