• Home
  • Raw
  • Download

Lines Matching refs:win

31 #define IO_WIN_ALR_OFFSET(ap, win)	(MVEBU_IO_WIN_BASE(ap) + 0x0 + \  argument
32 (0x10 * win))
33 #define IO_WIN_AHR_OFFSET(ap, win) (MVEBU_IO_WIN_BASE(ap) + 0x8 + \ argument
34 (0x10 * win))
35 #define IO_WIN_CR_OFFSET(ap, win) (MVEBU_IO_WIN_BASE(ap) + 0xC + \ argument
36 (0x10 * win))
41 static void io_win_check(struct addr_map_win *win) in io_win_check() argument
45 if (IS_NOT_ALIGN(win->base_addr, IO_WIN_ALIGNMENT_1M)) { in io_win_check()
46 win->base_addr = ALIGN_UP(win->base_addr, IO_WIN_ALIGNMENT_1M); in io_win_check()
48 __func__, win->base_addr); in io_win_check()
52 if (IS_NOT_ALIGN(win->win_size, IO_WIN_ALIGNMENT_1M)) { in io_win_check()
53 win->win_size = ALIGN_UP(win->win_size, IO_WIN_ALIGNMENT_1M); in io_win_check()
55 __func__, win->win_size); in io_win_check()
59 static void io_win_enable_window(int ap_index, struct addr_map_win *win, in io_win_enable_window() argument
65 if (win->target_id < 0 || win->target_id >= MVEBU_IO_WIN_MAX_WINS) { in io_win_enable_window()
66 ERROR("target ID = %d, is invalid\n", win->target_id); in io_win_enable_window()
76 end_addr = (win->base_addr + win->win_size - 1); in io_win_enable_window()
78 alr = (uint32_t)((win->base_addr >> ADDRESS_SHIFT) & ADDRESS_MASK); in io_win_enable_window()
87 mmio_write_32(IO_WIN_CR_OFFSET(ap_index, win_num), win->target_id); in io_win_enable_window()
112 void iow_temp_win_insert(int ap_index, struct addr_map_win *win, int size) in iow_temp_win_insert() argument
118 io_win_check(win); in iow_temp_win_insert()
119 io_win_enable_window(ap_index, win, win_id); in iow_temp_win_insert()
120 win++; in iow_temp_win_insert()
128 void iow_temp_win_remove(int ap_index, struct addr_map_win *win, int size) in iow_temp_win_remove() argument
144 if ((win->target_id != target) || (win->base_addr != base)) { in iow_temp_win_remove()
150 win++; in iow_temp_win_remove()
227 struct addr_map_win *win; in init_io_win() local
234 marvell_get_io_win_memory_map(ap_index, &win, &win_count); in init_io_win()
256 for (win_id = 1; win_id <= win_count; win_id++, win++) { in init_io_win()
257 io_win_check(win); in init_io_win()
258 io_win_enable_window(ap_index, win, win_id); in init_io_win()