Lines Matching refs:base

91 static inline void sh_mmcif_boot_cmd_send(void __iomem *base,
94 sh_mmcif_writel(base, MMCIF_CE_INT, 0);
95 sh_mmcif_writel(base, MMCIF_CE_ARG, arg);
96 sh_mmcif_writel(base, MMCIF_CE_CMD_SET, cmd);
99 static inline int sh_mmcif_boot_cmd_poll(void __iomem *base, unsigned long mask)
105 tmp = sh_mmcif_readl(base, MMCIF_CE_INT);
107 sh_mmcif_writel(base, MMCIF_CE_INT, tmp & ~mask);
115 static inline int sh_mmcif_boot_cmd(void __iomem *base,
118 sh_mmcif_boot_cmd_send(base, cmd, arg);
119 return sh_mmcif_boot_cmd_poll(base, 0x00010000);
122 static inline int sh_mmcif_boot_do_read_single(void __iomem *base,
129 sh_mmcif_boot_cmd(base, 0x0d400000, 0x00010000);
131 if (sh_mmcif_readl(base, MMCIF_CE_RESP0) != 0x0900)
135 sh_mmcif_boot_cmd(base, 0x11480000, block_nr * SH_MMCIF_BBS);
136 if (sh_mmcif_boot_cmd_poll(base, 0x00100000) < 0)
140 buf[k] = sh_mmcif_readl(base, MMCIF_CE_DATA);
145 static inline int sh_mmcif_boot_do_read(void __iomem *base,
154 sh_mmcif_writel(base, MMCIF_CE_CLK_CTRL,
159 sh_mmcif_boot_cmd(base, 0x09806000, 0x00010000);
162 sh_mmcif_boot_cmd(base, 0x07400000, 0x00010000);
165 sh_mmcif_boot_cmd(base, 0x10400000, SH_MMCIF_BBS);
168 ret = sh_mmcif_boot_do_read_single(base, first_block + k,
174 static inline void sh_mmcif_boot_init(void __iomem *base)
177 sh_mmcif_writel(base, MMCIF_CE_VERSION, SOFT_RST_ON);
178 sh_mmcif_writel(base, MMCIF_CE_VERSION, SOFT_RST_OFF);
181 sh_mmcif_writel(base, MMCIF_CE_BUF_ACC, BUF_ACC_ATYP);
184 sh_mmcif_writel(base, MMCIF_CE_BLOCK_SET, SH_MMCIF_BBS);
187 sh_mmcif_writel(base, MMCIF_CE_CLK_CTRL,
192 sh_mmcif_boot_cmd(base, 0x00000040, 0);
196 sh_mmcif_boot_cmd(base, 0x01405040, 0x40300000); /* CMD1 */
197 } while ((sh_mmcif_readl(base, MMCIF_CE_RESP0) & 0x80000000)
201 sh_mmcif_boot_cmd(base, 0x02806040, 0);
204 sh_mmcif_boot_cmd(base, 0x03400040, 0x00010000);