bsp: add SoC device to brcmstb
Subsystems (4)
PATCH 1/1 bsp: add SoC device to brcmstb
From: Justin Chen <[email protected]>
Added SoC driver at drivers/soc/brcmstb/common.c. Added two helper functions for getting family/product ID located at include/linux/soc/brcmstb/brcmstb.h.
Assigned the values of soc_dev_attribute accordingly:
family = chip family idsoc_id = product id
revision = product revision
--- arch/arm/mach-bcm/Kconfig | 1 + drivers/soc/brcmstb/common.c | 68 +++++++++++++++++++++++++++++++++++ include/linux/soc/brcmstb/brcmstb.h | 7 ++++ 3 files changed, 76 insertions(+), 0 deletions(-)
arch/arm/mach-bcm/Kconfig +1 -0
@@ -179,6 +179,7 @@ config ARCH_BRCMSTB select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE select ARCH_WANT_OPTIONAL_GPIOLIB select SOC_BRCMSTB + select SOC_BUS help Say Y if you intend to run the kernel on a Broadcom ARM-based STB chipset.
drivers/soc/brcmstb/common.c +68 -0
81 lines not on this page · raw message
include/linux/soc/brcmstb/brcmstb.h +7 -0
@@ -7,4 +7,11 @@*/ void brcmstb_biuctrl_init (void ); +/* +* Helper functions for getting family or product id from the +* SoC driver. +*/ +u32 brcmstb_get_family_id (void ); +u32 brcmstb_get_product_id (void ); +#endif /* __BRCMSTB_SOC_H */
Signature · 1 line
1.7.1
include/linux/soc/brcmstb/brcmstb.h line 17
Quoted 12 lines · On Thursday 25 February 2016 16:19:07 Justin Chen wrote:
*/
voidbrcmstb_biuctrl_init(void);include/linux/soc/brcmstb/brcmstb.h +7
-0+/* +* Helper functions for getting family or product id from the +* SoC driver. +*/ +u32 brcmstb_get_family_id (void ); +u32 brcmstb_get_product_id (void ); +#endif /* __BRCMSTB_SOC_H */
Please remove the declarations from the header file and make the variable local to this file, to make sure no other driver accidentally accesses them.
Arnd
Quoted 4 lines · Arnd Bergmann
Quoted 3 lines · On Thursday 25 February 2016 16:19:07 Justin Chen wrote:
*/
voidbrcmstb_biuctrl_init(void);
Quoted 13 lines
include/linux/soc/brcmstb/brcmstb.h line 17
Quoted 9 lines
include/linux/soc/brcmstb/brcmstb.h +7
-0+/* +* Helper functions for getting family or product id from the +* SoC driver. +*/ +u32 brcmstb_get_family_id (void ); +u32 brcmstb_get_product_id (void ); +#endif /* __BRCMSTB_SOC_H */ Please remove the declarations from the header file and make the variable local to this file, to make sure no other driver accidentally accesses them.
I would remove these two helper functions completely, we do not need them right now in an upstream kernel, if we ever need them, we could add them back, but we have no use for these two now.
Thanks!
Signature · 1 line
Florian
Quoted 19 lines · On Friday 26 February 2016 10:36:27 Florian Fainelli wrote:
Quoted 4 lines · Arnd Bergmann
Quoted 3 lines · On Thursday 25 February 2016 16:19:07 Justin Chen wrote:
*/
voidbrcmstb_biuctrl_init(void);Quoted 13 lines
include/linux/soc/brcmstb/brcmstb.h line 17
Quoted 9 lines
include/linux/soc/brcmstb/brcmstb.h +7
-0+/* +* Helper functions for getting family or product id from the +* SoC driver. +*/ +u32 brcmstb_get_family_id (void ); +u32 brcmstb_get_product_id (void ); +#endif /* __BRCMSTB_SOC_H */ Please remove the declarations from the header file and make the variable local to this file, to make sure no other driver accidentally accesses them.
Quoted 3 lines
I would remove these two helper functions completely, we do not need them right now in an upstream kernel, if we ever need them, we could add them back, but we have no use for these two now.
Ok, that sounds even better.
Arnd