Skip to contentSkip to conversation

bsp: add SoC device to brcmstb

PATCH Superseded Justin Chen 3 participants 4 messages Feb 26, 2016

Subsystems (4)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

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 id
soc_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
index 7ef1214..b95ea11 100644
@@ -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
index 337ce41..ac10b0c 100644
@@ -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
#1 lore raw

include/linux/soc/brcmstb/brcmstb.h line 17

Quoted 12 lines · On Thursday 25 February 2016 16:19:07 Justin Chen wrote:

*/
void brcmstb_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

#2 lore raw
Quoted 4 lines · Arnd Bergmann
Quoted 3 lines · On Thursday 25 February 2016 16:19:07 Justin Chen wrote:

*/
void brcmstb_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
#3 lore raw
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:

*/
void brcmstb_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