Deleted Added
full compact
at91sam9x5.c (238358) at91sam9x5.c (238376)
1/*-
2 * Copyright (c) 2005 Olivier Houchard. All rights reserved.
3 * Copyright (c) 2010 Greg Ansley. All rights reserved.
4 * Copyright (c) 2012 M. Warner Losh.. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2005 Olivier Houchard. All rights reserved.
3 * Copyright (c) 2010 Greg Ansley. All rights reserved.
4 * Copyright (c) 2012 M. Warner Losh.. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/sys/arm/at91/at91sam9x25.c 238358 2012-07-10 23:11:52Z imp $");
29__FBSDID("$FreeBSD: head/sys/arm/at91/at91sam9x25.c 238376 2012-07-11 20:17:14Z imp $");
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/bus.h>
34#include <sys/kernel.h>
35#include <sys/malloc.h>
36#include <sys/module.h>
37
38#include <machine/bus.h>
39
40#include <arm/at91/at91var.h>
41#include <arm/at91/at91reg.h>
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/bus.h>
34#include <sys/kernel.h>
35#include <sys/malloc.h>
36#include <sys/module.h>
37
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/at91sam9x25reg.h>
43#include <arm/at91/at91_aicreg.h>
44#include <arm/at91/at91sam9x25reg.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 at91sam9x25_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};

--- 112 unchanged lines hidden (view full) ---

166
167 return (0);
168}
169
170static void
171at91_identify(driver_t *drv, device_t parent)
172{
173
49
50struct at91sam9x25_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};

--- 112 unchanged lines hidden (view full) ---

169
170 return (0);
171}
172
173static void
174at91_identify(driver_t *drv, device_t parent)
175{
176
174 if (soc_data.type == AT91_T_SAM9X5 && soc_data.subtype == AT91_ST_SAM9X25) {
177 if (soc_info.type == AT91_T_SAM9X5 && soc_info.subtype == AT91_ST_SAM9X25) {
175 at91_add_child(parent, 0, "at91sam9x25", 0, 0, 0, -1, 0, 0);
176 at91_cpu_add_builtin_children(parent);
177 }
178}
179
180static int
181at91_probe(device_t dev)
182{

--- 96 unchanged lines hidden (view full) ---

279 "at91sam9x25",
280 at91sam9x25_methods,
281 sizeof(struct at91sam9x25_softc),
282};
283
284static devclass_t at91sam9x25_devclass;
285
286DRIVER_MODULE(at91sam9x25, atmelarm, at91sam9x25_driver, at91sam9x25_devclass, 0, 0);
178 at91_add_child(parent, 0, "at91sam9x25", 0, 0, 0, -1, 0, 0);
179 at91_cpu_add_builtin_children(parent);
180 }
181}
182
183static int
184at91_probe(device_t dev)
185{

--- 96 unchanged lines hidden (view full) ---

282 "at91sam9x25",
283 at91sam9x25_methods,
284 sizeof(struct at91sam9x25_softc),
285};
286
287static devclass_t at91sam9x25_devclass;
288
289DRIVER_MODULE(at91sam9x25, atmelarm, at91sam9x25_driver, at91sam9x25_devclass, 0, 0);
290
291static struct at91_soc_data soc_data = {
292 .soc_delay = at91_pit_delay,
293 .soc_reset = at91_rst_cpu_reset
294};
295
296AT91_SOC_SUB(AT91_T_SAM9X5, AT91_ST_SAM9X25, &soc_data);