Skip to contentSkip to conversation

This series contains minor updates for the bcm23550:

PATCH New Steve Rae 2 participants 9 messages Jun 21, 2016 – Jun 25, 2016 Arm (32-bit)

lore
Share & tools
lore

Steve Rae

author
#0 lore raw

cover This series contains minor updates for the bcm23550:

(1) implement Kconfig options which have been recently applied, and
(2) fix two outstanding issues.

Chris Brand (1):
arm: bcm235xx: fix kps ccu

Steve Rae (3):
arm: bcm235xx: choose 8-bit phy bus width
arm: bcm235xx: implement the boot0 hook code
arm: bcm235xx: update clock framework

 arch/arm/cpu/armv7/bcm235xx/clk-bcm235xx.c |  6 +-----
 arch/arm/cpu/armv7/bcm235xx/clk-core.c     | 10 +++++-----
 arch/arm/include/asm/arch-bcm235xx/boot0.h | 15 +++++++++++++++
 configs/bcm23550_w1d_defconfig             |  2 ++
 include/configs/bcm23550_w1d.h             |  1 -
 5 files changed, 23 insertions(+), 11 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-bcm235xx/boot0.h
Signature · 1 line
1.8.5
author
#1 lore raw

PATCH 1/4 arm: bcm235xx: choose 8-bit phy bus width

The Kona PHY supports an 8-bit wide UTMI interface, therefore, choose this Kconfig setting.

---

 configs/bcm23550_w1d_defconfig | 1 +
 include/configs/bcm23550_w1d.h | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)
configs/bcm23550_w1d_defconfig +1 -0
index 3328e51..cd47cd0 100644
@@ -17,6 +17,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DWC2_OTG=y
+CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Broadcom Corporation"
 CONFIG_G_DNL_VENDOR_NUM=0x18d1
include/configs/bcm23550_w1d.h +0 -1
index bd3c711..8d041ed 100644
@@ -137,7 +137,6 @@
 #define CONFIG_FASTBOOT_BUF_ADDR	CONFIG_SYS_SDRAM_BASE
 #undef CONFIG_USB_GADGET_VBUS_DRAW
 #define CONFIG_USB_GADGET_VBUS_DRAW	0
-#define CONFIG_USB_GADGET_DWC2_PHY_8_BIT
 #define CONFIG_USB_GADGET_BCM_UDC_OTG_PHY
 #define CONFIG_USBID_ADDR		0x34052c46
 
Signature · 1 line
1.8.5
author
#3 lore raw

PATCH 2/4 arm: bcm235xx: implement the boot0 hook code

In reply to Steve Rae

Choose the Kconfig boot0 hook option and implement the required code.

---

 arch/arm/include/asm/arch-bcm235xx/boot0.h | 15 +++++++++++++++
 configs/bcm23550_w1d_defconfig             |  1 +
 2 files changed, 16 insertions(+)
 create mode 100644 arch/arm/include/asm/arch-bcm235xx/boot0.h
arch/arm/include/asm/arch-bcm235xx/boot0.h new file +15 -0
new file mode 100644
index 0000000..7e72882
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2016 Broadcom Corporation.
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#ifndef __BOOT0_H
+#define __BOOT0_H
+
+/* BOOT0 header information */
+#define ARM_SOC_BOOT0_HOOK	\
+	.word	0xbabeface;	\
+	.word	_end - _start
+
+#endif /* __BOOT0_H */
configs/bcm23550_w1d_defconfig +1 -0
index cd47cd0..0ef4a37 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK=y
 CONFIG_TARGET_BCM23550_W1D=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
Signature · 1 line
1.8.5
author
#5 lore raw

PATCH 3/4 arm: bcm235xx: fix kps ccu

In reply to Steve Rae

From: Chris Brand <[email protected]>

The Kona Peripheral Slave CCU has 4 policy mask registers, not 8.

---

 arch/arm/cpu/armv7/bcm235xx/clk-bcm235xx.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
arch/arm/cpu/armv7/bcm235xx/clk-bcm235xx.c +1 -5
index ce3d019..80187e3 100644
@@ -292,7 +292,7 @@ static struct ccu_clock kps_ccu_clk = {
 		.ops = &ccu_clk_ops,
 		.ccu_clk_mgr_base = KONA_SLV_CLK_BASE_ADDR,
 	},
-	.num_policy_masks = 2,
+	.num_policy_masks = 1,
 	.policy_freq_offset = 0x00000008,
 	.freq_bit_shift = 8,
 	.policy_ctl_offset = 0x0000000c,
@@ -300,10 +300,6 @@ static struct ccu_clock kps_ccu_clk = {
 	.policy1_mask_offset = 0x00000014,
 	.policy2_mask_offset = 0x00000018,
 	.policy3_mask_offset = 0x0000001c,
-	.policy0_mask2_offset = 0x00000048,
-	.policy1_mask2_offset = 0x0000004c,
-	.policy2_mask2_offset = 0x00000050,
-	.policy3_mask2_offset = 0x00000054,
 	.lvm_en_offset = 0x00000034,
 	.freq_id = 2,
 	.freq_tbl = slave_axi_freq_tbl,
Signature · 1 line
1.8.5
author
#7 lore raw

PATCH 4/4 arm: bcm235xx: update clock framework

In reply to Steve Rae

The handling of the "usage counter" is incorrect, and the clock should only be disabled when transitioning from 1 to 0.

---

 arch/arm/cpu/armv7/bcm235xx/clk-core.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm/cpu/armv7/bcm235xx/clk-core.c +5 -5
index 2b5da6b..a326dfe 100644
@@ -449,10 +449,9 @@ int clk_enable(struct clk *c)
 	if (ret)
 		return ret;
 
-	if (!c->use_cnt) {
-		c->use_cnt++;
+	if (!c->use_cnt)
 		ret = c->ops->enable(c, 1);
-	}
+	c->use_cnt++;
 
 	return ret;
 }
@@ -464,9 +463,10 @@ void clk_disable(struct clk *c)
 	if (!c->ops || !c->ops->enable)
 		return;
 
-	if (c->use_cnt) {
+	if (c->use_cnt > 0) {
 		c->use_cnt--;
-		c->ops->enable(c, 0);
+		if (c->use_cnt == 0)
+			c->ops->enable(c, 0);
 	}
 
 	/* disable parent */
Signature · 1 line
1.8.5
#2 lore raw

PATCH 1/4 arm: bcm235xx: choose 8-bit phy bus width

In reply to Steve Rae
Quoted 4 lines · Steve Rae

The Kona PHY supports an 8-bit wide UTMI interface, therefore, choose this Kconfig setting.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160624/4f3ff4ea/attachment.sig>
#4 lore raw

PATCH 2/4 arm: bcm235xx: implement the boot0 hook code

In reply to Steve Rae
Quoted 3 lines · Steve Rae

Choose the Kconfig boot0 hook option and implement the required code.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160624/8f0b27b9/attachment.sig>
#6 lore raw

PATCH 3/4 arm: bcm235xx: fix kps ccu

In reply to Steve Rae
Quoted 6 lines · Steve Rae

From: Chris Brand <[email protected]>

The Kona Peripheral Slave CCU has 4 policy mask registers, not 8.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160624/4705501e/attachment.sig>
#8 lore raw

PATCH 4/4 arm: bcm235xx: update clock framework

In reply to Steve Rae
Quoted 5 lines · Steve Rae

The handling of the "usage counter" is incorrect, and the clock should only be disabled when transitioning from 1 to 0.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160624/0b2c2709/attachment.sig>