From 10a6aa963c1542724d9ca370386be6164914fc76 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Fri, 18 Sep 2020 16:26:06 +0200 Subject: spi: mpc8xxx_spi.c: fix cs activate/deactivate Somewhere between v2020.04 and v2020.07 the mpc8xxx_spi driver broke, I'm guessing due to this hunk @@ -559,6 +560,8 @@ int dm_gpio_set_dir_flags(struct gpio_desc *desc, ulong flags) if (ret) return ret; + /* combine the requested flags (for IN/OUT) and the descriptor flags */ + flags |= desc->flags; ret = _dm_gpio_set_dir_flags(desc, flags); from commit 695e5fd5469a ("gpio: update dir_flags management"). But the blame is mostly on the driver itself which seems rather confused: The chip select gpios are requested with GPIOD_ACTIVE_LOW, but then in each activate/deactivate, dm_gpio_set_dir_flags() is called with merely GPIOD_IS_OUT, and then the driver call set_value(0) for activate. That used to work, but with the above hunk, the ACTIVE_LOW setting from the request becomes persistent, so the gpio driver ends up being asked to set the value to 1 in mpc8xxx_spi_cs_activate(). So drop the dm_gpio_set_dir_flags() calls in the activate/deactivate functions, and use a value of 1 to mean "logically enabled". Ideally, I think we should also drop the GPIOD_ACTIVE_LOW from the request and make it up to the list of gpio cs in DT to indicate whether that CS is enabled when driven low (as is of course usually the case), but that requires changing arch/powerpc/dts/gdsys/gazerbeam-base.dtsi among others, and I don't have that hardware to test on. I have, however, tested our own (mpc8309-based) hardware with this change, and I have also tested that removing the GPIOD_ACTIVE_LOW from the request and updating our DT as - gpios = <&spisel 0 0>; + gpios = <&spisel 0 GPIO_ACTIVE_LOW>; still works. Signed-off-by: Rasmus Villemoes --- drivers/spi/mpc8xxx_spi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/spi/mpc8xxx_spi.c b/drivers/spi/mpc8xxx_spi.c index 811b5d44fb..ec39c12b3d 100644 --- a/drivers/spi/mpc8xxx_spi.c +++ b/drivers/spi/mpc8xxx_spi.c @@ -109,8 +109,7 @@ static void mpc8xxx_spi_cs_activate(struct udevice *dev) struct mpc8xxx_priv *priv = dev_get_priv(dev->parent); struct dm_spi_slave_platdata *platdata = dev_get_parent_platdata(dev); - dm_gpio_set_dir_flags(&priv->gpios[platdata->cs], GPIOD_IS_OUT); - dm_gpio_set_value(&priv->gpios[platdata->cs], 0); + dm_gpio_set_value(&priv->gpios[platdata->cs], 1); } static void mpc8xxx_spi_cs_deactivate(struct udevice *dev) @@ -118,8 +117,7 @@ static void mpc8xxx_spi_cs_deactivate(struct udevice *dev) struct mpc8xxx_priv *priv = dev_get_priv(dev->parent); struct dm_spi_slave_platdata *platdata = dev_get_parent_platdata(dev); - dm_gpio_set_dir_flags(&priv->gpios[platdata->cs], GPIOD_IS_OUT); - dm_gpio_set_value(&priv->gpios[platdata->cs], 1); + dm_gpio_set_value(&priv->gpios[platdata->cs], 0); } static int mpc8xxx_spi_xfer(struct udevice *dev, uint bitlen, -- cgit From 24e8c0e3b3d2facee9d3c473aff41e0a20d7cf39 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Mon, 21 Sep 2020 09:48:24 +0200 Subject: gpio/mpc83xx_spisel_boot.c: include log.h Fix build failure, it used to get this implicitly through common.h until f7ae49fc4f (common: Drop log.h from common header). Signed-off-by: Rasmus Villemoes Reviewed-by: Heiko Schocher --- drivers/gpio/mpc83xx_spisel_boot.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/mpc83xx_spisel_boot.c b/drivers/gpio/mpc83xx_spisel_boot.c index c7b08404d9..54dc437e1c 100644 --- a/drivers/gpio/mpc83xx_spisel_boot.c +++ b/drivers/gpio/mpc83xx_spisel_boot.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include -- cgit From 406119172727828c27d64a52046015abd0a49383 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sun, 20 Sep 2020 12:31:47 +0200 Subject: doc/build/gcc.rst: add missing apt-get *install* The install command is missing for an apt-get command. Signed-off-by: Heinrich Schuchardt --- doc/build/gcc.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/build/gcc.rst b/doc/build/gcc.rst index fcb0b1ffb3..1ceba0b699 100644 --- a/doc/build/gcc.rst +++ b/doc/build/gcc.rst @@ -17,7 +17,7 @@ You could install GCC and the GCC cross compiler for the ARMv8 architecture with .. code-block:: bash - sudo apt-get gcc gcc-aarch64-linux-gnu + sudo apt-get install gcc gcc-aarch64-linux-gnu Depending on the build targets further packages maybe needed -- cgit From 643b5e7ea37139640c4c780a221d365a6ee60194 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Thu, 17 Sep 2020 17:57:21 +0200 Subject: disk: typo Terra Bytes 512 * 2^32 bytes equals 2 tebibytes. Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- disk/part_efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disk/part_efi.c b/disk/part_efi.c index de3491821f..60b1c1d761 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -7,7 +7,7 @@ /* * NOTE: * when CONFIG_SYS_64BIT_LBA is not defined, lbaint_t is 32 bits; this - * limits the maximum size of addressable storage to < 2 Terra Bytes + * limits the maximum size of addressable storage to < 2 tebibytes */ #include #include -- cgit From dc8368b7ee2b06c3b151074e4eb11fe3dbaa41d8 Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Mon, 7 Sep 2020 10:37:35 +1200 Subject: configs: powerpc: Don't set CONFIG_ENV_ADDR for QorIQ SPIFLASH Setting CONFIG_ENV_ADDR to something other than 0 stops gd->env_addr from being allocated dynamically. When the environment is in SPI we need it to be allocated as we can't use a direct memory mapped address. Signed-off-by: Chris Packham --- configs/T1023RDB_SPIFLASH_defconfig | 1 - configs/T1024RDB_SPIFLASH_defconfig | 1 - configs/T1040D4RDB_SPIFLASH_defconfig | 1 - configs/T1040RDB_SPIFLASH_defconfig | 1 - configs/T1042D4RDB_SPIFLASH_defconfig | 1 - configs/T1042RDB_PI_SPIFLASH_defconfig | 1 - configs/T2080QDS_SPIFLASH_defconfig | 1 - configs/T2080RDB_SPIFLASH_defconfig | 1 - configs/T2081QDS_SPIFLASH_defconfig | 1 - 9 files changed, 9 deletions(-) diff --git a/configs/T1023RDB_SPIFLASH_defconfig b/configs/T1023RDB_SPIFLASH_defconfig index b33bf44c11..0b16784b61 100644 --- a/configs/T1023RDB_SPIFLASH_defconfig +++ b/configs/T1023RDB_SPIFLASH_defconfig @@ -50,7 +50,6 @@ CONFIG_MTDIDS_DEFAULT="nor0=fe8000000.nor,nand0=fff800000.flash,spi0=spife110000 CONFIG_MTDPARTS_DEFAULT="mtdparts=fe8000000.nor:1m(uboot),5m(kernel),128k(dtb),96m(fs),-(user);fff800000.flash:1m(uboot),5m(kernel),128k(dtb),96m(fs),-(user);spife110000.0:1m(uboot),5m(kernel),128k(dtb),-(user)" CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y -CONFIG_ENV_ADDR=0xFFFC9000 CONFIG_FSL_CAAM=y CONFIG_FSL_ESDHC=y CONFIG_MTD=y diff --git a/configs/T1024RDB_SPIFLASH_defconfig b/configs/T1024RDB_SPIFLASH_defconfig index 31cbc7a955..784d125bce 100644 --- a/configs/T1024RDB_SPIFLASH_defconfig +++ b/configs/T1024RDB_SPIFLASH_defconfig @@ -53,7 +53,6 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=fe8000000.nor:1m(uboot),5m(kernel),128k(dtb),9 CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y -CONFIG_ENV_ADDR=0xFFFC9000 CONFIG_DM=y CONFIG_FSL_CAAM=y CONFIG_SYS_FSL_DDR3=y diff --git a/configs/T1040D4RDB_SPIFLASH_defconfig b/configs/T1040D4RDB_SPIFLASH_defconfig index 04578bf7c1..ed3a7bfa1d 100644 --- a/configs/T1040D4RDB_SPIFLASH_defconfig +++ b/configs/T1040D4RDB_SPIFLASH_defconfig @@ -47,7 +47,6 @@ CONFIG_MTDIDS_DEFAULT="nor0=fe8000000.nor,nand0=fff800000.flash,spi0=spife110000 CONFIG_MTDPARTS_DEFAULT="mtdparts=fe8000000.nor:1m(uboot),5m(kernel),128k(dtb),96m(fs),-(user);fff800000.flash:2m(uboot),9m(kernel),128k(dtb),96m(fs),-(user);spife110000.0:2m(uboot),9m(kernel),128k(dtb),-(user)" CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y -CONFIG_ENV_ADDR=0xFFFC9000 CONFIG_FSL_CAAM=y CONFIG_FSL_ESDHC=y CONFIG_MTD=y diff --git a/configs/T1040RDB_SPIFLASH_defconfig b/configs/T1040RDB_SPIFLASH_defconfig index 4b674d5955..f162019ab3 100644 --- a/configs/T1040RDB_SPIFLASH_defconfig +++ b/configs/T1040RDB_SPIFLASH_defconfig @@ -47,7 +47,6 @@ CONFIG_MTDIDS_DEFAULT="nor0=fe8000000.nor,nand0=fff800000.flash,spi0=spife110000 CONFIG_MTDPARTS_DEFAULT="mtdparts=fe8000000.nor:1m(uboot),5m(kernel),128k(dtb),96m(fs),-(user);fff800000.flash:2m(uboot),9m(kernel),128k(dtb),96m(fs),-(user);spife110000.0:2m(uboot),9m(kernel),128k(dtb),-(user)" CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y -CONFIG_ENV_ADDR=0xFFFC9000 CONFIG_FSL_CAAM=y CONFIG_SYS_FSL_DDR3=y CONFIG_FSL_ESDHC=y diff --git a/configs/T1042D4RDB_SPIFLASH_defconfig b/configs/T1042D4RDB_SPIFLASH_defconfig index e670f068e6..fae57883a4 100644 --- a/configs/T1042D4RDB_SPIFLASH_defconfig +++ b/configs/T1042D4RDB_SPIFLASH_defconfig @@ -50,7 +50,6 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=fe8000000.nor:1m(uboot),5m(kernel),128k(dtb),9 CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y -CONFIG_ENV_ADDR=0xFFFC9000 CONFIG_DM=y CONFIG_FSL_CAAM=y CONFIG_DM_I2C=y diff --git a/configs/T1042RDB_PI_SPIFLASH_defconfig b/configs/T1042RDB_PI_SPIFLASH_defconfig index afeb65aa47..3b4e2a4fbf 100644 --- a/configs/T1042RDB_PI_SPIFLASH_defconfig +++ b/configs/T1042RDB_PI_SPIFLASH_defconfig @@ -49,7 +49,6 @@ CONFIG_MTDIDS_DEFAULT="nor0=fe8000000.nor,nand0=fff800000.flash,spi0=spife110000 CONFIG_MTDPARTS_DEFAULT="mtdparts=fe8000000.nor:1m(uboot),5m(kernel),128k(dtb),96m(fs),-(user);fff800000.flash:2m(uboot),9m(kernel),128k(dtb),96m(fs),-(user);spife110000.0:2m(uboot),9m(kernel),128k(dtb),-(user)" CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y -CONFIG_ENV_ADDR=0xFFFC9000 CONFIG_FSL_CAAM=y CONFIG_SYS_FSL_DDR3=y CONFIG_FSL_ESDHC=y diff --git a/configs/T2080QDS_SPIFLASH_defconfig b/configs/T2080QDS_SPIFLASH_defconfig index 0e787ea440..cd5e445db1 100644 --- a/configs/T2080QDS_SPIFLASH_defconfig +++ b/configs/T2080QDS_SPIFLASH_defconfig @@ -46,7 +46,6 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=fe8000000.nor:1m(uboot),5m(kernel),128k(dtb),9 CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y -CONFIG_ENV_ADDR=0xFFFC9000 CONFIG_DM=y CONFIG_FSL_CAAM=y CONFIG_DM_I2C=y diff --git a/configs/T2080RDB_SPIFLASH_defconfig b/configs/T2080RDB_SPIFLASH_defconfig index 62cbab1f07..ba4ac10105 100644 --- a/configs/T2080RDB_SPIFLASH_defconfig +++ b/configs/T2080RDB_SPIFLASH_defconfig @@ -50,7 +50,6 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=fe8000000.nor:1m(uboot),5m(kernel),128k(dtb),9 CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y -CONFIG_ENV_ADDR=0xFFFC9000 CONFIG_DM=y CONFIG_FSL_CAAM=y CONFIG_DM_I2C=y diff --git a/configs/T2081QDS_SPIFLASH_defconfig b/configs/T2081QDS_SPIFLASH_defconfig index 5a273c54f8..903281d767 100644 --- a/configs/T2081QDS_SPIFLASH_defconfig +++ b/configs/T2081QDS_SPIFLASH_defconfig @@ -44,7 +44,6 @@ CONFIG_MTDIDS_DEFAULT="nor0=fe8000000.nor,nand0=fff800000.flash,spi0=spife110000 CONFIG_MTDPARTS_DEFAULT="mtdparts=fe8000000.nor:1m(uboot),5m(kernel),128k(dtb),96m(fs),-(user);fff800000.flash:1m(uboot),5m(kernel),128k(dtb),96m(fs),-(user);spife110000.0:1m(uboot),5m(kernel),128k(dtb),-(user)" CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y -CONFIG_ENV_ADDR=0xFFFC9000 CONFIG_FSL_CAAM=y CONFIG_FSL_ESDHC=y CONFIG_MTD=y -- cgit