projects
/
platform
/
kernel
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
KM/kmp204x: qrio and i2c deblock code moved to common
[platform/kernel/u-boot.git]
/
board
/
keymile
/
kmp204x
/
pci.c
diff --git
a/board/keymile/kmp204x/pci.c
b/board/keymile/kmp204x/pci.c
index
a804745
..
15bbc81
100644
(file)
--- a/
board/keymile/kmp204x/pci.c
+++ b/
board/keymile/kmp204x/pci.c
@@
-16,13
+16,14
@@
#include <asm/fsl_serdes.h>
#include <linux/errno.h>
#include <asm/fsl_serdes.h>
#include <linux/errno.h>
+#include "../common/qrio.h"
#include "kmp204x.h"
#define PROM_SEL_L 11
/* control the PROM_SEL_L signal*/
static void toggle_fpga_eeprom_bus(bool cpu_own)
{
#include "kmp204x.h"
#define PROM_SEL_L 11
/* control the PROM_SEL_L signal*/
static void toggle_fpga_eeprom_bus(bool cpu_own)
{
- qrio_gpio_direction_output(GPIO_A, PROM_SEL_L, !cpu_own);
+ qrio_gpio_direction_output(
QRIO_
GPIO_A, PROM_SEL_L, !cpu_own);
}
#define CONF_SEL_L 10
}
#define CONF_SEL_L 10
@@
-40,17
+41,17
@@
int trigger_fpga_config(void)
toggle_fpga_eeprom_bus(false);
/* assert CONF_SEL_L to be able to drive FPGA_PROG_L */
toggle_fpga_eeprom_bus(false);
/* assert CONF_SEL_L to be able to drive FPGA_PROG_L */
- qrio_gpio_direction_output(GPIO_A, CONF_SEL_L, 0);
+ qrio_gpio_direction_output(
QRIO_
GPIO_A, CONF_SEL_L, 0);
/* trigger the config start */
/* trigger the config start */
- qrio_gpio_direction_output(GPIO_A, FPGA_PROG_L, 0);
+ qrio_gpio_direction_output(
QRIO_
GPIO_A, FPGA_PROG_L, 0);
/* small delay for INIT_L line */
udelay(10);
/* wait for FPGA_INIT to be asserted */
do {
/* small delay for INIT_L line */
udelay(10);
/* wait for FPGA_INIT to be asserted */
do {
- init_l = qrio_get_gpio(GPIO_A, FPGA_INIT_L);
+ init_l = qrio_get_gpio(
QRIO_
GPIO_A, FPGA_INIT_L);
if (timeout-- == 0) {
printf("FPGA_INIT timeout\n");
ret = -EFAULT;
if (timeout-- == 0) {
printf("FPGA_INIT timeout\n");
ret = -EFAULT;
@@
-60,7
+61,7
@@
int trigger_fpga_config(void)
} while (init_l);
/* deassert FPGA_PROG, config should start */
} while (init_l);
/* deassert FPGA_PROG, config should start */
- qrio_set_gpio(GPIO_A, FPGA_PROG_L, 1);
+ qrio_set_gpio(
QRIO_
GPIO_A, FPGA_PROG_L, 1);
return ret;
}
return ret;
}
@@
-74,7
+75,7
@@
static int wait_for_fpga_config(void)
printf("PCIe FPGA config:");
do {
printf("PCIe FPGA config:");
do {
- done = qrio_get_gpio(GPIO_A, FPGA_DONE);
+ done = qrio_get_gpio(
QRIO_
GPIO_A, FPGA_DONE);
if (timeout-- == 0) {
printf(" FPGA_DONE timeout\n");
ret = -EFAULT;
if (timeout-- == 0) {
printf(" FPGA_DONE timeout\n");
ret = -EFAULT;
@@
-87,7
+88,7
@@
static int wait_for_fpga_config(void)
err_out:
/* deactive CONF_SEL and give the CPU conf EEPROM access */
err_out:
/* deactive CONF_SEL and give the CPU conf EEPROM access */
- qrio_set_gpio(GPIO_A, CONF_SEL_L, 1);
+ qrio_set_gpio(
QRIO_
GPIO_A, CONF_SEL_L, 1);
toggle_fpga_eeprom_bus(true);
return ret;
toggle_fpga_eeprom_bus(true);
return ret;