* [PATCH 1/2] board: gateworks: venice: fix gsc_get_dev
@ 2021-03-08 21:52 Tim Harvey
2021-03-08 21:52 ` [PATCH 2/2] board: gateworks: venice: increase CONFIG_SYS_SPL_MALLOC_SIZE Tim Harvey
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Tim Harvey @ 2021-03-08 21:52 UTC (permalink / raw)
To: u-boot
use dm_i2c_probe instead of i2c_get_chip which appears to be more
reliable.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
board/gateworks/venice/gsc.c | 23 ++++++-----------------
1 file changed, 6 insertions(+), 17 deletions(-)
diff --git a/board/gateworks/venice/gsc.c b/board/gateworks/venice/gsc.c
index ad3f8d95d9..d2490e6063 100644
--- a/board/gateworks/venice/gsc.c
+++ b/board/gateworks/venice/gsc.c
@@ -125,29 +125,18 @@ enum {
static struct udevice *gsc_get_dev(int busno, int slave)
{
- struct udevice *dev;
+ static const char * const i2c[] = { "i2c at 30a20000", "i2c at 30a30000" };
+ struct udevice *dev, *bus;
int ret;
-#if (IS_ENABLED(CONFIG_SPL_BUILD))
- ret = i2c_get_chip_for_busnum(busno + 1, slave, 1, &dev);
- if (ret)
- return NULL;
-#else
- struct udevice *bus;
-
- busno--;
-
- ret = uclass_get_device_by_seq(UCLASS_I2C, busno, &bus);
+ ret = uclass_get_device_by_name(UCLASS_I2C, i2c[busno - 1], &bus);
if (ret) {
- printf("i2c%d: no bus %d\n", busno + 1, ret);
+ printf("GSC : failed I2C%d probe: %d\n", busno, ret);
return NULL;
}
- ret = i2c_get_chip(bus, slave, 1, &dev);
- if (ret) {
- printf("i2c%d at 0x%02x: no chip %d\n", busno + 1, slave, ret);
+ ret = dm_i2c_probe(bus, slave, 0, &dev);
+ if (ret)
return NULL;
- }
-#endif
return dev;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] board: gateworks: venice: increase CONFIG_SYS_SPL_MALLOC_SIZE
2021-03-08 21:52 [PATCH 1/2] board: gateworks: venice: fix gsc_get_dev Tim Harvey
@ 2021-03-08 21:52 ` Tim Harvey
2021-03-09 12:04 ` Fabio Estevam
2021-04-08 20:57 ` sbabic at denx.de
2021-03-09 12:04 ` [PATCH 1/2] board: gateworks: venice: fix gsc_get_dev Fabio Estevam
2021-04-08 20:58 ` sbabic at denx.de
2 siblings, 2 replies; 6+ messages in thread
From: Tim Harvey @ 2021-03-08 21:52 UTC (permalink / raw)
To: u-boot
commit 03f1f78a9b44 ("spl: fit: Prefer a malloc()'d buffer for loading images")'
changed the way buffer allocation worked for SPL to a more flexible
method.
For venice this caused breakage that is resolved by increasing the size
of CONFIG_SYS_SPL_MALLOC_SIZE as the current FIT slighly exceeds 512KiB.
Additionally remove the unnecessary comment on CONFIG_SPL_BSS_MAX_SIZE
and CONFIG_SYS_SPL_MALLOC_SIZE as the size is obvious from the define.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
include/configs/imx8mm_venice.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/configs/imx8mm_venice.h b/include/configs/imx8mm_venice.h
index a406e91c84..91669255e1 100644
--- a/include/configs/imx8mm_venice.h
+++ b/include/configs/imx8mm_venice.h
@@ -19,9 +19,9 @@
#ifdef CONFIG_SPL_BUILD
#define CONFIG_SPL_STACK 0x920000
#define CONFIG_SPL_BSS_START_ADDR 0x910000
-#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K /* 8 KB */
+#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K
#define CONFIG_SYS_SPL_MALLOC_START 0x42200000
-#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K /* 512 KB */
+#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_1M
/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
#define CONFIG_MALLOC_F_ADDR 0x930000
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 1/2] board: gateworks: venice: fix gsc_get_dev
2021-03-08 21:52 [PATCH 1/2] board: gateworks: venice: fix gsc_get_dev Tim Harvey
2021-03-08 21:52 ` [PATCH 2/2] board: gateworks: venice: increase CONFIG_SYS_SPL_MALLOC_SIZE Tim Harvey
@ 2021-03-09 12:04 ` Fabio Estevam
2021-04-08 20:58 ` sbabic at denx.de
2 siblings, 0 replies; 6+ messages in thread
From: Fabio Estevam @ 2021-03-09 12:04 UTC (permalink / raw)
To: u-boot
Hi Tim,
On Mon, Mar 8, 2021 at 6:52 PM Tim Harvey <tharvey@gateworks.com> wrote:
>
> use dm_i2c_probe instead of i2c_get_chip which appears to be more
> reliable.
>
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] board: gateworks: venice: increase CONFIG_SYS_SPL_MALLOC_SIZE
2021-03-08 21:52 ` [PATCH 2/2] board: gateworks: venice: increase CONFIG_SYS_SPL_MALLOC_SIZE Tim Harvey
@ 2021-03-09 12:04 ` Fabio Estevam
2021-04-08 20:57 ` sbabic at denx.de
1 sibling, 0 replies; 6+ messages in thread
From: Fabio Estevam @ 2021-03-09 12:04 UTC (permalink / raw)
To: u-boot
On Mon, Mar 8, 2021 at 6:52 PM Tim Harvey <tharvey@gateworks.com> wrote:
>
> commit 03f1f78a9b44 ("spl: fit: Prefer a malloc()'d buffer for loading images")'
> changed the way buffer allocation worked for SPL to a more flexible
> method.
>
> For venice this caused breakage that is resolved by increasing the size
> of CONFIG_SYS_SPL_MALLOC_SIZE as the current FIT slighly exceeds 512KiB.
>
> Additionally remove the unnecessary comment on CONFIG_SPL_BSS_MAX_SIZE
> and CONFIG_SYS_SPL_MALLOC_SIZE as the size is obvious from the define.
>
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] board: gateworks: venice: increase CONFIG_SYS_SPL_MALLOC_SIZE
2021-03-08 21:52 ` [PATCH 2/2] board: gateworks: venice: increase CONFIG_SYS_SPL_MALLOC_SIZE Tim Harvey
2021-03-09 12:04 ` Fabio Estevam
@ 2021-04-08 20:57 ` sbabic at denx.de
1 sibling, 0 replies; 6+ messages in thread
From: sbabic at denx.de @ 2021-04-08 20:57 UTC (permalink / raw)
To: u-boot
> commit 03f1f78a9b44 ("spl: fit: Prefer a malloc()'d buffer for loading images")'
> changed the way buffer allocation worked for SPL to a more flexible
> method.
> For venice this caused breakage that is resolved by increasing the size
> of CONFIG_SYS_SPL_MALLOC_SIZE as the current FIT slighly exceeds 512KiB.
> Additionally remove the unnecessary comment on CONFIG_SPL_BSS_MAX_SIZE
> and CONFIG_SYS_SPL_MALLOC_SIZE as the size is obvious from the define.
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> Reviewed-by: Fabio Estevam <festevam@gmail.com>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] board: gateworks: venice: fix gsc_get_dev
2021-03-08 21:52 [PATCH 1/2] board: gateworks: venice: fix gsc_get_dev Tim Harvey
2021-03-08 21:52 ` [PATCH 2/2] board: gateworks: venice: increase CONFIG_SYS_SPL_MALLOC_SIZE Tim Harvey
2021-03-09 12:04 ` [PATCH 1/2] board: gateworks: venice: fix gsc_get_dev Fabio Estevam
@ 2021-04-08 20:58 ` sbabic at denx.de
2 siblings, 0 replies; 6+ messages in thread
From: sbabic at denx.de @ 2021-04-08 20:58 UTC (permalink / raw)
To: u-boot
> use dm_i2c_probe instead of i2c_get_chip which appears to be more
> reliable.
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> Reviewed-by: Fabio Estevam <festevam@gmail.com>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-04-08 20:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-08 21:52 [PATCH 1/2] board: gateworks: venice: fix gsc_get_dev Tim Harvey
2021-03-08 21:52 ` [PATCH 2/2] board: gateworks: venice: increase CONFIG_SYS_SPL_MALLOC_SIZE Tim Harvey
2021-03-09 12:04 ` Fabio Estevam
2021-04-08 20:57 ` sbabic at denx.de
2021-03-09 12:04 ` [PATCH 1/2] board: gateworks: venice: fix gsc_get_dev Fabio Estevam
2021-04-08 20:58 ` sbabic at denx.de
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.