diff --git a/arch/arm/src/rp2040/.gitignore b/arch/arm/src/rp2040/.gitignore new file mode 100644 index 0000000000..ce98633950 --- /dev/null +++ b/arch/arm/src/rp2040/.gitignore @@ -0,0 +1 @@ +rp2040_boot_stage2.S diff --git a/boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_pico.h b/boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_pico.h index 5f912b8829..c13db1fc00 100644 --- a/boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_pico.h +++ b/boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_pico.h @@ -31,7 +31,7 @@ int rp2040_bringup(void); -#ifdef CONFIG_DEV_GPIO +#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_ARCH_BOARD_COMMON) int rp2040_dev_gpio_init(void); #endif diff --git a/boards/arm/rp2040/adafruit-kb2040/src/rp2040_pico.h b/boards/arm/rp2040/adafruit-kb2040/src/rp2040_pico.h index 149e15f650..b3de5657d9 100644 --- a/boards/arm/rp2040/adafruit-kb2040/src/rp2040_pico.h +++ b/boards/arm/rp2040/adafruit-kb2040/src/rp2040_pico.h @@ -31,7 +31,7 @@ int rp2040_bringup(void); -#ifdef CONFIG_DEV_GPIO +#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_ARCH_BOARD_COMMON) int rp2040_dev_gpio_init(void); #endif diff --git a/boards/arm/rp2040/adafruit-qt-py-rp2040/src/rp2040_pico.h b/boards/arm/rp2040/adafruit-qt-py-rp2040/src/rp2040_pico.h index 6d41af2115..1f62fbfef5 100644 --- a/boards/arm/rp2040/adafruit-qt-py-rp2040/src/rp2040_pico.h +++ b/boards/arm/rp2040/adafruit-qt-py-rp2040/src/rp2040_pico.h @@ -31,7 +31,7 @@ int rp2040_bringup(void); -#ifdef CONFIG_DEV_GPIO +#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_ARCH_BOARD_COMMON) int rp2040_dev_gpio_init(void); #endif diff --git a/boards/arm/rp2040/common/include/rp2040_common_pico.h b/boards/arm/rp2040/common/include/rp2040_common_pico.h new file mode 100644 index 0000000000..0b22a380d0 --- /dev/null +++ b/boards/arm/rp2040/common/include/rp2040_common_pico.h @@ -0,0 +1,72 @@ +/**************************************************************************** + * boards/arm/rp2040/common/include/rp2040_common_pico.h + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +#ifndef __BOARDS_ARM_RP2040_COMMON_INCLUDE_RP2040_COMMON_PICO_H +#define __BOARDS_ARM_RP2040_COMMON_INCLUDE_RP2040_COMMON_PICO_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Inline Functions + ****************************************************************************/ + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +/**************************************************************************** + * Name: rp2040_dev_gpio_init + ****************************************************************************/ + +#ifdef CONFIG_DEV_GPIO +int rp2040_dev_gpio_init(void); +#endif + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __BOARDS_ARM_RP2040_COMMON_INCLUDE_RP2040_COMMON_PICO_H */ diff --git a/boards/arm/rp2040/common/src/rp2040_common_bringup.c b/boards/arm/rp2040/common/src/rp2040_common_bringup.c index 5393c8ace6..2275fe92c7 100644 --- a/boards/arm/rp2040/common/src/rp2040_common_bringup.c +++ b/boards/arm/rp2040/common/src/rp2040_common_bringup.c @@ -36,7 +36,7 @@ #include -#include "rp2040_pico.h" +#include "rp2040_common_pico.h" #include "rp2040_common_bringup.h" #ifdef CONFIG_LCD_BACKPACK diff --git a/boards/arm/rp2040/pimoroni-tiny2040/src/rp2040_pico.h b/boards/arm/rp2040/pimoroni-tiny2040/src/rp2040_pico.h index 68a9c11f23..b640b5f13c 100644 --- a/boards/arm/rp2040/pimoroni-tiny2040/src/rp2040_pico.h +++ b/boards/arm/rp2040/pimoroni-tiny2040/src/rp2040_pico.h @@ -31,7 +31,7 @@ int rp2040_bringup(void); -#ifdef CONFIG_DEV_GPIO +#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_ARCH_BOARD_COMMON) int rp2040_dev_gpio_init(void); #endif diff --git a/boards/arm/rp2040/raspberrypi-pico-w/src/rp2040_pico.h b/boards/arm/rp2040/raspberrypi-pico-w/src/rp2040_pico.h index 15909ddf2a..11b5fd705d 100644 --- a/boards/arm/rp2040/raspberrypi-pico-w/src/rp2040_pico.h +++ b/boards/arm/rp2040/raspberrypi-pico-w/src/rp2040_pico.h @@ -31,7 +31,7 @@ int rp2040_bringup(void); -#ifdef CONFIG_DEV_GPIO +#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_ARCH_BOARD_COMMON) int rp2040_dev_gpio_init(void); #endif diff --git a/boards/arm/rp2040/raspberrypi-pico/src/rp2040_pico.h b/boards/arm/rp2040/raspberrypi-pico/src/rp2040_pico.h index 148497f6b9..9d4be7edc3 100644 --- a/boards/arm/rp2040/raspberrypi-pico/src/rp2040_pico.h +++ b/boards/arm/rp2040/raspberrypi-pico/src/rp2040_pico.h @@ -48,7 +48,7 @@ int rp2040_bringup(void); -#ifdef CONFIG_DEV_GPIO +#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_ARCH_BOARD_COMMON) int rp2040_dev_gpio_init(void); #endif diff --git a/boards/arm/rp2040/seeed-xiao-rp2040/src/rp2040_pico.h b/boards/arm/rp2040/seeed-xiao-rp2040/src/rp2040_pico.h index aa8bc120fd..2605a67e47 100644 --- a/boards/arm/rp2040/seeed-xiao-rp2040/src/rp2040_pico.h +++ b/boards/arm/rp2040/seeed-xiao-rp2040/src/rp2040_pico.h @@ -37,7 +37,7 @@ int rp2040_bringup(void); -#ifdef CONFIG_DEV_GPIO +#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_ARCH_BOARD_COMMON) int rp2040_dev_gpio_init(void); #endif diff --git a/boards/arm/rp2040/w5500-evb-pico/src/rp2040_pico.h b/boards/arm/rp2040/w5500-evb-pico/src/rp2040_pico.h index 98ad3e2dd8..bb3feb790e 100644 --- a/boards/arm/rp2040/w5500-evb-pico/src/rp2040_pico.h +++ b/boards/arm/rp2040/w5500-evb-pico/src/rp2040_pico.h @@ -48,7 +48,7 @@ int rp2040_bringup(void); -#ifdef CONFIG_DEV_GPIO +#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_ARCH_BOARD_COMMON) int rp2040_dev_gpio_init(void); #endif diff --git a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/src/rp2040_pico.h b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/src/rp2040_pico.h index 623b8df362..7e4e5c1825 100644 --- a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/src/rp2040_pico.h +++ b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/src/rp2040_pico.h @@ -31,7 +31,7 @@ int rp2040_bringup(void); -#ifdef CONFIG_DEV_GPIO +#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_ARCH_BOARD_COMMON) int rp2040_dev_gpio_init(void); #endif diff --git a/boards/arm/rp2040/waveshare-rp2040-zero/src/rp2040_pico.h b/boards/arm/rp2040/waveshare-rp2040-zero/src/rp2040_pico.h index c1bc488742..b69e6658dd 100644 --- a/boards/arm/rp2040/waveshare-rp2040-zero/src/rp2040_pico.h +++ b/boards/arm/rp2040/waveshare-rp2040-zero/src/rp2040_pico.h @@ -29,7 +29,7 @@ int rp2040_bringup(void); -#ifdef CONFIG_DEV_GPIO +#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_ARCH_BOARD_COMMON) int rp2040_dev_gpio_init(void); #endif