Patchwork [1/7] powerpc: Implement get_brgfreq() and get_baudrate() stubs

login
register
mail settings
Submitter Anton Vorontsov
Date Dec. 5, 2008, 8:10 p.m.
Message ID <20081205201026.GA19758@oksana.dev.rtsoft.ru>
Download mbox | patch
Permalink /patch/12496/
State Accepted
Commit a5dae76a3d8012b0ce0ff04dfe6101339df49740
Delegated to: Kumar Gala
Headers show

Comments

Anton Vorontsov - Dec. 5, 2008, 8:10 p.m.
This is needed to not bother with ugly #ifdefs in the drivers.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 arch/powerpc/sysdev/fsl_soc.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
Kumar Gala - Dec. 16, 2008, 6:24 p.m.
On Dec 5, 2008, at 2:10 PM, Anton Vorontsov wrote:

> This is needed to not bother with ugly #ifdefs in the drivers.
>
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
> arch/powerpc/sysdev/fsl_soc.h |    5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)

applied to next

- k

Patch

diff --git a/arch/powerpc/sysdev/fsl_soc.h b/arch/powerpc/sysdev/fsl_soc.h
index 60f7f22..9c744e4 100644
--- a/arch/powerpc/sysdev/fsl_soc.h
+++ b/arch/powerpc/sysdev/fsl_soc.h
@@ -5,8 +5,13 @@ 
 #include <asm/mmu.h>
 
 extern phys_addr_t get_immrbase(void);
+#if defined(CONFIG_CPM2) || defined(CONFIG_QUICC_ENGINE) || defined(CONFIG_8xx)
 extern u32 get_brgfreq(void);
 extern u32 get_baudrate(void);
+#else
+static inline u32 get_brgfreq(void) { return -1; }
+static inline u32 get_baudrate(void) { return -1; }
+#endif
 extern u32 fsl_get_sys_freq(void);
 
 struct spi_board_info;