Re: [PATCH v2 6/9] kbuild: consolidate Devicetree dtb build rules
On Wed, Sep 05, 2018 at 06:53:24PM -0500, Rob Herring wrote: > There is nothing arch specific about building dtb files other than their > location under /arch/*/boot/dts/. Keeping each arch aligned is a pain. > The dependencies and supported targets are all slightly different. > Also, a cross-compiler for each arch is needed, but really the host > compiler preprocessor is perfectly fine for building dtbs. Move the > build rules to a common location and remove the arch specific ones. This > is done in a single step to avoid warnings about overriding rules. > > The build dependencies had been a mixture of 'scripts' and/or 'prepare'. > These pull in several dependencies some of which need a target compiler > (specifically devicetable-offsets.h) and aren't needed to build dtbs. > All that is really needed is dtc, so adjust the dependencies to only be > dtc. > > This change enables support 'dtbs_install' on some arches which were > missing the target. > > Cc: Masahiro Yamada > Cc: Michal Marek > Cc: Vineet Gupta > Cc: Russell King > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Yoshinori Sato > Cc: Michal Simek > Cc: Ralf Baechle > Cc: Paul Burton > Cc: James Hogan > Cc: Ley Foon Tan > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: Michael Ellerman > Cc: Chris Zankel > Cc: Max Filippov > Cc: linux-kbu...@vger.kernel.org > Cc: linux-snps-arc@lists.infradead.org > Cc: linux-arm-ker...@lists.infradead.org > Cc: uclinux-h8-de...@lists.sourceforge.jp > Cc: linux-m...@linux-mips.org > Cc: nios2-...@lists.rocketboards.org > Cc: linuxppc-...@lists.ozlabs.org > Cc: linux-xte...@linux-xtensa.org > Signed-off-by: Rob Herring > --- > Please ack so I can take the whole series via the DT tree. For arm64: Acked-by: Will Deacon Will ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH 1/2] mtd: spi-nor: Add support of sst26wf* flash ICs protection ops
Hi Eugeniy, I love your patch! Perhaps something to improve: [auto build test WARNING on mtd/spi-nor/next] [also build test WARNING on v4.19-rc2 next-20180906] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Eugeniy-Paltsev/MTD-spi-nor-add-support-for-sst26wf016-sst26wf032/20180907-001236 base: git://git.infradead.org/linux-mtd.git spi-nor/next config: x86_64-randconfig-x015-201835 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 Note: it may well be a FALSE warning. FWIW you are at least aware of it now. http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings All warnings (new ones prefixed by >>): drivers/mtd/spi-nor/spi-nor.c: In function 'sst26_lock_ctl': >> drivers/mtd/spi-nor/spi-nor.c:671:5: warning: 'ret' may be used >> uninitialized in this function [-Wmaybe-uninitialized] if (ret < 0) { ^ vim +/ret +671 drivers/mtd/spi-nor/spi-nor.c 637 638 /* 639 * Lock, unlock or check lock status of the flash region of the flash (depending 640 * on the lock_ctl value) 641 */ 642 static int sst26_lock_ctl(struct spi_nor *nor, loff_t ofs, uint64_t len, enum lock_ctl ctl) 643 { 644 struct mtd_info *mtd = &nor->mtd; 645 u32 i, bpr_ptr, rptr_64k, lptr_64k, bpr_size; 646 bool lower_64k = false, upper_64k = false; 647 u8 bpr_buff[SST26_MAX_BPR_REG_LEN] = {}; 648 int ret; 649 650 /* Check length and offset for 64k alignment */ 651 if ((ofs & (SZ_64K - 1)) || (len & (SZ_64K - 1))) { 652 dev_err(nor->dev, "length or offset is not 64KiB allighned\n"); 653 return -EINVAL; 654 } 655 656 if (ofs + len > mtd->size) { 657 dev_err(nor->dev, "range is more than device size: %#llx + %#llx > %#llx\n", 658 ofs, len, mtd->size); 659 return -EINVAL; 660 } 661 662 /* SST26 family has only 16 Mbit, 32 Mbit and 64 Mbit IC */ 663 if (mtd->size != SZ_2M && 664 mtd->size != SZ_4M && 665 mtd->size != SZ_8M) 666 return -EINVAL; 667 668 bpr_size = 2 + (mtd->size / SZ_64K / 8); 669 670 nor->read_reg(nor, SPINOR_OP_READ_BPR, bpr_buff, bpr_size); > 671 if (ret < 0) { 672 dev_err(nor->dev, "fail to read block-protection register\n"); 673 return ret; 674 } 675 676 rptr_64k = min_t(u32, ofs + len, mtd->size - SST26_BOUND_REG_SIZE); 677 lptr_64k = max_t(u32, ofs, SST26_BOUND_REG_SIZE); 678 679 upper_64k = ((ofs + len) > (mtd->size - SST26_BOUND_REG_SIZE)); 680 lower_64k = (ofs < SST26_BOUND_REG_SIZE); 681 682 /* Lower bits in block-protection register are about 64k region */ 683 bpr_ptr = lptr_64k / SZ_64K - 1; 684 685 /* Process 64K blocks region */ 686 while (lptr_64k < rptr_64k) { 687 if (sst26_process_bpr(bpr_size, bpr_buff, bpr_ptr, ctl)) 688 return EACCES; 689 690 bpr_ptr++; 691 lptr_64k += SZ_64K; 692 } 693 694 /* 32K and 8K region bits in BPR are after 64k region bits */ 695 bpr_ptr = (mtd->size - 2 * SST26_BOUND_REG_SIZE) / SZ_64K; 696 697 /* Process lower 32K block region */ 698 if (lower_64k) 699 if (sst26_process_bpr(bpr_size, bpr_buff, bpr_ptr, ctl)) 700 return EACCES; 701 702 bpr_ptr++; 703 704 /* Process upper 32K block region */ 705 if (upper_64k) 706 if (sst26_process_bpr(bpr_size, bpr_buff, bpr_ptr, ctl)) 707 return EACCES; 708 709 bpr_ptr++; 710 711 /* Process lower 8K block regions */ 712 for (i = 0; i < SST26_BPR_8K_NUM; i++) { 713 if (lower_64k) 714 if (sst26_process_bpr(bpr_size, bpr_buff, bpr_ptr, ctl)) 715 return EACCES; 716 717 /* In 8K area BPR has both read and write protection bits */ 718 bpr_ptr += 2; 719 } 720 721 /* Process upper 8K block regions */ 722 for (i = 0; i < SST26_BPR_8K_NUM; i++) { 723 if (upper_64k) 724
Re: [PATCH v2 6/9] kbuild: consolidate Devicetree dtb build rules
Hi Rob, On Wed, Sep 05, 2018 at 06:53:24PM -0500, Rob Herring wrote: > There is nothing arch specific about building dtb files other than their > location under /arch/*/boot/dts/. Keeping each arch aligned is a pain. > The dependencies and supported targets are all slightly different. > Also, a cross-compiler for each arch is needed, but really the host > compiler preprocessor is perfectly fine for building dtbs. Move the > build rules to a common location and remove the arch specific ones. This > is done in a single step to avoid warnings about overriding rules. > > The build dependencies had been a mixture of 'scripts' and/or 'prepare'. > These pull in several dependencies some of which need a target compiler > (specifically devicetable-offsets.h) and aren't needed to build dtbs. > All that is really needed is dtc, so adjust the dependencies to only be > dtc. > > This change enables support 'dtbs_install' on some arches which were > missing the target. > >% > Signed-off-by: Rob Herring > --- > Please ack so I can take the whole series via the DT tree. For MIPS: Acked-by: Paul Burton Thanks, Paul ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH v2 6/9] kbuild: consolidate Devicetree dtb build rules
On Wed, 2018-09-05 at 18:53 -0500, Rob Herring wrote: > There is nothing arch specific about building dtb files other than > their > location under /arch/*/boot/dts/. Keeping each arch aligned is a > pain. > The dependencies and supported targets are all slightly different. > Also, a cross-compiler for each arch is needed, but really the host > compiler preprocessor is perfectly fine for building dtbs. Move the > build rules to a common location and remove the arch specific ones. > This > is done in a single step to avoid warnings about overriding rules. > > The build dependencies had been a mixture of 'scripts' and/or > 'prepare'. > These pull in several dependencies some of which need a target > compiler > (specifically devicetable-offsets.h) and aren't needed to build dtbs. > All that is really needed is dtc, so adjust the dependencies to only > be > dtc. > > This change enables support 'dtbs_install' on some arches which were > missing the target. > > Cc: Masahiro Yamada > Cc: Michal Marek > Cc: Vineet Gupta > Cc: Russell King > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Yoshinori Sato > Cc: Michal Simek > Cc: Ralf Baechle > Cc: Paul Burton > Cc: James Hogan > Cc: Ley Foon Tan > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: Michael Ellerman > Cc: Chris Zankel > Cc: Max Filippov > Cc: linux-kbu...@vger.kernel.org > Cc: linux-snps-arc@lists.infradead.org > Cc: linux-arm-ker...@lists.infradead.org > Cc: uclinux-h8-de...@lists.sourceforge.jp > Cc: linux-m...@linux-mips.org > Cc: nios2-...@lists.rocketboards.org > Cc: linuxppc-...@lists.ozlabs.org > Cc: linux-xte...@linux-xtensa.org > Signed-off-by: Rob Herring > --- > Please ack so I can take the whole series via the DT tree. > For nios2: Acked-by: Ley Foon Tan Regards Ley Foon ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc