RTEMS | aarch64/raspberrypi: Add Watchdog Timer driver (!120)

Kinsey Moore (@opticron) gitlab at rtems.org
Fri Jul 26 01:51:33 UTC 2024




Kinsey Moore started a new discussion on bsps/aarch64/raspberrypi/start/watchdog.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/120#note_109921

 > + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 > + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 > + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 > + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 > + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 > + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 > + * POSSIBILITY OF SUCH DAMAGE.
 > + */
 > +
 > +#include <bsp/raspberrypi.h>
 > +#include <bsp/watchdog.h>
 > +
 > +#define PM_WDOG BCM2835_REG(BCM2711_PM_WDOG)
 > +#define PM_RSTC BCM2835_REG(BCM2711_PM_RSTC)
 > +
 > +int raspberrypi_watchdog_count = 0;

This should likely be static, but I'm not sure I understand its purpose other than indicating whether the watchdog is "enabled" and once it's enabled it can't be disabled. It feels especially useless since any calls that depend on it being non-zero call the initialization function to set it to 1 if it isn't.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/120#note_109921
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20240726/d61da620/attachment-0001.htm>


More information about the bugs mailing list