mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: ccxmx53: properly guard initcall for multiimage
@ 2015-12-08 17:33 Lucas Stach
  2015-12-08 17:33 ` [PATCH 2/2] MCI: init device_node for MCI mainarea cdev Lucas Stach
  2015-12-10  7:52 ` [PATCH 1/2] ARM: ccxmx53: properly guard initcall for multiimage Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Lucas Stach @ 2015-12-08 17:33 UTC (permalink / raw)
  To: barebox

Make sure to not run this board specific initcall on any
other board.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 arch/arm/boards/ccxmx53/board.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boards/ccxmx53/board.c b/arch/arm/boards/ccxmx53/board.c
index 0031aed772e4..9d81cd80a373 100644
--- a/arch/arm/boards/ccxmx53/board.c
+++ b/arch/arm/boards/ccxmx53/board.c
@@ -85,6 +85,9 @@ static int ccwmx53_devices_init(void)
 	u8 hwid[6] = {0};
 	char manloc = 0;
 
+	if (!of_machine_is_compatible("digi,imx53-ccxmx53"))
+		return 0;
+
 	if ((imx_iim_read(1, 9, hwid, sizeof(hwid)) != sizeof(hwid)) ||
 	    (hwid[0] < 0x02) ||
 	    (hwid[0] >= ARRAY_SIZE(ccwmx53_ids))) {
-- 
2.6.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] MCI: init device_node for MCI mainarea cdev
  2015-12-08 17:33 [PATCH 1/2] ARM: ccxmx53: properly guard initcall for multiimage Lucas Stach
@ 2015-12-08 17:33 ` Lucas Stach
  2015-12-10  7:52 ` [PATCH 1/2] ARM: ccxmx53: properly guard initcall for multiimage Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Lucas Stach @ 2015-12-08 17:33 UTC (permalink / raw)
  To: barebox

This fixes a regression, where boards specifying the environment
path using the form device-path = &phandle, "partname:part" would
be unable to find their env.

This is due to of_find_path() switching to cdev_by_device_node()
internally, which expects the device_node member of the main
area cdev to be initialized.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/mci/mci-core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 4e6b83be5f43..24f57f9da9a4 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -437,6 +437,9 @@ static void mci_part_add(struct mci *mci, uint64_t size,
 	part->area_type = area_type;
 	part->part_cfg = part_cfg;
 
+	if (area_type == MMC_BLK_DATA_AREA_MAIN)
+		part->blk.cdev.device_node = mci->host->hw_dev->device_node;
+
 	mci->nr_parts++;
 }
 
-- 
2.6.2


_______________________________________________
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 1/2] ARM: ccxmx53: properly guard initcall for multiimage
  2015-12-08 17:33 [PATCH 1/2] ARM: ccxmx53: properly guard initcall for multiimage Lucas Stach
  2015-12-08 17:33 ` [PATCH 2/2] MCI: init device_node for MCI mainarea cdev Lucas Stach
@ 2015-12-10  7:52 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2015-12-10  7:52 UTC (permalink / raw)
  To: Lucas Stach; +Cc: barebox

On Tue, Dec 08, 2015 at 06:33:28PM +0100, Lucas Stach wrote:
> Make sure to not run this board specific initcall on any
> other board.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  arch/arm/boards/ccxmx53/board.c | 3 +++
>  1 file changed, 3 insertions(+)

Applied, thanks

Sascha


-- 
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:[~2015-12-10  7:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-08 17:33 [PATCH 1/2] ARM: ccxmx53: properly guard initcall for multiimage Lucas Stach
2015-12-08 17:33 ` [PATCH 2/2] MCI: init device_node for MCI mainarea cdev Lucas Stach
2015-12-10  7:52 ` [PATCH 1/2] ARM: ccxmx53: properly guard initcall for multiimage Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox