|
From: openocd-gerrit <ope...@us...> - 2023-05-24 05:26:37
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via b41b368255d53d9561851900eeeba38b12720a82 (commit)
from c164906420521546849d03a26977fb91838aca8e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b41b368255d53d9561851900eeeba38b12720a82
Author: Tomas Vanek <va...@fb...>
Date: Fri May 12 12:04:22 2023 +0200
jtag/drivers/bcm2835gpio: extend peripheral_base to off_t
Raspberry Pi 4 with 64-bit kernel and arm_peri_high=1 config.txt
parameter needs peripheral_base 0x47e000000, uint32_t is not enough.
Signed-off-by: Tomas Vanek <va...@fb...>
Change-Id: Icedd084e2916657fa4478d452a5eb1e84a45c281
Reviewed-on: https://review.openocd.org/c/openocd/+/7685
Tested-by: jenkins
Reviewed-by: Jonathan Bell <jon...@ra...>
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/src/jtag/drivers/bcm2835gpio.c b/src/jtag/drivers/bcm2835gpio.c
index 16c76cdb8..c72386024 100644
--- a/src/jtag/drivers/bcm2835gpio.c
+++ b/src/jtag/drivers/bcm2835gpio.c
@@ -19,7 +19,7 @@
#include <sys/mman.h>
-static uint32_t bcm2835_peri_base = 0x20000000;
+static off_t bcm2835_peri_base = 0x20000000;
#define BCM2835_GPIO_BASE (bcm2835_peri_base + 0x200000) /* GPIO controller */
#define BCM2835_PADS_GPIO_0_27 (bcm2835_peri_base + 0x100000)
@@ -302,11 +302,15 @@ COMMAND_HANDLER(bcm2835gpio_handle_speed_coeffs)
COMMAND_HANDLER(bcm2835gpio_handle_peripheral_base)
{
- if (CMD_ARGC == 1)
- COMMAND_PARSE_NUMBER(u32, CMD_ARGV[0], bcm2835_peri_base);
+ uint64_t tmp_base;
+ if (CMD_ARGC == 1) {
+ COMMAND_PARSE_NUMBER(u64, CMD_ARGV[0], tmp_base);
+ bcm2835_peri_base = (off_t)tmp_base;
+ }
- command_print(CMD, "BCM2835 GPIO: peripheral_base = 0x%08x",
- bcm2835_peri_base);
+ tmp_base = bcm2835_peri_base;
+ command_print(CMD, "BCM2835 GPIO: peripheral_base = 0x%08" PRIu64,
+ tmp_base);
return ERROR_OK;
}
@@ -322,7 +326,7 @@ static const struct command_registration bcm2835gpio_subcommand_handlers[] = {
.name = "peripheral_base",
.handler = &bcm2835gpio_handle_peripheral_base,
.mode = COMMAND_CONFIG,
- .help = "peripheral base to access GPIOs (RPi1 0x20000000, RPi2 0x3F000000).",
+ .help = "peripheral base to access GPIOs, not needed with /dev/gpiomem.",
.usage = "[base]",
},
-----------------------------------------------------------------------
Summary of changes:
src/jtag/drivers/bcm2835gpio.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|