sparc32: move last fw_cfg user to openbios.c

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@849 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2010-08-10 18:16:46 +00:00
parent 42e80be223
commit fd61e4c7a1
3 changed files with 10 additions and 10 deletions

View File

@@ -828,6 +828,7 @@ arch_init( void )
uint32_t temp;
uint16_t machine_id;
char buf[256];
unsigned long mem_size;
fw_cfg_init();
@@ -853,9 +854,11 @@ arch_init( void )
ob_init_mmu();
ob_init_iommu(hwdef->iommu_base);
#ifdef CONFIG_DRIVER_OBIO
mem_size = fw_cfg_read_i32(FW_CFG_RAM_SIZE);
ob_obio_init(hwdef->slavio_base, hwdef->fd_offset,
hwdef->counter_offset, hwdef->intr_offset,
hwdef->aux1_offset, hwdef->aux2_offset);
hwdef->aux1_offset, hwdef->aux2_offset,
mem_size);
setup_machine(hwdef->slavio_base);

View File

@@ -20,8 +20,6 @@
#include "arch/common/nvram.h"
#include "libopenbios/ofmem.h"
#include "obio.h"
#define NO_QEMU_PROTOS
#include "arch/common/fw_cfg.h"
#include "escc.h"
#define PROMDEV_KBD 0 /* input from keyboard */
@@ -402,12 +400,9 @@ start_cpu(unsigned int pc, unsigned int context_ptr, unsigned int context, int c
}
static void
ob_smp_init(void)
ob_smp_init(unsigned long mem_size)
{
unsigned long mem_size;
// See arch/sparc32/entry.S for memory layout
mem_size = fw_cfg_read_i32(FW_CFG_RAM_SIZE);
smp_header = (struct smp_cfg *)map_io((uint64_t)(mem_size - 0x100),
sizeof(struct smp_cfg));
}
@@ -499,7 +494,8 @@ NODE_METHODS(ob_obio) = {
int
ob_obio_init(uint64_t slavio_base, unsigned long fd_offset,
unsigned long counter_offset, unsigned long intr_offset,
unsigned long aux1_offset, unsigned long aux2_offset)
unsigned long aux1_offset, unsigned long aux2_offset,
unsigned long mem_size)
{
// All devices were integrated to NCR89C105, see
@@ -534,7 +530,7 @@ ob_obio_init(uint64_t slavio_base, unsigned long fd_offset,
ob_interrupt_init(slavio_base, intr_offset);
ob_smp_init();
ob_smp_init(mem_size);
return 0;
}

View File

@@ -64,7 +64,8 @@ int ob_esp_init(unsigned int slot, uint64_t base, unsigned long espoffset,
/* drivers/obio.c */
int ob_obio_init(uint64_t slavio_base, unsigned long fd_offset,
unsigned long counter_offset, unsigned long intr_offset,
unsigned long aux1_offset, unsigned long aux2_offset);
unsigned long aux1_offset, unsigned long aux2_offset,
unsigned long mem_size);
int start_cpu(unsigned int pc, unsigned int context_ptr, unsigned int context,
int cpu);
void ob_eccmemctl_init(uint64_t base);