aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-nomadik/include/mach
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-nomadik/include/mach')
-rw-r--r--arch/arm/mach-nomadik/include/mach/entry-macro.S43
-rw-r--r--arch/arm/mach-nomadik/include/mach/fsmc.h29
-rw-r--r--arch/arm/mach-nomadik/include/mach/gpio.h6
-rw-r--r--arch/arm/mach-nomadik/include/mach/io.h22
-rw-r--r--arch/arm/mach-nomadik/include/mach/memory.h28
-rw-r--r--arch/arm/mach-nomadik/include/mach/nand.h16
-rw-r--r--arch/arm/mach-nomadik/include/mach/setup.h22
-rw-r--r--arch/arm/mach-nomadik/include/mach/system.h45
-rw-r--r--arch/arm/mach-nomadik/include/mach/vmalloc.h2
9 files changed, 213 insertions, 0 deletions
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 00000000000..49f1aa3bb42
--- /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
321001: tst \irqstat, #15
33 bne 1002f
34 add \irqnr, \irqnr, #4
35 movs \irqstat, \irqstat, lsr #4
36 bne 1001b
371002: tst \irqstat, #1
38 bne 1003f
39 add \irqnr, \irqnr, #1
40 movs \irqstat, \irqstat, lsr #1
41 bne 1002b
421003: /* EQ will be set if no irqs pending */
43 .endm
diff --git a/arch/arm/mach-nomadik/include/mach/fsmc.h b/arch/arm/mach-nomadik/include/mach/fsmc.h
new file mode 100644
index 00000000000..8c2c0518368
--- /dev/null
+++ b/arch/arm/mach-nomadik/include/mach/fsmc.h
@@ -0,0 +1,29 @@
1
2/* Definitions for the Nomadik FSMC "Flexible Static Memory controller" */
3
4#ifndef __ASM_ARCH_FSMC_H
5#define __ASM_ARCH_FSMC_H
6
7#include <mach/hardware.h>
8/*
9 * Register list
10 */
11
12/* bus control reg. and bus timing reg. for CS0..CS3 */
13#define FSMC_BCR(x) (NOMADIK_FSMC_VA + (x << 3))
14#define FSMC_BTR(x) (NOMADIK_FSMC_VA + (x << 3) + 0x04)
15
16/* PC-card and NAND:
17 * PCR = control register
18 * PMEM = memory timing
19 * PATT = attribute timing
20 * PIO = I/O timing
21 * PECCR = ECC result
22 */
23#define FSMC_PCR(x) (NOMADIK_FSMC_VA + ((2 + x) << 5) + 0x00)
24#define FSMC_PMEM(x) (NOMADIK_FSMC_VA + ((2 + x) << 5) + 0x08)
25#define FSMC_PATT(x) (NOMADIK_FSMC_VA + ((2 + x) << 5) + 0x0c)
26#define FSMC_PIO(x) (NOMADIK_FSMC_VA + ((2 + x) << 5) + 0x10)
27#define FSMC_PECCR(x) (NOMADIK_FSMC_VA + ((2 + x) << 5) + 0x14)
28
29#endif /* __ASM_ARCH_FSMC_H */
diff --git a/arch/arm/mach-nomadik/include/mach/gpio.h b/arch/arm/mach-nomadik/include/mach/gpio.h
new file mode 100644
index 00000000000..7a81a042034
--- /dev/null
+++ b/arch/arm/mach-nomadik/include/mach/gpio.h
@@ -0,0 +1,6 @@
1#ifndef __ASM_ARCH_GPIO_H
2#define __ASM_ARCH_GPIO_H
3
4#include <plat/gpio.h>
5
6#endif /* __ASM_ARCH_GPIO_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 00000000000..2e1eca1b824
--- /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/memory.h b/arch/arm/mach-nomadik/include/mach/memory.h
new file mode 100644
index 00000000000..d3325211ba6
--- /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 PLAT_PHYS_OFFSET UL(0x00000000)
27
28#endif
diff --git a/arch/arm/mach-nomadik/include/mach/nand.h b/arch/arm/mach-nomadik/include/mach/nand.h
new file mode 100644
index 00000000000..c3c8254c22a
--- /dev/null
+++ b/arch/arm/mach-nomadik/include/mach/nand.h
@@ -0,0 +1,16 @@
1#ifndef __ASM_ARCH_NAND_H
2#define __ASM_ARCH_NAND_H
3
4struct nomadik_nand_platform_data {
5 struct mtd_partition *parts;
6 int nparts;
7 int options;
8 int (*init) (void);
9 int (*exit) (void);
10};
11
12#define NAND_IO_DATA 0x40000000
13#define NAND_IO_CMD 0x40800000
14#define NAND_IO_ADDR 0x41000000
15
16#endif /* __ASM_ARCH_NAND_H */
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 00000000000..b7897edf1f3
--- /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
15extern void cpu8815_map_io(void);
16extern void cpu8815_platform_init(void);
17extern void cpu8815_init_irq(void);
18extern void nmdk_timer_init(void);
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 00000000000..7119f688116
--- /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
26static 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
35static 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/vmalloc.h b/arch/arm/mach-nomadik/include/mach/vmalloc.h
new file mode 100644
index 00000000000..f83d574d944
--- /dev/null
+++ b/arch/arm/mach-nomadik/include/mach/vmalloc.h
@@ -0,0 +1,2 @@
1
2#define VMALLOC_END 0xe8000000UL