Changeset 245
- Timestamp:
- Jul 20, 2017, 12:46:10 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/generic/hal_drivers.h
r216 r245 25 25 #include <chdev.h> 26 26 27 void hal_drivers_txt_init(chdev_t *dev); 28 void hal_drivers_xcu_init(chdev_t *dev, lid_t lid); 29 void hal_drivers_xcu_disable_irq(chdev_t *icu, uint32_t irq_index, 30 uint32_t irq_type, lid_t lid); 31 void hal_drivers_xcu_enable_irq(chdev_t *icu, uint32_t irq_index, 32 uint32_t irq_type, lid_t lid); 27 void hal_drivers_txt_init(chdev_t *txt, uint32_t impl); 33 28 34 void hal_drivers_pic_init(chdev_t * dev);29 void hal_drivers_pic_init(chdev_t *pic); 35 30 36 void hal_drivers_ioc_init(chdev_t * dev, uint32_t impl);31 void hal_drivers_ioc_init(chdev_t *ioc, uint32_t impl); 37 32 38 33 #endif /* HAL_DRIVERS_H_ */ -
trunk/hal/tsar_mips32/core/hal_drivers.c
r238 r245 16 16 * 17 17 * You should have received a copy of the GNU General Public License 18 * along with ALMOS-MKH .; if not, write to the Free Software Foundation,18 * along with ALMOS-MKH; if not, write to the Free Software Foundation, 19 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 20 */ … … 35 35 36 36 ////////////////////////////////////////// 37 void hal_drivers_txt_init( chdev_t * txt ) 37 void hal_drivers_txt_init( chdev_t * txt, 38 uint32_t impl ) 38 39 { 39 soclib_tty_init( txt ); 40 if( impl == IMPL_TXT_TTY ) 41 { 42 soclib_tty_init( txt ); 43 } 44 else 45 { 46 assert( false , __FUNCTION__ , "undefined TXT device implementation" ); 47 } 40 48 } 41 49 -
trunk/hal/x86_64/core/hal_drivers.c
r234 r245 30 30 #include <pic_apic.h> 31 31 32 void hal_drivers_txt_init(chdev_t * dev)32 void hal_drivers_txt_init(chdev_t *txt, uint32_t impl) 33 33 { 34 soclib_tty_init( dev);34 soclib_tty_init(txt); 35 35 } 36 36 37 37 /* -------------------------------------------------------------------------- */ 38 38 39 void hal_drivers_ xcu_init(chdev_t *dev, lid_t lid)39 void hal_drivers_pic_init(chdev_t *pic) 40 40 { 41 soclib_xcu_init(dev, lid); 42 } 41 pic_apic_init(pic); 43 42 44 void hal_drivers_xcu_disable_irq(chdev_t *icu, uint32_t irq_index, 45 uint32_t irq_type, lid_t lid) 46 { 47 soclib_xcu_disable_irq(icu, irq_index, irq_type, lid); 48 } 49 50 void hal_drivers_xcu_enable_irq(chdev_t *icu, uint32_t irq_index, 51 uint32_t irq_type, lid_t lid) 52 { 53 soclib_xcu_enable_irq(icu, irq_index, irq_type, lid); 43 /* update the PIC chdev extension */ 44 pic->ext.pic.enable_timer = &pic_apic_enable_timer; 45 pic->ext.pic.enable_irq = &pic_apic_enable_irq; 46 pic->ext.pic.disable_irq = &pic_apic_disable_irq; 47 pic->ext.pic.bind_irq = &pic_apic_bind_irq; 48 pic->ext.pic.send_ipi = &pic_apic_send_ipi; 49 pic->ext.pic.extend_init = &pic_apic_extend_init; 54 50 } 55 51 56 52 /* -------------------------------------------------------------------------- */ 57 53 58 void hal_drivers_ pic_init(chdev_t *dev)54 void hal_drivers_ioc_init(chdev_t *ioc, uint32_t impl) 59 55 { 60 pic_apic_init(dev); 61 62 /* update the PIC chdev extension */ 63 dev->ext.pic.enable_timer = &pic_apic_enable_timer; 64 dev->ext.pic.enable_irq = &pic_apic_enable_irq; 65 dev->ext.pic.disable_irq = &pic_apic_disable_irq; 66 dev->ext.pic.bind_irq = &pic_apic_bind_irq; 67 dev->ext.pic.send_ipi = &pic_apic_send_ipi; 68 dev->ext.pic.extend_init = &pic_apic_extend_init; 56 ioc_ata_init(ioc); 69 57 } 70 58 71 /* -------------------------------------------------------------------------- */72 73 void hal_drivers_ioc_init(chdev_t *dev, uint32_t impl)74 {75 ioc_ata_init(dev);76 }77 -
trunk/kernel/devices/dev_txt.c
r244 r245 30 30 #include <printk.h> 31 31 #include <dev_txt.h> 32 #include <soclib_tty.h>33 32 34 33 ///////////////////////////////////////////////////////////////////////////////////////// … … 55 54 snprintf( txt->name , 16 , "txt_%d" , channel ); 56 55 57 // set fields "cmd", "isr", and call driver init function 58 if( impl == IMPL_TXT_TTY ) 59 { 60 soclib_tty_init( txt ); 61 } 62 else 63 { 64 assert( false , __FUNCTION__ , "undefined TXT device implementation" ); 65 } 56 // call driver init function 57 hal_drivers_txt_init(txt, impl); 66 58 67 59 // no server thread and no IRQ routing for TXT0
Note: See TracChangeset
for help on using the changeset viewer.