Go to the documentation of this file. 61 #define _set_mca_port_bit( _d, _adr, _msk ) \ 62 _mbg_outp8( (_d), 0, _adr, _mbg_inp8( (_d), 0, _adr ) | (_msk) ) 64 #define _clear_mca_port_bit( _d, _adr, _msk ) \ 65 _mbg_outp8( (_d), 0, _adr, _mbg_inp8( (_d), 0, _adr ) & ~(_msk) ) 68 #define _mcic_enb_reg( _r ) ( (_r) + 0x0A ) 69 #define _mcic_ack_reg( _r ) ( (_r) + 0x0B ) 76 #define _pcps_ddev_ack_irq_mca( _d ) \ 77 if ( _pcps_ddev_is_mca( _d ) ) \ 79 MBG_IOPORT_ADDR_MAPPED port = _mcic_ack_reg( _pcps_ddev_io_base_mapped( _d, 0 ) ); \ 80 _set_mca_port_bit( (_d), port, MCIC_IRQ ); \ 85 #define _pcps_ddev_enb_irq_mca( _d ) \ 86 if ( _pcps_ddev_is_mca( _d ) ) \ 88 uint16_t port = _mcic_enb_reg( _pcps_ddev_io_base_mapped( _d, 0 ) ); \ 89 set_pos_reg( 4, _pcps_ddev_slot_num( _d ), active_irq.map_code ); \ 90 _set_mca_port_bit( (_d), port, MCIC_IRQ ); \ 95 #define _pcps_ddev_disb_irq_mca( _d ) \ 96 if ( _pcps_ddev_is_mca( _d ) ) \ 98 uint16_t port = _mcic_enb_reg( _pcps_ddev_io_base_mapped( _d, 0 ) ); \ 99 _clear_mca_port_bit( (_d), port, MCIC_IRQ ); \ 105 #define _pcps_ddev_enb_irq_mca( _d ) _nop_macro_fnc() 106 #define _pcps_ddev_disb_irq_mca( _d ) _nop_macro_fnc() 107 #define _pcps_ddev_ack_irq_mca( _d ) _nop_macro_fnc() 115 #if ( _PCPS_USE_PCI ) 121 #define _mbg_inp32_to_cpu_ex( _d, _i, _p, _r ) \ 122 ( _pcps_ddev_access_mode_mm( (_d) ) ? \ 123 _mbg_mmrd32_to_cpu( &(_d)->mm_asic_addr->control_status.ul ) : \ 124 _mbg_inp32_to_cpu( (_d), (_i), (_p) ) \ 127 #define _mbg_outp32_to_mbg_ex( _d, _i, _p, _r, _v ) \ 130 if ( _pcps_ddev_access_mode_mm( (_d) ) ) \ 131 _mbg_mmwr32_to_mbg( &(_d)->mm_asic_addr->control_status.ul, (_v) ); \ 133 _mbg_outp32_to_mbg( _d, _i, _p, _v ); \ 138 #define _mbg_inp32_to_cpu_ex( _d, _i, _p, _r ) _mbg_inp32_to_cpu( _d, _i, _p ) 139 #define _mbg_outp32_to_mbg_ex( _d, _i, _p, _r, _v ) _mbg_outp32_to_mbg( _d, _i, _p, _v ) 150 #define _pcps_ddev_ack_irq_pci( _d ) \ 151 if ( (_d)->irq_ack_mask ) \ 153 if ( _pcps_ddev_is_pci_amcc( _d ) ) \ 154 _mbg_inp32_to_cpu( (_d), 0, _pcps_ddev_io_base_mapped( _d, 0 ) \ 155 + AMCC_OP_REG_IMB4 ); \ 157 _mbg_outp32_to_mbg_ex( (_d), 0, (_d)->irq_ack_port, control_status, \ 158 (_d)->irq_ack_mask ); \ 163 #define _pcps_ddev_enb_irq_pci( _d ) \ 164 if ( (_d)->irq_enb_mask ) \ 166 uint32_t intcsr = _mbg_inp32_to_cpu_ex( (_d), 0, \ 167 (_d)->irq_enb_disb_port, control_status ); \ 168 _mbg_outp32_to_mbg_ex( (_d), 0, (_d)->irq_enb_disb_port, control_status, \ 169 intcsr | (_d)->irq_enb_mask ); \ 174 #define _pcps_ddev_disb_irq_pci( _d ) \ 175 if ( (_d)->irq_disb_mask ) \ 177 uint32_t intcsr = _mbg_inp32_to_cpu_ex( (_d), 0, \ 178 (_d)->irq_enb_disb_port, control_status ); \ 179 _mbg_outp32_to_mbg_ex( (_d), 0, (_d)->irq_enb_disb_port, control_status, \ 180 intcsr & ~(_d)->irq_disb_mask ); \ 185 #define _pcps_ddev_enb_irq_pci( _d ) _nop_macro_fnc() 186 #define _pcps_ddev_disb_irq_pci( _d ) _nop_macro_fnc() 187 #define _pcps_ddev_ack_irq_pci( _d ) _nop_macro_fnc() 197 #if ( _PCPS_USE_PCI ) 198 #define _pcps_ddev_has_gen_irq( _d ) \ 199 ( ( (_d)->irq_flag_mask ) ? \ 200 ( _mbg_inp32_to_cpu_ex( (_d), 0, (_d)->irq_flag_port, control_status ) & (_d)->irq_flag_mask ) : \ 201 ( _pcps_ddev_read_status_port( _d ) & PCPS_ST_IRQF ) \ 205 #define _pcps_ddev_has_gen_irq( _d ) \ 206 ( _pcps_ddev_read_status_port( _d ) & PCPS_ST_IRQF ) 212 #define _pcps_ddev_ack_irq( _d ) \ 214 _pcps_ddev_ack_irq_pci( _d ); \ 215 _pcps_ddev_ack_irq_mca( _d ); \ 227 #define _pcps_ddev_enb_irq( _d, _cmd ) \ 229 _pcps_sem_inc( _d ); \ 230 _pcps_ddev_enb_irq_mca( _d ); \ 231 _pcps_ddev_enb_irq_pci( _d ); \ 232 _pcps_write_byte( _d, _cmd ); \ 233 _pcps_sem_dec( _d ); \ 242 #define _pcps_ddev_disb_irq( _d ) \ 244 _pcps_sem_inc( _d ); \ 245 _pcps_write_byte( _d, PCPS_IRQ_NONE ); \ 246 _pcps_ddev_disb_irq_mca( _d ); \ 247 _pcps_ddev_disb_irq_pci( _d ); \ 248 _pcps_sem_dec( _d ); \