~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/m68k/mac/baboon.c

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/m68k/mac/baboon.c (Version linux-6.12-rc7) and /arch/m68k/mac/baboon.c (Version linux-4.16.18)


  1 // SPDX-License-Identifier: GPL-2.0                 1 // SPDX-License-Identifier: GPL-2.0
  2 /*                                                  2 /*
  3  * Baboon Custom IC Management                      3  * Baboon Custom IC Management
  4  *                                                  4  *
  5  * The Baboon custom IC controls the IDE, PCMC      5  * The Baboon custom IC controls the IDE, PCMCIA and media bay on the
  6  * PowerBook 190. It multiplexes multiple inte      6  * PowerBook 190. It multiplexes multiple interrupt sources onto the
  7  * Nubus slot $C interrupt.                         7  * Nubus slot $C interrupt.
  8  */                                                 8  */
  9                                                     9 
 10 #include <linux/types.h>                           10 #include <linux/types.h>
 11 #include <linux/kernel.h>                          11 #include <linux/kernel.h>
 12 #include <linux/irq.h>                             12 #include <linux/irq.h>
 13                                                    13 
 14 #include <asm/macintosh.h>                         14 #include <asm/macintosh.h>
 15 #include <asm/macints.h>                           15 #include <asm/macints.h>
 16 #include <asm/mac_baboon.h>                        16 #include <asm/mac_baboon.h>
 17                                                    17 
 18 #include "mac.h"                               << 
 19                                                << 
 20 int baboon_present;                                18 int baboon_present;
 21 static volatile struct baboon *baboon;             19 static volatile struct baboon *baboon;
 22                                                    20 
                                                   >>  21 #if 0
                                                   >>  22 extern int macide_ack_intr(struct ata_channel *);
                                                   >>  23 #endif
                                                   >>  24 
 23 /*                                                 25 /*
 24  * Baboon initialization.                          26  * Baboon initialization.
 25  */                                                27  */
 26                                                    28 
 27 void __init baboon_init(void)                      29 void __init baboon_init(void)
 28 {                                                  30 {
 29         if (macintosh_config->ident != MAC_MOD     31         if (macintosh_config->ident != MAC_MODEL_PB190) {
 30                 baboon = NULL;                     32                 baboon = NULL;
 31                 baboon_present = 0;                33                 baboon_present = 0;
 32                 return;                            34                 return;
 33         }                                          35         }
 34                                                    36 
 35         baboon = (struct baboon *) BABOON_BASE     37         baboon = (struct baboon *) BABOON_BASE;
 36         baboon_present = 1;                        38         baboon_present = 1;
 37                                                    39 
 38         pr_debug("Baboon detected at %p\n", ba     40         pr_debug("Baboon detected at %p\n", baboon);
 39 }                                                  41 }
 40                                                    42 
 41 /*                                                 43 /*
 42  * Baboon interrupt handler.                   !!  44  * Baboon interrupt handler. This works a lot like a VIA.
 43  * XXX how do you clear a pending IRQ? is it e << 
 44  */                                                45  */
 45                                                    46 
 46 static void baboon_irq(struct irq_desc *desc)      47 static void baboon_irq(struct irq_desc *desc)
 47 {                                                  48 {
 48         short events, irq_bit;                 !!  49         int irq_bit, irq_num;
 49         int irq_num;                           !!  50         unsigned char events;
 50                                                    51 
 51         events = baboon->mb_ifr & 0x07;            52         events = baboon->mb_ifr & 0x07;
                                                   >>  53         if (!events)
                                                   >>  54                 return;
                                                   >>  55 
 52         irq_num = IRQ_BABOON_0;                    56         irq_num = IRQ_BABOON_0;
 53         irq_bit = 1;                               57         irq_bit = 1;
 54         do {                                       58         do {
 55                 if (events & irq_bit) {        !!  59                 if (events & irq_bit) {
 56                         events &= ~irq_bit;    !!  60                         baboon->mb_ifr &= ~irq_bit;
 57                         generic_handle_irq(irq     61                         generic_handle_irq(irq_num);
 58                 }                                  62                 }
 59                 ++irq_num;                     << 
 60                 irq_bit <<= 1;                     63                 irq_bit <<= 1;
 61         } while (events);                      !!  64                 irq_num++;
                                                   >>  65         } while(events >= irq_bit);
                                                   >>  66 #if 0
                                                   >>  67         if (baboon->mb_ifr & 0x02) macide_ack_intr(NULL);
                                                   >>  68         /* for now we need to smash all interrupts */
                                                   >>  69         baboon->mb_ifr &= ~events;
                                                   >>  70 #endif
 62 }                                                  71 }
 63                                                    72 
 64 /*                                                 73 /*
 65  * Register the Baboon interrupt dispatcher on     74  * Register the Baboon interrupt dispatcher on nubus slot $C.
 66  */                                                75  */
 67                                                    76 
 68 void __init baboon_register_interrupts(void)       77 void __init baboon_register_interrupts(void)
 69 {                                                  78 {
 70         irq_set_chained_handler(IRQ_NUBUS_C, b     79         irq_set_chained_handler(IRQ_NUBUS_C, baboon_irq);
 71 }                                                  80 }
 72                                                    81 
 73 /*                                                 82 /*
 74  * The means for masking individual Baboon int     83  * The means for masking individual Baboon interrupts remains a mystery.
 75  * However, since we only use the IDE IRQ, we      84  * However, since we only use the IDE IRQ, we can just enable/disable all
 76  * Baboon interrupts. If/when we handle more t     85  * Baboon interrupts. If/when we handle more than one Baboon IRQ, we must
 77  * either figure out how to mask them individu     86  * either figure out how to mask them individually or else implement the
 78  * same workaround that's used for NuBus slots     87  * same workaround that's used for NuBus slots (see nubus_disabled and
 79  * via_nubus_irq_shutdown).                        88  * via_nubus_irq_shutdown).
 80  */                                                89  */
 81                                                    90 
 82 void baboon_irq_enable(int irq)                    91 void baboon_irq_enable(int irq)
 83 {                                                  92 {
 84         mac_irq_enable(irq_get_irq_data(IRQ_NU     93         mac_irq_enable(irq_get_irq_data(IRQ_NUBUS_C));
 85 }                                                  94 }
 86                                                    95 
 87 void baboon_irq_disable(int irq)                   96 void baboon_irq_disable(int irq)
 88 {                                                  97 {
 89         mac_irq_disable(irq_get_irq_data(IRQ_N     98         mac_irq_disable(irq_get_irq_data(IRQ_NUBUS_C));
 90 }                                                  99 }
 91                                                   100 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php