Revision 99a0949b hw/omap.h
b/hw/omap.h | ||
---|---|---|
63 | 63 |
|
64 | 64 |
/* omap[123].c */ |
65 | 65 |
struct omap_l4_s; |
66 |
struct omap_l4_s *omap_l4_init(target_phys_addr_t base, int ta_num);
|
|
66 |
struct omap_l4_s *omap_l4_init(a_target_phys_addr base, int ta_num);
|
|
67 | 67 |
|
68 | 68 |
struct omap_target_agent_s; |
69 | 69 |
struct omap_target_agent_s *omap_l4ta_get(struct omap_l4_s *bus, int cs); |
70 |
target_phys_addr_t omap_l4_attach(struct omap_target_agent_s *ta, int region,
|
|
70 |
a_target_phys_addr omap_l4_attach(struct omap_target_agent_s *ta, int region,
|
|
71 | 71 |
int iotype); |
72 | 72 |
# define l4_register_io_memory cpu_register_io_memory |
73 | 73 |
|
74 | 74 |
struct omap_intr_handler_s; |
75 |
struct omap_intr_handler_s *omap_inth_init(target_phys_addr_t base,
|
|
75 |
struct omap_intr_handler_s *omap_inth_init(a_target_phys_addr base,
|
|
76 | 76 |
unsigned long size, unsigned char nbanks, qemu_irq **pins, |
77 | 77 |
qemu_irq parent_irq, qemu_irq parent_fiq, omap_clk clk); |
78 |
struct omap_intr_handler_s *omap2_inth_init(target_phys_addr_t base,
|
|
78 |
struct omap_intr_handler_s *omap2_inth_init(a_target_phys_addr base,
|
|
79 | 79 |
int size, int nbanks, qemu_irq **pins, |
80 | 80 |
qemu_irq parent_irq, qemu_irq parent_fiq, |
81 | 81 |
omap_clk fclk, omap_clk iclk); |
... | ... | |
91 | 91 |
omap_clk iclk, struct omap_mpu_state_s *mpu); |
92 | 92 |
|
93 | 93 |
struct omap_sdrc_s; |
94 |
struct omap_sdrc_s *omap_sdrc_init(target_phys_addr_t base);
|
|
94 |
struct omap_sdrc_s *omap_sdrc_init(a_target_phys_addr base);
|
|
95 | 95 |
|
96 | 96 |
struct omap_gpmc_s; |
97 |
struct omap_gpmc_s *omap_gpmc_init(target_phys_addr_t base, qemu_irq irq);
|
|
97 |
struct omap_gpmc_s *omap_gpmc_init(a_target_phys_addr base, qemu_irq irq);
|
|
98 | 98 |
void omap_gpmc_attach(struct omap_gpmc_s *s, int cs, int iomemtype, |
99 |
void (*base_upd)(void *opaque, target_phys_addr_t new),
|
|
99 |
void (*base_upd)(void *opaque, a_target_phys_addr new),
|
|
100 | 100 |
void (*unmap)(void *opaque), void *opaque); |
101 | 101 |
|
102 | 102 |
/* |
... | ... | |
416 | 416 |
}; |
417 | 417 |
|
418 | 418 |
struct soc_dma_s; |
419 |
struct soc_dma_s *omap_dma_init(target_phys_addr_t base, qemu_irq *irqs,
|
|
419 |
struct soc_dma_s *omap_dma_init(a_target_phys_addr base, qemu_irq *irqs,
|
|
420 | 420 |
qemu_irq lcd_irq, struct omap_mpu_state_s *mpu, omap_clk clk, |
421 | 421 |
enum omap_dma_model model); |
422 |
struct soc_dma_s *omap_dma4_init(target_phys_addr_t base, qemu_irq *irqs,
|
|
422 |
struct soc_dma_s *omap_dma4_init(a_target_phys_addr base, qemu_irq *irqs,
|
|
423 | 423 |
struct omap_mpu_state_s *mpu, int fifo, |
424 | 424 |
int chans, omap_clk iclk, omap_clk fclk); |
425 | 425 |
void omap_dma_reset(struct soc_dma_s *s); |
... | ... | |
445 | 445 |
post_incremented, |
446 | 446 |
single_index, |
447 | 447 |
double_index, |
448 |
} omap_dma_addressing_t;
|
|
448 |
} e_omap_dma_addressing;
|
|
449 | 449 |
|
450 | 450 |
/* Only used in OMAP DMA 3.x gigacells */ |
451 | 451 |
struct omap_dma_lcd_channel_s { |
452 | 452 |
enum omap_dma_port src; |
453 |
target_phys_addr_t src_f1_top;
|
|
454 |
target_phys_addr_t src_f1_bottom;
|
|
455 |
target_phys_addr_t src_f2_top;
|
|
456 |
target_phys_addr_t src_f2_bottom;
|
|
453 |
a_target_phys_addr src_f1_top;
|
|
454 |
a_target_phys_addr src_f1_bottom;
|
|
455 |
a_target_phys_addr src_f2_top;
|
|
456 |
a_target_phys_addr src_f2_bottom;
|
|
457 | 457 |
|
458 | 458 |
/* Used in OMAP DMA 3.2 gigacell */ |
459 | 459 |
unsigned char brust_f1; |
... | ... | |
480 | 480 |
uint16_t frames_f1; |
481 | 481 |
uint16_t elements_f2; |
482 | 482 |
uint16_t frames_f2; |
483 |
omap_dma_addressing_t mode_f1;
|
|
484 |
omap_dma_addressing_t mode_f2;
|
|
483 |
e_omap_dma_addressing mode_f1;
|
|
484 |
e_omap_dma_addressing mode_f2;
|
|
485 | 485 |
|
486 | 486 |
/* Destination port is fixed. */ |
487 | 487 |
int interrupts; |
... | ... | |
489 | 489 |
int dual; |
490 | 490 |
|
491 | 491 |
int current_frame; |
492 |
target_phys_addr_t phys_framebuffer[2];
|
|
492 |
a_target_phys_addr phys_framebuffer[2];
|
|
493 | 493 |
qemu_irq irq; |
494 | 494 |
struct omap_mpu_state_s *mpu; |
495 | 495 |
} *omap_dma_get_lcdch(struct soc_dma_s *s); |
... | ... | |
628 | 628 |
|
629 | 629 |
/* omap[123].c */ |
630 | 630 |
struct omap_mpu_timer_s; |
631 |
struct omap_mpu_timer_s *omap_mpu_timer_init(target_phys_addr_t base,
|
|
631 |
struct omap_mpu_timer_s *omap_mpu_timer_init(a_target_phys_addr base,
|
|
632 | 632 |
qemu_irq irq, omap_clk clk); |
633 | 633 |
|
634 | 634 |
struct omap_gp_timer_s; |
... | ... | |
636 | 636 |
qemu_irq irq, omap_clk fclk, omap_clk iclk); |
637 | 637 |
|
638 | 638 |
struct omap_watchdog_timer_s; |
639 |
struct omap_watchdog_timer_s *omap_wd_timer_init(target_phys_addr_t base,
|
|
639 |
struct omap_watchdog_timer_s *omap_wd_timer_init(a_target_phys_addr base,
|
|
640 | 640 |
qemu_irq irq, omap_clk clk); |
641 | 641 |
|
642 | 642 |
struct omap_32khz_timer_s; |
643 |
struct omap_32khz_timer_s *omap_os_timer_init(target_phys_addr_t base,
|
|
643 |
struct omap_32khz_timer_s *omap_os_timer_init(a_target_phys_addr base,
|
|
644 | 644 |
qemu_irq irq, omap_clk clk); |
645 | 645 |
|
646 | 646 |
void omap_synctimer_init(struct omap_target_agent_s *ta, |
647 | 647 |
struct omap_mpu_state_s *mpu, omap_clk fclk, omap_clk iclk); |
648 | 648 |
|
649 | 649 |
struct omap_tipb_bridge_s; |
650 |
struct omap_tipb_bridge_s *omap_tipb_bridge_init(target_phys_addr_t base,
|
|
650 |
struct omap_tipb_bridge_s *omap_tipb_bridge_init(a_target_phys_addr base,
|
|
651 | 651 |
qemu_irq abort_irq, omap_clk clk); |
652 | 652 |
|
653 | 653 |
struct omap_uart_s; |
654 |
struct omap_uart_s *omap_uart_init(target_phys_addr_t base,
|
|
654 |
struct omap_uart_s *omap_uart_init(a_target_phys_addr base,
|
|
655 | 655 |
qemu_irq irq, omap_clk fclk, omap_clk iclk, |
656 | 656 |
qemu_irq txdma, qemu_irq rxdma, CharDriverState *chr); |
657 | 657 |
struct omap_uart_s *omap2_uart_init(struct omap_target_agent_s *ta, |
... | ... | |
661 | 661 |
void omap_uart_attach(struct omap_uart_s *s, CharDriverState *chr); |
662 | 662 |
|
663 | 663 |
struct omap_mpuio_s; |
664 |
struct omap_mpuio_s *omap_mpuio_init(target_phys_addr_t base,
|
|
664 |
struct omap_mpuio_s *omap_mpuio_init(a_target_phys_addr base,
|
|
665 | 665 |
qemu_irq kbd_int, qemu_irq gpio_int, qemu_irq wakeup, |
666 | 666 |
omap_clk clk); |
667 | 667 |
qemu_irq *omap_mpuio_in_get(struct omap_mpuio_s *s); |
... | ... | |
669 | 669 |
void omap_mpuio_key(struct omap_mpuio_s *s, int row, int col, int down); |
670 | 670 |
|
671 | 671 |
struct omap_gpio_s; |
672 |
struct omap_gpio_s *omap_gpio_init(target_phys_addr_t base,
|
|
672 |
struct omap_gpio_s *omap_gpio_init(a_target_phys_addr base,
|
|
673 | 673 |
qemu_irq irq, omap_clk clk); |
674 | 674 |
qemu_irq *omap_gpio_in_get(struct omap_gpio_s *s); |
675 | 675 |
void omap_gpio_out_set(struct omap_gpio_s *s, int line, qemu_irq handler); |
... | ... | |
686 | 686 |
void *opaque; |
687 | 687 |
}; |
688 | 688 |
struct omap_uwire_s; |
689 |
struct omap_uwire_s *omap_uwire_init(target_phys_addr_t base,
|
|
689 |
struct omap_uwire_s *omap_uwire_init(a_target_phys_addr base,
|
|
690 | 690 |
qemu_irq *irq, qemu_irq dma, omap_clk clk); |
691 | 691 |
void omap_uwire_attach(struct omap_uwire_s *s, |
692 | 692 |
uWireSlave *slave, int chipselect); |
... | ... | |
699 | 699 |
int chipselect); |
700 | 700 |
|
701 | 701 |
struct omap_rtc_s; |
702 |
struct omap_rtc_s *omap_rtc_init(target_phys_addr_t base,
|
|
702 |
struct omap_rtc_s *omap_rtc_init(a_target_phys_addr base,
|
|
703 | 703 |
qemu_irq *irq, omap_clk clk); |
704 | 704 |
|
705 | 705 |
struct I2SCodec { |
... | ... | |
727 | 727 |
} in, out; |
728 | 728 |
}; |
729 | 729 |
struct omap_mcbsp_s; |
730 |
struct omap_mcbsp_s *omap_mcbsp_init(target_phys_addr_t base,
|
|
730 |
struct omap_mcbsp_s *omap_mcbsp_init(a_target_phys_addr base,
|
|
731 | 731 |
qemu_irq *irq, qemu_irq *dma, omap_clk clk); |
732 | 732 |
void omap_mcbsp_i2s_attach(struct omap_mcbsp_s *s, I2SCodec *slave); |
733 | 733 |
|
734 | 734 |
struct omap_lpg_s; |
735 |
struct omap_lpg_s *omap_lpg_init(target_phys_addr_t base, omap_clk clk);
|
|
735 |
struct omap_lpg_s *omap_lpg_init(a_target_phys_addr base, omap_clk clk);
|
|
736 | 736 |
|
737 | 737 |
void omap_tap_init(struct omap_target_agent_s *ta, |
738 | 738 |
struct omap_mpu_state_s *mpu); |
... | ... | |
744 | 744 |
/* omap_lcdc.c */ |
745 | 745 |
struct omap_lcd_panel_s; |
746 | 746 |
void omap_lcdc_reset(struct omap_lcd_panel_s *s); |
747 |
struct omap_lcd_panel_s *omap_lcdc_init(target_phys_addr_t base, qemu_irq irq,
|
|
747 |
struct omap_lcd_panel_s *omap_lcdc_init(a_target_phys_addr base, qemu_irq irq,
|
|
748 | 748 |
struct omap_dma_lcd_channel_s *dma, |
749 |
ram_addr_t imif_base, ram_addr_t emiff_base, omap_clk clk);
|
|
749 |
a_ram_addr imif_base, a_ram_addr emiff_base, omap_clk clk);
|
|
750 | 750 |
|
751 | 751 |
/* omap_dss.c */ |
752 | 752 |
struct rfbi_chip_s { |
... | ... | |
758 | 758 |
struct omap_dss_s; |
759 | 759 |
void omap_dss_reset(struct omap_dss_s *s); |
760 | 760 |
struct omap_dss_s *omap_dss_init(struct omap_target_agent_s *ta, |
761 |
target_phys_addr_t l3_base,
|
|
761 |
a_target_phys_addr l3_base,
|
|
762 | 762 |
qemu_irq irq, qemu_irq drq, |
763 | 763 |
omap_clk fck1, omap_clk fck2, omap_clk ck54m, |
764 | 764 |
omap_clk ick1, omap_clk ick2); |
... | ... | |
766 | 766 |
|
767 | 767 |
/* omap_mmc.c */ |
768 | 768 |
struct omap_mmc_s; |
769 |
struct omap_mmc_s *omap_mmc_init(target_phys_addr_t base,
|
|
769 |
struct omap_mmc_s *omap_mmc_init(a_target_phys_addr base,
|
|
770 | 770 |
BlockDriverState *bd, |
771 | 771 |
qemu_irq irq, qemu_irq dma[], omap_clk clk); |
772 | 772 |
struct omap_mmc_s *omap2_mmc_init(struct omap_target_agent_s *ta, |
... | ... | |
778 | 778 |
|
779 | 779 |
/* omap_i2c.c */ |
780 | 780 |
struct omap_i2c_s; |
781 |
struct omap_i2c_s *omap_i2c_init(target_phys_addr_t base,
|
|
781 |
struct omap_i2c_s *omap_i2c_init(a_target_phys_addr base,
|
|
782 | 782 |
qemu_irq irq, qemu_irq *dma, omap_clk clk); |
783 | 783 |
struct omap_i2c_s *omap2_i2c_init(struct omap_target_agent_s *ta, |
784 | 784 |
qemu_irq irq, qemu_irq *dma, omap_clk fclk, omap_clk iclk); |
... | ... | |
829 | 829 |
|
830 | 830 |
struct omap_dma_port_if_s { |
831 | 831 |
uint32_t (*read[3])(struct omap_mpu_state_s *s, |
832 |
target_phys_addr_t offset);
|
|
832 |
a_target_phys_addr offset);
|
|
833 | 833 |
void (*write[3])(struct omap_mpu_state_s *s, |
834 |
target_phys_addr_t offset, uint32_t value);
|
|
834 |
a_target_phys_addr offset, uint32_t value);
|
|
835 | 835 |
int (*addr_valid)(struct omap_mpu_state_s *s, |
836 |
target_phys_addr_t addr);
|
|
836 |
a_target_phys_addr addr);
|
|
837 | 837 |
} port[__omap_dma_port_last]; |
838 | 838 |
|
839 | 839 |
unsigned long sdram_size; |
... | ... | |
969 | 969 |
# error TARGET_PHYS_ADDR_BITS undefined |
970 | 970 |
# endif |
971 | 971 |
|
972 |
uint32_t omap_badwidth_read8(void *opaque, target_phys_addr_t addr);
|
|
973 |
void omap_badwidth_write8(void *opaque, target_phys_addr_t addr,
|
|
972 |
uint32_t omap_badwidth_read8(void *opaque, a_target_phys_addr addr);
|
|
973 |
void omap_badwidth_write8(void *opaque, a_target_phys_addr addr,
|
|
974 | 974 |
uint32_t value); |
975 |
uint32_t omap_badwidth_read16(void *opaque, target_phys_addr_t addr);
|
|
976 |
void omap_badwidth_write16(void *opaque, target_phys_addr_t addr,
|
|
975 |
uint32_t omap_badwidth_read16(void *opaque, a_target_phys_addr addr);
|
|
976 |
void omap_badwidth_write16(void *opaque, a_target_phys_addr addr,
|
|
977 | 977 |
uint32_t value); |
978 |
uint32_t omap_badwidth_read32(void *opaque, target_phys_addr_t addr);
|
|
979 |
void omap_badwidth_write32(void *opaque, target_phys_addr_t addr,
|
|
978 |
uint32_t omap_badwidth_read32(void *opaque, a_target_phys_addr addr);
|
|
979 |
void omap_badwidth_write32(void *opaque, a_target_phys_addr addr,
|
|
980 | 980 |
uint32_t value); |
981 | 981 |
|
982 | 982 |
void omap_mpu_wakeup(void *opaque, int irq, int req); |
... | ... | |
1045 | 1045 |
int in; |
1046 | 1046 |
}; |
1047 | 1047 |
|
1048 |
static uint32_t io_readb(void *opaque, target_phys_addr_t addr)
|
|
1048 |
static uint32_t io_readb(void *opaque, a_target_phys_addr addr)
|
|
1049 | 1049 |
{ |
1050 | 1050 |
struct io_fn *s = opaque; |
1051 | 1051 |
uint32_t ret; |
... | ... | |
1057 | 1057 |
fprintf(stderr, "%08x ---> %02x\n", (uint32_t) addr, ret); |
1058 | 1058 |
return ret; |
1059 | 1059 |
} |
1060 |
static uint32_t io_readh(void *opaque, target_phys_addr_t addr)
|
|
1060 |
static uint32_t io_readh(void *opaque, a_target_phys_addr addr)
|
|
1061 | 1061 |
{ |
1062 | 1062 |
struct io_fn *s = opaque; |
1063 | 1063 |
uint32_t ret; |
... | ... | |
1069 | 1069 |
fprintf(stderr, "%08x ---> %04x\n", (uint32_t) addr, ret); |
1070 | 1070 |
return ret; |
1071 | 1071 |
} |
1072 |
static uint32_t io_readw(void *opaque, target_phys_addr_t addr)
|
|
1072 |
static uint32_t io_readw(void *opaque, a_target_phys_addr addr)
|
|
1073 | 1073 |
{ |
1074 | 1074 |
struct io_fn *s = opaque; |
1075 | 1075 |
uint32_t ret; |
... | ... | |
1081 | 1081 |
fprintf(stderr, "%08x ---> %08x\n", (uint32_t) addr, ret); |
1082 | 1082 |
return ret; |
1083 | 1083 |
} |
1084 |
static void io_writeb(void *opaque, target_phys_addr_t addr, uint32_t value)
|
|
1084 |
static void io_writeb(void *opaque, a_target_phys_addr addr, uint32_t value)
|
|
1085 | 1085 |
{ |
1086 | 1086 |
struct io_fn *s = opaque; |
1087 | 1087 |
|
... | ... | |
1091 | 1091 |
s->mem_write[0](s->opaque, addr, value); |
1092 | 1092 |
s->in --; |
1093 | 1093 |
} |
1094 |
static void io_writeh(void *opaque, target_phys_addr_t addr, uint32_t value)
|
|
1094 |
static void io_writeh(void *opaque, a_target_phys_addr addr, uint32_t value)
|
|
1095 | 1095 |
{ |
1096 | 1096 |
struct io_fn *s = opaque; |
1097 | 1097 |
|
... | ... | |
1101 | 1101 |
s->mem_write[1](s->opaque, addr, value); |
1102 | 1102 |
s->in --; |
1103 | 1103 |
} |
1104 |
static void io_writew(void *opaque, target_phys_addr_t addr, uint32_t value)
|
|
1104 |
static void io_writew(void *opaque, a_target_phys_addr addr, uint32_t value)
|
|
1105 | 1105 |
{ |
1106 | 1106 |
struct io_fn *s = opaque; |
1107 | 1107 |
|
Also available in: Unified diff