diff mbox series

[1/6] MIPS: Loongson32: Remove unused platform devices

Message ID 20190122130415.3440-1-jiaxun.yang@flygoat.com (mailing list archive)
State Accepted
Headers show
Series [1/6] MIPS: Loongson32: Remove unused platform devices | expand

Commit Message

Jiaxun Yang Jan. 22, 2019, 1:04 p.m. UTC
platform.c contains several unused platform device with no
drivers submited.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
 .../include/asm/mach-loongson32/platform.h    |  4 --
 arch/mips/loongson32/common/platform.c        | 63 -------------------
 2 files changed, 67 deletions(-)

Comments

Paul Burton Jan. 23, 2019, 1:34 a.m. UTC | #1
Hello,

Jiaxun Yang wrote:
> platform.c contains several unused platform device with no
> drivers submited.
> 
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>

Applied to mips-next.

Thanks,
    Paul

[ This message was auto-generated; if you believe anything is incorrect
  then please email paul.burton@mips.com to report it. ]
Jiaxun Yang Jan. 23, 2019, 3:40 a.m. UTC | #2
On January 23, 2019 11:26:01 AM GMT+08:00, Kelvin Cheung <keguang.zhang@gmail.com> wrote:
>Hi Paul, Jiaxun,
>The platform.[ch] is the common code for both Loongson1B and
>Loongson1C.
>And the DMA and NAND device are used by Loongson1B.

Hi Kevin:
It seemed like there are no drivers for these devices in mainline kernel.
It would be nice if you can submit these driver before revert this patch.

BTW: I'm currently working on refactor Loongson32 platform with DeviceTree.

Thanks
>Could you please revert this patch.
>Thanks!
>
>Paul Burton <paul.burton@mips.com> 于2019年1月23日周三 上午9:34写道:
>
>> Hello,
>>
>> Jiaxun Yang wrote:
>> > platform.c contains several unused platform device with no
>> > drivers submited.
>> >
>> > Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
>>
>> Applied to mips-next.
>>
>> Thanks,
>>     Paul
>>
>> [ This message was auto-generated; if you believe anything is
>incorrect
>>   then please email paul.burton@mips.com to report it. ]
>>
Paul Burton Jan. 23, 2019, 9:40 p.m. UTC | #3
Hi Jiaxun & Kevin,

On Wed, Jan 23, 2019 at 11:40:12AM +0800, Jiaxun Yang wrote:
> On January 23, 2019 11:26:01 AM GMT+08:00, Kelvin Cheung <keguang.zhang@gmail.com> wrote:
> >Hi Paul, Jiaxun,
> >The platform.[ch] is the common code for both Loongson1B and
> >Loongson1C.
> >And the DMA and NAND device are used by Loongson1B.
> 
> Hi Kevin:
> It seemed like there are no drivers for these devices in mainline kernel.
> It would be nice if you can submit these driver before revert this patch.

I agree with Jiaxun here - if you want the platform code to be part of
mainline then the driver needs to be too. Conversely if you have drivers
that are not part of the mainline kernel then maintaining the platform
code to go with them should be a negligible amount of extra work.

> BTW: I'm currently working on refactor Loongson32 platform with DeviceTree.

Neat - I look forward to seeing that :)

Thanks,
    Paul
diff mbox series

Patch

diff --git a/arch/mips/include/asm/mach-loongson32/platform.h b/arch/mips/include/asm/mach-loongson32/platform.h
index 8f8fa43ba095..15d1de2300fe 100644
--- a/arch/mips/include/asm/mach-loongson32/platform.h
+++ b/arch/mips/include/asm/mach-loongson32/platform.h
@@ -17,19 +17,15 @@ 
 
 extern struct platform_device ls1x_uart_pdev;
 extern struct platform_device ls1x_cpufreq_pdev;
-extern struct platform_device ls1x_dma_pdev;
 extern struct platform_device ls1x_eth0_pdev;
 extern struct platform_device ls1x_eth1_pdev;
 extern struct platform_device ls1x_ehci_pdev;
 extern struct platform_device ls1x_gpio0_pdev;
 extern struct platform_device ls1x_gpio1_pdev;
-extern struct platform_device ls1x_nand_pdev;
 extern struct platform_device ls1x_rtc_pdev;
 extern struct platform_device ls1x_wdt_pdev;
 
 void __init ls1x_clk_init(void);
-void __init ls1x_dma_set_platdata(struct plat_ls1x_dma *pdata);
-void __init ls1x_nand_set_platdata(struct plat_ls1x_nand *pdata);
 void __init ls1x_rtc_set_extclk(struct platform_device *pdev);
 void __init ls1x_serial_set_uartclk(struct platform_device *pdev);
 
diff --git a/arch/mips/loongson32/common/platform.c b/arch/mips/loongson32/common/platform.c
index ac584c5823d0..0bf355c8bcb2 100644
--- a/arch/mips/loongson32/common/platform.c
+++ b/arch/mips/loongson32/common/platform.c
@@ -81,42 +81,6 @@  struct platform_device ls1x_cpufreq_pdev = {
 	},
 };
 
-/* DMA */
-static struct resource ls1x_dma_resources[] = {
-	[0] = {
-		.start = LS1X_DMAC_BASE,
-		.end = LS1X_DMAC_BASE + SZ_4 - 1,
-		.flags = IORESOURCE_MEM,
-	},
-	[1] = {
-		.start = LS1X_DMA0_IRQ,
-		.end = LS1X_DMA0_IRQ,
-		.flags = IORESOURCE_IRQ,
-	},
-	[2] = {
-		.start = LS1X_DMA1_IRQ,
-		.end = LS1X_DMA1_IRQ,
-		.flags = IORESOURCE_IRQ,
-	},
-	[3] = {
-		.start = LS1X_DMA2_IRQ,
-		.end = LS1X_DMA2_IRQ,
-		.flags = IORESOURCE_IRQ,
-	},
-};
-
-struct platform_device ls1x_dma_pdev = {
-	.name		= "ls1x-dma",
-	.id		= -1,
-	.num_resources	= ARRAY_SIZE(ls1x_dma_resources),
-	.resource	= ls1x_dma_resources,
-};
-
-void __init ls1x_dma_set_platdata(struct plat_ls1x_dma *pdata)
-{
-	ls1x_dma_pdev.dev.platform_data = pdata;
-}
-
 /* Synopsys Ethernet GMAC */
 static struct stmmac_mdio_bus_data ls1x_mdio_bus_data = {
 	.phy_mask	= 0,
@@ -291,33 +255,6 @@  struct platform_device ls1x_gpio1_pdev = {
 	.resource	= ls1x_gpio1_resources,
 };
 
-/* NAND Flash */
-static struct resource ls1x_nand_resources[] = {
-	[0] = {
-		.start	= LS1X_NAND_BASE,
-		.end	= LS1X_NAND_BASE + SZ_32 - 1,
-		.flags	= IORESOURCE_MEM,
-	},
-	[1] = {
-		/* DMA channel 0 is dedicated to NAND */
-		.start	= LS1X_DMA_CHANNEL0,
-		.end	= LS1X_DMA_CHANNEL0,
-		.flags	= IORESOURCE_DMA,
-	},
-};
-
-struct platform_device ls1x_nand_pdev = {
-	.name		= "ls1x-nand",
-	.id		= -1,
-	.num_resources	= ARRAY_SIZE(ls1x_nand_resources),
-	.resource	= ls1x_nand_resources,
-};
-
-void __init ls1x_nand_set_platdata(struct plat_ls1x_nand *pdata)
-{
-	ls1x_nand_pdev.dev.platform_data = pdata;
-}
-
 /* USB EHCI */
 static u64 ls1x_ehci_dmamask = DMA_BIT_MASK(32);