* [U-Boot] [PATCH 1/4] arm: bcm235xx: choose 8-bit phy bus width
2016-06-21 23:43 [U-Boot] [PATCH 0/4] This series contains minor updates for the bcm23550: Steve Rae
@ 2016-06-21 23:43 ` Steve Rae
2016-06-25 2:53 ` [U-Boot] [U-Boot, " Tom Rini
2016-06-21 23:43 ` [U-Boot] [PATCH 2/4] arm: bcm235xx: implement the boot0 hook code Steve Rae
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Steve Rae @ 2016-06-21 23:43 UTC (permalink / raw)
To: u-boot
The Kona PHY supports an 8-bit wide UTMI interface,
therefore, choose this Kconfig setting.
Signed-off-by: Steve Rae <srae@broadcom.com>
---
configs/bcm23550_w1d_defconfig | 1 +
include/configs/bcm23550_w1d.h | 1 -
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/configs/bcm23550_w1d_defconfig b/configs/bcm23550_w1d_defconfig
index 3328e51..cd47cd0 100644
--- a/configs/bcm23550_w1d_defconfig
+++ b/configs/bcm23550_w1d_defconfig
@@ -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
diff --git a/include/configs/bcm23550_w1d.h b/include/configs/bcm23550_w1d.h
index bd3c711..8d041ed 100644
--- a/include/configs/bcm23550_w1d.h
+++ b/include/configs/bcm23550_w1d.h
@@ -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
--
1.8.5
^ permalink raw reply related [flat|nested] 9+ messages in thread* [U-Boot] [PATCH 2/4] arm: bcm235xx: implement the boot0 hook code
2016-06-21 23:43 [U-Boot] [PATCH 0/4] This series contains minor updates for the bcm23550: Steve Rae
2016-06-21 23:43 ` [U-Boot] [PATCH 1/4] arm: bcm235xx: choose 8-bit phy bus width Steve Rae
@ 2016-06-21 23:43 ` Steve Rae
2016-06-25 2:53 ` [U-Boot] [U-Boot, " Tom Rini
2016-06-21 23:43 ` [U-Boot] [PATCH 3/4] arm: bcm235xx: fix kps ccu Steve Rae
2016-06-21 23:43 ` [U-Boot] [PATCH 4/4] arm: bcm235xx: update clock framework Steve Rae
3 siblings, 1 reply; 9+ messages in thread
From: Steve Rae @ 2016-06-21 23:43 UTC (permalink / raw)
To: u-boot
Choose the Kconfig boot0 hook option and implement the required code.
Signed-off-by: Steve Rae <srae@broadcom.com>
---
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
diff --git a/arch/arm/include/asm/arch-bcm235xx/boot0.h b/arch/arm/include/asm/arch-bcm235xx/boot0.h
new file mode 100644
index 0000000..7e72882
--- /dev/null
+++ b/arch/arm/include/asm/arch-bcm235xx/boot0.h
@@ -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 */
diff --git a/configs/bcm23550_w1d_defconfig b/configs/bcm23550_w1d_defconfig
index cd47cd0..0ef4a37 100644
--- a/configs/bcm23550_w1d_defconfig
+++ b/configs/bcm23550_w1d_defconfig
@@ -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
--
1.8.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 3/4] arm: bcm235xx: fix kps ccu
2016-06-21 23:43 [U-Boot] [PATCH 0/4] This series contains minor updates for the bcm23550: Steve Rae
2016-06-21 23:43 ` [U-Boot] [PATCH 1/4] arm: bcm235xx: choose 8-bit phy bus width Steve Rae
2016-06-21 23:43 ` [U-Boot] [PATCH 2/4] arm: bcm235xx: implement the boot0 hook code Steve Rae
@ 2016-06-21 23:43 ` Steve Rae
2016-06-25 2:53 ` [U-Boot] [U-Boot,3/4] " Tom Rini
2016-06-21 23:43 ` [U-Boot] [PATCH 4/4] arm: bcm235xx: update clock framework Steve Rae
3 siblings, 1 reply; 9+ messages in thread
From: Steve Rae @ 2016-06-21 23:43 UTC (permalink / raw)
To: u-boot
From: Chris Brand <chris.brand@broadcom.com>
The Kona Peripheral Slave CCU has 4 policy mask registers, not 8.
Signed-off-by: Chris Brand <chris.brand@broadcom.com>
Signed-off-by: Steve Rae <srae@broadcom.com>
---
arch/arm/cpu/armv7/bcm235xx/clk-bcm235xx.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/arch/arm/cpu/armv7/bcm235xx/clk-bcm235xx.c b/arch/arm/cpu/armv7/bcm235xx/clk-bcm235xx.c
index ce3d019..80187e3 100644
--- a/arch/arm/cpu/armv7/bcm235xx/clk-bcm235xx.c
+++ b/arch/arm/cpu/armv7/bcm235xx/clk-bcm235xx.c
@@ -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,
--
1.8.5
^ permalink raw reply related [flat|nested] 9+ messages in thread* [U-Boot] [PATCH 4/4] arm: bcm235xx: update clock framework
2016-06-21 23:43 [U-Boot] [PATCH 0/4] This series contains minor updates for the bcm23550: Steve Rae
` (2 preceding siblings ...)
2016-06-21 23:43 ` [U-Boot] [PATCH 3/4] arm: bcm235xx: fix kps ccu Steve Rae
@ 2016-06-21 23:43 ` Steve Rae
2016-06-25 2:53 ` [U-Boot] [U-Boot,4/4] " Tom Rini
3 siblings, 1 reply; 9+ messages in thread
From: Steve Rae @ 2016-06-21 23:43 UTC (permalink / raw)
To: u-boot
The handling of the "usage counter" is incorrect, and the clock should
only be disabled when transitioning from 1 to 0.
Reported-by: Chris Brand <chris.brand@broadcom.com>
Signed-off-by: Steve Rae <srae@broadcom.com>
---
arch/arm/cpu/armv7/bcm235xx/clk-core.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/arm/cpu/armv7/bcm235xx/clk-core.c b/arch/arm/cpu/armv7/bcm235xx/clk-core.c
index 2b5da6b..a326dfe 100644
--- a/arch/arm/cpu/armv7/bcm235xx/clk-core.c
+++ b/arch/arm/cpu/armv7/bcm235xx/clk-core.c
@@ -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 */
--
1.8.5
^ permalink raw reply related [flat|nested] 9+ messages in thread