=================================================================== RCS file: /cvs/sys/arch/arm/sa11x0/sa11x1_var.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- sys/arch/arm/sa11x0/sa11x1_var.h 2008/03/04 16:05:18 1.1 +++ sys/arch/arm/sa11x0/sa11x1_var.h 2008/03/05 11:11:22 1.2 @@ -1,4 +1,4 @@ -/* $OpenBSD: sa11x1_var.h,v 1.1 2008/03/04 16:05:18 nbrk Exp $ */ +/* $OpenBSD: sa11x1_var.h,v 1.2 2008/03/05 11:11:22 nbrk Exp $ */ /* $NetBSD: sa11x0_var.h,v 1.4 2003/04/14 14:18:41 rjs Exp $ */ /*- @@ -45,51 +45,48 @@ #include -typedef int (* sa11x1_irq_handler_t)(void *); - -#if 0 -struct sa11x0_softc { +struct sacc_softc { struct device sc_dev; - bus_space_tag_t sc_iot; - bus_space_handle_t sc_ioh; - bus_space_handle_t sc_gpioh; - bus_space_handle_t sc_ppch; - bus_space_handle_t sc_dmach; - bus_space_handle_t sc_reseth; - u_int32_t sc_intrmask; -}; -#endif /* 0 */ -/* Attach args all devices */ -typedef void *sa11x1_chipset_tag_t; + /* our interrupt on SA1110 (usually, intr 0 - GPIO pin 0) */ + int sc_intr; -struct sa11x1_attach_args { - sa11x1_chipset_tag_t sa_sc; - bus_space_tag_t sa_iot; /* Bus tag */ - bus_addr_t sa_addr; /* i/o address (actually, offset from sacc base) */ - bus_size_t sa_size; + /* our own bus/dma tags (note that we needn't parent iot) */ + bus_space_tag_t sc_bust; + bus_dma_tag_t sc_dmat; - int sa_intr; - int sa_gpio; + /* onboard peripheral space (12 units * 128 words) */ + bus_space_handle_t sc_ioh; }; struct sacc_attach_args { - struct sa11x0_attach_args sac_saa; + bus_space_tag_t sac_iot; bus_dma_tag_t sac_dmat; -#define sac_iot sac_saa.sa_iot -#define sac_addr sac_saa.sa_addr -#define sac_size sac_saa.sa_size -#define sac_intr sac_saa.sa_intr + /* we export whole i/o space */ + bus_space_handle_t sac_bush; + /* interrupt on the SA1111 INTC */ + int sac_xintr; + +/* int sac_gpio; XXX */ + + /* device type (for subsequent matches) */ + int sac_typecookie; }; +/* peripheral types */ +#define SACC_TYPE_SBI 0x00 +#define SACC_TYPE_SK 0x01 +#define SACC_TYPE_USB 0x02 +#define SACC_TYPE_AUDIO 0x03 +#define SACC_TYPE_SSP 0x04 +#define SACC_TYPE_TRACK 0x05 +#define SACC_TYPE_MOUSE 0x06 +#define SACC_TYPE_GPIO 0x07 +#define SACC_TYPE_INTC 0x08 +#define SACC_TYPE_PCIC 0x09 + extern struct bus_space sa11x1_bs_tag; //extern struct arm32_bus_dma_tag sa11x0_bus_dma_tag; -#if 0 -void *sa11x1_intr_establish(sa11x0_chipset_tag_t, int, int, int, - int (*)(void *), void *, char *); -void sa11x1_intr_disestablish(void *); -void sa11x1_init_interrupt_masks(void); -#endif /* 0 */ #endif /* _SA11X1_VAR_H */