diff options
author | Alessandro Rubini <rubini@gnudd.com> | 2009-07-02 14:06:47 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-07-02 16:20:44 -0400 |
commit | 28ad94ec61dc60207dbffdb95ff870c617fbb832 (patch) | |
tree | 4ee4d2fc06f98d70c0f7f803179b94638bc0e850 /arch/arm/mach-nomadik/include/mach | |
parent | 8c81b52422147b4b09f5adb8d0c6963342a336c6 (diff) |
[ARM] 5590/1: Add basic support for ST Nomadik 8815 SoC and evaluation board
This patch adds the basic infrastructure for the Nomadik 8815
CPU and the "Nomadik Hardware Kit" NHK8815. This patch only
includes the serial console and core stuff, no drivers.
Signed-off-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-nomadik/include/mach')
-rw-r--r-- | arch/arm/mach-nomadik/include/mach/clkdev.h | 7 | ||||
-rw-r--r-- | arch/arm/mach-nomadik/include/mach/debug-macro.S | 22 | ||||
-rw-r--r-- | arch/arm/mach-nomadik/include/mach/entry-macro.S | 43 | ||||
-rw-r--r-- | arch/arm/mach-nomadik/include/mach/hardware.h | 90 | ||||
-rw-r--r-- | arch/arm/mach-nomadik/include/mach/io.h | 22 | ||||
-rw-r--r-- | arch/arm/mach-nomadik/include/mach/irqs.h | 82 | ||||
-rw-r--r-- | arch/arm/mach-nomadik/include/mach/memory.h | 28 | ||||
-rw-r--r-- | arch/arm/mach-nomadik/include/mach/mtu.h | 45 | ||||
-rw-r--r-- | arch/arm/mach-nomadik/include/mach/setup.h | 22 | ||||
-rw-r--r-- | arch/arm/mach-nomadik/include/mach/system.h | 45 | ||||
-rw-r--r-- | arch/arm/mach-nomadik/include/mach/timex.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-nomadik/include/mach/uncompress.h | 63 | ||||
-rw-r--r-- | arch/arm/mach-nomadik/include/mach/vmalloc.h | 2 |
13 files changed, 477 insertions, 0 deletions
diff --git a/arch/arm/mach-nomadik/include/mach/clkdev.h b/arch/arm/mach-nomadik/include/mach/clkdev.h new file mode 100644 index 000000000000..04b37a89801c --- /dev/null +++ b/arch/arm/mach-nomadik/include/mach/clkdev.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __ASM_MACH_CLKDEV_H | ||
2 | #define __ASM_MACH_CLKDEV_H | ||
3 | |||
4 | #define __clk_get(clk) ({ 1; }) | ||
5 | #define __clk_put(clk) do { } while (0) | ||
6 | |||
7 | #endif | ||
diff --git a/arch/arm/mach-nomadik/include/mach/debug-macro.S b/arch/arm/mach-nomadik/include/mach/debug-macro.S new file mode 100644 index 000000000000..e876990e1569 --- /dev/null +++ b/arch/arm/mach-nomadik/include/mach/debug-macro.S | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * Debugging macro include header | ||
3 | * | ||
4 | * Copyright (C) 1994-1999 Russell King | ||
5 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
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 | * | ||
11 | */ | ||
12 | |||
13 | .macro addruart,rx | ||
14 | mrc p15, 0, \rx, c1, c0 | ||
15 | tst \rx, #1 @ MMU enabled? | ||
16 | moveq \rx, #0x10000000 @ physical base address | ||
17 | movne \rx, #0xf0000000 @ virtual base | ||
18 | add \rx, \rx, #0x00100000 | ||
19 | add \rx, \rx, #0x000fb000 | ||
20 | .endm | ||
21 | |||
22 | #include <asm/hardware/debug-pl01x.S> | ||
diff --git a/arch/arm/mach-nomadik/include/mach/entry-macro.S b/arch/arm/mach-nomadik/include/mach/entry-macro.S new file mode 100644 index 000000000000..49f1aa3bb420 --- /dev/null +++ b/arch/arm/mach-nomadik/include/mach/entry-macro.S | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | * Low-level IRQ helper macros for Nomadik platforms | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #include <mach/hardware.h> | ||
10 | #include <mach/irqs.h> | ||
11 | |||
12 | .macro disable_fiq | ||
13 | .endm | ||
14 | |||
15 | .macro get_irqnr_preamble, base, tmp | ||
16 | ldr \base, =IO_ADDRESS(NOMADIK_IC_BASE) | ||
17 | .endm | ||
18 | |||
19 | .macro arch_ret_to_user, tmp1, tmp2 | ||
20 | .endm | ||
21 | |||
22 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
23 | |||
24 | /* This stanza gets the irq mask from one of two status registers */ | ||
25 | mov \irqnr, #0 | ||
26 | ldr \irqstat, [\base, #VIC_REG_IRQSR0] @ get masked status | ||
27 | cmp \irqstat, #0 | ||
28 | bne 1001f | ||
29 | add \irqnr, \irqnr, #32 | ||
30 | ldr \irqstat, [\base, #VIC_REG_IRQSR1] @ get masked status | ||
31 | |||
32 | 1001: tst \irqstat, #15 | ||
33 | bne 1002f | ||
34 | add \irqnr, \irqnr, #4 | ||
35 | movs \irqstat, \irqstat, lsr #4 | ||
36 | bne 1001b | ||
37 | 1002: tst \irqstat, #1 | ||
38 | bne 1003f | ||
39 | add \irqnr, \irqnr, #1 | ||
40 | movs \irqstat, \irqstat, lsr #1 | ||
41 | bne 1002b | ||
42 | 1003: /* EQ will be set if no irqs pending */ | ||
43 | .endm | ||
diff --git a/arch/arm/mach-nomadik/include/mach/hardware.h b/arch/arm/mach-nomadik/include/mach/hardware.h new file mode 100644 index 000000000000..6316dba3bfc8 --- /dev/null +++ b/arch/arm/mach-nomadik/include/mach/hardware.h | |||
@@ -0,0 +1,90 @@ | |||
1 | /* | ||
2 | * This file contains the hardware definitions of the Nomadik. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * YOU should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | #ifndef __ASM_ARCH_HARDWARE_H | ||
19 | #define __ASM_ARCH_HARDWARE_H | ||
20 | |||
21 | /* Nomadik registers live from 0x1000.0000 to 0x1023.0000 -- currently */ | ||
22 | #define NOMADIK_IO_VIRTUAL 0xF0000000 /* VA of IO */ | ||
23 | #define NOMADIK_IO_PHYSICAL 0x10000000 /* PA of IO */ | ||
24 | #define NOMADIK_IO_SIZE 0x00300000 /* 3MB for all regs */ | ||
25 | |||
26 | /* used in C code, so cast to proper type */ | ||
27 | #define io_p2v(x) ((void __iomem *)(x) \ | ||
28 | - NOMADIK_IO_PHYSICAL + NOMADIK_IO_VIRTUAL) | ||
29 | #define io_v2p(x) ((unsigned long)(x) \ | ||
30 | - NOMADIK_IO_VIRTUAL + NOMADIK_IO_PHYSICAL) | ||
31 | |||
32 | /* used in asm code, so no casts */ | ||
33 | #define IO_ADDRESS(x) ((x) - NOMADIK_IO_PHYSICAL + NOMADIK_IO_VIRTUAL) | ||
34 | |||
35 | /* | ||
36 | * Base address defination for Nomadik Onchip Logic Block | ||
37 | */ | ||
38 | #define NOMADIK_FSMC_BASE 0x10100000 /* FSMC registers */ | ||
39 | #define NOMADIK_SDRAMC_BASE 0x10110000 /* SDRAM Controller */ | ||
40 | #define NOMADIK_CLCDC_BASE 0x10120000 /* CLCD Controller */ | ||
41 | #define NOMADIK_MDIF_BASE 0x10120000 /* MDIF */ | ||
42 | #define NOMADIK_DMA0_BASE 0x10130000 /* DMA0 Controller */ | ||
43 | #define NOMADIK_IC_BASE 0x10140000 /* Vectored Irq Controller */ | ||
44 | #define NOMADIK_DMA1_BASE 0x10150000 /* DMA1 Controller */ | ||
45 | #define NOMADIK_USB_BASE 0x10170000 /* USB-OTG conf reg base */ | ||
46 | #define NOMADIK_CRYP_BASE 0x10180000 /* Crypto processor */ | ||
47 | #define NOMADIK_SHA1_BASE 0x10190000 /* SHA-1 Processor */ | ||
48 | #define NOMADIK_XTI_BASE 0x101A0000 /* XTI */ | ||
49 | #define NOMADIK_RNG_BASE 0x101B0000 /* Random number generator */ | ||
50 | #define NOMADIK_SRC_BASE 0x101E0000 /* SRC base */ | ||
51 | #define NOMADIK_WDOG_BASE 0x101E1000 /* Watchdog */ | ||
52 | #define NOMADIK_MTU0_BASE 0x101E2000 /* Multiple Timer 0 */ | ||
53 | #define NOMADIK_MTU1_BASE 0x101E3000 /* Multiple Timer 1 */ | ||
54 | #define NOMADIK_GPIO0_BASE 0x101E4000 /* GPIO0 */ | ||
55 | #define NOMADIK_GPIO1_BASE 0x101E5000 /* GPIO1 */ | ||
56 | #define NOMADIK_GPIO2_BASE 0x101E6000 /* GPIO2 */ | ||
57 | #define NOMADIK_GPIO3_BASE 0x101E7000 /* GPIO3 */ | ||
58 | #define NOMADIK_RTC_BASE 0x101E8000 /* Real Time Clock base */ | ||
59 | #define NOMADIK_PMU_BASE 0x101E9000 /* Power Management Unit */ | ||
60 | #define NOMADIK_OWM_BASE 0x101EA000 /* One wire master */ | ||
61 | #define NOMADIK_SCR_BASE 0x101EF000 /* Secure Control registers */ | ||
62 | #define NOMADIK_MSP2_BASE 0x101F0000 /* MSP 2 interface */ | ||
63 | #define NOMADIK_MSP1_BASE 0x101F1000 /* MSP 1 interface */ | ||
64 | #define NOMADIK_UART2_BASE 0x101F2000 /* UART 2 interface */ | ||
65 | #define NOMADIK_SSIRx_BASE 0x101F3000 /* SSI 8-ch rx interface */ | ||
66 | #define NOMADIK_SSITx_BASE 0x101F4000 /* SSI 8-ch tx interface */ | ||
67 | #define NOMADIK_MSHC_BASE 0x101F5000 /* Memory Stick(Pro) Host */ | ||
68 | #define NOMADIK_SDI_BASE 0x101F6000 /* SD-card/MM-Card */ | ||
69 | #define NOMADIK_I2C1_BASE 0x101F7000 /* I2C1 interface */ | ||
70 | #define NOMADIK_I2C0_BASE 0x101F8000 /* I2C0 interface */ | ||
71 | #define NOMADIK_MSP0_BASE 0x101F9000 /* MSP 0 interface */ | ||
72 | #define NOMADIK_FIRDA_BASE 0x101FA000 /* FIrDA interface */ | ||
73 | #define NOMADIK_UART1_BASE 0x101FB000 /* UART 1 interface */ | ||
74 | #define NOMADIK_SSP_BASE 0x101FC000 /* SSP interface */ | ||
75 | #define NOMADIK_UART0_BASE 0x101FD000 /* UART 0 interface */ | ||
76 | #define NOMADIK_SGA_BASE 0x101FE000 /* SGA interface */ | ||
77 | #define NOMADIK_L2CC_BASE 0x10210000 /* L2 Cache controller */ | ||
78 | |||
79 | /* Other ranges, not for p2v/v2p */ | ||
80 | #define NOMADIK_BACKUP_RAM 0x80010000 | ||
81 | #define NOMADIK_EBROM 0x80000000 /* Embedded boot ROM */ | ||
82 | #define NOMADIK_HAMACV_DMEM_BASE 0xA0100000 /* HAMACV Data Memory Start */ | ||
83 | #define NOMADIK_HAMACV_DMEM_END 0xA01FFFFF /* HAMACV Data Memory End */ | ||
84 | #define NOMADIK_HAMACA_DMEM 0xA0200000 /* HAMACA Data Memory Space */ | ||
85 | |||
86 | #define NOMADIK_FSMC_VA IO_ADDRESS(NOMADIK_FSMC_BASE) | ||
87 | #define NOMADIK_MTU0_VA IO_ADDRESS(NOMADIK_MTU0_BASE) | ||
88 | #define NOMADIK_MTU1_VA IO_ADDRESS(NOMADIK_MTU1_BASE) | ||
89 | |||
90 | #endif /* __ASM_ARCH_HARDWARE_H */ | ||
diff --git a/arch/arm/mach-nomadik/include/mach/io.h b/arch/arm/mach-nomadik/include/mach/io.h new file mode 100644 index 000000000000..2e1eca1b8243 --- /dev/null +++ b/arch/arm/mach-nomadik/include/mach/io.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-nomadik/include/mach/io.h (copied from mach-sa1100) | ||
3 | * | ||
4 | * Copyright (C) 1997-1999 Russell King | ||
5 | * | ||
6 | * Modifications: | ||
7 | * 06-12-1997 RMK Created. | ||
8 | * 07-04-1999 RMK Major cleanup | ||
9 | */ | ||
10 | #ifndef __ASM_ARM_ARCH_IO_H | ||
11 | #define __ASM_ARM_ARCH_IO_H | ||
12 | |||
13 | #define IO_SPACE_LIMIT 0xffffffff | ||
14 | |||
15 | /* | ||
16 | * We don't actually have real ISA nor PCI buses, but there is so many | ||
17 | * drivers out there that might just work if we fake them... | ||
18 | */ | ||
19 | #define __io(a) __typesafe_io(a) | ||
20 | #define __mem_pci(a) (a) | ||
21 | |||
22 | #endif | ||
diff --git a/arch/arm/mach-nomadik/include/mach/irqs.h b/arch/arm/mach-nomadik/include/mach/irqs.h new file mode 100644 index 000000000000..8faabc560398 --- /dev/null +++ b/arch/arm/mach-nomadik/include/mach/irqs.h | |||
@@ -0,0 +1,82 @@ | |||
1 | /* | ||
2 | * mach-nomadik/include/mach/irqs.h | ||
3 | * | ||
4 | * Copyright (C) ST Microelectronics | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #ifndef __ASM_ARCH_IRQS_H | ||
21 | #define __ASM_ARCH_IRQS_H | ||
22 | |||
23 | #include <mach/hardware.h> | ||
24 | |||
25 | #define IRQ_VIC_START 0 /* first VIC interrupt is 0 */ | ||
26 | |||
27 | /* | ||
28 | * Interrupt numbers generic for all Nomadik Chip cuts | ||
29 | */ | ||
30 | #define IRQ_WATCHDOG 0 | ||
31 | #define IRQ_SOFTINT 1 | ||
32 | #define IRQ_CRYPTO 2 | ||
33 | #define IRQ_OWM 3 | ||
34 | #define IRQ_MTU0 4 | ||
35 | #define IRQ_MTU1 5 | ||
36 | #define IRQ_GPIO0 6 | ||
37 | #define IRQ_GPIO1 7 | ||
38 | #define IRQ_GPIO2 8 | ||
39 | #define IRQ_GPIO3 9 | ||
40 | #define IRQ_RTC_RTT 10 | ||
41 | #define IRQ_SSP 11 | ||
42 | #define IRQ_UART0 12 | ||
43 | #define IRQ_DMA1 13 | ||
44 | #define IRQ_CLCD_MDIF 14 | ||
45 | #define IRQ_DMA0 15 | ||
46 | #define IRQ_PWRFAIL 16 | ||
47 | #define IRQ_UART1 17 | ||
48 | #define IRQ_FIRDA 18 | ||
49 | #define IRQ_MSP0 19 | ||
50 | #define IRQ_I2C0 20 | ||
51 | #define IRQ_I2C1 21 | ||
52 | #define IRQ_SDMMC 22 | ||
53 | #define IRQ_USBOTG 23 | ||
54 | #define IRQ_SVA_IT0 24 | ||
55 | #define IRQ_SVA_IT1 25 | ||
56 | #define IRQ_SAA_IT0 26 | ||
57 | #define IRQ_SAA_IT1 27 | ||
58 | #define IRQ_UART2 28 | ||
59 | #define IRQ_MSP2 31 | ||
60 | #define IRQ_L2CC 48 | ||
61 | #define IRQ_HPI 49 | ||
62 | #define IRQ_SKE 50 | ||
63 | #define IRQ_KP 51 | ||
64 | #define IRQ_MEMST 54 | ||
65 | #define IRQ_SGA_IT 58 | ||
66 | #define IRQ_USBM 60 | ||
67 | #define IRQ_MSP1 62 | ||
68 | |||
69 | #define NOMADIK_SOC_NR_IRQS 64 | ||
70 | |||
71 | /* After chip-specific IRQ numbers we have the GPIO ones */ | ||
72 | #define NOMADIK_NR_GPIO 128 /* last 4 not wired to pins */ | ||
73 | #define NOMADIK_GPIO_TO_IRQ(gpio) ((gpio) + NOMADIK_SOC_NR_IRQS) | ||
74 | #define NOMADIK_IRQ_TO_GPIO(irq) ((irq) - NOMADIK_SOC_NR_IRQS) | ||
75 | #define NR_IRQS NOMADIK_GPIO_TO_IRQ(NOMADIK_NR_GPIO) | ||
76 | |||
77 | /* Following two are used by entry_macro.S, to access our dual-vic */ | ||
78 | #define VIC_REG_IRQSR0 0 | ||
79 | #define VIC_REG_IRQSR1 0x20 | ||
80 | |||
81 | #endif /* __ASM_ARCH_IRQS_H */ | ||
82 | |||
diff --git a/arch/arm/mach-nomadik/include/mach/memory.h b/arch/arm/mach-nomadik/include/mach/memory.h new file mode 100644 index 000000000000..1e5689d98ecd --- /dev/null +++ b/arch/arm/mach-nomadik/include/mach/memory.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * mach-nomadik/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (C) 1999 ARM Limited | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #ifndef __ASM_ARCH_MEMORY_H | ||
21 | #define __ASM_ARCH_MEMORY_H | ||
22 | |||
23 | /* | ||
24 | * Physical DRAM offset. | ||
25 | */ | ||
26 | #define PHYS_OFFSET UL(0x00000000) | ||
27 | |||
28 | #endif | ||
diff --git a/arch/arm/mach-nomadik/include/mach/mtu.h b/arch/arm/mach-nomadik/include/mach/mtu.h new file mode 100644 index 000000000000..76da7f085330 --- /dev/null +++ b/arch/arm/mach-nomadik/include/mach/mtu.h | |||
@@ -0,0 +1,45 @@ | |||
1 | #ifndef __ASM_ARCH_MTU_H | ||
2 | #define __ASM_ARCH_MTU_H | ||
3 | |||
4 | /* | ||
5 | * The MTU device hosts four different counters, with 4 set of | ||
6 | * registers. These are register names. | ||
7 | */ | ||
8 | |||
9 | #define MTU_IMSC 0x00 /* Interrupt mask set/clear */ | ||
10 | #define MTU_RIS 0x04 /* Raw interrupt status */ | ||
11 | #define MTU_MIS 0x08 /* Masked interrupt status */ | ||
12 | #define MTU_ICR 0x0C /* Interrupt clear register */ | ||
13 | |||
14 | /* per-timer registers take 0..3 as argument */ | ||
15 | #define MTU_LR(x) (0x10 + 0x10 * (x) + 0x00) /* Load value */ | ||
16 | #define MTU_VAL(x) (0x10 + 0x10 * (x) + 0x04) /* Current value */ | ||
17 | #define MTU_CR(x) (0x10 + 0x10 * (x) + 0x08) /* Control reg */ | ||
18 | #define MTU_BGLR(x) (0x10 + 0x10 * (x) + 0x0c) /* At next overflow */ | ||
19 | |||
20 | /* bits for the control register */ | ||
21 | #define MTU_CRn_ENA 0x80 | ||
22 | #define MTU_CRn_PERIODIC 0x40 /* if 0 = free-running */ | ||
23 | #define MTU_CRn_PRESCALE_MASK 0x0c | ||
24 | #define MTU_CRn_PRESCALE_1 0x00 | ||
25 | #define MTU_CRn_PRESCALE_16 0x04 | ||
26 | #define MTU_CRn_PRESCALE_256 0x08 | ||
27 | #define MTU_CRn_32BITS 0x02 | ||
28 | #define MTU_CRn_ONESHOT 0x01 /* if 0 = wraps reloading from BGLR*/ | ||
29 | |||
30 | /* Other registers are usual amba/primecell registers, currently not used */ | ||
31 | #define MTU_ITCR 0xff0 | ||
32 | #define MTU_ITOP 0xff4 | ||
33 | |||
34 | #define MTU_PERIPH_ID0 0xfe0 | ||
35 | #define MTU_PERIPH_ID1 0xfe4 | ||
36 | #define MTU_PERIPH_ID2 0xfe8 | ||
37 | #define MTU_PERIPH_ID3 0xfeC | ||
38 | |||
39 | #define MTU_PCELL0 0xff0 | ||
40 | #define MTU_PCELL1 0xff4 | ||
41 | #define MTU_PCELL2 0xff8 | ||
42 | #define MTU_PCELL3 0xffC | ||
43 | |||
44 | #endif /* __ASM_ARCH_MTU_H */ | ||
45 | |||
diff --git a/arch/arm/mach-nomadik/include/mach/setup.h b/arch/arm/mach-nomadik/include/mach/setup.h new file mode 100644 index 000000000000..a4e468cf63da --- /dev/null +++ b/arch/arm/mach-nomadik/include/mach/setup.h | |||
@@ -0,0 +1,22 @@ | |||
1 | |||
2 | /* | ||
3 | * These symbols are needed for board-specific files to call their | ||
4 | * own cpu-specific files | ||
5 | */ | ||
6 | |||
7 | #ifndef __ASM_ARCH_SETUP_H | ||
8 | #define __ASM_ARCH_SETUP_H | ||
9 | |||
10 | #include <asm/mach/time.h> | ||
11 | #include <linux/init.h> | ||
12 | |||
13 | #ifdef CONFIG_NOMADIK_8815 | ||
14 | |||
15 | extern void cpu8815_map_io(void); | ||
16 | extern void cpu8815_platform_init(void); | ||
17 | extern void cpu8815_init_irq(void); | ||
18 | extern struct sys_timer nomadik_timer; | ||
19 | |||
20 | #endif /* NOMADIK_8815 */ | ||
21 | |||
22 | #endif /* __ASM_ARCH_SETUP_H */ | ||
diff --git a/arch/arm/mach-nomadik/include/mach/system.h b/arch/arm/mach-nomadik/include/mach/system.h new file mode 100644 index 000000000000..7119f688116e --- /dev/null +++ b/arch/arm/mach-nomadik/include/mach/system.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * mach-nomadik/include/mach/system.h | ||
3 | * | ||
4 | * Copyright (C) 2008 STMicroelectronics | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #ifndef __ASM_ARCH_SYSTEM_H | ||
21 | #define __ASM_ARCH_SYSTEM_H | ||
22 | |||
23 | #include <linux/io.h> | ||
24 | #include <mach/hardware.h> | ||
25 | |||
26 | static inline void arch_idle(void) | ||
27 | { | ||
28 | /* | ||
29 | * This should do all the clock switching | ||
30 | * and wait for interrupt tricks | ||
31 | */ | ||
32 | cpu_do_idle(); | ||
33 | } | ||
34 | |||
35 | static inline void arch_reset(char mode, const char *cmd) | ||
36 | { | ||
37 | void __iomem *src_rstsr = io_p2v(NOMADIK_SRC_BASE + 0x18); | ||
38 | |||
39 | /* FIXME: use egpio when implemented */ | ||
40 | |||
41 | /* Write anything to Reset status register */ | ||
42 | writel(1, src_rstsr); | ||
43 | } | ||
44 | |||
45 | #endif | ||
diff --git a/arch/arm/mach-nomadik/include/mach/timex.h b/arch/arm/mach-nomadik/include/mach/timex.h new file mode 100644 index 000000000000..318b8896ce96 --- /dev/null +++ b/arch/arm/mach-nomadik/include/mach/timex.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __ASM_ARCH_TIMEX_H | ||
2 | #define __ASM_ARCH_TIMEX_H | ||
3 | |||
4 | #define CLOCK_TICK_RATE 2400000 | ||
5 | |||
6 | #endif | ||
diff --git a/arch/arm/mach-nomadik/include/mach/uncompress.h b/arch/arm/mach-nomadik/include/mach/uncompress.h new file mode 100644 index 000000000000..071003bc8456 --- /dev/null +++ b/arch/arm/mach-nomadik/include/mach/uncompress.h | |||
@@ -0,0 +1,63 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 STMicroelectronics | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | |||
19 | #ifndef __ASM_ARCH_UNCOMPRESS_H | ||
20 | #define __ASM_ARCH_UNCOMPRESS_H | ||
21 | |||
22 | #include <asm/setup.h> | ||
23 | #include <asm/io.h> | ||
24 | #include <mach/hardware.h> | ||
25 | |||
26 | /* we need the constants in amba/serial.h, but it refers to amba_device */ | ||
27 | struct amba_device; | ||
28 | #include <linux/amba/serial.h> | ||
29 | |||
30 | #define NOMADIK_UART_DR 0x101FB000 | ||
31 | #define NOMADIK_UART_LCRH 0x101FB02c | ||
32 | #define NOMADIK_UART_CR 0x101FB030 | ||
33 | #define NOMADIK_UART_FR 0x101FB018 | ||
34 | |||
35 | static void putc(const char c) | ||
36 | { | ||
37 | /* Do nothing if the UART is not enabled. */ | ||
38 | if (!(readb(NOMADIK_UART_CR) & UART01x_CR_UARTEN)) | ||
39 | return; | ||
40 | |||
41 | if (c == '\n') | ||
42 | putc('\r'); | ||
43 | |||
44 | while (readb(NOMADIK_UART_FR) & UART01x_FR_TXFF) | ||
45 | barrier(); | ||
46 | writeb(c, NOMADIK_UART_DR); | ||
47 | } | ||
48 | |||
49 | static void flush(void) | ||
50 | { | ||
51 | if (!(readb(NOMADIK_UART_CR) & UART01x_CR_UARTEN)) | ||
52 | return; | ||
53 | while (readb(NOMADIK_UART_FR) & UART01x_FR_BUSY) | ||
54 | barrier(); | ||
55 | } | ||
56 | |||
57 | static inline void arch_decomp_setup(void) | ||
58 | { | ||
59 | } | ||
60 | |||
61 | #define arch_decomp_wdog() /* nothing to do here */ | ||
62 | |||
63 | #endif /* __ASM_ARCH_UNCOMPRESS_H */ | ||
diff --git a/arch/arm/mach-nomadik/include/mach/vmalloc.h b/arch/arm/mach-nomadik/include/mach/vmalloc.h new file mode 100644 index 000000000000..be12e31ea528 --- /dev/null +++ b/arch/arm/mach-nomadik/include/mach/vmalloc.h | |||
@@ -0,0 +1,2 @@ | |||
1 | |||
2 | #define VMALLOC_END 0xe8000000 | ||