aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-nomadik
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-nomadik')
-rw-r--r--arch/arm/mach-nomadik/Makefile2
-rw-r--r--arch/arm/mach-nomadik/board-nhk8815.c67
-rw-r--r--arch/arm/mach-nomadik/clock.c75
-rw-r--r--arch/arm/mach-nomadik/clock.h15
-rw-r--r--arch/arm/mach-nomadik/cpu-8815.c126
-rw-r--r--arch/arm/mach-nomadik/i2c-8815nhk.c38
-rw-r--r--arch/arm/mach-nomadik/include/mach/irqs.h85
7 files changed, 179 insertions, 229 deletions
diff --git a/arch/arm/mach-nomadik/Makefile b/arch/arm/mach-nomadik/Makefile
index a6bbd1a7b4e7..a42c9a33d3bf 100644
--- a/arch/arm/mach-nomadik/Makefile
+++ b/arch/arm/mach-nomadik/Makefile
@@ -7,8 +7,6 @@
7 7
8# Object file lists. 8# Object file lists.
9 9
10obj-y += clock.o
11
12# Cpu revision 10# Cpu revision
13obj-$(CONFIG_NOMADIK_8815) += cpu-8815.o 11obj-$(CONFIG_NOMADIK_8815) += cpu-8815.o
14 12
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c
index 2e8d3e176bc7..f4535a7dadf5 100644
--- a/arch/arm/mach-nomadik/board-nhk8815.c
+++ b/arch/arm/mach-nomadik/board-nhk8815.c
@@ -14,12 +14,14 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/platform_device.h> 15#include <linux/platform_device.h>
16#include <linux/amba/bus.h> 16#include <linux/amba/bus.h>
17#include <linux/amba/mmci.h>
17#include <linux/interrupt.h> 18#include <linux/interrupt.h>
18#include <linux/gpio.h> 19#include <linux/gpio.h>
19#include <linux/mtd/mtd.h> 20#include <linux/mtd/mtd.h>
20#include <linux/mtd/nand.h> 21#include <linux/mtd/nand.h>
21#include <linux/mtd/onenand.h> 22#include <linux/mtd/onenand.h>
22#include <linux/mtd/partitions.h> 23#include <linux/mtd/partitions.h>
24#include <linux/i2c.h>
23#include <linux/io.h> 25#include <linux/io.h>
24#include <asm/hardware/vic.h> 26#include <asm/hardware/vic.h>
25#include <asm/sizes.h> 27#include <asm/sizes.h>
@@ -185,16 +187,28 @@ static void __init nhk8815_onenand_init(void)
185#endif 187#endif
186} 188}
187 189
188static AMBA_APB_DEVICE(uart0, "uart0", 0, NOMADIK_UART0_BASE, 190static struct mmci_platform_data mmcsd_plat_data = {
189 { IRQ_UART0 }, NULL); 191 .ocr_mask = MMC_VDD_29_30,
192 .f_max = 48000000,
193 .gpio_wp = -1,
194 .gpio_cd = 111,
195 .cd_invert = true,
196 .capabilities = MMC_CAP_MMC_HIGHSPEED |
197 MMC_CAP_SD_HIGHSPEED | MMC_CAP_4_BIT_DATA,
198};
190 199
191static AMBA_APB_DEVICE(uart1, "uart1", 0, NOMADIK_UART1_BASE, 200static int __init nhk8815_mmcsd_init(void)
192 { IRQ_UART1 }, NULL); 201{
202 int ret;
193 203
194static struct amba_device *amba_devs[] __initdata = { 204 ret = gpio_request(112, "card detect bias");
195 &uart0_device, 205 if (ret)
196 &uart1_device, 206 return ret;
197}; 207 gpio_direction_output(112, 0);
208 amba_apb_device_add(NULL, "mmci", NOMADIK_SDI_BASE, SZ_4K, IRQ_SDMMC, 0, &mmcsd_plat_data, 0x10180180);
209 return 0;
210}
211module_init(nhk8815_mmcsd_init);
198 212
199static struct resource nhk8815_eth_resources[] = { 213static struct resource nhk8815_eth_resources[] = {
200 { 214 {
@@ -253,17 +267,46 @@ static struct sys_timer nomadik_timer = {
253 .init = nomadik_timer_init, 267 .init = nomadik_timer_init,
254}; 268};
255 269
270static struct i2c_board_info __initdata nhk8815_i2c0_devices[] = {
271 {
272 I2C_BOARD_INFO("stw4811", 0x2d),
273 },
274};
275
276static struct i2c_board_info __initdata nhk8815_i2c1_devices[] = {
277 {
278 I2C_BOARD_INFO("camera", 0x10),
279 },
280 {
281 I2C_BOARD_INFO("stw5095", 0x1a),
282 },
283 {
284 I2C_BOARD_INFO("lis3lv02dl", 0x1d),
285 },
286};
287
288static struct i2c_board_info __initdata nhk8815_i2c2_devices[] = {
289 {
290 I2C_BOARD_INFO("stw4811-usb", 0x2d),
291 },
292};
293
256static void __init nhk8815_platform_init(void) 294static void __init nhk8815_platform_init(void)
257{ 295{
258 int i;
259
260 cpu8815_platform_init(); 296 cpu8815_platform_init();
261 nhk8815_onenand_init(); 297 nhk8815_onenand_init();
262 platform_add_devices(nhk8815_platform_devices, 298 platform_add_devices(nhk8815_platform_devices,
263 ARRAY_SIZE(nhk8815_platform_devices)); 299 ARRAY_SIZE(nhk8815_platform_devices));
264 300
265 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) 301 amba_apb_device_add(NULL, "uart0", NOMADIK_UART0_BASE, SZ_4K, IRQ_UART0, 0, NULL, 0);
266 amba_device_register(amba_devs[i], &iomem_resource); 302 amba_apb_device_add(NULL, "uart1", NOMADIK_UART1_BASE, SZ_4K, IRQ_UART1, 0, NULL, 0);
303
304 i2c_register_board_info(0, nhk8815_i2c0_devices,
305 ARRAY_SIZE(nhk8815_i2c0_devices));
306 i2c_register_board_info(1, nhk8815_i2c1_devices,
307 ARRAY_SIZE(nhk8815_i2c1_devices));
308 i2c_register_board_info(2, nhk8815_i2c2_devices,
309 ARRAY_SIZE(nhk8815_i2c2_devices));
267} 310}
268 311
269MACHINE_START(NOMADIK, "NHK8815") 312MACHINE_START(NOMADIK, "NHK8815")
diff --git a/arch/arm/mach-nomadik/clock.c b/arch/arm/mach-nomadik/clock.c
deleted file mode 100644
index 48a59f24e10c..000000000000
--- a/arch/arm/mach-nomadik/clock.c
+++ /dev/null
@@ -1,75 +0,0 @@
1/*
2 * linux/arch/arm/mach-nomadik/clock.c
3 *
4 * Copyright (C) 2009 Alessandro Rubini
5 */
6#include <linux/kernel.h>
7#include <linux/module.h>
8#include <linux/errno.h>
9#include <linux/clk.h>
10#include <linux/clkdev.h>
11#include "clock.h"
12
13/*
14 * The nomadik board uses generic clocks, but the serial pl011 file
15 * calls clk_enable(), clk_disable(), clk_get_rate(), so we provide them
16 */
17unsigned long clk_get_rate(struct clk *clk)
18{
19 return clk->rate;
20}
21EXPORT_SYMBOL(clk_get_rate);
22
23/* enable and disable do nothing */
24int clk_enable(struct clk *clk)
25{
26 return 0;
27}
28EXPORT_SYMBOL(clk_enable);
29
30void clk_disable(struct clk *clk)
31{
32}
33EXPORT_SYMBOL(clk_disable);
34
35static struct clk clk_24 = {
36 .rate = 2400000,
37};
38
39static struct clk clk_48 = {
40 .rate = 48 * 1000 * 1000,
41};
42
43/*
44 * Catch-all default clock to satisfy drivers using the clk API. We don't
45 * model the actual hardware clocks yet.
46 */
47static struct clk clk_default;
48
49#define CLK(_clk, dev) \
50 { \
51 .clk = _clk, \
52 .dev_id = dev, \
53 }
54
55static struct clk_lookup lookups[] = {
56 {
57 .con_id = "apb_pclk",
58 .clk = &clk_default,
59 },
60 CLK(&clk_24, "mtu0"),
61 CLK(&clk_24, "mtu1"),
62 CLK(&clk_48, "uart0"),
63 CLK(&clk_48, "uart1"),
64 CLK(&clk_default, "gpio.0"),
65 CLK(&clk_default, "gpio.1"),
66 CLK(&clk_default, "gpio.2"),
67 CLK(&clk_default, "gpio.3"),
68 CLK(&clk_default, "rng"),
69};
70
71int __init clk_init(void)
72{
73 clkdev_add_table(lookups, ARRAY_SIZE(lookups));
74 return 0;
75}
diff --git a/arch/arm/mach-nomadik/clock.h b/arch/arm/mach-nomadik/clock.h
deleted file mode 100644
index 78da2e7c3985..000000000000
--- a/arch/arm/mach-nomadik/clock.h
+++ /dev/null
@@ -1,15 +0,0 @@
1
2/*
3 * linux/arch/arm/mach-nomadik/clock.h
4 *
5 * Copyright (C) 2009 Alessandro Rubini
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11struct clk {
12 unsigned long rate;
13};
14
15int __init clk_init(void);
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c
index 27f43a46985e..6fd8e46567a4 100644
--- a/arch/arm/mach-nomadik/cpu-8815.c
+++ b/arch/arm/mach-nomadik/cpu-8815.c
@@ -22,6 +22,10 @@
22#include <linux/amba/bus.h> 22#include <linux/amba/bus.h>
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24#include <linux/io.h> 24#include <linux/io.h>
25#include <linux/slab.h>
26#include <linux/irq.h>
27#include <linux/dma-mapping.h>
28#include <linux/platform_data/clk-nomadik.h>
25 29
26#include <plat/gpio-nomadik.h> 30#include <plat/gpio-nomadik.h>
27#include <mach/hardware.h> 31#include <mach/hardware.h>
@@ -32,91 +36,63 @@
32#include <asm/cacheflush.h> 36#include <asm/cacheflush.h>
33#include <asm/hardware/cache-l2x0.h> 37#include <asm/hardware/cache-l2x0.h>
34 38
35#include "clock.h"
36#include "cpu-8815.h" 39#include "cpu-8815.h"
37 40
38#define __MEM_4K_RESOURCE(x) \
39 .res = {.start = (x), .end = (x) + SZ_4K - 1, .flags = IORESOURCE_MEM}
40
41/* The 8815 has 4 GPIO blocks, let's register them immediately */ 41/* The 8815 has 4 GPIO blocks, let's register them immediately */
42 42static resource_size_t __initdata cpu8815_gpio_base[] = {
43#define GPIO_RESOURCE(block) \ 43 NOMADIK_GPIO0_BASE,
44 { \ 44 NOMADIK_GPIO1_BASE,
45 .start = NOMADIK_GPIO##block##_BASE, \ 45 NOMADIK_GPIO2_BASE,
46 .end = NOMADIK_GPIO##block##_BASE + SZ_4K - 1, \ 46 NOMADIK_GPIO3_BASE,
47 .flags = IORESOURCE_MEM, \
48 }, \
49 { \
50 .start = IRQ_GPIO##block, \
51 .end = IRQ_GPIO##block, \
52 .flags = IORESOURCE_IRQ, \
53 }
54
55#define GPIO_DEVICE(block) \
56 { \
57 .name = "gpio", \
58 .id = block, \
59 .num_resources = 2, \
60 .resource = &cpu8815_gpio_resources[block * 2], \
61 .dev = { \
62 .platform_data = &cpu8815_gpio[block], \
63 }, \
64 }
65
66static struct nmk_gpio_platform_data cpu8815_gpio[] = {
67 {
68 .name = "GPIO-0-31",
69 .first_gpio = 0,
70 .first_irq = NOMADIK_GPIO_TO_IRQ(0),
71 }, {
72 .name = "GPIO-32-63",
73 .first_gpio = 32,
74 .first_irq = NOMADIK_GPIO_TO_IRQ(32),
75 }, {
76 .name = "GPIO-64-95",
77 .first_gpio = 64,
78 .first_irq = NOMADIK_GPIO_TO_IRQ(64),
79 }, {
80 .name = "GPIO-96-127", /* 124..127 not routed to pin */
81 .first_gpio = 96,
82 .first_irq = NOMADIK_GPIO_TO_IRQ(96),
83 }
84}; 47};
85 48
86static struct resource cpu8815_gpio_resources[] = { 49static struct platform_device *
87 GPIO_RESOURCE(0), 50cpu8815_add_gpio(int id, resource_size_t addr, int irq,
88 GPIO_RESOURCE(1), 51 struct nmk_gpio_platform_data *pdata)
89 GPIO_RESOURCE(2), 52{
90 GPIO_RESOURCE(3), 53 struct resource resources[] = {
91}; 54 {
92 55 .start = addr,
93static struct platform_device cpu8815_platform_gpio[] = { 56 .end = addr + 127,
94 GPIO_DEVICE(0), 57 .flags = IORESOURCE_MEM,
95 GPIO_DEVICE(1), 58 },
96 GPIO_DEVICE(2), 59 {
97 GPIO_DEVICE(3), 60 .start = irq,
98}; 61 .end = irq,
62 .flags = IORESOURCE_IRQ,
63 }
64 };
65
66 return platform_device_register_resndata(NULL, "gpio", id,
67 resources, ARRAY_SIZE(resources),
68 pdata, sizeof(*pdata));
69}
99 70
100static AMBA_APB_DEVICE(cpu8815_amba_rng, "rng", 0, NOMADIK_RNG_BASE, { }, NULL); 71void cpu8815_add_gpios(resource_size_t *base, int num, int irq,
72 struct nmk_gpio_platform_data *pdata)
73{
74 int first = 0;
75 int i;
101 76
102static struct platform_device *platform_devs[] __initdata = { 77 for (i = 0; i < num; i++, first += 32, irq++) {
103 cpu8815_platform_gpio + 0, 78 pdata->first_gpio = first;
104 cpu8815_platform_gpio + 1, 79 pdata->first_irq = NOMADIK_GPIO_TO_IRQ(first);
105 cpu8815_platform_gpio + 2, 80 pdata->num_gpio = 32;
106 cpu8815_platform_gpio + 3,
107};
108 81
109static struct amba_device *amba_devs[] __initdata = { 82 cpu8815_add_gpio(i, base[i], irq, pdata);
110 &cpu8815_amba_rng_device 83 }
111}; 84}
112 85
113static int __init cpu8815_init(void) 86static int __init cpu8815_init(void)
114{ 87{
115 int i; 88 struct nmk_gpio_platform_data pdata = {
116 89 /* No custom data yet */
117 platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs)); 90 };
118 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) 91
119 amba_device_register(amba_devs[i], &iomem_resource); 92 cpu8815_add_gpios(cpu8815_gpio_base, ARRAY_SIZE(cpu8815_gpio_base),
93 IRQ_GPIO0, &pdata);
94 amba_apb_device_add(NULL, "rng", NOMADIK_RNG_BASE, SZ_4K, 0, 0, NULL, 0);
95 amba_apb_device_add(NULL, "rtc-pl031", NOMADIK_RTC_BASE, SZ_4K, IRQ_RTC_RTT, 0, NULL, 0);
120 return 0; 96 return 0;
121} 97}
122arch_initcall(cpu8815_init); 98arch_initcall(cpu8815_init);
@@ -147,7 +123,7 @@ void __init cpu8815_init_irq(void)
147 * Init clocks here so that they are available for system timer 123 * Init clocks here so that they are available for system timer
148 * initialization. 124 * initialization.
149 */ 125 */
150 clk_init(); 126 nomadik_clk_init();
151} 127}
152 128
153/* 129/*
diff --git a/arch/arm/mach-nomadik/i2c-8815nhk.c b/arch/arm/mach-nomadik/i2c-8815nhk.c
index 0fc2f6f1cc97..6d14454d4609 100644
--- a/arch/arm/mach-nomadik/i2c-8815nhk.c
+++ b/arch/arm/mach-nomadik/i2c-8815nhk.c
@@ -5,6 +5,7 @@
5#include <linux/i2c-gpio.h> 5#include <linux/i2c-gpio.h>
6#include <linux/platform_device.h> 6#include <linux/platform_device.h>
7#include <plat/gpio-nomadik.h> 7#include <plat/gpio-nomadik.h>
8#include <plat/pincfg.h>
8 9
9/* 10/*
10 * There are two busses in the 8815NHK. 11 * There are two busses in the 8815NHK.
@@ -12,19 +13,27 @@
12 * use bit-bang through GPIO by now, to keep things simple 13 * use bit-bang through GPIO by now, to keep things simple
13 */ 14 */
14 15
16/* I2C0 connected to the STw4811 power management chip */
15static struct i2c_gpio_platform_data nhk8815_i2c_data0 = { 17static struct i2c_gpio_platform_data nhk8815_i2c_data0 = {
16 /* keep defaults for timeouts; pins are push-pull bidirectional */ 18 /* keep defaults for timeouts; pins are push-pull bidirectional */
17 .scl_pin = 62, 19 .scl_pin = 62,
18 .sda_pin = 63, 20 .sda_pin = 63,
19}; 21};
20 22
23/* I2C1 connected to various sensors */
21static struct i2c_gpio_platform_data nhk8815_i2c_data1 = { 24static struct i2c_gpio_platform_data nhk8815_i2c_data1 = {
22 /* keep defaults for timeouts; pins are push-pull bidirectional */ 25 /* keep defaults for timeouts; pins are push-pull bidirectional */
23 .scl_pin = 53, 26 .scl_pin = 53,
24 .sda_pin = 54, 27 .sda_pin = 54,
25}; 28};
26 29
27/* first bus: GPIO XX and YY */ 30/* I2C2 connected to the USB portions of the STw4811 only */
31static struct i2c_gpio_platform_data nhk8815_i2c_data2 = {
32 /* keep defaults for timeouts; pins are push-pull bidirectional */
33 .scl_pin = 73,
34 .sda_pin = 74,
35};
36
28static struct platform_device nhk8815_i2c_dev0 = { 37static struct platform_device nhk8815_i2c_dev0 = {
29 .name = "i2c-gpio", 38 .name = "i2c-gpio",
30 .id = 0, 39 .id = 0,
@@ -32,7 +41,7 @@ static struct platform_device nhk8815_i2c_dev0 = {
32 .platform_data = &nhk8815_i2c_data0, 41 .platform_data = &nhk8815_i2c_data0,
33 }, 42 },
34}; 43};
35/* second bus: GPIO XX and YY */ 44
36static struct platform_device nhk8815_i2c_dev1 = { 45static struct platform_device nhk8815_i2c_dev1 = {
37 .name = "i2c-gpio", 46 .name = "i2c-gpio",
38 .id = 1, 47 .id = 1,
@@ -41,15 +50,29 @@ static struct platform_device nhk8815_i2c_dev1 = {
41 }, 50 },
42}; 51};
43 52
53static struct platform_device nhk8815_i2c_dev2 = {
54 .name = "i2c-gpio",
55 .id = 2,
56 .dev = {
57 .platform_data = &nhk8815_i2c_data2,
58 },
59};
60
61static pin_cfg_t cpu8815_pins_i2c[] = {
62 PIN_CFG_INPUT(62, GPIO, PULLUP),
63 PIN_CFG_INPUT(63, GPIO, PULLUP),
64 PIN_CFG_INPUT(53, GPIO, PULLUP),
65 PIN_CFG_INPUT(54, GPIO, PULLUP),
66 PIN_CFG_INPUT(73, GPIO, PULLUP),
67 PIN_CFG_INPUT(74, GPIO, PULLUP),
68};
69
44static int __init nhk8815_i2c_init(void) 70static int __init nhk8815_i2c_init(void)
45{ 71{
46 nmk_gpio_set_mode(nhk8815_i2c_data0.scl_pin, NMK_GPIO_ALT_GPIO); 72 nmk_config_pins(cpu8815_pins_i2c, ARRAY_SIZE(cpu8815_pins_i2c));
47 nmk_gpio_set_mode(nhk8815_i2c_data0.sda_pin, NMK_GPIO_ALT_GPIO);
48 platform_device_register(&nhk8815_i2c_dev0); 73 platform_device_register(&nhk8815_i2c_dev0);
49
50 nmk_gpio_set_mode(nhk8815_i2c_data1.scl_pin, NMK_GPIO_ALT_GPIO);
51 nmk_gpio_set_mode(nhk8815_i2c_data1.sda_pin, NMK_GPIO_ALT_GPIO);
52 platform_device_register(&nhk8815_i2c_dev1); 74 platform_device_register(&nhk8815_i2c_dev1);
75 platform_device_register(&nhk8815_i2c_dev2);
53 76
54 return 0; 77 return 0;
55} 78}
@@ -58,6 +81,7 @@ static void __exit nhk8815_i2c_exit(void)
58{ 81{
59 platform_device_unregister(&nhk8815_i2c_dev0); 82 platform_device_unregister(&nhk8815_i2c_dev0);
60 platform_device_unregister(&nhk8815_i2c_dev1); 83 platform_device_unregister(&nhk8815_i2c_dev1);
84 platform_device_unregister(&nhk8815_i2c_dev2);
61 return; 85 return;
62} 86}
63 87
diff --git a/arch/arm/mach-nomadik/include/mach/irqs.h b/arch/arm/mach-nomadik/include/mach/irqs.h
index 8faabc560398..a118e615f865 100644
--- a/arch/arm/mach-nomadik/include/mach/irqs.h
+++ b/arch/arm/mach-nomadik/include/mach/irqs.h
@@ -22,56 +22,56 @@
22 22
23#include <mach/hardware.h> 23#include <mach/hardware.h>
24 24
25#define IRQ_VIC_START 0 /* first VIC interrupt is 0 */ 25#define IRQ_VIC_START 1 /* first VIC interrupt is 1 */
26 26
27/* 27/*
28 * Interrupt numbers generic for all Nomadik Chip cuts 28 * Interrupt numbers generic for all Nomadik Chip cuts
29 */ 29 */
30#define IRQ_WATCHDOG 0 30#define IRQ_WATCHDOG 1
31#define IRQ_SOFTINT 1 31#define IRQ_SOFTINT 2
32#define IRQ_CRYPTO 2 32#define IRQ_CRYPTO 3
33#define IRQ_OWM 3 33#define IRQ_OWM 4
34#define IRQ_MTU0 4 34#define IRQ_MTU0 5
35#define IRQ_MTU1 5 35#define IRQ_MTU1 6
36#define IRQ_GPIO0 6 36#define IRQ_GPIO0 7
37#define IRQ_GPIO1 7 37#define IRQ_GPIO1 8
38#define IRQ_GPIO2 8 38#define IRQ_GPIO2 9
39#define IRQ_GPIO3 9 39#define IRQ_GPIO3 10
40#define IRQ_RTC_RTT 10 40#define IRQ_RTC_RTT 11
41#define IRQ_SSP 11 41#define IRQ_SSP 12
42#define IRQ_UART0 12 42#define IRQ_UART0 13
43#define IRQ_DMA1 13 43#define IRQ_DMA1 14
44#define IRQ_CLCD_MDIF 14 44#define IRQ_CLCD_MDIF 15
45#define IRQ_DMA0 15 45#define IRQ_DMA0 16
46#define IRQ_PWRFAIL 16 46#define IRQ_PWRFAIL 17
47#define IRQ_UART1 17 47#define IRQ_UART1 18
48#define IRQ_FIRDA 18 48#define IRQ_FIRDA 19
49#define IRQ_MSP0 19 49#define IRQ_MSP0 20
50#define IRQ_I2C0 20 50#define IRQ_I2C0 21
51#define IRQ_I2C1 21 51#define IRQ_I2C1 22
52#define IRQ_SDMMC 22 52#define IRQ_SDMMC 23
53#define IRQ_USBOTG 23 53#define IRQ_USBOTG 24
54#define IRQ_SVA_IT0 24 54#define IRQ_SVA_IT0 25
55#define IRQ_SVA_IT1 25 55#define IRQ_SVA_IT1 26
56#define IRQ_SAA_IT0 26 56#define IRQ_SAA_IT0 27
57#define IRQ_SAA_IT1 27 57#define IRQ_SAA_IT1 28
58#define IRQ_UART2 28 58#define IRQ_UART2 29
59#define IRQ_MSP2 31 59#define IRQ_MSP2 30
60#define IRQ_L2CC 48 60#define IRQ_L2CC 49
61#define IRQ_HPI 49 61#define IRQ_HPI 50
62#define IRQ_SKE 50 62#define IRQ_SKE 51
63#define IRQ_KP 51 63#define IRQ_KP 52
64#define IRQ_MEMST 54 64#define IRQ_MEMST 55
65#define IRQ_SGA_IT 58 65#define IRQ_SGA_IT 59
66#define IRQ_USBM 60 66#define IRQ_USBM 61
67#define IRQ_MSP1 62 67#define IRQ_MSP1 63
68 68
69#define NOMADIK_SOC_NR_IRQS 64 69#define NOMADIK_GPIO_OFFSET (IRQ_VIC_START+64)
70 70
71/* After chip-specific IRQ numbers we have the GPIO ones */ 71/* After chip-specific IRQ numbers we have the GPIO ones */
72#define NOMADIK_NR_GPIO 128 /* last 4 not wired to pins */ 72#define NOMADIK_NR_GPIO 128 /* last 4 not wired to pins */
73#define NOMADIK_GPIO_TO_IRQ(gpio) ((gpio) + NOMADIK_SOC_NR_IRQS) 73#define NOMADIK_GPIO_TO_IRQ(gpio) ((gpio) + NOMADIK_GPIO_OFFSET)
74#define NOMADIK_IRQ_TO_GPIO(irq) ((irq) - NOMADIK_SOC_NR_IRQS) 74#define NOMADIK_IRQ_TO_GPIO(irq) ((irq) - NOMADIK_GPIO_OFFSET)
75#define NR_IRQS NOMADIK_GPIO_TO_IRQ(NOMADIK_NR_GPIO) 75#define NR_IRQS NOMADIK_GPIO_TO_IRQ(NOMADIK_NR_GPIO)
76 76
77/* Following two are used by entry_macro.S, to access our dual-vic */ 77/* Following two are used by entry_macro.S, to access our dual-vic */
@@ -79,4 +79,3 @@
79#define VIC_REG_IRQSR1 0x20 79#define VIC_REG_IRQSR1 0x20
80 80
81#endif /* __ASM_ARCH_IRQS_H */ 81#endif /* __ASM_ARCH_IRQS_H */
82