summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-05-10 18:15:50 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-05-10 18:15:50 +0200
commit5fdedd222f566b61f9e5c9278e10af777384e9b4 (patch)
tree7db078612b2ab29f516bcb5bbf83fe7afc3da50d /commands
parent6a4f6bf4493031c8d655f0506819d4788c9a7553 (diff)
parent89d1d8c9a7266d62abf0ae03513a539be2120077 (diff)
downloadbarebox-5fdedd222f566b61f9e5c9278e10af777384e9b4.tar.gz
Merge branch 'for-next/qspi'
Diffstat (limited to 'commands')
-rw-r--r--commands/spi.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/commands/spi.c b/commands/spi.c
index 7bf193b..55a0e25 100644
--- a/commands/spi.c
+++ b/commands/spi.c
@@ -62,21 +62,21 @@ static int do_spi(int argc, char *argv[])
return COMMAND_ERROR_USAGE;
- spi.master = spi_get_master(bus);
- if (!spi.master) {
+ spi.controller = spi_get_controller(bus);
+ if (!spi.controller) {
printf("spi bus %d not found\n", bus);
return -ENODEV;
}
- if (spi.chip_select >= spi.master->num_chipselect) {
- printf("spi chip select (%d) >= master num chipselect (%d)\n",
- spi.chip_select, spi.master->num_chipselect);
+ if (spi.chip_select >= spi.controller->num_chipselect) {
+ printf("spi chip select (%d) >= controller num chipselect (%d)\n",
+ spi.chip_select, spi.controller->num_chipselect);
return -EINVAL;
}
- ret = spi.master->setup(&spi);
+ ret = spi.controller->setup(&spi);
if (ret) {
- printf("can not setup the master (%d)\n", ret);
+ printf("can not setup the controller (%d)\n", ret);
return ret;
}
@@ -93,7 +93,7 @@ static int do_spi(int argc, char *argv[])
byte_per_word = max(spi.bits_per_word / 8, 1);
if (verbose) {
printf("device config\n");
- printf(" bus_num = %d\n", spi.master->bus_num);
+ printf(" bus_num = %d\n", spi.controller->bus_num);
printf(" max_speed_hz = %d\n", spi.max_speed_hz);
printf(" chip_select = %d\n", spi.chip_select);
printf(" mode = 0x%x\n", spi.mode);