Re: [PATCH] arm: baltos: enable mPCIe slot and configure external GPIO controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 10, 2017 at 09:58:20AM +0100, yegorslists@xxxxxxxxxxxxxx wrote:
> From: Yegor Yefremov <yegorslists@xxxxxxxxxxxxxx>
> 
> Baltos devices provide a mPCIe slot, whose power is turned off by
> default. This patch activates mPCIe slot in barebox, so that for example
> GSM modem can be already available in user space.
> 
> Also configure external GPIO controller via setting its output pins to
> low.
> 
> Signed-off-by: Yegor Yefremov <yegorslists@xxxxxxxxxxxxxx>
> ---
>  arch/arm/boards/vscom-baltos/board.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)

Applied, thanks

Sascha

> 
> diff --git a/arch/arm/boards/vscom-baltos/board.c b/arch/arm/boards/vscom-baltos/board.c
> index fea992d..39f40a6 100644
> --- a/arch/arm/boards/vscom-baltos/board.c
> +++ b/arch/arm/boards/vscom-baltos/board.c
> @@ -41,6 +41,7 @@
>  #include <linux/err.h>
>  #include <mach/bbu.h>
>  #include <libfile.h>
> +#include <gpio.h>
>  
>  static struct omap_barebox_part baltos_barebox_part = {
>  	.nand_offset = SZ_512K,
> @@ -109,6 +110,17 @@ static int baltos_read_eeprom(void)
>  	sprintf(var_buf, "%d", hw_param.SystemId);
>  	globalvar_add_simple("board.id", var_buf);
>  
> +	/* enable mPCIe slot */
> +	gpio_direction_output(100, 1);
> +
> +	/* configure output signals of the external GPIO controller */
> +	if (hw_param.SystemId == 210 || hw_param.SystemId == 211) {
> +		gpio_direction_output(132, 0);
> +		gpio_direction_output(133, 0);
> +		gpio_direction_output(134, 0);
> +		gpio_direction_output(135, 0);
> +	}
> +
>  	return 0;
>  }
>  environment_initcall(baltos_read_eeprom);
> -- 
> 2.1.4
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux