Add R2D-PLUS support, by Magnus Damm.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3268 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
671880e651
commit
0d78f544de
@ -475,7 +475,7 @@ VL_OBJS+= omap.o omap_lcdc.o omap1_clk.o omap_mmc.o palm.o ecc.o
|
|||||||
CPPFLAGS += -DHAS_AUDIO
|
CPPFLAGS += -DHAS_AUDIO
|
||||||
endif
|
endif
|
||||||
ifeq ($(TARGET_BASE_ARCH), sh4)
|
ifeq ($(TARGET_BASE_ARCH), sh4)
|
||||||
VL_OBJS+= shix.o sh7750.o sh7750_regnames.o tc58128.o
|
VL_OBJS+= shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o
|
||||||
endif
|
endif
|
||||||
ifeq ($(TARGET_BASE_ARCH), m68k)
|
ifeq ($(TARGET_BASE_ARCH), m68k)
|
||||||
VL_OBJS+= an5206.o mcf5206.o ptimer.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o
|
VL_OBJS+= an5206.o mcf5206.o ptimer.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o
|
||||||
|
64
hw/r2d.c
Normal file
64
hw/r2d.c
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
/*
|
||||||
|
* Renesas SH7751R R2D-PLUS emulation
|
||||||
|
*
|
||||||
|
* Copyright (c) 2007 Magnus Damm
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "vl.h"
|
||||||
|
|
||||||
|
#define SDRAM_BASE 0x0c000000 /* Physical location of SDRAM: Area 3 */
|
||||||
|
#define SDRAM_SIZE 0x04000000
|
||||||
|
|
||||||
|
void r2d_init(int ram_size, int vga_ram_size, int boot_device,
|
||||||
|
DisplayState * ds, const char **fd_filename, int snapshot,
|
||||||
|
const char *kernel_filename, const char *kernel_cmdline,
|
||||||
|
const char *initrd_filename, const char *cpu_model)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
CPUState *env;
|
||||||
|
struct SH7750State *s;
|
||||||
|
|
||||||
|
env = cpu_init();
|
||||||
|
|
||||||
|
/* Allocate memory space */
|
||||||
|
cpu_register_physical_memory(SDRAM_BASE, SDRAM_SIZE, 0);
|
||||||
|
/* Register peripherals */
|
||||||
|
s = sh7750_init(env);
|
||||||
|
/* Todo: register on board registers */
|
||||||
|
{
|
||||||
|
int kernel_size;
|
||||||
|
|
||||||
|
kernel_size = load_image(kernel_filename, phys_ram_base);
|
||||||
|
|
||||||
|
if (kernel_size < 0) {
|
||||||
|
fprintf(stderr, "qemu: could not load kernel '%s'\n", kernel_filename);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
env->pc = SDRAM_BASE | 0xa0000000; /* Start from P2 area */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QEMUMachine r2d_machine = {
|
||||||
|
"r2d",
|
||||||
|
"r2d-plus board",
|
||||||
|
r2d_init
|
||||||
|
};
|
1
vl.c
1
vl.c
@ -7383,6 +7383,7 @@ void register_machines(void)
|
|||||||
qemu_register_machine(&palmte_machine);
|
qemu_register_machine(&palmte_machine);
|
||||||
#elif defined(TARGET_SH4)
|
#elif defined(TARGET_SH4)
|
||||||
qemu_register_machine(&shix_machine);
|
qemu_register_machine(&shix_machine);
|
||||||
|
qemu_register_machine(&r2d_machine);
|
||||||
#elif defined(TARGET_ALPHA)
|
#elif defined(TARGET_ALPHA)
|
||||||
/* XXX: TODO */
|
/* XXX: TODO */
|
||||||
#elif defined(TARGET_M68K)
|
#elif defined(TARGET_M68K)
|
||||||
|
3
vl.h
3
vl.h
@ -1206,6 +1206,9 @@ extern void cpu_mips_irqctrl_init (void);
|
|||||||
/* shix.c */
|
/* shix.c */
|
||||||
extern QEMUMachine shix_machine;
|
extern QEMUMachine shix_machine;
|
||||||
|
|
||||||
|
/* r2d.c */
|
||||||
|
extern QEMUMachine r2d_machine;
|
||||||
|
|
||||||
#ifdef TARGET_PPC
|
#ifdef TARGET_PPC
|
||||||
/* PowerPC hardware exceptions management helpers */
|
/* PowerPC hardware exceptions management helpers */
|
||||||
typedef void (*clk_setup_cb)(void *opaque, uint32_t freq);
|
typedef void (*clk_setup_cb)(void *opaque, uint32_t freq);
|
||||||
|
Loading…
Reference in New Issue
Block a user