at91sam9g20.c (238354) | at91sam9g20.c (238376) |
---|---|
1/*- 2 * Copyright (c) 2005 Olivier Houchard. All rights reserved. 3 * Copyright (c) 2010 Greg Ansley. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2005 Olivier Houchard. All rights reserved. 3 * Copyright (c) 2010 Greg Ansley. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/arm/at91/at91sam9g20.c 238354 2012-07-10 19:48:42Z imp $"); | 28__FBSDID("$FreeBSD: head/sys/arm/at91/at91sam9g20.c 238376 2012-07-11 20:17:14Z imp $"); |
29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/kernel.h> 34#include <sys/malloc.h> 35#include <sys/module.h> 36 37#define _ARM32_BUS_DMA_PRIVATE 38#include <machine/bus.h> 39 40#include <arm/at91/at91var.h> 41#include <arm/at91/at91reg.h> | 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/kernel.h> 34#include <sys/malloc.h> 35#include <sys/module.h> 36 37#define _ARM32_BUS_DMA_PRIVATE 38#include <machine/bus.h> 39 40#include <arm/at91/at91var.h> 41#include <arm/at91/at91reg.h> |
42#include <arm/at91/at91soc.h> |
|
42#include <arm/at91/at91_aicreg.h> 43#include <arm/at91/at91sam9g20reg.h> | 43#include <arm/at91/at91_aicreg.h> 44#include <arm/at91/at91sam9g20reg.h> |
45#include <arm/at91/at91_pitreg.h> |
|
44#include <arm/at91/at91_pmcreg.h> 45#include <arm/at91/at91_pmcvar.h> | 46#include <arm/at91/at91_pmcreg.h> 47#include <arm/at91/at91_pmcvar.h> |
48#include <arm/at91/at91_rstreg.h> |
|
46 47struct at91sam9_softc { 48 device_t dev; 49 bus_space_tag_t sc_st; 50 bus_space_handle_t sc_sh; 51 bus_space_handle_t sc_sys_sh; 52 bus_space_handle_t sc_aic_sh; 53 bus_space_handle_t sc_matrix_sh; --- 120 unchanged lines hidden (view full) --- 174 at91_cpu_add_builtin_children(parent); 175 } 176} 177 178static int 179at91_probe(device_t dev) 180{ 181 | 49 50struct at91sam9_softc { 51 device_t dev; 52 bus_space_tag_t sc_st; 53 bus_space_handle_t sc_sh; 54 bus_space_handle_t sc_sys_sh; 55 bus_space_handle_t sc_aic_sh; 56 bus_space_handle_t sc_matrix_sh; --- 120 unchanged lines hidden (view full) --- 177 at91_cpu_add_builtin_children(parent); 178 } 179} 180 181static int 182at91_probe(device_t dev) 183{ 184 |
182 device_set_desc(dev, soc_data.name); | 185 device_set_desc(dev, soc_info.name); |
183 return (0); 184} 185 186static int 187at91_attach(device_t dev) 188{ 189 struct at91_pmc_clock *clk; 190 struct at91sam9_softc *sc = device_get_softc(dev); --- 99 unchanged lines hidden (view full) --- 290 "at91sam", 291 at91_methods, 292 sizeof(struct at91sam9_softc), 293}; 294 295static devclass_t at91sam9_devclass; 296 297DRIVER_MODULE(at91sam, atmelarm, at91sam9_driver, at91sam9_devclass, 0, 0); | 186 return (0); 187} 188 189static int 190at91_attach(device_t dev) 191{ 192 struct at91_pmc_clock *clk; 193 struct at91sam9_softc *sc = device_get_softc(dev); --- 99 unchanged lines hidden (view full) --- 293 "at91sam", 294 at91_methods, 295 sizeof(struct at91sam9_softc), 296}; 297 298static devclass_t at91sam9_devclass; 299 300DRIVER_MODULE(at91sam, atmelarm, at91sam9_driver, at91sam9_devclass, 0, 0); |
301 302static struct at91_soc_data soc_data = { 303 .soc_delay = at91_pit_delay, 304 .soc_reset = at91_rst_cpu_reset 305}; 306 307AT91_SOC(AT91_T_SAM9G20, &soc_data); |
|