Nicolas Ferre | 49fe2ba | 2011-10-10 18:29:24 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Setup code for AT91SAM Evaluation Kits with Device Tree support |
| 3 | * |
Nicolas Ferre | 49fe2ba | 2011-10-10 18:29:24 +0200 | [diff] [blame] | 4 | * Copyright (C) 2011 Atmel, |
| 5 | * 2011 Nicolas Ferre <nicolas.ferre@atmel.com> |
| 6 | * |
| 7 | * Licensed under GPLv2 or later. |
| 8 | */ |
| 9 | |
| 10 | #include <linux/types.h> |
| 11 | #include <linux/init.h> |
| 12 | #include <linux/module.h> |
| 13 | #include <linux/gpio.h> |
Nicolas Ferre | 8014d6f4 | 2012-02-14 18:08:14 +0100 | [diff] [blame] | 14 | #include <linux/of.h> |
| 15 | #include <linux/of_irq.h> |
Alexandre Belloni | 4db0ba2 | 2015-01-15 15:59:27 +0100 | [diff] [blame^] | 16 | #include <linux/of_platform.h> |
Boris BREZILLON | 2db5a93 | 2014-03-12 10:43:41 +0100 | [diff] [blame] | 17 | #include <linux/clk-provider.h> |
Nicolas Ferre | 49fe2ba | 2011-10-10 18:29:24 +0200 | [diff] [blame] | 18 | |
Nicolas Ferre | 49fe2ba | 2011-10-10 18:29:24 +0200 | [diff] [blame] | 19 | #include <asm/setup.h> |
| 20 | #include <asm/irq.h> |
| 21 | #include <asm/mach/arch.h> |
| 22 | #include <asm/mach/map.h> |
| 23 | #include <asm/mach/irq.h> |
| 24 | |
Nicolas Ferre | 49fe2ba | 2011-10-10 18:29:24 +0200 | [diff] [blame] | 25 | #include "generic.h" |
| 26 | |
Alexandre Belloni | 4db0ba2 | 2015-01-15 15:59:27 +0100 | [diff] [blame^] | 27 | static void __init sam9_dt_device_init(void) |
| 28 | { |
| 29 | at91_sam9260_pm_init(); |
| 30 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
| 31 | } |
| 32 | |
Nicolas Ferre | 49fe2ba | 2011-10-10 18:29:24 +0200 | [diff] [blame] | 33 | static const char *at91_dt_board_compat[] __initdata = { |
Jean-Christophe PLAGNIOL-VILLARD | 7c8a98c | 2012-03-01 14:47:44 +0800 | [diff] [blame] | 34 | "atmel,at91sam9", |
Nicolas Ferre | 49fe2ba | 2011-10-10 18:29:24 +0200 | [diff] [blame] | 35 | NULL |
| 36 | }; |
| 37 | |
| 38 | DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM (Device Tree)") |
| 39 | /* Maintainer: Atmel */ |
Nicolas Ferre | 49fe2ba | 2011-10-10 18:29:24 +0200 | [diff] [blame] | 40 | .map_io = at91_map_io, |
Jean-Christophe PLAGNIOL-VILLARD | 2b11ea5 | 2012-02-28 13:57:51 +0800 | [diff] [blame] | 41 | .init_early = at91_dt_initialize, |
Alexandre Belloni | 4db0ba2 | 2015-01-15 15:59:27 +0100 | [diff] [blame^] | 42 | .init_machine = sam9_dt_device_init, |
Nicolas Ferre | 49fe2ba | 2011-10-10 18:29:24 +0200 | [diff] [blame] | 43 | .dt_compat = at91_dt_board_compat, |
| 44 | MACHINE_END |
Alexandre Belloni | 4db0ba2 | 2015-01-15 15:59:27 +0100 | [diff] [blame^] | 45 | |
| 46 | static void __init sam9g45_dt_device_init(void) |
| 47 | { |
| 48 | at91_sam9g45_pm_init(); |
| 49 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
| 50 | } |
| 51 | |
| 52 | static const char *at91_9g45_board_compat[] __initconst = { |
| 53 | "atmel,at91sam9g45", |
| 54 | NULL |
| 55 | }; |
| 56 | |
| 57 | DT_MACHINE_START(at91sam9g45_dt, "Atmel AT91SAM9G45") |
| 58 | /* Maintainer: Atmel */ |
| 59 | .map_io = at91_map_io, |
| 60 | .init_early = at91_dt_initialize, |
| 61 | .init_machine = sam9g45_dt_device_init, |
| 62 | .dt_compat = at91_9g45_board_compat, |
| 63 | MACHINE_END |