Christian Daudt | 8ac49e0 | 2012-11-19 09:46:10 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2012 Broadcom Corporation |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation version 2. |
| 7 | * |
| 8 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any |
| 9 | * kind, whether express or implied; without even the implied warranty |
| 10 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | */ |
| 13 | |
| 14 | #include <linux/of_irq.h> |
| 15 | #include <linux/of_platform.h> |
| 16 | #include <linux/init.h> |
| 17 | #include <linux/device.h> |
| 18 | #include <linux/platform_device.h> |
| 19 | |
| 20 | #include <asm/mach/arch.h> |
| 21 | #include <asm/hardware/gic.h> |
| 22 | |
| 23 | #include <asm/mach/time.h> |
| 24 | |
| 25 | static const struct of_device_id irq_match[] = { |
| 26 | {.compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, |
| 27 | {} |
| 28 | }; |
| 29 | |
| 30 | static void timer_init(void) |
| 31 | { |
| 32 | } |
| 33 | |
Christian Daudt | 8ac49e0 | 2012-11-19 09:46:10 -0800 | [diff] [blame] | 34 | static void __init init_irq(void) |
| 35 | { |
| 36 | of_irq_init(irq_match); |
| 37 | } |
| 38 | |
| 39 | static void __init board_init(void) |
| 40 | { |
| 41 | of_platform_populate(NULL, of_default_bus_match_table, NULL, |
| 42 | &platform_bus); |
| 43 | } |
| 44 | |
| 45 | static const char * const bcm11351_dt_compat[] = { "bcm,bcm11351", NULL, }; |
| 46 | |
| 47 | DT_MACHINE_START(BCM11351_DT, "Broadcom Application Processor") |
| 48 | .init_irq = init_irq, |
Stephen Warren | 6bb27d7 | 2012-11-08 12:40:59 -0700 | [diff] [blame^] | 49 | .init_time = timer_init, |
Christian Daudt | 8ac49e0 | 2012-11-19 09:46:10 -0800 | [diff] [blame] | 50 | .init_machine = board_init, |
| 51 | .dt_compat = bcm11351_dt_compat, |
| 52 | .handle_irq = gic_handle_irq, |
| 53 | MACHINE_END |