* [PATCH] spi: i.MX: Fix wrong bus nubering with devicetree
@ 2018-12-13 8:01 Alexander Shiyan
2018-12-13 8:01 ` [PATCH] ARM: clps711x: Increase boot space Alexander Shiyan
2018-12-14 14:08 ` [PATCH] spi: i.MX: Fix wrong bus nubering with devicetree Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Alexander Shiyan @ 2018-12-13 8:01 UTC (permalink / raw)
To: barebox
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
diff --git a/drivers/spi/imx_spi.c b/drivers/spi/imx_spi.c
index 10621d00c..46e8955ab 100644
--- a/drivers/spi/imx_spi.c
+++ b/drivers/spi/imx_spi.c
@@ -605,17 +605,20 @@ static int imx_spi_probe(struct device_d *dev)
master = &imx->master;
master->dev = dev;
- master->bus_num = dev->id;
master->setup = imx_spi_setup;
master->transfer = imx_spi_transfer;
if (pdata) {
+ master->bus_num = dev->id;
master->num_chipselect = pdata->num_chipselect;
imx->cs_array = pdata->chipselect;
- } else {
- if (IS_ENABLED(CONFIG_OFDEVICE))
- imx_spi_dt_probe(imx);
+ } else if (IS_ENABLED(CONFIG_OFDEVICE)) {
+ ret = of_alias_get_id(dev->device_node, "spi");
+ if (ret < 0)
+ goto err_free;
+ master->bus_num = ret;
+ imx_spi_dt_probe(imx);
}
imx->clk = clk_get(dev, NULL);
--
2.13.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] ARM: clps711x: Increase boot space
2018-12-13 8:01 [PATCH] spi: i.MX: Fix wrong bus nubering with devicetree Alexander Shiyan
@ 2018-12-13 8:01 ` Alexander Shiyan
2018-12-14 14:08 ` [PATCH] spi: i.MX: Fix wrong bus nubering with devicetree Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Alexander Shiyan @ 2018-12-13 8:01 UTC (permalink / raw)
To: barebox
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
diff --git a/arch/arm/boards/clep7212/clep7212.c b/arch/arm/boards/clep7212/clep7212.c
index 584ecdcab..641fa1502 100644
--- a/arch/arm/boards/clep7212/clep7212.c
+++ b/arch/arm/boards/clep7212/clep7212.c
@@ -37,7 +37,7 @@ static int clps711x_devices_init(void)
add_cfi_flash_device(DEVICE_ID_DYNAMIC, (unsigned long)cfi_io, SZ_32M,
IORESOURCE_MEM);
- devfs_add_partition("nor0", 0x00000, SZ_256K, DEVFS_PARTITION_FIXED,
+ devfs_add_partition("nor0", 0x00000, SZ_512K, DEVFS_PARTITION_FIXED,
"self0");
devfs_add_partition("nor0", SZ_256K, SZ_256K, DEVFS_PARTITION_FIXED,
"env0");
diff --git a/arch/arm/boards/clep7212/defaultenv-clep7212/init/mtdparts-nor b/arch/arm/boards/clep7212/defaultenv-clep7212/init/mtdparts-nor
index 39777f95f..e2e518ca6 100644
--- a/arch/arm/boards/clep7212/defaultenv-clep7212/init/mtdparts-nor
+++ b/arch/arm/boards/clep7212/defaultenv-clep7212/init/mtdparts-nor
@@ -1,6 +1,6 @@
#!/bin/sh
-mtdparts="256k(boot),256k(env),3584k(kernel),-(root)"
+mtdparts="512k(boot),256k(env),3584k(kernel),-(root)"
kernelname="physmap-flash.0"
mtdparts-add -d nor0 -k ${kernelname} -p ${mtdparts}
diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig
index 0853ce2e6..c00514e86 100644
--- a/arch/arm/mach-clps711x/Kconfig
+++ b/arch/arm/mach-clps711x/Kconfig
@@ -24,7 +24,7 @@ endmenu
config ARCH_TEXT_BASE
hex
- default 0xc0780000 if MACH_CLEP7212
+ default 0xc0740000 if MACH_CLEP7212
config BAREBOX_MAX_IMAGE_SIZE
hex
--
2.13.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] spi: i.MX: Fix wrong bus nubering with devicetree
2018-12-13 8:01 [PATCH] spi: i.MX: Fix wrong bus nubering with devicetree Alexander Shiyan
2018-12-13 8:01 ` [PATCH] ARM: clps711x: Increase boot space Alexander Shiyan
@ 2018-12-14 14:08 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2018-12-14 14:08 UTC (permalink / raw)
To: Alexander Shiyan; +Cc: barebox
On Thu, Dec 13, 2018 at 11:01:43AM +0300, Alexander Shiyan wrote:
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
>
Applied, thanks
Sascha
> diff --git a/drivers/spi/imx_spi.c b/drivers/spi/imx_spi.c
> index 10621d00c..46e8955ab 100644
> --- a/drivers/spi/imx_spi.c
> +++ b/drivers/spi/imx_spi.c
> @@ -605,17 +605,20 @@ static int imx_spi_probe(struct device_d *dev)
>
> master = &imx->master;
> master->dev = dev;
> - master->bus_num = dev->id;
>
> master->setup = imx_spi_setup;
> master->transfer = imx_spi_transfer;
>
> if (pdata) {
> + master->bus_num = dev->id;
> master->num_chipselect = pdata->num_chipselect;
> imx->cs_array = pdata->chipselect;
> - } else {
> - if (IS_ENABLED(CONFIG_OFDEVICE))
> - imx_spi_dt_probe(imx);
> + } else if (IS_ENABLED(CONFIG_OFDEVICE)) {
> + ret = of_alias_get_id(dev->device_node, "spi");
> + if (ret < 0)
> + goto err_free;
> + master->bus_num = ret;
> + imx_spi_dt_probe(imx);
> }
>
> imx->clk = clk_get(dev, NULL);
> --
> 2.13.0
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-14 14:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-13 8:01 [PATCH] spi: i.MX: Fix wrong bus nubering with devicetree Alexander Shiyan
2018-12-13 8:01 ` [PATCH] ARM: clps711x: Increase boot space Alexander Shiyan
2018-12-14 14:08 ` [PATCH] spi: i.MX: Fix wrong bus nubering with devicetree Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox