bsps/beagle: Refactored i2c driver

Refactored the i2c driver to parse register values from the device
tree rather than hardcoding them. But still the clocks have to
initialized manually.
This commit is contained in:
G S Niteesh Babu
2021-04-11 00:45:27 +05:30
committed by Christian Mauderer
parent 8854aec152
commit d75b29d95e
4 changed files with 113 additions and 94 deletions

View File

@@ -49,6 +49,8 @@
#include <libcpu/omap3.h>
#include <libcpu/am335x.h>
#include <ofw/ofw.h>
#define BSP_FEATURE_IRQ_EXTENSION
/* UART base clock frequency */
@@ -68,6 +70,8 @@
#define udelay(u) rtems_task_wake_after(1 + ((u)/rtems_configuration_get_microseconds_per_tick()))
int beagle_get_node_unit(phandle_t node);
/* Write a uint32_t value to a memory address. */
static inline void
write32(uint32_t address, uint32_t value)