Re: [linux-yocto] [PATCH 0/2 v5.2] Add the RT support for the cn96xx

2019-09-19 Thread Bruce Ashfield
In message: [PATCH 0/2 v5.2] Add the RT support for the cn96xx
on 19/09/2019 Kevin Hao wrote:

> From: Kevin Hao 
> 
> This patch series adds the RT support for the Marvell cn96xx SoC. It
> includes the kernel and kernel cache patches. All the kernel patches
> except the following have already been merged into the v5.2/standard/cn96xx 
> branch.
> 
> 1. The patch 77eaa178a3f8 ("mmc: cavium: Drop the aligned check for the dma 
> address")
>This is a new patch and also has been sent to the linux-yocto for the
>merging into v5.2/standard/cn96xx branch.
> 
> 2. The patch 088d9e94823e ("arm64: Enlarge the FORCE_MAX_ZONEORDER on the 
> Cavium SoC for RT:)
>This is a workaround for the bootloader setting a too big coheret_pool
>for the kernel.

My tree was in a slightly different state, so it was easier for me
to manually create the new branch, and then merge the standard kernel
BSP into it.

That included the patch you sent earlier, and I've cherry picked the
other from your github branch.

Cheers,

Bruce

> 
> Thanks,
> Kevin
-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


Re: [linux-yocto] [kernel v5.2/standard/xlnx-soc][PATCH 0/2] fix compile warning

2019-09-19 Thread Bruce Ashfield


In message: [linux-yocto][kernel v5.2/standard/xlnx-soc][PATCH 0/2] fix compile 
warning
on 19/09/2019 quanyang.w...@windriver.com wrote:

> From: Quanyang Wang 
> 
> Hi Bruce,
> 
> Would you please help me merge the two patches into
> linux-ycoto-5.2 kernel, branch v5.2/standard/xlnx-soc ?

These are now merged.

Bruce

> 
> Thanks,
> Quanyang
> 
> Quanyang Wang (2):
>   mtd: spi-nor: change flash_info.flags from u16 to u32 to avoid compile
> warning
>   spi: spi-mem: zynq-qspi: add is-dual support for zc706 board
> 
>  drivers/mtd/spi-nor/spi-nor.c |  2 +-
>  drivers/spi/spi-zynq-qspi.c   | 43 +--
>  2 files changed, 42 insertions(+), 3 deletions(-)
> 
> -- 
> 2.17.1
> 
-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


Re: [linux-yocto] [PATCH v5.2] mmc: cavium: Drop the aligned check for the dma address

2019-09-19 Thread Bruce Ashfield


In message: [PATCH v5.2] mmc: cavium: Drop the aligned check for the dma 
address
on 19/09/2019 Kevin Hao wrote:

> From: Kevin Hao 
> 
> In commit 73c1489f17e8 ("mmc: cavium: forbid unaligned DMA"), the codes
> are added to check the unaligned dma request. But at that time,
> we still don't do the dma map for the scatterlist yet. So it is
> meaningless to check the dma address. So drop of it.
> 
> Signed-off-by: Kevin Hao 
> ---
> 
> Hi Bruce,
> 
> This targets for standard/cn96xx branch.

Merged to v5.2 and linux-yocto-dev

Bruce

> 
>  drivers/mmc/host/cavium.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/cavium.c b/drivers/mmc/host/cavium.c
> index fc6464957df9..d724155d7eb6 100644
> --- a/drivers/mmc/host/cavium.c
> +++ b/drivers/mmc/host/cavium.c
> @@ -853,7 +853,7 @@ static void cvm_mmc_dma_request(struct mmc_host *mmc,
>   /* unaligned multi-block DMA has problems, so forbid all unaligned */
>   for (seg = 0; seg < mrq->data->sg_len; seg++) {
>   struct scatterlist *sg = >data->sg[seg];
> - u64 align = (sg->offset | sg->length | sg->dma_address);
> + u64 align = (sg->offset | sg->length);
>  
>   if (!(align & 7))
>   continue;
> -- 
> 2.14.4
> 
-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


Re: [linux-yocto] [kernel-cache master] ti-am335x: add CPU freq/idle support and correct arch bits

2019-09-19 Thread Bruce Ashfield
In message: [linux-yocto] [kernel-cache master] ti-am335x: add CPU freq/idle 
support and correct arch bits
on 16/09/2019 Jun Miao wrote:

> 
> 
> Hi Bruce.
>Please help me merge the two patches to master branch of yocto-kernel-cache


merged to master.

Bruce

> 
>5721cc33a0511c5964e96f439b61b97d20e500d7 ti-am335x: add CPU Freq/Idle 
> support
>15fed008b84b8ef7ae760227d750f8840d635e43 ti-am335x: correct the arch 
> 64-bit to 32-bit
> 
> 
> Jun Miao (2):
>   ti-am335x: correct the arch 64-bit to 32-bit
>   ti-am335x: add CPU Freq/Idle support
> 
>  bsp/ti-am335x/ti-am335x-standard.scc |  2 +-
>  bsp/ti-am335x/ti-am335x.cfg  | 21 +
>  2 files changed, 22 insertions(+), 1 deletion(-)
> 
> -- 
> 2.22.0
> 
-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


Re: [linux-yocto] : [kernel-cache master/yocto-5.2]: bcm-2xxx-rpi: add configure file for bcm-2xxx-rpi BSP in kernel-cache

2019-09-19 Thread Bruce Ashfield
In message: [linux-yocto]: [kernel-cache master/yocto-5.2]: bcm-2xxx-rpi: add 
configure file for bcm-2xxx-rpi BSP in kernel-cache
on 16/09/2019 meng...@windriver.com wrote:

> From: Limeng 
> 
> Hi Bruce,
> 
> I am working on BSP bcm-2xxx-rpi platform, and intend to merge this BSP 
> supporting into yocto community.
> Below patch includes scc and cfg files for Raspberrypi 4b platform.
> 
> Could you please merge this patch into yocto-kernel-cache, branch is master 
> and yocto-5.2?

The baseline configuration looks sane to me (I checked for obvious errors and
non hardware configs).

So I've gone ahead and merged this to the 5.2 and master branches.

Bruce

> 
> 0001-bcm-2xxx-rpi-add-configure-file-for-bcm-2xxx-rpi-BSP.patch
> 
>  bcm-2xxx-rpi.cfg |  268 
> +++
>  bcm-2xxx-rpi.scc |   13 ++
>  bcm-2xxx-rpi4-preempt-rt.scc |8 +
>  bcm-2xxx-rpi4-standard.scc   |9 +
>  4 files changed, 298 insertions(+)
> 
> 
> thanks,
> Limeng
-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [kernel v5.2/standard/xlnx-soc][PATCH 2/2] spi: spi-mem: zynq-qspi: add is-dual support for zc706 board

2019-09-19 Thread quanyang.wang
From: Quanyang Wang 

There are 2 SPI flash memories in zc706 board and it use the
configuration "Dual SS, 8-bit Parallel" which means separate
Slave-Select lines and separate 4 data lines. So add the is-dual
support for zc706 board according to the spi driver in SDK.

Refer to bd2c1810ae87 ("spi: zynq-qspi: Add driver for zynq qspi")
in https://github.com/Xilinx/linux-xlnx.git xlnx_rebase_v4.19

Signed-off-by: Quanyang Wang 
---
 drivers/spi/spi-zynq-qspi.c | 43 +++--
 1 file changed, 41 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-zynq-qspi.c b/drivers/spi/spi-zynq-qspi.c
index c6bee67decb5..2041d5dcf294 100644
--- a/drivers/spi/spi-zynq-qspi.c
+++ b/drivers/spi/spi-zynq-qspi.c
@@ -129,6 +129,9 @@
  * @rxbuf: Pointer to the RX buffer
  * @tx_bytes:  Number of bytes left to transfer
  * @rx_bytes:  Number of bytes left to receive
+ * @is_dual:   Flag to indicate whether dual flash memories are used
+ * @is_instr:  Flag to indicate if transfer contains an instruction
+ * (Used in dual parallel configuration)
  * @data_completion:   completion structure
  */
 struct zynq_qspi {
@@ -141,6 +144,8 @@ struct zynq_qspi {
u8 *rxbuf;
int tx_bytes;
int rx_bytes;
+   u32 is_dual;
+   u8 is_instr;
struct completion data_completion;
 };
 
@@ -213,6 +218,14 @@ static void zynq_qspi_init_hw(struct zynq_qspi *xqspi)
zynq_qspi_write(xqspi, ZYNQ_QSPI_TX_THRESH_OFFSET,
ZYNQ_QSPI_TX_THRESHOLD);
 
+   if (xqspi->is_dual)
+   /* Enable two memories on separate buses */
+   zynq_qspi_write(xqspi, ZYNQ_QSPI_LINEAR_CFG_OFFSET,
+   (ZYNQ_QSPI_LCFG_TWO_MEM_MASK |
+   ZYNQ_QSPI_LCFG_SEP_BUS_MASK |
+   (1 << ZYNQ_QSPI_LCFG_DUMMY_SHIFT) |
+   ZYNQ_QSPI_FAST_READ_QOUT_CODE));
+
zynq_qspi_write(xqspi, ZYNQ_QSPI_ENABLE_OFFSET,
ZYNQ_QSPI_ENABLE_ENABLE_MASK);
 }
@@ -236,15 +249,23 @@ static bool zynq_qspi_supports_op(struct spi_mem *mem,
  * zynq_qspi_rxfifo_op - Read 1..4 bytes from RxFIFO to RX buffer
  * @xqspi: Pointer to the zynq_qspi structure
  * @size:  Number of bytes to be read (1..4)
+ *
+ * Note: In case of dual parallel connection, even number of bytes are read
+ * when odd bytes are requested to avoid transfer of a nibble to each flash.
+ * The receive buffer though, is populated with the number of bytes requested.
  */
 static void zynq_qspi_rxfifo_op(struct zynq_qspi *xqspi, unsigned int size)
 {
+   unsigned int xsize;
u32 data;
 
data = zynq_qspi_read(xqspi, ZYNQ_QSPI_RXD_OFFSET);
 
if (xqspi->rxbuf) {
-   memcpy(xqspi->rxbuf, ((u8 *)) + 4 - size, size);
+   xsize = size;
+   if (xqspi->is_dual && !xqspi->is_instr && (size % 2))
+   xsize++;
+   memcpy(xqspi->rxbuf, ((u8 *)) + 4 - xsize, size);
xqspi->rxbuf += size;
}
 
@@ -257,12 +278,19 @@ static void zynq_qspi_rxfifo_op(struct zynq_qspi *xqspi, 
unsigned int size)
  * zynq_qspi_txfifo_op - Write 1..4 bytes from TX buffer to TxFIFO
  * @xqspi: Pointer to the zynq_qspi structure
  * @size:  Number of bytes to be written (1..4)
+ *
+ * In dual parallel configuration, when read/write data operations
+ * are performed, odd data bytes have to be converted to even to
+ * avoid a nibble (of data when programming / dummy when reading)
+ * going to individual flash devices, where a byte is expected.
+ * This check is only for data and will not apply for commands.
  */
 static void zynq_qspi_txfifo_op(struct zynq_qspi *xqspi, unsigned int size)
 {
static const unsigned int offset[4] = {
ZYNQ_QSPI_TXD_00_01_OFFSET, ZYNQ_QSPI_TXD_00_10_OFFSET,
ZYNQ_QSPI_TXD_00_11_OFFSET, ZYNQ_QSPI_TXD_00_00_OFFSET };
+   unsigned int xsize;
u32 data;
 
if (xqspi->txbuf) {
@@ -274,7 +302,11 @@ static void zynq_qspi_txfifo_op(struct zynq_qspi *xqspi, 
unsigned int size)
}
 
xqspi->tx_bytes -= size;
-   zynq_qspi_write(xqspi, offset[size - 1], data);
+
+   xsize = size;
+   if (xqspi->is_dual && !xqspi->is_instr && (size % 2))
+   xsize++;
+   zynq_qspi_write(xqspi, offset[xsize - 1], data);
 }
 
 /**
@@ -295,6 +327,7 @@ static void zynq_qspi_chipselect(struct spi_device *spi, 
bool assert)
config_reg |= (((~(BIT(spi->chip_select))) <<
ZYNQ_QSPI_SS_SHIFT) &
ZYNQ_QSPI_CONFIG_SSCTRL_MASK);
+   xqspi->is_instr = 1;
} else {
config_reg |= ZYNQ_QSPI_CONFIG_SSCTRL_MASK;
}
@@ -637,6 +670,12 @@ static int zynq_qspi_probe(struct platform_device *pdev)
goto remove_master;
}
 
+ 

[linux-yocto] [kernel v5.2/standard/xlnx-soc][PATCH 1/2] mtd: spi-nor: change flash_info.flags from u16 to u32 to avoid compile warning

2019-09-19 Thread quanyang.wang
From: Quanyang Wang 

Because SST_GLOBAL_PROT_UNLK is BIT(16) which exceed the extent of
u16, so change it to u32.

drivers/mtd/spi-nor/spi-nor.c:2076:12: warning: large integer implicitly 
truncated to
unsigned type [-Woverflow]
   .flags = (_flags),
^
drivers/mtd/spi-nor/spi-nor.c:2385:19: note: in expansion of macro ‘INFO’
{ "sst26wf016B", INFO(0xbf2651, 0, 64 * 1024, 32, SECT_4K | 
SST_GLOBAL_PROT_UNLK) },
   ^~~~

Signed-off-by: Quanyang Wang 
---
 drivers/mtd/spi-nor/spi-nor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index d3b287e851cf..0c412b77597a 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -268,7 +268,7 @@ struct flash_info {
u16 page_size;
u16 addr_width;
 
-   u16 flags;
+   u32 flags;
 #define SECT_4KBIT(0)  /* SPINOR_OP_BE_4K works 
uniformly */
 #define SPI_NOR_NO_ERASE   BIT(1)  /* No erase command needed */
 #define SST_WRITE  BIT(2)  /* use SST byte programming */
-- 
2.17.1

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [kernel v5.2/standard/xlnx-soc][PATCH 0/2] fix compile warning

2019-09-19 Thread quanyang.wang
From: Quanyang Wang 

Hi Bruce,

Would you please help me merge the two patches into
linux-ycoto-5.2 kernel, branch v5.2/standard/xlnx-soc ?

Thanks,
Quanyang

Quanyang Wang (2):
  mtd: spi-nor: change flash_info.flags from u16 to u32 to avoid compile
warning
  spi: spi-mem: zynq-qspi: add is-dual support for zc706 board

 drivers/mtd/spi-nor/spi-nor.c |  2 +-
 drivers/spi/spi-zynq-qspi.c   | 43 +--
 2 files changed, 42 insertions(+), 3 deletions(-)

-- 
2.17.1

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto