Deleted Added
full compact
at91sam9260.c (238354) at91sam9260.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/at91sam9260.c 238354 2012-07-10 19:48:42Z imp $");
28__FBSDID("$FreeBSD: head/sys/arm/at91/at91sam9260.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/at91sam9260reg.h>
43#include <arm/at91/at91_aicreg.h>
44#include <arm/at91/at91sam9260reg.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;

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

157
158 return (0x4000);
159}
160
161static void
162at91_identify(driver_t *drv, device_t parent)
163{
164
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;

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

160
161 return (0x4000);
162}
163
164static void
165at91_identify(driver_t *drv, device_t parent)
166{
167
165 if (soc_data.type == AT91_T_SAM9260) {
168 if (soc_info.type == AT91_T_SAM9260) {
166 at91_add_child(parent, 0, "at91sam9260", 0, 0, 0, -1, 0, 0);
167 at91_cpu_add_builtin_children(parent);
168 }
169}
170
171static int
172at91_probe(device_t dev)
173{
174
169 at91_add_child(parent, 0, "at91sam9260", 0, 0, 0, -1, 0, 0);
170 at91_cpu_add_builtin_children(parent);
171 }
172}
173
174static int
175at91_probe(device_t dev)
176{
177
175 device_set_desc(dev, soc_data.name);
178 device_set_desc(dev, soc_info.name);
176 return (0);
177}
178
179static int
180at91_attach(device_t dev)
181{
182 struct at91_pmc_clock *clk;
183 struct at91sam9_softc *sc = device_get_softc(dev);

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

288 at91sam9260_methods,
289 sizeof(struct at91sam9_softc),
290};
291
292static devclass_t at91sam9260_devclass;
293
294DRIVER_MODULE(at91sam9260, atmelarm, at91sam9260_driver, at91sam9260_devclass,
295 NULL, NULL);
179 return (0);
180}
181
182static int
183at91_attach(device_t dev)
184{
185 struct at91_pmc_clock *clk;
186 struct at91sam9_softc *sc = device_get_softc(dev);

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

291 at91sam9260_methods,
292 sizeof(struct at91sam9_softc),
293};
294
295static devclass_t at91sam9260_devclass;
296
297DRIVER_MODULE(at91sam9260, atmelarm, at91sam9260_driver, at91sam9260_devclass,
298 NULL, NULL);
299
300static struct at91_soc_data soc_data = {
301 .soc_delay = at91_pit_delay,
302 .soc_reset = at91_rst_cpu_reset
303};
304
305AT91_SOC(AT91_T_SAM9260, &soc_data);