diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-19 19:40:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-19 19:40:47 -0400 |
commit | fce4a1dda2f1a9a25b3e5b7cd951070e0b42a818 (patch) | |
tree | 03a3f76c5b3d4f3b05dff44c307dbbb64ec5c510 /arch/mips/include/asm/mach-lantiq/lantiq.h | |
parent | e1f2084ed200eb31f2c9d1efe70569c76889c980 (diff) | |
parent | 6f6c3c33c027f2c83d53e8562cd9daa73fe8108b (diff) |
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus: (48 commits)
MIPS: Move arch_get_unmapped_area and gang to new file.
MIPS: Cleanup arch_get_unmapped_area
MIPS: Octeon: Don't request interrupts for unused IPI mailbox bits.
Octeon: Fix interrupt irq settings for performance counters.
MIPS: Fix build warnings on defconfigs
MIPS: Lemote 2F, Malta: Fix build warning
MIPS: Set ELF AT_PLATFORM string for Loongson2 processors
MIPS: Set ELF AT_PLATFORM string for BMIPS processors
MIPS: Introduce set_elf_platform() helper function
MIPS: JZ4740: setup: Autodetect physical memory.
MIPS: BCM47xx: Fix MAC address parsing.
MIPS: BCM47xx: Extend the filling of SPROM from NVRAM
MIPS: BCM47xx: Register SSB fallback sprom callback
MIPS: BCM47xx: Extend bcm47xx_fill_sprom with prefix.
SSB: Change fallback sprom to callback mechanism.
MIPS: Alchemy: Clean up GPIO registers and accessors
MIPS: Alchemy: Cleanup DMA addresses
MIPS: Alchemy: Rewrite ethernet platform setup
MIPS: Alchemy: Rewrite UART setup and constants.
MIPS: Alchemy: Convert dbdma.c to syscore_ops
...
Diffstat (limited to 'arch/mips/include/asm/mach-lantiq/lantiq.h')
-rw-r--r-- | arch/mips/include/asm/mach-lantiq/lantiq.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mach-lantiq/lantiq.h b/arch/mips/include/asm/mach-lantiq/lantiq.h new file mode 100644 index 000000000000..ce2f02929d22 --- /dev/null +++ b/arch/mips/include/asm/mach-lantiq/lantiq.h | |||
@@ -0,0 +1,63 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify it | ||
3 | * under the terms of the GNU General Public License version 2 as published | ||
4 | * by the Free Software Foundation. | ||
5 | * | ||
6 | * Copyright (C) 2010 John Crispin <blogic@openwrt.org> | ||
7 | */ | ||
8 | #ifndef _LANTIQ_H__ | ||
9 | #define _LANTIQ_H__ | ||
10 | |||
11 | #include <linux/irq.h> | ||
12 | |||
13 | /* generic reg access functions */ | ||
14 | #define ltq_r32(reg) __raw_readl(reg) | ||
15 | #define ltq_w32(val, reg) __raw_writel(val, reg) | ||
16 | #define ltq_w32_mask(clear, set, reg) \ | ||
17 | ltq_w32((ltq_r32(reg) & ~(clear)) | (set), reg) | ||
18 | #define ltq_r8(reg) __raw_readb(reg) | ||
19 | #define ltq_w8(val, reg) __raw_writeb(val, reg) | ||
20 | |||
21 | /* register access macros for EBU and CGU */ | ||
22 | #define ltq_ebu_w32(x, y) ltq_w32((x), ltq_ebu_membase + (y)) | ||
23 | #define ltq_ebu_r32(x) ltq_r32(ltq_ebu_membase + (x)) | ||
24 | #define ltq_cgu_w32(x, y) ltq_w32((x), ltq_cgu_membase + (y)) | ||
25 | #define ltq_cgu_r32(x) ltq_r32(ltq_cgu_membase + (x)) | ||
26 | |||
27 | extern __iomem void *ltq_ebu_membase; | ||
28 | extern __iomem void *ltq_cgu_membase; | ||
29 | |||
30 | extern unsigned int ltq_get_cpu_ver(void); | ||
31 | extern unsigned int ltq_get_soc_type(void); | ||
32 | |||
33 | /* clock speeds */ | ||
34 | #define CLOCK_60M 60000000 | ||
35 | #define CLOCK_83M 83333333 | ||
36 | #define CLOCK_111M 111111111 | ||
37 | #define CLOCK_133M 133333333 | ||
38 | #define CLOCK_167M 166666667 | ||
39 | #define CLOCK_200M 200000000 | ||
40 | #define CLOCK_266M 266666666 | ||
41 | #define CLOCK_333M 333333333 | ||
42 | #define CLOCK_400M 400000000 | ||
43 | |||
44 | /* spinlock all ebu i/o */ | ||
45 | extern spinlock_t ebu_lock; | ||
46 | |||
47 | /* some irq helpers */ | ||
48 | extern void ltq_disable_irq(struct irq_data *data); | ||
49 | extern void ltq_mask_and_ack_irq(struct irq_data *data); | ||
50 | extern void ltq_enable_irq(struct irq_data *data); | ||
51 | |||
52 | /* find out what caused the last cpu reset */ | ||
53 | extern int ltq_reset_cause(void); | ||
54 | #define LTQ_RST_CAUSE_WDTRST 0x20 | ||
55 | |||
56 | #define IOPORT_RESOURCE_START 0x10000000 | ||
57 | #define IOPORT_RESOURCE_END 0xffffffff | ||
58 | #define IOMEM_RESOURCE_START 0x10000000 | ||
59 | #define IOMEM_RESOURCE_END 0xffffffff | ||
60 | #define LTQ_FLASH_START 0x10000000 | ||
61 | #define LTQ_FLASH_MAX 0x04000000 | ||
62 | |||
63 | #endif | ||