Changeset 481 for soft/giet_vm/giet_drivers/mmc_driver.c
- Timestamp:
- Jan 1, 2015, 8:23:48 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_drivers/mmc_driver.c
r456 r481 6 6 /////////////////////////////////////////////////////////////////////////////////// 7 7 8 #include < giet_config.h>8 #include <hard_config.h> 9 9 #include <mmc_driver.h> 10 10 #include <tty0.h> 11 #include <locks.h> 11 12 #include <utils.h> 13 12 14 #include <io.h> 13 15 … … 89 91 } 90 92 91 // get the hard lock protecting exclusive access to MEMC92 while ( _mmc_get_register(cluster_xy, 0, MEMC_LOCK));93 // get the hard queuing lock protecting exclusive access to MEMC 94 _spin_lock_acquire( &_mmc_lock[x][y] ); 93 95 94 96 // write inval arguments 95 _mmc_set_register( cluster_xy, 0, MEMC_ADDR_LO , (unsigned int)buf_paddr);96 _mmc_set_register( cluster_xy, 0, MEMC_ADDR_HI , (unsigned int)(buf_paddr>>32));97 _mmc_set_register( cluster_xy, 0, MEMC_BUF_LENGTH, buf_length);98 _mmc_set_register( cluster_xy, 0, MEMC_CMD_TYPE , MEMC_CMD_INVAL);97 _mmc_set_register( cluster_xy , 0 , MEMC_ADDR_LO , (unsigned int)buf_paddr ); 98 _mmc_set_register( cluster_xy , 0 , MEMC_ADDR_HI , (unsigned int)(buf_paddr>>32) ); 99 _mmc_set_register( cluster_xy , 0 , MEMC_BUF_LENGTH, buf_length ); 100 _mmc_set_register( cluster_xy , 0 , MEMC_CMD_TYPE , MEMC_CMD_INVAL ); 99 101 100 102 // release the lock 101 _ mmc_set_register(cluster_xy, 0, MEMC_LOCK, 0);103 _spin_lock_release( &_mmc_lock[x][y] ); 102 104 } 103 105 … … 118 120 } 119 121 120 // get the hard lock protecting exclusive access to MEMC121 while ( _mmc_get_register(cluster_xy, 0, MEMC_LOCK));122 // get the hard queuing lock protecting exclusive access to MEMC 123 _spin_lock_acquire( &_mmc_lock[x][y] ); 122 124 123 125 // write inval arguments … … 128 130 129 131 // release the lock 130 _ mmc_set_register(cluster_xy, 0, MEMC_LOCK, 0);132 _spin_lock_release( &_mmc_lock[x][y] ); 131 133 } 132 134
Note: See TracChangeset
for help on using the changeset viewer.