Factor out common SharpSL PDA code
PATCH 1/2 Factor out common SharpSL PDA code
Factor out to sharpsl code to support devices that are present not only in spitz-family PDAs but also in outher Sharp Zaurus PDAs
--- Makefile.target | 2 +- hw/sharpsl.c | 281 +++++++++++++++++++++++++++++++++++++++++++++++++++ hw/sharpsl.h | 16 +++ hw/spitz.c | 303 +++---------------------------------------------------- 4 files changed, 314 insertions(+), 288 deletions(-) create mode 100644 hw/sharpsl.c create mode 100644 hw/sharpsl.h
Makefile.target +1 -1
@@ -620,7 +620,7 @@ OBJS+= arm-semi.o 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+= spitz.o ide.o serial.o nand.o ecc.o +OBJS+= spitz.o sharpsl.o ide.o serial.o nand.o ecc.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
hw/sharpsl.c new file +281 -0
281 lines not on this page · raw message
hw/sharpsl.h new file +16 -0
@@ -0,0 +1,16 @@ +#ifndef QEMU_SHARPSL_H +#define QEMU_SHARPSL_H + +struct scoop_info_s *scoop_init (struct pxa2xx_state_s *cpu, +int instance, +target_phys_addr_t target_base); + +void scoop_gpio_set (void *opaque,int line,int level); +qemu_irq *scoop_gpio_in_get (struct scoop_info_s *s); +void scoop_gpio_out_set (struct scoop_info_s *s,int line, +qemu_irq handler); + +#define SL_PXA_PARAM_BASE 0xa0000a00 +void sl_bootparam_write (uint32_t ptr); + +#endif
hw/spitz.c +16 -287
346 lines not on this page · raw message
Signature · 6 lines
1.5.5.1 -- With best wishes Dmitry
Hi,
Quoted 2 lines · Dmitry Baryshkov
Factor out to sharpsl code to support devices that are present not only
in spitz-family PDAs but also in outher Sharp Zaurus PDAs
I think of the Tosa as part of spitz family, but we can split the file if you think it's advantageous. hw/spitz.c file would be named hw/zaurus.c but I had to be paranoid about trademarked names at that time, and afaik the SCOOP chip is only used on the Zaurus.
BTW, are you planning to add the other Tosa peripherals?
Cheers
Signature · 2 lines
Please do not print this email unless absolutely necessary. Spread environmental awareness.
Hi,
Quoted 10 lines · andrzej zaborowski
Hi,
Quoted 2 lines · Dmitry Baryshkov
Factor out to sharpsl code to support devices that are present not only
in spitz-family PDAs but also in outher Sharp Zaurus PDAsI think of the Tosa as part of spitz family, but we can split the file if you think it's advantageous.
hw/spitz.cfile would be namedhw/zaurus.cbut I had to be paranoid about trademarked names at that time, and afaik the SCOOP chip is only used on the Zaurus.
SCOOP is a custom ASiC used only on zaurus. However not all zaurii are spitz'. I moved all common functionality to separate file (should be named hw/zaurus.c :)) to make things more clear. And separated
Quoted 2 lines
BTW, are you planning to add the other Tosa peripherals?
Yes. I'm looking at it now. The main problem probably will be TC6393XB which is a SiC containing NAND controller, FB/LCD, OHCI and (unused in tosa) MMC controller. The current code ("return 3") is just a placeholder to make machine type detector work. wm9712 (audio codec + ts interface) and kbd seem to be simpler to implement.
BTW: I wasn't able to get PXA MMC emulation working neither with my code, nor with spitz emulation. Does it work for you?
Signature · 2 lines
With best wishes Dmitry
Quoted 8 lines · Dmitry Baryshkov
Quoted 4 lines · andrzej zaborowski
I think of the Tosa as part of spitz family, but we can split the file if you think it's advantageous.
hw/spitz.cfile would be namedhw/zaurus.cbut I had to be paranoid about trademarked names at that time, and afaik the SCOOP chip is only used on the Zaurus.SCOOP is a custom ASiC used only on zaurus. However not all zaurii are
spitz'. I moved all common functionality to separate file (should be
For that matter akita isn't spitz either...
Quoted 1 line
named
hw/zaurus.c:)) to make things more clear. And separated
Ok, I can rename when committing and optimally I'd use device.h instead of sharpsl.h
Quoted 10 lines
Quoted 4 lines
BTW, are you planning to add the other Tosa peripherals?
Yes. I'm looking at it now. The main problem probably will be TC6393XB
which is a SiC containing NAND controller, FB/LCD, OHCI and (unused in tosa) MMC controller. The current code ("return 3") is just a placeholder to make machine type detector work. wm9712 (audio codec + ts interface) and kbd seem to be simpler to implement.
Great stuff. The WM9712 can be also used in emulating some of the newer Palms.
Quoted 3 lines
BTW: I wasn't able to get PXA MMC emulation working neither with my code, nor with spitz emulation. Does it work for you?
It worked at one time but now I see the card intialisation stops after CMD1, so no, it doesn't.
Regards
Signature · 2 lines
Please do not print this email unless absolutely necessary. Spread environmental awareness.
Quoted 11 lines · andrzej zaborowski
Quoted 8 lines · Dmitry Baryshkov
Quoted 4 lines · andrzej zaborowski
I think of the Tosa as part of spitz family, but we can split the file if you think it's advantageous.
hw/spitz.cfile would be namedhw/zaurus.cbut I had to be paranoid about trademarked names at that time, and afaik the SCOOP chip is only used on the Zaurus.SCOOP is a custom ASiC used only on zaurus. However not all zaurii are
spitz'. I moved all common functionality to separate file (should beFor that matter akita isn't spitz either...
It's like a variation of spitz. The difference between spitz and tosa is rather big.
Quoted 5 lines
Quoted 2 lines
named
hw/zaurus.c:)) to make things more clear. And separatedOk, I can rename when committing and optimally I'd use
device.hinstead ofsharpsl.h
Fine with me. Please commit it so.
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
BTW, are you planning to add the other Tosa peripherals?
Quoted 8 lines
Quoted 5 lines
Yes. I'm looking at it now. The main problem probably will be TC6393XB
which is a SiC containing NAND controller, FB/LCD, OHCI and (unused in tosa) MMC controller. The current code ("return 3") is just a placeholder to make machine type detector work. wm9712 (audio codec + ts interface) and kbd seem to be simpler to implement.Great stuff. The WM9712 can be also used in emulating some of the newer Palms.
Yup. However doing it properly will probably require refactoring of hw/ ac97.c. I'll probably start from tc6393xb.
Quoted 6 lines
Quoted 2 lines
BTW: I wasn't able to get PXA MMC emulation working neither with my code, nor with spitz emulation. Does it work for you?
It worked at one time but now I see the card intialisation stops after CMD1, so no, it doesn't.
Yes, I saw that. Linux gets timeouts and nothing more.
Signature · 2 lines
With best wishes Dmitry