diff options
Diffstat (limited to 'arch/arm/mach-lpc32xx/include')
-rw-r--r-- | arch/arm/mach-lpc32xx/include/mach/i2c.h | 63 | ||||
-rw-r--r-- | arch/arm/mach-lpc32xx/include/mach/io.h | 27 | ||||
-rw-r--r-- | arch/arm/mach-lpc32xx/include/mach/memory.h | 27 | ||||
-rw-r--r-- | arch/arm/mach-lpc32xx/include/mach/system.h | 52 | ||||
-rw-r--r-- | arch/arm/mach-lpc32xx/include/mach/vmalloc.h | 24 |
5 files changed, 193 insertions, 0 deletions
diff --git a/arch/arm/mach-lpc32xx/include/mach/i2c.h b/arch/arm/mach-lpc32xx/include/mach/i2c.h new file mode 100644 index 00000000000..034dc9286bc --- /dev/null +++ b/arch/arm/mach-lpc32xx/include/mach/i2c.h | |||
@@ -0,0 +1,63 @@ | |||
1 | /* | ||
2 | * PNX4008-specific tweaks for I2C IP3204 block | ||
3 | * | ||
4 | * Author: Vitaly Wool <vwool@ru.mvista.com> | ||
5 | * | ||
6 | * 2005 (c) MontaVista Software, Inc. This file is licensed under | ||
7 | * the terms of the GNU General Public License version 2. This program | ||
8 | * is licensed "as is" without any warranty of any kind, whether express | ||
9 | * or implied. | ||
10 | */ | ||
11 | |||
12 | #ifndef __ASM_ARCH_I2C_H | ||
13 | #define __ASM_ARCH_I2C_H | ||
14 | |||
15 | enum { | ||
16 | mstatus_tdi = 0x00000001, | ||
17 | mstatus_afi = 0x00000002, | ||
18 | mstatus_nai = 0x00000004, | ||
19 | mstatus_drmi = 0x00000008, | ||
20 | mstatus_active = 0x00000020, | ||
21 | mstatus_scl = 0x00000040, | ||
22 | mstatus_sda = 0x00000080, | ||
23 | mstatus_rff = 0x00000100, | ||
24 | mstatus_rfe = 0x00000200, | ||
25 | mstatus_tff = 0x00000400, | ||
26 | mstatus_tfe = 0x00000800, | ||
27 | }; | ||
28 | |||
29 | enum { | ||
30 | mcntrl_tdie = 0x00000001, | ||
31 | mcntrl_afie = 0x00000002, | ||
32 | mcntrl_naie = 0x00000004, | ||
33 | mcntrl_drmie = 0x00000008, | ||
34 | mcntrl_daie = 0x00000020, | ||
35 | mcntrl_rffie = 0x00000040, | ||
36 | mcntrl_tffie = 0x00000080, | ||
37 | mcntrl_reset = 0x00000100, | ||
38 | mcntrl_cdbmode = 0x00000400, | ||
39 | }; | ||
40 | |||
41 | enum { | ||
42 | rw_bit = 1 << 0, | ||
43 | start_bit = 1 << 8, | ||
44 | stop_bit = 1 << 9, | ||
45 | }; | ||
46 | |||
47 | #define I2C_REG_RX(a) ((a)->ioaddr) /* Rx FIFO reg (RO) */ | ||
48 | #define I2C_REG_TX(a) ((a)->ioaddr) /* Tx FIFO reg (WO) */ | ||
49 | #define I2C_REG_STS(a) ((a)->ioaddr + 0x04) /* Status reg (RO) */ | ||
50 | #define I2C_REG_CTL(a) ((a)->ioaddr + 0x08) /* Ctl reg */ | ||
51 | #define I2C_REG_CKL(a) ((a)->ioaddr + 0x0c) /* Clock divider low */ | ||
52 | #define I2C_REG_CKH(a) ((a)->ioaddr + 0x10) /* Clock divider high */ | ||
53 | #define I2C_REG_ADR(a) ((a)->ioaddr + 0x14) /* I2C address */ | ||
54 | #define I2C_REG_RFL(a) ((a)->ioaddr + 0x18) /* Rx FIFO level (RO) */ | ||
55 | #define I2C_REG_TFL(a) ((a)->ioaddr + 0x1c) /* Tx FIFO level (RO) */ | ||
56 | #define I2C_REG_RXB(a) ((a)->ioaddr + 0x20) /* Num of bytes Rx-ed (RO) */ | ||
57 | #define I2C_REG_TXB(a) ((a)->ioaddr + 0x24) /* Num of bytes Tx-ed (RO) */ | ||
58 | #define I2C_REG_TXS(a) ((a)->ioaddr + 0x28) /* Tx slave FIFO (RO) */ | ||
59 | #define I2C_REG_STFL(a) ((a)->ioaddr + 0x2c) /* Tx slave FIFO level (RO) */ | ||
60 | |||
61 | #define I2C_CHIP_NAME "PNX4008-I2C" | ||
62 | |||
63 | #endif /* __ASM_ARCH_I2C_H */ | ||
diff --git a/arch/arm/mach-lpc32xx/include/mach/io.h b/arch/arm/mach-lpc32xx/include/mach/io.h new file mode 100644 index 00000000000..9b59ab5cef8 --- /dev/null +++ b/arch/arm/mach-lpc32xx/include/mach/io.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-lpc32xx/include/mach/io.h | ||
3 | * | ||
4 | * Author: Kevin Wells <kevin.wells@nxp.com> | ||
5 | * | ||
6 | * Copyright (C) 2010 NXP Semiconductors | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | */ | ||
18 | |||
19 | #ifndef __ASM_ARM_ARCH_IO_H | ||
20 | #define __ASM_ARM_ARCH_IO_H | ||
21 | |||
22 | #define IO_SPACE_LIMIT 0xffffffff | ||
23 | |||
24 | #define __io(a) __typesafe_io(a) | ||
25 | #define __mem_pci(a) (a) | ||
26 | |||
27 | #endif | ||
diff --git a/arch/arm/mach-lpc32xx/include/mach/memory.h b/arch/arm/mach-lpc32xx/include/mach/memory.h new file mode 100644 index 00000000000..a647dd624af --- /dev/null +++ b/arch/arm/mach-lpc32xx/include/mach/memory.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-lpc32xx/include/mach/memory.h | ||
3 | * | ||
4 | * Author: Kevin Wells <kevin.wells@nxp.com> | ||
5 | * | ||
6 | * Copyright (C) 2010 NXP Semiconductors | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | */ | ||
18 | |||
19 | #ifndef __ASM_ARCH_MEMORY_H | ||
20 | #define __ASM_ARCH_MEMORY_H | ||
21 | |||
22 | /* | ||
23 | * Physical DRAM offset of bank 0 | ||
24 | */ | ||
25 | #define PLAT_PHYS_OFFSET UL(0x80000000) | ||
26 | |||
27 | #endif | ||
diff --git a/arch/arm/mach-lpc32xx/include/mach/system.h b/arch/arm/mach-lpc32xx/include/mach/system.h new file mode 100644 index 00000000000..df3b0dea4d7 --- /dev/null +++ b/arch/arm/mach-lpc32xx/include/mach/system.h | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-lpc32xx/include/mach/system.h | ||
3 | * | ||
4 | * Author: Kevin Wells <kevin.wells@nxp.com> | ||
5 | * | ||
6 | * Copyright (C) 2010 NXP Semiconductors | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | */ | ||
18 | |||
19 | #ifndef __ASM_ARCH_SYSTEM_H | ||
20 | #define __ASM_ARCH_SYSTEM_H | ||
21 | |||
22 | static void arch_idle(void) | ||
23 | { | ||
24 | cpu_do_idle(); | ||
25 | } | ||
26 | |||
27 | static inline void arch_reset(char mode, const char *cmd) | ||
28 | { | ||
29 | extern void lpc32xx_watchdog_reset(void); | ||
30 | |||
31 | switch (mode) { | ||
32 | case 's': | ||
33 | case 'h': | ||
34 | printk(KERN_CRIT "RESET: Rebooting system\n"); | ||
35 | |||
36 | /* Disable interrupts */ | ||
37 | local_irq_disable(); | ||
38 | |||
39 | lpc32xx_watchdog_reset(); | ||
40 | break; | ||
41 | |||
42 | default: | ||
43 | /* Do nothing */ | ||
44 | break; | ||
45 | } | ||
46 | |||
47 | /* Wait for watchdog to reset system */ | ||
48 | while (1) | ||
49 | ; | ||
50 | } | ||
51 | |||
52 | #endif | ||
diff --git a/arch/arm/mach-lpc32xx/include/mach/vmalloc.h b/arch/arm/mach-lpc32xx/include/mach/vmalloc.h new file mode 100644 index 00000000000..720fa43a60b --- /dev/null +++ b/arch/arm/mach-lpc32xx/include/mach/vmalloc.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-lpc32xx/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Author: Kevin Wells <kevin.wells@nxp.com> | ||
5 | * | ||
6 | * Copyright (C) 2010 NXP Semiconductors | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | */ | ||
18 | |||
19 | #ifndef __ASM_ARCH_VMALLOC_H | ||
20 | #define __ASM_ARCH_VMALLOC_H | ||
21 | |||
22 | #define VMALLOC_END 0xF0000000UL | ||
23 | |||
24 | #endif | ||