diff options
author | cognet <cognet@FreeBSD.org> | 2010-10-06 22:25:21 +0000 |
---|---|---|
committer | cognet <cognet@FreeBSD.org> | 2010-10-06 22:25:21 +0000 |
commit | 2edabad8a47c024ddbf097f91202a71b88cff6fc (patch) | |
tree | c231f180320438f262879021e2e02bbace0911b3 /sys/arm/at91/at91var.h | |
parent | 87987160d6251c2bc94a904a9995d519ac8df5fd (diff) | |
download | FreeBSD-src-2edabad8a47c024ddbf097f91202a71b88cff6fc.zip FreeBSD-src-2edabad8a47c024ddbf097f91202a71b88cff6fc.tar.gz |
if_ate.c:
* Support for sam9 "EMAC" controller.
* Support for rmii interface to phy.
at91.c & at91sam9.c:
* Eliminate separate at91sam9.c file.
* Add new devices to at91sam9_devs table.
at91_machdep.c & at at91sam9_machdep.c:
* Automatic chip type determination.
* Remove compile time chip dependencies.
* Eliminate separate at91sam9_machdep.c file.
at91_pmc.c:
* Corrected support for all of the sam926? and sam9g20 chips.
* Remove compile time chip dependencies.
My apologies to Greg for taking so long to take care of it.
Diffstat (limited to 'sys/arm/at91/at91var.h')
-rw-r--r-- | sys/arm/at91/at91var.h | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/sys/arm/at91/at91var.h b/sys/arm/at91/at91var.h index 3f82dd7..94e759a 100644 --- a/sys/arm/at91/at91var.h +++ b/sys/arm/at91/at91var.h @@ -28,21 +28,62 @@ #ifndef _AT91VAR_H_ #define _AT91VAR_H_ +#include <sys/bus.h> #include <sys/rman.h> +#include <arm/at91/at91reg.h> + struct at91_softc { device_t dev; bus_space_tag_t sc_st; bus_space_handle_t sc_sh; - bus_space_handle_t sc_sys_sh; + bus_space_handle_t sc_aic_sh; struct rman sc_irq_rman; struct rman sc_mem_rman; + uint32_t sc_irq_system; }; struct at91_ivar { struct resource_list resources; }; +struct cpu_devs +{ + const char *name; + int unit; + bus_addr_t mem_base; + bus_size_t mem_len; + int irq0; + int irq1; + int irq2; + const char *parent_clk; +}; + +extern uint32_t at91_chip_id; + +static inline int at91_is_rm92(void); +static inline int at91_is_sam9(void) ; +static inline int at91_cpu_is(u_int cpu); + +static inline int +at91_is_rm92(void) +{ + return (AT91_ARCH(at91_chip_id) == AT91_ARCH_RM92); +} + +static inline int +at91_is_sam9(void) +{ + return (AT91_ARCH(at91_chip_id) == AT91_ARCH_SAM9); +} + +static inline int +at91_cpu_is(u_int cpu) +{ + return (AT91_CPU(at91_chip_id) == cpu); +} + +extern uint32_t at91_irq_system; extern uint32_t at91_master_clock; #endif /* _AT91VAR_H_ */ |