2019-01-11 03:13:42

by George Hilliard

[permalink] [raw]
Subject: [PATCH v2 1/2] Move ralink-gdma to its own directory

From: George Hilliard <[email protected]>

This is in preparation to allow it and the mt7621-dma drivers to be
built separately. They are completely independent pieces of software,
and the Kconfig specifies very different requirements.

Cc: [email protected]
Cc: [email protected]
Cc: Neil Brown <[email protected]>
Signed-off-by: George Hilliard <[email protected]>
---
drivers/staging/Kconfig | 2 ++
drivers/staging/Makefile | 1 +
drivers/staging/mt7621-dma/Kconfig | 6 ------
drivers/staging/mt7621-dma/Makefile | 1 -
drivers/staging/ralink-gdma/Kconfig | 6 ++++++
drivers/staging/ralink-gdma/Makefile | 3 +++
drivers/staging/{mt7621-dma => ralink-gdma}/ralink-gdma.c | 0
7 files changed, 12 insertions(+), 7 deletions(-)
create mode 100644 drivers/staging/ralink-gdma/Kconfig
create mode 100644 drivers/staging/ralink-gdma/Makefile
rename drivers/staging/{mt7621-dma => ralink-gdma}/ralink-gdma.c (100%)

diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index e4f608815c05..b4cfde38e856 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -110,6 +110,8 @@ source "drivers/staging/mt7621-spi/Kconfig"

source "drivers/staging/mt7621-dma/Kconfig"

+source "drivers/staging/ralink-gdma/Kconfig"
+
source "drivers/staging/mt7621-mmc/Kconfig"

source "drivers/staging/mt7621-eth/Kconfig"
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index 5868631e8f1b..e095f427177c 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -45,6 +45,7 @@ obj-$(CONFIG_SOC_MT7621) += mt7621-pci/
obj-$(CONFIG_SOC_MT7621) += mt7621-pinctrl/
obj-$(CONFIG_SOC_MT7621) += mt7621-spi/
obj-$(CONFIG_SOC_MT7621) += mt7621-dma/
+obj-$(CONFIG_SOC_MT7621) += ralink-gdma/
obj-$(CONFIG_SOC_MT7621) += mt7621-mmc/
obj-$(CONFIG_SOC_MT7621) += mt7621-eth/
obj-$(CONFIG_SOC_MT7621) += mt7621-dts/
diff --git a/drivers/staging/mt7621-dma/Kconfig b/drivers/staging/mt7621-dma/Kconfig
index 2423c40099d1..b6e48a682c44 100644
--- a/drivers/staging/mt7621-dma/Kconfig
+++ b/drivers/staging/mt7621-dma/Kconfig
@@ -1,9 +1,3 @@
-config DMA_RALINK
- tristate "RALINK DMA support"
- depends on RALINK && !SOC_RT288X
- select DMA_ENGINE
- select DMA_VIRTUAL_CHANNELS
-
config MTK_HSDMA
tristate "MTK HSDMA support"
depends on RALINK && SOC_MT7621
diff --git a/drivers/staging/mt7621-dma/Makefile b/drivers/staging/mt7621-dma/Makefile
index d3152d45cf45..c9e3e1619ab0 100644
--- a/drivers/staging/mt7621-dma/Makefile
+++ b/drivers/staging/mt7621-dma/Makefile
@@ -1,4 +1,3 @@
-obj-$(CONFIG_DMA_RALINK) += ralink-gdma.o
obj-$(CONFIG_MTK_HSDMA) += mtk-hsdma.o

ccflags-y += -I$(srctree)/drivers/dma
diff --git a/drivers/staging/ralink-gdma/Kconfig b/drivers/staging/ralink-gdma/Kconfig
new file mode 100644
index 000000000000..a12b2c672d48
--- /dev/null
+++ b/drivers/staging/ralink-gdma/Kconfig
@@ -0,0 +1,6 @@
+config DMA_RALINK
+ tristate "RALINK DMA support"
+ depends on RALINK && !SOC_RT288X
+ select DMA_ENGINE
+ select DMA_VIRTUAL_CHANNELS
+
diff --git a/drivers/staging/ralink-gdma/Makefile b/drivers/staging/ralink-gdma/Makefile
new file mode 100644
index 000000000000..5d917e0729bb
--- /dev/null
+++ b/drivers/staging/ralink-gdma/Makefile
@@ -0,0 +1,3 @@
+obj-$(CONFIG_DMA_RALINK) += ralink-gdma.o
+
+ccflags-y += -I$(srctree)/drivers/dma
diff --git a/drivers/staging/mt7621-dma/ralink-gdma.c b/drivers/staging/ralink-gdma/ralink-gdma.c
similarity index 100%
rename from drivers/staging/mt7621-dma/ralink-gdma.c
rename to drivers/staging/ralink-gdma/ralink-gdma.c
--
2.20.1



2019-01-11 01:01:38

by George Hilliard

[permalink] [raw]
Subject: [PATCH v2 2/2] Mediatek staging: Use individual config flags in Makefile

From: George Hilliard <[email protected]>

These drivers are useful on other MT76xx SoCs, which have compatible
peripherals. The drivers are selectable in Kconfig, but they were
quietly excluded from the build because the SOC_MT7621 chip was not
selected. So, make the main staging Makefile use the same flags as
everything else for these drivers.

mt7621-dma and mt7621-dts are left alone because they truly do require
that SoC.

I have personally confirmed that the mt7621-spi driver works on the
MT7688, which was what prompted this change.

Cc: [email protected]
Cc: [email protected]
Cc: NeilBrown <[email protected]>
Signed-off-by: George Hilliard <[email protected]>
---
drivers/staging/Makefile | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index e095f427177c..4b78ea2c7848 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -42,12 +42,12 @@ obj-$(CONFIG_BCM2835_VCHIQ) += vc04_services/
obj-$(CONFIG_DRM_VBOXVIDEO) += vboxvideo/
obj-$(CONFIG_PI433) += pi433/
obj-$(CONFIG_SOC_MT7621) += mt7621-pci/
-obj-$(CONFIG_SOC_MT7621) += mt7621-pinctrl/
-obj-$(CONFIG_SOC_MT7621) += mt7621-spi/
+obj-$(CONFIG_PINCTRL_RT2880) += mt7621-pinctrl/
+obj-$(CONFIG_SPI_MT7621) += mt7621-spi/
obj-$(CONFIG_SOC_MT7621) += mt7621-dma/
-obj-$(CONFIG_SOC_MT7621) += ralink-gdma/
-obj-$(CONFIG_SOC_MT7621) += mt7621-mmc/
-obj-$(CONFIG_SOC_MT7621) += mt7621-eth/
+obj-$(CONFIG_DMA_RALINK) += ralink-gdma/
+obj-$(CONFIG_MTK_MMC) += mt7621-mmc/
+obj-$(CONFIG_NET_MEDIATEK_SOC_STAGING) += mt7621-eth/
obj-$(CONFIG_SOC_MT7621) += mt7621-dts/
obj-$(CONFIG_STAGING_GASKET_FRAMEWORK) += gasket/
obj-$(CONFIG_XIL_AXIS_FIFO) += axis-fifo/
--
2.20.1


2019-01-11 01:23:15

by NeilBrown

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] Move ralink-gdma to its own directory

On Thu, Jan 10 2019, [email protected] wrote:

> From: George Hilliard <[email protected]>
>
> This is in preparation to allow it and the mt7621-dma drivers to be
> built separately. They are completely independent pieces of software,
> and the Kconfig specifies very different requirements.
>
> Cc: [email protected]
> Cc: [email protected]
> Cc: Neil Brown <[email protected]>
> Signed-off-by: George Hilliard <[email protected]>

Hi,
thanks for taking an interest in these drivers.
I original submitted this code because I though I needed it for my
mt7621 hardware, but I've subsequently realized that neither of these
dma drivers are used in this hardware.
Consequently I cannot test any changes you make.
But maybe you can - which would be excellent!

So this is just letting you and Greg know that despite my stated
interest, I cannot actually review or test this.

Thanks,
NeilBrown


> ---
> drivers/staging/Kconfig | 2 ++
> drivers/staging/Makefile | 1 +
> drivers/staging/mt7621-dma/Kconfig | 6 ------
> drivers/staging/mt7621-dma/Makefile | 1 -
> drivers/staging/ralink-gdma/Kconfig | 6 ++++++
> drivers/staging/ralink-gdma/Makefile | 3 +++
> drivers/staging/{mt7621-dma => ralink-gdma}/ralink-gdma.c | 0
> 7 files changed, 12 insertions(+), 7 deletions(-)
> create mode 100644 drivers/staging/ralink-gdma/Kconfig
> create mode 100644 drivers/staging/ralink-gdma/Makefile
> rename drivers/staging/{mt7621-dma => ralink-gdma}/ralink-gdma.c (100%)
>
> diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
> index e4f608815c05..b4cfde38e856 100644
> --- a/drivers/staging/Kconfig
> +++ b/drivers/staging/Kconfig
> @@ -110,6 +110,8 @@ source "drivers/staging/mt7621-spi/Kconfig"
>
> source "drivers/staging/mt7621-dma/Kconfig"
>
> +source "drivers/staging/ralink-gdma/Kconfig"
> +
> source "drivers/staging/mt7621-mmc/Kconfig"
>
> source "drivers/staging/mt7621-eth/Kconfig"
> diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
> index 5868631e8f1b..e095f427177c 100644
> --- a/drivers/staging/Makefile
> +++ b/drivers/staging/Makefile
> @@ -45,6 +45,7 @@ obj-$(CONFIG_SOC_MT7621) += mt7621-pci/
> obj-$(CONFIG_SOC_MT7621) += mt7621-pinctrl/
> obj-$(CONFIG_SOC_MT7621) += mt7621-spi/
> obj-$(CONFIG_SOC_MT7621) += mt7621-dma/
> +obj-$(CONFIG_SOC_MT7621) += ralink-gdma/
> obj-$(CONFIG_SOC_MT7621) += mt7621-mmc/
> obj-$(CONFIG_SOC_MT7621) += mt7621-eth/
> obj-$(CONFIG_SOC_MT7621) += mt7621-dts/
> diff --git a/drivers/staging/mt7621-dma/Kconfig b/drivers/staging/mt7621-dma/Kconfig
> index 2423c40099d1..b6e48a682c44 100644
> --- a/drivers/staging/mt7621-dma/Kconfig
> +++ b/drivers/staging/mt7621-dma/Kconfig
> @@ -1,9 +1,3 @@
> -config DMA_RALINK
> - tristate "RALINK DMA support"
> - depends on RALINK && !SOC_RT288X
> - select DMA_ENGINE
> - select DMA_VIRTUAL_CHANNELS
> -
> config MTK_HSDMA
> tristate "MTK HSDMA support"
> depends on RALINK && SOC_MT7621
> diff --git a/drivers/staging/mt7621-dma/Makefile b/drivers/staging/mt7621-dma/Makefile
> index d3152d45cf45..c9e3e1619ab0 100644
> --- a/drivers/staging/mt7621-dma/Makefile
> +++ b/drivers/staging/mt7621-dma/Makefile
> @@ -1,4 +1,3 @@
> -obj-$(CONFIG_DMA_RALINK) += ralink-gdma.o
> obj-$(CONFIG_MTK_HSDMA) += mtk-hsdma.o
>
> ccflags-y += -I$(srctree)/drivers/dma
> diff --git a/drivers/staging/ralink-gdma/Kconfig b/drivers/staging/ralink-gdma/Kconfig
> new file mode 100644
> index 000000000000..a12b2c672d48
> --- /dev/null
> +++ b/drivers/staging/ralink-gdma/Kconfig
> @@ -0,0 +1,6 @@
> +config DMA_RALINK
> + tristate "RALINK DMA support"
> + depends on RALINK && !SOC_RT288X
> + select DMA_ENGINE
> + select DMA_VIRTUAL_CHANNELS
> +
> diff --git a/drivers/staging/ralink-gdma/Makefile b/drivers/staging/ralink-gdma/Makefile
> new file mode 100644
> index 000000000000..5d917e0729bb
> --- /dev/null
> +++ b/drivers/staging/ralink-gdma/Makefile
> @@ -0,0 +1,3 @@
> +obj-$(CONFIG_DMA_RALINK) += ralink-gdma.o
> +
> +ccflags-y += -I$(srctree)/drivers/dma
> diff --git a/drivers/staging/mt7621-dma/ralink-gdma.c b/drivers/staging/ralink-gdma/ralink-gdma.c
> similarity index 100%
> rename from drivers/staging/mt7621-dma/ralink-gdma.c
> rename to drivers/staging/ralink-gdma/ralink-gdma.c
> --
> 2.20.1


Attachments:
signature.asc (847.00 B)

2019-01-11 05:09:07

by George Hilliard

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] Move ralink-gdma to its own directory

On Thu, Jan 10, 2019, 6:21 PM NeilBrown <[email protected] wrote:
>
> On Thu, Jan 10 2019, [email protected] wrote:
>
> > From: George Hilliard <[email protected]>
> >
> > This is in preparation to allow it and the mt7621-dma drivers to be
> > built separately. They are completely independent pieces of software,
> > and the Kconfig specifies very different requirements.
> >
> > Cc: [email protected]
> > Cc: [email protected]
> > Cc: Neil Brown <[email protected]>
> > Signed-off-by: George Hilliard <[email protected]>
>
> Hi,
> thanks for taking an interest in these drivers.
> I original submitted this code because I though I needed it for my
> mt7621 hardware, but I've subsequently realized that neither of these
> dma drivers are used in this hardware.
> Consequently I cannot test any changes you make.
> But maybe you can - which would be excellent!
>
> So this is just letting you and Greg know that despite my stated
> interest, I cannot actually review or test this.
>
> Thanks,
> NeilBrown
>
>

Thanks for the heads up. Honestly I am not sure to what extent I can
test code changes either, at least with the DMA driver. I'm working
with the MT7688, and official docs for it and its cousin the MT7628
are pretty sparse, so I'm currently not even certain that the ralink
gdma driver works for my SoC.

Onion lists these drivers in their OpenWRT device trees' compatible
strings, so they're related. The SPI driver works out of the box at
least. The MMC driver wants to work but needs debugging. All the
drivers need to be better documented. etc. I hope I can improve them,
and I'll make sure I test any actual kernel code I change!

George

2019-01-15 17:52:22

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] staging: Mediatek: Use individual config flags in Makefile

On Thu, Jan 10, 2019 at 05:43:37PM -0700, [email protected] wrote:
> From: George Hilliard <[email protected]>
>
> These drivers are useful on other MT76xx SoCs, which have compatible
> peripherals. The drivers are selectable in Kconfig, but they were
> quietly excluded from the build because the SOC_MT7621 chip was not
> selected. So, make the main staging Makefile use the same flags as
> everything else for these drivers.
>
> mt7621-dma and mt7621-dts are left alone because they truly do require
> that SoC.
>
> I have personally confirmed that the mt7621-spi driver works on the
> MT7688, which was what prompted this change.
>
> Cc: [email protected]
> Cc: [email protected]
> Cc: NeilBrown <[email protected]>
> Signed-off-by: George Hilliard <[email protected]>
> ---
> drivers/staging/Makefile | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
> index e095f427177c..4b78ea2c7848 100644
> --- a/drivers/staging/Makefile
> +++ b/drivers/staging/Makefile
> @@ -42,12 +42,12 @@ obj-$(CONFIG_BCM2835_VCHIQ) += vc04_services/
> obj-$(CONFIG_DRM_VBOXVIDEO) += vboxvideo/
> obj-$(CONFIG_PI433) += pi433/
> obj-$(CONFIG_SOC_MT7621) += mt7621-pci/
> -obj-$(CONFIG_SOC_MT7621) += mt7621-pinctrl/
> -obj-$(CONFIG_SOC_MT7621) += mt7621-spi/
> +obj-$(CONFIG_PINCTRL_RT2880) += mt7621-pinctrl/
> +obj-$(CONFIG_SPI_MT7621) += mt7621-spi/
> obj-$(CONFIG_SOC_MT7621) += mt7621-dma/
> -obj-$(CONFIG_SOC_MT7621) += ralink-gdma/
> -obj-$(CONFIG_SOC_MT7621) += mt7621-mmc/
> -obj-$(CONFIG_SOC_MT7621) += mt7621-eth/
> +obj-$(CONFIG_DMA_RALINK) += ralink-gdma/
> +obj-$(CONFIG_MTK_MMC) += mt7621-mmc/
> +obj-$(CONFIG_NET_MEDIATEK_SOC_STAGING) += mt7621-eth/
> obj-$(CONFIG_SOC_MT7621) += mt7621-dts/
> obj-$(CONFIG_STAGING_GASKET_FRAMEWORK) += gasket/
> obj-$(CONFIG_XIL_AXIS_FIFO) += axis-fifo/

This patch doesn't apply to my tree at all, can you rebase and resend?

thanks,

greg k-h

2019-01-16 02:42:05

by George Hilliard

[permalink] [raw]
Subject: [PATCH v3] staging: Mediatek: Use individual config flags in Makefile

These drivers can be useful on other MT76xx SoCs, which have compatible
peripherals. The drivers were selectable in Kconfig, but they were
quietly excluded from the build because the SOC_MT7621 chip was not
selected. So, make the Makefiles use the same flags as Kconfig for
these drivers.

mt7621-dma and mt7621-dts are left alone because they truly do require
that SoC.

I have personally confirmed that the mt7621-spi driver works on the
MT7688, which was what prompted this change.

Cc: [email protected]
Cc: [email protected]
Cc: NeilBrown <[email protected]>
Cc: [email protected]
Signed-off-by: George Hilliard <[email protected]>
---
drivers/staging/Makefile | 14 +++++++-------
drivers/staging/mt7621-pci-phy/Makefile | 2 +-
drivers/staging/mt7621-pci/Makefile | 2 +-
3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index 4d563ed0bc79..cc5530cc996b 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -41,14 +41,14 @@ obj-$(CONFIG_GREYBUS) += greybus/
obj-$(CONFIG_BCM2835_VCHIQ) += vc04_services/
obj-$(CONFIG_DRM_VBOXVIDEO) += vboxvideo/
obj-$(CONFIG_PI433) += pi433/
-obj-$(CONFIG_SOC_MT7621) += mt7621-pci/
-obj-$(CONFIG_SOC_MT7621) += mt7621-pci-phy/
-obj-$(CONFIG_SOC_MT7621) += mt7621-pinctrl/
-obj-$(CONFIG_SOC_MT7621) += mt7621-spi/
+obj-$(CONFIG_PCI_MT7621) += mt7621-pci/
+obj-$(CONFIG_PCI_MT7621_PHY) += mt7621-pci-phy/
+obj-$(CONFIG_PINCTRL_RT2880) += mt7621-pinctrl/
+obj-$(CONFIG_SPI_MT7621) += mt7621-spi/
obj-$(CONFIG_SOC_MT7621) += mt7621-dma/
-obj-$(CONFIG_SOC_MT7621) += ralink-gdma/
-obj-$(CONFIG_SOC_MT7621) += mt7621-mmc/
-obj-$(CONFIG_SOC_MT7621) += mt7621-eth/
+obj-$(CONFIG_DMA_RALINK) += ralink-gdma/
+obj-$(CONFIG_MTK_MMC) += mt7621-mmc/
+obj-$(CONFIG_NET_MEDIATEK_SOC_STAGING) += mt7621-eth/
obj-$(CONFIG_SOC_MT7621) += mt7621-dts/
obj-$(CONFIG_STAGING_GASKET_FRAMEWORK) += gasket/
obj-$(CONFIG_XIL_AXIS_FIFO) += axis-fifo/
diff --git a/drivers/staging/mt7621-pci-phy/Makefile b/drivers/staging/mt7621-pci-phy/Makefile
index 2b82ccfc28c6..a970056f05c1 100644
--- a/drivers/staging/mt7621-pci-phy/Makefile
+++ b/drivers/staging/mt7621-pci-phy/Makefile
@@ -1 +1 @@
-obj-$(CONFIG_SOC_MT7621) += pci-mt7621-phy.o
+obj-$(CONFIG_PCI_MT7621_PHY) += pci-mt7621-phy.o
diff --git a/drivers/staging/mt7621-pci/Makefile b/drivers/staging/mt7621-pci/Makefile
index 607b84bedcc3..d4655a726b61 100644
--- a/drivers/staging/mt7621-pci/Makefile
+++ b/drivers/staging/mt7621-pci/Makefile
@@ -1 +1 @@
-obj-$(CONFIG_SOC_MT7621) += pci-mt7621.o
+obj-$(CONFIG_PCI_MT7621) += pci-mt7621.o
--
2.20.1


2019-01-16 02:53:10

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v3] staging: Mediatek: Use individual config flags in Makefile

On Tue, Jan 15, 2019 at 10:02:21AM -0700, George Hilliard wrote:
> These drivers can be useful on other MT76xx SoCs, which have compatible
> peripherals. The drivers were selectable in Kconfig, but they were
> quietly excluded from the build because the SOC_MT7621 chip was not
> selected. So, make the Makefiles use the same flags as Kconfig for
> these drivers.
>
> mt7621-dma and mt7621-dts are left alone because they truly do require
> that SoC.
>
> I have personally confirmed that the mt7621-spi driver works on the
> MT7688, which was what prompted this change.
>
> Cc: [email protected]
> Cc: [email protected]
> Cc: NeilBrown <[email protected]>
> Cc: [email protected]
> Signed-off-by: George Hilliard <[email protected]>
> ---
> drivers/staging/Makefile | 14 +++++++-------
> drivers/staging/mt7621-pci-phy/Makefile | 2 +-
> drivers/staging/mt7621-pci/Makefile | 2 +-
> 3 files changed, 9 insertions(+), 9 deletions(-)

What changed from v2 and v1? That always goes below the --- line.

Please fix that up and resend v4.

thanks,

greg k-h

2019-01-16 02:56:04

by George Hilliard

[permalink] [raw]
Subject: [PATCH v4] staging: Mediatek: Use individual config flags in Makefile

These drivers can be useful on other MT76xx SoCs, which have compatible
peripherals. The drivers were selectable in Kconfig, but they were
quietly excluded from the build because the SOC_MT7621 chip was not
selected. So, make the Makefiles use the same flags as Kconfig for
these drivers.

mt7621-dma and mt7621-dts are left alone because they truly do require
that SoC.

I have personally confirmed that the mt7621-spi driver works on the
MT7688, which was what prompted this change.

Cc: [email protected]
Cc: [email protected]
Cc: NeilBrown <[email protected]>
Cc: [email protected]
Signed-off-by: George Hilliard <[email protected]>
---
Changes in v2..v4:
- Also use individual flags for mt7621-pci and the new mt7621-pci-phy
- Slightly revise commit message

drivers/staging/Makefile | 14 +++++++-------
drivers/staging/mt7621-pci-phy/Makefile | 2 +-
drivers/staging/mt7621-pci/Makefile | 2 +-
3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index 4d563ed0bc79..cc5530cc996b 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -41,14 +41,14 @@ obj-$(CONFIG_GREYBUS) += greybus/
obj-$(CONFIG_BCM2835_VCHIQ) += vc04_services/
obj-$(CONFIG_DRM_VBOXVIDEO) += vboxvideo/
obj-$(CONFIG_PI433) += pi433/
-obj-$(CONFIG_SOC_MT7621) += mt7621-pci/
-obj-$(CONFIG_SOC_MT7621) += mt7621-pci-phy/
-obj-$(CONFIG_SOC_MT7621) += mt7621-pinctrl/
-obj-$(CONFIG_SOC_MT7621) += mt7621-spi/
+obj-$(CONFIG_PCI_MT7621) += mt7621-pci/
+obj-$(CONFIG_PCI_MT7621_PHY) += mt7621-pci-phy/
+obj-$(CONFIG_PINCTRL_RT2880) += mt7621-pinctrl/
+obj-$(CONFIG_SPI_MT7621) += mt7621-spi/
obj-$(CONFIG_SOC_MT7621) += mt7621-dma/
-obj-$(CONFIG_SOC_MT7621) += ralink-gdma/
-obj-$(CONFIG_SOC_MT7621) += mt7621-mmc/
-obj-$(CONFIG_SOC_MT7621) += mt7621-eth/
+obj-$(CONFIG_DMA_RALINK) += ralink-gdma/
+obj-$(CONFIG_MTK_MMC) += mt7621-mmc/
+obj-$(CONFIG_NET_MEDIATEK_SOC_STAGING) += mt7621-eth/
obj-$(CONFIG_SOC_MT7621) += mt7621-dts/
obj-$(CONFIG_STAGING_GASKET_FRAMEWORK) += gasket/
obj-$(CONFIG_XIL_AXIS_FIFO) += axis-fifo/
diff --git a/drivers/staging/mt7621-pci-phy/Makefile b/drivers/staging/mt7621-pci-phy/Makefile
index 2b82ccfc28c6..a970056f05c1 100644
--- a/drivers/staging/mt7621-pci-phy/Makefile
+++ b/drivers/staging/mt7621-pci-phy/Makefile
@@ -1 +1 @@
-obj-$(CONFIG_SOC_MT7621) += pci-mt7621-phy.o
+obj-$(CONFIG_PCI_MT7621_PHY) += pci-mt7621-phy.o
diff --git a/drivers/staging/mt7621-pci/Makefile b/drivers/staging/mt7621-pci/Makefile
index 607b84bedcc3..d4655a726b61 100644
--- a/drivers/staging/mt7621-pci/Makefile
+++ b/drivers/staging/mt7621-pci/Makefile
@@ -1 +1 @@
-obj-$(CONFIG_SOC_MT7621) += pci-mt7621.o
+obj-$(CONFIG_PCI_MT7621) += pci-mt7621.o
--
2.20.1


2019-01-16 05:07:46

by George Hilliard

[permalink] [raw]
Subject: Re: [PATCH v3] staging: Mediatek: Use individual config flags in Makefile

On Tue, Jan 15, 2019 at 10:20 AM Greg Kroah-Hartman
<[email protected]> wrote:
> What changed from v2 and v1? That always goes below the --- line.
>
> Please fix that up and resend v4.
>
Sent. Didn't know to do that - first time contributor here. Sorry
about the churn and thanks for your patience!

Cheers,
George

2019-01-16 05:10:46

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v4] staging: Mediatek: Use individual config flags in Makefile

On Tue, Jan 15, 2019 at 10:29:18AM -0700, George Hilliard wrote:
> These drivers can be useful on other MT76xx SoCs, which have compatible
> peripherals. The drivers were selectable in Kconfig, but they were
> quietly excluded from the build because the SOC_MT7621 chip was not
> selected. So, make the Makefiles use the same flags as Kconfig for
> these drivers.
>
> mt7621-dma and mt7621-dts are left alone because they truly do require
> that SoC.
>
> I have personally confirmed that the mt7621-spi driver works on the
> MT7688, which was what prompted this change.
>
> Cc: [email protected]
> Cc: [email protected]
> Cc: NeilBrown <[email protected]>
> Cc: [email protected]
> Signed-off-by: George Hilliard <[email protected]>
> ---
> Changes in v2..v4:
> - Also use individual flags for mt7621-pci and the new mt7621-pci-phy
> - Slightly revise commit message

You also rebased this patch, right?

Anyway, applying this patch, I get the following build error:

CC [M] drivers/staging/mt7621-mmc/sd.o
CC [M] drivers/staging/mt7621-mmc/dbg.o
drivers/staging/mt7621-mmc/sd.c:48:10: fatal error: asm/mach-ralink/ralink_regs.h: No such file or directory
#include <asm/mach-ralink/ralink_regs.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:277: drivers/staging/mt7621-mmc/sd.o] Error 1
make[3]: *** Waiting for unfinished jobs....
drivers/staging/mt7621-mmc/dbg.c: In function ‘msdc_debug_proc_write’:
drivers/staging/mt7621-mmc/dbg.c:237:12: warning: unused variable ‘size’ [-Wunused-variable]
int mode, size;
^~~~
drivers/staging/mt7621-mmc/dbg.c:237:6: warning: unused variable ‘mode’ [-Wunused-variable]
int mode, size;
^~~~
make[2]: *** [scripts/Makefile.build:492: drivers/staging/mt7621-mmc] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [scripts/Makefile.build:492: drivers/staging] Error 2
make[1]: *** Waiting for unfinished jobs....

So I can't take this patch as is, sorry.

Please fix.

thanks,

greg k-h

2019-01-16 16:27:21

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH v4] staging: Mediatek: Use individual config flags in Makefile

Hi George,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]
[cannot apply to v5.0-rc2 next-20190115]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/George-Hilliard/staging-Mediatek-Use-individual-config-flags-in-Makefile/20190116-084915
config: x86_64-randconfig-e0-201902 (attached as .config)
compiler: gcc-8 (Debian 8.2.0-14) 8.2.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All errors (new ones prefixed by >>):

In file included from drivers/staging/mt7621-mmc/dbg.c:51:
drivers/staging/mt7621-mmc/mt6575_sd.h: In function 'sdr_set_bits':
drivers/staging/mt7621-mmc/mt6575_sd.h:459:12: error: implicit declaration of function 'readl'; did you mean 'd_real'? [-Werror=implicit-function-declaration]
u32 val = readl(reg);
^~~~~
d_real
>> drivers/staging/mt7621-mmc/mt6575_sd.h:462:2: error: implicit declaration of function 'writel'; did you mean 'wrmsrl'? [-Werror=implicit-function-declaration]
writel(val, reg);
^~~~~~
wrmsrl
cc1: some warnings being treated as errors

vim +462 drivers/staging/mt7621-mmc/mt6575_sd.h

8b634a9c John Crispin 2018-03-15 456
0b78f05d Christian L?tke-Stetzkamp 2018-04-24 457 static inline void sdr_set_bits(void __iomem *reg, u32 bs)
0b78f05d Christian L?tke-Stetzkamp 2018-04-24 458 {
0b78f05d Christian L?tke-Stetzkamp 2018-04-24 @459 u32 val = readl(reg);
0b78f05d Christian L?tke-Stetzkamp 2018-04-24 460
0b78f05d Christian L?tke-Stetzkamp 2018-04-24 461 val |= bs;
0b78f05d Christian L?tke-Stetzkamp 2018-04-24 @462 writel(val, reg);
0b78f05d Christian L?tke-Stetzkamp 2018-04-24 463 }
0b78f05d Christian L?tke-Stetzkamp 2018-04-24 464

:::::: The code at line 462 was first introduced by commit
:::::: 0b78f05d510b01e353481f5bccb63661d2cb5c32 staging: mt7621-mmc: Correct datatypes for io and sanitize io access

:::::: TO: Christian L?tke-Stetzkamp <[email protected]>
:::::: CC: Greg Kroah-Hartman <[email protected]>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation


Attachments:
(No filename) (2.33 kB)
.config.gz (31.68 kB)
Download all attachments

2019-01-16 18:26:49

by George Hilliard

[permalink] [raw]
Subject: [PATCH v5] staging: Mediatek: Use individual config flags in Makefile

These drivers can be useful on other MT76xx SoCs, which have compatible
peripherals. The drivers were selectable in Kconfig, but they were
quietly excluded from the build because the SOC_MT7621 chip was not
selected. So, make the Makefiles use the same flags as Kconfig for
these drivers.

mt7621-dma and mt7621-dts are left alone because they truly do require
that SoC.

I have personally confirmed that the mt7621-spi driver works on the
MT7688, which was what prompted this change.

Cc: [email protected]
Cc: [email protected]
Cc: NeilBrown <[email protected]>
Cc: [email protected]
Signed-off-by: George Hilliard <[email protected]>
---
Changelog:
v2:
- Also make the change for skipped/forgotten drivers such as mt7621-eth
v3..v4:
- Rebase against staging-testing
- Also make the change for new PCIe PHY driver
- Slightly change commit wording
v5:
- Fix dependency issue in mt7621-mmc/Kconfig; it now needs to
explicitly depend on RALINK because SOC_MT7621 is not required now
- Remove check for nonexistent config MTD_NAND_RALINK from
mt7621-mmc/Kconfig

drivers/staging/Makefile | 14 +++++++-------
drivers/staging/mt7621-mmc/Kconfig | 2 +-
drivers/staging/mt7621-pci-phy/Makefile | 2 +-
drivers/staging/mt7621-pci/Makefile | 2 +-
4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index 4d563ed0bc79..cc5530cc996b 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -41,14 +41,14 @@ obj-$(CONFIG_GREYBUS) += greybus/
obj-$(CONFIG_BCM2835_VCHIQ) += vc04_services/
obj-$(CONFIG_DRM_VBOXVIDEO) += vboxvideo/
obj-$(CONFIG_PI433) += pi433/
-obj-$(CONFIG_SOC_MT7621) += mt7621-pci/
-obj-$(CONFIG_SOC_MT7621) += mt7621-pci-phy/
-obj-$(CONFIG_SOC_MT7621) += mt7621-pinctrl/
-obj-$(CONFIG_SOC_MT7621) += mt7621-spi/
+obj-$(CONFIG_PCI_MT7621) += mt7621-pci/
+obj-$(CONFIG_PCI_MT7621_PHY) += mt7621-pci-phy/
+obj-$(CONFIG_PINCTRL_RT2880) += mt7621-pinctrl/
+obj-$(CONFIG_SPI_MT7621) += mt7621-spi/
obj-$(CONFIG_SOC_MT7621) += mt7621-dma/
-obj-$(CONFIG_SOC_MT7621) += ralink-gdma/
-obj-$(CONFIG_SOC_MT7621) += mt7621-mmc/
-obj-$(CONFIG_SOC_MT7621) += mt7621-eth/
+obj-$(CONFIG_DMA_RALINK) += ralink-gdma/
+obj-$(CONFIG_MTK_MMC) += mt7621-mmc/
+obj-$(CONFIG_NET_MEDIATEK_SOC_STAGING) += mt7621-eth/
obj-$(CONFIG_SOC_MT7621) += mt7621-dts/
obj-$(CONFIG_STAGING_GASKET_FRAMEWORK) += gasket/
obj-$(CONFIG_XIL_AXIS_FIFO) += axis-fifo/
diff --git a/drivers/staging/mt7621-mmc/Kconfig b/drivers/staging/mt7621-mmc/Kconfig
index c6dfe8c637dc..1eb79cd6e22f 100644
--- a/drivers/staging/mt7621-mmc/Kconfig
+++ b/drivers/staging/mt7621-mmc/Kconfig
@@ -1,6 +1,6 @@
config MTK_MMC
tristate "MTK SD/MMC"
- depends on !MTD_NAND_RALINK && MMC
+ depends on RALINK && MMC

config MTK_AEE_KDUMP
bool "MTK AEE KDUMP"
diff --git a/drivers/staging/mt7621-pci-phy/Makefile b/drivers/staging/mt7621-pci-phy/Makefile
index 2b82ccfc28c6..a970056f05c1 100644
--- a/drivers/staging/mt7621-pci-phy/Makefile
+++ b/drivers/staging/mt7621-pci-phy/Makefile
@@ -1 +1 @@
-obj-$(CONFIG_SOC_MT7621) += pci-mt7621-phy.o
+obj-$(CONFIG_PCI_MT7621_PHY) += pci-mt7621-phy.o
diff --git a/drivers/staging/mt7621-pci/Makefile b/drivers/staging/mt7621-pci/Makefile
index 607b84bedcc3..d4655a726b61 100644
--- a/drivers/staging/mt7621-pci/Makefile
+++ b/drivers/staging/mt7621-pci/Makefile
@@ -1 +1 @@
-obj-$(CONFIG_SOC_MT7621) += pci-mt7621.o
+obj-$(CONFIG_PCI_MT7621) += pci-mt7621.o
--
2.20.1