blob: f4185749437533f5acd930dcc612113f57556eef [file] [log] [blame]
Rabin Vincent178980f2010-05-03 07:39:02 +01001/*
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 Vincent178980f2010-05-03 07:39:02 +01009#include <linux/io.h>
10#include <linux/clk.h>
Linus Walleij650c2a22011-05-15 22:53:56 +020011#include <linux/mfd/db8500-prcmu.h>
Linus Walleij83177972011-05-03 18:14:48 +020012#include <linux/mfd/db5500-prcmu.h>
Mattias Wallin7ed00af2011-05-27 10:30:34 +020013#include <linux/clksrc-dbx500-prcmu.h>
Rabin Vincent178980f2010-05-03 07:39:02 +010014
Rabin Vincent178980f2010-05-03 07:39:02 +010015#include <asm/hardware/gic.h>
16#include <asm/mach/map.h>
Rabin Vincent41ac3292010-05-03 08:28:05 +010017#include <asm/localtimer.h>
Rabin Vincent178980f2010-05-03 07:39:02 +010018
19#include <mach/hardware.h>
20#include <mach/setup.h>
Rabin Vincentd48fd002010-05-03 07:46:56 +010021#include <mach/devices.h>
Rabin Vincent178980f2010-05-03 07:39:02 +010022
23#include "clock.h"
24
Linus Walleij11871892011-03-29 16:53:29 +020025void __iomem *_PRCMU_BASE;
26
Rabin Vincent178980f2010-05-03 07:39:02 +010027void __init ux500_init_irq(void)
28{
Rabin Vincent92389ca2010-12-08 11:07:57 +053029 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 Walleijba327b12010-05-26 07:38:54 +010042
43 /*
44 * Init clocks here so that they are available for system timer
45 * initialization.
46 */
Linus Walleij83177972011-05-03 18:14:48 +020047 if (cpu_is_u5500())
48 db5500_prcmu_early_init();
Per Forlin9b04f8b2010-12-05 12:27:05 +010049 if (cpu_is_u8500())
Mattias Nilsson73180f82011-08-12 10:28:10 +020050 db8500_prcmu_early_init();
Linus Walleijba327b12010-05-26 07:38:54 +010051 clk_init();
Rabin Vincent178980f2010-05-03 07:39:02 +010052}