aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-12-03 20:34:14 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-12-03 20:34:14 -0500
commit4ef679e6caf1261b6380a610a705a90d7e2738c6 (patch)
tree6b59360c267508647ae4492f171668ef6ce82e32 /include
parent98ac62defe529d04a192688f40d801a2d8fbcf98 (diff)
parent9a40525788a1b692ee0fc780a8cdb2ac808de1b0 (diff)
Merge branch 'upstream-fixes'
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/semaphore.h5
-rw-r--r--include/asm-arm/spinlock.h26
-rw-r--r--include/asm-mips/mach-qemu/timex.h16
-rw-r--r--include/linux/i2c-id.h1
-rw-r--r--include/media/tveeprom.h4
5 files changed, 45 insertions, 7 deletions
diff --git a/include/asm-arm/semaphore.h b/include/asm-arm/semaphore.h
index 71ca7d412687..d5dc624f452a 100644
--- a/include/asm-arm/semaphore.h
+++ b/include/asm-arm/semaphore.h
@@ -47,11 +47,6 @@ static inline void init_MUTEX_LOCKED(struct semaphore *sem)
47 sema_init(sem, 0); 47 sema_init(sem, 0);
48} 48}
49 49
50static inline int sema_count(struct semaphore *sem)
51{
52 return atomic_read(&sem->count);
53}
54
55/* 50/*
56 * special register calling convention 51 * special register calling convention
57 */ 52 */
diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h
index 6ed4f916b166..43ad4e55878c 100644
--- a/include/asm-arm/spinlock.h
+++ b/include/asm-arm/spinlock.h
@@ -30,6 +30,9 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
30 __asm__ __volatile__( 30 __asm__ __volatile__(
31"1: ldrex %0, [%1]\n" 31"1: ldrex %0, [%1]\n"
32" teq %0, #0\n" 32" teq %0, #0\n"
33#ifdef CONFIG_CPU_32v6K
34" wfene\n"
35#endif
33" strexeq %0, %2, [%1]\n" 36" strexeq %0, %2, [%1]\n"
34" teqeq %0, #0\n" 37" teqeq %0, #0\n"
35" bne 1b" 38" bne 1b"
@@ -65,7 +68,11 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock)
65 smp_mb(); 68 smp_mb();
66 69
67 __asm__ __volatile__( 70 __asm__ __volatile__(
68" str %1, [%0]" 71" str %1, [%0]\n"
72#ifdef CONFIG_CPU_32v6K
73" mcr p15, 0, %1, c7, c10, 4\n" /* DSB */
74" sev"
75#endif
69 : 76 :
70 : "r" (&lock->lock), "r" (0) 77 : "r" (&lock->lock), "r" (0)
71 : "cc"); 78 : "cc");
@@ -87,6 +94,9 @@ static inline void __raw_write_lock(raw_rwlock_t *rw)
87 __asm__ __volatile__( 94 __asm__ __volatile__(
88"1: ldrex %0, [%1]\n" 95"1: ldrex %0, [%1]\n"
89" teq %0, #0\n" 96" teq %0, #0\n"
97#ifdef CONFIG_CPU_32v6K
98" wfene\n"
99#endif
90" strexeq %0, %2, [%1]\n" 100" strexeq %0, %2, [%1]\n"
91" teq %0, #0\n" 101" teq %0, #0\n"
92" bne 1b" 102" bne 1b"
@@ -122,7 +132,11 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw)
122 smp_mb(); 132 smp_mb();
123 133
124 __asm__ __volatile__( 134 __asm__ __volatile__(
125 "str %1, [%0]" 135 "str %1, [%0]\n"
136#ifdef CONFIG_CPU_32v6K
137" mcr p15, 0, %1, c7, c10, 4\n" /* DSB */
138" sev\n"
139#endif
126 : 140 :
127 : "r" (&rw->lock), "r" (0) 141 : "r" (&rw->lock), "r" (0)
128 : "cc"); 142 : "cc");
@@ -148,6 +162,9 @@ static inline void __raw_read_lock(raw_rwlock_t *rw)
148"1: ldrex %0, [%2]\n" 162"1: ldrex %0, [%2]\n"
149" adds %0, %0, #1\n" 163" adds %0, %0, #1\n"
150" strexpl %1, %0, [%2]\n" 164" strexpl %1, %0, [%2]\n"
165#ifdef CONFIG_CPU_32v6K
166" wfemi\n"
167#endif
151" rsbpls %0, %1, #0\n" 168" rsbpls %0, %1, #0\n"
152" bmi 1b" 169" bmi 1b"
153 : "=&r" (tmp), "=&r" (tmp2) 170 : "=&r" (tmp), "=&r" (tmp2)
@@ -169,6 +186,11 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw)
169" strex %1, %0, [%2]\n" 186" strex %1, %0, [%2]\n"
170" teq %1, #0\n" 187" teq %1, #0\n"
171" bne 1b" 188" bne 1b"
189#ifdef CONFIG_CPU_32v6K
190"\n cmp %0, #0\n"
191" mcreq p15, 0, %0, c7, c10, 4\n"
192" seveq"
193#endif
172 : "=&r" (tmp), "=&r" (tmp2) 194 : "=&r" (tmp), "=&r" (tmp2)
173 : "r" (&rw->lock) 195 : "r" (&rw->lock)
174 : "cc"); 196 : "cc");
diff --git a/include/asm-mips/mach-qemu/timex.h b/include/asm-mips/mach-qemu/timex.h
new file mode 100644
index 000000000000..cd543693fb0a
--- /dev/null
+++ b/include/asm-mips/mach-qemu/timex.h
@@ -0,0 +1,16 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 2005 Daniel Jacobowitz
7 */
8#ifndef __ASM_MACH_QEMU_TIMEX_H
9#define __ASM_MACH_QEMU_TIMEX_H
10
11/*
12 * We use a simulated i8254 PIC...
13 */
14#define CLOCK_TICK_RATE 1193182
15
16#endif /* __ASM_MACH_QEMU_TIMEX_H */
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h
index 1543daaa9c5e..ef3b5632e63a 100644
--- a/include/linux/i2c-id.h
+++ b/include/linux/i2c-id.h
@@ -108,6 +108,7 @@
108#define I2C_DRIVERID_SAA7127 72 /* saa7124 video encoder */ 108#define I2C_DRIVERID_SAA7127 72 /* saa7124 video encoder */
109#define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */ 109#define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */
110#define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */ 110#define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */
111#define I2C_DRIVERID_I2C_IR 75 /* I2C InfraRed on Video boards */
111 112
112#define I2C_DRIVERID_EXP0 0xF0 /* experimental use id's */ 113#define I2C_DRIVERID_EXP0 0xF0 /* experimental use id's */
113#define I2C_DRIVERID_EXP1 0xF1 114#define I2C_DRIVERID_EXP1 0xF1
diff --git a/include/media/tveeprom.h b/include/media/tveeprom.h
index e2035c7da094..e9fc1a785497 100644
--- a/include/media/tveeprom.h
+++ b/include/media/tveeprom.h
@@ -4,12 +4,15 @@
4struct tveeprom { 4struct tveeprom {
5 u32 has_radio; 5 u32 has_radio;
6 u32 has_ir; /* 0: no IR, 1: IR present, 2: unknown */ 6 u32 has_ir; /* 0: no IR, 1: IR present, 2: unknown */
7 u32 has_MAC_address; /* 0: no MAC, 1: MAC present, 2: unknown */
7 8
8 u32 tuner_type; 9 u32 tuner_type;
9 u32 tuner_formats; 10 u32 tuner_formats;
11 u32 tuner_hauppauge_model;
10 12
11 u32 tuner2_type; 13 u32 tuner2_type;
12 u32 tuner2_formats; 14 u32 tuner2_formats;
15 u32 tuner2_hauppauge_model;
13 16
14 u32 digitizer; 17 u32 digitizer;
15 u32 digitizer_formats; 18 u32 digitizer_formats;
@@ -21,6 +24,7 @@ struct tveeprom {
21 u32 revision; 24 u32 revision;
22 u32 serial_number; 25 u32 serial_number;
23 char rev_str[5]; 26 char rev_str[5];
27 u8 MAC_address[6];
24}; 28};
25 29
26void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, 30void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee,