diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 15:54:07 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 15:54:07 -0500 |
| commit | 541ef5cbb8e68189d47272cea52a69abc30259bc (patch) | |
| tree | 09c871320e6918ebb9b642a632971b364684d8a3 /drivers | |
| parent | 0191b625ca5a46206d2fb862bb08f36f2fcb3b31 (diff) | |
| parent | aa6eeeef78263e9891185c6cfaaf64808460a54a (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
m68k: use the new byteorder headers
fbcon: Protect free_irq() by MACH_IS_ATARI check
fbcon: remove broken mac vbl handler
m68k: fix trigraph ignored warning in setox.S
macfb annotations and compiler warning fix
m68k: mac baboon interrupt enable/disable
m68k: machw.h cleanup
m68k: Mac via cleanup and commentry
m68k: Reinstate mac rtc
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/ide/macide.c | 1 | ||||
| -rw-r--r-- | drivers/macintosh/via-cuda.c | 1 | ||||
| -rw-r--r-- | drivers/macintosh/via-macii.c | 1 | ||||
| -rw-r--r-- | drivers/macintosh/via-maciisi.c | 1 | ||||
| -rw-r--r-- | drivers/macintosh/via-pmu68k.c | 1 | ||||
| -rw-r--r-- | drivers/scsi/mac_scsi.c | 1 | ||||
| -rw-r--r-- | drivers/video/console/fbcon.c | 78 | ||||
| -rw-r--r-- | drivers/video/macfb.c | 33 |
8 files changed, 21 insertions, 96 deletions
diff --git a/drivers/ide/macide.c b/drivers/ide/macide.c index 43f97cc1d30e..3c60064f1d4f 100644 --- a/drivers/ide/macide.c +++ b/drivers/ide/macide.c | |||
| @@ -18,7 +18,6 @@ | |||
| 18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
| 19 | #include <linux/ide.h> | 19 | #include <linux/ide.h> |
| 20 | 20 | ||
| 21 | #include <asm/machw.h> | ||
| 22 | #include <asm/macintosh.h> | 21 | #include <asm/macintosh.h> |
| 23 | #include <asm/macints.h> | 22 | #include <asm/macints.h> |
| 24 | #include <asm/mac_baboon.h> | 23 | #include <asm/mac_baboon.h> |
diff --git a/drivers/macintosh/via-cuda.c b/drivers/macintosh/via-cuda.c index 741a93a3eb61..62dd1fdafecf 100644 --- a/drivers/macintosh/via-cuda.c +++ b/drivers/macintosh/via-cuda.c | |||
| @@ -23,7 +23,6 @@ | |||
| 23 | #else | 23 | #else |
| 24 | #include <asm/macintosh.h> | 24 | #include <asm/macintosh.h> |
| 25 | #include <asm/macints.h> | 25 | #include <asm/macints.h> |
| 26 | #include <asm/machw.h> | ||
| 27 | #include <asm/mac_via.h> | 26 | #include <asm/mac_via.h> |
| 28 | #endif | 27 | #endif |
| 29 | #include <asm/io.h> | 28 | #include <asm/io.h> |
diff --git a/drivers/macintosh/via-macii.c b/drivers/macintosh/via-macii.c index 6e6dd17ab572..817f37a875c9 100644 --- a/drivers/macintosh/via-macii.c +++ b/drivers/macintosh/via-macii.c | |||
| @@ -33,7 +33,6 @@ | |||
| 33 | #include <linux/init.h> | 33 | #include <linux/init.h> |
| 34 | #include <asm/macintosh.h> | 34 | #include <asm/macintosh.h> |
| 35 | #include <asm/macints.h> | 35 | #include <asm/macints.h> |
| 36 | #include <asm/machw.h> | ||
| 37 | #include <asm/mac_via.h> | 36 | #include <asm/mac_via.h> |
| 38 | #include <asm/system.h> | 37 | #include <asm/system.h> |
| 39 | 38 | ||
diff --git a/drivers/macintosh/via-maciisi.c b/drivers/macintosh/via-maciisi.c index 2dc788042707..4d686c0bdea0 100644 --- a/drivers/macintosh/via-maciisi.c +++ b/drivers/macintosh/via-maciisi.c | |||
| @@ -24,7 +24,6 @@ | |||
| 24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
| 25 | #include <asm/macintosh.h> | 25 | #include <asm/macintosh.h> |
| 26 | #include <asm/macints.h> | 26 | #include <asm/macints.h> |
| 27 | #include <asm/machw.h> | ||
| 28 | #include <asm/mac_via.h> | 27 | #include <asm/mac_via.h> |
| 29 | 28 | ||
| 30 | static volatile unsigned char *via; | 29 | static volatile unsigned char *via; |
diff --git a/drivers/macintosh/via-pmu68k.c b/drivers/macintosh/via-pmu68k.c index b64741c95ac4..fb9fa614a0e8 100644 --- a/drivers/macintosh/via-pmu68k.c +++ b/drivers/macintosh/via-pmu68k.c | |||
| @@ -35,7 +35,6 @@ | |||
| 35 | 35 | ||
| 36 | #include <asm/macintosh.h> | 36 | #include <asm/macintosh.h> |
| 37 | #include <asm/macints.h> | 37 | #include <asm/macints.h> |
| 38 | #include <asm/machw.h> | ||
| 39 | #include <asm/mac_via.h> | 38 | #include <asm/mac_via.h> |
| 40 | 39 | ||
| 41 | #include <asm/pgtable.h> | 40 | #include <asm/pgtable.h> |
diff --git a/drivers/scsi/mac_scsi.c b/drivers/scsi/mac_scsi.c index 0248919bc2df..bf2a1c516293 100644 --- a/drivers/scsi/mac_scsi.c +++ b/drivers/scsi/mac_scsi.c | |||
| @@ -47,7 +47,6 @@ | |||
| 47 | 47 | ||
| 48 | #include <asm/macintosh.h> | 48 | #include <asm/macintosh.h> |
| 49 | #include <asm/macints.h> | 49 | #include <asm/macints.h> |
| 50 | #include <asm/machw.h> | ||
| 51 | #include <asm/mac_via.h> | 50 | #include <asm/mac_via.h> |
| 52 | 51 | ||
| 53 | #include "scsi.h" | 52 | #include "scsi.h" |
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 0b2adefe9e3d..4bcff81b50e0 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
| @@ -81,9 +81,6 @@ | |||
| 81 | #ifdef CONFIG_ATARI | 81 | #ifdef CONFIG_ATARI |
| 82 | #include <asm/atariints.h> | 82 | #include <asm/atariints.h> |
| 83 | #endif | 83 | #endif |
| 84 | #ifdef CONFIG_MAC | ||
| 85 | #include <asm/macints.h> | ||
| 86 | #endif | ||
| 87 | #if defined(__mc68000__) | 84 | #if defined(__mc68000__) |
| 88 | #include <asm/machdep.h> | 85 | #include <asm/machdep.h> |
| 89 | #include <asm/setup.h> | 86 | #include <asm/setup.h> |
| @@ -160,8 +157,6 @@ static int fbcon_set_origin(struct vc_data *); | |||
| 160 | 157 | ||
| 161 | /* # VBL ints between cursor state changes */ | 158 | /* # VBL ints between cursor state changes */ |
| 162 | #define ATARI_CURSOR_BLINK_RATE (42) | 159 | #define ATARI_CURSOR_BLINK_RATE (42) |
| 163 | #define MAC_CURSOR_BLINK_RATE (32) | ||
| 164 | #define DEFAULT_CURSOR_BLINK_RATE (20) | ||
| 165 | 160 | ||
| 166 | static int vbl_cursor_cnt; | 161 | static int vbl_cursor_cnt; |
| 167 | static int fbcon_cursor_noblink; | 162 | static int fbcon_cursor_noblink; |
| @@ -210,19 +205,6 @@ static void fbcon_start(void); | |||
| 210 | static void fbcon_exit(void); | 205 | static void fbcon_exit(void); |
| 211 | static struct device *fbcon_device; | 206 | static struct device *fbcon_device; |
| 212 | 207 | ||
| 213 | #ifdef CONFIG_MAC | ||
| 214 | /* | ||
| 215 | * On the Macintoy, there may or may not be a working VBL int. We need to probe | ||
| 216 | */ | ||
| 217 | static int vbl_detected; | ||
| 218 | |||
| 219 | static irqreturn_t fb_vbl_detect(int irq, void *dummy) | ||
| 220 | { | ||
| 221 | vbl_detected++; | ||
| 222 | return IRQ_HANDLED; | ||
| 223 | } | ||
| 224 | #endif | ||
| 225 | |||
| 226 | #ifdef CONFIG_FRAMEBUFFER_CONSOLE_ROTATION | 208 | #ifdef CONFIG_FRAMEBUFFER_CONSOLE_ROTATION |
| 227 | static inline void fbcon_set_rotation(struct fb_info *info) | 209 | static inline void fbcon_set_rotation(struct fb_info *info) |
| 228 | { | 210 | { |
| @@ -421,7 +403,7 @@ static void fb_flashcursor(struct work_struct *work) | |||
| 421 | release_console_sem(); | 403 | release_console_sem(); |
| 422 | } | 404 | } |
| 423 | 405 | ||
| 424 | #if defined(CONFIG_ATARI) || defined(CONFIG_MAC) | 406 | #ifdef CONFIG_ATARI |
| 425 | static int cursor_blink_rate; | 407 | static int cursor_blink_rate; |
| 426 | static irqreturn_t fb_vbl_handler(int irq, void *dev_id) | 408 | static irqreturn_t fb_vbl_handler(int irq, void *dev_id) |
| 427 | { | 409 | { |
| @@ -949,9 +931,7 @@ static const char *fbcon_startup(void) | |||
| 949 | struct fb_info *info = NULL; | 931 | struct fb_info *info = NULL; |
| 950 | struct fbcon_ops *ops; | 932 | struct fbcon_ops *ops; |
| 951 | int rows, cols; | 933 | int rows, cols; |
| 952 | int irqres; | ||
| 953 | 934 | ||
| 954 | irqres = 1; | ||
| 955 | /* | 935 | /* |
| 956 | * If num_registered_fb is zero, this is a call for the dummy part. | 936 | * If num_registered_fb is zero, this is a call for the dummy part. |
| 957 | * The frame buffer devices weren't initialized yet. | 937 | * The frame buffer devices weren't initialized yet. |
| @@ -1040,56 +1020,11 @@ static const char *fbcon_startup(void) | |||
| 1040 | #ifdef CONFIG_ATARI | 1020 | #ifdef CONFIG_ATARI |
| 1041 | if (MACH_IS_ATARI) { | 1021 | if (MACH_IS_ATARI) { |
| 1042 | cursor_blink_rate = ATARI_CURSOR_BLINK_RATE; | 1022 | cursor_blink_rate = ATARI_CURSOR_BLINK_RATE; |
| 1043 | irqres = | 1023 | (void)request_irq(IRQ_AUTO_4, fb_vbl_handler, |
| 1044 | request_irq(IRQ_AUTO_4, fb_vbl_handler, | ||
| 1045 | IRQ_TYPE_PRIO, "framebuffer vbl", | 1024 | IRQ_TYPE_PRIO, "framebuffer vbl", |
| 1046 | info); | 1025 | info); |
| 1047 | } | 1026 | } |
| 1048 | #endif /* CONFIG_ATARI */ | 1027 | #endif /* CONFIG_ATARI */ |
| 1049 | |||
| 1050 | #ifdef CONFIG_MAC | ||
| 1051 | /* | ||
| 1052 | * On a Macintoy, the VBL interrupt may or may not be active. | ||
| 1053 | * As interrupt based cursor is more reliable and race free, we | ||
| 1054 | * probe for VBL interrupts. | ||
| 1055 | */ | ||
| 1056 | if (MACH_IS_MAC) { | ||
| 1057 | int ct = 0; | ||
| 1058 | /* | ||
| 1059 | * Probe for VBL: set temp. handler ... | ||
| 1060 | */ | ||
| 1061 | irqres = request_irq(IRQ_MAC_VBL, fb_vbl_detect, 0, | ||
| 1062 | "framebuffer vbl", info); | ||
| 1063 | vbl_detected = 0; | ||
| 1064 | |||
| 1065 | /* | ||
| 1066 | * ... and spin for 20 ms ... | ||
| 1067 | */ | ||
| 1068 | while (!vbl_detected && ++ct < 1000) | ||
| 1069 | udelay(20); | ||
| 1070 | |||
| 1071 | if (ct == 1000) | ||
| 1072 | printk | ||
| 1073 | ("fbcon_startup: No VBL detected, using timer based cursor.\n"); | ||
| 1074 | |||
| 1075 | free_irq(IRQ_MAC_VBL, fb_vbl_detect); | ||
| 1076 | |||
| 1077 | if (vbl_detected) { | ||
| 1078 | /* | ||
| 1079 | * interrupt based cursor ok | ||
| 1080 | */ | ||
| 1081 | cursor_blink_rate = MAC_CURSOR_BLINK_RATE; | ||
| 1082 | irqres = | ||
| 1083 | request_irq(IRQ_MAC_VBL, fb_vbl_handler, 0, | ||
| 1084 | "framebuffer vbl", info); | ||
| 1085 | } else { | ||
| 1086 | /* | ||
| 1087 | * VBL not detected: fall through, use timer based cursor | ||
| 1088 | */ | ||
| 1089 | irqres = 1; | ||
| 1090 | } | ||
| 1091 | } | ||
| 1092 | #endif /* CONFIG_MAC */ | ||
| 1093 | 1028 | ||
| 1094 | fbcon_add_cursor_timer(info); | 1029 | fbcon_add_cursor_timer(info); |
| 1095 | fbcon_has_exited = 0; | 1030 | fbcon_has_exited = 0; |
| @@ -3520,11 +3455,8 @@ static void fbcon_exit(void) | |||
| 3520 | return; | 3455 | return; |
| 3521 | 3456 | ||
| 3522 | #ifdef CONFIG_ATARI | 3457 | #ifdef CONFIG_ATARI |
| 3523 | free_irq(IRQ_AUTO_4, fb_vbl_handler); | 3458 | if (MACH_IS_ATARI) |
| 3524 | #endif | 3459 | free_irq(IRQ_AUTO_4, fb_vbl_handler); |
| 3525 | #ifdef CONFIG_MAC | ||
| 3526 | if (MACH_IS_MAC && vbl_detected) | ||
| 3527 | free_irq(IRQ_MAC_VBL, fb_vbl_handler); | ||
| 3528 | #endif | 3460 | #endif |
| 3529 | 3461 | ||
| 3530 | kfree((void *)softback_buf); | 3462 | kfree((void *)softback_buf); |
diff --git a/drivers/video/macfb.c b/drivers/video/macfb.c index ee380d5f3410..d66887e8cbb1 100644 --- a/drivers/video/macfb.c +++ b/drivers/video/macfb.c | |||
| @@ -36,7 +36,6 @@ | |||
| 36 | #include <asm/irq.h> | 36 | #include <asm/irq.h> |
| 37 | #include <asm/macintosh.h> | 37 | #include <asm/macintosh.h> |
| 38 | #include <asm/io.h> | 38 | #include <asm/io.h> |
| 39 | #include <asm/machw.h> | ||
| 40 | 39 | ||
| 41 | /* Common DAC base address for the LC, RBV, Valkyrie, and IIvx */ | 40 | /* Common DAC base address for the LC, RBV, Valkyrie, and IIvx */ |
| 42 | #define DAC_BASE 0x50f24000 | 41 | #define DAC_BASE 0x50f24000 |
| @@ -78,34 +77,34 @@ static int csc_setpalette (unsigned int regno, unsigned int red, | |||
| 78 | unsigned int green, unsigned int blue, | 77 | unsigned int green, unsigned int blue, |
| 79 | struct fb_info *fb_info); | 78 | struct fb_info *fb_info); |
| 80 | 79 | ||
| 81 | static volatile struct { | 80 | static struct { |
| 82 | unsigned char addr; | 81 | unsigned char addr; |
| 83 | /* Note: word-aligned */ | 82 | /* Note: word-aligned */ |
| 84 | char pad[3]; | 83 | char pad[3]; |
| 85 | unsigned char lut; | 84 | unsigned char lut; |
| 86 | } *valkyrie_cmap_regs; | 85 | } __iomem *valkyrie_cmap_regs; |
| 87 | 86 | ||
| 88 | static volatile struct { | 87 | static struct { |
| 89 | unsigned char addr; | 88 | unsigned char addr; |
| 90 | unsigned char lut; | 89 | unsigned char lut; |
| 91 | } *v8_brazil_cmap_regs; | 90 | } __iomem *v8_brazil_cmap_regs; |
| 92 | 91 | ||
| 93 | static volatile struct { | 92 | static struct { |
| 94 | unsigned char addr; | 93 | unsigned char addr; |
| 95 | char pad1[3]; /* word aligned */ | 94 | char pad1[3]; /* word aligned */ |
| 96 | unsigned char lut; | 95 | unsigned char lut; |
| 97 | char pad2[3]; /* word aligned */ | 96 | char pad2[3]; /* word aligned */ |
| 98 | unsigned char cntl; /* a guess as to purpose */ | 97 | unsigned char cntl; /* a guess as to purpose */ |
| 99 | } *rbv_cmap_regs; | 98 | } __iomem *rbv_cmap_regs; |
| 100 | 99 | ||
| 101 | static volatile struct { | 100 | static struct { |
| 102 | unsigned long reset; | 101 | unsigned long reset; |
| 103 | unsigned long pad1[3]; | 102 | unsigned long pad1[3]; |
| 104 | unsigned char pad2[3]; | 103 | unsigned char pad2[3]; |
| 105 | unsigned char lut; | 104 | unsigned char lut; |
| 106 | } *dafb_cmap_regs; | 105 | } __iomem *dafb_cmap_regs; |
| 107 | 106 | ||
| 108 | static volatile struct { | 107 | static struct { |
| 109 | unsigned char addr; /* OFFSET: 0x00 */ | 108 | unsigned char addr; /* OFFSET: 0x00 */ |
| 110 | unsigned char pad1[15]; | 109 | unsigned char pad1[15]; |
| 111 | unsigned char lut; /* OFFSET: 0x10 */ | 110 | unsigned char lut; /* OFFSET: 0x10 */ |
| @@ -114,16 +113,16 @@ static volatile struct { | |||
| 114 | unsigned char pad3[7]; | 113 | unsigned char pad3[7]; |
| 115 | unsigned long vbl_addr; /* OFFSET: 0x28 */ | 114 | unsigned long vbl_addr; /* OFFSET: 0x28 */ |
| 116 | unsigned int status2; /* OFFSET: 0x2C */ | 115 | unsigned int status2; /* OFFSET: 0x2C */ |
| 117 | } *civic_cmap_regs; | 116 | } __iomem *civic_cmap_regs; |
| 118 | 117 | ||
| 119 | static volatile struct { | 118 | static struct { |
| 120 | char pad1[0x40]; | 119 | char pad1[0x40]; |
| 121 | unsigned char clut_waddr; /* 0x40 */ | 120 | unsigned char clut_waddr; /* 0x40 */ |
| 122 | char pad2; | 121 | char pad2; |
| 123 | unsigned char clut_data; /* 0x42 */ | 122 | unsigned char clut_data; /* 0x42 */ |
| 124 | char pad3[0x3]; | 123 | char pad3[0x3]; |
| 125 | unsigned char clut_raddr; /* 0x46 */ | 124 | unsigned char clut_raddr; /* 0x46 */ |
| 126 | } *csc_cmap_regs; | 125 | } __iomem *csc_cmap_regs; |
| 127 | 126 | ||
| 128 | /* We will leave these the way they are for the time being */ | 127 | /* We will leave these the way they are for the time being */ |
| 129 | struct mdc_cmap_regs { | 128 | struct mdc_cmap_regs { |
| @@ -507,10 +506,10 @@ static int csc_setpalette (unsigned int regno, unsigned int red, | |||
| 507 | struct fb_info *info) | 506 | struct fb_info *info) |
| 508 | { | 507 | { |
| 509 | mdelay(1); | 508 | mdelay(1); |
| 510 | csc_cmap_regs->clut_waddr = regno; | 509 | nubus_writeb(regno, &csc_cmap_regs->clut_waddr); |
| 511 | csc_cmap_regs->clut_data = red; | 510 | nubus_writeb(red, &csc_cmap_regs->clut_data); |
| 512 | csc_cmap_regs->clut_data = green; | 511 | nubus_writeb(green, &csc_cmap_regs->clut_data); |
| 513 | csc_cmap_regs->clut_data = blue; | 512 | nubus_writeb(blue, &csc_cmap_regs->clut_data); |
| 514 | return 0; | 513 | return 0; |
| 515 | } | 514 | } |
| 516 | 515 | ||
