diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/clk-provider.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 7e59253b8603..534dc618f2d7 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h | |||
| @@ -512,6 +512,20 @@ static inline const char *of_clk_get_parent_name(struct device_node *np, | |||
| 512 | * for improved portability across platforms | 512 | * for improved portability across platforms |
| 513 | */ | 513 | */ |
| 514 | 514 | ||
| 515 | #if IS_ENABLED(CONFIG_PPC) | ||
| 516 | |||
| 517 | static inline u32 clk_readl(u32 __iomem *reg) | ||
| 518 | { | ||
| 519 | return ioread32be(reg); | ||
| 520 | } | ||
| 521 | |||
| 522 | static inline void clk_writel(u32 val, u32 __iomem *reg) | ||
| 523 | { | ||
| 524 | iowrite32be(val, reg); | ||
| 525 | } | ||
| 526 | |||
| 527 | #else /* platform dependent I/O accessors */ | ||
| 528 | |||
| 515 | static inline u32 clk_readl(u32 __iomem *reg) | 529 | static inline u32 clk_readl(u32 __iomem *reg) |
| 516 | { | 530 | { |
| 517 | return readl(reg); | 531 | return readl(reg); |
| @@ -522,5 +536,7 @@ static inline void clk_writel(u32 val, u32 __iomem *reg) | |||
| 522 | writel(val, reg); | 536 | writel(val, reg); |
| 523 | } | 537 | } |
| 524 | 538 | ||
| 539 | #endif /* platform dependent I/O accessors */ | ||
| 540 | |||
| 525 | #endif /* CONFIG_COMMON_CLK */ | 541 | #endif /* CONFIG_COMMON_CLK */ |
| 526 | #endif /* CLK_PROVIDER_H */ | 542 | #endif /* CLK_PROVIDER_H */ |
