There is no really need for restricted variable types for the parameters. Replace them by standard C types with the same behaviour. Only imx_gpio_mode() need it, to ensure GPIO's bit settings. Signed-off-by: Juergen Beisert <jbe@xxxxxxxxxxxxxx> --- arch/arm/mach-stm/iomux-imx23.c | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-stm/iomux-imx23.c b/arch/arm/mach-stm/iomux-imx23.c index b0f4046..b50aac3 100644 --- a/arch/arm/mach-stm/iomux-imx23.c +++ b/arch/arm/mach-stm/iomux-imx23.c @@ -31,42 +31,49 @@ #define HW_PINCTRL_DIN0 0x600 #define HW_PINCTRL_DOE0 0x700 -static uint32_t calc_mux_reg(uint32_t no) +static unsigned calc_mux_reg(unsigned no) { /* each register controls 16 pads */ return ((no >> 4) << 4) + HW_PINCTRL_MUXSEL0; } -static uint32_t calc_strength_reg(uint32_t no) +static unsigned calc_strength_reg(unsigned no) { /* each register controls 8 pads */ return ((no >> 3) << 4) + HW_PINCTRL_DRIVE0; } -static uint32_t calc_pullup_reg(uint32_t no) +static unsigned calc_pullup_reg(unsigned no) { /* each register controls 32 pads */ return ((no >> 5) << 4) + HW_PINCTRL_PULL0; } -static uint32_t calc_output_enable_reg(uint32_t no) +static unsigned calc_output_enable_reg(unsigned no) { /* each register controls 32 pads */ return ((no >> 5) << 4) + HW_PINCTRL_DOE0; } -static uint32_t calc_output_reg(uint32_t no) +static unsigned calc_output_reg(unsigned no) { /* each register controls 32 pads */ return ((no >> 5) << 4) + HW_PINCTRL_DOUT0; } +static unsigned calc_input_reg(unsigned no) +{ + /* each register controls 32 pads */ + return ((no >> 5) << 4) + HW_PINCTRL_DIN0; +} + /** * @param[in] m One of the defines from iomux-mx23.h to configure *one* pin */ -void imx_gpio_mode(unsigned m) +void imx_gpio_mode(uint32_t m) { - uint32_t reg_offset, gpio_pin, reg; + uint32_t reg; + unsigned gpio_pin, reg_offset; gpio_pin = GET_GPIO_NO(m); -- 1.7.2.3 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox