Lines Matching refs:base

97 static inline void sh_mmcif_boot_cmd_send(void __iomem *base,  in sh_mmcif_boot_cmd_send()  argument
100 sh_mmcif_writel(base, MMCIF_CE_INT, 0); in sh_mmcif_boot_cmd_send()
101 sh_mmcif_writel(base, MMCIF_CE_ARG, arg); in sh_mmcif_boot_cmd_send()
102 sh_mmcif_writel(base, MMCIF_CE_CMD_SET, cmd); in sh_mmcif_boot_cmd_send()
105 static inline int sh_mmcif_boot_cmd_poll(void __iomem *base, unsigned long mask) in sh_mmcif_boot_cmd_poll() argument
111 tmp = sh_mmcif_readl(base, MMCIF_CE_INT); in sh_mmcif_boot_cmd_poll()
113 sh_mmcif_writel(base, MMCIF_CE_INT, tmp & ~mask); in sh_mmcif_boot_cmd_poll()
121 static inline int sh_mmcif_boot_cmd(void __iomem *base, in sh_mmcif_boot_cmd() argument
124 sh_mmcif_boot_cmd_send(base, cmd, arg); in sh_mmcif_boot_cmd()
125 return sh_mmcif_boot_cmd_poll(base, 0x00010000); in sh_mmcif_boot_cmd()
128 static inline int sh_mmcif_boot_do_read_single(void __iomem *base, in sh_mmcif_boot_do_read_single() argument
135 sh_mmcif_boot_cmd(base, 0x0d400000, 0x00010000); in sh_mmcif_boot_do_read_single()
137 if (sh_mmcif_readl(base, MMCIF_CE_RESP0) != 0x0900) in sh_mmcif_boot_do_read_single()
141 sh_mmcif_boot_cmd(base, 0x11480000, block_nr * SH_MMCIF_BBS); in sh_mmcif_boot_do_read_single()
142 if (sh_mmcif_boot_cmd_poll(base, 0x00100000) < 0) in sh_mmcif_boot_do_read_single()
146 buf[k] = sh_mmcif_readl(base, MMCIF_CE_DATA); in sh_mmcif_boot_do_read_single()
151 static inline int sh_mmcif_boot_do_read(void __iomem *base, in sh_mmcif_boot_do_read() argument
160 sh_mmcif_writel(base, MMCIF_CE_CLK_CTRL, in sh_mmcif_boot_do_read()
165 sh_mmcif_boot_cmd(base, 0x09806000, 0x00010000); in sh_mmcif_boot_do_read()
168 sh_mmcif_boot_cmd(base, 0x07400000, 0x00010000); in sh_mmcif_boot_do_read()
171 sh_mmcif_boot_cmd(base, 0x10400000, SH_MMCIF_BBS); in sh_mmcif_boot_do_read()
174 ret = sh_mmcif_boot_do_read_single(base, first_block + k, in sh_mmcif_boot_do_read()
180 static inline void sh_mmcif_boot_init(void __iomem *base) in sh_mmcif_boot_init() argument
183 sh_mmcif_writel(base, MMCIF_CE_VERSION, SOFT_RST_ON); in sh_mmcif_boot_init()
184 sh_mmcif_writel(base, MMCIF_CE_VERSION, SOFT_RST_OFF); in sh_mmcif_boot_init()
187 sh_mmcif_writel(base, MMCIF_CE_BUF_ACC, BUF_ACC_ATYP); in sh_mmcif_boot_init()
190 sh_mmcif_writel(base, MMCIF_CE_BLOCK_SET, SH_MMCIF_BBS); in sh_mmcif_boot_init()
193 sh_mmcif_writel(base, MMCIF_CE_CLK_CTRL, in sh_mmcif_boot_init()
198 sh_mmcif_boot_cmd(base, 0x00000040, 0); in sh_mmcif_boot_init()
202 sh_mmcif_boot_cmd(base, 0x01405040, 0x40300000); /* CMD1 */ in sh_mmcif_boot_init()
203 } while ((sh_mmcif_readl(base, MMCIF_CE_RESP0) & 0x80000000) in sh_mmcif_boot_init()
207 sh_mmcif_boot_cmd(base, 0x02806040, 0); in sh_mmcif_boot_init()
210 sh_mmcif_boot_cmd(base, 0x03400040, 0x00010000); in sh_mmcif_boot_init()