• Home
  • Raw
  • Download

Lines Matching refs:base

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