[4702] TC6393XB system features (Dmitry Baryshkov).
Revision: 4702
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4702 Author: balrog Date: 2008-06-09 00:03:13 +0000 (Mon, 09 Jun 2008)
Log Message:
-----------
TC6393XB system features (Dmitry Baryshkov).
Add basic support for TC6393XB system features. No support for GPIO input though.
Signed-off-by Dmitry Baryshkov <[email protected]>
Modified Paths:
--------------
trunk/Makefile.target
trunk/hw/devices.h
trunk/hw/tosa.c
Added Paths:
-----------
trunk/hw/tc6393xb.c
Modified: trunk/Makefile.target
===================================================================
Makefile.target +1 -1
@@ -585,7 +585,7 @@ OBJS+= pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o OBJS+= pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o OBJS+= pflash_cfi01.o gumstix.o -OBJS+= zaurus.o ide.o serial.o nand.o ecc.o spitz.o tosa.o +OBJS+= zaurus.o ide.o serial.o nand.o ecc.o spitz.o tosa.o tc6393xb.o OBJS+= omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o OBJS+= omap2.o omap_dss.o OBJS+= palm.o tsc210x.o
Modified: trunk/hw/devices.h
===================================================================
hw/devices.h +7 -0
@@ -64,4 +64,11 @@int tusb6010_async_io (struct tusb_s *s);void tusb6010_power (struct tusb_s *s,int on); +/* tc6393xb.c */ +struct tc6393xb_s ; +struct tc6393xb_s *tc6393xb_init (uint32_t base,qemu_irq irq); +void tc6393xb_gpio_out_set (struct tc6393xb_s *s,int line, +qemu_irq handler); +qemu_irq *tc6393xb_gpio_in_get (struct tc6393xb_s *s); +#endif
Added: trunk/hw/tc6393xb.c
===================================================================
hw/tc6393xb.c +291 -0
291 lines not on this page · raw message
Modified: trunk/hw/tosa.c
===================================================================
hw/tosa.c +2 -36
@@ -12,6 +12,7 @@#include "pxa.h" #include "arm-misc.h" #include "sysemu.h" +#include "devices.h" #include "sharpsl.h" #include "pcmcia.h" #include "block.h"
@@ -31,41 +32,6 @@#define TOSA_GPIO_SD_WP (TOSA_SCOOP_GPIO_BASE + 3)#define TOSA_GPIO_PWR_ON (TOSA_SCOOP_GPIO_BASE + 4) -struct tc6393xb_s { -target_phys_addr_t target_base; -}; - -static uint32_t tc6393xb_readb (void *opaque,target_phys_addr_t addr) -{ -return 3 ; -} -static void tc6393xb_writeb (void *opaque,target_phys_addr_t addr, -uint32_t value) -{ -} -static void tosa_tc6393xb_register (struct pxa2xx_state_s *cpu) -{ -int iomemtype; -struct tc6393xb_s *s; -CPUReadMemoryFunc *tc6393xb_readfn[] = { - tc6393xb_readb, - tc6393xb_readb, - tc6393xb_readb, - }; -CPUWriteMemoryFunc *tc6393xb_writefn[] = { - tc6393xb_writeb, - tc6393xb_writeb, - tc6393xb_writeb, - }; - - s = (struct tc6393xb_s *)qemu_mallocz (sizeof (struct tc6393xb_s )); - s->target_base =0x10000000 ; - - iomemtype =cpu_register_io_memory (0 , tc6393xb_readfn, - tc6393xb_writefn, s); -cpu_register_physical_memory (s->target_base,0x200000 , iomemtype); -} -static void tosa_microdrive_attach (struct pxa2xx_state_s *cpu) {struct pcmcia_card_s *md;
@@ -132,7 +98,7 @@cpu_register_physical_memory (0 ,TOSA_ROM ,qemu_ram_alloc (TOSA_ROM ) |IO_MEM_ROM ); -tosa_tc6393xb_register (cpu); +tc6393xb_init (0x10000000 ,NULL ); scp0 =scoop_init (cpu,0 ,0x08800000 ); scp1 =scoop_init (cpu,1 ,0x14800040 );