Rabin Vincent | 178980f | 2010-05-03 07:39:02 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) ST-Ericsson SA 2010 |
| 3 | * |
| 4 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson |
| 5 | * License terms: GNU General Public License (GPL) version 2 |
| 6 | */ |
| 7 | |
| 8 | #include <linux/platform_device.h> |
Rabin Vincent | 178980f | 2010-05-03 07:39:02 +0100 | [diff] [blame] | 9 | #include <linux/io.h> |
| 10 | #include <linux/clk.h> |
Linus Walleij | 650c2a2 | 2011-05-15 22:53:56 +0200 | [diff] [blame] | 11 | #include <linux/mfd/db8500-prcmu.h> |
Linus Walleij | 8317797 | 2011-05-03 18:14:48 +0200 | [diff] [blame] | 12 | #include <linux/mfd/db5500-prcmu.h> |
Mattias Wallin | 7ed00af | 2011-05-27 10:30:34 +0200 | [diff] [blame] | 13 | #include <linux/clksrc-dbx500-prcmu.h> |
Rabin Vincent | 178980f | 2010-05-03 07:39:02 +0100 | [diff] [blame] | 14 | |
Rabin Vincent | 178980f | 2010-05-03 07:39:02 +0100 | [diff] [blame] | 15 | #include <asm/hardware/gic.h> |
| 16 | #include <asm/mach/map.h> |
Rabin Vincent | 41ac329 | 2010-05-03 08:28:05 +0100 | [diff] [blame] | 17 | #include <asm/localtimer.h> |
Rabin Vincent | 178980f | 2010-05-03 07:39:02 +0100 | [diff] [blame] | 18 | |
| 19 | #include <mach/hardware.h> |
| 20 | #include <mach/setup.h> |
Rabin Vincent | d48fd00 | 2010-05-03 07:46:56 +0100 | [diff] [blame] | 21 | #include <mach/devices.h> |
Rabin Vincent | 178980f | 2010-05-03 07:39:02 +0100 | [diff] [blame] | 22 | |
| 23 | #include "clock.h" |
| 24 | |
Linus Walleij | 1187189 | 2011-03-29 16:53:29 +0200 | [diff] [blame] | 25 | void __iomem *_PRCMU_BASE; |
| 26 | |
Rabin Vincent | 178980f | 2010-05-03 07:39:02 +0100 | [diff] [blame] | 27 | void __init ux500_init_irq(void) |
| 28 | { |
Rabin Vincent | 92389ca | 2010-12-08 11:07:57 +0530 | [diff] [blame] | 29 | void __iomem *dist_base; |
| 30 | void __iomem *cpu_base; |
| 31 | |
| 32 | if (cpu_is_u5500()) { |
| 33 | dist_base = __io_address(U5500_GIC_DIST_BASE); |
| 34 | cpu_base = __io_address(U5500_GIC_CPU_BASE); |
| 35 | } else if (cpu_is_u8500()) { |
| 36 | dist_base = __io_address(U8500_GIC_DIST_BASE); |
| 37 | cpu_base = __io_address(U8500_GIC_CPU_BASE); |
| 38 | } else |
| 39 | ux500_unknown_soc(); |
| 40 | |
| 41 | gic_init(0, 29, dist_base, cpu_base); |
Linus Walleij | ba327b1 | 2010-05-26 07:38:54 +0100 | [diff] [blame] | 42 | |
| 43 | /* |
| 44 | * Init clocks here so that they are available for system timer |
| 45 | * initialization. |
| 46 | */ |
Linus Walleij | 8317797 | 2011-05-03 18:14:48 +0200 | [diff] [blame] | 47 | if (cpu_is_u5500()) |
| 48 | db5500_prcmu_early_init(); |
Per Forlin | 9b04f8b | 2010-12-05 12:27:05 +0100 | [diff] [blame] | 49 | if (cpu_is_u8500()) |
Mattias Nilsson | 73180f8 | 2011-08-12 10:28:10 +0200 | [diff] [blame] | 50 | db8500_prcmu_early_init(); |
Linus Walleij | ba327b1 | 2010-05-26 07:38:54 +0100 | [diff] [blame] | 51 | clk_init(); |
Rabin Vincent | 178980f | 2010-05-03 07:39:02 +0100 | [diff] [blame] | 52 | } |