Re: [U-Boot] [PATCH] x86: mmc: Fix mapping of BAR memory
On Thu, Feb 15, 2018 at 4:09 PM, Bernhard Messerklingerwrote: > Use dm_pci_map_bar function for BAR mapping. This has the advantage > of clearing BAR flags and and only accepting mapped memory. > > Signed-off-by: Bernhard Messerklinger > > --- > > drivers/mmc/pci_mmc.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > Reviewed-by: Bin Meng ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3] x86: zImage: pass device tree setup data to the kernel
Hi Ivan, On Sat, Mar 17, 2018 at 8:32 AM, Ivan Gorinovwrote: > On x86 platforms, U-Boot does not provide Device Tree data to the kernel. > This prevents the kernel from using the same hardware description. > > Make a copy of DTB data with setup_data header and insert new item > into the the setup data linked list. > So this means the Linux kernel reuses the same DTB as what is used by U-Boot. However U-Boot's DTB contains a lot of stuff which is only useful for bootloader, like the microcode stuff. Like other arch's bootm command, should we allow a separate DTB (which is only used by the kernel) passed to the 'zboot' command? > Signed-off-by: Ivan Gorinov > --- > arch/x86/include/asm/bootparam.h | 7 +-- > arch/x86/lib/zimage.c| 31 +++ > 2 files changed, 36 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/include/asm/bootparam.h > b/arch/x86/include/asm/bootparam.h > index 90768a9..6aba614 100644 > --- a/arch/x86/include/asm/bootparam.h > +++ b/arch/x86/include/asm/bootparam.h > @@ -10,8 +10,11 @@ > #include > > /* setup data types */ > -#define SETUP_NONE 0 > -#define SETUP_E820_EXT 1 > +enum { > + SETUP_NONE = 0, > + SETUP_E820_EXT, > + SETUP_DTB, > +}; > > /* extensible setup data list node */ > struct setup_data { > diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c > index 2a82bc8..7e7ec5e 100644 > --- a/arch/x86/lib/zimage.c > +++ b/arch/x86/lib/zimage.c > @@ -14,6 +14,7 @@ > */ > > #include > +#include > #include > #include > #include > @@ -95,6 +96,35 @@ static int get_boot_protocol(struct setup_header *hdr) > } > } > > +static int setup_device_tree(struct setup_header *hdr) > +{ > + const void *fdt_blob = gd->fdt_blob; > + struct setup_data *sd; > + int size; > + > + if (!fdt_blob) > + return 0; > + > + size = fdt_totalsize(fdt_blob); > + if (size < 0) > + return -EINVAL; > + > + size += sizeof(struct setup_data); > + sd = (struct setup_data *)malloc(size); > + if (!sd) { > + printf("Not enough memory for DTB setup data\n"); > + return -ENOMEM; > + } > + > + sd->next = hdr->setup_data; > + sd->type = SETUP_DTB; > + sd->len = fdt_totalsize(fdt_blob); > + memcpy(sd->data, fdt_blob, sd->len); > + hdr->setup_data = (unsigned long)sd; > + > + return 0; > +} > + > struct boot_params *load_zimage(char *image, unsigned long kernel_size, > ulong *load_addressp) > { > @@ -262,6 +292,7 @@ int setup_zimage(struct boot_params *setup_base, char > *cmd_line, int auto_boot, > #endif > > setup_video(_base->screen_info); > + setup_device_tree(hdr); > > return 0; > } > -- Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] Please pull u-boot-usb/topic-xhci
Hi Marek, The following changes since commit 958ad42b77be9d9a69f059066622ef0c15c603ee: usb: dwc2: Replace printf, pr_err by dev_info, dev_err (2018-03-19 11:03:46 +0800) are available in the git repository at: git://git.denx.de/u-boot-usb.git topic-xhci for you to fetch changes up to 24b36b94c661ddbcb8d211a33ed4055178208211: usb: xhci: remove superfluous assignment (2018-03-19 11:09:10 +0800) Heinrich Schuchardt (4): usb: xhci-exynos5: correct error checking usb: xhci-keystone: remove superfluous assignment usb: xhci-ring: remove superfluous assignment usb: xhci: remove superfluous assignment drivers/usb/host/xhci-exynos5.c | 2 +- drivers/usb/host/xhci-keystone.c | 4 ++-- drivers/usb/host/xhci-ring.c | 2 +- drivers/usb/host/xhci.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] usb: xhci-exynos5: correct error checking
On Mon, Mar 19, 2018 at 11:00 AM, Bin Mengwrote: > On Sun, Mar 18, 2018 at 8:51 PM, Heinrich Schuchardt > wrote: >> If fdtdec_next_compatible_subnode() fails it returns a negative value. >> The check (node <= 0) cannot identify this if node is unsigned. >> >> Signed-off-by: Heinrich Schuchardt >> --- >> drivers/usb/host/xhci-exynos5.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> > > Reviewed-by: Bin Meng applied to u-boot-usb/topic-xhci, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] usb: xhci-ring: remove superfluous assignment
On Mon, Mar 19, 2018 at 11:00 AM, Bin Mengwrote: > On Sun, Mar 18, 2018 at 9:01 PM, Heinrich Schuchardt > wrote: >> No need to set a variable to NULL if the next use is an assignment. >> Do not define variables in the middle of nowhere. >> >> Signed-off-by: Heinrich Schuchardt >> --- >> drivers/usb/host/xhci-ring.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> > > Reviewed-by: Bin Meng applied to u-boot-usb/topic-xhci, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] usb: xhci-keystone: remove superfluous assignment
On Mon, Mar 19, 2018 at 11:00 AM, Bin Mengwrote: > On Sun, Mar 18, 2018 at 8:55 PM, Heinrich Schuchardt > wrote: >> There is no need to set variables to NULL if they are not used before >> the next assignment. >> >> Signed-off-by: Heinrich Schuchardt >> --- >> drivers/usb/host/xhci-keystone.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> > > Reviewed-by: Bin Meng applied to u-boot-usb/topic-xhci, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] usb: xhci: remove superfluous assignment
On Mon, Mar 19, 2018 at 11:00 AM, Bin Mengwrote: > On Sun, Mar 18, 2018 at 9:04 PM, Heinrich Schuchardt > wrote: >> There is not need to set variables to NULL before an assignment. >> >> Signed-off-by: Heinrich Schuchardt >> --- >> drivers/usb/host/xhci.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> > > Reviewed-by: Bin Meng applied to u-boot-usb/topic-xhci, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] usb: xhci-exynos5: correct error checking
On Sun, Mar 18, 2018 at 8:51 PM, Heinrich Schuchardtwrote: > If fdtdec_next_compatible_subnode() fails it returns a negative value. > The check (node <= 0) cannot identify this if node is unsigned. > > Signed-off-by: Heinrich Schuchardt > --- > drivers/usb/host/xhci-exynos5.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Bin Meng ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] usb: xhci-keystone: remove superfluous assignment
On Sun, Mar 18, 2018 at 8:55 PM, Heinrich Schuchardtwrote: > There is no need to set variables to NULL if they are not used before > the next assignment. > > Signed-off-by: Heinrich Schuchardt > --- > drivers/usb/host/xhci-keystone.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: Bin Meng ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] usb: xhci-ring: remove superfluous assignment
On Sun, Mar 18, 2018 at 9:01 PM, Heinrich Schuchardtwrote: > No need to set a variable to NULL if the next use is an assignment. > Do not define variables in the middle of nowhere. > > Signed-off-by: Heinrich Schuchardt > --- > drivers/usb/host/xhci-ring.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Bin Meng ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] usb: xhci: remove superfluous assignment
On Sun, Mar 18, 2018 at 9:04 PM, Heinrich Schuchardtwrote: > There is not need to set variables to NULL before an assignment. > > Signed-off-by: Heinrich Schuchardt > --- > drivers/usb/host/xhci.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: Bin Meng ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/3] bmips: add support for bcm6318 usbh phy
On 04.02.2018 21:11, Álvaro Fernández Rojas wrote: > Add support for BCM6318 usbh phy. > > v2: use correct phy driver > > Álvaro Fernández Rojas (3): > phy: add support for bcm6318 usbh phy > mips: bmips: add support for bcm6318 usb > mips: bmips: add ar-5315 usb support > > arch/mips/dts/brcm,bcm6318.dtsi| 30 +++ > arch/mips/dts/comtrend,ar-5315u.dts| 12 +++ > configs/comtrend_ar5315u_ram_defconfig | 9 +++ > drivers/phy/Kconfig| 7 ++ > drivers/phy/Makefile | 1 + > drivers/phy/bcm6318-usbh-phy.c | 144 > + > include/configs/bmips_bcm6318.h| 7 ++ > 7 files changed, 210 insertions(+) > create mode 100644 drivers/phy/bcm6318-usbh-phy.c > applied to u-boot-mips, thanks. -- - Daniel signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/9] bmips: add support for bcm6368 usbh phy
On 04.02.2018 21:10, Álvaro Fernández Rojas wrote: > Add support for BCM 6328/6362/6368/63268 usbh phy. > > v2: use correct phy driver and simplify code. > > Álvaro Fernández Rojas (9): > phy: add support for bcm6368 usbh phy > mips: bmips: add support for bcm6368 usb > mips: bmips: add wap-5813n usb support > mips: bmips: add support for bcm6328 usb > mips: bmips: add ar-5387un usb support > mips: bmips: add support for bcm6362 usb > mips: bmips: add dgnd3700v2 usb support > mips: bmips: add support for bcm63268 usb > mips: bmips: add vr-3032u usb support > > arch/mips/dts/brcm,bcm63268.dtsi | 30 + > arch/mips/dts/brcm,bcm6328.dtsi | 30 + > arch/mips/dts/brcm,bcm6362.dtsi | 30 + > arch/mips/dts/brcm,bcm6368.dtsi | 29 + > arch/mips/dts/comtrend,ar-5387un.dts | 12 ++ > arch/mips/dts/comtrend,vr-3032u.dts | 12 ++ > arch/mips/dts/comtrend,wap-5813n.dts | 12 ++ > arch/mips/dts/netgear,dgnd3700v2.dts | 12 ++ > configs/comtrend_ar5387un_ram_defconfig | 9 ++ > configs/comtrend_vr3032u_ram_defconfig | 9 ++ > configs/comtrend_wap5813n_ram_defconfig | 9 ++ > configs/netgear_dgnd3700v2_ram_defconfig | 9 ++ > drivers/phy/Kconfig | 6 + > drivers/phy/Makefile | 1 + > drivers/phy/bcm6368-usbh-phy.c | 196 > +++ > include/configs/bmips_bcm63268.h | 7 ++ > include/configs/bmips_bcm6328.h | 7 ++ > include/configs/bmips_bcm6362.h | 7 ++ > include/configs/bmips_bcm6368.h | 7 ++ > 19 files changed, 434 insertions(+) > create mode 100644 drivers/phy/bcm6368-usbh-phy.c > applied to u-boot-mips, thanks. -- - Daniel signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/1] lib/slre: remove superfluous assignment
On Sun, Mar 18, 2018 at 11:28:20PM +0100, Heinrich Schuchardt wrote: > It makes no sense to assign a value to 'res' if the next use of the > variable is an assignment. > > Signed-off-by: Heinrich SchuchardtReviewed-by: Tom Rini -- 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/4] bmips: add support for bcm6358 usbh phy
On 04.02.2018 11:19, Álvaro Fernández Rojas wrote: > Add support for BCM6358 usbh phy. > > Álvaro Fernández Rojas (4): > phy: add support for bcm6358 usbh phy > mips: bmips: add support for bcm6358 usb > mips: bmips: add hg556a usb support > mips: bmips: add nb4-ser usb support > > arch/mips/dts/brcm,bcm6358.dtsi | 27 +++ > arch/mips/dts/huawei,hg556a.dts | 12 + > arch/mips/dts/sfr,nb4-ser.dts | 12 + > configs/huawei_hg556a_ram_defconfig | 9 > configs/sfr_nb4-ser_ram_defconfig | 9 > drivers/phy/Kconfig | 6 +++ > drivers/phy/Makefile| 1 + > drivers/phy/bcm6358-usbh-phy.c | 94 > + > include/configs/bmips_bcm6358.h | 7 +++ > 9 files changed, 177 insertions(+) > create mode 100644 drivers/phy/bcm6358-usbh-phy.c > applied to u-boot-mips, thanks. -- - Daniel signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 0/3] bmips: add support for bcm6348 usbh phy
On 04.02.2018 11:18, Álvaro Fernández Rojas wrote: > Add support for BCM6348 usbh phy. > > Álvaro Fernández Rojas (3): > phy: add support for bcm6348 usbh phy > mips: bmips: add support for bcm6348 usb > mips: bmips: add ct-5361 usb support > > arch/mips/dts/brcm,bcm6348.dtsi | 20 > arch/mips/dts/comtrend,ct-5361.dts| 8 +++ > configs/comtrend_ct5361_ram_defconfig | 7 +++ > drivers/phy/Kconfig | 6 +++ > drivers/phy/Makefile | 1 + > drivers/phy/bcm6348-usbh-phy.c| 94 > +++ > include/configs/bmips_bcm6348.h | 5 ++ > 7 files changed, 141 insertions(+) > create mode 100644 drivers/phy/bcm6348-usbh-phy.c > applied to u-boot-mips, thanks. -- - Daniel signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] mips: micronas/vct: check array bounds before access
On 18.03.2018 23:43, Heinrich Schuchardt wrote: > If we check an index against array bounds, we should do so before > accessing the array and not afterwards. > > Signed-off-by: Heinrich Schuchardt> --- > board/micronas/vct/scc.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > applied to u-boot-mips, thanks. -- - Daniel signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 1/1] usb: rockchip: remove duplicate assignement.
On 03/19/2018 12:48 AM, Philipp Tomsich wrote: >> Assigning f_rkusb->reboot_flag twice doesn't make sense. >> >> Signed-off-by: Heinrich Schuchardt>> Acked-by: Philipp Tomsich >> Reviewed-by: Philipp Tomsich >> --- >> drivers/usb/gadget/f_rockusb.c | 1 - >> 1 file changed, 1 deletion(-) >> > > Applied to u-boot-rockchip, thanks! This should go through Lukasz / usb gadget. -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 1/1] video: rk3399_mipi: correct error checking
> Pointers are never negative. Use macro IS_ERR() for checking. > cf. rk3288_mipi.c > > Signed-off-by: Heinrich Schuchardt> Acked-by: Philipp Tomsich > Reviewed-by: Philipp Tomsich > --- > drivers/video/rockchip/rk3399_mipi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Applied to u-boot-rockchip, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] rockchip: clk: rk3188: update dpll settings to make EMAC work
> The patch set dpll settings for 300MHz to values used by binary > blob[1]. With new values dpll still generate 300MHz clock, but > EMAC work. Probably with new values dpll generate more stable clock. > > dpll on rk3188 provide clocks to DDR and EMAC. With current > dpll settings EMAC doesn't work on radxa rock. EMAC sends packets > to network, but it doesn't receive anything. ifconfig shows a lot > of framing errors. > > [1] https://github.com/linux-rockchip/u-boot-rockchip/blob/u-boot-rk3288/ > tools/rk_tools/3188_LPDDR2_300MHz_DDR3_300MHz_20130830.bin > > Signed-off-by: Alexander Kochetkov> Acked-by: Philipp Tomsich > Reviewed-by: Philipp Tomsich > --- > drivers/clk/rockchip/clk_rk3188.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Applied to u-boot-rockchip, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, RFC, 1/1] driver: ram: rockchip: rk3399: missing counter increment
> If we want to check the duration we need to increment the counter. > > Signed-off-by: Heinrich Schuchardt> Acked-by: Philipp Tomsich > Reviewed-by: Philipp Tomsich > --- > I do not have the hardware for testing. But the current coding is > obviously flawed. > --- > drivers/ram/rockchip/sdram_rk3399.c | 1 + > 1 file changed, 1 insertion(+) > Applied to u-boot-rockchip, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, RFC, 1/1] video: rk3288_mipi: check in rk_mipi_ofdata_to_platdata
> The error checking should also catch the case that no range has beeen > defined. > syscon_get_first_range() returns NULL if no range is defined. > cf. rk3399_mipi.c > > Signed-off-by: Heinrich Schuchardt> Acked-by: Philipp Tomsich > Reviewed-by: Philipp Tomsich > --- > I do not possess the hardware for testing. But the coding is not consistent > with the coding used in rk3399_mipi.c. > > Why did we duplicate the coding instead of using a common c file? > --- > drivers/video/rockchip/rk3288_mipi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Applied to u-boot-rockchip, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 1/1] usb: rockchip: remove duplicate assignement.
> Assigning f_rkusb->reboot_flag twice doesn't make sense. > > Signed-off-by: Heinrich Schuchardt> Acked-by: Philipp Tomsich > Reviewed-by: Philipp Tomsich > --- > drivers/usb/gadget/f_rockusb.c | 1 - > 1 file changed, 1 deletion(-) > Applied to u-boot-rockchip, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 2/2] rockchip: pinctrl: rk3188: Move the iomux definitions into pinctrl-driver
> Clean the iomux definitions at grf_rk3188.h, and move them into > pinctrl-driver for resolving the compiling error of redefinition. > > Signed-off-by: Alexander Kochetkov> Acked-by: Philipp Tomsich > Reviewed-by: Philipp Tomsich > --- > arch/arm/include/asm/arch-rockchip/grf_rk3188.h | 380 > --- > drivers/pinctrl/rockchip/pinctrl_rk3188.c | 380 > +++ > 2 files changed, 380 insertions(+), 380 deletions(-) > Applied to u-boot-rockchip, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 1/2] rockchip: pinctrl: rk3036: Move the iomux definitions into pinctrl-driver
> Clean the iomux definitions at grf_rk3036.h, and move them into > pinctrl-driver for resolving the compiling error of redefinition. > > Signed-off-by: Alexander Kochetkov> Acked-by: Philipp Tomsich > Reviewed-by: Philipp Tomsich > --- > arch/arm/include/asm/arch-rockchip/grf_rk3036.h | 409 -- > drivers/pinctrl/rockchip/pinctrl_rk3036.c | 410 > +++ > 2 files changed, 410 insertions(+), 409 deletions(-) > Applied to u-boot-rockchip, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v8 1/3] Adding TCP and wget into u-boot
On Sat, 17 Mar 2018 16:36:14 + Calvin Johnsonwrote: > It would be good to have this cosmetic change into a separate patch. Ok. But at this stage I'm at the "Forgive me Lord for I know not what I do" > IMO, better place for this definition and associated explanation > would be above the comment describing PKTBUFSRX, i.e after > immediately after below line. #define DEBUG_INT_STATE 0 /* > Internal network state changes */ Done > > #define IPPROTO_ICMP1 /* Internet Control Message > > Protocol*/ #define IPPROTO_UDP 17 /* User > > Datagram Protocol */ +#define IPPROTO_TCP > > 6 /* Transmission Control Protocol*/ > > Better to sort IPPROTO in ascending order But, but protocol alphabetical order is so much prettier!! (Done in numerical order). > > /* Set IP header */ > > -void net_set_ip_header(uchar *pkt, struct in_addr dest, struct > > in_addr source); +void net_set_ip_header(uchar *pkt, struct in_addr > > dest, struct in_addr source, > > + u16 pkt_len, u8 prot); > > void net_set_udp_header(uchar *pkt, struct in_addr dest, int dport, > > - int sport, int len); > > - > > + int sport, int len); > Why do you need this change in the set_udp_header? This is a shim to bridge between the original udp to ip procedure call and the extra parameters in the enhanced ip procedure call to the ip layer for TCP. The original udp call is unchanged, because I did not want a change to a procedure call to ripple through many applications. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] mips: micronas/vct: check array bounds before access
If we check an index against array bounds, we should do so before accessing the array and not afterwards. Signed-off-by: Heinrich Schuchardt--- board/micronas/vct/scc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/board/micronas/vct/scc.c b/board/micronas/vct/scc.c index 0d33cc4c28..8dbf4100e7 100644 --- a/board/micronas/vct/scc.c +++ b/board/micronas/vct/scc.c @@ -524,12 +524,14 @@ int scc_setup_dma(enum scc_id id, u32 buffer_tag, struct scc_dma_state *dma_state; int return_value = 0; union scc_dma_cfg dma_cfg; - u32 *buffer_tag_list = scc_descriptor_table[id].buffer_tag_list; + u32 *buffer_tag_list; u32 tag_count, t, t_valid; if ((id >= SCC_MAX) || (id < 0)) return -EINVAL; + buffer_tag_list = scc_descriptor_table[id].buffer_tag_list; + /* if the register is only configured by hw, cannot write! */ if (1 == scc_descriptor_table[id].hw_dma_cfg) return -EACCES; -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 1/1] lib/slre: remove superfluous assignment
It makes no sense to assign a value to 'res' if the next use of the variable is an assignment. Signed-off-by: Heinrich Schuchardt--- v2 correct commit message --- lib/slre.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/slre.c b/lib/slre.c index e26d344865..969c46a859 100644 --- a/lib/slre.c +++ b/lib/slre.c @@ -703,8 +703,6 @@ int main(int argc, char *argv[]) (void) memset(caps, 0, sizeof(caps)); - res = 0; - res = slre_match(, data, len, caps); printf("Result [%d]: %d\n", i, res); -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] lib/slre: remove superfluous assignment
On Sun, Mar 18, 2018 at 11:12:10PM +0100, Heinrich Schuchardt wrote: > It makes to assign a value to 'res' if the next use of the variable is an > assignment. I think you meant "It makes no sense to " ... Thanks (and for all of the other load of fixes you've been posting)! -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] lib/slre: remove superfluous assignment
It makes to assign a value to 'res' if the next use of the variable is an assignment. Signed-off-by: Heinrich Schuchardt--- lib/slre.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/slre.c b/lib/slre.c index e26d344865..969c46a859 100644 --- a/lib/slre.c +++ b/lib/slre.c @@ -703,8 +703,6 @@ int main(int argc, char *argv[]) (void) memset(caps, 0, sizeof(caps)); - res = 0; - res = slre_match(, data, len, caps); printf("Result [%d]: %d\n", i, res); -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] configs: sunxi: enable BLK, DM_MMC, DM_SCSI
On 03/18/2018 10:21 PM, Maxime Ripard wrote: > Hi, > > On Sun, Mar 18, 2018 at 04:20:06PM +0100, Heinrich Schuchardt wrote: >> doc/driver-model/MIGRATION.txt requires to move block drivers to the >> the driver model by v2018.05 >> >> So make the switch for the SUNXI block drivers. >> >> Select BLK, DM_MMC, and DM_SCSI. >> >> DM_USB dpends on USB but there is no necessity to make it depend on >> DISTRO_DEFAULTS. > > That should be a separate patch. > >> Signed-off-by: Heinrich Schuchardt>> --- >> arch/arm/Kconfig | 7 +-- >> 1 file changed, 5 insertions(+), 2 deletions(-) >> >> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig >> index 2c52ff025a..b608f01beb 100644 >> --- a/arch/arm/Kconfig >> +++ b/arch/arm/Kconfig >> @@ -715,13 +715,16 @@ config ARCH_SUNXI >> select BINMAN >> select CMD_GPIO >> select CMD_MMC if MMC >> -select CMD_USB if DISTRO_DEFAULTS >> +select CMD_USB if USB >> select DM >> +select BLK > > You assume here that you always have a block device, which might not > be the case (for example if you only have a NAND chip on your board). I ran a full Travis test for Sunxi boards and could not see any compile error only a time out for one group of boards. BLK is used by #ifdefs in code handling block devices. It has no effect if the block device code is not built. > >> select DM_ETH Here you already select DM_ETH without requiring network. It simply has not effect if there is not network driver built. >> select DM_GPIO >> select DM_KEYBOARD >> +select DM_MMC > > Ditto. DM_MMC only depends on DM not on MMC see drivers/mmc/Kconfig If you don't build MMC code it has no effect. > >> +select DM_SCSI > > > Ditto, with SATA. If you don't build SCSI or ATA code the flag has no effect. Regards Heinrich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] configs: sunxi: enable BLK, DM_MMC, DM_SCSI
Hi, On Sun, Mar 18, 2018 at 04:20:06PM +0100, Heinrich Schuchardt wrote: > doc/driver-model/MIGRATION.txt requires to move block drivers to the > the driver model by v2018.05 > > So make the switch for the SUNXI block drivers. > > Select BLK, DM_MMC, and DM_SCSI. > > DM_USB dpends on USB but there is no necessity to make it depend on > DISTRO_DEFAULTS. That should be a separate patch. > Signed-off-by: Heinrich Schuchardt> --- > arch/arm/Kconfig | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index 2c52ff025a..b608f01beb 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -715,13 +715,16 @@ config ARCH_SUNXI > select BINMAN > select CMD_GPIO > select CMD_MMC if MMC > - select CMD_USB if DISTRO_DEFAULTS > + select CMD_USB if USB > select DM > + select BLK You assume here that you always have a block device, which might not be the case (for example if you only have a NAND chip on your board). > select DM_ETH > select DM_GPIO > select DM_KEYBOARD > + select DM_MMC Ditto. > + select DM_SCSI Ditto, with SATA. Thanks! Maxime -- Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] dhcp command not populating dnsip environment variable
Cause: u-boot/Kconfig DISTRO_DEFAULTS missing variables in Kconfig files u-boot/ config DISTRO_DEFAULTS contains these directives: select HUSH_PARSER select BOOTP_BOOTPATH if NET && CMD_NET select BOOTP_DNS if NET && CMD_NET select BOOTP_GATEWAY if NET && CMD_NET select BOOTP_HOSTNAME if NET && CMD_NET select BOOTP_PXE if NET && CMD_NET select BOOTP_SUBNETMASK if NET && CMD_NET select CMDLINE_EDITING select AUTO_COMPLETE select SYS_LONGHELP However net/Kconfig has no references to: BOOTP_BOOTPATH BOOTP_DNS BOOTP_GATEWAY BOOTP_HOSTNAME BOOTP_PXE BOOTP_SUBNETMASK and possibly common/Kconfig no reference to HUSH_PARSER CMDLINE_EDITING AUTO_COMPLETE SYS_LONGHELP Synptom: Causing the lack of option returned on a dhcp request. Solutions: Three possible solutions to net/Kconfig omissions 1. Add them to Kconfig and select then cmd/Kconfig 2. As they are bootp/dhcp options, always include them ny removing the preprocessor (ifdef) selections. The code fragments they require are small, as is the space for the options returned. 3.Configure them when NET and BOOTP or DHCP commands are selected. It appears they are subordinate to NET features and not stand alone config options. I recommend (2). I'm from the simple is good school. This level of granularity of configuration of the bootp/dchp options appears unnecessary. Further action There needs to be a compile time warning when a select clause in Kconfig references a directive which does not exist in any included Kconfig file. Mysteries which require days to find the config variable or days to resolve are not user friendly. Any Kconfig define which requires more than a second level menu option needs close scrutiny. As much as possible a third or higher level configuration define should be controlled by a "select" by lower level Kconfig selection. For documentation there needs to be an autogenerated Kconfig tree, of the complete tree and with highlighted currently selected items. An example of this is the systemd "systemctl list dependencies" command. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [ANN] U-Boot v2018.03 released
Dear Tom, In message <20180313121344.gk1...@bill-the-cat.ec.rr.com> you wrote: > > We're a day off schedule, but I wanted to see a final comment on one > last bug fix. So, now, I've released v2018.03 and it's live on git and > FTP and ACD (along with the PGP sig file). Sorry for the long delay - here comes the release statistics: Changes since v2018.01: - Processed 1193 csets from 151 developers - 25 employers found - A total of 101060 lines added, 25747 removed (delta 75313) Developers with the most changesets Marek Vasut 89 (7.5%) Heinrich Schuchardt 86 (7.2%) Mario Six 72 (6.0%) Jean-Jacques Hiblot 60 (5.0%) Peng Fan47 (3.9%) Tom Rini44 (3.7%) Patrice Chotard 33 (2.8%) Tuomas Tynkkynen32 (2.7%) Bryan O'Donoghue30 (2.5%) Michal Simek30 (2.5%) ... Developers with the most changed lines Marek Vasut 40903 (36.5%) Peng Fan 8010 (7.1%) Michal Simek 7210 (6.4%) Tom Rini 4695 (4.2%) Heinrich Schuchardt 4594 (4.1%) Patrice Chotard 4319 (3.8%) Masahiro Yamada 3510 (3.1%) Rick Chen 3470 (3.1%) Álvaro Fernández Rojas 2382 (2.1%) David Wu 2274 (2.0%) ... Developers with the most lines removed Tom Rini 2451 (9.5%) Masahiro Yamada 2220 (8.6%) Tuomas Tynkkynen 805 (3.1%) Adam Ford 206 (0.8%) Lukasz Majewski171 (0.7%) Goldschmidt Simon 86 (0.3%) Patrick Bruenn 67 (0.3%) Breno Lima 64 (0.2%) Chris Brandt54 (0.2%) Bin Meng45 (0.2%) ... Developers with the most signoffs (total 312) Alexander Graf 66 (21.2%) Stefan Roese41 (13.1%) Michal Simek25 (8.0%) Jean-Jacques Hiblot 23 (7.4%) Sebastian Reichel 15 (4.8%) Tom Warren 14 (4.5%) Greentime Hu13 (4.2%) Martyn Welch12 (3.8%) Siva Durga Prasad Paladugu 11 (3.5%) Tom Rini10 (3.2%) ... Developers with the most reviews (total 533) Simon Glass106 (19.9%) Fabio Estevam 66 (12.4%) Jagan Teki 52 (9.8%) York Sun48 (9.0%) Tom Rini35 (6.6%) Philipp Tomsich 32 (6.0%) Stefano Babic 28 (5.3%) Daniel Schwierzeck 25 (4.7%) Lukasz Majewski 22 (4.1%) Andre Przywara 14 (2.6%) ... Developers with the most test credits (total 82) Breno Lima 26 (31.7%) Klaus Goger 7 (8.5%) Anand Moon 5 (6.1%) David Wu 5 (6.1%) Vignesh R4 (4.9%) Goldschmidt Simon4 (4.9%) Adam Ford4 (4.9%) Alex Kiernan 3 (3.7%) Bin Meng 2 (2.4%) Tuomas Tynkkynen 2 (2.4%) ... Developers who gave the most tested-by credits (total 82) Bryan O'Donoghue27 (32.9%) Philipp Tomsich 12 (14.6%) Jaehoon Chung8 (9.8%) Jason Rush 8 (9.8%) Jean-Jacques Hiblot 5 (6.1%) Alexander Graf 4 (4.9%) Lukasz Majewski 3 (3.7%) Fabio Estevam3 (3.7%) Tom Rini 3 (3.7%) Heinrich Schuchardt 3 (3.7%) ... Developers with the most report credits (total 21) Jonathan Gray3 (14.3%) Peter Robinson 2 (9.5%) Göran Lundberg 2 (9.5%) Thomas Petazzoni 2 (9.5%) Heinrich Schuchardt 1 (4.8%) Anatolij Gustschin 1 (4.8%) Breno Lima 1 (4.8%) Michal Simek 1 (4.8%) Andre Przywara 1 (4.8%) Lokesh Vutla 1 (4.8%) ... Developers who gave the most report credits (total 21) Alexander Graf 6 (28.6%) Fabio Estevam3 (14.3%) Heinrich Schuchardt 2 (9.5%) Lokesh Vutla 2 (9.5%) Jean-Jacques Hiblot 2 (9.5%) Breno Lima 1 (4.8%) Michal Simek 1 (4.8%) Philipp Tomsich 1 (4.8%) Goldschmidt Simon1 (4.8%) Andy Shevchenko 1 (4.8%) ... Top changeset contributors by employer (Unknown) 565 (47.4%) NXP127 (10.6%) Texas Instruments 126 (10.6%) Xilinx 51 (4.3%) Linaro 47 (3.9%) Konsulko Group 44 (3.7%) ST Microelectronics 34 (2.8%) Free Electrons 30 (2.5%) Socionext Inc. 27 (2.3%) Novell 26 (2.2%) ... Top lines changed by employer (Unknown) 65110 (58.0%) NXP 10834 (9.7%) Xilinx7968 (7.1%) Texas Instruments 4719 (4.2%)
Re: [U-Boot] iminfo and zImages
Dear Andy, In messageyou wrote: > > Is it just not possible for the zImages in RAM to be decoded as per the > uImages ? You can decode only the information that is in there. uImage adds an extra 64 byte header with informnation I considered useful to have, like names, timestamp, checksum. > If I simply use mkimage to convert the image back as a uImage ( essentially > take off the first 64 bytes ? ) then iminfo will display the kernel info You confuse things here. mkimage _adds_ a 64 byte header to create the uImage file from zImage (or similar). iminfo displays this uImage header. Similar when using FIT images. > The uImage file is only 64 bytes smaller so hasn't fundamentally been > uncompressed but also offsetting the iminfo by the 64 bytes makes no odds > either Wrong, uImage has 64 bytes header _added_ - and all this has nothing to do with compression at all. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de panic: kernel trap (ignored) ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 1/3] ubifs: Reintroduce using CONFIG_UBIFS_SILENCE_MSG
Hi, > Use of CONFIG_UBIFS_SILENCE_MSG was added in > 147162dac6 ("ubi: ubifs: Turn off verbose prints") > > Then it was removed in > ff94bc40af ("mtd, ubi, ubifs: resync with Linux-3.14") > > Cc: Joe Hershberger> Cc: Heiko Schocher > Signed-off-by: Petr Vorel > --- > Note, not sure whether we need to keep this workaround. If not, it > might be better to get rid of both CONFIG_UBI_SILENCE_MSG and > CONFIG_UBIFS_SILENCE_MSG. > > Petr > --- > fs/ubifs/ubifs.h | 4 > 1 file changed, 4 insertions(+) > > diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h > index 1d89465205..b4ce706a8e 100644 > --- a/fs/ubifs/ubifs.h > +++ b/fs/ubifs/ubifs.h > @@ -618,9 +618,13 @@ static inline ino_t parent_ino(struct dentry *dentry) > #define UBIFS_VERSION 1 > > /* Normal UBIFS messages */ > +#ifdef CONFIG_UBIFS_SILENCE_MSG > +#define ubifs_msg(c, fmt, ...) > +#else > #define ubifs_msg(c, fmt, ...) \ > pr_notice("UBIFS (ubi%d:%d): " fmt "\n",\ > (c)->vi.ubi_num, (c)->vi.vol_id, ##__VA_ARGS__) > +#endif > /* UBIFS error messages */ > #ifndef __UBOOT__ > #define ubifs_err(c, fmt, ...) ping, please. Kind regards, Petr ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v1] rtc: rewrite isl1208 to support DM
> On 18 Mar 2018, at 18:35, Klaus Goger> wrote: > > Adds devicemodel support to the ISL1208 driver. > This patch drops the non-dm API as no board was using it anyway. > Also add it to Kconfig. > > Signed-off-by: Klaus Goger Reviewed-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] davinci: omapl138_lcdk: fix PLL0 frequency
On 16-03-18 16:56, David Lechner wrote: On 03/16/2018 01:26 AM, Mike Looijmans wrote: On 15-03-18 02:36, David Lechner wrote: commit 1601dd97edc6 ("davinci: omapl138_lcdk: increase PLL0 frequency") changed the PLL0 frequency to 456MHz, which is needed for the LCDC IP block. However, in doing so, it caused the PLLOUT clock to be outside of the allowable specifications given in the OMAP-L138 data sheet. (It says PLLOUT must be 600MHz max). It also uses a PLLM value outside of the range given in the TRM (it says PLLM must in the range 0 to 0x1f). So here is what we have currently: PLLOUT = 24 / (0 + 1) * (37 + 1) = 912MHz (out of spec) ^ ^ ^ CLKIN PREDIV PLLM (out of spec) input to PLLDIVn = 912 / (1 + 1) = 456MHz (desired result) ^ ^ PLLOUT POSTDIV This changes the PLLM value to 18 and the POSTDIV value to 0 so that PLLOUT is now within specification but we still get the desired result. PLLOUT = 24 / (0 + 1) * (18 + 1) = 456MHz (within spec) ^ ^ ^ CLKIN PREDIV PLLM input to PLLDIVn = 456 / (0 + 1) = 456MHz (desired result) ^ ^ PLLOUT POSTDIV These are indeed the correct settings for 456MHz operation, I've used them in an L138 device a few years ago. Did you also increase the CPU voltage to 1.3V? This can be done writing to the I2C power management chip, in my stone age setup I had this piece of code to do that: #define TPS6507X_I2C_ADDR 0x48 #define TPS6507X_REG_DEFLDO2 0x17 u8 buf = 0x17; i2c_write(TPS6507X_I2C_ADDR, TPS6507X_REG_DEFLDO2, 1, , 1) Without the voltage change, some batches of CPUs will fail to boot properly at 456MHz. I was wondering about this, but it looks to me like the LCDK board (at least the A7E revision) has a fixed regulator at 1.3V (TPS650250RHBR). Perhaps you are using a different board? Yeah, the board was based on the DA850 which has an adjustable regulator. The L138 can run at lower voltage on lower frequencies, which makes for nice power savings (down to 1V at 96MHz if I recall correctly), so on a board defaulting to 375MHz the voltage would likely be 1v2 instead. Just wanted to give you a headstart, as it took us quite a while to figure out why some chips would boot fine and others would not... -- Mike Looijmans ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v3] tools/mxsimage: Support building with LibreSSL
The mxsimage utility fails to compile against LibreSSL version < 2.7.0 because LibreSSL says it is OpenSSL 2.0, but it does not support the complete OpenSSL 1.1 interface. LibreSSL defines OPENSSL_VERSION_NUMBER with 0x2000L and therefor claims to have an API compatible with OpenSSL 2.0, but it implements EVP_MD_CTX_new(), EVP_MD_CTX_free() and EVP_CIPHER_CTX_reset() only starting with version 2.7.0, which is not yet released. OpenSSL implements this function since version 1.1.0. This commit will activate the compatibility code meant for OpenSSL < 1.1.0 also for LibreSSL version < 2.7.0. Signed-off-by: Hauke Mehrtens--- tools/mxsimage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/mxsimage.c b/tools/mxsimage.c index 32a7978cae..c8f1f204e3 100644 --- a/tools/mxsimage.c +++ b/tools/mxsimage.c @@ -26,7 +26,8 @@ * OpenSSL 1.1.0 and newer compatibility functions: * https://wiki.openssl.org/index.php/1.1_API_Changes */ -#if OPENSSL_VERSION_NUMBER < 0x1010L +#if OPENSSL_VERSION_NUMBER < 0x1010L || \ +(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x207fL) static void *OPENSSL_zalloc(size_t num) { void *ret = OPENSSL_malloc(num); -- 2.11.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v1] rtc: rewrite isl1208 to support DM
Adds devicemodel support to the ISL1208 driver. This patch drops the non-dm API as no board was using it anyway. Also add it to Kconfig. Signed-off-by: Klaus Goger--- drivers/rtc/Kconfig | 7 +++ drivers/rtc/isl1208.c | 141 ++ 2 files changed, 93 insertions(+), 55 deletions(-) diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 95ac031243..960c3fc3e2 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -30,6 +30,13 @@ config RTC_DS1307 Support for Dallas Semiconductor (now Maxim) DS1307 and DS1338/9 and compatible Real Time Clock devices. +config RTC_ISL1208 + bool "Enable ISL1208 driver" + depends on DM_RTC + help + Support for Renesas (formerly Intersil) ISL1208 and compatible Real Time + Clock devices. + config RTC_RX8010SJ bool "Enable RX8010SJ driver" depends on DM_RTC diff --git a/drivers/rtc/isl1208.c b/drivers/rtc/isl1208.c index 807e2e404e..fa1178a36e 100644 --- a/drivers/rtc/isl1208.c +++ b/drivers/rtc/isl1208.c @@ -14,6 +14,7 @@ #include #include +#include #include #include @@ -51,45 +52,38 @@ #define RTC_STAT_BIT_BAT 0x02/* BATTERY BIT */ #define RTC_STAT_BIT_RTCF 0x01/* REAL TIME CLOCK FAIL BIT */ -static uchar rtc_read (uchar reg); -static void rtc_write (uchar reg, uchar val); - /* * Get the current time from the RTC */ -int rtc_get (struct rtc_time *tmp) +static int isl1208_rtc_get(struct udevice *dev, struct rtc_time *tmp) { - int rel = 0; - uchar sec, min, hour, mday, wday, mon, year, status; - - status = rtc_read (RTC_STAT_REG_ADDR); - sec = rtc_read (RTC_SEC_REG_ADDR); - min = rtc_read (RTC_MIN_REG_ADDR); - hour = rtc_read (RTC_HR_REG_ADDR); - wday = rtc_read (RTC_DAY_REG_ADDR); - mday = rtc_read (RTC_DATE_REG_ADDR); - mon = rtc_read (RTC_MON_REG_ADDR); - year = rtc_read (RTC_YR_REG_ADDR); - - DEBUGR ("Get RTC year: %02x mon: %02x mday: %02x wday: %02x " - "hr: %02x min: %02x sec: %02x status: %02x\n", - year, mon, mday, wday, hour, min, sec, status); - - if (status & RTC_STAT_BIT_RTCF) { + int ret; + uchar buf[8], val; + + ret = dm_i2c_read(dev, 0, buf, sizeof(buf)); + if (ret < 0) + return ret; + + if (buf[RTC_STAT_REG_ADDR] & RTC_STAT_BIT_RTCF) { printf ("### Warning: RTC oscillator has stopped\n"); - rtc_write(RTC_STAT_REG_ADDR, - rtc_read(RTC_STAT_REG_ADDR) &~ (RTC_STAT_BIT_BAT|RTC_STAT_BIT_RTCF)); - rel = -1; + ret = dm_i2c_read(dev, RTC_STAT_REG_ADDR, , sizeof(val)); + if (ret < 0) + return ret; + + val = val & ~(RTC_STAT_BIT_BAT | RTC_STAT_BIT_RTCF); + ret = dm_i2c_write(dev, RTC_STAT_REG_ADDR, , sizeof(val)); + if (ret < 0) + return ret; } - tmp->tm_sec = bcd2bin (sec & 0x7F); - tmp->tm_min = bcd2bin (min & 0x7F); - tmp->tm_hour = bcd2bin (hour & 0x3F); - tmp->tm_mday = bcd2bin (mday & 0x3F); - tmp->tm_mon = bcd2bin (mon & 0x1F); - tmp->tm_year = bcd2bin (year)+2000; - tmp->tm_wday = bcd2bin (wday & 0x07); + tmp->tm_sec = bcd2bin(buf[RTC_SEC_REG_ADDR] & 0x7F); + tmp->tm_min = bcd2bin(buf[RTC_MIN_REG_ADDR] & 0x7F); + tmp->tm_hour = bcd2bin(buf[RTC_HR_REG_ADDR] & 0x3F); + tmp->tm_mday = bcd2bin(buf[RTC_DATE_REG_ADDR] & 0x3F); + tmp->tm_mon = bcd2bin(buf[RTC_MON_REG_ADDR] & 0x1F); + tmp->tm_year = bcd2bin(buf[RTC_YR_REG_ADDR]) + 2000; + tmp->tm_wday = bcd2bin(buf[RTC_DAY_REG_ADDR] & 0x07); tmp->tm_yday = 0; tmp->tm_isdst= 0; @@ -97,51 +91,88 @@ int rtc_get (struct rtc_time *tmp) tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, tmp->tm_hour, tmp->tm_min, tmp->tm_sec); - return rel; + return 0; } /* * Set the RTC */ -int rtc_set (struct rtc_time *tmp) +static int isl1208_rtc_set(struct udevice *dev, const struct rtc_time *tmp) { + int ret; + uchar val, buf[7]; + DEBUGR ("Set DATE: %4d-%02d-%02d (wday=%d) TIME: %2d:%02d:%02d\n", tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, tmp->tm_hour, tmp->tm_min, tmp->tm_sec); + if (tmp->tm_year < 2000 || tmp->tm_year > 2099) + printf("WARNING: year should be between 2000 and 2099!\n"); + /* enable write */ - rtc_write(RTC_STAT_REG_ADDR, - rtc_read(RTC_STAT_REG_ADDR) | RTC_STAT_BIT_WRTC); + ret = dm_i2c_read(dev, RTC_STAT_REG_ADDR, , sizeof(val)); + if (ret < 0) + return ret; + + val = val | RTC_STAT_BIT_WRTC; + + ret = dm_i2c_write(dev, RTC_STAT_REG_ADDR, , sizeof(val)); +
Re: [U-Boot] [U-Boot, 1/1] video: rk3399_mipi: correct error checking
> Pointers are never negative. Use macro IS_ERR() for checking. > cf. rk3288_mipi.c > > Signed-off-by: Heinrich Schuchardt> --- > drivers/video/rockchip/rk3399_mipi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Acked-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 1/1] usb: rockchip: remove duplicate assignement.
> Assigning f_rkusb->reboot_flag twice doesn't make sense. > > Signed-off-by: Heinrich Schuchardt> Acked-by: Philipp Tomsich > --- > drivers/usb/gadget/f_rockusb.c | 1 - > 1 file changed, 1 deletion(-) > Reviewed-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, RFC, 1/1] driver: ram: rockchip: rk3399: missing counter increment
> If we want to check the duration we need to increment the counter. > > Signed-off-by: Heinrich Schuchardt> --- > I do not have the hardware for testing. But the current coding is > obviously flawed. > --- > drivers/ram/rockchip/sdram_rk3399.c | 1 + > 1 file changed, 1 insertion(+) > Reviewed-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, RFC, 1/1] video: rk3288_mipi: check in rk_mipi_ofdata_to_platdata
> The error checking should also catch the case that no range has beeen > defined. > syscon_get_first_range() returns NULL if no range is defined. > cf. rk3399_mipi.c > > Signed-off-by: Heinrich Schuchardt> --- > I do not possess the hardware for testing. But the coding is not consistent > with the coding used in rk3399_mipi.c. > > Why did we duplicate the coding instead of using a common c file? > --- > drivers/video/rockchip/rk3288_mipi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, RFC, 1/1] video: rk3288_mipi: check in rk_mipi_ofdata_to_platdata
> The error checking should also catch the case that no range has beeen > defined. > syscon_get_first_range() returns NULL if no range is defined. > cf. rk3399_mipi.c > > Signed-off-by: Heinrich Schuchardt> --- > I do not possess the hardware for testing. But the coding is not consistent > with the coding used in rk3399_mipi.c. > > Why did we duplicate the coding instead of using a common c file? > --- > drivers/video/rockchip/rk3288_mipi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Acked-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 1/1] video: rk3399_mipi: correct error checking
> Pointers are never negative. Use macro IS_ERR() for checking. > cf. rk3288_mipi.c > > Signed-off-by: Heinrich Schuchardt> --- > drivers/video/rockchip/rk3399_mipi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, v2] rockchip: i2c: enable new I2C controller for rk3066 and rk3188
> rk3066 and rk3188 has two I2C controller implementations. > Current I2C driver wan't work with legacy implementation. > Switching between controllers is performed using a bit inside > GFR_SOC_CON1 register. The bit setting is performed by pinctrl > driver. The patch ask pinctrl to do settings. > > Signed-off-by: Alexander Kochetkov> --- > drivers/i2c/rk_i2c.c | 90 > +++--- > 1 file changed, 85 insertions(+), 5 deletions(-) > Acked-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, RFC, 1/1] driver: ram: rockchip: rk3399: missing counter increment
> If we want to check the duration we need to increment the counter. > > Signed-off-by: Heinrich Schuchardt> --- > I do not have the hardware for testing. But the current coding is > obviously flawed. > --- > drivers/ram/rockchip/sdram_rk3399.c | 1 + > 1 file changed, 1 insertion(+) > Acked-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 1/1] usb: rockchip: remove duplicate assignement.
> Assigning f_rkusb->reboot_flag twice doesn't make sense. > > Signed-off-by: Heinrich Schuchardt> --- > drivers/usb/gadget/f_rockusb.c | 1 - > 1 file changed, 1 deletion(-) > Acked-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] rockchip: rk3399: set fdtfile
> Signed-off-by: Mark Kettenis> --- > include/configs/rk3399_common.h | 1 + > 1 file changed, 1 insertion(+) > Acked-by: Philipp Tomsich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, v1, 2/2] rockchip: pinctrl: rk3399: add support for I2C[123467]
> From: Philipp Tomsich> > This adds support for the (to date unsupported) I2C controllers 1~4 > and 6~7 (i.e. now all controllers except I2C5, which is not accessible > on the RK3399-Q7, are supported by pinctrl). > > Signed-off-by: Philipp Tomsich > Tested-by: Klaus Goger > > Signed-off-by: Klaus Goger > Acked-by: Philipp Tomsich > --- > > arch/arm/include/asm/arch-rockchip/grf_rk3399.h | 30 > drivers/pinctrl/rockchip/pinctrl_rk3399.c | 61 > ++--- > 2 files changed, 85 insertions(+), 6 deletions(-) > Applied to u-boot-rockchip, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, v1, 1/2] rockchip: pinctrl: rk3399: fix GPIO2B1 and GPIO2B2 shift value
> From: Philipp Tomsich> > The shift values for GPIO2B1 and GPIO2B2 had in fact referred to > GPIO2B0 and GPIO2B1, respectively. This substitutes the correct > values. > > Signed-off-by: Philipp Tomsich > Signed-off-by: Klaus Goger > Acked-by: Philipp Tomsich > --- > > arch/arm/include/asm/arch-rockchip/grf_rk3399.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Applied to u-boot-rockchip, thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] usb: ehci-farady: remove redundant assignment
On 03/18/2018 03:41 PM, Heinrich Schuchardt wrote: > On 03/18/2018 01:27 PM, Marek Vasut wrote: >> On 03/18/2018 01:25 PM, Heinrich Schuchardt wrote: >>> Assigning a value to ret if it is immediately overwritten does not make >>> sense. >>> >>> Signed-off-by: Heinrich Schuchardt>> >> Did you even compile-test this ? I have a feeling this file is not used >> at all, so maybe we should remove this driver. > > CONFIG_USB_EHCI_FARADAY is in config_whitelist.txt. > I cannot find any place where USB_EHCI_FARADAY is actually defined. > The driver was added in 2013. I cannot not find any use in v2014.01 > either. So possibly it was never used. > > Regards > > Heinrich > Eliminating the driver would allow us to remove the tweaks parameter of ehci_register(), several #ifdefs, and to simplify the ehci coding. Regards Heinrich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] usb: ehci-farady: remove redundant assignment
On 03/18/2018 03:41 PM, Heinrich Schuchardt wrote: > On 03/18/2018 01:27 PM, Marek Vasut wrote: >> On 03/18/2018 01:25 PM, Heinrich Schuchardt wrote: >>> Assigning a value to ret if it is immediately overwritten does not make >>> sense. >>> >>> Signed-off-by: Heinrich Schuchardt>> >> Did you even compile-test this ? I have a feeling this file is not used >> at all, so maybe we should remove this driver. > > CONFIG_USB_EHCI_FARADAY is in config_whitelist.txt. > I cannot find any place where USB_EHCI_FARADAY is actually defined. > The driver was added in 2013. I cannot not find any use in v2014.01 > either. So possibly it was never used. So how did you test this patch ? -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] configs: sunxi: enable BLK, DM_MMC, DM_SCSI
doc/driver-model/MIGRATION.txt requires to move block drivers to the the driver model by v2018.05 So make the switch for the SUNXI block drivers. Select BLK, DM_MMC, and DM_SCSI. DM_USB dpends on USB but there is no necessity to make it depend on DISTRO_DEFAULTS. Signed-off-by: Heinrich Schuchardt--- arch/arm/Kconfig | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 2c52ff025a..b608f01beb 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -715,13 +715,16 @@ config ARCH_SUNXI select BINMAN select CMD_GPIO select CMD_MMC if MMC - select CMD_USB if DISTRO_DEFAULTS + select CMD_USB if USB select DM + select BLK select DM_ETH select DM_GPIO select DM_KEYBOARD + select DM_MMC + select DM_SCSI select DM_SERIAL - select DM_USB if DISTRO_DEFAULTS + select DM_USB if USB select OF_BOARD_SETUP select OF_CONTROL select OF_SEPARATE -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [U-Boot, 1/1] MAINTAINERS: TI SYSTEM SECURITY: remove invalid file
On Mon, Mar 12, 2018 at 11:58:33PM +0100, Heinrich Schuchardt wrote: > Remove a link to a non-existent file. > > Signed-off-by: Heinrich Schuchardt> Acked-by: Andrew F. Davis 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] [U-Boot, 1/1] MAINTAINERS: ARM TI: remove invalid paths
On Mon, Mar 12, 2018 at 11:40:29PM +0100, Heinrich Schuchardt wrote: > Remove non-existing paths. > > Signed-off-by: Heinrich SchuchardtApplied 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] [U-Boot, 1/1] MAINTAINERS: ARM HISILICON: correct maintained path
On Mon, Mar 12, 2018 at 11:02:17PM +0100, Heinrich Schuchardt wrote: > Fix an incorrect path. > > Signed-off-by: Heinrich SchuchardtApplied 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] [U-Boot, v2, 5/5] common: move init_helpers.h prototypes in init.h
On Tue, Mar 13, 2018 at 01:57:04PM +0100, Patrick Delaunay wrote: > Merge init_helpers.h in the new file init.h > with only prototypes for init_cache_f_r > used in common/board_f.c > > Signed-off-by: Patrick DelaunayApplied 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] [U-Boot, v2, 1/5] common: move board_f.c prototypes in init.h
On Tue, Mar 13, 2018 at 01:57:00PM +0100, Patrick Delaunay wrote: > Move prototypes for function used in common/board_f.c > from common.h to init.h > Remove weak for arch_reserve_stacks in prototype > (checkpatch issue) > > Signed-off-by: Patrick DelaunayApplied 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] [U-Boot, v2, 4/5] common: move board_info.c prototypes in init.h
On Tue, Mar 13, 2018 at 01:57:03PM +0100, Patrick Delaunay wrote: > Move function prototype for common/init/board_init.c > from common.h to init.h > > Signed-off-by: Patrick DelaunayApplied 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] [U-Boot, v2, 3/5] common: move board_r.c prototypes in init.h
On Tue, Mar 13, 2018 at 01:57:02PM +0100, Patrick Delaunay wrote: > Move function prototypes used in common/board_r.c > from common.h to init.h > > Signed-off-by: Patrick DelaunayApplied 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] post: remove reference to power functions
On Mon, Mar 12, 2018 at 09:22:44AM +0100, Patrick Delaunay wrote: > The 2 functions board_power_mode and board_poweroff > are no more existing in U-Boot code (check with grep) > This patch updates the documentation and removes > the unnecessary prototypes. > > Signed-off-by: Patrick DelaunayApplied 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] [U-Boot, v2, 2/5] common: move board_init.c prototypes in init.h
On Tue, Mar 13, 2018 at 01:57:01PM +0100, Patrick Delaunay wrote: > Move function prototypes for common/init/board_init.c > from common.h to init.h > > Signed-off-by: Patrick DelaunayApplied 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] ppc: Remove orphan xilinx_irq.h file
On Tue, Mar 13, 2018 at 11:17:07AM +0100, Michal Simek wrote: > This file is completely unused and it should be removed as the part of > ppc405/ppc440 xilinx platform removal. > > Signed-off-by: Michal SimekApplied 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] [U-Boot, 1/1] MAINTAINERS: FLATTENED DEVICE TREE: correct maintained path
On Mon, Mar 12, 2018 at 11:08:09PM +0100, Heinrich Schuchardt wrote: > Change due to commit b08c8c487083 ("libfdt: move headers to > and ") > > Signed-off-by: Heinrich SchuchardtApplied 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] [U-Boot, 1/1] MAINTAINERS: ARM SAMSUNG: remove invalid paths
On Mon, Mar 12, 2018 at 11:17:11PM +0100, Heinrich Schuchardt wrote: > Remove non-existing directories. > > Signed-off-by: Heinrich Schuchardt> Acked-by: Minkyu Kang 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] [U-Boot, 1/1] MAINTAINERS: ARM FREESCALE IMX: remove invalid path
On Mon, Mar 12, 2018 at 10:56:18PM +0100, Heinrich Schuchardt wrote: > arch/arm/cpu/armv7/mx*/ does not relate to any existing directory. > > Signed-off-by: Heinrich Schuchardt> Reviewed-by: Fabio Estevam 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] common: remove unused prototypes
On Mon, Mar 12, 2018 at 09:19:22AM +0100, Patrick Delaunay wrote: > Remove the prototypes for 4 functions no more existing > in U-Boot code (checked by grep): > - checkflash > - checkdram > - mdm_init > - setup_board_extra > > Signed-off-by: Patrick DelaunayApplied 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] [U-Boot, v3] common: add a prototype for mach_cpu_init()
On Fri, Mar 09, 2018 at 06:28:12PM +0100, Patrick Delaunay wrote: > Add a new file init.h with the prototype for arch_cpu_init > Add a prototype for mach_cpu_init() to avoid a warning: > no previous prototype for ‘mach_cpu_init’ > > It is a first step to move all the functions prototype > used during U-Boot initialization (board_f.c / board_r.c) > from common.h to init.h > > Signed-off-by: Patrick Delaunay> Reviewed-by: Masahiro Yamada 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 v4 1/2] ARM: AM43xx: Add support for RTC only + DDR in self-refresh mode
On Sat, Mar 17, 2018 at 01:32:52PM +0530, Keerthy wrote: > From: Tero Kristo> > Kernel stores information to the RTC_SCRATCH0 and RTC_SCRATCH1 registers > for wakeup from RTC-only mode with DDR in self-refresh. Parse these > registers during SPL boot and jump to the kernel resume vector if the > device is waking up from RTC-only modewith DDR in Self-refresh. > > The RTC scratch register layout used is: > > SCRATCH0 : bits00-31 : kernel resume address > SCRATCH1 : bits00-15 : RTC magic value used to detect valid config > SCRATCH1 : bits16-31 : board type information populated by bootloader > > During the normal boot path the SCRATCH1 : bits16-31 are updated with > the eeprom read board type data. In the rtc_only boot path the rtc > scratchpad register is read and the board type is determined and > correspondingly ddr dpll parameters are set. This is done so as to avoid > costly i2c read to eeprom. > > RTC-only +DRR in self-refresh mode support is currently only enabled for > am43xx_evm_rtconly_config. > This is not to be used with epos evm builds. > > Signed-off-by: Tero Kristo > [j-keer...@ti.com Rebased to latest u-boot master branch] > Signed-off-by: Keerthy Reviewed-by: Tom Rini -- 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 1/1] usb: dwc3: remove superfluous assignment
On 03/18/2018 01:10 PM, Marek Vasut wrote: > On 03/18/2018 01:00 PM, Heinrich Schuchardt wrote: >> In >> >> struct dwc3_request *r = NULL; >> r = A; >> >> the first assignment has no effect. Remove it. >> >> Signed-off-by: Heinrich Schuchardt> > The driver is imported from Linux, did you fix it in Linux too ? Thanks for the hint. https://lkml.org/lkml/2018/3/18/143 Regards Heinrich ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] usb: ehci-farady: remove redundant assignment
On 03/18/2018 01:27 PM, Marek Vasut wrote: > On 03/18/2018 01:25 PM, Heinrich Schuchardt wrote: >> Assigning a value to ret if it is immediately overwritten does not make >> sense. >> >> Signed-off-by: Heinrich Schuchardt> > Did you even compile-test this ? I have a feeling this file is not used > at all, so maybe we should remove this driver. CONFIG_USB_EHCI_FARADAY is in config_whitelist.txt. I cannot find any place where USB_EHCI_FARADAY is actually defined. The driver was added in 2013. I cannot not find any use in v2014.01 either. So possibly it was never used. Regards Heinrich > >> --- >> drivers/usb/host/ehci-faraday.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/usb/host/ehci-faraday.c >> b/drivers/usb/host/ehci-faraday.c >> index 821222cc5d..80a06bb2c0 100644 >> --- a/drivers/usb/host/ehci-faraday.c >> +++ b/drivers/usb/host/ehci-faraday.c >> @@ -36,7 +36,7 @@ void faraday_ehci_set_usbmode(struct ehci_ctrl *ctrl) >> >> int faraday_ehci_get_port_speed(struct ehci_ctrl *ctrl, uint32_t reg) >> { >> -int spd, ret = PORTSC_PSPD_HS; >> +int spd, ret; >> union ehci_faraday_regs *regs; >> >> ret = (void __iomem *)((ulong)ctrl->hcor - 0x10); >> > > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [RFC 1/1] video: rk3288_mipi: check in rk_mipi_ofdata_to_platdata
The error checking should also catch the case that no range has beeen defined. syscon_get_first_range() returns NULL if no range is defined. cf. rk3399_mipi.c Signed-off-by: Heinrich Schuchardt--- I do not possess the hardware for testing. But the coding is not consistent with the coding used in rk3399_mipi.c. Why did we duplicate the coding instead of using a common c file? --- drivers/video/rockchip/rk3288_mipi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/rockchip/rk3288_mipi.c b/drivers/video/rockchip/rk3288_mipi.c index 953b47fb8c..27d125f77e 100644 --- a/drivers/video/rockchip/rk3288_mipi.c +++ b/drivers/video/rockchip/rk3288_mipi.c @@ -136,7 +136,7 @@ static int rk_mipi_ofdata_to_platdata(struct udevice *dev) struct rk_mipi_priv *priv = dev_get_priv(dev); priv->grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF); - if (IS_ERR(priv->grf)) { + if (!priv->grf || IS_ERR(priv->grf)) { debug("%s: Get syscon grf failed (ret=%p)\n", __func__, priv->grf); return -ENXIO; -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] video: rk3399_mipi: correct error checking
Pointers are never negative. Use macro IS_ERR() for checking. cf. rk3288_mipi.c Signed-off-by: Heinrich Schuchardt--- drivers/video/rockchip/rk3399_mipi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/rockchip/rk3399_mipi.c b/drivers/video/rockchip/rk3399_mipi.c index 9ef202bf09..7560e0c07b 100644 --- a/drivers/video/rockchip/rk3399_mipi.c +++ b/drivers/video/rockchip/rk3399_mipi.c @@ -128,7 +128,7 @@ static int rk_mipi_ofdata_to_platdata(struct udevice *dev) struct rk_mipi_priv *priv = dev_get_priv(dev); priv->grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF); - if (priv->grf <= 0) { + if (!priv->grf || IS_ERR(priv->grf)) { debug("%s: Get syscon grf failed (ret=%p)\n", __func__, priv->grf); return -ENXIO; -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] video: exynos: remove redundant assignments
No need to initialize variables if the next usage is an assignment. Signed-off-by: Heinrich Schuchardt--- drivers/video/exynos/exynos_dp.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/video/exynos/exynos_dp.c b/drivers/video/exynos/exynos_dp.c index 30e4020686..2f724ee745 100644 --- a/drivers/video/exynos/exynos_dp.c +++ b/drivers/video/exynos/exynos_dp.c @@ -321,7 +321,7 @@ static unsigned int exynos_dp_link_start(struct exynos_dp *regs, static unsigned int exynos_dp_training_pattern_dis(struct exynos_dp *regs) { - unsigned int ret = EXYNOS_DP_SUCCESS; + unsigned int ret; exynos_dp_set_training_pattern(regs, DP_NONE); @@ -339,7 +339,7 @@ static unsigned int exynos_dp_enable_rx_to_enhanced_mode( struct exynos_dp *regs, unsigned char enable) { unsigned char data; - unsigned int ret = EXYNOS_DP_SUCCESS; + unsigned int ret; ret = exynos_dp_read_byte_from_dpcd(regs, DPCD_LANE_COUNT_SET, ); @@ -366,7 +366,7 @@ static unsigned int exynos_dp_enable_rx_to_enhanced_mode( static unsigned int exynos_dp_set_enhanced_mode(struct exynos_dp *regs, unsigned char enhance_mode) { - unsigned int ret = EXYNOS_DP_SUCCESS; + unsigned int ret ret = exynos_dp_enable_rx_to_enhanced_mode(regs, enhance_mode); if (ret != EXYNOS_DP_SUCCESS) { @@ -416,7 +416,7 @@ static int exynos_dp_read_dpcd_lane_stat(struct exynos_dp *regs, static unsigned int exynos_dp_read_dpcd_adj_req(struct exynos_dp *regs, unsigned char lane_num, unsigned char *sw, unsigned char *em) { - unsigned int ret = EXYNOS_DP_SUCCESS; + unsigned int ret; unsigned char buf; unsigned int dpcd_addr; unsigned char shift_val[DP_LANE_CNT_4] = {0, 4, 0, 4}; @@ -484,7 +484,7 @@ static int exynos_dp_reduce_link_rate(struct exynos_dp *regs, static unsigned int exynos_dp_process_clock_recovery(struct exynos_dp *regs, struct exynos_dp_priv *priv) { - unsigned int ret = EXYNOS_DP_SUCCESS; + unsigned int ret; unsigned char lane_stat; unsigned char lt_ctl_val[DP_LANE_CNT_4] = {0, }; unsigned int i; @@ -594,7 +594,7 @@ static unsigned int exynos_dp_process_clock_recovery(struct exynos_dp *regs, static unsigned int exynos_dp_process_equalizer_training( struct exynos_dp *regs, struct exynos_dp_priv *priv) { - unsigned int ret = EXYNOS_DP_SUCCESS; + unsigned int ret; unsigned char lane_stat, adj_req_sw, adj_req_em, i; unsigned char lt_ctl_val[DP_LANE_CNT_4] = {0,}; unsigned char interlane_aligned = 0; -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] video, da8xx-fb: fix time out in wait_for_event()
If an event does not occur the current coding stays in an endless loop. Signed-off-by: Heinrich Schuchardt--- drivers/video/da8xx-fb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c index 6ec4f89e34..26db73b138 100644 --- a/drivers/video/da8xx-fb.c +++ b/drivers/video/da8xx-fb.c @@ -853,9 +853,10 @@ static u32 wait_for_event(u32 event) do { ret = lcdc_irq_handler(); udelay(1000); - } while (!(ret & event)); + --timeout; + } while (!(ret & event) && timeout); - if (timeout <= 0) { + if (!(ret & event)) { printf("%s: event %d not hit\n", __func__, event); return -1; } -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] video: stb_truetype: simplify expression
Eliminate (x2 - x2) which is always zero. Signed-off-by: Heinrich Schuchardt--- drivers/video/stb_truetype.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/stb_truetype.h b/drivers/video/stb_truetype.h index 26e483cf56..5d00bff9fd 100644 --- a/drivers/video/stb_truetype.h +++ b/drivers/video/stb_truetype.h @@ -1993,7 +1993,7 @@ static void stbtt__fill_active_edges_new(float *scanline, float *scanline_fill, STBTT_assert(fabs(area) <= 1.01f); - scanline[x2] += area + sign * (1-((x2-x2)+(x_bottom-x2))/2) * (sy1-y_crossing); + scanline[x2] += area + sign * (1-(x_bottom-x2)/2) * (sy1-y_crossing); scanline_fill[x2] += sign * (sy1-sy0); } -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] video: cfb_console: simplify logical constraint
(A || !A && B) == (A || B) Signed-off-by: Heinrich Schuchardt--- drivers/video/cfb_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 0b25897062..5b7795dd44 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -768,7 +768,7 @@ static void parse_putc(const char c) break; case '\n': /* next line */ - if (console_col || (!console_col && nl)) + if (console_col || nl) console_newline(1); nl = 1; break; -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] usb: musb-new: misplaced out of bounds check
musb->endpoints[] has array size MUSB_C_NUM_EPS. We must check array bounds before accessing the array and not afterwards. Signed-off-by: Heinrich Schuchardt--- drivers/usb/musb-new/musb_gadget_ep0.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/musb-new/musb_gadget_ep0.c b/drivers/usb/musb-new/musb_gadget_ep0.c index 3cfcb2205a..7a249e55a1 100644 --- a/drivers/usb/musb-new/musb_gadget_ep0.c +++ b/drivers/usb/musb-new/musb_gadget_ep0.c @@ -95,6 +95,11 @@ static int service_tx_status_request( break; } + if (epnum >= MUSB_C_NUM_EPS || !ep->desc) { + handled = -EINVAL; + break; + } + is_in = epnum & USB_DIR_IN; if (is_in) { epnum &= 0x0f; @@ -104,11 +109,6 @@ static int service_tx_status_request( } regs = musb->endpoints[epnum].regs; - if (epnum >= MUSB_C_NUM_EPS || !ep->desc) { - handled = -EINVAL; - break; - } - musb_ep_select(mbase, epnum); if (is_in) tmp = musb_readw(regs, MUSB_TXCSR) -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] tools/mxsimage: Support building with LibreSSL
On 03/18/2018 01:33 AM, Jonathan Gray wrote: > On Sat, Mar 17, 2018 at 05:24:47PM +0100, Marek Vasut wrote: >> On 03/17/2018 04:09 PM, Hauke Mehrtens wrote: >>> On 03/17/2018 03:47 PM, Marek Vasut wrote: On 03/17/2018 01:23 PM, Hauke Mehrtens wrote: > The mxsimage utility fails to compile against LibreSSL because LibreSSL > says it is OpenSSL 2.0, but it does not support the complete OpenSSL 1.1 > interface. The mxsimage does support OpenSSL 1.1 , the commit message is confusing. Can you elaborate on that and reword the last part ? >>> >>> libressl defines the following in version 2.7.4: >>> #define OPENSSL_VERSION_NUMBER 0x2000L >>> #define LIBRESSL_VERSION_NUMBER 0x2060400fL >>> see here: >>> https://github.com/libressl-portable/openbsd/blob/OPENBSD_6_2/src/lib/libcrypto/opensslv.h >>> >>> But OPENSSL_zalloc() is not provided by libressl, that is only available >>> in OpeSSL 1.1.0 and later. >> >> So it's libressl that's API-incompatible and thus broken ? OK >> >> I guess the commit message should mention that and then yes, if >> LIBRESSL_VERSION_NUMBER is defined, we should treat it as old version of >> OpenSSL. > > LibreSSL implements parts of the OpenSSL 1.1 API without breaking > backwards compat like OpenSSL did. > > The proposed patch to mxsimage.c is wrong as some of these functions > are now implemented by LibreSSL. > > https://marc.info/?l=openbsd-cvs=151887933725237=2 > EVP_MD_CTX_new() > EVP_MD_CTX_free() > EVP_CIPHER_CTX_reset() > > OPENSSL_zalloc() is not implemented but it is only used in this ifdef block. > > A patch along the lines of the below would be better. > > diff --git a/tools/mxsimage.c b/tools/mxsimage.c > index 32a7978cae..c8f1f204e3 100644 > --- a/tools/mxsimage.c > +++ b/tools/mxsimage.c > @@ -26,7 +26,8 @@ > * OpenSSL 1.1.0 and newer compatibility functions: > * https://wiki.openssl.org/index.php/1.1_API_Changes > */ > -#if OPENSSL_VERSION_NUMBER < 0x1010L > +#if OPENSSL_VERSION_NUMBER < 0x1010L || \ > +(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < > 0x207fL) > static void *OPENSSL_zalloc(size_t num) > { > void *ret = OPENSSL_malloc(num); > Yes you are right your patch is better. Now I also found these functions in the libressl repository and they will be available with the version 2.7.0. https://github.com/libressl-portable/openbsd/commit/2443cc9a48b200ef126dba99cbbb2f25937382e0 https://github.com/libressl-portable/openbsd/commit/651a8b53a2a41bbfc31d665b3f7030109d09606e Is this sufficient or should I send a new patch? Hauke ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] davinci: omapl138_lcdk: fix PLL0 frequency
On Fri, 2018-03-16 at 10:45 -0500, David Lechner wrote: > On 03/16/2018 04:26 AM, Sekhar Nori wrote: > > On Thursday 15 March 2018 08:02 PM, David Lechner wrote: > > > > > > Thanks for the tips. I've actually done exactly that (using my > > > own SD > > > card). > > > > > > However, these changes affect the u-boot SPL image only. I was > > > able to put > > > the regular u-boot.ais on the SD card, but I'm having troubling > > > figuring > > > out how to install the SPL image. > > > > Err, I thought u-boot.ais is SPL and U-Boot images concatenated > > together. Anyway, I was able to test your change. > > I have no idea. :-) > > I've been trying to follow the TI wiki pages, but they are rather > inconsistent > so I am having trouble figuring out what is correct and what is not. > > [1] seems to be pretty good, but it doesn't have any board-specific > information > or information about installing U-Boot on the SD card. [2] Says to > flash the > NAND. [3] says to `sudo dd in=u-boot.ais of=/dev/sdx seek=10` and to > "Flash the > SPL AIS file into SPI flash" and to use some `tools/uflash/uflash` > for the SD > card that I never found. [4] says to `sudo dd if=u-boot-omapl138- > lcdk.ais > of=/dev/sd seek=117 bs=512 conv=fsync`, which I did with my u- > boot.bin, but > I doesn't explain how to actually boot from this. Note - the generated u-boot.ais and u-boot.bin are different images. As Sekhar said, u-boot.ais is u-boot.bin + the SPL bit (which for the L138 is AIS code). In an earlier reply, I mentioned HexAIS_OMAP- L138.exe. For a long time you had to use that (or the Windows-only GUI program) to add the AIS initialistion code to u-boot.bin. Now the SPL section of u-boot does that, with u-boot.ais being the result. If you put just the .bin file there, then the processor is going to come up, look for an AIS "script", fail to find it, and give up. > > [1]: http://processors.wiki.ti.com/index.php/Serial_Boot_and_Flash_Lo > ading_Utility_for_OMAP-L138 > [2]: http://processors.wiki.ti.com/index.php/L138/C6748_Development_K > it_(LCDK)#Procedure_to_Flash_and_boot_the_LCDK > [3]: http://processors.wiki.ti.com/index.php/OMAP-L138_Preparing_SD_C > ard_for_Boot > [4]: http://processors.wiki.ti.com/index.php/Processor_SDK_Linux_crea > te_SD_card_script > > > > > > Tested-by: Sekhar Nori> > > > Thanks, > > Sekhar > > > > ___ > U-Boot mailing list > U-Boot@lists.denx.de > https://lists.denx.de/listinfo/u-boot signature.asc Description: This is a digitally signed message part ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] pci modify [.l .w .b]
Hi list. If a pci modify command is issued, do_pci() takes the size specifier (.l, .w, .b) and turns it into one of PCI_SIZE_8, PCI_SIZE_16, or PCI_SIZE_32, which correspond to 0, 1, and 2. Consequently, the address increment moves at 0, 1, or 2 bytes. This would be a trivial patch for me to make, but before I do that I wanted to make sure that this was not the desired behavior, or that I am not missing something. Thanks, Steven ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2] tools/mxsimage: Support building with LibreSSL
The mxsimage utility fails to compile against LibreSSL because LibreSSL says it is OpenSSL 2.0, but it does not support the complete OpenSSL 1.1 interface. LibreSSL defines OPENSSL_VERSION_NUMBER with 0x2000L and therefor claims to have an API compatible with OpenSSL 2.0, but it does not implement OPENSSL_zalloc() and some other functions in its most recent version. OpenSSL implements this function since version 1.1.0. This commit will activate the compatibility code meant for OpenSSL < 1.1.0 also for all versions of LibreSSL, if some version of LibreSSL will support these functions in the future the version check should be adapted. Signed-off-by: Hauke Mehrtens--- tools/mxsimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mxsimage.c b/tools/mxsimage.c index 32a7978cae..0cbf007dff 100644 --- a/tools/mxsimage.c +++ b/tools/mxsimage.c @@ -26,7 +26,7 @@ * OpenSSL 1.1.0 and newer compatibility functions: * https://wiki.openssl.org/index.php/1.1_API_Changes */ -#if OPENSSL_VERSION_NUMBER < 0x1010L +#if OPENSSL_VERSION_NUMBER < 0x1010L || defined(LIBRESSL_VERSION_NUMBER) static void *OPENSSL_zalloc(size_t num) { void *ret = OPENSSL_malloc(num); -- 2.11.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] tools/mxsimage: Support building with LibreSSL
On 03/17/2018 03:47 PM, Marek Vasut wrote: > On 03/17/2018 01:23 PM, Hauke Mehrtens wrote: >> The mxsimage utility fails to compile against LibreSSL because LibreSSL >> says it is OpenSSL 2.0, but it does not support the complete OpenSSL 1.1 >> interface. > > The mxsimage does support OpenSSL 1.1 , the commit message is confusing. > Can you elaborate on that and reword the last part ? libressl defines the following in version 2.7.4: #define OPENSSL_VERSION_NUMBER 0x2000L #define LIBRESSL_VERSION_NUMBER 0x2060400fL see here: https://github.com/libressl-portable/openbsd/blob/OPENBSD_6_2/src/lib/libcrypto/opensslv.h But OPENSSL_zalloc() is not provided by libressl, that is only available in OpeSSL 1.1.0 and later. I do not know if libressl plans to add functions like OPENSSL_zalloc() in the future, but currently it is not included and we always have to use the backward compatible code when compiling against libressl. >> Signed-off-by: Hauke Mehrtens>> --- >> tools/mxsimage.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/tools/mxsimage.c b/tools/mxsimage.c >> index 32a7978cae..0cbf007dff 100644 >> --- a/tools/mxsimage.c >> +++ b/tools/mxsimage.c >> @@ -26,7 +26,7 @@ >> * OpenSSL 1.1.0 and newer compatibility functions: >> * https://wiki.openssl.org/index.php/1.1_API_Changes >> */ >> -#if OPENSSL_VERSION_NUMBER < 0x1010L >> +#if OPENSSL_VERSION_NUMBER < 0x1010L || defined(LIBRESSL_VERSION_NUMBER) > > This should check for the libressl version number value too I think? > >> static void *OPENSSL_zalloc(size_t num) >> { >> void *ret = OPENSSL_malloc(num); >> > > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] tools/mxsimage: Support building with LibreSSL
The mxsimage utility fails to compile against LibreSSL because LibreSSL says it is OpenSSL 2.0, but it does not support the complete OpenSSL 1.1 interface. Signed-off-by: Hauke Mehrtens--- tools/mxsimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mxsimage.c b/tools/mxsimage.c index 32a7978cae..0cbf007dff 100644 --- a/tools/mxsimage.c +++ b/tools/mxsimage.c @@ -26,7 +26,7 @@ * OpenSSL 1.1.0 and newer compatibility functions: * https://wiki.openssl.org/index.php/1.1_API_Changes */ -#if OPENSSL_VERSION_NUMBER < 0x1010L +#if OPENSSL_VERSION_NUMBER < 0x1010L || defined(LIBRESSL_VERSION_NUMBER) static void *OPENSSL_zalloc(size_t num) { void *ret = OPENSSL_malloc(num); -- 2.11.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] usb: musb: remove superfluous assignment
Setting ret = -EINVAL is superfluous. Signed-off-by: Heinrich Schuchardt--- drivers/usb/musb-new/musb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb-new/musb_core.c b/drivers/usb/musb-new/musb_core.c index 79e118ef85..19c072a67e 100644 --- a/drivers/usb/musb-new/musb_core.c +++ b/drivers/usb/musb-new/musb_core.c @@ -1691,7 +1691,7 @@ musb_mode_show(struct device *dev, struct device_attribute *attr, char *buf) { struct musb *musb = dev_to_musb(dev); unsigned long flags; - int ret = -EINVAL; + int ret; spin_lock_irqsave(>lock, flags); ret = sprintf(buf, "%s\n", otg_state_string(musb->xceiv->state)); -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] usb: xhci: remove superfluous assignment
There is not need to set variables to NULL before an assignment. Signed-off-by: Heinrich Schuchardt--- drivers/usb/host/xhci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 4673738d1e..7e3c373e64 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -544,8 +544,8 @@ static int xhci_set_configuration(struct usb_device *udev) /* filling up ep contexts */ for (cur_ep = 0; cur_ep < num_of_ep; cur_ep++) { - struct usb_endpoint_descriptor *endpt_desc = NULL; - struct usb_ss_ep_comp_descriptor *ss_ep_comp_desc = NULL; + struct usb_endpoint_descriptor *endpt_desc; + struct usb_ss_ep_comp_descriptor *ss_ep_comp_desc; endpt_desc = >ep_desc[cur_ep]; ss_ep_comp_desc = >ss_ep_comp_desc[cur_ep]; -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] usb: xhci-ring: remove superfluous assignment
No need to set a variable to NULL if the next use is an assignment. Do not define variables in the middle of nowhere. Signed-off-by: Heinrich Schuchardt--- drivers/usb/host/xhci-ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 7599c9183a..76580a1905 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -762,6 +762,7 @@ int xhci_ctrl_tx(struct usb_device *udev, unsigned long pipe, struct xhci_virt_device *virt_dev = ctrl->devs[slot_id]; struct xhci_ring *ep_ring; union xhci_trb *event; + struct xhci_ep_ctx *ep_ctx; debug("req=%u (%#x), type=%u (%#x), value=%u (%#x), index=%u\n", req->request, req->request, @@ -786,7 +787,6 @@ int xhci_ctrl_tx(struct usb_device *udev, unsigned long pipe, xhci_inval_cache((uintptr_t)virt_dev->out_ctx->bytes, virt_dev->out_ctx->size); - struct xhci_ep_ctx *ep_ctx = NULL; ep_ctx = xhci_get_ep_ctx(ctrl, virt_dev->out_ctx, ep_index); /* 1 TRB for setup, 1 for status */ -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] usb: xhci-keystone: remove superfluous assignment
There is no need to set variables to NULL if they are not used before the next assignment. Signed-off-by: Heinrich Schuchardt--- drivers/usb/host/xhci-keystone.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci-keystone.c b/drivers/usb/host/xhci-keystone.c index f322a803fe..1a3dcf5edb 100644 --- a/drivers/usb/host/xhci-keystone.c +++ b/drivers/usb/host/xhci-keystone.c @@ -154,8 +154,8 @@ static int keystone_xhci_phy_suspend(void) { int loop_cnt = 0; struct xhci_hcor *hcor; - uint32_t *portsc_1 = NULL; - uint32_t *portsc_2 = NULL; + uint32_t *portsc_1; + uint32_t *portsc_2; u32 val, usb2_pls, usb3_pls, event_q; struct dwc3 *dwc3_reg = keystone.dwc3_reg; -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] usb: xhci-exynos5: correct error checking
If fdtdec_next_compatible_subnode() fails it returns a negative value. The check (node <= 0) cannot identify this if node is unsigned. Signed-off-by: Heinrich Schuchardt--- drivers/usb/host/xhci-exynos5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-exynos5.c b/drivers/usb/host/xhci-exynos5.c index 6f08d5d5a2..4cbfbdee3d 100644 --- a/drivers/usb/host/xhci-exynos5.c +++ b/drivers/usb/host/xhci-exynos5.c @@ -55,7 +55,7 @@ static int xhci_usb_ofdata_to_platdata(struct udevice *dev) { struct exynos_xhci_platdata *plat = dev_get_platdata(dev); const void *blob = gd->fdt_blob; - unsigned int node; + int node; int depth; /* -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] usb: sl811-hcd: remove duplicat assignment
Don't make the same assignment twice. Signed-off-by: Heinrich Schuchardt--- drivers/usb/host/sl811-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index b29c67e189..e587895bfc 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c @@ -93,7 +93,7 @@ static void inline sl811_write_buf(__u8 offset, __u8 *buf, __u8 size) int usb_init_kup4x (void) { volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; - volatile memctl8xx_t *memctl = >im_memctl; + volatile memctl8xx_t *memctl; int i; unsigned char tmp; -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] usb: ehci-farady: remove redundant assignment
On 03/18/2018 01:25 PM, Heinrich Schuchardt wrote: > Assigning a value to ret if it is immediately overwritten does not make > sense. > > Signed-off-by: Heinrich SchuchardtDid you even compile-test this ? I have a feeling this file is not used at all, so maybe we should remove this driver. > --- > drivers/usb/host/ehci-faraday.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/host/ehci-faraday.c b/drivers/usb/host/ehci-faraday.c > index 821222cc5d..80a06bb2c0 100644 > --- a/drivers/usb/host/ehci-faraday.c > +++ b/drivers/usb/host/ehci-faraday.c > @@ -36,7 +36,7 @@ void faraday_ehci_set_usbmode(struct ehci_ctrl *ctrl) > > int faraday_ehci_get_port_speed(struct ehci_ctrl *ctrl, uint32_t reg) > { > - int spd, ret = PORTSC_PSPD_HS; > + int spd, ret; > union ehci_faraday_regs *regs; > > ret = (void __iomem *)((ulong)ctrl->hcor - 0x10); > -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] usb: ehci-farady: remove redundant assignment
Assigning a value to ret if it is immediately overwritten does not make sense. Signed-off-by: Heinrich Schuchardt--- drivers/usb/host/ehci-faraday.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci-faraday.c b/drivers/usb/host/ehci-faraday.c index 821222cc5d..80a06bb2c0 100644 --- a/drivers/usb/host/ehci-faraday.c +++ b/drivers/usb/host/ehci-faraday.c @@ -36,7 +36,7 @@ void faraday_ehci_set_usbmode(struct ehci_ctrl *ctrl) int faraday_ehci_get_port_speed(struct ehci_ctrl *ctrl, uint32_t reg) { - int spd, ret = PORTSC_PSPD_HS; + int spd, ret; union ehci_faraday_regs *regs; ret = (void __iomem *)((ulong)ctrl->hcor - 0x10); -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] usb: rockchip: remove duplicate assignement.
Assigning f_rkusb->reboot_flag twice doesn't make sense. Signed-off-by: Heinrich Schuchardt--- drivers/usb/gadget/f_rockusb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/gadget/f_rockusb.c b/drivers/usb/gadget/f_rockusb.c index d5a10f1904..ad3ae91e6d 100644 --- a/drivers/usb/gadget/f_rockusb.c +++ b/drivers/usb/gadget/f_rockusb.c @@ -552,7 +552,6 @@ static void cb_reboot(struct usb_ep *ep, struct usb_request *req) sizeof(struct fsg_bulk_cb_wrap)); struct f_rockusb *f_rkusb = get_rkusb(); - f_rkusb->reboot_flag = 0; memcpy((char *)cbw, req->buf, USB_BULK_CB_WRAP_LEN); f_rkusb->reboot_flag = cbw->CDB[1]; rockusb_func->in_req->complete = compl_do_reset; -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] usb: f_mass_storage: simplify logical expression
An unsigned int is always >= 0. Signed-off-by: Heinrich Schuchardt--- drivers/usb/gadget/f_mass_storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index 1ecb92ac6b..7d7ed4242b 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c @@ -1744,7 +1744,7 @@ static int check_command(struct fsg_common *common, int cmnd_size, common->lun, lun); /* Check the LUN */ - if (common->lun >= 0 && common->lun < common->nluns) { + if (common->lun < common->nluns) { curlun = >luns[common->lun]; if (common->cmnd[0] != SC_REQUEST_SENSE) { curlun->sense_data = SS_NO_SENSE; -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] usb: dwc3: remove superfluous assignment
On 03/18/2018 01:00 PM, Heinrich Schuchardt wrote: > In > > struct dwc3_request *r = NULL; > r = A; > > the first assignment has no effect. Remove it. > > Signed-off-by: Heinrich SchuchardtThe driver is imported from Linux, did you fix it in Linux too ? > --- > drivers/usb/dwc3/ep0.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c > index e61d98046f..2719984603 100644 > --- a/drivers/usb/dwc3/ep0.c > +++ b/drivers/usb/dwc3/ep0.c > @@ -767,7 +767,7 @@ out: > static void dwc3_ep0_complete_data(struct dwc3 *dwc, > const struct dwc3_event_depevt *event) > { > - struct dwc3_request *r = NULL; > + struct dwc3_request *r; > struct usb_request *ur; > struct dwc3_trb *trb; > struct dwc3_ep *ep0; > -- Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] usb: gadget: remove duplicate assignment.
We should not make the same assignement twice. Signed-off-by: Heinrich Schuchardt--- drivers/usb/gadget/composite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index d0ee7847b9..7dd1e13b92 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -165,7 +165,7 @@ static int config_buf(struct usb_configuration *config, int len = USB_BUFSIZ - USB_DT_CONFIG_SIZE; void*next = buf + USB_DT_CONFIG_SIZE; struct usb_descriptor_header**descriptors; - struct usb_config_descriptor*c = buf; + struct usb_config_descriptor*c; int status; struct usb_function *f; -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] usb: dwc3: remove superfluous assignment
In struct dwc3_request *r = NULL; r = A; the first assignment has no effect. Remove it. Signed-off-by: Heinrich Schuchardt--- drivers/usb/dwc3/ep0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index e61d98046f..2719984603 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c @@ -767,7 +767,7 @@ out: static void dwc3_ep0_complete_data(struct dwc3 *dwc, const struct dwc3_event_depevt *event) { - struct dwc3_request *r = NULL; + struct dwc3_request *r; struct usb_request *ur; struct dwc3_trb *trb; struct dwc3_ep *ep0; -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/1] spi: lpc32xx: simplify logical expression
A & A & B == A & B Signed-off-by: Heinrich Schuchardt--- drivers/spi/lpc32xx_ssp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/lpc32xx_ssp.c b/drivers/spi/lpc32xx_ssp.c index e2a593b934..b8bce3d6e8 100644 --- a/drivers/spi/lpc32xx_ssp.c +++ b/drivers/spi/lpc32xx_ssp.c @@ -130,7 +130,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, int status = readl(>regs->sr); if ((idx_out < bytelen) && (status & SSP_SR_TNF)) writel(((u8 *)dout)[idx_out++], >regs->data); - if ((idx_in < bytelen) && (status & status & SSP_SR_RNE)) + if ((idx_in < bytelen) && (status & SSP_SR_RNE)) ((u8 *)din)[idx_in++] = readl(>regs->data); if (get_timer(start_time) >= CONFIG_LPC32XX_SSP_TIMEOUT) return -1; -- 2.16.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot