• Home
  • Raw
  • Download

Lines Matching refs:win

26 #define AMB_WIN_CR_OFFSET(win)		(amb_base + 0x0 + (0x8 * win))  argument
32 #define AMB_WIN_BASE_OFFSET(win) (amb_base + 0x4 + (0x8 * win)) argument
41 static void amb_check_win(struct addr_map_win *win, uint32_t win_num) in amb_check_win() argument
46 if (win->base_addr > AMB_BASE_ADDR_MASK) { in amb_check_win()
48 win_num, win->base_addr); in amb_check_win()
49 win->base_addr = AMB_BASE_ADDR_MASK; in amb_check_win()
50 WARN("Set the base address to 0x%llx\n", win->base_addr); in amb_check_win()
53 base_addr = win->base_addr << AMB_BASE_OFFSET; in amb_check_win()
57 win->base_addr = ALIGN_UP(base_addr, AMB_WIN_ALIGNMENT_1M); in amb_check_win()
60 WARN("Align up the base address to 0x%llx\n", win->base_addr); in amb_check_win()
64 if (!IS_POWER_OF_2(win->win_size)) { in amb_check_win()
66 win_num, win->win_size); in amb_check_win()
67 win->win_size = ROUND_UP_TO_POW_OF_2(win->win_size); in amb_check_win()
68 WARN("Rounding size to 0x%llx\n", win->win_size); in amb_check_win()
72 static void amb_enable_win(struct addr_map_win *win, uint32_t win_num) in amb_enable_win() argument
81 size = (win->win_size / AMB_WIN_ALIGNMENT_64K) - 1; in amb_enable_win()
82 ctrl = (size << AMB_SIZE_OFFSET) | (win->target_id << AMB_ATTR_OFFSET); in amb_enable_win()
83 base = win->base_addr << AMB_BASE_OFFSET; in amb_enable_win()
118 struct addr_map_win *win; in init_amb_adec() local
128 marvell_get_amb_memory_map(&win, &win_count, base); in init_amb_adec()
145 for (win_id = 0; win_id < win_count; win_id++, win++) { in init_amb_adec()
146 amb_check_win(win, win_id); in init_amb_adec()
147 amb_enable_win(win, win_id); in init_amb_adec()