Changeset 141 for trunk/hal/tsar_mips32/drivers
- Timestamp:
- Jul 4, 2017, 3:02:31 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/drivers/soclib_pic.c
r75 r141 3 3 * 4 4 * Author Alain Greiner (2016) 5 * *5 * 6 6 * Copyright (c) UPMC Sorbonne Universites 7 7 * 8 8 * This file is part of ALMOS-MKH. 9 9 * 10 * ALMOS-MKH .is free software; you can redistribute it and/or modify it10 * ALMOS-MKH is free software; you can redistribute it and/or modify it 11 11 * under the terms of the GNU General Public License as published by 12 12 * the Free Software Foundation; version 2.0 of the License. 13 13 * 14 * ALMOS-MKH .is distributed in the hope that it will be useful, but14 * ALMOS-MKH is distributed in the hope that it will be useful, but 15 15 * WITHOUT ANY WARRANTY; without even the implied warranty of 16 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU … … 18 18 * 19 19 * You should have received a copy of the GNU General Public License 20 * along with ALMOS-MKH .; if not, write to the Free Software Foundation,20 * along with ALMOS-MKH; if not, write to the Free Software Foundation, 21 21 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 22 22 */ … … 29 29 #include <string.h> 30 30 #include <vfs.h> 31 32 31 33 32 //////////////////////////////////////// … … 42 41 for( i = 0 ; i < CONFIG_MAX_IRQS_PER_PIC ; i++ ) 43 42 { 44 hal_remote_sw( XPTR( seg_cxy , seg_ptr + i*IOPIC_SPAN + IOPIC_MASK ) , 0 ); 43 hal_remote_sw( XPTR( seg_cxy , seg_ptr + i*IOPIC_SPAN + IOPIC_MASK ) , 0 ); 45 44 } 46 45 } … … 54 53 cxy_t dev_cxy = GET_CXY( dev_xp ); 55 54 chdev_t * dev_ptr = (chdev_t *)GET_PTR( dev_xp ); 56 55 57 56 // get extended pointer on PIC segment base from PIC device descriptor 58 57 xptr_t seg_xp = (xptr_t)hal_remote_lwd( XPTR( dev_cxy , &dev_ptr->base ) ); 59 58 60 59 // get PIC controller segment cluster and local pointer 61 60 cxy_t seg_cxy = (cxy_t)GET_CXY( seg_xp); … … 65 64 uint32_t msb = (uint32_t)(xp_wti>>32); 66 65 67 66 // set the IOPIC_ADDRESS and IOPIC_EXTEND registers 68 67 hal_remote_sw( XPTR( seg_cxy , seg_ptr+irq_id*IOPIC_SPAN+IOPIC_ADDRESS ) , lsb ); 69 68 hal_remote_sw( XPTR( seg_cxy , seg_ptr+irq_id*IOPIC_SPAN+IOPIC_EXTEND ) , msb ); … … 80 79 cxy_t dev_cxy = GET_CXY( dev_xp ); 81 80 chdev_t * dev_ptr = (chdev_t *)GET_PTR( dev_xp ); 82 81 83 82 // get extended pointer on PIC segment base from PIC device descriptor 84 83 xptr_t seg_xp = (xptr_t)hal_remote_lwd( XPTR( dev_cxy , &dev_ptr->base ) ); 85 84 86 85 // get PIC controller segment cluster and local pointer 87 86 cxy_t seg_cxy = (cxy_t)GET_CXY( seg_xp); … … 100 99 cxy_t dev_cxy = GET_CXY( dev_xp ); 101 100 chdev_t * dev_ptr = (chdev_t *)GET_PTR( dev_xp ); 102 101 103 102 // get extended pointer on PIC segment base from PIC device descriptor 104 103 xptr_t seg_xp = (xptr_t)hal_remote_lwd( XPTR( dev_cxy , &dev_ptr->base ) ); 105 104 106 105 // get PIC controller segment cluster and local pointer 107 106 cxy_t seg_cxy = (cxy_t)GET_CXY( seg_xp); … … 109 108 110 109 // return status 111 110 *status = hal_remote_lw( XPTR( seg_cxy , seg_ptr+irq_id*IOPIC_SPAN+IOPIC_STATUS ) ); 112 111 } 113 112
Note: See TracChangeset
for help on using the changeset viewer.