diff options
| author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
|---|---|---|
| committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
| commit | fcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch) | |
| tree | a57612d1888735a2ec7972891b68c1ac5ec8faea /arch/arm/include/asm | |
| parent | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff) | |
Diffstat (limited to 'arch/arm/include/asm')
57 files changed, 2460 insertions, 0 deletions
diff --git a/arch/arm/include/asm/a.out.h b/arch/arm/include/asm/a.out.h new file mode 100644 index 00000000000..083894b2e3b --- /dev/null +++ b/arch/arm/include/asm/a.out.h | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | #ifndef __ARM_A_OUT_H__ | ||
| 2 | #define __ARM_A_OUT_H__ | ||
| 3 | |||
| 4 | #include <linux/personality.h> | ||
| 5 | #include <linux/types.h> | ||
| 6 | |||
| 7 | struct exec | ||
| 8 | { | ||
| 9 | __u32 a_info; /* Use macros N_MAGIC, etc for access */ | ||
| 10 | __u32 a_text; /* length of text, in bytes */ | ||
| 11 | __u32 a_data; /* length of data, in bytes */ | ||
| 12 | __u32 a_bss; /* length of uninitialized data area for file, in bytes */ | ||
| 13 | __u32 a_syms; /* length of symbol table data in file, in bytes */ | ||
| 14 | __u32 a_entry; /* start address */ | ||
| 15 | __u32 a_trsize; /* length of relocation info for text, in bytes */ | ||
| 16 | __u32 a_drsize; /* length of relocation info for data, in bytes */ | ||
| 17 | }; | ||
| 18 | |||
| 19 | /* | ||
| 20 | * This is always the same | ||
| 21 | */ | ||
| 22 | #define N_TXTADDR(a) (0x00008000) | ||
| 23 | |||
| 24 | #define N_TRSIZE(a) ((a).a_trsize) | ||
| 25 | #define N_DRSIZE(a) ((a).a_drsize) | ||
| 26 | #define N_SYMSIZE(a) ((a).a_syms) | ||
| 27 | |||
| 28 | #define M_ARM 103 | ||
| 29 | |||
| 30 | #ifndef LIBRARY_START_TEXT | ||
| 31 | #define LIBRARY_START_TEXT (0x00c00000) | ||
| 32 | #endif | ||
| 33 | |||
| 34 | #endif /* __A_OUT_GNU_H__ */ | ||
diff --git a/arch/arm/include/asm/auxvec.h b/arch/arm/include/asm/auxvec.h new file mode 100644 index 00000000000..c0536f6b29a --- /dev/null +++ b/arch/arm/include/asm/auxvec.h | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | #ifndef __ASMARM_AUXVEC_H | ||
| 2 | #define __ASMARM_AUXVEC_H | ||
| 3 | |||
| 4 | #endif | ||
diff --git a/arch/arm/include/asm/bitsperlong.h b/arch/arm/include/asm/bitsperlong.h new file mode 100644 index 00000000000..6dc0bb0c13b --- /dev/null +++ b/arch/arm/include/asm/bitsperlong.h | |||
| @@ -0,0 +1 @@ | |||
| #include <asm-generic/bitsperlong.h> | |||
diff --git a/arch/arm/include/asm/byteorder.h b/arch/arm/include/asm/byteorder.h new file mode 100644 index 00000000000..77379748b17 --- /dev/null +++ b/arch/arm/include/asm/byteorder.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/include/asm/byteorder.h | ||
| 3 | * | ||
| 4 | * ARM Endian-ness. In little endian mode, the data bus is connected such | ||
| 5 | * that byte accesses appear as: | ||
| 6 | * 0 = d0...d7, 1 = d8...d15, 2 = d16...d23, 3 = d24...d31 | ||
| 7 | * and word accesses (data or instruction) appear as: | ||
| 8 | * d0...d31 | ||
| 9 | * | ||
| 10 | * When in big endian mode, byte accesses appear as: | ||
| 11 | * 0 = d24...d31, 1 = d16...d23, 2 = d8...d15, 3 = d0...d7 | ||
| 12 | * and word accesses (data or instruction) appear as: | ||
| 13 | * d0...d31 | ||
| 14 | */ | ||
| 15 | #ifndef __ASM_ARM_BYTEORDER_H | ||
| 16 | #define __ASM_ARM_BYTEORDER_H | ||
| 17 | |||
| 18 | #ifdef __ARMEB__ | ||
| 19 | #include <linux/byteorder/big_endian.h> | ||
| 20 | #else | ||
| 21 | #include <linux/byteorder/little_endian.h> | ||
| 22 | #endif | ||
| 23 | |||
| 24 | #endif | ||
| 25 | |||
diff --git a/arch/arm/include/asm/cpu_pm.h b/arch/arm/include/asm/cpu_pm.h new file mode 100644 index 00000000000..07b1b6ec025 --- /dev/null +++ b/arch/arm/include/asm/cpu_pm.h | |||
| @@ -0,0 +1,123 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2011 Google, Inc. | ||
| 3 | * | ||
| 4 | * Author: | ||
| 5 | * Colin Cross <ccross@android.com> | ||
| 6 | * | ||
| 7 | * This software is licensed under the terms of the GNU General Public | ||
| 8 | * License version 2, as published by the Free Software Foundation, and | ||
| 9 | * may be copied, distributed, and modified under those terms. | ||
| 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 | */ | ||
| 17 | |||
| 18 | #ifndef _ASMARM_CPU_PM_H | ||
| 19 | #define _ASMARM_CPU_PM_H | ||
| 20 | |||
| 21 | #include <linux/kernel.h> | ||
| 22 | #include <linux/notifier.h> | ||
| 23 | |||
| 24 | /* | ||
| 25 | * When a CPU goes to a low power state that turns off power to the CPU's | ||
| 26 | * power domain, the contents of some blocks (floating point coprocessors, | ||
| 27 | * interrutp controllers, caches, timers) in the same power domain can | ||
| 28 | * be lost. The cpm_pm notifiers provide a method for platform idle, suspend, | ||
| 29 | * and hotplug implementations to notify the drivers for these blocks that | ||
| 30 | * they may be reset. | ||
| 31 | * | ||
| 32 | * All cpu_pm notifications must be called with interrupts disabled. | ||
| 33 | * | ||
| 34 | * The notifications are split into two classes, CPU notifications and CPU | ||
| 35 | * complex notifications. | ||
| 36 | * | ||
| 37 | * CPU notifications apply to a single CPU, and must be called on the affected | ||
| 38 | * CPU. They are used to save per-cpu context for affected blocks. | ||
| 39 | * | ||
| 40 | * CPU complex notifications apply to all CPUs in a single power domain. They | ||
| 41 | * are used to save any global context for affected blocks, and must be called | ||
| 42 | * after all the CPUs in the power domain have been notified of the low power | ||
| 43 | * state. | ||
| 44 | * | ||
| 45 | */ | ||
| 46 | |||
| 47 | /* | ||
| 48 | * Event codes passed as unsigned long val to notifier calls | ||
| 49 | */ | ||
| 50 | enum cpu_pm_event { | ||
| 51 | /* A single cpu is entering a low power state */ | ||
| 52 | CPU_PM_ENTER, | ||
| 53 | |||
| 54 | /* A single cpu failed to enter a low power state */ | ||
| 55 | CPU_PM_ENTER_FAILED, | ||
| 56 | |||
| 57 | /* A single cpu is exiting a low power state */ | ||
| 58 | CPU_PM_EXIT, | ||
| 59 | |||
| 60 | /* A cpu power domain is entering a low power state */ | ||
| 61 | CPU_COMPLEX_PM_ENTER, | ||
| 62 | |||
| 63 | /* A cpu power domain failed to enter a low power state */ | ||
| 64 | CPU_COMPLEX_PM_ENTER_FAILED, | ||
| 65 | |||
| 66 | /* A cpu power domain is exiting a low power state */ | ||
| 67 | CPU_COMPLEX_PM_EXIT, | ||
| 68 | }; | ||
| 69 | |||
| 70 | int cpu_pm_register_notifier(struct notifier_block *nb); | ||
| 71 | int cpu_pm_unregister_notifier(struct notifier_block *nb); | ||
| 72 | |||
| 73 | /* | ||
| 74 | * cpm_pm_enter | ||
| 75 | * | ||
| 76 | * Notifies listeners that a single cpu is entering a low power state that may | ||
| 77 | * cause some blocks in the same power domain as the cpu to reset. | ||
| 78 | * | ||
| 79 | * Must be called on the affected cpu with interrupts disabled. Platform is | ||
| 80 | * responsible for ensuring that cpu_pm_enter is not called twice on the same | ||
| 81 | * cpu before cpu_pm_exit is called. | ||
| 82 | */ | ||
| 83 | int cpu_pm_enter(void); | ||
| 84 | |||
| 85 | /* | ||
| 86 | * cpm_pm_exit | ||
| 87 | * | ||
| 88 | * Notifies listeners that a single cpu is exiting a low power state that may | ||
| 89 | * have caused some blocks in the same power domain as the cpu to reset. | ||
| 90 | * | ||
| 91 | * Must be called on the affected cpu with interrupts disabled. | ||
| 92 | */ | ||
| 93 | int cpu_pm_exit(void); | ||
| 94 | |||
| 95 | /* | ||
| 96 | * cpm_complex_pm_enter | ||
| 97 | * | ||
| 98 | * Notifies listeners that all cpus in a power domain are entering a low power | ||
| 99 | * state that may cause some blocks in the same power domain to reset. | ||
| 100 | * | ||
| 101 | * Must be called after cpu_pm_enter has been called on all cpus in the power | ||
| 102 | * domain, and before cpu_pm_exit has been called on any cpu in the power | ||
| 103 | * domain. | ||
| 104 | * | ||
| 105 | * Must be called with interrupts disabled. | ||
| 106 | */ | ||
| 107 | int cpu_complex_pm_enter(void); | ||
| 108 | |||
| 109 | /* | ||
| 110 | * cpm_pm_enter | ||
| 111 | * | ||
| 112 | * Notifies listeners that a single cpu is entering a low power state that may | ||
| 113 | * cause some blocks in the same power domain as the cpu to reset. | ||
| 114 | * | ||
| 115 | * Must be called after cpu_pm_enter has been called on all cpus in the power | ||
| 116 | * domain, and before cpu_pm_exit has been called on any cpu in the power | ||
| 117 | * domain. | ||
| 118 | * | ||
| 119 | * Must be called with interrupts disabled. | ||
| 120 | */ | ||
| 121 | int cpu_complex_pm_exit(void); | ||
| 122 | |||
| 123 | #endif | ||
diff --git a/arch/arm/include/asm/cputime.h b/arch/arm/include/asm/cputime.h new file mode 100644 index 00000000000..3a8002a5fec --- /dev/null +++ b/arch/arm/include/asm/cputime.h | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | #ifndef __ARM_CPUTIME_H | ||
| 2 | #define __ARM_CPUTIME_H | ||
| 3 | |||
| 4 | #include <asm-generic/cputime.h> | ||
| 5 | |||
| 6 | #endif /* __ARM_CPUTIME_H */ | ||
diff --git a/arch/arm/include/asm/current.h b/arch/arm/include/asm/current.h new file mode 100644 index 00000000000..75d21e2a3ff --- /dev/null +++ b/arch/arm/include/asm/current.h | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | #ifndef _ASMARM_CURRENT_H | ||
| 2 | #define _ASMARM_CURRENT_H | ||
| 3 | |||
| 4 | #include <linux/thread_info.h> | ||
| 5 | |||
| 6 | static inline struct task_struct *get_current(void) __attribute_const__; | ||
| 7 | |||
| 8 | static inline struct task_struct *get_current(void) | ||
| 9 | { | ||
| 10 | return current_thread_info()->task; | ||
| 11 | } | ||
| 12 | |||
| 13 | #define current (get_current()) | ||
| 14 | |||
| 15 | #endif /* _ASMARM_CURRENT_H */ | ||
diff --git a/arch/arm/include/asm/emergency-restart.h b/arch/arm/include/asm/emergency-restart.h new file mode 100644 index 00000000000..108d8c48e42 --- /dev/null +++ b/arch/arm/include/asm/emergency-restart.h | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | #ifndef _ASM_EMERGENCY_RESTART_H | ||
| 2 | #define _ASM_EMERGENCY_RESTART_H | ||
| 3 | |||
| 4 | #include <asm-generic/emergency-restart.h> | ||
| 5 | |||
| 6 | #endif /* _ASM_EMERGENCY_RESTART_H */ | ||
diff --git a/arch/arm/include/asm/entry-macro-vic2.S b/arch/arm/include/asm/entry-macro-vic2.S new file mode 100644 index 00000000000..3ceb85e4385 --- /dev/null +++ b/arch/arm/include/asm/entry-macro-vic2.S | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | /* arch/arm/include/asm/entry-macro-vic2.S | ||
| 2 | * | ||
| 3 | * Originally arch/arm/mach-s3c6400/include/mach/entry-macro.S | ||
| 4 | * | ||
| 5 | * Copyright 2008 Openmoko, Inc. | ||
| 6 | * Copyright 2008 Simtec Electronics | ||
| 7 | * http://armlinux.simtec.co.uk/ | ||
| 8 | * Ben Dooks <ben@simtec.co.uk> | ||
| 9 | * | ||
| 10 | * Low-level IRQ helper macros for a device with two VICs | ||
| 11 | * | ||
| 12 | * This file is licensed under the terms of the GNU General Public | ||
| 13 | * License version 2. This program is licensed "as is" without any | ||
| 14 | * warranty of any kind, whether express or implied. | ||
| 15 | */ | ||
| 16 | |||
| 17 | /* This should be included from <mach/entry-macro.S> with the necessary | ||
| 18 | * defines for virtual addresses and IRQ bases for the two vics. | ||
| 19 | * | ||
| 20 | * The code needs the following defined: | ||
| 21 | * IRQ_VIC0_BASE IRQ number of VIC0's first IRQ | ||
| 22 | * IRQ_VIC1_BASE IRQ number of VIC1's first IRQ | ||
| 23 | * VA_VIC0 Virtual address of VIC0 | ||
| 24 | * VA_VIC1 Virtual address of VIC1 | ||
| 25 | * | ||
| 26 | * Note, code assumes VIC0's virtual address is an ARM immediate constant | ||
| 27 | * away from VIC1. | ||
| 28 | */ | ||
| 29 | |||
| 30 | #include <asm/hardware/vic.h> | ||
| 31 | |||
| 32 | .macro disable_fiq | ||
| 33 | .endm | ||
| 34 | |||
| 35 | .macro get_irqnr_preamble, base, tmp | ||
| 36 | ldr \base, =VA_VIC0 | ||
| 37 | .endm | ||
| 38 | |||
| 39 | .macro arch_ret_to_user, tmp1, tmp2 | ||
| 40 | .endm | ||
| 41 | |||
| 42 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
| 43 | |||
| 44 | @ check the vic0 | ||
| 45 | mov \irqnr, #IRQ_VIC0_BASE + 31 | ||
| 46 | ldr \irqstat, [ \base, # VIC_IRQ_STATUS ] | ||
| 47 | teq \irqstat, #0 | ||
| 48 | |||
| 49 | @ otherwise try vic1 | ||
| 50 | addeq \tmp, \base, #(VA_VIC1 - VA_VIC0) | ||
| 51 | addeq \irqnr, \irqnr, #(IRQ_VIC1_BASE - IRQ_VIC0_BASE) | ||
| 52 | ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] | ||
| 53 | teqeq \irqstat, #0 | ||
| 54 | |||
| 55 | clzne \irqstat, \irqstat | ||
| 56 | subne \irqnr, \irqnr, \irqstat | ||
| 57 | .endm | ||
diff --git a/arch/arm/include/asm/errno.h b/arch/arm/include/asm/errno.h new file mode 100644 index 00000000000..6e60f0612bb --- /dev/null +++ b/arch/arm/include/asm/errno.h | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | #ifndef _ARM_ERRNO_H | ||
| 2 | #define _ARM_ERRNO_H | ||
| 3 | |||
| 4 | #include <asm-generic/errno.h> | ||
| 5 | |||
| 6 | #endif | ||
diff --git a/arch/arm/include/asm/fcntl.h b/arch/arm/include/asm/fcntl.h new file mode 100644 index 00000000000..a80b6607b2e --- /dev/null +++ b/arch/arm/include/asm/fcntl.h | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | #ifndef _ARM_FCNTL_H | ||
| 2 | #define _ARM_FCNTL_H | ||
| 3 | |||
| 4 | #define O_DIRECTORY 040000 /* must be a directory */ | ||
| 5 | #define O_NOFOLLOW 0100000 /* don't follow links */ | ||
| 6 | #define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ | ||
| 7 | #define O_LARGEFILE 0400000 | ||
| 8 | |||
| 9 | #include <asm-generic/fcntl.h> | ||
| 10 | |||
| 11 | #endif | ||
diff --git a/arch/arm/include/asm/fiq_debugger.h b/arch/arm/include/asm/fiq_debugger.h new file mode 100644 index 00000000000..4d274883ba6 --- /dev/null +++ b/arch/arm/include/asm/fiq_debugger.h | |||
| @@ -0,0 +1,64 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/include/asm/fiq_debugger.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Google, Inc. | ||
| 5 | * Author: Colin Cross <ccross@android.com> | ||
| 6 | * | ||
| 7 | * This software is licensed under the terms of the GNU General Public | ||
| 8 | * License version 2, as published by the Free Software Foundation, and | ||
| 9 | * may be copied, distributed, and modified under those terms. | ||
| 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 | */ | ||
| 17 | |||
| 18 | #ifndef _ARCH_ARM_MACH_TEGRA_FIQ_DEBUGGER_H_ | ||
| 19 | #define _ARCH_ARM_MACH_TEGRA_FIQ_DEBUGGER_H_ | ||
| 20 | |||
| 21 | #include <linux/serial_core.h> | ||
| 22 | |||
| 23 | #define FIQ_DEBUGGER_NO_CHAR NO_POLL_CHAR | ||
| 24 | #define FIQ_DEBUGGER_BREAK 0x00ff0100 | ||
| 25 | |||
| 26 | #define FIQ_DEBUGGER_FIQ_IRQ_NAME "fiq" | ||
| 27 | #define FIQ_DEBUGGER_SIGNAL_IRQ_NAME "signal" | ||
| 28 | #define FIQ_DEBUGGER_WAKEUP_IRQ_NAME "wakeup" | ||
| 29 | |||
| 30 | /** | ||
| 31 | * struct fiq_debugger_pdata - fiq debugger platform data | ||
| 32 | * @uart_resume: used to restore uart state right before enabling | ||
| 33 | * the fiq. | ||
| 34 | * @uart_enable: Do the work necessary to communicate with the uart | ||
| 35 | * hw (enable clocks, etc.). This must be ref-counted. | ||
| 36 | * @uart_disable: Do the work necessary to disable the uart hw | ||
| 37 | * (disable clocks, etc.). This must be ref-counted. | ||
| 38 | * @uart_dev_suspend: called during PM suspend, generally not needed | ||
| 39 | * for real fiq mode debugger. | ||
| 40 | * @uart_dev_resume: called during PM resume, generally not needed | ||
| 41 | * for real fiq mode debugger. | ||
| 42 | */ | ||
| 43 | struct fiq_debugger_pdata { | ||
| 44 | int (*uart_init)(struct platform_device *pdev); | ||
| 45 | void (*uart_free)(struct platform_device *pdev); | ||
| 46 | int (*uart_resume)(struct platform_device *pdev); | ||
| 47 | int (*uart_getc)(struct platform_device *pdev); | ||
| 48 | void (*uart_putc)(struct platform_device *pdev, unsigned int c); | ||
| 49 | void (*uart_flush)(struct platform_device *pdev); | ||
| 50 | void (*uart_enable)(struct platform_device *pdev); | ||
| 51 | void (*uart_disable)(struct platform_device *pdev); | ||
| 52 | |||
| 53 | int (*uart_dev_suspend)(struct platform_device *pdev); | ||
| 54 | int (*uart_dev_resume)(struct platform_device *pdev); | ||
| 55 | |||
| 56 | void (*fiq_enable)(struct platform_device *pdev, unsigned int fiq, | ||
| 57 | bool enable); | ||
| 58 | void (*fiq_ack)(struct platform_device *pdev, unsigned int fiq); | ||
| 59 | |||
| 60 | void (*force_irq)(struct platform_device *pdev, unsigned int irq); | ||
| 61 | void (*force_irq_ack)(struct platform_device *pdev, unsigned int irq); | ||
| 62 | }; | ||
| 63 | |||
| 64 | #endif | ||
diff --git a/arch/arm/include/asm/fiq_glue.h b/arch/arm/include/asm/fiq_glue.h new file mode 100644 index 00000000000..d54c29db97a --- /dev/null +++ b/arch/arm/include/asm/fiq_glue.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 Google, Inc. | ||
| 3 | * | ||
| 4 | * This software is licensed under the terms of the GNU General Public | ||
| 5 | * License version 2, as published by the Free Software Foundation, and | ||
| 6 | * may be copied, distributed, and modified under those terms. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef __ASM_FIQ_GLUE_H | ||
| 15 | #define __ASM_FIQ_GLUE_H | ||
| 16 | |||
| 17 | struct fiq_glue_handler { | ||
| 18 | void (*fiq)(struct fiq_glue_handler *h, void *regs, void *svc_sp); | ||
| 19 | void (*resume)(struct fiq_glue_handler *h); | ||
| 20 | }; | ||
| 21 | |||
| 22 | int fiq_glue_register_handler(struct fiq_glue_handler *handler); | ||
| 23 | |||
| 24 | #ifdef CONFIG_FIQ_GLUE | ||
| 25 | void fiq_glue_resume(void); | ||
| 26 | #else | ||
| 27 | static inline void fiq_glue_resume(void) {} | ||
| 28 | #endif | ||
| 29 | |||
| 30 | #endif | ||
diff --git a/arch/arm/include/asm/hardware/clps7111.h b/arch/arm/include/asm/hardware/clps7111.h new file mode 100644 index 00000000000..44477225aed --- /dev/null +++ b/arch/arm/include/asm/hardware/clps7111.h | |||
| @@ -0,0 +1,184 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/include/asm/hardware/clps7111.h | ||
| 3 | * | ||
| 4 | * This file contains the hardware definitions of the CLPS7111 internal | ||
| 5 | * registers. | ||
| 6 | * | ||
| 7 | * Copyright (C) 2000 Deep Blue Solutions Ltd. | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License as published by | ||
| 11 | * the Free Software Foundation; either version 2 of the License, or | ||
| 12 | * (at your option) any later version. | ||
| 13 | * | ||
| 14 | * This program is distributed in the hope that it will be useful, | ||
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | * GNU General Public License for more details. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License | ||
| 20 | * along with this program; if not, write to the Free Software | ||
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 22 | */ | ||
| 23 | #ifndef __ASM_HARDWARE_CLPS7111_H | ||
| 24 | #define __ASM_HARDWARE_CLPS7111_H | ||
| 25 | |||
| 26 | #define CLPS7111_PHYS_BASE (0x80000000) | ||
| 27 | |||
| 28 | #ifndef __ASSEMBLY__ | ||
| 29 | #define clps_readb(off) __raw_readb(CLPS7111_BASE + (off)) | ||
| 30 | #define clps_readw(off) __raw_readw(CLPS7111_BASE + (off)) | ||
| 31 | #define clps_readl(off) __raw_readl(CLPS7111_BASE + (off)) | ||
| 32 | #define clps_writeb(val,off) __raw_writeb(val, CLPS7111_BASE + (off)) | ||
| 33 | #define clps_writew(val,off) __raw_writew(val, CLPS7111_BASE + (off)) | ||
| 34 | #define clps_writel(val,off) __raw_writel(val, CLPS7111_BASE + (off)) | ||
| 35 | #endif | ||
| 36 | |||
| 37 | #define PADR (0x0000) | ||
| 38 | #define PBDR (0x0001) | ||
| 39 | #define PDDR (0x0003) | ||
| 40 | #define PADDR (0x0040) | ||
| 41 | #define PBDDR (0x0041) | ||
| 42 | #define PDDDR (0x0043) | ||
| 43 | #define PEDR (0x0080) | ||
| 44 | #define PEDDR (0x00c0) | ||
| 45 | #define SYSCON1 (0x0100) | ||
| 46 | #define SYSFLG1 (0x0140) | ||
| 47 | #define MEMCFG1 (0x0180) | ||
| 48 | #define MEMCFG2 (0x01c0) | ||
| 49 | #define DRFPR (0x0200) | ||
| 50 | #define INTSR1 (0x0240) | ||
| 51 | #define INTMR1 (0x0280) | ||
| 52 | #define LCDCON (0x02c0) | ||
| 53 | #define TC1D (0x0300) | ||
| 54 | #define TC2D (0x0340) | ||
| 55 | #define RTCDR (0x0380) | ||
| 56 | #define RTCMR (0x03c0) | ||
| 57 | #define PMPCON (0x0400) | ||
| 58 | #define CODR (0x0440) | ||
| 59 | #define UARTDR1 (0x0480) | ||
| 60 | #define UBRLCR1 (0x04c0) | ||
| 61 | #define SYNCIO (0x0500) | ||
| 62 | #define PALLSW (0x0540) | ||
| 63 | #define PALMSW (0x0580) | ||
| 64 | #define STFCLR (0x05c0) | ||
| 65 | #define BLEOI (0x0600) | ||
| 66 | #define MCEOI (0x0640) | ||
| 67 | #define TEOI (0x0680) | ||
| 68 | #define TC1EOI (0x06c0) | ||
| 69 | #define TC2EOI (0x0700) | ||
| 70 | #define RTCEOI (0x0740) | ||
| 71 | #define UMSEOI (0x0780) | ||
| 72 | #define COEOI (0x07c0) | ||
| 73 | #define HALT (0x0800) | ||
| 74 | #define STDBY (0x0840) | ||
| 75 | |||
| 76 | #define FBADDR (0x1000) | ||
| 77 | #define SYSCON2 (0x1100) | ||
| 78 | #define SYSFLG2 (0x1140) | ||
| 79 | #define INTSR2 (0x1240) | ||
| 80 | #define INTMR2 (0x1280) | ||
| 81 | #define UARTDR2 (0x1480) | ||
| 82 | #define UBRLCR2 (0x14c0) | ||
| 83 | #define SS2DR (0x1500) | ||
| 84 | #define SRXEOF (0x1600) | ||
| 85 | #define SS2POP (0x16c0) | ||
| 86 | #define KBDEOI (0x1700) | ||
| 87 | |||
| 88 | /* common bits: SYSCON1 / SYSCON2 */ | ||
| 89 | #define SYSCON_UARTEN (1 << 8) | ||
| 90 | |||
| 91 | #define SYSCON1_KBDSCAN(x) ((x) & 15) | ||
| 92 | #define SYSCON1_KBDSCANMASK (15) | ||
| 93 | #define SYSCON1_TC1M (1 << 4) | ||
| 94 | #define SYSCON1_TC1S (1 << 5) | ||
| 95 | #define SYSCON1_TC2M (1 << 6) | ||
| 96 | #define SYSCON1_TC2S (1 << 7) | ||
| 97 | #define SYSCON1_UART1EN SYSCON_UARTEN | ||
| 98 | #define SYSCON1_BZTOG (1 << 9) | ||
| 99 | #define SYSCON1_BZMOD (1 << 10) | ||
| 100 | #define SYSCON1_DBGEN (1 << 11) | ||
| 101 | #define SYSCON1_LCDEN (1 << 12) | ||
| 102 | #define SYSCON1_CDENTX (1 << 13) | ||
| 103 | #define SYSCON1_CDENRX (1 << 14) | ||
| 104 | #define SYSCON1_SIREN (1 << 15) | ||
| 105 | #define SYSCON1_ADCKSEL(x) (((x) & 3) << 16) | ||
| 106 | #define SYSCON1_ADCKSEL_MASK (3 << 16) | ||
| 107 | #define SYSCON1_EXCKEN (1 << 18) | ||
| 108 | #define SYSCON1_WAKEDIS (1 << 19) | ||
| 109 | #define SYSCON1_IRTXM (1 << 20) | ||
| 110 | |||
| 111 | /* common bits: SYSFLG1 / SYSFLG2 */ | ||
| 112 | #define SYSFLG_UBUSY (1 << 11) | ||
| 113 | #define SYSFLG_URXFE (1 << 22) | ||
| 114 | #define SYSFLG_UTXFF (1 << 23) | ||
| 115 | |||
| 116 | #define SYSFLG1_MCDR (1 << 0) | ||
| 117 | #define SYSFLG1_DCDET (1 << 1) | ||
| 118 | #define SYSFLG1_WUDR (1 << 2) | ||
| 119 | #define SYSFLG1_WUON (1 << 3) | ||
| 120 | #define SYSFLG1_CTS (1 << 8) | ||
| 121 | #define SYSFLG1_DSR (1 << 9) | ||
| 122 | #define SYSFLG1_DCD (1 << 10) | ||
| 123 | #define SYSFLG1_UBUSY SYSFLG_UBUSY | ||
| 124 | #define SYSFLG1_NBFLG (1 << 12) | ||
| 125 | #define SYSFLG1_RSTFLG (1 << 13) | ||
| 126 | #define SYSFLG1_PFFLG (1 << 14) | ||
| 127 | #define SYSFLG1_CLDFLG (1 << 15) | ||
| 128 | #define SYSFLG1_URXFE SYSFLG_URXFE | ||
| 129 | #define SYSFLG1_UTXFF SYSFLG_UTXFF | ||
| 130 | #define SYSFLG1_CRXFE (1 << 24) | ||
| 131 | #define SYSFLG1_CTXFF (1 << 25) | ||
| 132 | #define SYSFLG1_SSIBUSY (1 << 26) | ||
| 133 | #define SYSFLG1_ID (1 << 29) | ||
| 134 | |||
| 135 | #define SYSFLG2_SSRXOF (1 << 0) | ||
| 136 | #define SYSFLG2_RESVAL (1 << 1) | ||
| 137 | #define SYSFLG2_RESFRM (1 << 2) | ||
| 138 | #define SYSFLG2_SS2RXFE (1 << 3) | ||
| 139 | #define SYSFLG2_SS2TXFF (1 << 4) | ||
| 140 | #define SYSFLG2_SS2TXUF (1 << 5) | ||
| 141 | #define SYSFLG2_CKMODE (1 << 6) | ||
| 142 | #define SYSFLG2_UBUSY SYSFLG_UBUSY | ||
| 143 | #define SYSFLG2_URXFE SYSFLG_URXFE | ||
| 144 | #define SYSFLG2_UTXFF SYSFLG_UTXFF | ||
| 145 | |||
| 146 | #define LCDCON_GSEN (1 << 30) | ||
| 147 | #define LCDCON_GSMD (1 << 31) | ||
| 148 | |||
| 149 | #define SYSCON2_SERSEL (1 << 0) | ||
| 150 | #define SYSCON2_KBD6 (1 << 1) | ||
| 151 | #define SYSCON2_DRAMZ (1 << 2) | ||
| 152 | #define SYSCON2_KBWEN (1 << 3) | ||
| 153 | #define SYSCON2_SS2TXEN (1 << 4) | ||
| 154 | #define SYSCON2_PCCARD1 (1 << 5) | ||
| 155 | #define SYSCON2_PCCARD2 (1 << 6) | ||
| 156 | #define SYSCON2_SS2RXEN (1 << 7) | ||
| 157 | #define SYSCON2_UART2EN SYSCON_UARTEN | ||
| 158 | #define SYSCON2_SS2MAEN (1 << 9) | ||
| 159 | #define SYSCON2_OSTB (1 << 12) | ||
| 160 | #define SYSCON2_CLKENSL (1 << 13) | ||
| 161 | #define SYSCON2_BUZFREQ (1 << 14) | ||
| 162 | |||
| 163 | /* common bits: UARTDR1 / UARTDR2 */ | ||
| 164 | #define UARTDR_FRMERR (1 << 8) | ||
| 165 | #define UARTDR_PARERR (1 << 9) | ||
| 166 | #define UARTDR_OVERR (1 << 10) | ||
| 167 | |||
| 168 | /* common bits: UBRLCR1 / UBRLCR2 */ | ||
| 169 | #define UBRLCR_BAUD_MASK ((1 << 12) - 1) | ||
| 170 | #define UBRLCR_BREAK (1 << 12) | ||
| 171 | #define UBRLCR_PRTEN (1 << 13) | ||
| 172 | #define UBRLCR_EVENPRT (1 << 14) | ||
| 173 | #define UBRLCR_XSTOP (1 << 15) | ||
| 174 | #define UBRLCR_FIFOEN (1 << 16) | ||
| 175 | #define UBRLCR_WRDLEN5 (0 << 17) | ||
| 176 | #define UBRLCR_WRDLEN6 (1 << 17) | ||
| 177 | #define UBRLCR_WRDLEN7 (2 << 17) | ||
| 178 | #define UBRLCR_WRDLEN8 (3 << 17) | ||
| 179 | #define UBRLCR_WRDLEN_MASK (3 << 17) | ||
| 180 | |||
| 181 | #define SYNCIO_SMCKEN (1 << 13) | ||
| 182 | #define SYNCIO_TXFRMEN (1 << 14) | ||
| 183 | |||
| 184 | #endif /* __ASM_HARDWARE_CLPS7111_H */ | ||
diff --git a/arch/arm/include/asm/hardware/cs89712.h b/arch/arm/include/asm/hardware/cs89712.h new file mode 100644 index 00000000000..f75626933e9 --- /dev/null +++ b/arch/arm/include/asm/hardware/cs89712.h | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/include/asm/hardware/cs89712.h | ||
| 3 | * | ||
| 4 | * This file contains the hardware definitions of the CS89712 | ||
| 5 | * additional internal registers. | ||
| 6 | * | ||
| 7 | * Copyright (C) 2001 Thomas Gleixner autronix automation <gleixner@autronix.de> | ||
| 8 | * | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or modify | ||
| 11 | * it under the terms of the GNU General Public License as published by | ||
| 12 | * the Free Software Foundation; either version 2 of the License, or | ||
| 13 | * (at your option) any later version. | ||
| 14 | * | ||
| 15 | * This program is distributed in the hope that it will be useful, | ||
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 18 | * GNU General Public License for more details. | ||
| 19 | * | ||
| 20 | * You should have received a copy of the GNU General Public License | ||
| 21 | * along with this program; if not, write to the Free Software | ||
| 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 23 | */ | ||
| 24 | #ifndef __ASM_HARDWARE_CS89712_H | ||
| 25 | #define __ASM_HARDWARE_CS89712_H | ||
| 26 | |||
| 27 | /* | ||
| 28 | * CS89712 additional registers | ||
| 29 | */ | ||
| 30 | |||
| 31 | #define PCDR 0x0002 /* Port C Data register ---------------------------- */ | ||
| 32 | #define PCDDR 0x0042 /* Port C Data Direction register ------------------ */ | ||
| 33 | #define SDCONF 0x2300 /* SDRAM Configuration register ---------------------*/ | ||
| 34 | #define SDRFPR 0x2340 /* SDRAM Refresh period register --------------------*/ | ||
| 35 | |||
| 36 | #define SDCONF_ACTIVE (1 << 10) | ||
| 37 | #define SDCONF_CLKCTL (1 << 9) | ||
| 38 | #define SDCONF_WIDTH_4 (0 << 7) | ||
| 39 | #define SDCONF_WIDTH_8 (1 << 7) | ||
| 40 | #define SDCONF_WIDTH_16 (2 << 7) | ||
| 41 | #define SDCONF_WIDTH_32 (3 << 7) | ||
| 42 | #define SDCONF_SIZE_16 (0 << 5) | ||
| 43 | #define SDCONF_SIZE_64 (1 << 5) | ||
| 44 | #define SDCONF_SIZE_128 (2 << 5) | ||
| 45 | #define SDCONF_SIZE_256 (3 << 5) | ||
| 46 | #define SDCONF_CASLAT_2 (2) | ||
| 47 | #define SDCONF_CASLAT_3 (3) | ||
| 48 | |||
| 49 | #endif /* __ASM_HARDWARE_CS89712_H */ | ||
diff --git a/arch/arm/include/asm/hardware/entry-macro-gic.S b/arch/arm/include/asm/hardware/entry-macro-gic.S new file mode 100644 index 00000000000..c115b82fe80 --- /dev/null +++ b/arch/arm/include/asm/hardware/entry-macro-gic.S | |||
| @@ -0,0 +1,75 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/include/asm/hardware/entry-macro-gic.S | ||
| 3 | * | ||
| 4 | * Low-level IRQ helper macros for GIC | ||
| 5 | * | ||
| 6 | * This file is licensed under the terms of the GNU General Public | ||
| 7 | * License version 2. This program is licensed "as is" without any | ||
| 8 | * warranty of any kind, whether express or implied. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #include <asm/hardware/gic.h> | ||
| 12 | |||
| 13 | #ifndef HAVE_GET_IRQNR_PREAMBLE | ||
| 14 | .macro get_irqnr_preamble, base, tmp | ||
| 15 | ldr \base, =gic_cpu_base_addr | ||
| 16 | ldr \base, [\base] | ||
| 17 | .endm | ||
| 18 | #endif | ||
| 19 | |||
| 20 | /* | ||
| 21 | * The interrupt numbering scheme is defined in the | ||
| 22 | * interrupt controller spec. To wit: | ||
| 23 | * | ||
| 24 | * Interrupts 0-15 are IPI | ||
| 25 | * 16-28 are reserved | ||
| 26 | * 29-31 are local. We allow 30 to be used for the watchdog. | ||
| 27 | * 32-1020 are global | ||
| 28 | * 1021-1022 are reserved | ||
| 29 | * 1023 is "spurious" (no interrupt) | ||
| 30 | * | ||
| 31 | * For now, we ignore all local interrupts so only return an interrupt if it's | ||
| 32 | * between 30 and 1020. The test_for_ipi routine below will pick up on IPIs. | ||
| 33 | * | ||
| 34 | * A simple read from the controller will tell us the number of the highest | ||
| 35 | * priority enabled interrupt. We then just need to check whether it is in the | ||
| 36 | * valid range for an IRQ (30-1020 inclusive). | ||
| 37 | */ | ||
| 38 | |||
| 39 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
| 40 | |||
| 41 | ldr \irqstat, [\base, #GIC_CPU_INTACK] | ||
| 42 | /* bits 12-10 = src CPU, 9-0 = int # */ | ||
| 43 | |||
| 44 | ldr \tmp, =1021 | ||
| 45 | bic \irqnr, \irqstat, #0x1c00 | ||
| 46 | cmp \irqnr, #29 | ||
| 47 | cmpcc \irqnr, \irqnr | ||
| 48 | cmpne \irqnr, \tmp | ||
| 49 | cmpcs \irqnr, \irqnr | ||
| 50 | .endm | ||
| 51 | |||
| 52 | /* We assume that irqstat (the raw value of the IRQ acknowledge | ||
| 53 | * register) is preserved from the macro above. | ||
| 54 | * If there is an IPI, we immediately signal end of interrupt on the | ||
| 55 | * controller, since this requires the original irqstat value which | ||
| 56 | * we won't easily be able to recreate later. | ||
| 57 | */ | ||
| 58 | |||
| 59 | .macro test_for_ipi, irqnr, irqstat, base, tmp | ||
| 60 | bic \irqnr, \irqstat, #0x1c00 | ||
| 61 | cmp \irqnr, #16 | ||
| 62 | strcc \irqstat, [\base, #GIC_CPU_EOI] | ||
| 63 | cmpcs \irqnr, \irqnr | ||
| 64 | .endm | ||
| 65 | |||
| 66 | /* As above, this assumes that irqstat and base are preserved.. */ | ||
| 67 | |||
| 68 | .macro test_for_ltirq, irqnr, irqstat, base, tmp | ||
| 69 | bic \irqnr, \irqstat, #0x1c00 | ||
| 70 | mov \tmp, #0 | ||
| 71 | cmp \irqnr, #29 | ||
| 72 | moveq \tmp, #1 | ||
| 73 | streq \irqstat, [\base, #GIC_CPU_EOI] | ||
| 74 | cmp \tmp, #0 | ||
| 75 | .endm | ||
diff --git a/arch/arm/include/asm/hardware/ep7211.h b/arch/arm/include/asm/hardware/ep7211.h new file mode 100644 index 00000000000..654d5f625c4 --- /dev/null +++ b/arch/arm/include/asm/hardware/ep7211.h | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/include/asm/hardware/ep7211.h | ||
| 3 | * | ||
| 4 | * This file contains the hardware definitions of the EP7211 internal | ||
| 5 | * registers. | ||
| 6 | * | ||
| 7 | * Copyright (C) 2001 Blue Mug, Inc. All Rights Reserved. | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License as published by | ||
| 11 | * the Free Software Foundation; either version 2 of the License, or | ||
| 12 | * (at your option) any later version. | ||
| 13 | * | ||
| 14 | * This program is distributed in the hope that it will be useful, | ||
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | * GNU General Public License for more details. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License | ||
| 20 | * along with this program; if not, write to the Free Software | ||
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 22 | */ | ||
| 23 | #ifndef __ASM_HARDWARE_EP7211_H | ||
| 24 | #define __ASM_HARDWARE_EP7211_H | ||
| 25 | |||
| 26 | #include <asm/hardware/clps7111.h> | ||
| 27 | |||
| 28 | /* | ||
| 29 | * define EP7211_BASE to be the base address of the region | ||
| 30 | * you want to access. | ||
| 31 | */ | ||
| 32 | |||
| 33 | #define EP7211_PHYS_BASE (0x80000000) | ||
| 34 | |||
| 35 | /* | ||
| 36 | * XXX miket@bluemug.com: need to introduce EP7211 registers (those not | ||
| 37 | * present in 7212) here. | ||
| 38 | */ | ||
| 39 | |||
| 40 | #endif /* __ASM_HARDWARE_EP7211_H */ | ||
diff --git a/arch/arm/include/asm/hardware/ep7212.h b/arch/arm/include/asm/hardware/ep7212.h new file mode 100644 index 00000000000..3b43bbeaf1d --- /dev/null +++ b/arch/arm/include/asm/hardware/ep7212.h | |||
| @@ -0,0 +1,83 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/include/asm/hardware/ep7212.h | ||
| 3 | * | ||
| 4 | * This file contains the hardware definitions of the EP7212 internal | ||
| 5 | * registers. | ||
| 6 | * | ||
| 7 | * Copyright (C) 2000 Deep Blue Solutions Ltd. | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License as published by | ||
| 11 | * the Free Software Foundation; either version 2 of the License, or | ||
| 12 | * (at your option) any later version. | ||
| 13 | * | ||
| 14 | * This program is distributed in the hope that it will be useful, | ||
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | * GNU General Public License for more details. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License | ||
| 20 | * along with this program; if not, write to the Free Software | ||
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 22 | */ | ||
| 23 | #ifndef __ASM_HARDWARE_EP7212_H | ||
| 24 | #define __ASM_HARDWARE_EP7212_H | ||
| 25 | |||
| 26 | /* | ||
| 27 | * define EP7212_BASE to be the base address of the region | ||
| 28 | * you want to access. | ||
| 29 | */ | ||
| 30 | |||
| 31 | #define EP7212_PHYS_BASE (0x80000000) | ||
| 32 | |||
| 33 | #ifndef __ASSEMBLY__ | ||
| 34 | #define ep_readl(off) __raw_readl(EP7212_BASE + (off)) | ||
| 35 | #define ep_writel(val,off) __raw_writel(val, EP7212_BASE + (off)) | ||
| 36 | #endif | ||
| 37 | |||
| 38 | /* | ||
| 39 | * These registers are specific to the EP7212 only | ||
| 40 | */ | ||
| 41 | #define DAIR 0x2000 | ||
| 42 | #define DAIR0 0x2040 | ||
| 43 | #define DAIDR1 0x2080 | ||
| 44 | #define DAIDR2 0x20c0 | ||
| 45 | #define DAISR 0x2100 | ||
| 46 | #define SYSCON3 0x2200 | ||
| 47 | #define INTSR3 0x2240 | ||
| 48 | #define INTMR3 0x2280 | ||
| 49 | #define LEDFLSH 0x22c0 | ||
| 50 | |||
| 51 | #define DAIR_DAIEN (1 << 16) | ||
| 52 | #define DAIR_ECS (1 << 17) | ||
| 53 | #define DAIR_LCTM (1 << 19) | ||
| 54 | #define DAIR_LCRM (1 << 20) | ||
| 55 | #define DAIR_RCTM (1 << 21) | ||
| 56 | #define DAIR_RCRM (1 << 22) | ||
| 57 | #define DAIR_LBM (1 << 23) | ||
| 58 | |||
| 59 | #define DAIDR2_FIFOEN (1 << 15) | ||
| 60 | #define DAIDR2_FIFOLEFT (0x0d << 16) | ||
| 61 | #define DAIDR2_FIFORIGHT (0x11 << 16) | ||
| 62 | |||
| 63 | #define DAISR_RCTS (1 << 0) | ||
| 64 | #define DAISR_RCRS (1 << 1) | ||
| 65 | #define DAISR_LCTS (1 << 2) | ||
| 66 | #define DAISR_LCRS (1 << 3) | ||
| 67 | #define DAISR_RCTU (1 << 4) | ||
| 68 | #define DAISR_RCRO (1 << 5) | ||
| 69 | #define DAISR_LCTU (1 << 6) | ||
| 70 | #define DAISR_LCRO (1 << 7) | ||
| 71 | #define DAISR_RCNF (1 << 8) | ||
| 72 | #define DAISR_RCNE (1 << 9) | ||
| 73 | #define DAISR_LCNF (1 << 10) | ||
| 74 | #define DAISR_LCNE (1 << 11) | ||
| 75 | #define DAISR_FIFO (1 << 12) | ||
| 76 | |||
| 77 | #define SYSCON3_ADCCON (1 << 0) | ||
| 78 | #define SYSCON3_DAISEL (1 << 3) | ||
| 79 | #define SYSCON3_ADCCKNSEN (1 << 4) | ||
| 80 | #define SYSCON3_FASTWAKE (1 << 8) | ||
| 81 | #define SYSCON3_DAIEN (1 << 9) | ||
| 82 | |||
| 83 | #endif /* __ASM_HARDWARE_EP7212_H */ | ||
diff --git a/arch/arm/include/asm/hardware/linkup-l1110.h b/arch/arm/include/asm/hardware/linkup-l1110.h new file mode 100644 index 00000000000..7ec91168a57 --- /dev/null +++ b/arch/arm/include/asm/hardware/linkup-l1110.h | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | /* | ||
| 2 | * | ||
| 3 | * Definitions for H3600 Handheld Computer | ||
| 4 | * | ||
| 5 | * Copyright 2001 Compaq Computer Corporation. | ||
| 6 | * | ||
| 7 | * Use consistent with the GNU GPL is permitted, | ||
| 8 | * provided that this copyright notice is | ||
| 9 | * preserved in its entirety in all copies and derived works. | ||
| 10 | * | ||
| 11 | * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED, | ||
| 12 | * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS | ||
| 13 | * FITNESS FOR ANY PARTICULAR PURPOSE. | ||
| 14 | * | ||
| 15 | * Author: Jamey Hicks. | ||
| 16 | * | ||
| 17 | */ | ||
| 18 | |||
| 19 | /* LinkUp Systems PCCard/CompactFlash Interface for SA-1100 */ | ||
| 20 | |||
| 21 | /* PC Card Status Register */ | ||
| 22 | #define LINKUP_PRS_S1 (1 << 0) /* voltage control bits S1-S4 */ | ||
| 23 | #define LINKUP_PRS_S2 (1 << 1) | ||
| 24 | #define LINKUP_PRS_S3 (1 << 2) | ||
| 25 | #define LINKUP_PRS_S4 (1 << 3) | ||
| 26 | #define LINKUP_PRS_BVD1 (1 << 4) | ||
| 27 | #define LINKUP_PRS_BVD2 (1 << 5) | ||
| 28 | #define LINKUP_PRS_VS1 (1 << 6) | ||
| 29 | #define LINKUP_PRS_VS2 (1 << 7) | ||
| 30 | #define LINKUP_PRS_RDY (1 << 8) | ||
| 31 | #define LINKUP_PRS_CD1 (1 << 9) | ||
| 32 | #define LINKUP_PRS_CD2 (1 << 10) | ||
| 33 | |||
| 34 | /* PC Card Command Register */ | ||
| 35 | #define LINKUP_PRC_S1 (1 << 0) | ||
| 36 | #define LINKUP_PRC_S2 (1 << 1) | ||
| 37 | #define LINKUP_PRC_S3 (1 << 2) | ||
| 38 | #define LINKUP_PRC_S4 (1 << 3) | ||
| 39 | #define LINKUP_PRC_RESET (1 << 4) | ||
| 40 | #define LINKUP_PRC_APOE (1 << 5) /* Auto Power Off Enable: clears S1-S4 when either nCD goes high */ | ||
| 41 | #define LINKUP_PRC_CFE (1 << 6) /* CompactFlash mode Enable: addresses A[10:0] only, A[25:11] high */ | ||
| 42 | #define LINKUP_PRC_SOE (1 << 7) /* signal output driver enable */ | ||
| 43 | #define LINKUP_PRC_SSP (1 << 8) /* sock select polarity: 0 for socket 0, 1 for socket 1 */ | ||
| 44 | #define LINKUP_PRC_MBZ (1 << 15) /* must be zero */ | ||
| 45 | |||
| 46 | struct linkup_l1110 { | ||
| 47 | volatile short prc; | ||
| 48 | }; | ||
diff --git a/arch/arm/include/asm/hardware/pl330.h b/arch/arm/include/asm/hardware/pl330.h new file mode 100644 index 00000000000..575fa8186ca --- /dev/null +++ b/arch/arm/include/asm/hardware/pl330.h | |||
| @@ -0,0 +1,217 @@ | |||
| 1 | /* linux/include/asm/hardware/pl330.h | ||
| 2 | * | ||
| 3 | * Copyright (C) 2010 Samsung Electronics Co. Ltd. | ||
| 4 | * Jaswinder Singh <jassi.brar@samsung.com> | ||
| 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., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef __PL330_CORE_H | ||
| 22 | #define __PL330_CORE_H | ||
| 23 | |||
| 24 | #define PL330_MAX_CHAN 8 | ||
| 25 | #define PL330_MAX_IRQS 32 | ||
| 26 | #define PL330_MAX_PERI 32 | ||
| 27 | |||
| 28 | enum pl330_srccachectrl { | ||
| 29 | SCCTRL0 = 0, /* Noncacheable and nonbufferable */ | ||
| 30 | SCCTRL1, /* Bufferable only */ | ||
| 31 | SCCTRL2, /* Cacheable, but do not allocate */ | ||
| 32 | SCCTRL3, /* Cacheable and bufferable, but do not allocate */ | ||
| 33 | SINVALID1, | ||
| 34 | SINVALID2, | ||
| 35 | SCCTRL6, /* Cacheable write-through, allocate on reads only */ | ||
| 36 | SCCTRL7, /* Cacheable write-back, allocate on reads only */ | ||
| 37 | }; | ||
| 38 | |||
| 39 | enum pl330_dstcachectrl { | ||
| 40 | DCCTRL0 = 0, /* Noncacheable and nonbufferable */ | ||
| 41 | DCCTRL1, /* Bufferable only */ | ||
| 42 | DCCTRL2, /* Cacheable, but do not allocate */ | ||
| 43 | DCCTRL3, /* Cacheable and bufferable, but do not allocate */ | ||
| 44 | DINVALID1 = 8, | ||
| 45 | DINVALID2, | ||
| 46 | DCCTRL6, /* Cacheable write-through, allocate on writes only */ | ||
| 47 | DCCTRL7, /* Cacheable write-back, allocate on writes only */ | ||
| 48 | }; | ||
| 49 | |||
| 50 | /* Populated by the PL330 core driver for DMA API driver's info */ | ||
| 51 | struct pl330_config { | ||
| 52 | u32 periph_id; | ||
| 53 | u32 pcell_id; | ||
| 54 | #define DMAC_MODE_NS (1 << 0) | ||
| 55 | unsigned int mode; | ||
| 56 | unsigned int data_bus_width:10; /* In number of bits */ | ||
| 57 | unsigned int data_buf_dep:10; | ||
| 58 | unsigned int num_chan:4; | ||
| 59 | unsigned int num_peri:6; | ||
| 60 | u32 peri_ns; | ||
| 61 | unsigned int num_events:6; | ||
| 62 | u32 irq_ns; | ||
| 63 | }; | ||
| 64 | |||
| 65 | /* Handle to the DMAC provided to the PL330 core */ | ||
| 66 | struct pl330_info { | ||
| 67 | /* Owning device */ | ||
| 68 | struct device *dev; | ||
| 69 | /* Size of MicroCode buffers for each channel. */ | ||
| 70 | unsigned mcbufsz; | ||
| 71 | /* ioremap'ed address of PL330 registers. */ | ||
| 72 | void __iomem *base; | ||
| 73 | /* Client can freely use it. */ | ||
| 74 | void *client_data; | ||
| 75 | /* PL330 core data, Client must not touch it. */ | ||
| 76 | void *pl330_data; | ||
| 77 | /* Populated by the PL330 core driver during pl330_add */ | ||
| 78 | struct pl330_config pcfg; | ||
| 79 | /* | ||
| 80 | * If the DMAC has some reset mechanism, then the | ||
| 81 | * client may want to provide pointer to the method. | ||
| 82 | */ | ||
| 83 | void (*dmac_reset)(struct pl330_info *pi); | ||
| 84 | }; | ||
| 85 | |||
| 86 | enum pl330_byteswap { | ||
| 87 | SWAP_NO = 0, | ||
| 88 | SWAP_2, | ||
| 89 | SWAP_4, | ||
| 90 | SWAP_8, | ||
| 91 | SWAP_16, | ||
| 92 | }; | ||
| 93 | |||
| 94 | /** | ||
| 95 | * Request Configuration. | ||
| 96 | * The PL330 core does not modify this and uses the last | ||
| 97 | * working configuration if the request doesn't provide any. | ||
| 98 | * | ||
| 99 | * The Client may want to provide this info only for the | ||
| 100 | * first request and a request with new settings. | ||
| 101 | */ | ||
| 102 | struct pl330_reqcfg { | ||
| 103 | /* Address Incrementing */ | ||
| 104 | unsigned dst_inc:1; | ||
| 105 | unsigned src_inc:1; | ||
| 106 | |||
| 107 | /* | ||
| 108 | * For now, the SRC & DST protection levels | ||
| 109 | * and burst size/length are assumed same. | ||
| 110 | */ | ||
| 111 | bool nonsecure; | ||
| 112 | bool privileged; | ||
| 113 | bool insnaccess; | ||
| 114 | unsigned brst_len:5; | ||
| 115 | unsigned brst_size:3; /* in power of 2 */ | ||
| 116 | |||
| 117 | enum pl330_dstcachectrl dcctl; | ||
| 118 | enum pl330_srccachectrl scctl; | ||
| 119 | enum pl330_byteswap swap; | ||
| 120 | }; | ||
| 121 | |||
| 122 | /* | ||
| 123 | * One cycle of DMAC operation. | ||
| 124 | * There may be more than one xfer in a request. | ||
| 125 | */ | ||
| 126 | struct pl330_xfer { | ||
| 127 | u32 src_addr; | ||
| 128 | u32 dst_addr; | ||
| 129 | /* Size to xfer */ | ||
| 130 | u32 bytes; | ||
| 131 | /* | ||
| 132 | * Pointer to next xfer in the list. | ||
| 133 | * The last xfer in the req must point to NULL. | ||
| 134 | */ | ||
| 135 | struct pl330_xfer *next; | ||
| 136 | }; | ||
| 137 | |||
| 138 | /* The xfer callbacks are made with one of these arguments. */ | ||
| 139 | enum pl330_op_err { | ||
| 140 | /* The all xfers in the request were success. */ | ||
| 141 | PL330_ERR_NONE, | ||
| 142 | /* If req aborted due to global error. */ | ||
| 143 | PL330_ERR_ABORT, | ||
| 144 | /* If req failed due to problem with Channel. */ | ||
| 145 | PL330_ERR_FAIL, | ||
| 146 | }; | ||
| 147 | |||
| 148 | enum pl330_reqtype { | ||
| 149 | MEMTOMEM, | ||
| 150 | MEMTODEV, | ||
| 151 | DEVTOMEM, | ||
| 152 | DEVTODEV, | ||
| 153 | }; | ||
| 154 | |||
| 155 | /* A request defining Scatter-Gather List ending with NULL xfer. */ | ||
| 156 | struct pl330_req { | ||
| 157 | enum pl330_reqtype rqtype; | ||
| 158 | /* Index of peripheral for the xfer. */ | ||
| 159 | unsigned peri:5; | ||
| 160 | /* Unique token for this xfer, set by the client. */ | ||
| 161 | void *token; | ||
| 162 | /* Callback to be called after xfer. */ | ||
| 163 | void (*xfer_cb)(void *token, enum pl330_op_err err); | ||
| 164 | /* If NULL, req will be done at last set parameters. */ | ||
| 165 | struct pl330_reqcfg *cfg; | ||
| 166 | /* Pointer to first xfer in the request. */ | ||
| 167 | struct pl330_xfer *x; | ||
| 168 | }; | ||
| 169 | |||
| 170 | /* | ||
| 171 | * To know the status of the channel and DMAC, the client | ||
| 172 | * provides a pointer to this structure. The PL330 core | ||
| 173 | * fills it with current information. | ||
| 174 | */ | ||
| 175 | struct pl330_chanstatus { | ||
| 176 | /* | ||
| 177 | * If the DMAC engine halted due to some error, | ||
| 178 | * the client should remove-add DMAC. | ||
| 179 | */ | ||
| 180 | bool dmac_halted; | ||
| 181 | /* | ||
| 182 | * If channel is halted due to some error, | ||
| 183 | * the client should ABORT/FLUSH and START the channel. | ||
| 184 | */ | ||
| 185 | bool faulting; | ||
| 186 | /* Location of last load */ | ||
| 187 | u32 src_addr; | ||
| 188 | /* Location of last store */ | ||
| 189 | u32 dst_addr; | ||
| 190 | /* | ||
| 191 | * Pointer to the currently active req, NULL if channel is | ||
| 192 | * inactive, even though the requests may be present. | ||
| 193 | */ | ||
| 194 | struct pl330_req *top_req; | ||
| 195 | /* Pointer to req waiting second in the queue if any. */ | ||
| 196 | struct pl330_req *wait_req; | ||
| 197 | }; | ||
| 198 | |||
| 199 | enum pl330_chan_op { | ||
| 200 | /* Start the channel */ | ||
| 201 | PL330_OP_START, | ||
| 202 | /* Abort the active xfer */ | ||
| 203 | PL330_OP_ABORT, | ||
| 204 | /* Stop xfer and flush queue */ | ||
| 205 | PL330_OP_FLUSH, | ||
| 206 | }; | ||
| 207 | |||
| 208 | extern int pl330_add(struct pl330_info *); | ||
| 209 | extern void pl330_del(struct pl330_info *pi); | ||
| 210 | extern int pl330_update(const struct pl330_info *pi); | ||
| 211 | extern void pl330_release_channel(void *ch_id); | ||
| 212 | extern void *pl330_request_channel(const struct pl330_info *pi); | ||
| 213 | extern int pl330_chan_status(void *ch_id, struct pl330_chanstatus *pstatus); | ||
| 214 | extern int pl330_chan_ctrl(void *ch_id, enum pl330_chan_op op); | ||
| 215 | extern int pl330_submit_req(void *ch_id, struct pl330_req *r); | ||
| 216 | |||
| 217 | #endif /* __PL330_CORE_H */ | ||
diff --git a/arch/arm/include/asm/hardware/uengine.h b/arch/arm/include/asm/hardware/uengine.h new file mode 100644 index 00000000000..b442d65c659 --- /dev/null +++ b/arch/arm/include/asm/hardware/uengine.h | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | /* | ||
| 2 | * Generic library functions for the microengines found on the Intel | ||
| 3 | * IXP2000 series of network processors. | ||
| 4 | * | ||
| 5 | * Copyright (C) 2004, 2005 Lennert Buytenhek <buytenh@wantstofly.org> | ||
| 6 | * Dedicated to Marija Kulikova. | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU Lesser General Public License as | ||
| 10 | * published by the Free Software Foundation; either version 2.1 of the | ||
| 11 | * License, or (at your option) any later version. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef __IXP2000_UENGINE_H | ||
| 15 | #define __IXP2000_UENGINE_H | ||
| 16 | |||
| 17 | extern u32 ixp2000_uengine_mask; | ||
| 18 | |||
| 19 | struct ixp2000_uengine_code | ||
| 20 | { | ||
| 21 | u32 cpu_model_bitmask; | ||
| 22 | u8 cpu_min_revision; | ||
| 23 | u8 cpu_max_revision; | ||
| 24 | |||
| 25 | u32 uengine_parameters; | ||
| 26 | |||
| 27 | struct ixp2000_reg_value { | ||
| 28 | int reg; | ||
| 29 | u32 value; | ||
| 30 | } *initial_reg_values; | ||
| 31 | |||
| 32 | int num_insns; | ||
| 33 | u8 *insns; | ||
| 34 | }; | ||
| 35 | |||
| 36 | u32 ixp2000_uengine_csr_read(int uengine, int offset); | ||
| 37 | void ixp2000_uengine_csr_write(int uengine, int offset, u32 value); | ||
| 38 | void ixp2000_uengine_reset(u32 uengine_mask); | ||
| 39 | void ixp2000_uengine_set_mode(int uengine, u32 mode); | ||
| 40 | void ixp2000_uengine_load_microcode(int uengine, u8 *ucode, int insns); | ||
| 41 | void ixp2000_uengine_init_context(int uengine, int context, int pc); | ||
| 42 | void ixp2000_uengine_start_contexts(int uengine, u8 ctx_mask); | ||
| 43 | void ixp2000_uengine_stop_contexts(int uengine, u8 ctx_mask); | ||
| 44 | int ixp2000_uengine_load(int uengine, struct ixp2000_uengine_code *c); | ||
| 45 | |||
| 46 | #define IXP2000_UENGINE_8_CONTEXTS 0x00000000 | ||
| 47 | #define IXP2000_UENGINE_4_CONTEXTS 0x80000000 | ||
| 48 | #define IXP2000_UENGINE_PRN_UPDATE_EVERY 0x40000000 | ||
| 49 | #define IXP2000_UENGINE_PRN_UPDATE_ON_ACCESS 0x00000000 | ||
| 50 | #define IXP2000_UENGINE_NN_FROM_SELF 0x00100000 | ||
| 51 | #define IXP2000_UENGINE_NN_FROM_PREVIOUS 0x00000000 | ||
| 52 | #define IXP2000_UENGINE_ASSERT_EMPTY_AT_3 0x000c0000 | ||
| 53 | #define IXP2000_UENGINE_ASSERT_EMPTY_AT_2 0x00080000 | ||
| 54 | #define IXP2000_UENGINE_ASSERT_EMPTY_AT_1 0x00040000 | ||
| 55 | #define IXP2000_UENGINE_ASSERT_EMPTY_AT_0 0x00000000 | ||
| 56 | #define IXP2000_UENGINE_LM_ADDR1_GLOBAL 0x00020000 | ||
| 57 | #define IXP2000_UENGINE_LM_ADDR1_PER_CONTEXT 0x00000000 | ||
| 58 | #define IXP2000_UENGINE_LM_ADDR0_GLOBAL 0x00010000 | ||
| 59 | #define IXP2000_UENGINE_LM_ADDR0_PER_CONTEXT 0x00000000 | ||
| 60 | |||
| 61 | |||
| 62 | #endif | ||
diff --git a/arch/arm/include/asm/ioctl.h b/arch/arm/include/asm/ioctl.h new file mode 100644 index 00000000000..b279fe06dfe --- /dev/null +++ b/arch/arm/include/asm/ioctl.h | |||
| @@ -0,0 +1 @@ | |||
| #include <asm-generic/ioctl.h> | |||
diff --git a/arch/arm/include/asm/ioctls.h b/arch/arm/include/asm/ioctls.h new file mode 100644 index 00000000000..9c962981612 --- /dev/null +++ b/arch/arm/include/asm/ioctls.h | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | #ifndef __ASM_ARM_IOCTLS_H | ||
| 2 | #define __ASM_ARM_IOCTLS_H | ||
| 3 | |||
| 4 | #define FIOQSIZE 0x545E | ||
| 5 | |||
| 6 | #include <asm-generic/ioctls.h> | ||
| 7 | |||
| 8 | #endif | ||
diff --git a/arch/arm/include/asm/ipcbuf.h b/arch/arm/include/asm/ipcbuf.h new file mode 100644 index 00000000000..97683975f7d --- /dev/null +++ b/arch/arm/include/asm/ipcbuf.h | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | #ifndef __ASMARM_IPCBUF_H | ||
| 2 | #define __ASMARM_IPCBUF_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * The ipc64_perm structure for arm architecture. | ||
| 6 | * Note extra padding because this structure is passed back and forth | ||
| 7 | * between kernel and user space. | ||
| 8 | * | ||
| 9 | * Pad space is left for: | ||
| 10 | * - 32-bit mode_t and seq | ||
| 11 | * - 2 miscellaneous 32-bit values | ||
| 12 | */ | ||
| 13 | |||
| 14 | struct ipc64_perm | ||
| 15 | { | ||
| 16 | __kernel_key_t key; | ||
| 17 | __kernel_uid32_t uid; | ||
| 18 | __kernel_gid32_t gid; | ||
| 19 | __kernel_uid32_t cuid; | ||
| 20 | __kernel_gid32_t cgid; | ||
| 21 | __kernel_mode_t mode; | ||
| 22 | unsigned short __pad1; | ||
| 23 | unsigned short seq; | ||
| 24 | unsigned short __pad2; | ||
| 25 | unsigned long __unused1; | ||
| 26 | unsigned long __unused2; | ||
| 27 | }; | ||
| 28 | |||
| 29 | #endif /* __ASMARM_IPCBUF_H */ | ||
diff --git a/arch/arm/include/asm/irq_regs.h b/arch/arm/include/asm/irq_regs.h new file mode 100644 index 00000000000..3dd9c0b7027 --- /dev/null +++ b/arch/arm/include/asm/irq_regs.h | |||
| @@ -0,0 +1 @@ | |||
| #include <asm-generic/irq_regs.h> | |||
diff --git a/arch/arm/include/asm/kdebug.h b/arch/arm/include/asm/kdebug.h new file mode 100644 index 00000000000..6ece1b03766 --- /dev/null +++ b/arch/arm/include/asm/kdebug.h | |||
| @@ -0,0 +1 @@ | |||
| #include <asm-generic/kdebug.h> | |||
diff --git a/arch/arm/include/asm/leds.h b/arch/arm/include/asm/leds.h new file mode 100644 index 00000000000..c545739f39b --- /dev/null +++ b/arch/arm/include/asm/leds.h | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/include/asm/leds.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 1998 Russell King | ||
| 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 version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * Event-driven interface for LEDs on machines | ||
| 11 | * Added led_start and led_stop- Alex Holden, 28th Dec 1998. | ||
| 12 | */ | ||
| 13 | #ifndef ASM_ARM_LEDS_H | ||
| 14 | #define ASM_ARM_LEDS_H | ||
| 15 | |||
| 16 | |||
| 17 | typedef enum { | ||
| 18 | led_idle_start, | ||
| 19 | led_idle_end, | ||
| 20 | led_timer, | ||
| 21 | led_start, | ||
| 22 | led_stop, | ||
| 23 | led_claim, /* override idle & timer leds */ | ||
| 24 | led_release, /* restore idle & timer leds */ | ||
| 25 | led_start_timer_mode, | ||
| 26 | led_stop_timer_mode, | ||
| 27 | led_green_on, | ||
| 28 | led_green_off, | ||
| 29 | led_amber_on, | ||
| 30 | led_amber_off, | ||
| 31 | led_red_on, | ||
| 32 | led_red_off, | ||
| 33 | led_blue_on, | ||
| 34 | led_blue_off, | ||
| 35 | /* | ||
| 36 | * I want this between led_timer and led_start, but | ||
| 37 | * someone has decided to export this to user space | ||
| 38 | */ | ||
| 39 | led_halted | ||
| 40 | } led_event_t; | ||
| 41 | |||
| 42 | /* Use this routine to handle LEDs */ | ||
| 43 | |||
| 44 | #ifdef CONFIG_LEDS | ||
| 45 | extern void (*leds_event)(led_event_t); | ||
| 46 | #else | ||
| 47 | #define leds_event(e) | ||
| 48 | #endif | ||
| 49 | |||
| 50 | #endif | ||
diff --git a/arch/arm/include/asm/local.h b/arch/arm/include/asm/local.h new file mode 100644 index 00000000000..c11c530f74d --- /dev/null +++ b/arch/arm/include/asm/local.h | |||
| @@ -0,0 +1 @@ | |||
| #include <asm-generic/local.h> | |||
diff --git a/arch/arm/include/asm/local64.h b/arch/arm/include/asm/local64.h new file mode 100644 index 00000000000..36c93b5cc23 --- /dev/null +++ b/arch/arm/include/asm/local64.h | |||
| @@ -0,0 +1 @@ | |||
| #include <asm-generic/local64.h> | |||
diff --git a/arch/arm/include/asm/locks.h b/arch/arm/include/asm/locks.h new file mode 100644 index 00000000000..ef4c897772d --- /dev/null +++ b/arch/arm/include/asm/locks.h | |||
| @@ -0,0 +1,274 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/include/asm/locks.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2000 Russell King | ||
| 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 version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * Interrupt safe locking assembler. | ||
| 11 | */ | ||
| 12 | #ifndef __ASM_PROC_LOCKS_H | ||
| 13 | #define __ASM_PROC_LOCKS_H | ||
| 14 | |||
| 15 | #if __LINUX_ARM_ARCH__ >= 6 | ||
| 16 | |||
| 17 | #define __down_op(ptr,fail) \ | ||
| 18 | ({ \ | ||
| 19 | __asm__ __volatile__( \ | ||
| 20 | "@ down_op\n" \ | ||
| 21 | "1: ldrex lr, [%0]\n" \ | ||
| 22 | " sub lr, lr, %1\n" \ | ||
| 23 | " strex ip, lr, [%0]\n" \ | ||
| 24 | " teq ip, #0\n" \ | ||
| 25 | " bne 1b\n" \ | ||
| 26 | " teq lr, #0\n" \ | ||
| 27 | " movmi ip, %0\n" \ | ||
| 28 | " blmi " #fail \ | ||
| 29 | : \ | ||
| 30 | : "r" (ptr), "I" (1) \ | ||
| 31 | : "ip", "lr", "cc"); \ | ||
| 32 | smp_mb(); \ | ||
| 33 | }) | ||
| 34 | |||
| 35 | #define __down_op_ret(ptr,fail) \ | ||
| 36 | ({ \ | ||
| 37 | unsigned int ret; \ | ||
| 38 | __asm__ __volatile__( \ | ||
| 39 | "@ down_op_ret\n" \ | ||
| 40 | "1: ldrex lr, [%1]\n" \ | ||
| 41 | " sub lr, lr, %2\n" \ | ||
| 42 | " strex ip, lr, [%1]\n" \ | ||
| 43 | " teq ip, #0\n" \ | ||
| 44 | " bne 1b\n" \ | ||
| 45 | " teq lr, #0\n" \ | ||
| 46 | " movmi ip, %1\n" \ | ||
| 47 | " movpl ip, #0\n" \ | ||
| 48 | " blmi " #fail "\n" \ | ||
| 49 | " mov %0, ip" \ | ||
| 50 | : "=&r" (ret) \ | ||
| 51 | : "r" (ptr), "I" (1) \ | ||
| 52 | : "ip", "lr", "cc"); \ | ||
| 53 | smp_mb(); \ | ||
| 54 | ret; \ | ||
| 55 | }) | ||
| 56 | |||
| 57 | #define __up_op(ptr,wake) \ | ||
| 58 | ({ \ | ||
| 59 | smp_mb(); \ | ||
| 60 | __asm__ __volatile__( \ | ||
| 61 | "@ up_op\n" \ | ||
| 62 | "1: ldrex lr, [%0]\n" \ | ||
| 63 | " add lr, lr, %1\n" \ | ||
| 64 | " strex ip, lr, [%0]\n" \ | ||
| 65 | " teq ip, #0\n" \ | ||
| 66 | " bne 1b\n" \ | ||
| 67 | " cmp lr, #0\n" \ | ||
| 68 | " movle ip, %0\n" \ | ||
| 69 | " blle " #wake \ | ||
| 70 | : \ | ||
| 71 | : "r" (ptr), "I" (1) \ | ||
| 72 | : "ip", "lr", "cc"); \ | ||
| 73 | }) | ||
| 74 | |||
| 75 | /* | ||
| 76 | * The value 0x01000000 supports up to 128 processors and | ||
| 77 | * lots of processes. BIAS must be chosen such that sub'ing | ||
| 78 | * BIAS once per CPU will result in the long remaining | ||
| 79 | * negative. | ||
| 80 | */ | ||
| 81 | #define RW_LOCK_BIAS 0x01000000 | ||
| 82 | #define RW_LOCK_BIAS_STR "0x01000000" | ||
| 83 | |||
| 84 | #define __down_op_write(ptr,fail) \ | ||
| 85 | ({ \ | ||
| 86 | __asm__ __volatile__( \ | ||
| 87 | "@ down_op_write\n" \ | ||
| 88 | "1: ldrex lr, [%0]\n" \ | ||
| 89 | " sub lr, lr, %1\n" \ | ||
| 90 | " strex ip, lr, [%0]\n" \ | ||
| 91 | " teq ip, #0\n" \ | ||
| 92 | " bne 1b\n" \ | ||
| 93 | " teq lr, #0\n" \ | ||
| 94 | " movne ip, %0\n" \ | ||
| 95 | " blne " #fail \ | ||
| 96 | : \ | ||
| 97 | : "r" (ptr), "I" (RW_LOCK_BIAS) \ | ||
| 98 | : "ip", "lr", "cc"); \ | ||
| 99 | smp_mb(); \ | ||
| 100 | }) | ||
| 101 | |||
| 102 | #define __up_op_write(ptr,wake) \ | ||
| 103 | ({ \ | ||
| 104 | smp_mb(); \ | ||
| 105 | __asm__ __volatile__( \ | ||
| 106 | "@ up_op_write\n" \ | ||
| 107 | "1: ldrex lr, [%0]\n" \ | ||
| 108 | " adds lr, lr, %1\n" \ | ||
| 109 | " strex ip, lr, [%0]\n" \ | ||
| 110 | " teq ip, #0\n" \ | ||
| 111 | " bne 1b\n" \ | ||
| 112 | " movcs ip, %0\n" \ | ||
| 113 | " blcs " #wake \ | ||
| 114 | : \ | ||
| 115 | : "r" (ptr), "I" (RW_LOCK_BIAS) \ | ||
| 116 | : "ip", "lr", "cc"); \ | ||
| 117 | }) | ||
| 118 | |||
| 119 | #define __down_op_read(ptr,fail) \ | ||
| 120 | __down_op(ptr, fail) | ||
| 121 | |||
| 122 | #define __up_op_read(ptr,wake) \ | ||
| 123 | ({ \ | ||
| 124 | smp_mb(); \ | ||
| 125 | __asm__ __volatile__( \ | ||
| 126 | "@ up_op_read\n" \ | ||
| 127 | "1: ldrex lr, [%0]\n" \ | ||
| 128 | " add lr, lr, %1\n" \ | ||
| 129 | " strex ip, lr, [%0]\n" \ | ||
| 130 | " teq ip, #0\n" \ | ||
| 131 | " bne 1b\n" \ | ||
| 132 | " teq lr, #0\n" \ | ||
| 133 | " moveq ip, %0\n" \ | ||
| 134 | " bleq " #wake \ | ||
| 135 | : \ | ||
| 136 | : "r" (ptr), "I" (1) \ | ||
| 137 | : "ip", "lr", "cc"); \ | ||
| 138 | }) | ||
| 139 | |||
| 140 | #else | ||
| 141 | |||
| 142 | #define __down_op(ptr,fail) \ | ||
| 143 | ({ \ | ||
| 144 | __asm__ __volatile__( \ | ||
| 145 | "@ down_op\n" \ | ||
| 146 | " mrs ip, cpsr\n" \ | ||
| 147 | " orr lr, ip, #128\n" \ | ||
| 148 | " msr cpsr_c, lr\n" \ | ||
| 149 | " ldr lr, [%0]\n" \ | ||
| 150 | " subs lr, lr, %1\n" \ | ||
| 151 | " str lr, [%0]\n" \ | ||
| 152 | " msr cpsr_c, ip\n" \ | ||
| 153 | " movmi ip, %0\n" \ | ||
| 154 | " blmi " #fail \ | ||
| 155 | : \ | ||
| 156 | : "r" (ptr), "I" (1) \ | ||
| 157 | : "ip", "lr", "cc"); \ | ||
| 158 | smp_mb(); \ | ||
| 159 | }) | ||
| 160 | |||
| 161 | #define __down_op_ret(ptr,fail) \ | ||
| 162 | ({ \ | ||
| 163 | unsigned int ret; \ | ||
| 164 | __asm__ __volatile__( \ | ||
| 165 | "@ down_op_ret\n" \ | ||
| 166 | " mrs ip, cpsr\n" \ | ||
| 167 | " orr lr, ip, #128\n" \ | ||
| 168 | " msr cpsr_c, lr\n" \ | ||
| 169 | " ldr lr, [%1]\n" \ | ||
| 170 | " subs lr, lr, %2\n" \ | ||
| 171 | " str lr, [%1]\n" \ | ||
| 172 | " msr cpsr_c, ip\n" \ | ||
| 173 | " movmi ip, %1\n" \ | ||
| 174 | " movpl ip, #0\n" \ | ||
| 175 | " blmi " #fail "\n" \ | ||
| 176 | " mov %0, ip" \ | ||
| 177 | : "=&r" (ret) \ | ||
| 178 | : "r" (ptr), "I" (1) \ | ||
| 179 | : "ip", "lr", "cc"); \ | ||
| 180 | smp_mb(); \ | ||
| 181 | ret; \ | ||
| 182 | }) | ||
| 183 | |||
| 184 | #define __up_op(ptr,wake) \ | ||
| 185 | ({ \ | ||
| 186 | smp_mb(); \ | ||
| 187 | __asm__ __volatile__( \ | ||
| 188 | "@ up_op\n" \ | ||
| 189 | " mrs ip, cpsr\n" \ | ||
| 190 | " orr lr, ip, #128\n" \ | ||
| 191 | " msr cpsr_c, lr\n" \ | ||
| 192 | " ldr lr, [%0]\n" \ | ||
| 193 | " adds lr, lr, %1\n" \ | ||
| 194 | " str lr, [%0]\n" \ | ||
| 195 | " msr cpsr_c, ip\n" \ | ||
| 196 | " movle ip, %0\n" \ | ||
| 197 | " blle " #wake \ | ||
| 198 | : \ | ||
| 199 | : "r" (ptr), "I" (1) \ | ||
| 200 | : "ip", "lr", "cc"); \ | ||
| 201 | }) | ||
| 202 | |||
| 203 | /* | ||
| 204 | * The value 0x01000000 supports up to 128 processors and | ||
| 205 | * lots of processes. BIAS must be chosen such that sub'ing | ||
| 206 | * BIAS once per CPU will result in the long remaining | ||
| 207 | * negative. | ||
| 208 | */ | ||
| 209 | #define RW_LOCK_BIAS 0x01000000 | ||
| 210 | #define RW_LOCK_BIAS_STR "0x01000000" | ||
| 211 | |||
| 212 | #define __down_op_write(ptr,fail) \ | ||
| 213 | ({ \ | ||
| 214 | __asm__ __volatile__( \ | ||
| 215 | "@ down_op_write\n" \ | ||
| 216 | " mrs ip, cpsr\n" \ | ||
| 217 | " orr lr, ip, #128\n" \ | ||
| 218 | " msr cpsr_c, lr\n" \ | ||
| 219 | " ldr lr, [%0]\n" \ | ||
| 220 | " subs lr, lr, %1\n" \ | ||
| 221 | " str lr, [%0]\n" \ | ||
| 222 | " msr cpsr_c, ip\n" \ | ||
| 223 | " movne ip, %0\n" \ | ||
| 224 | " blne " #fail \ | ||
| 225 | : \ | ||
| 226 | : "r" (ptr), "I" (RW_LOCK_BIAS) \ | ||
| 227 | : "ip", "lr", "cc"); \ | ||
| 228 | smp_mb(); \ | ||
| 229 | }) | ||
| 230 | |||
| 231 | #define __up_op_write(ptr,wake) \ | ||
| 232 | ({ \ | ||
| 233 | __asm__ __volatile__( \ | ||
| 234 | "@ up_op_write\n" \ | ||
| 235 | " mrs ip, cpsr\n" \ | ||
| 236 | " orr lr, ip, #128\n" \ | ||
| 237 | " msr cpsr_c, lr\n" \ | ||
| 238 | " ldr lr, [%0]\n" \ | ||
| 239 | " adds lr, lr, %1\n" \ | ||
| 240 | " str lr, [%0]\n" \ | ||
| 241 | " msr cpsr_c, ip\n" \ | ||
| 242 | " movcs ip, %0\n" \ | ||
| 243 | " blcs " #wake \ | ||
| 244 | : \ | ||
| 245 | : "r" (ptr), "I" (RW_LOCK_BIAS) \ | ||
| 246 | : "ip", "lr", "cc"); \ | ||
| 247 | smp_mb(); \ | ||
| 248 | }) | ||
| 249 | |||
| 250 | #define __down_op_read(ptr,fail) \ | ||
| 251 | __down_op(ptr, fail) | ||
| 252 | |||
| 253 | #define __up_op_read(ptr,wake) \ | ||
| 254 | ({ \ | ||
| 255 | smp_mb(); \ | ||
| 256 | __asm__ __volatile__( \ | ||
| 257 | "@ up_op_read\n" \ | ||
| 258 | " mrs ip, cpsr\n" \ | ||
| 259 | " orr lr, ip, #128\n" \ | ||
| 260 | " msr cpsr_c, lr\n" \ | ||
| 261 | " ldr lr, [%0]\n" \ | ||
| 262 | " adds lr, lr, %1\n" \ | ||
| 263 | " str lr, [%0]\n" \ | ||
| 264 | " msr cpsr_c, ip\n" \ | ||
| 265 | " moveq ip, %0\n" \ | ||
| 266 | " bleq " #wake \ | ||
| 267 | : \ | ||
| 268 | : "r" (ptr), "I" (1) \ | ||
| 269 | : "ip", "lr", "cc"); \ | ||
| 270 | }) | ||
| 271 | |||
| 272 | #endif | ||
| 273 | |||
| 274 | #endif | ||
diff --git a/arch/arm/include/asm/mach/mmc.h b/arch/arm/include/asm/mach/mmc.h new file mode 100644 index 00000000000..bca864ac945 --- /dev/null +++ b/arch/arm/include/asm/mach/mmc.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/include/asm/mach/mmc.h | ||
| 3 | */ | ||
| 4 | #ifndef ASMARM_MACH_MMC_H | ||
| 5 | #define ASMARM_MACH_MMC_H | ||
| 6 | |||
| 7 | #include <linux/mmc/host.h> | ||
| 8 | #include <linux/mmc/card.h> | ||
| 9 | #include <linux/mmc/sdio_func.h> | ||
| 10 | |||
| 11 | struct embedded_sdio_data { | ||
| 12 | struct sdio_cis cis; | ||
| 13 | struct sdio_cccr cccr; | ||
| 14 | struct sdio_embedded_func *funcs; | ||
| 15 | int num_funcs; | ||
| 16 | }; | ||
| 17 | |||
| 18 | struct mmc_platform_data { | ||
| 19 | unsigned int ocr_mask; /* available voltages */ | ||
| 20 | int built_in; /* built-in device flag */ | ||
| 21 | int card_present; /* card detect state */ | ||
| 22 | u32 (*translate_vdd)(struct device *, unsigned int); | ||
| 23 | unsigned int (*status)(struct device *); | ||
| 24 | struct embedded_sdio_data *embedded_sdio; | ||
| 25 | int (*register_status_notify)(void (*callback)(int card_present, void *dev_id), void *dev_id); | ||
| 26 | }; | ||
| 27 | |||
| 28 | #endif | ||
diff --git a/arch/arm/include/asm/mach/serial_at91.h b/arch/arm/include/asm/mach/serial_at91.h new file mode 100644 index 00000000000..ea6d063923b --- /dev/null +++ b/arch/arm/include/asm/mach/serial_at91.h | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/include/asm/mach/serial_at91.h | ||
| 3 | * | ||
| 4 | * Based on serial_sa1100.h by Nicolas Pitre | ||
| 5 | * | ||
| 6 | * Copyright (C) 2002 ATMEL Rousset | ||
| 7 | * | ||
| 8 | * Low level machine dependent UART functions. | ||
| 9 | */ | ||
| 10 | |||
| 11 | struct uart_port; | ||
| 12 | |||
| 13 | /* | ||
| 14 | * This is a temporary structure for registering these | ||
| 15 | * functions; it is intended to be discarded after boot. | ||
| 16 | */ | ||
| 17 | struct atmel_port_fns { | ||
| 18 | void (*set_mctrl)(struct uart_port *, u_int); | ||
| 19 | u_int (*get_mctrl)(struct uart_port *); | ||
| 20 | void (*enable_ms)(struct uart_port *); | ||
| 21 | void (*pm)(struct uart_port *, u_int, u_int); | ||
| 22 | int (*set_wake)(struct uart_port *, u_int); | ||
| 23 | int (*open)(struct uart_port *); | ||
| 24 | void (*close)(struct uart_port *); | ||
| 25 | }; | ||
| 26 | |||
| 27 | #if defined(CONFIG_SERIAL_ATMEL) | ||
| 28 | void atmel_register_uart_fns(struct atmel_port_fns *fns); | ||
| 29 | #else | ||
| 30 | #define atmel_register_uart_fns(fns) do { } while (0) | ||
| 31 | #endif | ||
| 32 | |||
| 33 | |||
diff --git a/arch/arm/include/asm/mach/serial_sa1100.h b/arch/arm/include/asm/mach/serial_sa1100.h new file mode 100644 index 00000000000..d09064bf95a --- /dev/null +++ b/arch/arm/include/asm/mach/serial_sa1100.h | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/include/asm/mach/serial_sa1100.h | ||
| 3 | * | ||
| 4 | * Author: Nicolas Pitre | ||
| 5 | * | ||
| 6 | * Moved and changed lots, Russell King | ||
| 7 | * | ||
| 8 | * Low level machine dependent UART functions. | ||
| 9 | */ | ||
| 10 | |||
| 11 | struct uart_port; | ||
| 12 | struct uart_info; | ||
| 13 | |||
| 14 | /* | ||
| 15 | * This is a temporary structure for registering these | ||
| 16 | * functions; it is intended to be discarded after boot. | ||
| 17 | */ | ||
| 18 | struct sa1100_port_fns { | ||
| 19 | void (*set_mctrl)(struct uart_port *, u_int); | ||
| 20 | u_int (*get_mctrl)(struct uart_port *); | ||
| 21 | void (*pm)(struct uart_port *, u_int, u_int); | ||
| 22 | int (*set_wake)(struct uart_port *, u_int); | ||
| 23 | }; | ||
| 24 | |||
| 25 | #ifdef CONFIG_SERIAL_SA1100 | ||
| 26 | void sa1100_register_uart_fns(struct sa1100_port_fns *fns); | ||
| 27 | void sa1100_register_uart(int idx, int port); | ||
| 28 | #else | ||
| 29 | #define sa1100_register_uart_fns(fns) do { } while (0) | ||
| 30 | #define sa1100_register_uart(idx,port) do { } while (0) | ||
| 31 | #endif | ||
diff --git a/arch/arm/include/asm/mach/udc_pxa2xx.h b/arch/arm/include/asm/mach/udc_pxa2xx.h new file mode 100644 index 00000000000..ea297ac70bc --- /dev/null +++ b/arch/arm/include/asm/mach/udc_pxa2xx.h | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/include/asm/mach/udc_pxa2xx.h | ||
| 3 | * | ||
| 4 | * This supports machine-specific differences in how the PXA2xx | ||
| 5 | * USB Device Controller (UDC) is wired. | ||
| 6 | * | ||
| 7 | * It is set in linux/arch/arm/mach-pxa/<machine>.c or in | ||
| 8 | * linux/arch/mach-ixp4xx/<machine>.c and used in | ||
| 9 | * the probe routine of linux/drivers/usb/gadget/pxa2xx_udc.c | ||
| 10 | */ | ||
| 11 | |||
| 12 | struct pxa2xx_udc_mach_info { | ||
| 13 | int (*udc_is_connected)(void); /* do we see host? */ | ||
| 14 | void (*udc_command)(int cmd); | ||
| 15 | #define PXA2XX_UDC_CMD_CONNECT 0 /* let host see us */ | ||
| 16 | #define PXA2XX_UDC_CMD_DISCONNECT 1 /* so host won't see us */ | ||
| 17 | |||
| 18 | /* Boards following the design guidelines in the developer's manual, | ||
| 19 | * with on-chip GPIOs not Lubbock's weird hardware, can have a sane | ||
| 20 | * VBUS IRQ and omit the methods above. Store the GPIO number | ||
| 21 | * here. Note that sometimes the signals go through inverters... | ||
| 22 | */ | ||
| 23 | bool gpio_pullup_inverted; | ||
| 24 | int gpio_pullup; /* high == pullup activated */ | ||
| 25 | }; | ||
| 26 | |||
diff --git a/arch/arm/include/asm/mman.h b/arch/arm/include/asm/mman.h new file mode 100644 index 00000000000..41f99c573b9 --- /dev/null +++ b/arch/arm/include/asm/mman.h | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | #include <asm-generic/mman.h> | ||
| 2 | |||
| 3 | #define arch_mmap_check(addr, len, flags) \ | ||
| 4 | (((flags) & MAP_FIXED && (addr) < FIRST_USER_ADDRESS) ? -EINVAL : 0) | ||
diff --git a/arch/arm/include/asm/msgbuf.h b/arch/arm/include/asm/msgbuf.h new file mode 100644 index 00000000000..33b35b946ea --- /dev/null +++ b/arch/arm/include/asm/msgbuf.h | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | #ifndef _ASMARM_MSGBUF_H | ||
| 2 | #define _ASMARM_MSGBUF_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * The msqid64_ds structure for arm architecture. | ||
| 6 | * Note extra padding because this structure is passed back and forth | ||
| 7 | * between kernel and user space. | ||
| 8 | * | ||
| 9 | * Pad space is left for: | ||
| 10 | * - 64-bit time_t to solve y2038 problem | ||
| 11 | * - 2 miscellaneous 32-bit values | ||
| 12 | */ | ||
| 13 | |||
| 14 | struct msqid64_ds { | ||
| 15 | struct ipc64_perm msg_perm; | ||
| 16 | __kernel_time_t msg_stime; /* last msgsnd time */ | ||
| 17 | unsigned long __unused1; | ||
| 18 | __kernel_time_t msg_rtime; /* last msgrcv time */ | ||
| 19 | unsigned long __unused2; | ||
| 20 | __kernel_time_t msg_ctime; /* last change time */ | ||
| 21 | unsigned long __unused3; | ||
| 22 | unsigned long msg_cbytes; /* current number of bytes on queue */ | ||
| 23 | unsigned long msg_qnum; /* number of messages in queue */ | ||
| 24 | unsigned long msg_qbytes; /* max number of bytes on queue */ | ||
| 25 | __kernel_pid_t msg_lspid; /* pid of last msgsnd */ | ||
| 26 | __kernel_pid_t msg_lrpid; /* last receive pid */ | ||
| 27 | unsigned long __unused4; | ||
| 28 | unsigned long __unused5; | ||
| 29 | }; | ||
| 30 | |||
| 31 | #endif /* _ASMARM_MSGBUF_H */ | ||
diff --git a/arch/arm/include/asm/param.h b/arch/arm/include/asm/param.h new file mode 100644 index 00000000000..8b24bf94c06 --- /dev/null +++ b/arch/arm/include/asm/param.h | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/include/asm/param.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 1995-1999 Russell King | ||
| 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 version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | #ifndef __ASM_PARAM_H | ||
| 11 | #define __ASM_PARAM_H | ||
| 12 | |||
| 13 | #ifdef __KERNEL__ | ||
| 14 | # define HZ CONFIG_HZ /* Internal kernel timer frequency */ | ||
| 15 | # define USER_HZ 100 /* User interfaces are in "ticks" */ | ||
| 16 | # define CLOCKS_PER_SEC (USER_HZ) /* like times() */ | ||
| 17 | #else | ||
| 18 | # define HZ 100 | ||
| 19 | #endif | ||
| 20 | |||
| 21 | #define EXEC_PAGESIZE 4096 | ||
| 22 | |||
| 23 | #ifndef NOGROUP | ||
| 24 | #define NOGROUP (-1) | ||
| 25 | #endif | ||
| 26 | |||
| 27 | /* max length of hostname */ | ||
| 28 | #define MAXHOSTNAMELEN 64 | ||
| 29 | |||
| 30 | #endif | ||
| 31 | |||
diff --git a/arch/arm/include/asm/parport.h b/arch/arm/include/asm/parport.h new file mode 100644 index 00000000000..26e94b09035 --- /dev/null +++ b/arch/arm/include/asm/parport.h | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/include/asm/parport.h: ARM-specific parport initialisation | ||
| 3 | * | ||
| 4 | * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk> | ||
| 5 | * | ||
| 6 | * This file should only be included by drivers/parport/parport_pc.c. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef __ASMARM_PARPORT_H | ||
| 10 | #define __ASMARM_PARPORT_H | ||
| 11 | |||
| 12 | static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma); | ||
| 13 | static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) | ||
| 14 | { | ||
| 15 | return parport_pc_find_isa_ports (autoirq, autodma); | ||
| 16 | } | ||
| 17 | |||
| 18 | #endif /* !(_ASMARM_PARPORT_H) */ | ||
diff --git a/arch/arm/include/asm/poll.h b/arch/arm/include/asm/poll.h new file mode 100644 index 00000000000..c98509d3149 --- /dev/null +++ b/arch/arm/include/asm/poll.h | |||
| @@ -0,0 +1 @@ | |||
| #include <asm-generic/poll.h> | |||
diff --git a/arch/arm/include/asm/posix_types.h b/arch/arm/include/asm/posix_types.h new file mode 100644 index 00000000000..2446d23bfdb --- /dev/null +++ b/arch/arm/include/asm/posix_types.h | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/include/asm/posix_types.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 1996-1998 Russell King. | ||
| 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 version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * Changelog: | ||
| 11 | * 27-06-1996 RMK Created | ||
| 12 | */ | ||
| 13 | #ifndef __ARCH_ARM_POSIX_TYPES_H | ||
| 14 | #define __ARCH_ARM_POSIX_TYPES_H | ||
| 15 | |||
| 16 | /* | ||
| 17 | * This file is generally used by user-level software, so you need to | ||
| 18 | * be a little careful about namespace pollution etc. Also, we cannot | ||
| 19 | * assume GCC is being used. | ||
| 20 | */ | ||
| 21 | |||
| 22 | typedef unsigned long __kernel_ino_t; | ||
| 23 | typedef unsigned short __kernel_mode_t; | ||
| 24 | typedef unsigned short __kernel_nlink_t; | ||
| 25 | typedef long __kernel_off_t; | ||
| 26 | typedef int __kernel_pid_t; | ||
| 27 | typedef unsigned short __kernel_ipc_pid_t; | ||
| 28 | typedef unsigned short __kernel_uid_t; | ||
| 29 | typedef unsigned short __kernel_gid_t; | ||
| 30 | typedef unsigned int __kernel_size_t; | ||
| 31 | typedef int __kernel_ssize_t; | ||
| 32 | typedef int __kernel_ptrdiff_t; | ||
| 33 | typedef long __kernel_time_t; | ||
| 34 | typedef long __kernel_suseconds_t; | ||
| 35 | typedef long __kernel_clock_t; | ||
| 36 | typedef int __kernel_timer_t; | ||
| 37 | typedef int __kernel_clockid_t; | ||
| 38 | typedef int __kernel_daddr_t; | ||
| 39 | typedef char * __kernel_caddr_t; | ||
| 40 | typedef unsigned short __kernel_uid16_t; | ||
| 41 | typedef unsigned short __kernel_gid16_t; | ||
| 42 | typedef unsigned int __kernel_uid32_t; | ||
| 43 | typedef unsigned int __kernel_gid32_t; | ||
| 44 | |||
| 45 | typedef unsigned short __kernel_old_uid_t; | ||
| 46 | typedef unsigned short __kernel_old_gid_t; | ||
| 47 | typedef unsigned short __kernel_old_dev_t; | ||
| 48 | |||
| 49 | #ifdef __GNUC__ | ||
| 50 | typedef long long __kernel_loff_t; | ||
| 51 | #endif | ||
| 52 | |||
| 53 | typedef struct { | ||
| 54 | int val[2]; | ||
| 55 | } __kernel_fsid_t; | ||
| 56 | |||
| 57 | #if defined(__KERNEL__) | ||
| 58 | |||
| 59 | #undef __FD_SET | ||
| 60 | #define __FD_SET(fd, fdsetp) \ | ||
| 61 | (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] |= (1<<((fd) & 31))) | ||
| 62 | |||
| 63 | #undef __FD_CLR | ||
| 64 | #define __FD_CLR(fd, fdsetp) \ | ||
| 65 | (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] &= ~(1<<((fd) & 31))) | ||
| 66 | |||
| 67 | #undef __FD_ISSET | ||
| 68 | #define __FD_ISSET(fd, fdsetp) \ | ||
| 69 | ((((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] & (1<<((fd) & 31))) != 0) | ||
| 70 | |||
| 71 | #undef __FD_ZERO | ||
| 72 | #define __FD_ZERO(fdsetp) \ | ||
| 73 | (memset (fdsetp, 0, sizeof (*(fd_set *)(fdsetp)))) | ||
| 74 | |||
| 75 | #endif | ||
| 76 | |||
| 77 | #endif | ||
diff --git a/arch/arm/include/asm/resource.h b/arch/arm/include/asm/resource.h new file mode 100644 index 00000000000..734b581b5b6 --- /dev/null +++ b/arch/arm/include/asm/resource.h | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | #ifndef _ARM_RESOURCE_H | ||
| 2 | #define _ARM_RESOURCE_H | ||
| 3 | |||
| 4 | #include <asm-generic/resource.h> | ||
| 5 | |||
| 6 | #endif | ||
diff --git a/arch/arm/include/asm/sections.h b/arch/arm/include/asm/sections.h new file mode 100644 index 00000000000..2b8c5160388 --- /dev/null +++ b/arch/arm/include/asm/sections.h | |||
| @@ -0,0 +1 @@ | |||
| #include <asm-generic/sections.h> | |||
diff --git a/arch/arm/include/asm/segment.h b/arch/arm/include/asm/segment.h new file mode 100644 index 00000000000..9e24c21f630 --- /dev/null +++ b/arch/arm/include/asm/segment.h | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | #ifndef __ASM_ARM_SEGMENT_H | ||
| 2 | #define __ASM_ARM_SEGMENT_H | ||
| 3 | |||
| 4 | #define __KERNEL_CS 0x0 | ||
| 5 | #define __KERNEL_DS 0x0 | ||
| 6 | |||
| 7 | #define __USER_CS 0x1 | ||
| 8 | #define __USER_DS 0x1 | ||
| 9 | |||
| 10 | #endif /* __ASM_ARM_SEGMENT_H */ | ||
| 11 | |||
diff --git a/arch/arm/include/asm/sembuf.h b/arch/arm/include/asm/sembuf.h new file mode 100644 index 00000000000..1c028395428 --- /dev/null +++ b/arch/arm/include/asm/sembuf.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | #ifndef _ASMARM_SEMBUF_H | ||
| 2 | #define _ASMARM_SEMBUF_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * The semid64_ds structure for arm architecture. | ||
| 6 | * Note extra padding because this structure is passed back and forth | ||
| 7 | * between kernel and user space. | ||
| 8 | * | ||
| 9 | * Pad space is left for: | ||
| 10 | * - 64-bit time_t to solve y2038 problem | ||
| 11 | * - 2 miscellaneous 32-bit values | ||
| 12 | */ | ||
| 13 | |||
| 14 | struct semid64_ds { | ||
| 15 | struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ | ||
| 16 | __kernel_time_t sem_otime; /* last semop time */ | ||
| 17 | unsigned long __unused1; | ||
| 18 | __kernel_time_t sem_ctime; /* last change time */ | ||
| 19 | unsigned long __unused2; | ||
| 20 | unsigned long sem_nsems; /* no. of semaphores in array */ | ||
| 21 | unsigned long __unused3; | ||
| 22 | unsigned long __unused4; | ||
| 23 | }; | ||
| 24 | |||
| 25 | #endif /* _ASMARM_SEMBUF_H */ | ||
diff --git a/arch/arm/include/asm/serial.h b/arch/arm/include/asm/serial.h new file mode 100644 index 00000000000..ebb049091e2 --- /dev/null +++ b/arch/arm/include/asm/serial.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/include/asm/serial.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 1996 Russell King. | ||
| 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 version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * Changelog: | ||
| 11 | * 15-10-1996 RMK Created | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef __ASM_SERIAL_H | ||
| 15 | #define __ASM_SERIAL_H | ||
| 16 | |||
| 17 | #define BASE_BAUD (1843200 / 16) | ||
| 18 | |||
| 19 | #endif | ||
diff --git a/arch/arm/include/asm/shmbuf.h b/arch/arm/include/asm/shmbuf.h new file mode 100644 index 00000000000..2e5c67ba1c9 --- /dev/null +++ b/arch/arm/include/asm/shmbuf.h | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | #ifndef _ASMARM_SHMBUF_H | ||
| 2 | #define _ASMARM_SHMBUF_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * The shmid64_ds structure for arm architecture. | ||
| 6 | * Note extra padding because this structure is passed back and forth | ||
| 7 | * between kernel and user space. | ||
| 8 | * | ||
| 9 | * Pad space is left for: | ||
| 10 | * - 64-bit time_t to solve y2038 problem | ||
| 11 | * - 2 miscellaneous 32-bit values | ||
| 12 | */ | ||
| 13 | |||
| 14 | struct shmid64_ds { | ||
| 15 | struct ipc64_perm shm_perm; /* operation perms */ | ||
| 16 | size_t shm_segsz; /* size of segment (bytes) */ | ||
| 17 | __kernel_time_t shm_atime; /* last attach time */ | ||
| 18 | unsigned long __unused1; | ||
| 19 | __kernel_time_t shm_dtime; /* last detach time */ | ||
| 20 | unsigned long __unused2; | ||
| 21 | __kernel_time_t shm_ctime; /* last change time */ | ||
| 22 | unsigned long __unused3; | ||
| 23 | __kernel_pid_t shm_cpid; /* pid of creator */ | ||
| 24 | __kernel_pid_t shm_lpid; /* pid of last operator */ | ||
| 25 | unsigned long shm_nattch; /* no. of current attaches */ | ||
| 26 | unsigned long __unused4; | ||
| 27 | unsigned long __unused5; | ||
| 28 | }; | ||
| 29 | |||
| 30 | struct shminfo64 { | ||
| 31 | unsigned long shmmax; | ||
| 32 | unsigned long shmmin; | ||
| 33 | unsigned long shmmni; | ||
| 34 | unsigned long shmseg; | ||
| 35 | unsigned long shmall; | ||
| 36 | unsigned long __unused1; | ||
| 37 | unsigned long __unused2; | ||
| 38 | unsigned long __unused3; | ||
| 39 | unsigned long __unused4; | ||
| 40 | }; | ||
| 41 | |||
| 42 | #endif /* _ASMARM_SHMBUF_H */ | ||
diff --git a/arch/arm/include/asm/sigcontext.h b/arch/arm/include/asm/sigcontext.h new file mode 100644 index 00000000000..fc0b80b6a6f --- /dev/null +++ b/arch/arm/include/asm/sigcontext.h | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | #ifndef _ASMARM_SIGCONTEXT_H | ||
| 2 | #define _ASMARM_SIGCONTEXT_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * Signal context structure - contains all info to do with the state | ||
| 6 | * before the signal handler was invoked. Note: only add new entries | ||
| 7 | * to the end of the structure. | ||
| 8 | */ | ||
| 9 | struct sigcontext { | ||
| 10 | unsigned long trap_no; | ||
| 11 | unsigned long error_code; | ||
| 12 | unsigned long oldmask; | ||
| 13 | unsigned long arm_r0; | ||
| 14 | unsigned long arm_r1; | ||
| 15 | unsigned long arm_r2; | ||
| 16 | unsigned long arm_r3; | ||
| 17 | unsigned long arm_r4; | ||
| 18 | unsigned long arm_r5; | ||
| 19 | unsigned long arm_r6; | ||
| 20 | unsigned long arm_r7; | ||
| 21 | unsigned long arm_r8; | ||
| 22 | unsigned long arm_r9; | ||
| 23 | unsigned long arm_r10; | ||
| 24 | unsigned long arm_fp; | ||
| 25 | unsigned long arm_ip; | ||
| 26 | unsigned long arm_sp; | ||
| 27 | unsigned long arm_lr; | ||
| 28 | unsigned long arm_pc; | ||
| 29 | unsigned long arm_cpsr; | ||
| 30 | unsigned long fault_address; | ||
| 31 | }; | ||
| 32 | |||
| 33 | |||
| 34 | #endif | ||
diff --git a/arch/arm/include/asm/siginfo.h b/arch/arm/include/asm/siginfo.h new file mode 100644 index 00000000000..5e21852e603 --- /dev/null +++ b/arch/arm/include/asm/siginfo.h | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | #ifndef _ASMARM_SIGINFO_H | ||
| 2 | #define _ASMARM_SIGINFO_H | ||
| 3 | |||
| 4 | #include <asm-generic/siginfo.h> | ||
| 5 | |||
| 6 | #endif | ||
diff --git a/arch/arm/include/asm/sizes.h b/arch/arm/include/asm/sizes.h new file mode 100644 index 00000000000..d208fc07421 --- /dev/null +++ b/arch/arm/include/asm/sizes.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* | ||
| 2 | * This program is free software; you can redistribute it and/or modify | ||
| 3 | * it under the terms of the GNU General Public License as published by | ||
| 4 | * the Free Software Foundation; either version 2 of the License, or | ||
| 5 | * (at your option) any later version. | ||
| 6 | * | ||
| 7 | * This program is distributed in the hope that it will be useful, | ||
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 10 | * GNU General Public License for more details. | ||
| 11 | * | ||
| 12 | * You should have received a copy of the GNU General Public License | ||
| 13 | * along with this program; if not, write to the Free Software | ||
| 14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 15 | */ | ||
| 16 | /* Size definitions | ||
| 17 | * Copyright (C) ARM Limited 1998. All rights reserved. | ||
| 18 | */ | ||
| 19 | #include <asm-generic/sizes.h> | ||
| 20 | |||
| 21 | #define SZ_48M (SZ_32M + SZ_16M) | ||
| 22 | #define SZ_160M (SZ_128M | SZ_32M) | ||
diff --git a/arch/arm/include/asm/socket.h b/arch/arm/include/asm/socket.h new file mode 100644 index 00000000000..90ffd04b8e7 --- /dev/null +++ b/arch/arm/include/asm/socket.h | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | #ifndef _ASMARM_SOCKET_H | ||
| 2 | #define _ASMARM_SOCKET_H | ||
| 3 | |||
| 4 | #include <asm/sockios.h> | ||
| 5 | |||
| 6 | /* For setsockopt(2) */ | ||
| 7 | #define SOL_SOCKET 1 | ||
| 8 | |||
| 9 | #define SO_DEBUG 1 | ||
| 10 | #define SO_REUSEADDR 2 | ||
| 11 | #define SO_TYPE 3 | ||
| 12 | #define SO_ERROR 4 | ||
| 13 | #define SO_DONTROUTE 5 | ||
| 14 | #define SO_BROADCAST 6 | ||
| 15 | #define SO_SNDBUF 7 | ||
| 16 | #define SO_RCVBUF 8 | ||
| 17 | #define SO_SNDBUFFORCE 32 | ||
| 18 | #define SO_RCVBUFFORCE 33 | ||
| 19 | #define SO_KEEPALIVE 9 | ||
| 20 | #define SO_OOBINLINE 10 | ||
| 21 | #define SO_NO_CHECK 11 | ||
| 22 | #define SO_PRIORITY 12 | ||
| 23 | #define SO_LINGER 13 | ||
| 24 | #define SO_BSDCOMPAT 14 | ||
| 25 | /* To add :#define SO_REUSEPORT 15 */ | ||
| 26 | #define SO_PASSCRED 16 | ||
| 27 | #define SO_PEERCRED 17 | ||
| 28 | #define SO_RCVLOWAT 18 | ||
| 29 | #define SO_SNDLOWAT 19 | ||
| 30 | #define SO_RCVTIMEO 20 | ||
| 31 | #define SO_SNDTIMEO 21 | ||
| 32 | |||
| 33 | /* Security levels - as per NRL IPv6 - don't actually do anything */ | ||
| 34 | #define SO_SECURITY_AUTHENTICATION 22 | ||
| 35 | #define SO_SECURITY_ENCRYPTION_TRANSPORT 23 | ||
| 36 | #define SO_SECURITY_ENCRYPTION_NETWORK 24 | ||
| 37 | |||
| 38 | #define SO_BINDTODEVICE 25 | ||
| 39 | |||
| 40 | /* Socket filtering */ | ||
| 41 | #define SO_ATTACH_FILTER 26 | ||
| 42 | #define SO_DETACH_FILTER 27 | ||
| 43 | |||
| 44 | #define SO_PEERNAME 28 | ||
| 45 | #define SO_TIMESTAMP 29 | ||
| 46 | #define SCM_TIMESTAMP SO_TIMESTAMP | ||
| 47 | |||
| 48 | #define SO_ACCEPTCONN 30 | ||
| 49 | |||
| 50 | #define SO_PEERSEC 31 | ||
| 51 | #define SO_PASSSEC 34 | ||
| 52 | #define SO_TIMESTAMPNS 35 | ||
| 53 | #define SCM_TIMESTAMPNS SO_TIMESTAMPNS | ||
| 54 | |||
| 55 | #define SO_MARK 36 | ||
| 56 | |||
| 57 | #define SO_TIMESTAMPING 37 | ||
| 58 | #define SCM_TIMESTAMPING SO_TIMESTAMPING | ||
| 59 | |||
| 60 | #define SO_PROTOCOL 38 | ||
| 61 | #define SO_DOMAIN 39 | ||
| 62 | |||
| 63 | #define SO_RXQ_OVFL 40 | ||
| 64 | |||
| 65 | #endif /* _ASM_SOCKET_H */ | ||
diff --git a/arch/arm/include/asm/sockios.h b/arch/arm/include/asm/sockios.h new file mode 100644 index 00000000000..a2588a2512d --- /dev/null +++ b/arch/arm/include/asm/sockios.h | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | #ifndef __ARCH_ARM_SOCKIOS_H | ||
| 2 | #define __ARCH_ARM_SOCKIOS_H | ||
| 3 | |||
| 4 | /* Socket-level I/O control calls. */ | ||
| 5 | #define FIOSETOWN 0x8901 | ||
| 6 | #define SIOCSPGRP 0x8902 | ||
| 7 | #define FIOGETOWN 0x8903 | ||
| 8 | #define SIOCGPGRP 0x8904 | ||
| 9 | #define SIOCATMARK 0x8905 | ||
| 10 | #define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ | ||
| 11 | #define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ | ||
| 12 | |||
| 13 | #endif | ||
diff --git a/arch/arm/include/asm/stat.h b/arch/arm/include/asm/stat.h new file mode 100644 index 00000000000..42c0c13999d --- /dev/null +++ b/arch/arm/include/asm/stat.h | |||
| @@ -0,0 +1,87 @@ | |||
| 1 | #ifndef _ASMARM_STAT_H | ||
| 2 | #define _ASMARM_STAT_H | ||
| 3 | |||
| 4 | struct __old_kernel_stat { | ||
| 5 | unsigned short st_dev; | ||
| 6 | unsigned short st_ino; | ||
| 7 | unsigned short st_mode; | ||
| 8 | unsigned short st_nlink; | ||
| 9 | unsigned short st_uid; | ||
| 10 | unsigned short st_gid; | ||
| 11 | unsigned short st_rdev; | ||
| 12 | unsigned long st_size; | ||
| 13 | unsigned long st_atime; | ||
| 14 | unsigned long st_mtime; | ||
| 15 | unsigned long st_ctime; | ||
| 16 | }; | ||
| 17 | |||
| 18 | #define STAT_HAVE_NSEC | ||
| 19 | |||
| 20 | struct stat { | ||
| 21 | #if defined(__ARMEB__) | ||
| 22 | unsigned short st_dev; | ||
| 23 | unsigned short __pad1; | ||
| 24 | #else | ||
| 25 | unsigned long st_dev; | ||
| 26 | #endif | ||
| 27 | unsigned long st_ino; | ||
| 28 | unsigned short st_mode; | ||
| 29 | unsigned short st_nlink; | ||
| 30 | unsigned short st_uid; | ||
| 31 | unsigned short st_gid; | ||
| 32 | #if defined(__ARMEB__) | ||
| 33 | unsigned short st_rdev; | ||
| 34 | unsigned short __pad2; | ||
| 35 | #else | ||
| 36 | unsigned long st_rdev; | ||
| 37 | #endif | ||
| 38 | unsigned long st_size; | ||
| 39 | unsigned long st_blksize; | ||
| 40 | unsigned long st_blocks; | ||
| 41 | unsigned long st_atime; | ||
| 42 | unsigned long st_atime_nsec; | ||
| 43 | unsigned long st_mtime; | ||
| 44 | unsigned long st_mtime_nsec; | ||
| 45 | unsigned long st_ctime; | ||
| 46 | unsigned long st_ctime_nsec; | ||
| 47 | unsigned long __unused4; | ||
| 48 | unsigned long __unused5; | ||
| 49 | }; | ||
| 50 | |||
| 51 | /* This matches struct stat64 in glibc2.1, hence the absolutely | ||
| 52 | * insane amounts of padding around dev_t's. | ||
| 53 | * Note: The kernel zero's the padded region because glibc might read them | ||
| 54 | * in the hope that the kernel has stretched to using larger sizes. | ||
| 55 | */ | ||
| 56 | struct stat64 { | ||
| 57 | unsigned long long st_dev; | ||
| 58 | unsigned char __pad0[4]; | ||
| 59 | |||
| 60 | #define STAT64_HAS_BROKEN_ST_INO 1 | ||
| 61 | unsigned long __st_ino; | ||
| 62 | unsigned int st_mode; | ||
| 63 | unsigned int st_nlink; | ||
| 64 | |||
| 65 | unsigned long st_uid; | ||
| 66 | unsigned long st_gid; | ||
| 67 | |||
| 68 | unsigned long long st_rdev; | ||
| 69 | unsigned char __pad3[4]; | ||
| 70 | |||
| 71 | long long st_size; | ||
| 72 | unsigned long st_blksize; | ||
| 73 | unsigned long long st_blocks; /* Number 512-byte blocks allocated. */ | ||
| 74 | |||
| 75 | unsigned long st_atime; | ||
| 76 | unsigned long st_atime_nsec; | ||
| 77 | |||
| 78 | unsigned long st_mtime; | ||
| 79 | unsigned long st_mtime_nsec; | ||
| 80 | |||
| 81 | unsigned long st_ctime; | ||
| 82 | unsigned long st_ctime_nsec; | ||
| 83 | |||
| 84 | unsigned long long st_ino; | ||
| 85 | }; | ||
| 86 | |||
| 87 | #endif | ||
diff --git a/arch/arm/include/asm/statfs.h b/arch/arm/include/asm/statfs.h new file mode 100644 index 00000000000..079447c05ba --- /dev/null +++ b/arch/arm/include/asm/statfs.h | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | #ifndef _ASMARM_STATFS_H | ||
| 2 | #define _ASMARM_STATFS_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * With EABI there is 4 bytes of padding added to this structure. | ||
| 6 | * Let's pack it so the padding goes away to simplify dual ABI support. | ||
| 7 | * Note that user space does NOT have to pack this structure. | ||
| 8 | */ | ||
| 9 | #define ARCH_PACK_STATFS64 __attribute__((packed,aligned(4))) | ||
| 10 | |||
| 11 | #include <asm-generic/statfs.h> | ||
| 12 | #endif | ||
diff --git a/arch/arm/include/asm/termbits.h b/arch/arm/include/asm/termbits.h new file mode 100644 index 00000000000..704135d28d1 --- /dev/null +++ b/arch/arm/include/asm/termbits.h | |||
| @@ -0,0 +1,198 @@ | |||
| 1 | #ifndef __ASM_ARM_TERMBITS_H | ||
| 2 | #define __ASM_ARM_TERMBITS_H | ||
| 3 | |||
| 4 | typedef unsigned char cc_t; | ||
| 5 | typedef unsigned int speed_t; | ||
| 6 | typedef unsigned int tcflag_t; | ||
| 7 | |||
| 8 | #define NCCS 19 | ||
| 9 | struct termios { | ||
| 10 | tcflag_t c_iflag; /* input mode flags */ | ||
| 11 | tcflag_t c_oflag; /* output mode flags */ | ||
| 12 | tcflag_t c_cflag; /* control mode flags */ | ||
| 13 | tcflag_t c_lflag; /* local mode flags */ | ||
| 14 | cc_t c_line; /* line discipline */ | ||
| 15 | cc_t c_cc[NCCS]; /* control characters */ | ||
| 16 | }; | ||
| 17 | |||
| 18 | struct termios2 { | ||
| 19 | tcflag_t c_iflag; /* input mode flags */ | ||
| 20 | tcflag_t c_oflag; /* output mode flags */ | ||
| 21 | tcflag_t c_cflag; /* control mode flags */ | ||
| 22 | tcflag_t c_lflag; /* local mode flags */ | ||
| 23 | cc_t c_line; /* line discipline */ | ||
| 24 | cc_t c_cc[NCCS]; /* control characters */ | ||
| 25 | speed_t c_ispeed; /* input speed */ | ||
| 26 | speed_t c_ospeed; /* output speed */ | ||
| 27 | }; | ||
| 28 | |||
| 29 | struct ktermios { | ||
| 30 | tcflag_t c_iflag; /* input mode flags */ | ||
| 31 | tcflag_t c_oflag; /* output mode flags */ | ||
| 32 | tcflag_t c_cflag; /* control mode flags */ | ||
| 33 | tcflag_t c_lflag; /* local mode flags */ | ||
| 34 | cc_t c_line; /* line discipline */ | ||
| 35 | cc_t c_cc[NCCS]; /* control characters */ | ||
| 36 | speed_t c_ispeed; /* input speed */ | ||
| 37 | speed_t c_ospeed; /* output speed */ | ||
| 38 | }; | ||
| 39 | |||
| 40 | |||
| 41 | /* c_cc characters */ | ||
| 42 | #define VINTR 0 | ||
| 43 | #define VQUIT 1 | ||
| 44 | #define VERASE 2 | ||
| 45 | #define VKILL 3 | ||
| 46 | #define VEOF 4 | ||
| 47 | #define VTIME 5 | ||
| 48 | #define VMIN 6 | ||
| 49 | #define VSWTC 7 | ||
| 50 | #define VSTART 8 | ||
| 51 | #define VSTOP 9 | ||
| 52 | #define VSUSP 10 | ||
| 53 | #define VEOL 11 | ||
| 54 | #define VREPRINT 12 | ||
| 55 | #define VDISCARD 13 | ||
| 56 | #define VWERASE 14 | ||
| 57 | #define VLNEXT 15 | ||
| 58 | #define VEOL2 16 | ||
| 59 | |||
| 60 | /* c_iflag bits */ | ||
| 61 | #define IGNBRK 0000001 | ||
| 62 | #define BRKINT 0000002 | ||
| 63 | #define IGNPAR 0000004 | ||
| 64 | #define PARMRK 0000010 | ||
| 65 | #define INPCK 0000020 | ||
| 66 | #define ISTRIP 0000040 | ||
| 67 | #define INLCR 0000100 | ||
| 68 | #define IGNCR 0000200 | ||
| 69 | #define ICRNL 0000400 | ||
| 70 | #define IUCLC 0001000 | ||
| 71 | #define IXON 0002000 | ||
| 72 | #define IXANY 0004000 | ||
| 73 | #define IXOFF 0010000 | ||
| 74 | #define IMAXBEL 0020000 | ||
| 75 | #define IUTF8 0040000 | ||
| 76 | |||
| 77 | /* c_oflag bits */ | ||
| 78 | #define OPOST 0000001 | ||
| 79 | #define OLCUC 0000002 | ||
| 80 | #define ONLCR 0000004 | ||
| 81 | #define OCRNL 0000010 | ||
| 82 | #define ONOCR 0000020 | ||
| 83 | #define ONLRET 0000040 | ||
| 84 | #define OFILL 0000100 | ||
| 85 | #define OFDEL 0000200 | ||
| 86 | #define NLDLY 0000400 | ||
| 87 | #define NL0 0000000 | ||
| 88 | #define NL1 0000400 | ||
| 89 | #define CRDLY 0003000 | ||
| 90 | #define CR0 0000000 | ||
| 91 | #define CR1 0001000 | ||
| 92 | #define CR2 0002000 | ||
| 93 | #define CR3 0003000 | ||
| 94 | #define TABDLY 0014000 | ||
| 95 | #define TAB0 0000000 | ||
| 96 | #define TAB1 0004000 | ||
| 97 | #define TAB2 0010000 | ||
| 98 | #define TAB3 0014000 | ||
| 99 | #define XTABS 0014000 | ||
| 100 | #define BSDLY 0020000 | ||
| 101 | #define BS0 0000000 | ||
| 102 | #define BS1 0020000 | ||
| 103 | #define VTDLY 0040000 | ||
| 104 | #define VT0 0000000 | ||
| 105 | #define VT1 0040000 | ||
| 106 | #define FFDLY 0100000 | ||
| 107 | #define FF0 0000000 | ||
| 108 | #define FF1 0100000 | ||
| 109 | |||
| 110 | /* c_cflag bit meaning */ | ||
| 111 | #define CBAUD 0010017 | ||
| 112 | #define B0 0000000 /* hang up */ | ||
| 113 | #define B50 0000001 | ||
| 114 | #define B75 0000002 | ||
| 115 | #define B110 0000003 | ||
| 116 | #define B134 0000004 | ||
| 117 | #define B150 0000005 | ||
| 118 | #define B200 0000006 | ||
| 119 | #define B300 0000007 | ||
| 120 | #define B600 0000010 | ||
| 121 | #define B1200 0000011 | ||
| 122 | #define B1800 0000012 | ||
| 123 | #define B2400 0000013 | ||
| 124 | #define B4800 0000014 | ||
| 125 | #define B9600 0000015 | ||
| 126 | #define B19200 0000016 | ||
| 127 | #define B38400 0000017 | ||
| 128 | #define EXTA B19200 | ||
| 129 | #define EXTB B38400 | ||
| 130 | #define CSIZE 0000060 | ||
| 131 | #define CS5 0000000 | ||
| 132 | #define CS6 0000020 | ||
| 133 | #define CS7 0000040 | ||
| 134 | #define CS8 0000060 | ||
| 135 | #define CSTOPB 0000100 | ||
| 136 | #define CREAD 0000200 | ||
| 137 | #define PARENB 0000400 | ||
| 138 | #define PARODD 0001000 | ||
| 139 | #define HUPCL 0002000 | ||
| 140 | #define CLOCAL 0004000 | ||
| 141 | #define CBAUDEX 0010000 | ||
| 142 | #define BOTHER 0010000 | ||
| 143 | #define B57600 0010001 | ||
| 144 | #define B115200 0010002 | ||
| 145 | #define B230400 0010003 | ||
| 146 | #define B460800 0010004 | ||
| 147 | #define B500000 0010005 | ||
| 148 | #define B576000 0010006 | ||
| 149 | #define B921600 0010007 | ||
| 150 | #define B1000000 0010010 | ||
| 151 | #define B1152000 0010011 | ||
| 152 | #define B1500000 0010012 | ||
| 153 | #define B2000000 0010013 | ||
| 154 | #define B2500000 0010014 | ||
| 155 | #define B3000000 0010015 | ||
| 156 | #define B3500000 0010016 | ||
| 157 | #define B4000000 0010017 | ||
| 158 | #define CIBAUD 002003600000 /* input baud rate */ | ||
| 159 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | ||
| 160 | #define CRTSCTS 020000000000 /* flow control */ | ||
| 161 | |||
| 162 | #define IBSHIFT 16 | ||
| 163 | |||
| 164 | /* c_lflag bits */ | ||
| 165 | #define ISIG 0000001 | ||
| 166 | #define ICANON 0000002 | ||
| 167 | #define XCASE 0000004 | ||
| 168 | #define ECHO 0000010 | ||
| 169 | #define ECHOE 0000020 | ||
| 170 | #define ECHOK 0000040 | ||
| 171 | #define ECHONL 0000100 | ||
| 172 | #define NOFLSH 0000200 | ||
| 173 | #define TOSTOP 0000400 | ||
| 174 | #define ECHOCTL 0001000 | ||
| 175 | #define ECHOPRT 0002000 | ||
| 176 | #define ECHOKE 0004000 | ||
| 177 | #define FLUSHO 0010000 | ||
| 178 | #define PENDIN 0040000 | ||
| 179 | #define IEXTEN 0100000 | ||
| 180 | #define EXTPROC 0200000 | ||
| 181 | |||
| 182 | /* tcflow() and TCXONC use these */ | ||
| 183 | #define TCOOFF 0 | ||
| 184 | #define TCOON 1 | ||
| 185 | #define TCIOFF 2 | ||
| 186 | #define TCION 3 | ||
| 187 | |||
| 188 | /* tcflush() and TCFLSH use these */ | ||
| 189 | #define TCIFLUSH 0 | ||
| 190 | #define TCOFLUSH 1 | ||
| 191 | #define TCIOFLUSH 2 | ||
| 192 | |||
| 193 | /* tcsetattr uses these */ | ||
| 194 | #define TCSANOW 0 | ||
| 195 | #define TCSADRAIN 1 | ||
| 196 | #define TCSAFLUSH 2 | ||
| 197 | |||
| 198 | #endif /* __ASM_ARM_TERMBITS_H */ | ||
diff --git a/arch/arm/include/asm/termios.h b/arch/arm/include/asm/termios.h new file mode 100644 index 00000000000..293e3f1bc3f --- /dev/null +++ b/arch/arm/include/asm/termios.h | |||
| @@ -0,0 +1,92 @@ | |||
| 1 | #ifndef __ASM_ARM_TERMIOS_H | ||
| 2 | #define __ASM_ARM_TERMIOS_H | ||
| 3 | |||
| 4 | #include <asm/termbits.h> | ||
| 5 | #include <asm/ioctls.h> | ||
| 6 | |||
| 7 | struct winsize { | ||
| 8 | unsigned short ws_row; | ||
| 9 | unsigned short ws_col; | ||
| 10 | unsigned short ws_xpixel; | ||
| 11 | unsigned short ws_ypixel; | ||
| 12 | }; | ||
| 13 | |||
| 14 | #define NCC 8 | ||
| 15 | struct termio { | ||
| 16 | unsigned short c_iflag; /* input mode flags */ | ||
| 17 | unsigned short c_oflag; /* output mode flags */ | ||
| 18 | unsigned short c_cflag; /* control mode flags */ | ||
| 19 | unsigned short c_lflag; /* local mode flags */ | ||
| 20 | unsigned char c_line; /* line discipline */ | ||
| 21 | unsigned char c_cc[NCC]; /* control characters */ | ||
| 22 | }; | ||
| 23 | |||
| 24 | #ifdef __KERNEL__ | ||
| 25 | /* intr=^C quit=^| erase=del kill=^U | ||
| 26 | eof=^D vtime=\0 vmin=\1 sxtc=\0 | ||
| 27 | start=^Q stop=^S susp=^Z eol=\0 | ||
| 28 | reprint=^R discard=^U werase=^W lnext=^V | ||
| 29 | eol2=\0 | ||
| 30 | */ | ||
| 31 | #define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" | ||
| 32 | #endif | ||
| 33 | |||
| 34 | /* modem lines */ | ||
| 35 | #define TIOCM_LE 0x001 | ||
| 36 | #define TIOCM_DTR 0x002 | ||
| 37 | #define TIOCM_RTS 0x004 | ||
| 38 | #define TIOCM_ST 0x008 | ||
| 39 | #define TIOCM_SR 0x010 | ||
| 40 | #define TIOCM_CTS 0x020 | ||
| 41 | #define TIOCM_CAR 0x040 | ||
| 42 | #define TIOCM_RNG 0x080 | ||
| 43 | #define TIOCM_DSR 0x100 | ||
| 44 | #define TIOCM_CD TIOCM_CAR | ||
| 45 | #define TIOCM_RI TIOCM_RNG | ||
| 46 | #define TIOCM_OUT1 0x2000 | ||
| 47 | #define TIOCM_OUT2 0x4000 | ||
| 48 | #define TIOCM_LOOP 0x8000 | ||
| 49 | |||
| 50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
| 51 | |||
| 52 | #ifdef __KERNEL__ | ||
| 53 | |||
| 54 | /* | ||
| 55 | * Translate a "termio" structure into a "termios". Ugh. | ||
| 56 | */ | ||
| 57 | #define SET_LOW_TERMIOS_BITS(termios, termio, x) { \ | ||
| 58 | unsigned short __tmp; \ | ||
| 59 | get_user(__tmp,&(termio)->x); \ | ||
| 60 | *(unsigned short *) &(termios)->x = __tmp; \ | ||
| 61 | } | ||
| 62 | |||
| 63 | #define user_termio_to_kernel_termios(termios, termio) \ | ||
| 64 | ({ \ | ||
| 65 | SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \ | ||
| 66 | SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \ | ||
| 67 | SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \ | ||
| 68 | SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \ | ||
| 69 | copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \ | ||
| 70 | }) | ||
| 71 | |||
| 72 | /* | ||
| 73 | * Translate a "termios" structure into a "termio". Ugh. | ||
| 74 | */ | ||
| 75 | #define kernel_termios_to_user_termio(termio, termios) \ | ||
| 76 | ({ \ | ||
| 77 | put_user((termios)->c_iflag, &(termio)->c_iflag); \ | ||
| 78 | put_user((termios)->c_oflag, &(termio)->c_oflag); \ | ||
| 79 | put_user((termios)->c_cflag, &(termio)->c_cflag); \ | ||
| 80 | put_user((termios)->c_lflag, &(termio)->c_lflag); \ | ||
| 81 | put_user((termios)->c_line, &(termio)->c_line); \ | ||
| 82 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ | ||
| 83 | }) | ||
| 84 | |||
| 85 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) | ||
| 86 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) | ||
| 87 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) | ||
| 88 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) | ||
| 89 | |||
| 90 | #endif /* __KERNEL__ */ | ||
| 91 | |||
| 92 | #endif /* __ASM_ARM_TERMIOS_H */ | ||
diff --git a/arch/arm/include/asm/types.h b/arch/arm/include/asm/types.h new file mode 100644 index 00000000000..48192ac3a23 --- /dev/null +++ b/arch/arm/include/asm/types.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | #ifndef __ASM_ARM_TYPES_H | ||
| 2 | #define __ASM_ARM_TYPES_H | ||
| 3 | |||
| 4 | #include <asm-generic/int-ll64.h> | ||
| 5 | |||
| 6 | #ifndef __ASSEMBLY__ | ||
| 7 | |||
| 8 | typedef unsigned short umode_t; | ||
| 9 | |||
| 10 | #endif /* __ASSEMBLY__ */ | ||
| 11 | |||
| 12 | /* | ||
| 13 | * These aren't exported outside the kernel to avoid name space clashes | ||
| 14 | */ | ||
| 15 | #ifdef __KERNEL__ | ||
| 16 | |||
| 17 | #define BITS_PER_LONG 32 | ||
| 18 | |||
| 19 | #endif /* __KERNEL__ */ | ||
| 20 | |||
| 21 | #endif | ||
| 22 | |||
diff --git a/arch/arm/include/asm/unaligned.h b/arch/arm/include/asm/unaligned.h new file mode 100644 index 00000000000..44593a89490 --- /dev/null +++ b/arch/arm/include/asm/unaligned.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | #ifndef _ASM_ARM_UNALIGNED_H | ||
| 2 | #define _ASM_ARM_UNALIGNED_H | ||
| 3 | |||
| 4 | #include <linux/unaligned/le_byteshift.h> | ||
| 5 | #include <linux/unaligned/be_byteshift.h> | ||
| 6 | #include <linux/unaligned/generic.h> | ||
| 7 | |||
| 8 | /* | ||
| 9 | * Select endianness | ||
| 10 | */ | ||
| 11 | #ifndef __ARMEB__ | ||
| 12 | #define get_unaligned __get_unaligned_le | ||
| 13 | #define put_unaligned __put_unaligned_le | ||
| 14 | #else | ||
| 15 | #define get_unaligned __get_unaligned_be | ||
| 16 | #define put_unaligned __put_unaligned_be | ||
| 17 | #endif | ||
| 18 | |||
| 19 | #endif /* _ASM_ARM_UNALIGNED_H */ | ||
