Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
1ec6d71a02 | ||
|
dfca432980 | ||
|
eb1c45dfc4 | ||
|
2591231cce |
@ -43,8 +43,15 @@ Hummingbird_A31
|
||||
Hyundai_A7HD
|
||||
i12-tvbox
|
||||
icnova-a20-swac
|
||||
iNet_86VS
|
||||
inet1
|
||||
inet86dz
|
||||
inet97fv2
|
||||
inet98v_rev2
|
||||
inet9f_rev03
|
||||
inet_q972
|
||||
iNet_3F
|
||||
iNet_3W
|
||||
iNet_86VS
|
||||
Itead_Ibox_A20
|
||||
jesurun_q5
|
||||
jetson-tk1
|
||||
|
45
dwc2-USB-controller-hangs-with-lan78xx.patch
Normal file
45
dwc2-USB-controller-hangs-with-lan78xx.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From patchwork Mon Jun 18 18:56:06 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [U-Boot,1/1] dwc2 USB controller hangs with lan78xx
|
||||
X-Patchwork-Submitter: Andrew Thomas <andrew.thomas@oracle.com>
|
||||
X-Patchwork-Id: 931158
|
||||
Message-Id: <1529348166-130059-2-git-send-email-andrew.thomas@oracle.com>
|
||||
To: u-boot@lists.denx.de
|
||||
Cc: Andrew Thomas <andrew.thomas@oracle.com>
|
||||
Date: Mon, 18 Jun 2018 11:56:06 -0700
|
||||
From: Andrew Thomas <andrew.thomas@oracle.com>
|
||||
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
||||
|
||||
This bug is the combination of dwc2 USB controller and lan78xx
|
||||
USB ethernet controller, which is the combination in use on
|
||||
the Raspberry Pi Model 3 B+.
|
||||
|
||||
When the host attempts to receive a packet, but a packet has not
|
||||
arrived, the lan78xx controller responds by setting BIR
|
||||
(Bulk-In Empty Response) to NAK. Unfortunately, this hangs
|
||||
the USB controller and requires the USB controller to
|
||||
be reset.
|
||||
|
||||
The fix proposed is to have the lan78xx controller respond
|
||||
by setting BIR to ZLP.
|
||||
|
||||
Signed-off-by: Andrew Thomas <andrew.thomas@oracle.com>
|
||||
---
|
||||
drivers/usb/eth/lan78xx.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/usb/eth/lan78xx.c b/drivers/usb/eth/lan78xx.c
|
||||
index c5ff379..e8ee665 100644
|
||||
--- a/drivers/usb/eth/lan78xx.c
|
||||
+++ b/drivers/usb/eth/lan78xx.c
|
||||
@@ -296,7 +296,7 @@ static int lan78xx_basic_reset(struct usb_device *udev,
|
||||
ret = lan7x_read_reg(udev, LAN78XX_USB_CFG0, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
- val |= LAN78XX_USB_CFG0_BIR;
|
||||
+ val &= ~LAN78XX_USB_CFG0_BIR;
|
||||
return lan7x_write_reg(udev, LAN78XX_USB_CFG0, val);
|
||||
}
|
||||
|
40
rpi-Adjust-fdt_addr_r-to-a-sane-address.patch
Normal file
40
rpi-Adjust-fdt_addr_r-to-a-sane-address.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From patchwork Fri Apr 13 15:49:00 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [U-Boot] rpi: Adjust fdt_addr_r to a sane address
|
||||
X-Patchwork-Submitter: Alexander Graf <agraf@suse.de>
|
||||
X-Patchwork-Id: 898002
|
||||
X-Patchwork-Delegate: agraf@suse.de
|
||||
Message-Id: <20180413154900.84208-1-agraf@suse.de>
|
||||
To: u-boot@lists.denx.de
|
||||
Date: Fri, 13 Apr 2018 17:49:00 +0200
|
||||
From: Alexander Graf <agraf@suse.de>
|
||||
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
||||
|
||||
Back in the old days, 0x100 was used as the address to pass the device tree
|
||||
from firmware into the kernel. This has since changed to a more dynamic
|
||||
location, so using 0x100 actually breaks more things than it helps with.
|
||||
|
||||
Let's move the device tree default location for distro boot to a more sane
|
||||
place that gives us enough head room in low memory.
|
||||
|
||||
Reported-by: Tuomas Tynkkynen <tuomas@tuxera.com>
|
||||
Signed-off-by: Alexander Graf <agraf@suse.de>
|
||||
---
|
||||
include/configs/rpi.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/configs/rpi.h b/include/configs/rpi.h
|
||||
index 325e52a019..fcf7e0976b 100644
|
||||
--- a/include/configs/rpi.h
|
||||
+++ b/include/configs/rpi.h
|
||||
@@ -124,7 +124,7 @@
|
||||
#define ENV_MEM_LAYOUT_SETTINGS \
|
||||
"fdt_high=ffffffff\0" \
|
||||
"initrd_high=ffffffff\0" \
|
||||
- "fdt_addr_r=0x00000100\0" \
|
||||
+ "fdt_addr_r=0x01f00000\0" \
|
||||
"pxefile_addr_r=0x00100000\0" \
|
||||
"kernel_addr_r=0x01000000\0" \
|
||||
"scriptaddr=0x02000000\0" \
|
@ -1,53 +0,0 @@
|
||||
From patchwork Thu Apr 5 09:37:52 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [U-Boot] rpi: Allow to boot without serial
|
||||
X-Patchwork-Submitter: Alexander Graf <agraf@suse.de>
|
||||
X-Patchwork-Id: 895325
|
||||
X-Patchwork-Delegate: agraf@suse.de
|
||||
Message-Id: <20180405093752.32985-1-agraf@suse.de>
|
||||
To: u-boot@lists.denx.de
|
||||
Date: Thu, 5 Apr 2018 11:37:52 +0200
|
||||
From: Alexander Graf <agraf@suse.de>
|
||||
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
||||
|
||||
When we enable CONFIG_OF_BOARD on Raspberry Pis, we may end up without
|
||||
serial console support in early boot. Hence we need to make the serial
|
||||
port optional, otherwise we will never get to the point where serial
|
||||
would be probed.
|
||||
|
||||
Signed-off-by: Alexander Graf <agraf@suse.de>
|
||||
---
|
||||
configs/rpi_0_w_defconfig | 1 +
|
||||
configs/rpi_2_defconfig | 1 +
|
||||
configs/rpi_defconfig | 1 +
|
||||
3 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig
|
||||
index 04717d5e50..6e02cf34e9 100644
|
||||
--- a/configs/rpi_0_w_defconfig
|
||||
+++ b/configs/rpi_0_w_defconfig
|
||||
@@ -34,3 +34,4 @@ CONFIG_SYS_WHITE_ON_BLACK=y
|
||||
CONFIG_CONSOLE_SCROLL_LINES=10
|
||||
CONFIG_PHYS_TO_BUS=y
|
||||
CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+# CONFIG_REQUIRE_SERIAL_CONSOLE is not set
|
||||
diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig
|
||||
index f8203c9d47..dd3c60cc93 100644
|
||||
--- a/configs/rpi_2_defconfig
|
||||
+++ b/configs/rpi_2_defconfig
|
||||
@@ -34,3 +34,4 @@ CONFIG_SYS_WHITE_ON_BLACK=y
|
||||
CONFIG_CONSOLE_SCROLL_LINES=10
|
||||
CONFIG_PHYS_TO_BUS=y
|
||||
CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+# CONFIG_REQUIRE_SERIAL_CONSOLE is not set
|
||||
diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig
|
||||
index d13d3d3e2e..2c0412d8ea 100644
|
||||
--- a/configs/rpi_defconfig
|
||||
+++ b/configs/rpi_defconfig
|
||||
@@ -34,3 +34,4 @@ CONFIG_SYS_WHITE_ON_BLACK=y
|
||||
CONFIG_CONSOLE_SCROLL_LINES=10
|
||||
CONFIG_PHYS_TO_BUS=y
|
||||
CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
+# CONFIG_REQUIRE_SERIAL_CONSOLE is not set
|
@ -1,52 +0,0 @@
|
||||
From e8df52eda084c1610a2a3569960905e3aa2557c2 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Fri, 6 Apr 2018 16:27:26 +0100
|
||||
Subject: [PATCH] rpi: Enable using the DT provided by the Raspberry Pi
|
||||
firmware
|
||||
|
||||
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
---
|
||||
configs/rpi_2_defconfig | 1 +
|
||||
configs/rpi_3_32b_defconfig | 1 +
|
||||
configs/rpi_3_defconfig | 1 +
|
||||
3 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig
|
||||
index dd3c60cc93..05aff1d700 100644
|
||||
--- a/configs/rpi_2_defconfig
|
||||
+++ b/configs/rpi_2_defconfig
|
||||
@@ -13,6 +13,7 @@ CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_OF_EMBED=y
|
||||
+CONFIG_OF_BOARD=y
|
||||
CONFIG_ENV_FAT_INTERFACE="mmc"
|
||||
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
|
||||
CONFIG_DM_KEYBOARD=y
|
||||
diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig
|
||||
index 4e59c14fdf..38704f67c9 100644
|
||||
--- a/configs/rpi_3_32b_defconfig
|
||||
+++ b/configs/rpi_3_32b_defconfig
|
||||
@@ -14,6 +14,7 @@ CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_OF_EMBED=y
|
||||
+CONFIG_OF_BOARD=y
|
||||
CONFIG_ENV_FAT_INTERFACE="mmc"
|
||||
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
|
||||
CONFIG_DM_KEYBOARD=y
|
||||
diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig
|
||||
index 810b60344f..4f1509f4ee 100644
|
||||
--- a/configs/rpi_3_defconfig
|
||||
+++ b/configs/rpi_3_defconfig
|
||||
@@ -14,6 +14,7 @@ CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_OF_EMBED=y
|
||||
+CONFIG_OF_BOARD=y
|
||||
CONFIG_ENV_FAT_INTERFACE="mmc"
|
||||
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
|
||||
CONFIG_DM_KEYBOARD=y
|
||||
--
|
||||
2.17.0
|
||||
|
118
sunxi-fix-eMMC-stability-issues-on-A64.patch
Normal file
118
sunxi-fix-eMMC-stability-issues-on-A64.patch
Normal file
@ -0,0 +1,118 @@
|
||||
From patchwork Sat Apr 28 21:16:27 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [U-Boot,1/2] sunxi-mmc: use new mode on A64
|
||||
X-Patchwork-Submitter: Vasily Khoruzhick <anarsoul@gmail.com>
|
||||
X-Patchwork-Id: 906216
|
||||
Message-Id: <20180428211628.13753-2-anarsoul@gmail.com>
|
||||
To: Jagan Teki <jagan@openedev.com>,
|
||||
Maxime Ripard <maxime.ripard@bootlin.com>,
|
||||
Albert Aribaud <albert.u.boot@aribaud.net>,
|
||||
Jaehoon Chung <jh80.chung@samsung.com>, u-boot@lists.denx.de
|
||||
Date: Sat, 28 Apr 2018 14:16:27 -0700
|
||||
From: Vasily Khoruzhick <anarsoul@gmail.com>
|
||||
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
||||
|
||||
That is necessary for using automatic calibration on A64 eMMC.
|
||||
|
||||
Signed-off-by: Vasily khoruzhick <anarsoul@gmail.com>
|
||||
---
|
||||
arch/arm/mach-sunxi/Kconfig | 1 +
|
||||
drivers/mmc/sunxi_mmc.c | 4 ++++
|
||||
2 files changed, 5 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
|
||||
index b868f0e350..774a39f580 100644
|
||||
--- a/arch/arm/mach-sunxi/Kconfig
|
||||
+++ b/arch/arm/mach-sunxi/Kconfig
|
||||
@@ -256,6 +256,7 @@ config MACH_SUN50I
|
||||
select SUNXI_DE2
|
||||
select SUNXI_GEN_SUN6I
|
||||
select SUNXI_HIGH_SRAM
|
||||
+ select MMC_SUNXI_HAS_NEW_MODE
|
||||
select SUPPORT_SPL
|
||||
select SUNXI_DRAM_DW
|
||||
select SUNXI_DRAM_DW_32BIT
|
||||
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
|
||||
index df6f32850e..06b0fd491c 100644
|
||||
--- a/drivers/mmc/sunxi_mmc.c
|
||||
+++ b/drivers/mmc/sunxi_mmc.c
|
||||
@@ -167,8 +167,12 @@ static int mmc_set_mod_clk(struct sunxi_mmc_priv *priv, unsigned int hz)
|
||||
|
||||
if (new_mode) {
|
||||
#ifdef CONFIG_MMC_SUNXI_HAS_NEW_MODE
|
||||
+#ifdef CONFIG_MACH_SUN50I
|
||||
+ val = 0;
|
||||
+#else
|
||||
val = CCM_MMC_CTRL_MODE_SEL_NEW;
|
||||
setbits_le32(&priv->reg->ntsr, SUNXI_MMC_NTSR_MODE_SEL_NEW);
|
||||
+#endif
|
||||
#endif
|
||||
} else {
|
||||
val = CCM_MMC_CTRL_OCLK_DLY(oclk_dly) |
|
||||
|
||||
From patchwork Sat Apr 28 21:16:28 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [U-Boot,2/2] mmc: sunxi: run calibration on A64
|
||||
X-Patchwork-Submitter: Vasily Khoruzhick <anarsoul@gmail.com>
|
||||
X-Patchwork-Id: 906217
|
||||
Message-Id: <20180428211628.13753-3-anarsoul@gmail.com>
|
||||
To: Jagan Teki <jagan@openedev.com>,
|
||||
Maxime Ripard <maxime.ripard@bootlin.com>,
|
||||
Albert Aribaud <albert.u.boot@aribaud.net>,
|
||||
Jaehoon Chung <jh80.chung@samsung.com>, u-boot@lists.denx.de
|
||||
Date: Sat, 28 Apr 2018 14:16:28 -0700
|
||||
From: Vasily Khoruzhick <anarsoul@gmail.com>
|
||||
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
||||
|
||||
Along with using new mode it fixes eMMC instability on Pinebook
|
||||
|
||||
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
|
||||
---
|
||||
arch/arm/include/asm/arch-sunxi/mmc.h | 6 +++++-
|
||||
drivers/mmc/sunxi_mmc.c | 6 ++++++
|
||||
2 files changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/include/asm/arch-sunxi/mmc.h b/arch/arm/include/asm/arch-sunxi/mmc.h
|
||||
index 69f737f3bf..8575b393e5 100644
|
||||
--- a/arch/arm/include/asm/arch-sunxi/mmc.h
|
||||
+++ b/arch/arm/include/asm/arch-sunxi/mmc.h
|
||||
@@ -47,7 +47,9 @@ struct sunxi_mmc {
|
||||
u32 cbda; /* 0x94 */
|
||||
u32 res2[26];
|
||||
#ifdef CONFIG_SUNXI_GEN_SUN6I
|
||||
- u32 res3[64];
|
||||
+ u32 res3[17];
|
||||
+ u32 samp_dl;
|
||||
+ u32 res4[46];
|
||||
#endif
|
||||
u32 fifo; /* 0x100 / 0x200 FIFO access address */
|
||||
};
|
||||
@@ -131,5 +133,7 @@ struct sunxi_mmc {
|
||||
#define SUNXI_MMC_COMMON_CLK_GATE (1 << 16)
|
||||
#define SUNXI_MMC_COMMON_RESET (1 << 18)
|
||||
|
||||
+#define SUNXI_MMC_CAL_DL_SW_EN (0x1 << 7)
|
||||
+
|
||||
struct mmc *sunxi_mmc_init(int sdc_no);
|
||||
#endif /* _SUNXI_MMC_H */
|
||||
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
|
||||
index 06b0fd491c..9e7c42c571 100644
|
||||
--- a/drivers/mmc/sunxi_mmc.c
|
||||
+++ b/drivers/mmc/sunxi_mmc.c
|
||||
@@ -227,6 +227,12 @@ static int mmc_config_clock(struct sunxi_mmc_priv *priv, struct mmc *mmc)
|
||||
rval &= ~SUNXI_MMC_CLK_DIVIDER_MASK;
|
||||
writel(rval, &priv->reg->clkcr);
|
||||
|
||||
+#ifdef CONFIG_MACH_SUN50I
|
||||
+ /* Run calibration on A64 */
|
||||
+ if (priv->mmc_no == 2)
|
||||
+ writel(SUNXI_MMC_CAL_DL_SW_EN, &priv->reg->samp_dl);
|
||||
+#endif
|
||||
+
|
||||
/* Re-enable Clock */
|
||||
rval |= SUNXI_MMC_CLK_ENABLE;
|
||||
writel(rval, &priv->reg->clkcr);
|
@ -1,128 +0,0 @@
|
||||
From patchwork Wed Mar 21 11:18:58 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Subject: [U-Boot] sunxi: improve throughput in the sunxi_mmc driver
|
||||
X-Patchwork-Submitter: Maxime Ripard <maxime.ripard@bootlin.com>
|
||||
X-Patchwork-Id: 888703
|
||||
X-Patchwork-Delegate: jagannadh.teki@gmail.com
|
||||
Message-Id: <20180321111858.16576-1-maxime.ripard@bootlin.com>
|
||||
To: Jaehoon Chung <jh80.chung@samsung.com>
|
||||
Cc: Mylene Josserand <mylene.josserand@bootlin.com>,
|
||||
Maxime Ripard <maxime.ripard@bootlin.com>, u-boot@lists.denx.de,
|
||||
Jagan Teki <jagan@openedev.com>
|
||||
Date: Wed, 21 Mar 2018 12:18:58 +0100
|
||||
From: Maxime Ripard <maxime.ripard@bootlin.com>
|
||||
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
||||
|
||||
From: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
|
||||
|
||||
Throughput tests have shown the sunxi_mmc driver to take over 10s to
|
||||
read 10MB from a fast eMMC device due to excessive delays in polling
|
||||
loops.
|
||||
|
||||
This commit restructures the main polling loops to use get_timer(...)
|
||||
to determine whether a (millisecond) timeout has expired. We choose
|
||||
not to use the wait_bit function, as we don't need interruptability
|
||||
with ctrl-c and have at least one case where two bits (one for an
|
||||
error condition and another one for completion) need to be read and
|
||||
using wait_bit would have not added to the clarity.
|
||||
|
||||
The observed speedup in testing on a A31 is greater than 10x (e.g. a
|
||||
10MB write decreases from 9.302s to 0.884s).
|
||||
|
||||
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
|
||||
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
|
||||
Tested-by: Mylène Josserand <mylene.josserand@bootlin.com>
|
||||
---
|
||||
drivers/mmc/sunxi_mmc.c | 27 ++++++++++++++++-----------
|
||||
1 file changed, 16 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
|
||||
index 4edb4be46c81..d36c1689e7b1 100644
|
||||
--- a/drivers/mmc/sunxi_mmc.c
|
||||
+++ b/drivers/mmc/sunxi_mmc.c
|
||||
@@ -187,15 +187,16 @@ static int mmc_update_clk(struct sunxi_mmc_priv *priv)
|
||||
{
|
||||
unsigned int cmd;
|
||||
unsigned timeout_msecs = 2000;
|
||||
+ unsigned long start = get_timer(0);
|
||||
|
||||
cmd = SUNXI_MMC_CMD_START |
|
||||
SUNXI_MMC_CMD_UPCLK_ONLY |
|
||||
SUNXI_MMC_CMD_WAIT_PRE_OVER;
|
||||
+
|
||||
writel(cmd, &priv->reg->cmd);
|
||||
while (readl(&priv->reg->cmd) & SUNXI_MMC_CMD_START) {
|
||||
- if (!timeout_msecs--)
|
||||
+ if (get_timer(start) > timeout_msecs)
|
||||
return -1;
|
||||
- udelay(1000);
|
||||
}
|
||||
|
||||
/* clock update sets various irq status bits, clear these */
|
||||
@@ -276,18 +277,21 @@ static int mmc_trans_data_by_cpu(struct sunxi_mmc_priv *priv, struct mmc *mmc,
|
||||
unsigned i;
|
||||
unsigned *buff = (unsigned int *)(reading ? data->dest : data->src);
|
||||
unsigned byte_cnt = data->blocksize * data->blocks;
|
||||
- unsigned timeout_usecs = (byte_cnt >> 8) * 1000;
|
||||
- if (timeout_usecs < 2000000)
|
||||
- timeout_usecs = 2000000;
|
||||
+ unsigned timeout_msecs = byte_cnt >> 8;
|
||||
+ unsigned long start;
|
||||
+
|
||||
+ if (timeout_msecs < 2000)
|
||||
+ timeout_msecs = 2000;
|
||||
|
||||
/* Always read / write data through the CPU */
|
||||
setbits_le32(&priv->reg->gctrl, SUNXI_MMC_GCTRL_ACCESS_BY_AHB);
|
||||
|
||||
+ start = get_timer(0);
|
||||
+
|
||||
for (i = 0; i < (byte_cnt >> 2); i++) {
|
||||
while (readl(&priv->reg->status) & status_bit) {
|
||||
- if (!timeout_usecs--)
|
||||
+ if (get_timer(start) > timeout_msecs)
|
||||
return -1;
|
||||
- udelay(1);
|
||||
}
|
||||
|
||||
if (reading)
|
||||
@@ -303,16 +307,16 @@ static int mmc_rint_wait(struct sunxi_mmc_priv *priv, struct mmc *mmc,
|
||||
uint timeout_msecs, uint done_bit, const char *what)
|
||||
{
|
||||
unsigned int status;
|
||||
+ unsigned long start = get_timer(0);
|
||||
|
||||
do {
|
||||
status = readl(&priv->reg->rint);
|
||||
- if (!timeout_msecs-- ||
|
||||
+ if ((get_timer(start) > timeout_msecs) ||
|
||||
(status & SUNXI_MMC_RINT_INTERRUPT_ERROR_BIT)) {
|
||||
debug("%s timeout %x\n", what,
|
||||
status & SUNXI_MMC_RINT_INTERRUPT_ERROR_BIT);
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
- udelay(1000);
|
||||
} while (!(status & done_bit));
|
||||
|
||||
return 0;
|
||||
@@ -404,15 +408,16 @@ static int sunxi_mmc_send_cmd_common(struct sunxi_mmc_priv *priv,
|
||||
}
|
||||
|
||||
if (cmd->resp_type & MMC_RSP_BUSY) {
|
||||
+ unsigned long start = get_timer(0);
|
||||
timeout_msecs = 2000;
|
||||
+
|
||||
do {
|
||||
status = readl(&priv->reg->status);
|
||||
- if (!timeout_msecs--) {
|
||||
+ if (get_timer(start) > timeout_msecs) {
|
||||
debug("busy timeout\n");
|
||||
error = -ETIMEDOUT;
|
||||
goto out;
|
||||
}
|
||||
- udelay(1000);
|
||||
} while (status & SUNXI_MMC_STATUS_CARD_DATA_BUSY);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Name: uboot-tools
|
||||
Version: 2018.03
|
||||
Release: 4%{?candidate:.%{candidate}}%{?dist}
|
||||
Release: 6%{?candidate:.%{candidate}}%{?dist}
|
||||
Summary: U-Boot utilities
|
||||
License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+
|
||||
URL: http://www.denx.de/wiki/U-Boot
|
||||
@ -20,24 +20,24 @@ Patch1: uefi-use-Fedora-specific-path-name.patch
|
||||
# general fixes
|
||||
Patch2: uefi-distro-load-FDT-from-any-partition-on-boot-device.patch
|
||||
Patch3: usb-kbd-fixes.patch
|
||||
Patch4: Add-fix-for-Pine64-gigabit-throughput-issues.patch
|
||||
Patch5: rk33xx-make_fit_atf-fix.patch
|
||||
Patch6: rk33xx-enable-make-itb.patch
|
||||
Patch7: net-Only-access-network-devices-after-init.patch
|
||||
Patch4: rk33xx-make_fit_atf-fix.patch
|
||||
Patch5: rk33xx-enable-make-itb.patch
|
||||
Patch6: net-Only-access-network-devices-after-init.patch
|
||||
Patch7: uefi-fixes.patch
|
||||
Patch8: uefi-efi_loader-Fix-GOP-32bpp-exposure.patch
|
||||
|
||||
# Board fixes and enablement
|
||||
Patch10: dragonboard-fixes.patch
|
||||
Patch11: BeagleBoard.org-PocketBeagle.patch
|
||||
Patch12: mx6cuboxi-add-support-for-detecting-Revision-1.5-SoM.patch
|
||||
Patch13: rpi-3-plus-support.patch
|
||||
Patch14: rpi-Allow-to-boot-without-serial.patch
|
||||
Patch15: rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch
|
||||
Patch14: rpi-Adjust-fdt_addr_r-to-a-sane-address.patch
|
||||
Patch15: dwc2-USB-controller-hangs-with-lan78xx.patch
|
||||
Patch16: mmc-use-core-clock-frequency-in-bcm2835-sdhost.patch
|
||||
Patch19: mmc-mv_sdhci-zero-out-sdhci_host-structure.patch
|
||||
Patch20: mvneta-support-setting-hardware-address.patch
|
||||
Patch21: sunxi-improve-throughput-in-the-sunxi_mmc-driver.patch
|
||||
|
||||
# Patch99: mvebu-enable-generic-distro-boot-config.patch
|
||||
Patch17: mmc-mv_sdhci-zero-out-sdhci_host-structure.patch
|
||||
Patch18: mvneta-support-setting-hardware-address.patch
|
||||
Patch19: sunxi-Add-fix-for-Pine64-gigabit-throughput-issues.patch
|
||||
Patch20: sunxi-fix-eMMC-stability-issues-on-A64.patch
|
||||
|
||||
BuildRequires: bc
|
||||
BuildRequires: dtc
|
||||
@ -296,6 +296,15 @@ cp -p board/warp7/README builds/docs/README.warp7
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Jun 19 2018 Peter Robinson <pbrobinson@fedoraproject.org> 2018.03-6
|
||||
- Patch to improve MMC on AllWinner A64 SoCs
|
||||
- Patch to fix RPi3B+ network errors (rhbz 1573261)
|
||||
- Fix incorrect colours in uEFI console in Linux
|
||||
|
||||
* Sun Apr 15 2018 Peter Robinson <pbrobinson@fedoraproject.org> 2018.03-5
|
||||
- Raspberry Pi fixes
|
||||
- Enable a few AllWinner Tablets
|
||||
|
||||
* Fri Apr 6 2018 Peter Robinson <pbrobinson@fedoraproject.org> 2018.03-4
|
||||
- Improvements for Raspberry Pi, AllWinner MMC perf, mvebu devices
|
||||
|
||||
|
37
uefi-efi_loader-Fix-GOP-32bpp-exposure.patch
Normal file
37
uefi-efi_loader-Fix-GOP-32bpp-exposure.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From patchwork Tue Jun 19 11:47:01 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [U-Boot] efi_loader: Fix GOP 32bpp exposure
|
||||
X-Patchwork-Submitter: Alexander Graf <agraf@suse.de>
|
||||
X-Patchwork-Id: 931555
|
||||
Message-Id: <20180619114701.87820-1-agraf@suse.de>
|
||||
To: u-boot@lists.denx.de
|
||||
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>, Fabian Vogt <fvogt@suse.com>
|
||||
Date: Tue, 19 Jun 2018 13:47:01 +0200
|
||||
From: Alexander Graf <agraf@suse.de>
|
||||
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
||||
|
||||
We store pixels as BGRA in memory, as can be seen from struct efi_gop_pixel.
|
||||
So we need to expose the same format to UEFI payloads to actually have them
|
||||
use the correct colors.
|
||||
|
||||
Reported-by: Fabian Vogt <fvogt@suse.com>
|
||||
Signed-off-by: Alexander Graf <agraf@suse.de>
|
||||
---
|
||||
lib/efi_loader/efi_gop.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c
|
||||
index 1afe8418e1..3a36bbcbfa 100644
|
||||
--- a/lib/efi_loader/efi_gop.c
|
||||
+++ b/lib/efi_loader/efi_gop.c
|
||||
@@ -472,7 +472,7 @@ efi_status_t efi_gop_register(void)
|
||||
gopobj->info.version = 0;
|
||||
gopobj->info.width = col;
|
||||
gopobj->info.height = row;
|
||||
- gopobj->info.pixel_format = EFI_GOT_RGBA8;
|
||||
+ gopobj->info.pixel_format = EFI_GOT_BGRA8;
|
||||
gopobj->info.pixels_per_scanline = col;
|
||||
|
||||
gopobj->bpix = bpix;
|
84
uefi-fixes.patch
Normal file
84
uefi-fixes.patch
Normal file
@ -0,0 +1,84 @@
|
||||
From patchwork Thu Mar 15 16:33:38 2018
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [U-Boot] efi_loader: Fix network DP with DM_ETH
|
||||
X-Patchwork-Submitter: Alexander Graf <agraf@suse.de>
|
||||
X-Patchwork-Id: 886355
|
||||
Message-Id: <20180315163338.77456-1-agraf@suse.de>
|
||||
To: u-boot@lists.denx.de
|
||||
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
||||
Date: Thu, 15 Mar 2018 17:33:38 +0100
|
||||
From: Alexander Graf <agraf@suse.de>
|
||||
List-Id: U-Boot discussion <u-boot.lists.denx.de>
|
||||
|
||||
When CONFIG_DM_ETH is set, we assemble the device path properly with a
|
||||
full device hierarchy. Our helper function dp_fill() even put the MAC
|
||||
node itself in it for us.
|
||||
|
||||
However, for non-DM compatibility we also have code in that added the
|
||||
MAC node manually. That code now runs on top of the existing MAC node:
|
||||
|
||||
Handle 0x3db2f6b0
|
||||
/HardwareVendor(e61d73b9-a384-4acc-aeab-82e828f3628b)[0: ]
|
||||
/USBClass(0,0,9,0,0)/USBClass(424,9514,9,0,2)/MacAddr(b8:27:eb:e1:81:47,1)
|
||||
/MacAddr(b8:27:eb:e1:81:47,57)/EndEntire
|
||||
|
||||
We obviously don't need the additional node and in fact, grub chokes on
|
||||
it and fails to match the DP against the ethernet device node. So this
|
||||
patch moves the additional MAC node into the non-DM code path:
|
||||
|
||||
Handle 0x3db3fde0
|
||||
/HardwareVendor(e61d73b9-a384-4acc-aeab-82e828f3628b)[0: ]
|
||||
/USBClass(0,0,9,0,0)/USBClass(424,9514,9,0,2)/MacAddr(b8:27:eb:e1:81:47,1)
|
||||
/EndEntire
|
||||
|
||||
While at it, we also mark the non-DM MAC node as ethernet.
|
||||
|
||||
Fixes: b66c60dde9d ("efi_loader: add device-path utils")
|
||||
Signed-off-by: Alexander Graf <agraf@suse.de>
|
||||
---
|
||||
lib/efi_loader/efi_device_path.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
|
||||
index 3c735e60d3..22627824f0 100644
|
||||
--- a/lib/efi_loader/efi_device_path.c
|
||||
+++ b/lib/efi_loader/efi_device_path.c
|
||||
@@ -749,7 +749,9 @@ struct efi_device_path *efi_dp_from_file(struct blk_desc *desc, int part,
|
||||
#ifdef CONFIG_CMD_NET
|
||||
struct efi_device_path *efi_dp_from_eth(void)
|
||||
{
|
||||
+#ifndef CONFIG_DM_ETH
|
||||
struct efi_device_path_mac_addr *ndp;
|
||||
+#endif
|
||||
void *buf, *start;
|
||||
unsigned dpsize = 0;
|
||||
|
||||
@@ -759,8 +761,8 @@ struct efi_device_path *efi_dp_from_eth(void)
|
||||
dpsize += dp_size(eth_get_dev());
|
||||
#else
|
||||
dpsize += sizeof(ROOT);
|
||||
-#endif
|
||||
dpsize += sizeof(*ndp);
|
||||
+#endif
|
||||
|
||||
start = buf = dp_alloc(dpsize + sizeof(END));
|
||||
if (!buf)
|
||||
@@ -771,14 +773,15 @@ struct efi_device_path *efi_dp_from_eth(void)
|
||||
#else
|
||||
memcpy(buf, &ROOT, sizeof(ROOT));
|
||||
buf += sizeof(ROOT);
|
||||
-#endif
|
||||
|
||||
ndp = buf;
|
||||
ndp->dp.type = DEVICE_PATH_TYPE_MESSAGING_DEVICE;
|
||||
ndp->dp.sub_type = DEVICE_PATH_SUB_TYPE_MSG_MAC_ADDR;
|
||||
ndp->dp.length = sizeof(*ndp);
|
||||
+ ndp->if_type = 1; /* Ethernet */
|
||||
memcpy(ndp->mac.addr, eth_get_ethaddr(), ARP_HLEN);
|
||||
buf = &ndp[1];
|
||||
+#endif
|
||||
|
||||
*((struct efi_device_path *)buf) = END;
|
||||
|
Loading…
Reference in New Issue
Block a user