diff options
Diffstat (limited to 'bsps/arm/beagle/include')
-rw-r--r-- | bsps/arm/beagle/include/bsp.h | 4 | ||||
-rw-r--r-- | bsps/arm/beagle/include/bsp/i2c.h | 32 |
2 files changed, 6 insertions, 30 deletions
diff --git a/bsps/arm/beagle/include/bsp.h b/bsps/arm/beagle/include/bsp.h index cb415fda89..80a9cc291d 100644 --- a/bsps/arm/beagle/include/bsp.h +++ b/bsps/arm/beagle/include/bsp.h @@ -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) diff --git a/bsps/arm/beagle/include/bsp/i2c.h b/bsps/arm/beagle/include/bsp/i2c.h index 60f71194bf..d80b376fa0 100644 --- a/bsps/arm/beagle/include/bsp/i2c.h +++ b/bsps/arm/beagle/include/bsp/i2c.h @@ -26,6 +26,7 @@ #include <rtems.h> #include <bsp.h> #include <dev/i2c/i2c.h> +#include <ofw/ofw.h> #ifdef __cplusplus extern "C" { @@ -38,10 +39,6 @@ extern "C" { #define BBB_I2C_1_BUS_PATH "/dev/i2c-1" #define BBB_I2C_2_BUS_PATH "/dev/i2c-2" -#define BBB_I2C0_IRQ 70 -#define BBB_I2C1_IRQ 71 -#define BBB_I2C2_IRQ 30 - typedef enum { I2C0, I2C1, @@ -87,32 +84,7 @@ typedef struct i2c_regs { uint32_t BBB_I2C_SBLOCK; } bbb_i2c_regs; -int am335x_i2c_bus_register( - const char *bus_path, - uintptr_t register_base, - uint32_t input_clock, /* FIXME: Unused. Left for compatibility. */ - rtems_vector_number irq -); - -static inline int bbb_register_i2c_1( void ) -{ - return am335x_i2c_bus_register( - BBB_I2C_1_BUS_PATH, - AM335X_I2C1_BASE, - I2C_BUS_CLOCK_DEFAULT, - BBB_I2C1_IRQ - ); -} - -static inline int bbb_register_i2c_2( void ) -{ - return am335x_i2c_bus_register( - BBB_I2C_2_BUS_PATH, - AM335X_I2C2_BASE, - I2C_BUS_CLOCK_DEFAULT, - BBB_I2C2_IRQ - ); -} +void beagle_i2c_init( phandle_t node ); #ifdef __cplusplus } |