Update to SDK 2.2.0 Newer is better, right? Signed-off-by: Marc Zyngier <maz@kernel.org>
diff --git a/m1-pd-bmc.h b/m1-pd-bmc.h index 9e62316..4c1ccc7 100644 --- a/m1-pd-bmc.h +++ b/m1-pd-bmc.h
@@ -11,7 +11,7 @@ struct gpio_pin_config { uint16_t pin; - enum gpio_function mode; + gpio_function_t mode; int dir; bool pu; bool level; @@ -73,3 +73,15 @@ } while(0) #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) + +/* + * Stupid hack. Probably best to move this to a per-platform file if + * this ever grows. + */ +#if defined(RASPBERRYPI_PICO) +#define FRQ_KHZ 133000 +#elif defined(RASPBERRYPI_PICO2) +#define FRQ_KHZ 150000 +#else +#error Unknown board +#endif
diff --git a/pico-sdk b/pico-sdk index 6a7db34..a1438df 160000 --- a/pico-sdk +++ b/pico-sdk
@@ -1 +1 @@ -Subproject commit 6a7db34ff63345a7badec79ebea3aaef1712f374 +Subproject commit a1438dff1d38bd9c65dbd693f0e5db4b9ae91779
diff --git a/start.c b/start.c index 383a5b5..b3e0c49 100644 --- a/start.c +++ b/start.c
@@ -2,6 +2,7 @@ #include <stddef.h> +#include "hardware/clocks.h" #include "bsp/board.h" #include "tusb.h" #include "m1-pd-bmc.h" @@ -428,7 +429,7 @@ set_upstream_ops(false); - success = set_sys_clock_khz(133000, false); + success = set_sys_clock_khz(FRQ_KHZ, false); board_init();