Message ID | 1541601809-16950-7-git-send-email-frieder.schrempf@kontron.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | None | expand |
On Wed, Nov 7, 2018 at 6:44 AM Frieder Schrempf <frieder.schrempf@kontron.de> wrote: > > From: Frieder Schrempf <frieder.schrempf@exceet.de> > > The new driver at spi/spi-fsl-qspi.c replaces the old SPI NOR driver > at mtd/fsl-quadspi.c. Switch to the new driver in the defconfigs. > > Signed-off-by: Frieder Schrempf <frieder.schrempf@exceet.de> Hi Frieder, This patch is part of a series that I didn't see the rest of, but in general we prefer to merge these through arm-soc even if the driver goes in through another tree. The way we'd prefer to handle it is that once the driver lands, we'll take the config option change to turn it on. To avoid our branches to break until both sides have landed, it might be a good idea to keep both drivers on for a short while (one release). So, I'm not going to ack this since we avoid taking defconfig changes through driver trees (these two defconfigs tend to churn a lot and we don't want to create merge conflicts where we don't have to), but we'll be happy to pick it up when the time comes. Thanks, -Olof
Hi Olof, On 07.11.18 17:20, Olof Johansson wrote: > On Wed, Nov 7, 2018 at 6:44 AM Frieder Schrempf > <frieder.schrempf@kontron.de> wrote: >> >> From: Frieder Schrempf <frieder.schrempf@exceet.de> >> >> The new driver at spi/spi-fsl-qspi.c replaces the old SPI NOR driver >> at mtd/fsl-quadspi.c. Switch to the new driver in the defconfigs. >> >> Signed-off-by: Frieder Schrempf <frieder.schrempf@exceet.de> > > Hi Frieder, > > This patch is part of a series that I didn't see the rest of, but in > general we prefer to merge these through arm-soc even if the driver > goes in through another tree. The way we'd prefer to handle it is that > once the driver lands, we'll take the config option change to turn it > on. To avoid our branches to break until both sides have landed, it > might be a good idea to keep both drivers on for a short while (one > release). > > So, I'm not going to ack this since we avoid taking defconfig changes > through driver trees (these two defconfigs tend to churn a lot and we > don't want to create merge conflicts where we don't have to), but > we'll be happy to pick it up when the time comes. Ok, thank you for explaining the common practice. I will drop the config changes for the next version and send it separately when the time is ready. Both the old driver and the new one use the same compatible strings for probing. Wouldn't that cause problems if both drivers are enabled for a while, or am I missing something? Thanks, Frieder > > > Thanks, > > -Olof >
On Wed, Nov 7, 2018 at 8:36 AM Schrempf Frieder <frieder.schrempf@kontron.de> wrote: > > Hi Olof, > > On 07.11.18 17:20, Olof Johansson wrote: > > On Wed, Nov 7, 2018 at 6:44 AM Frieder Schrempf > > <frieder.schrempf@kontron.de> wrote: > >> > >> From: Frieder Schrempf <frieder.schrempf@exceet.de> > >> > >> The new driver at spi/spi-fsl-qspi.c replaces the old SPI NOR driver > >> at mtd/fsl-quadspi.c. Switch to the new driver in the defconfigs. > >> > >> Signed-off-by: Frieder Schrempf <frieder.schrempf@exceet.de> > > > > Hi Frieder, > > > > This patch is part of a series that I didn't see the rest of, but in > > general we prefer to merge these through arm-soc even if the driver > > goes in through another tree. The way we'd prefer to handle it is that > > once the driver lands, we'll take the config option change to turn it > > on. To avoid our branches to break until both sides have landed, it > > might be a good idea to keep both drivers on for a short while (one > > release). > > > > So, I'm not going to ack this since we avoid taking defconfig changes > > through driver trees (these two defconfigs tend to churn a lot and we > > don't want to create merge conflicts where we don't have to), but > > we'll be happy to pick it up when the time comes. > > Ok, thank you for explaining the common practice. I will drop the config > changes for the next version and send it separately when the time is ready. > > Both the old driver and the new one use the same compatible strings for > probing. Wouldn't that cause problems if both drivers are enabled for a > while, or am I missing something? Only one of them would be allowed to bind to a device, but it might not be predictable which one does (especially in the case of modules). So, it's far from ideal, but breaking the platform is possibly worse. It might just be a good idea to merge the driver and not turn it on until it's in for that case (i.e. we take the config change between -rc1 and -rc2). -Olof
On Wed, 7 Nov 2018 16:36:13 +0000 Schrempf Frieder <frieder.schrempf@kontron.De> wrote: > Hi Olof, > > On 07.11.18 17:20, Olof Johansson wrote: > > On Wed, Nov 7, 2018 at 6:44 AM Frieder Schrempf > > <frieder.schrempf@kontron.de> wrote: > >> > >> From: Frieder Schrempf <frieder.schrempf@exceet.de> > >> > >> The new driver at spi/spi-fsl-qspi.c replaces the old SPI NOR driver > >> at mtd/fsl-quadspi.c. Switch to the new driver in the defconfigs. > >> > >> Signed-off-by: Frieder Schrempf <frieder.schrempf@exceet.de> > > > > Hi Frieder, > > > > This patch is part of a series that I didn't see the rest of, but in > > general we prefer to merge these through arm-soc even if the driver > > goes in through another tree. The way we'd prefer to handle it is that > > once the driver lands, we'll take the config option change to turn it > > on. To avoid our branches to break until both sides have landed, it > > might be a good idea to keep both drivers on for a short while (one > > release). > > > > So, I'm not going to ack this since we avoid taking defconfig changes > > through driver trees (these two defconfigs tend to churn a lot and we > > don't want to create merge conflicts where we don't have to), but > > we'll be happy to pick it up when the time comes. > > Ok, thank you for explaining the common practice. I will drop the config > changes for the next version and send it separately when the time is ready. > > Both the old driver and the new one use the same compatible strings for > probing. Wouldn't that cause problems if both drivers are enabled for a > while, or am I missing something? Or maybe we should not introduce a new Kconfig option and just reuse the old one. It probably requires re-ordering patches a bit (patch 1 should be moved after patch 5). Then you have 2 choices: 1/ merge patch 1 and 6 so that the new driver effectively replaces the old one but uses the same Kconfig option 2/ remove the ability to compile the old driver when the new one is introduced: remove the line from drivers/mtd/spi-nor Makefile and move the Kconfig entry from drivers/mtd/spi-nor/Kconfig to drivers/spi/Kconfig. And remove the old code in a separate patch I'm fine either way, but option #2 will probably make the patch introducing the new driver bigger and hurt readability.
On 08.11.18 09:34, Boris Brezillon wrote: > On Wed, 7 Nov 2018 16:36:13 +0000 > Schrempf Frieder <frieder.schrempf@kontron.De> wrote: > >> Hi Olof, >> >> On 07.11.18 17:20, Olof Johansson wrote: >>> On Wed, Nov 7, 2018 at 6:44 AM Frieder Schrempf >>> <frieder.schrempf@kontron.de> wrote: >>>> >>>> From: Frieder Schrempf <frieder.schrempf@exceet.de> >>>> >>>> The new driver at spi/spi-fsl-qspi.c replaces the old SPI NOR driver >>>> at mtd/fsl-quadspi.c. Switch to the new driver in the defconfigs. >>>> >>>> Signed-off-by: Frieder Schrempf <frieder.schrempf@exceet.de> >>> >>> Hi Frieder, >>> >>> This patch is part of a series that I didn't see the rest of, but in >>> general we prefer to merge these through arm-soc even if the driver >>> goes in through another tree. The way we'd prefer to handle it is that >>> once the driver lands, we'll take the config option change to turn it >>> on. To avoid our branches to break until both sides have landed, it >>> might be a good idea to keep both drivers on for a short while (one >>> release). >>> >>> So, I'm not going to ack this since we avoid taking defconfig changes >>> through driver trees (these two defconfigs tend to churn a lot and we >>> don't want to create merge conflicts where we don't have to), but >>> we'll be happy to pick it up when the time comes. >> >> Ok, thank you for explaining the common practice. I will drop the config >> changes for the next version and send it separately when the time is ready. >> >> Both the old driver and the new one use the same compatible strings for >> probing. Wouldn't that cause problems if both drivers are enabled for a >> while, or am I missing something? > > Or maybe we should not introduce a new Kconfig option and just reuse > the old one. It probably requires re-ordering patches a bit (patch 1 > should be moved after patch 5). Then you have 2 choices: > > 1/ merge patch 1 and 6 so that the new driver effectively replaces the > old one but uses the same Kconfig option > 2/ remove the ability to compile the old driver when the new one is > introduced: remove the line from drivers/mtd/spi-nor Makefile and > move the Kconfig entry from drivers/mtd/spi-nor/Kconfig to > drivers/spi/Kconfig. And remove the old code in a separate patch > > I'm fine either way, but option #2 will probably make the patch > introducing the new driver bigger and hurt readability. I think having both drivers in the tree for a while wouldn't be so bad. So if any compatibility issues come up with the new driver, people can still use the old one. Therefore I think I will drop the patches that change the defconfig and remove the old driver code and keep the different Kconfig options. And maybe add an exclusive dependency in Kconfig, so both drivers can not be enabled at the same time. Does this make sense?
On Mon, 12 Nov 2018 10:46:45 +0000 Schrempf Frieder <frieder.schrempf@kontron.De> wrote: > On 08.11.18 09:34, Boris Brezillon wrote: > > On Wed, 7 Nov 2018 16:36:13 +0000 > > Schrempf Frieder <frieder.schrempf@kontron.De> wrote: > > > >> Hi Olof, > >> > >> On 07.11.18 17:20, Olof Johansson wrote: > >>> On Wed, Nov 7, 2018 at 6:44 AM Frieder Schrempf > >>> <frieder.schrempf@kontron.de> wrote: > >>>> > >>>> From: Frieder Schrempf <frieder.schrempf@exceet.de> > >>>> > >>>> The new driver at spi/spi-fsl-qspi.c replaces the old SPI NOR driver > >>>> at mtd/fsl-quadspi.c. Switch to the new driver in the defconfigs. > >>>> > >>>> Signed-off-by: Frieder Schrempf <frieder.schrempf@exceet.de> > >>> > >>> Hi Frieder, > >>> > >>> This patch is part of a series that I didn't see the rest of, but in > >>> general we prefer to merge these through arm-soc even if the driver > >>> goes in through another tree. The way we'd prefer to handle it is that > >>> once the driver lands, we'll take the config option change to turn it > >>> on. To avoid our branches to break until both sides have landed, it > >>> might be a good idea to keep both drivers on for a short while (one > >>> release). > >>> > >>> So, I'm not going to ack this since we avoid taking defconfig changes > >>> through driver trees (these two defconfigs tend to churn a lot and we > >>> don't want to create merge conflicts where we don't have to), but > >>> we'll be happy to pick it up when the time comes. > >> > >> Ok, thank you for explaining the common practice. I will drop the config > >> changes for the next version and send it separately when the time is ready. > >> > >> Both the old driver and the new one use the same compatible strings for > >> probing. Wouldn't that cause problems if both drivers are enabled for a > >> while, or am I missing something? > > > > Or maybe we should not introduce a new Kconfig option and just reuse > > the old one. It probably requires re-ordering patches a bit (patch 1 > > should be moved after patch 5). Then you have 2 choices: > > > > 1/ merge patch 1 and 6 so that the new driver effectively replaces the > > old one but uses the same Kconfig option > > 2/ remove the ability to compile the old driver when the new one is > > introduced: remove the line from drivers/mtd/spi-nor Makefile and > > move the Kconfig entry from drivers/mtd/spi-nor/Kconfig to > > drivers/spi/Kconfig. And remove the old code in a separate patch > > > > I'm fine either way, but option #2 will probably make the patch > > introducing the new driver bigger and hurt readability. > > I think having both drivers in the tree for a while wouldn't be so bad. > So if any compatibility issues come up with the new driver, people can > still use the old one. Except that's not what happens in practice. Believe me, I tried this approach several times, and people keep using the old driver until they're forced to switch to the new one. So you actually don't address the problem, you just delay it a bit, and you'll have to fix regressions anyway. > > Therefore I think I will drop the patches that change the defconfig and > remove the old driver code and keep the different Kconfig options. And > maybe add an exclusive dependency in Kconfig, so both drivers can not be > enabled at the same time. > > Does this make sense? I'd really prefer to have the removal of the old driver in the same release the new driver is introduced but if that's not possible, let's have a clear plan, like "introduce new driver in release X, remove the old one in release X+1".
On 12.11.18 11:56, Boris Brezillon wrote: > On Mon, 12 Nov 2018 10:46:45 +0000 > Schrempf Frieder <frieder.schrempf@kontron.De> wrote: > >> On 08.11.18 09:34, Boris Brezillon wrote: >>> On Wed, 7 Nov 2018 16:36:13 +0000 >>> Schrempf Frieder <frieder.schrempf@kontron.De> wrote: >>> >>>> Hi Olof, >>>> >>>> On 07.11.18 17:20, Olof Johansson wrote: >>>>> On Wed, Nov 7, 2018 at 6:44 AM Frieder Schrempf >>>>> <frieder.schrempf@kontron.de> wrote: >>>>>> >>>>>> From: Frieder Schrempf <frieder.schrempf@exceet.de> >>>>>> >>>>>> The new driver at spi/spi-fsl-qspi.c replaces the old SPI NOR driver >>>>>> at mtd/fsl-quadspi.c. Switch to the new driver in the defconfigs. >>>>>> >>>>>> Signed-off-by: Frieder Schrempf <frieder.schrempf@exceet.de> >>>>> >>>>> Hi Frieder, >>>>> >>>>> This patch is part of a series that I didn't see the rest of, but in >>>>> general we prefer to merge these through arm-soc even if the driver >>>>> goes in through another tree. The way we'd prefer to handle it is that >>>>> once the driver lands, we'll take the config option change to turn it >>>>> on. To avoid our branches to break until both sides have landed, it >>>>> might be a good idea to keep both drivers on for a short while (one >>>>> release). >>>>> >>>>> So, I'm not going to ack this since we avoid taking defconfig changes >>>>> through driver trees (these two defconfigs tend to churn a lot and we >>>>> don't want to create merge conflicts where we don't have to), but >>>>> we'll be happy to pick it up when the time comes. >>>> >>>> Ok, thank you for explaining the common practice. I will drop the config >>>> changes for the next version and send it separately when the time is ready. >>>> >>>> Both the old driver and the new one use the same compatible strings for >>>> probing. Wouldn't that cause problems if both drivers are enabled for a >>>> while, or am I missing something? >>> >>> Or maybe we should not introduce a new Kconfig option and just reuse >>> the old one. It probably requires re-ordering patches a bit (patch 1 >>> should be moved after patch 5). Then you have 2 choices: >>> >>> 1/ merge patch 1 and 6 so that the new driver effectively replaces the >>> old one but uses the same Kconfig option >>> 2/ remove the ability to compile the old driver when the new one is >>> introduced: remove the line from drivers/mtd/spi-nor Makefile and >>> move the Kconfig entry from drivers/mtd/spi-nor/Kconfig to >>> drivers/spi/Kconfig. And remove the old code in a separate patch >>> >>> I'm fine either way, but option #2 will probably make the patch >>> introducing the new driver bigger and hurt readability. >> >> I think having both drivers in the tree for a while wouldn't be so bad. >> So if any compatibility issues come up with the new driver, people can >> still use the old one. > > Except that's not what happens in practice. Believe me, I tried this > approach several times, and people keep using the old driver until > they're forced to switch to the new one. So you actually don't address > the problem, you just delay it a bit, and you'll have to fix > regressions anyway. Ok, I see. >> Therefore I think I will drop the patches that change the defconfig and >> remove the old driver code and keep the different Kconfig options. And >> maybe add an exclusive dependency in Kconfig, so both drivers can not be >> enabled at the same time. >> >> Does this make sense? > > I'd really prefer to have the removal of the old driver in the same > release the new driver is introduced but if that's not possible, let's > have a clear plan, like "introduce new driver in release X, remove the > old one in release X+1". We can do it as you suggested. I will think about whether to use option #1 or #2. With #1 we will have the removal of the old driver and adding the new driver in one single patch. With #2 we will have the disabling of the old driver via Makefile in the same patch thats adding the new driver.
diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index 1ad5736..1741d87 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig @@ -113,7 +113,6 @@ CONFIG_MTD_NAND_GPMI_NAND=y CONFIG_MTD_NAND_VF610_NFC=y CONFIG_MTD_NAND_MXC=y CONFIG_MTD_SPI_NOR=y -CONFIG_SPI_FSL_QUADSPI=y CONFIG_MTD_UBI=y CONFIG_MTD_UBI_FASTMAP=y CONFIG_MTD_UBI_BLOCK=y @@ -204,6 +203,7 @@ CONFIG_I2C_ALGOPCA=m CONFIG_I2C_GPIO=y CONFIG_I2C_IMX=y CONFIG_SPI=y +CONFIG_SPI_FSL_QSPI=y CONFIG_SPI_GPIO=y CONFIG_SPI_IMX=y CONFIG_SPI_FSL_DSPI=y diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 1c76168..faddf29 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -193,7 +193,6 @@ CONFIG_MTD_NAND_BRCMNAND=y CONFIG_MTD_NAND_VF610_NFC=y CONFIG_MTD_NAND_DAVINCI=y CONFIG_MTD_SPI_NOR=y -CONFIG_SPI_FSL_QUADSPI=m CONFIG_MTD_UBI=y CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_RAM=y @@ -383,6 +382,7 @@ CONFIG_SPI_BCM2835=y CONFIG_SPI_BCM2835AUX=y CONFIG_SPI_CADENCE=y CONFIG_SPI_DAVINCI=y +CONFIG_SPI_FSL_QSPI=m CONFIG_SPI_GPIO=m CONFIG_SPI_FSL_DSPI=m CONFIG_SPI_OMAP24XX=y