Skip to contentSkip to conversation

Merge conflict on Tegra SPI between u-boot/master and u-boot-arm/master

U-Boot Albert ARIBAUD 2 participants 4 messages Mar 28, 2013

lore
Share & tools
lore
#0 lore raw

Hello all,

While preparing for an ARM PR, specifically a merge between commit 417c55803118eb8e350d5ab8ba6583fb39f4e2e3 (current u-boot/master ToT) and commit d53e340edf65ff253d3a7b06ebe60501045892e3 (current Tot for u-boot-arm/master), I hit the following merge conflicts:

CONFLICT (content): Merge conflict in lib/fdtdec.c CONFLICT (content): Merge conflict in include/fdtdec.h CONFLICT (content): Merge conflict in drivers/spi/tegra20_sflash.c

While the first two, related to FDT, are simple (colliding additions to the same enum from both branches) and can be manually resolved, the third one, drivers/spi/tegra20_sflash.c, is not, and can not, at least, not by me, as I am not a specialist on Tegra SPI.

Tom (Warren), can you advise on how to best solve this?

Amicalement,

Signature · 1 line
Albert.
#1 lore raw

Albert,

Quoted 11 lines · Albert ARIBAUD

Hello all,

While preparing for an ARM PR, specifically a merge between commit 417c55803118eb8e350d5ab8ba6583fb39f4e2e3 (current u-boot/master ToT) and commit d53e340edf65ff253d3a7b06ebe60501045892e3 (current Tot for u-boot-arm/master), I hit the following merge conflicts:

CONFLICT (content): Merge conflict in lib/fdtdec.c CONFLICT (content): Merge conflict in include/fdtdec.h CONFLICT (content): Merge conflict in drivers/spi/tegra20_sflash.c

Quoted 7 lines

While the first two, related to FDT, are simple (colliding additions to the same enum from both branches) and can be manually resolved, the third one, drivers/spi/tegra20_sflash.c, is not, and can not, at least, not by me, as I am not a specialist on Tegra SPI.

Tom (Warren), can you advise on how to best solve this?

Let me take a look - IIRC, Simon's use of spi_alloc_slave() was the only change to tegra20_sflash.c (replaces the normal malloc() in tegra20_spi_setup_slave()).

Here's a diff of the only change to tegra20_sflash.c (merging Allen's Tegra SPI changes and Simon's SPI changes):

--- drivers/spi/tegra20_sflash.c 2013-03-22 08:43:02.373219315 -0700 +++ /home/tom/denx/u-boot-arm/drivers/spi/tegra20_sflash.c 2013-03-28 08:04:04.899860607 -0700
@@ -127,7 +127,7 @@
return NULL;
}

- spi = spi_alloc_slave(struct tegra_spi_slave, bus, cs);
+ spi = malloc(sizeof(struct tegra_spi_slave)); if (!spi) {
printf("SPI error: malloc of SPI structure failed\n"); return NULL;

Let me know if that's not enough for you to resolve this,

Tom

Quoted 5 lines

Amicalement,
--
Albert.

#2 lore raw

Albert,

Quoted 44 lines · Tom Warren

Albert,

On Thu, Mar 28, 2013 at 6:38 AM, Albert ARIBAUD <[email protected]

Quoted 13 lines

wrote:

Hello all,

While preparing for an ARM PR, specifically a merge between commit 417c55803118eb8e350d5ab8ba6583fb39f4e2e3 (current u-boot/master ToT) and commit d53e340edf65ff253d3a7b06ebe60501045892e3 (current Tot for u-boot-arm/master), I hit the following merge conflicts:

CONFLICT (content): Merge conflict in lib/fdtdec.c CONFLICT (content): Merge conflict in include/fdtdec.h CONFLICT (content): Merge conflict in drivers/spi/tegra20_sflash.c

Quoted 7 lines

While the first two, related to FDT, are simple (colliding additions to the same enum from both branches) and can be manually resolved, the third one, drivers/spi/tegra20_sflash.c, is not, and can not, at least, not by me, as I am not a specialist on Tegra SPI.

Tom (Warren), can you advise on how to best solve this?

Let me take a look - IIRC, Simon's use of spi_alloc_slave() was the only change to tegra20_sflash.c (replaces the normal malloc() in tegra20_spi_setup_slave()).

Here's a diff of the only change to tegra20_sflash.c (merging Allen's Tegra SPI changes and Simon's SPI changes):

home/tom/denx/u-boot-arm/drivers/spi/tegra20_sflash.c 2013-03-28 renamed from spi/tegra20_sflash.c 2013-03-22 08:43:02.373219315 -0700 +0 -0

08:04:04.899860607 -0700

home/tom/denx/u-boot-arm/drivers/spi/tegra20_sflash.c 2013-03-28 renamed from spi/tegra20_sflash.c 2013-03-22 08:43:02.373219315 -0700 +1 -1
@@ -127,7 +127,7 @@
  return NULL;
  }
 
- spi = spi_alloc_slave(struct tegra_spi_slave, bus, cs);
+ spi = malloc(sizeof(struct tegra_spi_slave));
  if (!spi) {
  printf("SPI error: malloc of SPI structure failed\n");
  return NULL;
Quoted 4 lines

Let me know if that's not enough for you to resolve this,

Tom

Just confirmed - in tegra20_sflash.c, remove the <<<<< HEAD section (#ifdef CONFIG_OF_CONTROL + 2 lines), and keep the "tegra: spi remove non fdt support" section (spi->slave.bus = bus + 4 lines).

Tom

Quoted 7 lines
Quoted 5 lines

Amicalement,
--
Albert.

#3 lore raw

Hi Tom,

Quoted 3 lines

Just confirmed - in tegra20_sflash.c, remove the <<<<< HEAD section (#ifdef CONFIG_OF_CONTROL + 2 lines), and keep the "tegra: spi remove non fdt support" section (spi->slave.bus = bus + 4 lines).

Ok, thanks a lot for confirming. I'll do the merge (and tests) accordingly on u-boot-arm and then send out my PR to The Other Tom.

Amicalement,

Signature · 1 line
Albert.