2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2014-12-10 06:22:50 +00:00
|
|
|
/*
|
2015-07-27 03:37:39 +00:00
|
|
|
* Copyright 2014 Freescale Semiconductor, Inc.
|
2014-12-10 06:22:50 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Dummy header file to enable CONFIG_OF_CONTROL.
|
|
|
|
* If CONFIG_OF_CONTROL is enabled, lib/fdtdec.c is compiled.
|
|
|
|
* It includes <asm/arch/gpio.h> via <asm/gpio.h>, so those SoCs that enable
|
|
|
|
* OF_CONTROL must have arch/gpio.h.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ASM_ARCH_MX85XX_GPIO_H
|
|
|
|
#define __ASM_ARCH_MX85XX_GPIO_H
|
|
|
|
|
2016-05-25 13:15:20 +00:00
|
|
|
#ifndef CONFIG_MPC85XX_GPIO
|
2015-04-28 17:59:50 +00:00
|
|
|
#include <asm/mpc85xx_gpio.h>
|
2016-05-25 13:15:20 +00:00
|
|
|
#endif
|
2015-04-28 17:59:50 +00:00
|
|
|
|
2018-01-15 10:07:48 +00:00
|
|
|
struct mpc8xxx_gpio_plat {
|
2021-02-25 09:22:50 +00:00
|
|
|
phys_addr_t addr;
|
dm: gpio: MPC85XX GPIO platform data support
Define a platform data structure for the MPC85XX GPIO driver to allow
use of the driver without device tree. Users should define the GPIO
blocks for their platform like this:
struct mpc85xx_gpio_plat gpio_blocks[] = {
{
.addr = 0x130000,
.ngpios = 32,
},
{
.addr = 0x131000,
.ngpios = 32,
},
};
U_BOOT_DEVICES(my_platform_gpios) = {
{ "gpio_mpc85xx", &gpio_blocks[0] },
{ "gpio_mpc85xx", &gpio_blocks[1] },
};
This is intended to build upon the recent submission of the base
MPC85XX driver from Mario Six. We need to use that new driver
without dts support and this patch gives us that flexibility.
This has been tested on a Freescale T2080 CPU, although only the first
GPIO block.
Signed-off-by: Hamish Martin <hamish.martin@alliedtelesis.co.nz>
Reviewed-by: Mario Six <mario.six@gdsys.cc>
Tested-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Simon Glass <sjg@chromium.org>
2016-06-13 22:17:05 +00:00
|
|
|
unsigned long size;
|
|
|
|
uint ngpios;
|
|
|
|
};
|
|
|
|
|
2014-12-10 06:22:50 +00:00
|
|
|
#endif
|