hspi               46 drivers/spi/spi-sh-hspi.c static void hspi_write(struct hspi_priv *hspi, int reg, u32 val)
hspi               48 drivers/spi/spi-sh-hspi.c 	iowrite32(val, hspi->addr + reg);
hspi               51 drivers/spi/spi-sh-hspi.c static u32 hspi_read(struct hspi_priv *hspi, int reg)
hspi               53 drivers/spi/spi-sh-hspi.c 	return ioread32(hspi->addr + reg);
hspi               56 drivers/spi/spi-sh-hspi.c static void hspi_bit_set(struct hspi_priv *hspi, int reg, u32 mask, u32 set)
hspi               58 drivers/spi/spi-sh-hspi.c 	u32 val = hspi_read(hspi, reg);
hspi               63 drivers/spi/spi-sh-hspi.c 	hspi_write(hspi, reg, val);
hspi               69 drivers/spi/spi-sh-hspi.c static int hspi_status_check_timeout(struct hspi_priv *hspi, u32 mask, u32 val)
hspi               74 drivers/spi/spi-sh-hspi.c 		if ((mask & hspi_read(hspi, SPSR)) == val)
hspi               80 drivers/spi/spi-sh-hspi.c 	dev_err(hspi->dev, "timeout\n");
hspi               88 drivers/spi/spi-sh-hspi.c #define hspi_hw_cs_enable(hspi)		hspi_hw_cs_ctrl(hspi, 0)
hspi               89 drivers/spi/spi-sh-hspi.c #define hspi_hw_cs_disable(hspi)	hspi_hw_cs_ctrl(hspi, 1)
hspi               90 drivers/spi/spi-sh-hspi.c static void hspi_hw_cs_ctrl(struct hspi_priv *hspi, int hi)
hspi               92 drivers/spi/spi-sh-hspi.c 	hspi_bit_set(hspi, SPSCR, (1 << 6), (hi) << 6);
hspi               95 drivers/spi/spi-sh-hspi.c static void hspi_hw_setup(struct hspi_priv *hspi,
hspi              100 drivers/spi/spi-sh-hspi.c 	struct device *dev = hspi->dev;
hspi              111 drivers/spi/spi-sh-hspi.c 		rate = clk_get_rate(hspi->clk);
hspi              138 drivers/spi/spi-sh-hspi.c 	hspi_write(hspi, SPCR, spcr);
hspi              139 drivers/spi/spi-sh-hspi.c 	hspi_write(hspi, SPSR, 0x0);
hspi              140 drivers/spi/spi-sh-hspi.c 	hspi_write(hspi, SPSCR, 0x21);	/* master mode / CS control */
hspi              146 drivers/spi/spi-sh-hspi.c 	struct hspi_priv *hspi = spi_controller_get_devdata(ctlr);
hspi              154 drivers/spi/spi-sh-hspi.c 	dev_dbg(hspi->dev, "%s\n", __func__);
hspi              161 drivers/spi/spi-sh-hspi.c 			hspi_hw_setup(hspi, msg, t);
hspi              162 drivers/spi/spi-sh-hspi.c 			hspi_hw_cs_enable(hspi);
hspi              170 drivers/spi/spi-sh-hspi.c 			ret = hspi_status_check_timeout(hspi, 0x1, 0);
hspi              178 drivers/spi/spi-sh-hspi.c 			hspi_write(hspi, SPTBR, tx);
hspi              181 drivers/spi/spi-sh-hspi.c 			ret = hspi_status_check_timeout(hspi, 0x4, 0x4);
hspi              185 drivers/spi/spi-sh-hspi.c 			rx = hspi_read(hspi, SPRBR);
hspi              198 drivers/spi/spi-sh-hspi.c 			hspi_hw_cs_disable(hspi);
hspi              206 drivers/spi/spi-sh-hspi.c 		hspi_hw_cs_disable(hspi);
hspi              217 drivers/spi/spi-sh-hspi.c 	struct hspi_priv *hspi;
hspi              228 drivers/spi/spi-sh-hspi.c 	ctlr = spi_alloc_master(&pdev->dev, sizeof(*hspi));
hspi              239 drivers/spi/spi-sh-hspi.c 	hspi = spi_controller_get_devdata(ctlr);
hspi              240 drivers/spi/spi-sh-hspi.c 	platform_set_drvdata(pdev, hspi);
hspi              243 drivers/spi/spi-sh-hspi.c 	hspi->ctlr	= ctlr;
hspi              244 drivers/spi/spi-sh-hspi.c 	hspi->dev	= &pdev->dev;
hspi              245 drivers/spi/spi-sh-hspi.c 	hspi->clk	= clk;
hspi              246 drivers/spi/spi-sh-hspi.c 	hspi->addr	= devm_ioremap(hspi->dev,
hspi              248 drivers/spi/spi-sh-hspi.c 	if (!hspi->addr) {
hspi              282 drivers/spi/spi-sh-hspi.c 	struct hspi_priv *hspi = platform_get_drvdata(pdev);
hspi              286 drivers/spi/spi-sh-hspi.c 	clk_put(hspi->clk);