Re: [U-Boot] Please pull u-boot-dm

2019-04-13 Thread Tom Rini
On Fri, Apr 12, 2019 at 03:51:52PM -0600, Simon Glass wrote:

> Hi Tom,
> 
> Build result at https://travis-ci.org/sglass68/u-boot/builds/519059521
> 
> 
> The following changes since commit 02f173ca156cee8526dff87603d5e446b443cde3:
> 
>   Merge branch 'master' of git://git.denx.de/u-boot-usb (2019-04-11
> 14:29:37 -0400)
> 
> are available in the Git repository at:
> 
>   git://git.denx.de/u-boot-dm.git tags/pull-12apr19
> 
> for you to fetch changes up to 73c02e5e4fc1ef53d06289232edd6cc52e3d73f6:
> 
>   fdt: Fix mkimage list to try every header type (2019-04-11 20:10:50 -0600)
> 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: PGP signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PULL] u-boot-mips

2019-04-13 Thread Tom Rini
On Fri, Apr 12, 2019 at 10:32:24PM +0200, Daniel Schwierzeck wrote:

> Hi Tom,
> 
> please pull MIPS updates for 2019.07
> 
> https://travis-ci.org/danielschwierzeck/u-boot/builds/519324026
> 
> 
> The following changes since commit 02f173ca156cee8526dff87603d5e446b443cde3:
> 
>   Merge branch 'master' of git://git.denx.de/u-boot-usb (2019-04-11 14:29:37 
> -0400)
> 
> are available in the Git repository at:
> 
>   git://git.denx.de/u-boot-mips.git tags/mips-pull-2019-04-12
> 
> for you to fetch changes up to c3b6c8e2d8fb5b8d0d67858dc4a2133b7065df5b:
> 
>   mips: mt76xx: linkit-smart-7688: Enable USB and FS support (2019-04-12 
> 17:32:53 +0200)
> 

Applied to u-boot/master, thanks!

-- 
Tom


signature.asc
Description: PGP signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] fs: btrfs: fix false negatives in ROOT_ITEM search

2019-04-13 Thread Pierre Bourdon
On Sat, Apr 13, 2019 at 11:50 PM Pierre Bourdon  wrote:
>
> ROOT_ITEMs in btrfs are referenced without knowing their actual "offset"
> value. To perform these searches using only two items from the key, the
> btrfs driver uses a special "btrfs_search_tree_key_type" function.
>
> The algorithm used by that function to transform a 3-tuple search into a
> 2-tuple search was subtly broken, leading to items not being found if
> they were the first in their tree node.
>
> This commit fixes btrfs_search_tree_key_type to properly behave in these
> situations.

A more practical example in case the explanation isn't clear:

root tree
node 122216448 level 1 items 6 free 115 generation 12246 owner ROOT_TREE
fs uuid b516974e-a94e-469c-a9ff-d237ce96b03b
chunk uuid ecfa1e4e-8832-49c1-bb0c-2f08b95586a0
key (EXTENT_TREE ROOT_ITEM 0) block 122810368 gen 12246
key (ROOT_TREE_DIR INODE_REF 6) block 122339328 gen 12246
key (344 ROOT_ITEM 9422) block 209317888 gen 12115
key (344 ROOT_BACKREF 5) block 226222080 gen 12126
key (368 ROOT_ITEM 11665) block 114966528 gen 12127
key (375 ROOT_ITEM 12127) block 122949632 gen 12246

If you look for (375 ROOT_ITEM) then using (375 ROOT_ITEM 0) as the
search key will end up walking to block 114966528 (because (375
ROOT_ITEM 0) < (375 ROOT_ITEM 12127)). Using instead (375 ROOT_ITEM
-1) will go to the right leaf, return the first item after (375
ROOT_ITEM 12127), and we can then walk back one slot to get the item
we wanted.

-- 
Pierre Bourdon 
Software Engineer @ Zürich, Switzerland
https://delroth.net/
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH] fs: btrfs: fix false negatives in ROOT_ITEM search

2019-04-13 Thread Pierre Bourdon
ROOT_ITEMs in btrfs are referenced without knowing their actual "offset"
value. To perform these searches using only two items from the key, the
btrfs driver uses a special "btrfs_search_tree_key_type" function.

The algorithm used by that function to transform a 3-tuple search into a
2-tuple search was subtly broken, leading to items not being found if
they were the first in their tree node.

This commit fixes btrfs_search_tree_key_type to properly behave in these
situations.

Signed-off-by: Pierre Bourdon 
Cc: Marek Behun 
---
 fs/btrfs/ctree.h | 44 ++--
 1 file changed, 38 insertions(+), 6 deletions(-)

diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 65c152a52f..ca44a2404d 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -292,20 +292,52 @@ btrfs_search_tree_key_type(const struct btrfs_root *root, 
u64 objectid,
 {
struct btrfs_key key, *res;
 
+   /*
+* In some cases (e.g. tree roots), we need to look for a given
+* objectid and type without knowing the offset value (3rd element of a
+* btrfs tree node key). We can rely on the fact that btrfs_search_tree
+* returns the first element with key >= search_key, and then perform
+* our own comparison between the returned element and the search key.
+*
+* It is tempting to use a search key with offset 0 to perform this
+* "fuzzy search". This would return the first item with the (objectid,
+* type) we're looking for. However, using offset 0 has the wrong
+* behavior when the wanted item is the first in a leaf: since our
+* search key will be lower than the wanted item, the recursive search
+* will explore the wrong branch of the tree.
+*
+* Instead, use the largest possible offset (-1). The result of this
+* search will either be:
+*   1. An element with the (objectid, type) we're looking for, if it
+*  has offset -1 or if it is the last element in its leaf.
+*   2. The first element *after* an element with the (objectid, type)
+*/
key.objectid = objectid;
key.type = type;
-   key.offset = 0;
+   key.offset = -1;
 
if (btrfs_search_tree(root, &key, path))
return NULL;
 
-   res = btrfs_path_leaf_key(path);
-   if (btrfs_comp_keys_type(&key, res)) {
-   btrfs_free_path(path);
-   return NULL;
+   /*
+* Compare with the previous element first -- this is the likely case
+* since the result of the search is only what we want if it had offset
+* == -1 or if it was last in its leaf.
+*/
+   if (path->slots[0] > 0) {
+   path->slots[0]--;
+   res = btrfs_path_leaf_key(path);
+   if (!btrfs_comp_keys_type(&key, res))
+   return res;
+   path->slots[0]++;
}
 
-   return res;
+   res = btrfs_path_leaf_key(path);
+   if (!btrfs_comp_keys_type(&key, res))
+   return res;
+
+   btrfs_free_path(path);
+   return NULL;
 }
 
 static inline u32 btrfs_path_item_size(struct btrfs_path *p)
-- 
2.19.2

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 3/8] video/console: Implement relative cursor movement ANSI handling

2019-04-13 Thread André Przywara
On 11/04/2019 13:09, Anatolij Gustschin wrote:

Hi Anatolij,

thanks for the heads up!

> On Tue, 9 Apr 2019 23:05:11 +0200
> Anatolij Gustschin ag...@denx.de wrote:
> ...
>>>  drivers/video/vidconsole-uclass.c | 37 
>>> +
>>>  1 file changed, 37 insertions(+)  
>>
>> Applied to u-boot-video/master, thanks!
> 
> I've dropped all applied patches of this series now, some of them
> introduced dm video_ansi test error [1]. Please fix. Thanks!

Hmh, good one. Didn't find an easy way to get to the bottom of this
within the ut test system, so I copied the ANSI sequences out and
replayed them with a custom command, inspecting the (sandbox) screen
manually. Is there a canonical way to trace down those issues?

Anyway, the fix for patch 2/8 is rather simple (see below), do you want
to fix this up in your tree? Or shall I sent a v2?
The head of my tree passes the video_ansi test now.

(This patch won't apply cleanly (blame Thunderbird), but I think you get
the idea...)
--- a/drivers/video/vidconsole-uclass.c
+++ b/drivers/video/vidconsole-uclass.c
@@ -464,7 +464,7 @@ static void vidconsole_escape_char(struct udevice
*dev, char ch)
break;
case 40 ... 47:
-   /* background color */
-   vid_priv->bg_col_idx &= ~7;
+   /* background color, also mask the bold bit */
+   vid_priv->bg_col_idx &= ~0xf;
vid_priv->bg_col_idx |= val - 40;
vid_priv->colour_bg = vid_console_color(
vid_priv, vid_priv->bg_col_idx);

Cheers,
Andre.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] warp7: defconfig: Switch to DM for USB and SERIAL

2019-04-13 Thread Joris Offouga

Hi Fabio,

Le 13/04/2019 à 18:31, Fabio Estevam a écrit :

Hi Pierre-Jean,

On Sat, Apr 13, 2019 at 11:38 AM Pierre-Jean Texier
 wrote:


-int board_usb_phy_mode(int port)
-{
-   return USB_INIT_DEVICE;
-}
-

It seems that #include  can also be removed now.

I still see uart related code in the warp7.c board file.

Can they also be removed?


If we remove uart related code in warp7.c, the log of the u-boot appears 
late here is a log


PMIC: PFUZE3000 DEV_ID=0x30 REV_ID=0x11
MMC:   FSL_SDHC: 1, FSL_SDHC: 0
Loading Environment from MMC... OK
In:    serial@3086
Out:   serial@3086
Err:   serial@3086
SEC0: RNG instantiated
Net:   usb_ether
Hit any key to stop autoboot:  0
=>



Could #define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR be removed from
include/configs/warp7.h?


Yes it can be deleted

Best Regards,

Joris


___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] warp7: defconfig: Switch to DM for USB and SERIAL

2019-04-13 Thread Fabio Estevam
On Sat, Apr 13, 2019 at 1:31 PM Fabio Estevam  wrote:

> It seems that #include  can also be removed now.
>
> I still see uart related code in the warp7.c board file.
>
> Can they also be removed?
>
> Could #define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR be removed from
> include/configs/warp7.h?

Also, when sending a v2, please split this patch in two: one for
serial and another one for USB.

Thanks
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] warp7: defconfig: Switch to DM for USB and SERIAL

2019-04-13 Thread Fabio Estevam
Hi Pierre-Jean,

On Sat, Apr 13, 2019 at 11:38 AM Pierre-Jean Texier
 wrote:

>
> -int board_usb_phy_mode(int port)
> -{
> -   return USB_INIT_DEVICE;
> -}
> -

It seems that #include  can also be removed now.

I still see uart related code in the warp7.c board file.

Can they also be removed?

Could #define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR be removed from
include/configs/warp7.h?
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] build error: "bfd: u-boot-spl section `.rodata' will not fit in region `.sram'"

2019-04-13 Thread U.Mutlu

I updated my local git source tree, but now I get this error
with stock Lamobo_R1_defconfig and w/o any changes to .config:

arm-linux-gnueabihf-ld.bfd: u-boot-spl section `.rodata' will not fit in 
region `.sram'

arm-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 1176 bytes
scripts/Makefile.spl:384: recipe for target 'spl/u-boot-spl' failed
make[1]: *** [spl/u-boot-spl] Error 1
Makefile:1689: recipe for target 'spl/u-boot-spl' failed
make: *** [spl/u-boot-spl] Error 2

$ git status
On branch master
Your branch is up-to-date with 'origin/master'.


___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH] warp7: defconfig: Switch to DM for USB and SERIAL

2019-04-13 Thread Pierre-Jean Texier
This commit switches to DM USB and SERIAL for warp7 and warp7_bl33 defconfigs.

Signed-off-by: Pierre-Jean Texier 
Signed-off-by: Joris Offouga 
---
 arch/arm/dts/imx7s-warp.dts  | 5 +
 board/warp7/warp7.c  | 5 -
 configs/warp7_bl33_defconfig | 2 ++
 configs/warp7_defconfig  | 2 ++
 4 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/arch/arm/dts/imx7s-warp.dts b/arch/arm/dts/imx7s-warp.dts
index d28b7ec..db5ef67 100644
--- a/arch/arm/dts/imx7s-warp.dts
+++ b/arch/arm/dts/imx7s-warp.dts
@@ -19,6 +19,11 @@
 
aliases {
mmc0 = &usdhc3;
+   usb0 = &usbotg1;
+   };
+
+   chosen {
+   stdout-path = &uart1;
};
 
gpio-keys {
diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c
index 2882dc9..797e09c 100644
--- a/board/warp7/warp7.c
+++ b/board/warp7/warp7.c
@@ -128,11 +128,6 @@ int checkboard(void)
return 0;
 }
 
-int board_usb_phy_mode(int port)
-{
-   return USB_INIT_DEVICE;
-}
-
 int board_late_init(void)
 {
struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
diff --git a/configs/warp7_bl33_defconfig b/configs/warp7_bl33_defconfig
index 6eaf152..4308c64 100644
--- a/configs/warp7_bl33_defconfig
+++ b/configs/warp7_bl33_defconfig
@@ -38,7 +38,9 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_DM_SERIAL=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_MXC_USB_OTG_HACTIVE=y
 CONFIG_USB_GADGET=y
diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig
index 28aa06f..3f7863b 100644
--- a/configs/warp7_defconfig
+++ b/configs/warp7_defconfig
@@ -47,8 +47,10 @@ CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_PFUZE100=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_DM_SERIAL=y
 CONFIG_OPTEE=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_MXC_USB_OTG_HACTIVE=y
 CONFIG_USB_GADGET=y
-- 
2.7.4

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] dm: core: Change platform specific translation-offset handling

2019-04-13 Thread Pierre Bourdon
On Fri, Apr 12, 2019 at 4:42 PM Stefan Roese  wrote:
> Testing has shown that the current DM implementation of a platform /
> board specific translation offset, as its needed for the SPL on MVEBU
> platforms is buggy. The translation offset is confingured too late,
> after the driver bind functions are run. This may result in incorrect
> address translations. With the current implementation its not possible
> to configure the offset earlier, as the DM code has not run at all.
>
> This patch now removed the set_/get_translation_offset() calls and
> moves the translation offset into the GD variable translation_offset.
> This variable will get used when CONFIG_TRANSLATION_OFFSET is enabled.
> This option is enabled only for MVEBU on ARM32 platforms, where its
> currenty needed and configured in the SPL.

Verified to work on Turris Omnia. No freeze at boot time in SPL mode,
i2c0 is properly enumerated.

> Signed-off-by: Stefan Roese 
> Cc: Pierre Bourdon 
> Cc: Baruch Siach 
> Cc: Simon Glass 
> Cc: Heiko Schocher 
> Cc: Tom Rini 

Tested-by: Pierre Bourdon 

-- 
Pierre Bourdon 
Software Engineer @ Zürich, Switzerland
https://delroth.net/
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] configs: turris_omnia: use MMC driver model

2019-04-13 Thread Pierre Bourdon
On Thu, Apr 11, 2019 at 11:26 AM Stefan Roese  wrote:
> With the new DM enabled MMC driver (thanks again), we should probably
> better select DM_MMC in arch/arm/Kconfig for ARCH_MVEBU. This way, all
> those boards will get moved to the new driver version.
>
> What do you think?

I've only tested one specific board with this and I lack the knowledge
/ experience to properly judge the level of risk involved with
switching the default for all mvebu boards. If your call is that this
would be a safe change, sure, let's go for it.

DM_MMC is supposed to be a requirement for v2019.04 anyway, if I
understand correctly.

-- 
Pierre Bourdon 
Software Engineer @ Zürich, Switzerland
https://delroth.net/
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [RESEND PATCH] configs: Migrate USB_MUSB_DISABLE_BULK_COMBINE_SPLIT to Kconfig

2019-04-13 Thread Tom Rini
On Fri, Apr 12, 2019 at 12:52:16PM +0200, Marek Vasut wrote:
> On 4/12/19 12:51 PM, Alex Kiernan wrote:
> > Migrate support for disable MUSB bulk split/combine to Kconfig
> > 
> > Green Travis build:
> > 
> > https://travis-ci.org/akiernan/u-boot/builds/519101867
> > 
> > Signed-off-by: Alex Kiernan 
> 
> Acked-by: Marek Vasut 
> 
> I think it's better if this goes through u-boot-ti , or shall I take it
> via usb ?

I'm fine with you grabbing it with other USB stuff, thanks!

-- 
Tom


signature.asc
Description: PGP signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 0/6] board: ti: am43xx: Enable hardware leveling

2019-04-13 Thread Tom Rini
On Fri, Apr 12, 2019 at 12:08:14PM +0530, Keerthy wrote:

> The series adds the support for hardware leveling. This needs the
> kernel to be patched with hardware leveling support and the
> kernel support is already in linux-next:
> 
> https://patchwork.kernel.org/project/linux-omap/list/?series=100273
> 
> Match recommended values from EMIF Tools app note:
> http://www.ti.com/lit/an/sprac70/sprac70.pdf

What happens if you boot an old kernel with this series applied?  I'm a
bit worried about applying something that breaks existing kernels,
thanks!

-- 
Tom


signature.asc
Description: PGP signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 3/3] arm: kirkwood: openrd: Increase U-Boot size in flash to make it fit

2019-04-13 Thread Tom Rini
On Fri, Apr 12, 2019 at 07:08:40PM +1200, Chris Packham wrote:
> On Thu, 11 Apr 2019, 10:33 PM Stefan Roese,  wrote:
> 
> > We have run now multiple times into size issues with the openrd
> > board port. To finally fix this, this patch now moves the U-Boot size
> > from 0x6. to 0x8., giving enough space for the next time.
> >
> > This also changes the environment location and potentially the
> > MTD partitioning, but I see no better fix for now. Especially since
> > this board does not have an active maintainer.
> >
> > Signed-off-by: Stefan Roese 
> > Cc: Chris Packham 
> 
> 
> One alternative option I looked at was trimming down the dtb to drop the
> nodes that aren't used in u-boot. This might just get it under the 0x6
> limit ... for a while.
> 
> I agree that this is the best approach in leiu of anyone maintiaining the
> board. Once this is applied the openrd boards can be reenabled in travis.
> 
> Reviewed-by: Chris Packham 

Please note the board is currently orphaned and excluded from travis
builds due to the size problem.  So if someone is going to address this,
I want to see the board un-orphaned too (and travis updated to build it
again), thanks!

-- 
Tom


signature.asc
Description: PGP signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] listing apparently "bad" Kconfig options in Makefiles

2019-04-13 Thread Robert P. J. Day

  as a final(?) example of one of my originally Linux kernel-related
Kbuild cleanup scripts, i have one that identifies Makefile entries
that refer to Kbuild options that are not defined in any Kconfig file
(IIRC, they might be defined manually in a defconfig file, i'll have
to refresh my memory, but tradition suggests that "CONFIG_"-prefixed
variables are meant to be defined in Kconfig files).

  i ran this script on the entire u-boot code base, and posted the
results here (not overly long):

  https://crashcourse.ca/dokuwiki/doku.php?id=u-boot_make_badref

so let me elaborate with a couple examples.

  first, there's this output:

  > NATSEMI
  ./drivers/net/Makefile:obj-$(CONFIG_NATSEMI) += natsemi.o

so what's the story with CONFIG_NATSEMI? first, it clearly is not
defined in a Kconfig file anywhere:

$ git grep "config NATSEMI"
$

  so where does it occur?

$ git grep CONFIG_NATSEMI
README: CONFIG_NATSEMI
drivers/net/Makefile:obj-$(CONFIG_NATSEMI) += natsemi.o
include/netdev.h:#ifdef CONFIG_NATSEMI
scripts/config_whitelist.txt:CONFIG_NATSEMI
$

pretty clearly(?), it's documented and tested and whitelisted, while
never being defined anywhere. a wild guess suggests it really should
say CONFIG_PHY_NATSEMI:

$ git grep CONFIG_PHY_NATSEMI
configs/brppt1_mmc_defconfig:CONFIG_PHY_NATSEMI=y
configs/brppt1_nand_defconfig:CONFIG_PHY_NATSEMI=y
configs/brppt1_spi_defconfig:CONFIG_PHY_NATSEMI=y
configs/microblaze-generic_defconfig:CONFIG_PHY_NATSEMI=y
configs/xilinx_versal_virt_defconfig:CONFIG_PHY_NATSEMI=y
configs/xilinx_zynqmp_zc1751_xm015_dc1_defconfig:CONFIG_PHY_NATSEMI=y
configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig:CONFIG_PHY_NATSEMI=y
configs/xilinx_zynqmp_zc1751_xm017_dc3_defconfig:CONFIG_PHY_NATSEMI=y
configs/xilinx_zynqmp_zc1751_xm018_dc4_defconfig:CONFIG_PHY_NATSEMI=y
configs/xilinx_zynqmp_zc1751_xm019_dc5_defconfig:CONFIG_PHY_NATSEMI=y
configs/xilinx_zynqmp_zcu102_rev1_0_defconfig:CONFIG_PHY_NATSEMI=y
configs/xilinx_zynqmp_zcu102_revA_defconfig:CONFIG_PHY_NATSEMI=y
configs/xilinx_zynqmp_zcu102_revB_defconfig:CONFIG_PHY_NATSEMI=y
configs/xilinx_zynqmp_zcu104_revA_defconfig:CONFIG_PHY_NATSEMI=y
configs/xilinx_zynqmp_zcu104_revC_defconfig:CONFIG_PHY_NATSEMI=y
configs/xilinx_zynqmp_zcu106_revA_defconfig:CONFIG_PHY_NATSEMI=y
configs/xilinx_zynqmp_zcu111_revA_defconfig:CONFIG_PHY_NATSEMI=y
drivers/net/phy/Makefile:obj-$(CONFIG_PHY_NATSEMI) += natsemi.o
drivers/net/phy/phy.c:#ifdef CONFIG_PHY_NATSEMI
include/config_phylib_all_drivers.h:#define CONFIG_PHY_NATSEMI
include/configs/pengwyn.h:#define CONFIG_PHY_NATSEMI
include/configs/rut.h:#define CONFIG_PHY_NATSEMI
include/configs/spear6xx_evb.h:#define CONFIG_PHY_NATSEMI
$

as established back in 2015:

commit f96fe2c0a8a72d675532d79df49cbfe3464154a5
Author: Michal Simek 
Date:   Wed Sep 23 19:35:31 2015 +0200

ARM64: zynqmp: Enable NATSEMI phys

Signed-off-by: Michal Simek 

diff --git a/include/configs/xilinx_zynqmp.h
b/include/configs/xilinx_zynqmp.h
index 5008722bf4..eae1a4988b 100644
--- a/include/configs/xilinx_zynqmp.h
+++ b/include/configs/xilinx_zynqmp.h
@@ -193,6 +193,7 @@
 # define CONFIG_MII
 # define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
 # define CONFIG_PHY_MARVELL
+# define CONFIG_PHY_NATSEMI
 # define CONFIG_PHY_TI
 #endif

  and as a second (far more trivial) example, there's this:

> RTC_DAVINCI
./drivers/rtc/Makefile:obj-$(CONFIG_RTC_DAVINCI) += davinci.o

where does that string occur? apparently, in only one place so it
clearly is utterly worthless as it is currently spelled:

$ git grep RTC_DAVINCI
drivers/rtc/Makefile:obj-$(CONFIG_RTC_DAVINCI) += davinci.o
$

  anyway, people are free to peruse that page to see if anything jumps
out at them. i'll spend a few minutes today wiki'ing all of the
scripts so people can run them on whatever part of the code base
amuses them. thanks for your patience.

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
 http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 0/4] Remove select CRC32 and CONFIG_CRC32

2019-04-13 Thread Robert P. J. Day
On Sat, 13 Apr 2019, Chris Packham wrote:

> Robert points out that we have code selecting CRC32 but nothing that
> actually defines this config option. Similarly image.h #defines
> CONFIG_CRC32 but nothing tests for it.

  ... snip ...

thanks for all that effort ... my script can *find* stuff like that,
but i'm nowhere confident that i'd know how to resolve it once it's
found.

  one last cleanup post coming shortly ...

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
 http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 3/4] Remove #define CONFIG_CRC32

2019-04-13 Thread Chris Packham
There is no check for CONFIG_CRC32 so the #define in image.h does
nothing. Remove it.

Reported-by: Robert P. J. Day 
Signed-off-by: Chris Packham 
---

 include/image.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/image.h b/include/image.h
index 765ffecee0a7..6b2661ed0bd6 100644
--- a/include/image.h
+++ b/include/image.h
@@ -68,7 +68,6 @@ struct fdt_region;
 #   define IMAGE_ENABLE_SHA1   1
 #  endif
 # else
-#  define CONFIG_CRC32 /* FIT images need CRC32 support */
 #  define IMAGE_ENABLE_CRC32   1
 #  define IMAGE_ENABLE_MD5 1
 #  define IMAGE_ENABLE_SHA11
-- 
2.21.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 4/4] Remove whitelist entry for CONFIG_CRC32

2019-04-13 Thread Chris Packham
There are no longer any references to this in the code so this can be
removed.

Signed-off-by: Chris Packham 
---

 scripts/config_whitelist.txt | 1 -
 1 file changed, 1 deletion(-)

diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 48622b12bb64..634bb8d53b57 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -292,7 +292,6 @@ CONFIG_CPU_SH7785
 CONFIG_CPU_TYPE_R
 CONFIG_CPU_VR41XX
 CONFIG_CQSPI_REF_CLK
-CONFIG_CRC32
 CONFIG_CS8900_BUS16
 CONFIG_CS8900_BUS32
 CONFIG_CSF_SIZE
-- 
2.21.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 2/4] mtd: ubi: Remove select for non existent option

2019-04-13 Thread Chris Packham
There is no 'config CRC32' remove the select that was attempting to use
it.

Reported-by: Robert P. J. Day 
Signed-off-by: Chris Packham 
---

 drivers/mtd/ubi/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mtd/ubi/Kconfig b/drivers/mtd/ubi/Kconfig
index cf847833562d..2b17eae94701 100644
--- a/drivers/mtd/ubi/Kconfig
+++ b/drivers/mtd/ubi/Kconfig
@@ -9,7 +9,6 @@ config CONFIG_UBI_SILENCE_MSG
 
 config MTD_UBI
bool "Enable UBI - Unsorted block images"
-   select CRC32
select RBTREE
select MTD_PARTITIONS
help
-- 
2.21.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 1/4] cmd: ubifs: Remove select for non-existent option

2019-04-13 Thread Chris Packham
There is no 'config CRC32', remove the select that was attempting to use
it.

Reported-by: Robert P. J. Day 
Signed-off-by: Chris Packham 
---

 cmd/Kconfig | 2 --
 1 file changed, 2 deletions(-)

diff --git a/cmd/Kconfig b/cmd/Kconfig
index 2bdbfcb3d091..71a7f1cc83c5 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1917,7 +1917,6 @@ endmenu
 
 config CMD_UBI
tristate "Enable UBI - Unsorted block images commands"
-   select CRC32
select MTD_UBI
help
  UBI is a software layer above MTD layer which admits use of LVM-like
@@ -1933,7 +1932,6 @@ config CMD_UBIFS
tristate "Enable UBIFS - Unsorted block images filesystem commands"
depends on CMD_UBI
default y if CMD_UBI
-   select CRC32
select LZO
help
  UBIFS is a file system for flash devices which works on top of UBI.
-- 
2.21.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 0/4] Remove select CRC32 and CONFIG_CRC32

2019-04-13 Thread Chris Packham
Robert points out that we have code selecting CRC32 but nothing that
actually defines this config option. Similarly image.h #defines
CONFIG_CRC32 but nothing tests for it.

lib/Makefile has had obj-y += crc32.o for some time. I can't find any
evidence that u-boot ever had CONFIG_CRC32.

I suspect some of this may have come in when code has been imported from
Linux (particularly the UBI/UBIFS code).


Chris Packham (4):
  cmd: ubifs: Remove select for non-existent option
  mtd: ubi: Remove select for non existent option
  Remove #define CONFIG_CRC32
  Remove whitelist entry for CONFIG_CRC32

 cmd/Kconfig  | 2 --
 drivers/mtd/ubi/Kconfig  | 1 -
 include/image.h  | 1 -
 scripts/config_whitelist.txt | 1 -
 4 files changed, 5 deletions(-)

-- 
2.21.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] very short list of "badref selects" in u-boot source

2019-04-13 Thread Chris Packham
On Sat, Apr 13, 2019 at 8:43 AM Robert P. J. Day  wrote:
>
>
>   rather than go to the trouble of whipping up a wiki page, i can
> present this in a short post to the list. here's the list of what my
> script identified as "badref selects" -- those identifiers for which
> there is a Kconfig line of the form:
>
>   select X
>
> where there is no corresponding:
>
>   config X
>
> the entire list:
>
> > BOOTM_LINUX
> > CONFIG_EHCI_HCD_INIT_AFTER_RESET
> > CONFIG_MPC8xx_WATCHDOG
> > CPU_ARM926EJS1
> > CRC32
> > GPIO
> > MSCC_BITBANG_SPI_GPIO
> > SPL_DISABLE_OF_CONTROL
> > VEXPRESS_CLK
>
>   first, the two with the "CONFIG_" prefix are obvious typos which
> should have those prefixes removed.
>
>   as for the rest, as one example, consider "CRC32":
>
>   $ git grep "select CRC32"
>   cmd/Kconfig:select CRC32
>   cmd/Kconfig:select CRC32
>   drivers/mtd/ubi/Kconfig:select CRC32
>   fs/btrfs/Kconfig:   select CRC32C
>   $
>
> there is no matching "config CRC32" anywhere, although there is:
>
> include/image.h:#  define CONFIG_CRC32  /* FIT images need CRC32 
> support */
>
> in any event, others are welcome to decide what to do about that short
> list of suspicious "select" directives. i am not trying to be
> annoying, i am merely succeeding.
>

I had a look into a few of these. CPU_ARM926EJS1 and GPIO also appear
to be typos. I've sent patches to fix them.

You're also right about CRC32. It appears that lib/Makefile has had
obj-y += crc32.o (or the equivalent) for as long as I've been able to
trace. Note that CRC32C does have a config option so be careful when
grepping. I'll look at a series for that as well.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 2/2] Remove whitelist entry for CONFIG_GPIO

2019-04-13 Thread Chris Packham
CONFIG_GPIO does not exist. There is one hit for it in tegra_gpio.c but
it is a variable name.

Signed-off-by: Chris Packham 
---

 scripts/config_whitelist.txt | 1 -
 1 file changed, 1 deletion(-)

diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index fa98efc24c0b..48622b12bb64 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -713,7 +713,6 @@ CONFIG_GLOBAL_TIMER
 CONFIG_GMII
 CONFIG_GOOD_SESH4
 CONFIG_GPCNTRL
-CONFIG_GPIO
 CONFIG_GPIO_ENABLE_SPI_FLASH
 CONFIG_GPIO_LED_INVERTED_TABLE
 CONFIG_GPIO_LED_STUBS
-- 
2.21.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 1/2] sysreset: select DM_GPIO instead of GPIO

2019-04-13 Thread Chris Packham
CONFIG_GPIO does not exist. sysreset_gpio.c uses the DM gpio APIs so the
correct option to select is DM_GPIO.

Reported-by: Robert P. J. Day 
Signed-off-by: Chris Packham 
---

 drivers/sysreset/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/sysreset/Kconfig b/drivers/sysreset/Kconfig
index 8ce3e2e20761..73d141184953 100644
--- a/drivers/sysreset/Kconfig
+++ b/drivers/sysreset/Kconfig
@@ -17,7 +17,7 @@ if SYSRESET
 
 config SYSRESET_GPIO
bool "Enable support for GPIO reset driver"
-   select GPIO
+   select DM_GPIO
help
  Reset support via GPIO pin connected reset logic. This is used for
  example on Microblaze where reset logic can be controlled via GPIO
-- 
2.21.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v4 2/2] ARM: kirkwood: enable CONFIG_DM_USB on db-88f6281-bp

2019-04-13 Thread Chris Packham
Switch to the driver model for USB on the db-88f6281-bp board.
CONFIG_BLK can't be enabled yet because mvebu_mmc.c needs converting.

Signed-off-by: Chris Packham 
Reviewed-by: Stefan Roese 
---
In my original patch series having this separate made sense as this
wouldn't be possible without the USB changes. Now it may make sense to
squash this into the previous patch.

Changes in v4: None
Changes in v3: None

 configs/db-88f6281-bp-nand_defconfig | 1 +
 configs/db-88f6281-bp-spi_defconfig  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/configs/db-88f6281-bp-nand_defconfig 
b/configs/db-88f6281-bp-nand_defconfig
index 6360ef5e8280..a7a65df7ee7b 100644
--- a/configs/db-88f6281-bp-nand_defconfig
+++ b/configs/db-88f6281-bp-nand_defconfig
@@ -47,6 +47,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_KIRKWOOD_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_LZMA=y
diff --git a/configs/db-88f6281-bp-spi_defconfig 
b/configs/db-88f6281-bp-spi_defconfig
index 54d476727996..bafbdd3ef075 100644
--- a/configs/db-88f6281-bp-spi_defconfig
+++ b/configs/db-88f6281-bp-spi_defconfig
@@ -49,6 +49,7 @@ CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_KIRKWOOD_SPI=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_LZMA=y
-- 
2.21.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH] ARM: imx: Fix typo in select option for ZMX25

2019-04-13 Thread Chris Packham
Correct CPU_ARM926EJS1 to CPU_ARM926EJS.

Reported-by: Robert P. J. Day 
Signed-off-by: Chris Packham 
---

 arch/arm/mach-imx/mx2/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/mx2/Kconfig b/arch/arm/mach-imx/mx2/Kconfig
index ea308fccab02..30a331ae43b7 100644
--- a/arch/arm/mach-imx/mx2/Kconfig
+++ b/arch/arm/mach-imx/mx2/Kconfig
@@ -17,7 +17,7 @@ config TARGET_MX25PDK
 config TARGET_ZMX25
bool "Support zmx25"
select BOARD_LATE_INIT
-   select CPU_ARM926EJS1
+   select CPU_ARM926EJS
 
 endchoice
 
-- 
2.21.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v4 1/2] ARM: kirkwood: add db-88f6281-bp board

2019-04-13 Thread Chris Packham
This is Marvell's Kirkwood development board. It has the following
features

 - 512M DDR2
 - 2 PCI connectors
 - 1 x1 PCI-e interface
 - 1 Gigabit Ethernet Port
 - 2 SATA Ports
 - USB 2.0 Interface
 - SDIO
 - 128M NAND Flash
 - 16M SPI Flash

It can be strapped to boot from SPI or NAND so there are two defconfigs
(one per boot media).

Signed-off-by: Chris Packham 
---

Changes in v4:
- Correctly handle external build output directories
- Add entries to arch/arm/dts/Makefile

Changes in v3:
- incorporate review feedback (except for DM_SERIAL) from Stefan

 arch/arm/dts/Makefile   |   2 +
 arch/arm/dts/kirkwood-db-88f6281-spi.dts|  48 +
 arch/arm/dts/kirkwood-db-88f6281.dts|  26 +
 arch/arm/dts/kirkwood-db.dtsi   |  94 ++
 arch/arm/mach-kirkwood/Kconfig  |   4 +
 board/Marvell/db-88f6281-bp/.gitignore  |   1 +
 board/Marvell/db-88f6281-bp/Kconfig |  12 +++
 board/Marvell/db-88f6281-bp/MAINTAINERS |  10 ++
 board/Marvell/db-88f6281-bp/Makefile|  12 +++
 board/Marvell/db-88f6281-bp/db-88f6281-bp.c | 103 
 board/Marvell/db-88f6281-bp/kwbimage.cfg.in |  36 +++
 configs/db-88f6281-bp-nand_defconfig|  53 ++
 configs/db-88f6281-bp-spi_defconfig |  55 +++
 include/configs/db-88f6281-bp.h |  99 +++
 14 files changed, 555 insertions(+)
 create mode 100644 arch/arm/dts/kirkwood-db-88f6281-spi.dts
 create mode 100644 arch/arm/dts/kirkwood-db-88f6281.dts
 create mode 100644 arch/arm/dts/kirkwood-db.dtsi
 create mode 100644 board/Marvell/db-88f6281-bp/.gitignore
 create mode 100644 board/Marvell/db-88f6281-bp/Kconfig
 create mode 100644 board/Marvell/db-88f6281-bp/MAINTAINERS
 create mode 100644 board/Marvell/db-88f6281-bp/Makefile
 create mode 100644 board/Marvell/db-88f6281-bp/db-88f6281-bp.c
 create mode 100644 board/Marvell/db-88f6281-bp/kwbimage.cfg.in
 create mode 100644 configs/db-88f6281-bp-nand_defconfig
 create mode 100644 configs/db-88f6281-bp-spi_defconfig
 create mode 100644 include/configs/db-88f6281-bp.h

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 8167cdb4e856..b2842580152c 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -37,6 +37,8 @@ dtb-$(CONFIG_KIRKWOOD) += \
kirkwood-atl-sbx81lifxcat.dtb \
kirkwood-blackarmor-nas220.dtb \
kirkwood-d2net.dtb \
+   kirkwood-db-88f6281.dtb \
+   kirkwood-db-88f6281-spi.dtb \
kirkwood-dns325.dtb \
kirkwood-dockstar.dtb \
kirkwood-dreamplug.dtb \
diff --git a/arch/arm/dts/kirkwood-db-88f6281-spi.dts 
b/arch/arm/dts/kirkwood-db-88f6281-spi.dts
new file mode 100644
index ..50b1b0d4a535
--- /dev/null
+++ b/arch/arm/dts/kirkwood-db-88f6281-spi.dts
@@ -0,0 +1,48 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Marvell DB-88F6281-BP Development Board Setup
+ *
+ * Saeed Bishara 
+ * Thomas Petazzoni 
+ *
+ */
+
+/dts-v1/;
+
+#include "kirkwood-db-88f6281.dts"
+
+/ {
+   aliases {
+   spi0 = &spi0;
+   };
+};
+
+&spi0 {
+   status = "okay";
+
+   flash@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "st,m25p128", "jedec,spi-nor", "spi-flash";
+   reg = <0>;
+   spi-max-frequency = <5000>;
+   mode = <0>;
+
+   partition@u-boot {
+   reg = <0x 0x00c0>;
+   label = "u-boot";
+   };
+   partition@u-boot-env {
+   reg = <0x00c0 0x0004>;
+   label = "u-boot-env";
+   };
+   partition@unused {
+   reg = <0x0010 0x00f0>;
+   label = "unused";
+   };
+   };
+};
+
+&nand {
+   status = "disabled";
+};
diff --git a/arch/arm/dts/kirkwood-db-88f6281.dts 
b/arch/arm/dts/kirkwood-db-88f6281.dts
new file mode 100644
index ..2adb17c955aa
--- /dev/null
+++ b/arch/arm/dts/kirkwood-db-88f6281.dts
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Marvell DB-88F6281-BP Development Board Setup
+ *
+ * Saeed Bishara 
+ * Thomas Petazzoni 
+ *
+ */
+
+/dts-v1/;
+
+#include "kirkwood-db.dtsi"
+#include "kirkwood-6281.dtsi"
+
+/ {
+   model = "Marvell DB-88F6281-BP Development Board";
+   compatible = "marvell,db-88f6281-bp", "marvell,kirkwood-88f6281", 
"marvell,kirkwood";
+};
+
+&pciec {
+status = "okay";
+};
+
+&pcie0 {
+   status = "okay";
+};
diff --git a/arch/arm/dts/kirkwood-db.dtsi b/arch/arm/dts/kirkwood-db.dtsi
new file mode 100644
index ..b81d8e8298a3
--- /dev/null
+++ b/arch/arm/dts/kirkwood-db.dtsi
@@ -0,0 +1,94 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Marvell DB-{88F6281,88F6282}-BP Development Board Setup
+ *
+ * Saeed Bishara 
+ * Thomas Petazzoni 
+ *
+ * This file contains the definiti