Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef __BRCMSTB_SOC_H
0003 #define __BRCMSTB_SOC_H
0004 
0005 #include <linux/kconfig.h>
0006 
0007 static inline u32 BRCM_ID(u32 reg)
0008 {
0009     return reg >> 28 ? reg >> 16 : reg >> 8;
0010 }
0011 
0012 static inline u32 BRCM_REV(u32 reg)
0013 {
0014     return reg & 0xff;
0015 }
0016 
0017 #if IS_ENABLED(CONFIG_SOC_BRCMSTB)
0018 
0019 /*
0020  * Helper functions for getting family or product id from the
0021  * SoC driver.
0022  */
0023 u32 brcmstb_get_family_id(void);
0024 u32 brcmstb_get_product_id(void);
0025 
0026 #else
0027 static inline u32 brcmstb_get_family_id(void)
0028 {
0029     return 0;
0030 }
0031 
0032 static inline u32 brcmstb_get_product_id(void)
0033 {
0034     return 0;
0035 }
0036 #endif
0037 
0038 #endif /* __BRCMSTB_SOC_H */