Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+105 -206
+2 -2
arch/m68k/fpsp040/setox.S
··· 36 36 | depending on their values, the program may run faster or slower -- 37 37 | but no worse than 10% slower even in the extreme cases. 38 38 | 39 - | The program setoxm1 takes approximately ???/??? cycles for input 39 + | The program setoxm1 takes approximately ??? / ??? cycles for input 40 40 | argument X, 0.25 <= |X| < 70log2. For |X| < 0.25, it takes 41 - | approximately ???/??? cycles. For the less common arguments, 41 + | approximately ??? / ??? cycles. For the less common arguments, 42 42 | depending on their values, the program may run faster or slower -- 43 43 | but no worse than 10% slower even in the extreme cases. 44 44 |
+31 -11
arch/m68k/mac/baboon.c
··· 18 18 #include <asm/macints.h> 19 19 #include <asm/mac_baboon.h> 20 20 21 - /* #define DEBUG_BABOON */ 22 21 /* #define DEBUG_IRQS */ 22 + 23 + extern void mac_enable_irq(unsigned int); 24 + extern void mac_disable_irq(unsigned int); 23 25 24 26 int baboon_present; 25 27 static volatile struct baboon *baboon; 28 + static unsigned char baboon_disabled; 26 29 27 30 #if 0 28 31 extern int macide_ack_intr(struct ata_channel *); ··· 91 88 92 89 void __init baboon_register_interrupts(void) 93 90 { 94 - request_irq(IRQ_NUBUS_C, baboon_irq, IRQ_FLG_LOCK|IRQ_FLG_FAST, 95 - "baboon", (void *) baboon); 91 + baboon_disabled = 0; 92 + request_irq(IRQ_NUBUS_C, baboon_irq, 0, "baboon", (void *)baboon); 96 93 } 97 94 98 - void baboon_irq_enable(int irq) { 95 + /* 96 + * The means for masking individual baboon interrupts remains a mystery, so 97 + * enable the umbrella interrupt only when no baboon interrupt is disabled. 98 + */ 99 + 100 + void baboon_irq_enable(int irq) 101 + { 102 + int irq_idx = IRQ_IDX(irq); 103 + 99 104 #ifdef DEBUG_IRQUSE 100 105 printk("baboon_irq_enable(%d)\n", irq); 101 106 #endif 102 - /* FIXME: figure out how to mask and unmask baboon interrupt sources */ 103 - enable_irq(IRQ_NUBUS_C); 107 + 108 + baboon_disabled &= ~(1 << irq_idx); 109 + if (!baboon_disabled) 110 + mac_enable_irq(IRQ_NUBUS_C); 104 111 } 105 112 106 - void baboon_irq_disable(int irq) { 113 + void baboon_irq_disable(int irq) 114 + { 115 + int irq_idx = IRQ_IDX(irq); 116 + 107 117 #ifdef DEBUG_IRQUSE 108 118 printk("baboon_irq_disable(%d)\n", irq); 109 119 #endif 110 - disable_irq(IRQ_NUBUS_C); 120 + 121 + baboon_disabled |= 1 << irq_idx; 122 + if (baboon_disabled) 123 + mac_disable_irq(IRQ_NUBUS_C); 111 124 } 112 125 113 - void baboon_irq_clear(int irq) { 114 - int irq_idx = IRQ_IDX(irq); 126 + void baboon_irq_clear(int irq) 127 + { 128 + int irq_idx = IRQ_IDX(irq); 115 129 116 130 baboon->mb_ifr &= ~(1 << irq_idx); 117 131 } 118 132 119 133 int baboon_irq_pending(int irq) 120 134 { 121 - int irq_idx = IRQ_IDX(irq); 135 + int irq_idx = IRQ_IDX(irq); 122 136 123 137 return baboon->mb_ifr & (1 << irq_idx); 124 138 }
-3
arch/m68k/mac/config.c
··· 162 162 mach_init_IRQ = mac_init_IRQ; 163 163 mach_get_model = mac_get_model; 164 164 mach_gettimeoffset = mac_gettimeoffset; 165 - #warning move to adb/via init 166 - #if 0 167 165 mach_hwclk = mac_hwclk; 168 - #endif 169 166 mach_set_clock_mmss = mac_set_clock_mmss; 170 167 mach_reset = mac_reset; 171 168 mach_halt = mac_poweroff;
-1
arch/m68k/mac/debug.c
··· 24 24 #define BOOTINFO_COMPAT_1_0 25 25 #include <asm/setup.h> 26 26 #include <asm/bootinfo.h> 27 - #include <asm/machw.h> 28 27 #include <asm/macints.h> 29 28 30 29 extern unsigned long mac_videobase;
+4 -5
arch/m68k/mac/macints.c
··· 127 127 #include <asm/irq.h> 128 128 #include <asm/traps.h> 129 129 #include <asm/bootinfo.h> 130 - #include <asm/machw.h> 131 130 #include <asm/macintosh.h> 132 131 #include <asm/mac_via.h> 133 132 #include <asm/mac_psc.h> ··· 214 215 215 216 /* #define DEBUG_MACINTS */ 216 217 217 - static void mac_enable_irq(unsigned int irq); 218 - static void mac_disable_irq(unsigned int irq); 218 + void mac_enable_irq(unsigned int irq); 219 + void mac_disable_irq(unsigned int irq); 219 220 220 221 static struct irq_controller mac_irq_controller = { 221 222 .name = "mac", ··· 274 275 * These routines are just dispatchers to the VIA/OSS/PSC routines. 275 276 */ 276 277 277 - static void mac_enable_irq(unsigned int irq) 278 + void mac_enable_irq(unsigned int irq) 278 279 { 279 280 int irq_src = IRQ_SRC(irq); 280 281 ··· 307 308 } 308 309 } 309 310 310 - static void mac_disable_irq(unsigned int irq) 311 + void mac_disable_irq(unsigned int irq) 311 312 { 312 313 int irq_src = IRQ_SRC(irq); 313 314
+10 -6
arch/m68k/mac/misc.c
··· 93 93 #define cuda_write_pram NULL 94 94 #endif 95 95 96 - #ifdef CONFIG_ADB_PMU68K 96 + #if 0 /* def CONFIG_ADB_PMU68K */ 97 97 static long pmu_read_time(void) 98 98 { 99 99 struct adb_request req; ··· 148 148 #define pmu_write_pram NULL 149 149 #endif 150 150 151 - #ifdef CONFIG_ADB_MACIISI 151 + #if 0 /* def CONFIG_ADB_MACIISI */ 152 152 extern int maciisi_request(struct adb_request *req, 153 153 void (*done)(struct adb_request *), int nbytes, ...); 154 154 ··· 717 717 unmktime(now, 0, 718 718 &t->tm_year, &t->tm_mon, &t->tm_mday, 719 719 &t->tm_hour, &t->tm_min, &t->tm_sec); 720 + #if 0 720 721 printk("mac_hwclk: read %04d-%02d-%-2d %02d:%02d:%02d\n", 721 - t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec); 722 + t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, 723 + t->tm_hour, t->tm_min, t->tm_sec); 724 + #endif 722 725 } else { /* write */ 726 + #if 0 723 727 printk("mac_hwclk: tried to write %04d-%02d-%-2d %02d:%02d:%02d\n", 724 - t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec); 728 + t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, 729 + t->tm_hour, t->tm_min, t->tm_sec); 730 + #endif 725 731 726 - #if 0 /* it trashes my rtc */ 727 732 now = mktime(t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, 728 733 t->tm_hour, t->tm_min, t->tm_sec); 729 734 ··· 747 742 case MAC_ADB_IISI: 748 743 maciisi_write_time(now); 749 744 } 750 - #endif 751 745 } 752 746 return 0; 753 747 }
-1
arch/m68k/mac/oss.c
··· 21 21 #include <linux/init.h> 22 22 23 23 #include <asm/bootinfo.h> 24 - #include <asm/machw.h> 25 24 #include <asm/macintosh.h> 26 25 #include <asm/macints.h> 27 26 #include <asm/mac_via.h>
+32 -48
arch/m68k/mac/via.c
··· 32 32 #include <asm/bootinfo.h> 33 33 #include <asm/macintosh.h> 34 34 #include <asm/macints.h> 35 - #include <asm/machw.h> 36 35 #include <asm/mac_via.h> 37 36 #include <asm/mac_psc.h> 38 37 39 38 volatile __u8 *via1, *via2; 40 - #if 0 41 - /* See note in mac_via.h about how this is possibly not useful */ 42 - volatile long *via_memory_bogon=(long *)&via_memory_bogon; 43 - #endif 44 39 int rbv_present; 45 40 int via_alt_mapping; 46 41 EXPORT_SYMBOL(via_alt_mapping); ··· 61 66 #define MAC_CLOCK_LOW (MAC_CLOCK_TICK&0xFF) 62 67 #define MAC_CLOCK_HIGH (MAC_CLOCK_TICK>>8) 63 68 64 - /* To disable a NuBus slot on Quadras we make the slot IRQ lines outputs, set 69 + /* To disable a NuBus slot on Quadras we make that slot IRQ line an output set 65 70 * high. On RBV we just use the slot interrupt enable register. On Macs with 66 71 * genuine VIA chips we must use nubus_disabled to keep track of disabled slot 67 72 * interrupts. When any slot IRQ is disabled we mask the (edge triggered) CA1 ··· 175 180 via1[vT1CH] = 0; 176 181 via1[vT2CL] = 0; 177 182 via1[vT2CH] = 0; 178 - via1[vACR] &= 0x3F; 183 + via1[vACR] &= ~0xC0; /* setup T1 timer with no PB7 output */ 179 184 via1[vACR] &= ~0x03; /* disable port A & B latches */ 180 185 181 186 /* ··· 198 203 199 204 /* Everything below this point is VIA2/RBV only... */ 200 205 201 - if (oss_present) return; 206 + if (oss_present) 207 + return; 202 208 203 - #if 1 204 209 /* Some machines support an alternate IRQ mapping that spreads */ 205 210 /* Ethernet and Sound out to their own autolevel IRQs and moves */ 206 211 /* VIA1 to level 6. A/UX uses this mapping and we do too. Note */ 207 212 /* that the IIfx emulates this alternate mapping using the OSS. */ 208 213 209 - switch(macintosh_config->ident) { 210 - case MAC_MODEL_P475: 211 - case MAC_MODEL_P475F: 212 - case MAC_MODEL_P575: 213 - case MAC_MODEL_Q605: 214 - case MAC_MODEL_Q605_ACC: 215 - case MAC_MODEL_C610: 216 - case MAC_MODEL_Q610: 217 - case MAC_MODEL_Q630: 218 - case MAC_MODEL_C650: 219 - case MAC_MODEL_Q650: 220 - case MAC_MODEL_Q700: 221 - case MAC_MODEL_Q800: 222 - case MAC_MODEL_Q900: 223 - case MAC_MODEL_Q950: 214 + via_alt_mapping = 0; 215 + if (macintosh_config->via_type == MAC_VIA_QUADRA) 216 + switch (macintosh_config->ident) { 217 + case MAC_MODEL_C660: 218 + case MAC_MODEL_Q840: 219 + /* not applicable */ 220 + break; 221 + case MAC_MODEL_P588: 222 + case MAC_MODEL_TV: 223 + case MAC_MODEL_PB140: 224 + case MAC_MODEL_PB145: 225 + case MAC_MODEL_PB160: 226 + case MAC_MODEL_PB165: 227 + case MAC_MODEL_PB165C: 228 + case MAC_MODEL_PB170: 229 + case MAC_MODEL_PB180: 230 + case MAC_MODEL_PB180C: 231 + case MAC_MODEL_PB190: 232 + case MAC_MODEL_PB520: 233 + /* not yet tested */ 234 + break; 235 + default: 224 236 via_alt_mapping = 1; 225 237 via1[vDirB] |= 0x40; 226 238 via1[vBufB] &= ~0x40; 227 239 break; 228 - default: 229 - via_alt_mapping = 0; 230 - break; 231 - } 232 - #else 233 - via_alt_mapping = 0; 234 - #endif 240 + } 235 241 236 242 /* 237 243 * Now initialize VIA2. For RBV we just kill all interrupts; ··· 248 252 via2[vT1CH] = 0; 249 253 via2[vT2CL] = 0; 250 254 via2[vT2CH] = 0; 251 - via2[vACR] &= 0x3F; 255 + via2[vACR] &= ~0xC0; /* setup T1 timer with no PB7 output */ 252 256 via2[vACR] &= ~0x03; /* disable port A & B latches */ 253 257 } 254 258 255 259 /* 256 - * Set vPCR for SCSI interrupts (but not on RBV) 260 + * Set vPCR for control line interrupts (but not on RBV) 257 261 */ 258 262 if (!rbv_present) { 263 + /* For all VIA types, CA1 (SLOTS IRQ) and CB1 (ASC IRQ) 264 + * are made negative edge triggered here. 265 + */ 259 266 if (macintosh_config->scsi_type == MAC_SCSI_OLD) { 260 267 /* CB2 (IRQ) indep. input, positive edge */ 261 268 /* CA2 (DRQ) indep. input, positive edge */ ··· 465 466 ++irq_num; 466 467 irq_bit <<= 1; 467 468 } while (events >= irq_bit); 468 - 469 - #if 0 /* freakin' pmu is doing weird stuff */ 470 - if (!oss_present) { 471 - /* This (still) seems to be necessary to get IDE 472 - working. However, if you enable VBL interrupts, 473 - you're screwed... */ 474 - /* FIXME: should we check the SLOTIRQ bit before 475 - pulling this stunt? */ 476 - /* No, it won't be set. that's why we're doing this. */ 477 - via_irq_disable(IRQ_MAC_NUBUS); 478 - via_irq_clear(IRQ_MAC_NUBUS); 479 - m68k_handle_int(IRQ_MAC_NUBUS); 480 - via_irq_enable(IRQ_MAC_NUBUS); 481 - } 482 - #endif 483 469 return IRQ_HANDLED; 484 470 } 485 471
-1
drivers/ide/macide.c
··· 18 18 #include <linux/delay.h> 19 19 #include <linux/ide.h> 20 20 21 - #include <asm/machw.h> 22 21 #include <asm/macintosh.h> 23 22 #include <asm/macints.h> 24 23 #include <asm/mac_baboon.h>
-1
drivers/macintosh/via-cuda.c
··· 23 23 #else 24 24 #include <asm/macintosh.h> 25 25 #include <asm/macints.h> 26 - #include <asm/machw.h> 27 26 #include <asm/mac_via.h> 28 27 #endif 29 28 #include <asm/io.h>
-1
drivers/macintosh/via-macii.c
··· 33 33 #include <linux/init.h> 34 34 #include <asm/macintosh.h> 35 35 #include <asm/macints.h> 36 - #include <asm/machw.h> 37 36 #include <asm/mac_via.h> 38 37 #include <asm/system.h> 39 38
-1
drivers/macintosh/via-maciisi.c
··· 24 24 #include <linux/interrupt.h> 25 25 #include <asm/macintosh.h> 26 26 #include <asm/macints.h> 27 - #include <asm/machw.h> 28 27 #include <asm/mac_via.h> 29 28 30 29 static volatile unsigned char *via;
-1
drivers/macintosh/via-pmu68k.c
··· 35 35 36 36 #include <asm/macintosh.h> 37 37 #include <asm/macints.h> 38 - #include <asm/machw.h> 39 38 #include <asm/mac_via.h> 40 39 41 40 #include <asm/pgtable.h>
-1
drivers/scsi/mac_scsi.c
··· 47 47 48 48 #include <asm/macintosh.h> 49 49 #include <asm/macints.h> 50 - #include <asm/machw.h> 51 50 #include <asm/mac_via.h> 52 51 53 52 #include "scsi.h"
+5 -73
drivers/video/console/fbcon.c
··· 81 81 #ifdef CONFIG_ATARI 82 82 #include <asm/atariints.h> 83 83 #endif 84 - #ifdef CONFIG_MAC 85 - #include <asm/macints.h> 86 - #endif 87 84 #if defined(__mc68000__) 88 85 #include <asm/machdep.h> 89 86 #include <asm/setup.h> ··· 157 160 158 161 /* # VBL ints between cursor state changes */ 159 162 #define ATARI_CURSOR_BLINK_RATE (42) 160 - #define MAC_CURSOR_BLINK_RATE (32) 161 - #define DEFAULT_CURSOR_BLINK_RATE (20) 162 163 163 164 static int vbl_cursor_cnt; 164 165 static int fbcon_cursor_noblink; ··· 204 209 static void fbcon_start(void); 205 210 static void fbcon_exit(void); 206 211 static struct device *fbcon_device; 207 - 208 - #ifdef CONFIG_MAC 209 - /* 210 - * On the Macintoy, there may or may not be a working VBL int. We need to probe 211 - */ 212 - static int vbl_detected; 213 - 214 - static irqreturn_t fb_vbl_detect(int irq, void *dummy) 215 - { 216 - vbl_detected++; 217 - return IRQ_HANDLED; 218 - } 219 - #endif 220 212 221 213 #ifdef CONFIG_FRAMEBUFFER_CONSOLE_ROTATION 222 214 static inline void fbcon_set_rotation(struct fb_info *info) ··· 403 421 release_console_sem(); 404 422 } 405 423 406 - #if defined(CONFIG_ATARI) || defined(CONFIG_MAC) 424 + #ifdef CONFIG_ATARI 407 425 static int cursor_blink_rate; 408 426 static irqreturn_t fb_vbl_handler(int irq, void *dev_id) 409 427 { ··· 931 949 struct fb_info *info = NULL; 932 950 struct fbcon_ops *ops; 933 951 int rows, cols; 934 - int irqres; 935 952 936 - irqres = 1; 937 953 /* 938 954 * If num_registered_fb is zero, this is a call for the dummy part. 939 955 * The frame buffer devices weren't initialized yet. ··· 1020 1040 #ifdef CONFIG_ATARI 1021 1041 if (MACH_IS_ATARI) { 1022 1042 cursor_blink_rate = ATARI_CURSOR_BLINK_RATE; 1023 - irqres = 1024 - request_irq(IRQ_AUTO_4, fb_vbl_handler, 1043 + (void)request_irq(IRQ_AUTO_4, fb_vbl_handler, 1025 1044 IRQ_TYPE_PRIO, "framebuffer vbl", 1026 1045 info); 1027 1046 } 1028 - #endif /* CONFIG_ATARI */ 1029 - 1030 - #ifdef CONFIG_MAC 1031 - /* 1032 - * On a Macintoy, the VBL interrupt may or may not be active. 1033 - * As interrupt based cursor is more reliable and race free, we 1034 - * probe for VBL interrupts. 1035 - */ 1036 - if (MACH_IS_MAC) { 1037 - int ct = 0; 1038 - /* 1039 - * Probe for VBL: set temp. handler ... 1040 - */ 1041 - irqres = request_irq(IRQ_MAC_VBL, fb_vbl_detect, 0, 1042 - "framebuffer vbl", info); 1043 - vbl_detected = 0; 1044 - 1045 - /* 1046 - * ... and spin for 20 ms ... 1047 - */ 1048 - while (!vbl_detected && ++ct < 1000) 1049 - udelay(20); 1050 - 1051 - if (ct == 1000) 1052 - printk 1053 - ("fbcon_startup: No VBL detected, using timer based cursor.\n"); 1054 - 1055 - free_irq(IRQ_MAC_VBL, fb_vbl_detect); 1056 - 1057 - if (vbl_detected) { 1058 - /* 1059 - * interrupt based cursor ok 1060 - */ 1061 - cursor_blink_rate = MAC_CURSOR_BLINK_RATE; 1062 - irqres = 1063 - request_irq(IRQ_MAC_VBL, fb_vbl_handler, 0, 1064 - "framebuffer vbl", info); 1065 - } else { 1066 - /* 1067 - * VBL not detected: fall through, use timer based cursor 1068 - */ 1069 - irqres = 1; 1070 - } 1071 - } 1072 - #endif /* CONFIG_MAC */ 1047 + #endif /* CONFIG_ATARI */ 1073 1048 1074 1049 fbcon_add_cursor_timer(info); 1075 1050 fbcon_has_exited = 0; ··· 3455 3520 return; 3456 3521 3457 3522 #ifdef CONFIG_ATARI 3458 - free_irq(IRQ_AUTO_4, fb_vbl_handler); 3459 - #endif 3460 - #ifdef CONFIG_MAC 3461 - if (MACH_IS_MAC && vbl_detected) 3462 - free_irq(IRQ_MAC_VBL, fb_vbl_handler); 3523 + if (MACH_IS_ATARI) 3524 + free_irq(IRQ_AUTO_4, fb_vbl_handler); 3463 3525 #endif 3464 3526 3465 3527 kfree((void *)softback_buf);
+16 -17
drivers/video/macfb.c
··· 36 36 #include <asm/irq.h> 37 37 #include <asm/macintosh.h> 38 38 #include <asm/io.h> 39 - #include <asm/machw.h> 40 39 41 40 /* Common DAC base address for the LC, RBV, Valkyrie, and IIvx */ 42 41 #define DAC_BASE 0x50f24000 ··· 77 78 unsigned int green, unsigned int blue, 78 79 struct fb_info *fb_info); 79 80 80 - static volatile struct { 81 + static struct { 81 82 unsigned char addr; 82 83 /* Note: word-aligned */ 83 84 char pad[3]; 84 85 unsigned char lut; 85 - } *valkyrie_cmap_regs; 86 + } __iomem *valkyrie_cmap_regs; 86 87 87 - static volatile struct { 88 + static struct { 88 89 unsigned char addr; 89 90 unsigned char lut; 90 - } *v8_brazil_cmap_regs; 91 + } __iomem *v8_brazil_cmap_regs; 91 92 92 - static volatile struct { 93 + static struct { 93 94 unsigned char addr; 94 95 char pad1[3]; /* word aligned */ 95 96 unsigned char lut; 96 97 char pad2[3]; /* word aligned */ 97 98 unsigned char cntl; /* a guess as to purpose */ 98 - } *rbv_cmap_regs; 99 + } __iomem *rbv_cmap_regs; 99 100 100 - static volatile struct { 101 + static struct { 101 102 unsigned long reset; 102 103 unsigned long pad1[3]; 103 104 unsigned char pad2[3]; 104 105 unsigned char lut; 105 - } *dafb_cmap_regs; 106 + } __iomem *dafb_cmap_regs; 106 107 107 - static volatile struct { 108 + static struct { 108 109 unsigned char addr; /* OFFSET: 0x00 */ 109 110 unsigned char pad1[15]; 110 111 unsigned char lut; /* OFFSET: 0x10 */ ··· 113 114 unsigned char pad3[7]; 114 115 unsigned long vbl_addr; /* OFFSET: 0x28 */ 115 116 unsigned int status2; /* OFFSET: 0x2C */ 116 - } *civic_cmap_regs; 117 + } __iomem *civic_cmap_regs; 117 118 118 - static volatile struct { 119 + static struct { 119 120 char pad1[0x40]; 120 121 unsigned char clut_waddr; /* 0x40 */ 121 122 char pad2; 122 123 unsigned char clut_data; /* 0x42 */ 123 124 char pad3[0x3]; 124 125 unsigned char clut_raddr; /* 0x46 */ 125 - } *csc_cmap_regs; 126 + } __iomem *csc_cmap_regs; 126 127 127 128 /* We will leave these the way they are for the time being */ 128 129 struct mdc_cmap_regs { ··· 506 507 struct fb_info *info) 507 508 { 508 509 mdelay(1); 509 - csc_cmap_regs->clut_waddr = regno; 510 - csc_cmap_regs->clut_data = red; 511 - csc_cmap_regs->clut_data = green; 512 - csc_cmap_regs->clut_data = blue; 510 + nubus_writeb(regno, &csc_cmap_regs->clut_waddr); 511 + nubus_writeb(red, &csc_cmap_regs->clut_data); 512 + nubus_writeb(green, &csc_cmap_regs->clut_data); 513 + nubus_writeb(blue, &csc_cmap_regs->clut_data); 513 514 return 0; 514 515 } 515 516
+5 -11
include/asm-m68k/byteorder.h
··· 4 4 #include <asm/types.h> 5 5 #include <linux/compiler.h> 6 6 7 - #ifdef __GNUC__ 7 + #define __BIG_ENDIAN 8 + #define __SWAB_64_THRU_32__ 8 9 9 - static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 val) 10 + static inline __attribute_const__ __u32 __arch_swab32(__u32 val) 10 11 { 11 12 __asm__("rolw #8,%0; swap %0; rolw #8,%0" : "=d" (val) : "0" (val)); 12 13 return val; 13 14 } 14 - #define __arch__swab32(x) ___arch__swab32(x) 15 + #define __arch_swab32 __arch_swab32 15 16 16 - #endif 17 - 18 - #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) 19 - # define __BYTEORDER_HAS_U64__ 20 - # define __SWAB_64_THRU_32__ 21 - #endif 22 - 23 - #include <linux/byteorder/big_endian.h> 17 + #include <linux/byteorder.h> 24 18 25 19 #endif /* _M68K_BYTEORDER_H */
-22
include/asm-m68k/machw.h
··· 26 26 #include <linux/types.h> 27 27 28 28 #if 0 29 - /* Mac SCSI Controller 5380 */ 30 - 31 - #define MAC_5380_BAS (0x50F10000) /* This is definitely wrong!! */ 32 - struct MAC_5380 { 33 - u_char scsi_data; 34 - u_char char_dummy1; 35 - u_char scsi_icr; 36 - u_char char_dummy2; 37 - u_char scsi_mode; 38 - u_char char_dummy3; 39 - u_char scsi_tcr; 40 - u_char char_dummy4; 41 - u_char scsi_idstat; 42 - u_char char_dummy5; 43 - u_char scsi_dmastat; 44 - u_char char_dummy6; 45 - u_char scsi_targrcv; 46 - u_char char_dummy7; 47 - u_char scsi_inircv; 48 - }; 49 - #define mac_scsi ((*(volatile struct MAC_5380 *)MAC_5380_BAS)) 50 - 51 29 /* 52 30 ** SCC Z8530 53 31 */