| .. | .. |
|---|
| 36 | 36 | iowrite32(value, clk->mapped_reg); |
|---|
| 37 | 37 | } |
|---|
| 38 | 38 | |
|---|
| 39 | | -static unsigned int r8(const void __iomem *addr) |
|---|
| 40 | | -{ |
|---|
| 41 | | - return ioread8(addr); |
|---|
| 42 | | -} |
|---|
| 43 | | - |
|---|
| 44 | | -static unsigned int r16(const void __iomem *addr) |
|---|
| 45 | | -{ |
|---|
| 46 | | - return ioread16(addr); |
|---|
| 47 | | -} |
|---|
| 48 | | - |
|---|
| 49 | | -static unsigned int r32(const void __iomem *addr) |
|---|
| 50 | | -{ |
|---|
| 51 | | - return ioread32(addr); |
|---|
| 52 | | -} |
|---|
| 53 | | - |
|---|
| 54 | 39 | static int sh_clk_mstp_enable(struct clk *clk) |
|---|
| 55 | 40 | { |
|---|
| 56 | 41 | sh_clk_write(sh_clk_read(clk) & ~(1 << clk->enable_bit), clk); |
|---|
| .. | .. |
|---|
| 61 | 46 | (phys_addr_t)clk->enable_reg + clk->mapped_reg; |
|---|
| 62 | 47 | |
|---|
| 63 | 48 | if (clk->flags & CLK_ENABLE_REG_8BIT) |
|---|
| 64 | | - read = r8; |
|---|
| 49 | + read = ioread8; |
|---|
| 65 | 50 | else if (clk->flags & CLK_ENABLE_REG_16BIT) |
|---|
| 66 | | - read = r16; |
|---|
| 51 | + read = ioread16; |
|---|
| 67 | 52 | else |
|---|
| 68 | | - read = r32; |
|---|
| 53 | + read = ioread32; |
|---|
| 69 | 54 | |
|---|
| 70 | 55 | for (i = 1000; |
|---|
| 71 | 56 | (read(mapped_status) & (1 << clk->enable_bit)) && i; |
|---|