+// SPDX-License-Identifier: GPL-2.0+
/*
* Sample SPMI bus driver
*
* It emulates bus with single pm8916-like pmic that has only GPIO reigsters.
*
* (C) Copyright 2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <asm/gpio.h>
#include <asm/io.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define EMUL_GPIO_PID_START 0xC0
#define EMUL_GPIO_PID_END 0xC3
};
struct sandbox_emul_gpio {
- struct sandbox_emul_fake_regs r[EMUL_GPIO_REG_END]; /* Fake registers */
+ /* Fake registers - need one more entry as REG_END is valid address. */
+ struct sandbox_emul_fake_regs r[EMUL_GPIO_REG_END + 1];
};
struct sandbox_spmi_priv {