Changeset 141


Ignore:
Timestamp:
Jul 4, 2017, 3:02:31 PM (4 years ago)
Author:
max@…
Message:

style

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/drivers/soclib_pic.c

    r75 r141  
    33 *
    44 * Author  Alain Greiner (2016)
    5  * *
     5 *
    66 * Copyright (c) UPMC Sorbonne Universites
    77 *
    88 * This file is part of ALMOS-MKH.
    99 *
    10  * ALMOS-MKH. is free software; you can redistribute it and/or modify it
     10 * ALMOS-MKH is free software; you can redistribute it and/or modify it
    1111 * under the terms of the GNU General Public License as published by
    1212 * the Free Software Foundation; version 2.0 of the License.
    1313 *
    14  * ALMOS-MKH. is distributed in the hope that it will be useful, but
     14 * ALMOS-MKH is distributed in the hope that it will be useful, but
    1515 * WITHOUT ANY WARRANTY; without even the implied warranty of
    1616 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     
    1818 *
    1919 * 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,
    2121 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
    2222 */
     
    2929#include <string.h>
    3030#include <vfs.h>
    31 
    3231
    3332////////////////////////////////////////
     
    4241    for( i = 0 ; i < CONFIG_MAX_IRQS_PER_PIC ; i++ )
    4342    {
    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 );
    4544    }
    4645}
     
    5453    cxy_t     dev_cxy = GET_CXY( dev_xp );
    5554    chdev_t * dev_ptr = (chdev_t *)GET_PTR( dev_xp );
    56  
     55
    5756    // get extended pointer on PIC segment base from PIC device descriptor
    5857    xptr_t seg_xp = (xptr_t)hal_remote_lwd( XPTR( dev_cxy , &dev_ptr->base ) );
    59  
     58
    6059    // get PIC controller segment cluster and local pointer
    6160    cxy_t      seg_cxy = (cxy_t)GET_CXY( seg_xp);
     
    6564    uint32_t msb  = (uint32_t)(xp_wti>>32);
    6665
    67         // set the IOPIC_ADDRESS and IOPIC_EXTEND registers
     66    // set the IOPIC_ADDRESS and IOPIC_EXTEND registers
    6867    hal_remote_sw( XPTR( seg_cxy , seg_ptr+irq_id*IOPIC_SPAN+IOPIC_ADDRESS ) , lsb );
    6968    hal_remote_sw( XPTR( seg_cxy , seg_ptr+irq_id*IOPIC_SPAN+IOPIC_EXTEND  ) , msb );
     
    8079    cxy_t     dev_cxy = GET_CXY( dev_xp );
    8180    chdev_t * dev_ptr = (chdev_t *)GET_PTR( dev_xp );
    82  
     81
    8382    // get extended pointer on PIC segment base from PIC device descriptor
    8483    xptr_t seg_xp = (xptr_t)hal_remote_lwd( XPTR( dev_cxy , &dev_ptr->base ) );
    85  
     84
    8685    // get PIC controller segment cluster and local pointer
    8786    cxy_t      seg_cxy = (cxy_t)GET_CXY( seg_xp);
     
    10099    cxy_t     dev_cxy = GET_CXY( dev_xp );
    101100    chdev_t * dev_ptr = (chdev_t *)GET_PTR( dev_xp );
    102  
     101
    103102    // get extended pointer on PIC segment base from PIC device descriptor
    104103    xptr_t seg_xp = (xptr_t)hal_remote_lwd( XPTR( dev_cxy , &dev_ptr->base ) );
    105  
     104
    106105    // get PIC controller segment cluster and local pointer
    107106    cxy_t      seg_cxy = (cxy_t)GET_CXY( seg_xp);
     
    109108
    110109    // return status
    111         *status = hal_remote_lw( XPTR( seg_cxy , seg_ptr+irq_id*IOPIC_SPAN+IOPIC_STATUS ) );
     110    *status = hal_remote_lw( XPTR( seg_cxy , seg_ptr+irq_id*IOPIC_SPAN+IOPIC_STATUS ) );
    112111}
    113112
Note: See TracChangeset for help on using the changeset viewer.