• Home
  • Raw
  • Download

Lines Matching refs:win_id

69 	uint32_t win_id, win_cr, alr, ahr;  in dump_ccu()  local
76 for (win_id = 0; win_id < MVEBU_CCU_MAX_WINS; win_id++) { in dump_ccu()
77 win_cr = mmio_read_32(CCU_WIN_CR_OFFSET(ap_index, win_id)); in dump_ccu()
82 win_id)); in dump_ccu()
84 win_id)); in dump_ccu()
88 win_id, target_id, start, end); in dump_ccu()
114 int ccu_is_win_enabled(int ap_index, uint32_t win_id) in ccu_is_win_enabled() argument
116 return mmio_read_32(CCU_WIN_CR_OFFSET(ap_index, win_id)) & in ccu_is_win_enabled()
120 void ccu_enable_win(int ap_index, struct addr_map_win *win, uint32_t win_id) in ccu_enable_win() argument
126 if ((win_id == 0) || (win_id > MVEBU_CCU_MAX_WINS)) { in ccu_enable_win()
127 ERROR("Enabling wrong CCU window %d!\n", win_id); in ccu_enable_win()
135 mmio_write_32(CCU_WIN_ALR_OFFSET(ap_index, win_id), alr); in ccu_enable_win()
136 mmio_write_32(CCU_WIN_AHR_OFFSET(ap_index, win_id), ahr); in ccu_enable_win()
141 mmio_write_32(CCU_WIN_CR_OFFSET(ap_index, win_id), ccu_win_reg); in ccu_enable_win()
144 static void ccu_disable_win(int ap_index, uint32_t win_id) in ccu_disable_win() argument
148 if ((win_id == 0) || (win_id > MVEBU_CCU_MAX_WINS)) { in ccu_disable_win()
149 ERROR("Disabling wrong CCU window %d!\n", win_id); in ccu_disable_win()
153 win_reg = mmio_read_32(CCU_WIN_CR_OFFSET(ap_index, win_id)); in ccu_disable_win()
155 mmio_write_32(CCU_WIN_CR_OFFSET(ap_index, win_id), win_reg); in ccu_disable_win()
168 uint32_t win_id; in ccu_temp_win_insert() local
171 win_id = MVEBU_CCU_MAX_WINS - 1 - i; in ccu_temp_win_insert()
173 ccu_enable_win(ap_index, win, win_id); in ccu_temp_win_insert()
184 uint32_t win_id; in ccu_temp_win_remove() local
190 win_id = MVEBU_CCU_MAX_WINS - 1 - i; in ccu_temp_win_remove()
192 target = mmio_read_32(CCU_WIN_CR_OFFSET(ap_index, win_id)); in ccu_temp_win_remove()
196 base = mmio_read_32(CCU_WIN_ALR_OFFSET(ap_index, win_id)); in ccu_temp_win_remove()
201 __func__, win_id); in ccu_temp_win_remove()
204 ccu_disable_win(ap_index, win_id); in ccu_temp_win_remove()
222 const uint32_t win_id = (ap_index == 0) ? 2 : 1; in ccu_dram_target_get() local
225 target = mmio_read_32(CCU_WIN_CR_OFFSET(ap_index, win_id)); in ccu_dram_target_get()
239 const uint32_t win_id = (ap_index == 0) ? 2 : 1; in ccu_dram_target_set() local
242 dram_cr = mmio_read_32(CCU_WIN_CR_OFFSET(ap_index, win_id)); in ccu_dram_target_set()
245 mmio_write_32(CCU_WIN_CR_OFFSET(ap_index, win_id), dram_cr); in ccu_dram_target_set()
256 const uint32_t win_id = (ap_index == 0) ? 2 : 1; in ccu_dram_win_config() local
263 const uint32_t win_id = 1; in ccu_dram_win_config()
266 ccu_disable_win(ap_index, win_id); in ccu_dram_win_config()
268 mmio_write_32(CCU_WIN_SCR_OFFSET(ap_index, win_id), in ccu_dram_win_config()
271 ccu_enable_win(ap_index, win, win_id); in ccu_dram_win_config()
278 int win_id, idx; in ccu_save_win_range() local
280 for (idx = 0, win_id = win_first; win_id <= win_last; win_id++) { in ccu_save_win_range()
281 buffer[idx++] = mmio_read_32(CCU_WIN_CR_OFFSET(ap_id, win_id)); in ccu_save_win_range()
282 buffer[idx++] = mmio_read_32(CCU_WIN_SCR_OFFSET(ap_id, win_id)); in ccu_save_win_range()
283 buffer[idx++] = mmio_read_32(CCU_WIN_ALR_OFFSET(ap_id, win_id)); in ccu_save_win_range()
284 buffer[idx++] = mmio_read_32(CCU_WIN_AHR_OFFSET(ap_id, win_id)); in ccu_save_win_range()
293 int win_id, idx; in ccu_restore_win_range() local
295 for (idx = 0, win_id = win_first; win_id <= win_last; win_id++) { in ccu_restore_win_range()
296 mmio_write_32(CCU_WIN_CR_OFFSET(ap_id, win_id), buffer[idx++]); in ccu_restore_win_range()
297 mmio_write_32(CCU_WIN_SCR_OFFSET(ap_id, win_id), buffer[idx++]); in ccu_restore_win_range()
298 mmio_write_32(CCU_WIN_ALR_OFFSET(ap_id, win_id), buffer[idx++]); in ccu_restore_win_range()
299 mmio_write_32(CCU_WIN_AHR_OFFSET(ap_id, win_id), buffer[idx++]); in ccu_restore_win_range()
317 uint32_t win_id, win_reg; in init_ccu() local
367 for (win_id = win_start; win_id < MVEBU_CCU_MAX_WINS; win_id++) { in init_ccu()
368 ccu_disable_win(ap_index, win_id); in init_ccu()
370 mmio_write_32(CCU_WIN_SCR_OFFSET(ap_index, win_id), in init_ccu()
377 for (win_id = win_start, array_id = 0; in init_ccu()
378 ((win_id < MVEBU_CCU_MAX_WINS) && (array_id < win_count)); in init_ccu()
379 win_id++) { in init_ccu()
381 ccu_enable_win(ap_index, win, win_id); in init_ccu()