aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-12 16:28:54 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-12 16:28:54 -0400
commit0b9062f6b57a87f22309c6b920a51aaa66ce2a13 (patch)
treecbef02e5b1bfc1557a53f7d45c7d632fb1f91ae5 /include
parent82afee684fe3badaf5ee3fc5b6fda687d558bfb5 (diff)
parentde61b542b822746d1498718c40f5dd740da49629 (diff)
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] Rename PC speaker code [MIPS] Don't use genrtc. [MIPS] Remove unused time.c for swarm [MIPS] Sparse: Use NULL for pointer [MIPS] Fix a sparse warning in arch/mips/pci/pci.c [MIPS] SMTC: Interrupt mask backstop hack [MIPS] separate platform_device registration for VR41xx RTC [MIPS] Separate platform_device registration for VR41xx GPIO [MIPS] MIPSsim: Fix build. [MIPS] separate platform_device registration for VR41xx serial interface [MIPS] Include cacheflush.h in uncache.c [MIPS] Cleanup tlbdebug.h [MIPS] Change names of local variables to silence sparse (part 2) [MIPS] Workaround for a sparse warning in include/asm-mips/io.h [MIPS] RM: Use only phyiscal address for 82596 and 53c710 [MIPS] Hydrogen3: Remove remaining bits of code. [MIPS] DEC: Fix modpost warning. Revert "[MIPS] DEC: Fix modpost warning." [MIPS] Fix resume for 64K page size on R4000 class processors.
Diffstat (limited to 'include')
-rw-r--r--include/asm-mips/io.h3
-rw-r--r--include/asm-mips/irq.h2
-rw-r--r--include/asm-mips/mipsregs.h20
-rw-r--r--include/asm-mips/rtc.h73
-rw-r--r--include/asm-mips/tlbdebug.h4
-rw-r--r--include/asm-mips/vr41xx/giu.h9
-rw-r--r--include/asm-mips/vr41xx/siu.h2
7 files changed, 24 insertions, 89 deletions
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h
index 12bcc1f9fba9..7ba92890ea13 100644
--- a/include/asm-mips/io.h
+++ b/include/asm-mips/io.h
@@ -212,7 +212,8 @@ static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size,
212 */ 212 */
213 if (__IS_LOW512(phys_addr) && __IS_LOW512(last_addr) && 213 if (__IS_LOW512(phys_addr) && __IS_LOW512(last_addr) &&
214 flags == _CACHE_UNCACHED) 214 flags == _CACHE_UNCACHED)
215 return (void __iomem *)CKSEG1ADDR(phys_addr); 215 return (void __iomem *)
216 (unsigned long)CKSEG1ADDR(phys_addr);
216 } 217 }
217 218
218 return __ioremap(offset, size, flags); 219 return __ioremap(offset, size, flags);
diff --git a/include/asm-mips/irq.h b/include/asm-mips/irq.h
index 3ca6a076124d..97102ebc54b1 100644
--- a/include/asm-mips/irq.h
+++ b/include/asm-mips/irq.h
@@ -24,7 +24,7 @@ static inline int irq_canonicalize(int irq)
24#define irq_canonicalize(irq) (irq) /* Sane hardware, sane code ... */ 24#define irq_canonicalize(irq) (irq) /* Sane hardware, sane code ... */
25#endif 25#endif
26 26
27#ifdef CONFIG_MIPS_MT_SMTC 27#ifdef CONFIG_MIPS_MT_SMTC_IM_BACKSTOP
28/* 28/*
29 * Clear interrupt mask handling "backstop" if irq_hwmask 29 * Clear interrupt mask handling "backstop" if irq_hwmask
30 * entry so indicates. This implies that the ack() or end() 30 * entry so indicates. This implies that the ack() or end()
diff --git a/include/asm-mips/mipsregs.h b/include/asm-mips/mipsregs.h
index 706b3691f57e..18f47f1e8cd5 100644
--- a/include/asm-mips/mipsregs.h
+++ b/include/asm-mips/mipsregs.h
@@ -707,10 +707,10 @@ do { \
707 */ 707 */
708#define __read_64bit_c0_split(source, sel) \ 708#define __read_64bit_c0_split(source, sel) \
709({ \ 709({ \
710 unsigned long long val; \ 710 unsigned long long __val; \
711 unsigned long flags; \ 711 unsigned long __flags; \
712 \ 712 \
713 local_irq_save(flags); \ 713 local_irq_save(__flags); \
714 if (sel == 0) \ 714 if (sel == 0) \
715 __asm__ __volatile__( \ 715 __asm__ __volatile__( \
716 ".set\tmips64\n\t" \ 716 ".set\tmips64\n\t" \
@@ -719,7 +719,7 @@ do { \
719 "dsrl\t%M0, %M0, 32\n\t" \ 719 "dsrl\t%M0, %M0, 32\n\t" \
720 "dsrl\t%L0, %L0, 32\n\t" \ 720 "dsrl\t%L0, %L0, 32\n\t" \
721 ".set\tmips0" \ 721 ".set\tmips0" \
722 : "=r" (val)); \ 722 : "=r" (__val)); \
723 else \ 723 else \
724 __asm__ __volatile__( \ 724 __asm__ __volatile__( \
725 ".set\tmips64\n\t" \ 725 ".set\tmips64\n\t" \
@@ -728,17 +728,17 @@ do { \
728 "dsrl\t%M0, %M0, 32\n\t" \ 728 "dsrl\t%M0, %M0, 32\n\t" \
729 "dsrl\t%L0, %L0, 32\n\t" \ 729 "dsrl\t%L0, %L0, 32\n\t" \
730 ".set\tmips0" \ 730 ".set\tmips0" \
731 : "=r" (val)); \ 731 : "=r" (__val)); \
732 local_irq_restore(flags); \ 732 local_irq_restore(__flags); \
733 \ 733 \
734 val; \ 734 __val; \
735}) 735})
736 736
737#define __write_64bit_c0_split(source, sel, val) \ 737#define __write_64bit_c0_split(source, sel, val) \
738do { \ 738do { \
739 unsigned long flags; \ 739 unsigned long __flags; \
740 \ 740 \
741 local_irq_save(flags); \ 741 local_irq_save(__flags); \
742 if (sel == 0) \ 742 if (sel == 0) \
743 __asm__ __volatile__( \ 743 __asm__ __volatile__( \
744 ".set\tmips64\n\t" \ 744 ".set\tmips64\n\t" \
@@ -759,7 +759,7 @@ do { \
759 "dmtc0\t%L0, " #source ", " #sel "\n\t" \ 759 "dmtc0\t%L0, " #source ", " #sel "\n\t" \
760 ".set\tmips0" \ 760 ".set\tmips0" \
761 : : "r" (val)); \ 761 : : "r" (val)); \
762 local_irq_restore(flags); \ 762 local_irq_restore(__flags); \
763} while (0) 763} while (0)
764 764
765#define read_c0_index() __read_32bit_c0_register($0, 0) 765#define read_c0_index() __read_32bit_c0_register($0, 0)
diff --git a/include/asm-mips/rtc.h b/include/asm-mips/rtc.h
deleted file mode 100644
index 82ad401c7dca..000000000000
--- a/include/asm-mips/rtc.h
+++ /dev/null
@@ -1,73 +0,0 @@
1/*
2 * include/asm-mips/rtc.h
3 *
4 * (Really an interface for drivers/char/genrtc.c)
5 *
6 * Copyright (C) 2004 MontaVista Software Inc.
7 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
8 *
9 * Please read the COPYING file for all license details.
10 */
11
12#ifndef _MIPS_RTC_H
13#define _MIPS_RTC_H
14
15#ifdef __KERNEL__
16
17#include <linux/rtc.h>
18#include <asm/time.h>
19
20#define RTC_PIE 0x40 /* periodic interrupt enable */
21#define RTC_AIE 0x20 /* alarm interrupt enable */
22#define RTC_UIE 0x10 /* update-finished interrupt enable */
23
24/* some dummy definitions */
25#define RTC_BATT_BAD 0x100 /* battery bad */
26#define RTC_SQWE 0x08 /* enable square-wave output */
27#define RTC_DM_BINARY 0x04 /* all time/date values are BCD if clear */
28#define RTC_24H 0x02 /* 24 hour mode - else hours bit 7 means pm */
29#define RTC_DST_EN 0x01 /* auto switch DST - works f. USA only */
30
31static inline unsigned int get_rtc_time(struct rtc_time *time)
32{
33 unsigned long nowtime;
34
35 nowtime = rtc_mips_get_time();
36 to_tm(nowtime, time);
37 time->tm_year -= 1900;
38
39 return RTC_24H;
40}
41
42static inline int set_rtc_time(struct rtc_time *time)
43{
44 unsigned long nowtime;
45 int ret;
46
47 nowtime = mktime(time->tm_year+1900, time->tm_mon+1,
48 time->tm_mday, time->tm_hour, time->tm_min,
49 time->tm_sec);
50 ret = rtc_mips_set_time(nowtime);
51
52 return ret;
53}
54
55static inline unsigned int get_rtc_ss(void)
56{
57 struct rtc_time h;
58
59 get_rtc_time(&h);
60 return h.tm_sec;
61}
62
63static inline int get_rtc_pll(struct rtc_pll_info *pll)
64{
65 return -EINVAL;
66}
67
68static inline int set_rtc_pll(struct rtc_pll_info *pll)
69{
70 return -EINVAL;
71}
72#endif
73#endif
diff --git a/include/asm-mips/tlbdebug.h b/include/asm-mips/tlbdebug.h
index fff7a73e22d0..bb8f5c29c3d9 100644
--- a/include/asm-mips/tlbdebug.h
+++ b/include/asm-mips/tlbdebug.h
@@ -11,10 +11,6 @@
11/* 11/*
12 * TLB debugging functions: 12 * TLB debugging functions:
13 */ 13 */
14extern void dump_tlb(int first, int last);
15extern void dump_tlb_all(void); 14extern void dump_tlb_all(void);
16extern void dump_tlb_wired(void);
17extern void dump_tlb_addr(unsigned long addr);
18extern void dump_tlb_nonwired(void);
19 15
20#endif /* __ASM_TLBDEBUG_H */ 16#endif /* __ASM_TLBDEBUG_H */
diff --git a/include/asm-mips/vr41xx/giu.h b/include/asm-mips/vr41xx/giu.h
index 8109cda557dc..0bcdd3a5c256 100644
--- a/include/asm-mips/vr41xx/giu.h
+++ b/include/asm-mips/vr41xx/giu.h
@@ -20,6 +20,15 @@
20#ifndef __NEC_VR41XX_GIU_H 20#ifndef __NEC_VR41XX_GIU_H
21#define __NEC_VR41XX_GIU_H 21#define __NEC_VR41XX_GIU_H
22 22
23/*
24 * NEC VR4100 series GIU platform device IDs.
25 */
26enum {
27 GPIO_50PINS_PULLUPDOWN,
28 GPIO_36PINS,
29 GPIO_48PINS_EDGE_SELECT,
30};
31
23typedef enum { 32typedef enum {
24 IRQ_TRIGGER_LEVEL, 33 IRQ_TRIGGER_LEVEL,
25 IRQ_TRIGGER_EDGE, 34 IRQ_TRIGGER_EDGE,
diff --git a/include/asm-mips/vr41xx/siu.h b/include/asm-mips/vr41xx/siu.h
index 1fcf6e8082b4..98cdb4096485 100644
--- a/include/asm-mips/vr41xx/siu.h
+++ b/include/asm-mips/vr41xx/siu.h
@@ -20,6 +20,8 @@
20#ifndef __NEC_VR41XX_SIU_H 20#ifndef __NEC_VR41XX_SIU_H
21#define __NEC_VR41XX_SIU_H 21#define __NEC_VR41XX_SIU_H
22 22
23#define SIU_PORTS_MAX 2
24
23typedef enum { 25typedef enum {
24 SIU_INTERFACE_RS232C, 26 SIU_INTERFACE_RS232C,
25 SIU_INTERFACE_IRDA, 27 SIU_INTERFACE_IRDA,