83 lines
2.0 KiB
C
83 lines
2.0 KiB
C
/*
|
|
* LMS simulator's hardware implementation dependant procedures.
|
|
*/
|
|
|
|
#include <asm/e2k_api.h>
|
|
#include <asm/e2k.h>
|
|
#include <asm/lms.h>
|
|
#include <asm/e3m.h>
|
|
#include <asm/machdep.h>
|
|
#include <asm/mas.h>
|
|
#include <asm/boot_head.h>
|
|
#include <asm/io.h>
|
|
#include <asm/iolinkmask.h>
|
|
|
|
void __init
|
|
boot_e3m_iohub_lms_setup_arch(void)
|
|
{
|
|
boot_machine.x86_io_area_base = E3M_X86_IO_AREA_PHYS_BASE;
|
|
boot_machine.rev = E3M_LMS_CPU_REVISION;
|
|
boot_machine.iset_ver = ELBRUS_ISET;
|
|
}
|
|
|
|
static void
|
|
e3m_iohub_lms_setup_cpu_info(cpuinfo_e2k_t *cpu_info)
|
|
{
|
|
strncpy(cpu_info->vendor, E3M_LMS_CPU_VENDOR, 16);
|
|
cpu_info->family = E3M_LMS_CPU_FAMILY;
|
|
cpu_info->model = E3M_LMS_CPU_MODEL;
|
|
cpu_info->revision = E3M_LMS_CPU_REVISION;
|
|
cpu_info->L1_size = E3M_LMS_L1_CACHE_SIZE;
|
|
cpu_info->L1_bytes = E3M_LMS_L1_CACHE_BYTES;
|
|
cpu_info->L2_size = E3M_LMS_L2_CACHE_SIZE;
|
|
cpu_info->L2_bytes = E3M_LMS_L2_CACHE_BYTES;
|
|
}
|
|
|
|
#ifdef CONFIG_IOHUB_DOMAINS
|
|
/*
|
|
* This e3m machine has only one IOLINK to connect to IOHUB,
|
|
* so it has only one IO bus and PCI domain # 0
|
|
*/
|
|
static void __init
|
|
e3m_iohub_lms_create_io_config(void)
|
|
{
|
|
iolinks_num = 1;
|
|
iohub_set(0, iolink_iohub_map);
|
|
iohub_set(0, iolink_online_iohub_map);
|
|
iolink_iohub_num = 1;
|
|
iolink_online_iohub_num = 1;
|
|
printk(KERN_INFO "IO LINK is connected to IOHUB controller ON\n");
|
|
}
|
|
#endif /* CONFIG_IOHUB_DOMAINS */
|
|
|
|
void __init
|
|
e3m_iohub_lms_setup_arch(void)
|
|
{
|
|
int nid;
|
|
|
|
e2k_setup_arch();
|
|
for_each_node_has_dup_kernel(nid) {
|
|
the_node_machine(nid)->setup_cpu_info =
|
|
e3m_iohub_lms_setup_cpu_info;
|
|
}
|
|
#ifdef CONFIG_IOHUB_DOMAINS
|
|
e3m_iohub_lms_create_io_config();
|
|
#endif /* CONFIG_IOHUB_DOMAINS */
|
|
|
|
}
|
|
|
|
void __init
|
|
e3m_iohub_lms_setup_machine(void)
|
|
{
|
|
int nid;
|
|
|
|
for_each_node_has_dup_kernel(nid) {
|
|
the_node_machine(nid)->iset = NULL;
|
|
the_node_machine(nid)->setup_arch =
|
|
e3m_iohub_lms_setup_arch;
|
|
the_node_machine(nid)->arch_reset = NULL;
|
|
the_node_machine(nid)->arch_halt = NULL;
|
|
the_node_machine(nid)->get_irq_vector = e3m_get_vector;
|
|
}
|
|
}
|