Skip to contentSkip to conversation

ARM: clps711x: Load serial driver from boards

PATCH Superseded Alexander Shiyan 3 participants 20 messages Nov 1, 2012 – Nov 6, 2012

Subsystems (6)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/15 ARM: clps711x: Load serial driver from boards

Currently serial driver for CLPS711X is autoloaded if it compiled in kernel. Since we may have multiple platforms into single kernel we should avoid this. This patch removes this trick and adds registration of serial driver into board support code.

---
 arch/arm/mach-clps711x/autcpu12.c |    6 +++---
 arch/arm/mach-clps711x/cdb89712.c |    9 ++++++++-
 arch/arm/mach-clps711x/clep7312.c |    9 +++++++--
 arch/arm/mach-clps711x/edb7211.c  |   11 +++++++++--
 arch/arm/mach-clps711x/fortunet.c |    9 ++++++++-
 arch/arm/mach-clps711x/p720t.c    |   11 +++++++++--
 drivers/tty/serial/clps711x.c     |   16 ----------------
 7 files changed, 44 insertions(+), 27 deletions(-)
arch/arm/mach-clps711x/autcpu12.c +3 -3
index 214547b..f4f122d 100644
@@ -68,16 +68,16 @@ static struct platform_device autcpu12_nvram_pdev __initdata = {
 
 static void __init autcpu12_init(void)
 {
+	platform_device_register_simple("uart-clps711x", 0, NULL, 0);
 	platform_device_register(&autcpu12_nvram_pdev);
 }
 
 MACHINE_START(AUTCPU12, "autronix autcpu12")
 	/* Maintainer: Thomas Gleixner */
 	.atag_offset	= 0x20000,
-	.init_machine	= autcpu12_init,
 	.map_io		= autcpu12_map_io,
+	.init_machine	= autcpu12_init,
 	.init_irq	= clps711x_init_irq,
-	.timer		= &clps711x_timer,
 	.restart	= clps711x_restart,
+	.timer		= &clps711x_timer,
 MACHINE_END
-
arch/arm/mach-clps711x/cdb89712.c +8 -1
index d90d25c..5a03888 100644
@@ -23,6 +23,7 @@
 #include <linux/string.h>
 #include <linux/mm.h>
 #include <linux/io.h>
+#include <linux/platform_device.h>
 
 #include <mach/hardware.h>
 #include <asm/pgtable.h>
@@ -53,11 +54,17 @@ static void __init cdb89712_map_io(void)
 	iotable_init(cdb89712_io_desc, ARRAY_SIZE(cdb89712_io_desc));
 }
 
+static void __init cdb89712_init(void)
+{
+	platform_device_register_simple("uart-clps711x", 0, NULL, 0);
+}
+
 MACHINE_START(CDB89712, "Cirrus-CDB89712")
 	/* Maintainer: Ray Lehtiniemi */
 	.atag_offset	= 0x100,
 	.map_io		= cdb89712_map_io,
+	.init_machine	= cdb89712_init,
 	.init_irq	= clps711x_init_irq,
-	.timer		= &clps711x_timer,
 	.restart	= clps711x_restart,
+	.timer		= &clps711x_timer,
 MACHINE_END
arch/arm/mach-clps711x/clep7312.c +7 -2
index dbc7842..0301b2c 100644
@@ -18,6 +18,7 @@
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/string.h>
+#include <linux/platform_device.h>
 
 #include <asm/setup.h>
 #include <asm/mach-types.h>
@@ -33,14 +34,18 @@ fixup_clep7312(struct tag *tags, char **cmdline, struct meminfo *mi)
 	mi->bank[0].size = 0x01000000;
 }
 
+static void __init clep7312_init(void)
+{
+	platform_device_register_simple("uart-clps711x", 0, NULL, 0);
+}
 
 MACHINE_START(CLEP7212, "Cirrus Logic 7212/7312")
 	/* Maintainer: Nobody */
 	.atag_offset	= 0x0100,
 	.fixup		= fixup_clep7312,
 	.map_io		= clps711x_map_io,
+	.init_machine	= clep7312_init,
 	.init_irq	= clps711x_init_irq,
-	.timer		= &clps711x_timer,
 	.restart	= clps711x_restart,
+	.timer		= &clps711x_timer,
 MACHINE_END
-
arch/arm/mach-clps711x/edb7211.c +9 -2
index 88f4690..119610b 100644
@@ -10,6 +10,7 @@
 #include <linux/init.h>
 #include <linux/memblock.h>
 #include <linux/types.h>
+#include <linux/platform_device.h>
 
 #include <asm/setup.h>
 #include <asm/mach/map.h>
@@ -76,13 +77,19 @@ fixup_edb7211(struct tag *tags, char **cmdline, struct meminfo *mi)
 	mi->nr_banks = 2;
 }
 
+static void __init edb7211_init(void)
+{
+	platform_device_register_simple("uart-clps711x", 0, NULL, 0);
+}
+
 MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)")
 	/* Maintainer: Jon McClintock */
 	.atag_offset	= VIDEORAM_SIZE + 0x100,
 	.fixup		= fixup_edb7211,
-	.map_io		= edb7211_map_io,
 	.reserve	= edb7211_reserve,
+	.map_io		= edb7211_map_io,
+	.init_machine	= edb7211_init,
 	.init_irq	= clps711x_init_irq,
-	.timer		= &clps711x_timer,
 	.restart	= clps711x_restart,
+	.timer		= &clps711x_timer,
 MACHINE_END
arch/arm/mach-clps711x/fortunet.c +8 -1
index 3a3f0b7..a7f8305 100644
@@ -22,6 +22,7 @@
 #include <linux/types.h>
 #include <linux/init.h>
 #include <linux/initrd.h>
+#include <linux/platform_device.h>
 
 #include <mach/hardware.h>
 #include <asm/setup.h>
@@ -72,11 +73,17 @@ fortunet_fixup(struct tag *tags, char **cmdline, struct meminfo *mi)
 	*mi = memmap;
 }
 
+static void __init fortunet_init(void)
+{
+	platform_device_register_simple("uart-clps711x", 0, NULL, 0);
+}
+
 MACHINE_START(FORTUNET, "ARM-FortuNet")
 	/* Maintainer: FortuNet Inc. */
 	.fixup		= fortunet_fixup,
 	.map_io		= clps711x_map_io,
+	.init_machine	= fortunet_init,
 	.init_irq	= clps711x_init_irq,
-	.timer		= &clps711x_timer,
 	.restart	= clps711x_restart,
+	.timer		= &clps711x_timer,
 MACHINE_END
arch/arm/mach-clps711x/p720t.c +9 -2
index dd89950..96d54d4 100644
@@ -25,6 +25,7 @@
 #include <linux/io.h>
 #include <linux/slab.h>
 #include <linux/leds.h>
+#include <linux/platform_device.h>
 
 #include <mach/hardware.h>
 #include <asm/pgtable.h>
@@ -161,13 +162,19 @@ static int __init p720t_leds_init(void)
 fs_initcall(p720t_leds_init);
 #endif
 
+static void __init p720t_init(void)
+{
+	platform_device_register_simple("uart-clps711x", 0, NULL, 0);
+}
+
 MACHINE_START(P720T, "ARM-Prospector720T")
 	/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
 	.atag_offset	= 0x100,
 	.fixup		= fixup_p720t,
-	.init_early	= p720t_init_early,
 	.map_io		= p720t_map_io,
+	.init_early	= p720t_init_early,
+	.init_machine	= p720t_init,
 	.init_irq	= clps711x_init_irq,
-	.timer		= &clps711x_timer,
 	.restart	= clps711x_restart,
+	.timer		= &clps711x_timer,
 MACHINE_END
drivers/tty/serial/clps711x.c +0 -16
index a0a6db5..06f0e91 100644
@@ -516,22 +516,6 @@ static struct platform_driver clps711x_uart_driver = {
 };
 module_platform_driver(clps711x_uart_driver);
 
-static struct platform_device clps711x_uart_device = {
-	.name	= UART_CLPS711X_NAME,
-};
-
-static int __init uart_clps711x_init(void)
-{
-	return platform_device_register(&clps711x_uart_device);
-}
-module_init(uart_clps711x_init);
-
-static void __exit uart_clps711x_exit(void)
-{
-	platform_device_unregister(&clps711x_uart_device);
-}
-module_exit(uart_clps711x_exit);
-
 MODULE_AUTHOR("Deep Blue Solutions Ltd");
 MODULE_DESCRIPTION("CLPS711X serial driver");
 MODULE_LICENSE("GPL");
Signature · 1 line
1.7.8.6
#1 lore raw

PATCH 2/15 ARM: clps711x: Using platform_driver for ethernet device

This patch removes static mappings for ethernet devices. Now we will use platform_driver for ethernet devices.

---
 arch/arm/mach-clps711x/Kconfig                 |    2 -
 arch/arm/mach-clps711x/autcpu12.c              |   27 ++++++++++------------
 arch/arm/mach-clps711x/cdb89712.c              |   29 +++++++++--------------
 arch/arm/mach-clps711x/edb7211.c               |   19 ++++++++++-----
 arch/arm/mach-clps711x/include/mach/autcpu12.h |    3 --
 arch/arm/mach-clps711x/include/mach/hardware.h |   11 ---------
 6 files changed, 36 insertions(+), 55 deletions(-)
arch/arm/mach-clps711x/Kconfig +0 -2
index 263242d..2d00165 100644
@@ -10,7 +10,6 @@ config ARCH_AUTCPU12
 
 config ARCH_CDB89712
 	bool "CDB89712"
-	select ISA
 	help
 	  This is an evaluation board from Cirrus for the CS89712 processor.
 	  The board includes 2 serial ports, Ethernet, IRDA, and expansion
@@ -25,7 +24,6 @@ config ARCH_EDB7211
 	bool "EDB7211"
 	select ARCH_SELECT_MEMORY_MODEL
 	select ARCH_SPARSEMEM_ENABLE
-	select ISA
 	help
 	  Say Y here if you intend to run this kernel on a Cirrus Logic EDB-7211
 	  evaluation board.
arch/arm/mach-clps711x/autcpu12.c +12 -15
index f4f122d..d845dea 100644
@@ -24,6 +24,7 @@
 #include <linux/mm.h>
 #include <linux/io.h>
 #include <linux/ioport.h>
+#include <linux/interrupt.h>
 #include <linux/platform_device.h>
 
 #include <mach/hardware.h>
@@ -39,21 +40,13 @@
 
 #include "common.h"
 
-static struct map_desc autcpu12_io_desc[] __initdata = {
-	/* Memory-mapped extra io and CS8900A Ethernet chip */
-	{
-		.virtual	= IO_ADDRESS(AUTCPU12_PHYS_CS8900A),
-		.pfn		= __phys_to_pfn(AUTCPU12_PHYS_CS8900A),
-		.length		= SZ_1M,
-		.type		= MT_DEVICE
-	}
-};
+#define AUTCPU12_CS8900_BASE	(CS2_PHYS_BASE + 0x300)
+#define AUTCPU12_CS8900_IRQ	(IRQ_EINT3)
 
-void __init autcpu12_map_io(void)
-{
-        clps711x_map_io();
-        iotable_init(autcpu12_io_desc, ARRAY_SIZE(autcpu12_io_desc));
-}
+static struct resource autcpu12_cs8900_resource[] __initdata = {
+	DEFINE_RES_MEM(AUTCPU12_CS8900_BASE, SZ_1K),
+	DEFINE_RES_IRQ(AUTCPU12_CS8900_IRQ),
+};
 
 static struct resource autcpu12_nvram_resource[] __initdata = {
 	DEFINE_RES_MEM_NAMED(AUTCPU12_PHYS_NVRAM, SZ_128K, "SRAM"),
@@ -69,13 +62,17 @@ static struct platform_device autcpu12_nvram_pdev __initdata = {
 static void __init autcpu12_init(void)
 {
 	platform_device_register_simple("uart-clps711x", 0, NULL, 0);
+
+	platform_device_register_simple("cs89x0", 0, autcpu12_cs8900_resource,
+					ARRAY_SIZE(autcpu12_cs8900_resource));
+
 	platform_device_register(&autcpu12_nvram_pdev);
 }
 
 MACHINE_START(AUTCPU12, "autronix autcpu12")
 	/* Maintainer: Thomas Gleixner */
 	.atag_offset	= 0x20000,
-	.map_io		= autcpu12_map_io,
+	.map_io		= clps711x_map_io,
 	.init_machine	= autcpu12_init,
 	.init_irq	= clps711x_init_irq,
 	.restart	= clps711x_restart,
arch/arm/mach-clps711x/cdb89712.c +11 -18
index 5a03888..695ca70 100644
@@ -23,6 +23,7 @@
 #include <linux/string.h>
 #include <linux/mm.h>
 #include <linux/io.h>
+#include <linux/interrupt.h>
 #include <linux/platform_device.h>
 
 #include <mach/hardware.h>
@@ -35,34 +36,26 @@
 
 #include "common.h"
 
-/*
- * Map the CS89712 Ethernet port.  That should be moved to the
- * ethernet driver, perhaps.
- */
-static struct map_desc cdb89712_io_desc[] __initdata = {
-	{
-		.virtual	= IO_ADDRESS(ETHER_PHYS_BASE),
-		.pfn		= __phys_to_pfn(ETHER_PHYS_BASE),
-		.length		= ETHER_SIZE,
-		.type		= MT_DEVICE
-	}
-};
+#define CDB89712_CS8900_BASE	(CS2_PHYS_BASE + 0x300)
+#define CDB89712_CS8900_IRQ	(IRQ_EINT3)
 
-static void __init cdb89712_map_io(void)
-{
-	clps711x_map_io();
-	iotable_init(cdb89712_io_desc, ARRAY_SIZE(cdb89712_io_desc));
-}
+static struct resource cdb89712_cs8900_resource[] __initdata = {
+	DEFINE_RES_MEM(CDB89712_CS8900_BASE, SZ_1K),
+	DEFINE_RES_IRQ(CDB89712_CS8900_IRQ),
+};
 
 static void __init cdb89712_init(void)
 {
 	platform_device_register_simple("uart-clps711x", 0, NULL, 0);
+
+	platform_device_register_simple("cs89x0", 0, cdb89712_cs8900_resource,
+					ARRAY_SIZE(cdb89712_cs8900_resource));
 }
 
 MACHINE_START(CDB89712, "Cirrus-CDB89712")
 	/* Maintainer: Ray Lehtiniemi */
 	.atag_offset	= 0x100,
-	.map_io		= cdb89712_map_io,
+	.map_io		= clps711x_map_io,
 	.init_machine	= cdb89712_init,
 	.init_irq	= clps711x_init_irq,
 	.restart	= clps711x_restart,
arch/arm/mach-clps711x/edb7211.c +13 -6
index 119610b..7eaaafa 100644
@@ -10,6 +10,7 @@
 #include <linux/init.h>
 #include <linux/memblock.h>
 #include <linux/types.h>
+#include <linux/interrupt.h>
 #include <linux/platform_device.h>
 
 #include <asm/setup.h>
@@ -21,7 +22,15 @@
 
 #include "common.h"
 
-#define VIDEORAM_SIZE	SZ_128K
+#define VIDEORAM_SIZE		SZ_128K
+
+#define EDB7211_CS8900_BASE	(CS2_PHYS_BASE + 0x300)
+#define EDB7211_CS8900_IRQ	(IRQ_EINT3)
+
+static struct resource edb7211_cs8900_resource[] __initdata = {
+	DEFINE_RES_MEM(EDB7211_CS8900_BASE, SZ_1K),
+	DEFINE_RES_IRQ(EDB7211_CS8900_IRQ),
+};
 
 static struct map_desc edb7211_io_desc[] __initdata = {
 	{	/* Memory-mapped extra keyboard row */
@@ -29,11 +38,6 @@ static struct map_desc edb7211_io_desc[] __initdata = {
 		.pfn		= __phys_to_pfn(EP7211_PHYS_EXTKBD),
 		.length		= SZ_1M,
 		.type		= MT_DEVICE,
-	}, {	/* CS8900A Ethernet chip */
-		.virtual	= IO_ADDRESS(EP7211_PHYS_CS8900A),
-		.pfn		= __phys_to_pfn(EP7211_PHYS_CS8900A),
-		.length		= SZ_1M,
-		.type		= MT_DEVICE,
 	}, {	/* Flash bank 0 */
 		.virtual	= IO_ADDRESS(EP7211_PHYS_FLASH1),
 		.pfn		= __phys_to_pfn(EP7211_PHYS_FLASH1),
@@ -80,6 +84,9 @@ fixup_edb7211(struct tag *tags, char **cmdline, struct meminfo *mi)
 static void __init edb7211_init(void)
 {
 	platform_device_register_simple("uart-clps711x", 0, NULL, 0);
+
+	platform_device_register_simple("cs89x0", 0, edb7211_cs8900_resource,
+					ARRAY_SIZE(edb7211_cs8900_resource));
 }
 
 MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)")
arch/arm/mach-clps711x/include/mach/autcpu12.h +0 -3
index f95ce6f..b077abd 100644
@@ -20,9 +20,6 @@
 #ifndef __ASM_ARCH_AUTCPU12_H
 #define __ASM_ARCH_AUTCPU12_H
 
-/* The CS8900A ethernet chip has its I/O registers wired to chip select 2 */
-#define AUTCPU12_PHYS_CS8900A		CS2_PHYS_BASE
-
 /*
  * The flash bank is wired to chip select 0
  */
arch/arm/mach-clps711x/include/mach/hardware.h +0 -11
index 0a3df25..bd919e7 100644
@@ -64,22 +64,11 @@
 #define CS7_PHYS_BASE		(0x00000000)
 #endif
 
-#if defined (CONFIG_ARCH_CDB89712)
-
-#define ETHER_PHYS_BASE		CS2_PHYS_BASE
-#define ETHER_SIZE		0x1000
-
-#endif
-
-
 #if defined (CONFIG_ARCH_EDB7211)
 
 /* The extra 8 lines of the keyboard matrix are wired to chip select 3 */
 #define EP7211_PHYS_EXTKBD	CS3_PHYS_BASE
 
-/* The CS8900A ethernet chip has its I/O registers wired to chip select 2 */
-#define EP7211_PHYS_CS8900A	CS2_PHYS_BASE
-
 /* The two flash banks are wired to chip selects 0 and 1 */
 #define EP7211_PHYS_FLASH1	CS0_PHYS_BASE
 #define EP7211_PHYS_FLASH2	CS1_PHYS_BASE
Signature · 1 line
1.7.8.6
#2 lore raw

PATCH 3/15 ARM: clps711x: p720t: Using "leds-gpio" driver for LED control

In reply to Alexander Shiyan

Instead of manually create LED class device, we will use "leds-gpio" driver for LED control.

---
 arch/arm/mach-clps711x/common.h |    3 +
 arch/arm/mach-clps711x/p720t.c  |   79 ++++++++++++--------------------------
 2 files changed, 28 insertions(+), 54 deletions(-)
arch/arm/mach-clps711x/common.h +3 -0
index fc0f065..83cfece 100644
@@ -4,6 +4,9 @@
  * Common bits.
  */
 
+#define CLPS711X_NR_GPIO	(4 * 8 + 3)
+#define CLPS711X_GPIO(port,bit)	((port) * 8 + (bit))
+
 struct sys_timer;
 
 extern void clps711x_map_io(void);
arch/arm/mach-clps711x/p720t.c +25 -54

104 lines not on this page · raw message

Signature · 1 line
1.7.8.6
#3 lore raw

PATCH 4/15 ARM: clps711x: Transform clps711x-framebuffer to platform driver and use it

In reply to Alexander Shiyan

clps711x-framebuffer driver needs to be updated and this is a first step to make it better. With this patch we are loading clps711x-framebuffer as a platform device.

---
 arch/arm/mach-clps711x/autcpu12.c |    2 ++
 arch/arm/mach-clps711x/edb7211.c  |    2 ++
 arch/arm/mach-clps711x/p720t.c    |    2 ++
 drivers/video/clps711xfb.c        |   21 +++++++++++++++------
 4 files changed, 21 insertions(+), 6 deletions(-)
arch/arm/mach-clps711x/autcpu12.c +2 -0
index d845dea..c20c30a 100644
@@ -63,6 +63,8 @@ static void __init autcpu12_init(void)
 {
 	platform_device_register_simple("uart-clps711x", 0, NULL, 0);
 
+	platform_device_register_simple("video-clps711x", 0, NULL, 0);
+
 	platform_device_register_simple("cs89x0", 0, autcpu12_cs8900_resource,
 					ARRAY_SIZE(autcpu12_cs8900_resource));
 
arch/arm/mach-clps711x/edb7211.c +2 -0
index 7eaaafa..ef87c43 100644
@@ -85,6 +85,8 @@ static void __init edb7211_init(void)
 {
 	platform_device_register_simple("uart-clps711x", 0, NULL, 0);
 
+	platform_device_register_simple("video-clps711x", 0, NULL, 0);
+
 	platform_device_register_simple("cs89x0", 0, edb7211_cs8900_resource,
 					ARRAY_SIZE(edb7211_cs8900_resource));
 }
arch/arm/mach-clps711x/p720t.c +2 -0
index 7a96312..b6e2032 100644
@@ -130,6 +130,8 @@ static struct platform_device p720t_gpio_led_pdev = {
 static void __init p720t_init(void)
 {
 	platform_device_register_simple("uart-clps711x", 0, NULL, 0);
+
+	platform_device_register_simple("video-clps711x", 0, NULL, 0);
 }
 
 static void __init p720t_init_late(void)
drivers/video/clps711xfb.c +15 -6
index f994c8b..2ccbb9b 100644
@@ -270,7 +270,7 @@ static const struct file_operations backlight_proc_fops = {
 	.write		= backlight_proc_write,
 };
 
-static void __init clps711x_guess_lcd_params(struct fb_info *info)
+static void __devinit clps711x_guess_lcd_params(struct fb_info *info)
 {
 	unsigned int lcdcon, syscon, size;
 	unsigned long phys_base = PAGE_OFFSET;
@@ -358,7 +358,7 @@ static void __init clps711x_guess_lcd_params(struct fb_info *info)
 	info->fix.type       = FB_TYPE_PACKED_PIXELS;
 }
 
-int __init clps711xfb_init(void)
+static int __devinit clps711x_fb_probe(struct platform_device *pdev)
 {
 	int err = -ENOMEM;
 
@@ -410,7 +410,7 @@ int __init clps711xfb_init(void)
 out:	return err;
 }
 
-static void __exit clps711xfb_exit(void)
+static int __devexit clps711x_fb_remove(struct platform_device *pdev)
 {
 	unregister_framebuffer(cfb);
 	kfree(cfb);
@@ -422,11 +422,20 @@ static void __exit clps711xfb_exit(void)
 		PLD_LCDEN = 0;
 		PLD_PWR &= ~(PLD_S4_ON|PLD_S3_ON|PLD_S2_ON|PLD_S1_ON);
 	}
+
+	return 0;
 }
 
-module_init(clps711xfb_init);
-module_exit(clps711xfb_exit);
+static struct platform_driver clps711x_fb_driver = {
+	.driver	= {
+		.name	= "video-clps711x",
+		.owner	= THIS_MODULE,
+	},
+	.probe	= clps711x_fb_probe,
+	.remove	= __devexit_p(clps711x_fb_remove),
+};
+module_platform_driver(clps711x_fb_driver);
 
 MODULE_AUTHOR("Russell King <[email protected]>");
-MODULE_DESCRIPTION("CLPS711x framebuffer driver");
+MODULE_DESCRIPTION("CLPS711X framebuffer driver");
 MODULE_LICENSE("GPL");
Signature · 1 line
1.7.8.6
#4 lore raw

PATCH 5/15 ARM: clps711x: p720t: Unneeded inclusion of head-sa1100.S removed

In reply to Alexander Shiyan
---
 arch/arm/boot/compressed/Makefile |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
arch/arm/boot/compressed/Makefile +0 -5
index 537208f..5cad8a6 100644
@@ -45,11 +45,6 @@ ifeq ($(CONFIG_ARCH_SHARK),y)
 OBJS		+= head-shark.o ofw-shark.o
 endif
 
-ifeq ($(CONFIG_ARCH_P720T),y)
-# Borrow this code from SA1100
-OBJS		+= head-sa1100.o
-endif
-
 ifeq ($(CONFIG_ARCH_SA1100),y)
 OBJS		+= head-sa1100.o
 endif
Signature · 1 line
1.7.8.6
#5 lore raw

PATCH 6/15 ARM: clps711x: Always select AUTO_ZRELADDR for a platform

In reply to Alexander Shiyan
---
 arch/arm/Kconfig                     |    1 +
 arch/arm/mach-clps711x/Makefile.boot |    1 -
 2 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/Kconfig +1 -0
index 9f04ca6..95103a1 100644
@@ -370,6 +370,7 @@ config ARCH_CNS3XXX
 config ARCH_CLPS711X
 	bool "Cirrus Logic CLPS711x/EP721x/EP731x-based"
 	select ARCH_REQUIRE_GPIOLIB
+	select AUTO_ZRELADDR
 	select CLKDEV_LOOKUP
 	select COMMON_CLK
 	select CPU_ARM720T
arch/arm/mach-clps711x/Makefile.boot +0 -1
index 9398e85..eba77d3 100644
@@ -1,5 +1,4 @@
 # The standard locations for stuff on CLPS711x type processors
-   zreladdr-y				+= 0xc0028000
 params_phys-y				:= 0xc0000100
 # Should probably have some agreement on these...
 initrd_phys-$(CONFIG_ARCH_P720T)	:= 0xc0400000
Signature · 1 line
1.7.8.6
#6 lore raw

PATCH 7/15 ARM: clps711x: cdb89712: Special driver for handling memory is removed

In reply to Alexander Shiyan

This patch provide migration to using "physmap-flash" and "mtd-ram" drivers instead of using special driver for handling memory.

---
 arch/arm/mach-clps711x/cdb89712.c              |   85 +++++++
 arch/arm/mach-clps711x/include/mach/hardware.h |    3 +
 drivers/mtd/maps/Kconfig                       |    7 -
 drivers/mtd/maps/Makefile                      |    1 -
 drivers/mtd/maps/cdb89712.c                    |  278 ------------------------
 5 files changed, 88 insertions(+), 286 deletions(-)
 delete mode 100644 drivers/mtd/maps/cdb89712.c
arch/arm/mach-clps711x/cdb89712.c +85 -0
index 695ca70..27c9f91 100644
@@ -26,6 +26,10 @@
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
 
+#include <linux/mtd/physmap.h>
+#include <linux/mtd/plat-ram.h>
+#include <linux/mtd/partitions.h>
+
 #include <mach/hardware.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
@@ -44,10 +48,91 @@ static struct resource cdb89712_cs8900_resource[] __initdata = {
 	DEFINE_RES_IRQ(CDB89712_CS8900_IRQ),
 };
 
+static struct mtd_partition cdb89712_flash_partitions[] __initdata = {
+	{
+		.name	= "Flash",
+		.offset	= 0,
+		.size	= MTDPART_SIZ_FULL,
+	},
+};
+
+static struct physmap_flash_data cdb89712_flash_pdata __initdata = {
+	.width		= 4,
+	.probe_type	= "map_rom",
+	.parts		= cdb89712_flash_partitions,
+	.nr_parts	= ARRAY_SIZE(cdb89712_flash_partitions),
+};
+
+static struct resource cdb89712_flash_resources[] __initdata = {
+	DEFINE_RES_MEM(CS0_PHYS_BASE, SZ_8M),
+};
+
+static struct platform_device cdb89712_flash_pdev __initdata = {
+	.name		= "physmap-flash",
+	.id		= 0,
+	.resource	= cdb89712_flash_resources,
+	.num_resources	= ARRAY_SIZE(cdb89712_flash_resources),
+	.dev	= {
+		.platform_data	= &cdb89712_flash_pdata,
+	},
+};
+
+static struct mtd_partition cdb89712_bootrom_partitions[] __initdata = {
+	{
+		.name	= "BootROM",
+		.offset	= 0,
+		.size	= MTDPART_SIZ_FULL,
+	},
+};
+
+static struct physmap_flash_data cdb89712_bootrom_pdata __initdata = {
+	.width		= 4,
+	.probe_type	= "map_rom",
+	.parts		= cdb89712_bootrom_partitions,
+	.nr_parts	= ARRAY_SIZE(cdb89712_bootrom_partitions),
+};
+
+static struct resource cdb89712_bootrom_resources[] __initdata = {
+	DEFINE_RES_NAMED(CS7_PHYS_BASE, SZ_128, "BOOTROM", IORESOURCE_MEM |
+			 IORESOURCE_CACHEABLE | IORESOURCE_READONLY),
+};
+
+static struct platform_device cdb89712_bootrom_pdev __initdata = {
+	.name		= "physmap-flash",
+	.id		= 1,
+	.resource	= cdb89712_bootrom_resources,
+	.num_resources	= ARRAY_SIZE(cdb89712_bootrom_resources),
+	.dev	= {
+		.platform_data	= &cdb89712_bootrom_pdata,
+	},
+};
+
+static struct platdata_mtd_ram cdb89712_sram_pdata __initdata = {
+	.bankwidth	= 4,
+};
+
+static struct resource cdb89712_sram_resources[] __initdata = {
+	DEFINE_RES_MEM(CLPS711X_SRAM_BASE, CLPS711X_SRAM_SIZE),
+};
+
+static struct platform_device cdb89712_sram_pdev __initdata = {
+	.name		= "mtd-ram",
+	.id		= 0,
+	.resource	= cdb89712_sram_resources,
+	.num_resources	= ARRAY_SIZE(cdb89712_sram_resources),
+	.dev	= {
+		.platform_data	= &cdb89712_sram_pdata,
+	},
+};
+
 static void __init cdb89712_init(void)
 {
 	platform_device_register_simple("uart-clps711x", 0, NULL, 0);
 
+	platform_device_register(&cdb89712_flash_pdev);
+	platform_device_register(&cdb89712_bootrom_pdev);
+	platform_device_register(&cdb89712_sram_pdev);
+
 	platform_device_register_simple("cs89x0", 0, cdb89712_cs8900_resource,
 					ARRAY_SIZE(cdb89712_cs8900_resource));
 }
arch/arm/mach-clps711x/include/mach/hardware.h +3 -0
index bd919e7..5a278cb 100644
@@ -64,6 +64,9 @@
 #define CS7_PHYS_BASE		(0x00000000)
 #endif
 
+#define CLPS711X_SRAM_BASE	CS6_PHYS_BASE
+#define CLPS711X_SRAM_SIZE	(48 * 1024)
+
 #if defined (CONFIG_ARCH_EDB7211)
 
 /* The extra 8 lines of the keyboard matrix are wired to chip select 3 */
drivers/mtd/maps/Kconfig +0 -7
index 2e47c2e..df30486 100644
@@ -324,13 +324,6 @@ config MTD_SOLUTIONENGINE
 	  This enables access to the flash chips on the Hitachi SolutionEngine and
 	  similar boards. Say 'Y' if you are building a kernel for such a board.
 
-config MTD_CDB89712
-	tristate "Cirrus CDB89712 evaluation board mappings"
-	depends on MTD_CFI && ARCH_CDB89712
-	help
-	  This enables access to the flash or ROM chips on the CDB89712 board.
-	  If you have such a board, say 'Y'.
-
 config MTD_SA1100
 	tristate "CFI Flash device mapped on StrongARM SA11x0"
 	depends on MTD_CFI && ARCH_SA1100
drivers/mtd/maps/Makefile +0 -1
index deb43e9..a0240ed 100644
@@ -7,7 +7,6 @@ obj-$(CONFIG_MTD)		+= map_funcs.o
 endif
 
 # Chip mappings
-obj-$(CONFIG_MTD_CDB89712)	+= cdb89712.o
 obj-$(CONFIG_MTD_CFI_FLAGADM)	+= cfi_flagadm.o
 obj-$(CONFIG_MTD_DC21285)	+= dc21285.o
 obj-$(CONFIG_MTD_DILNETPC)	+= dilnetpc.o
drivers/mtd/maps/cdb89712.c deleted +0 -278

278 lines not on this page · raw message

Signature · 1 line
1.7.8.6
#7 lore raw

PATCH 8/15 ARM: clps711x: Implement usage "SPARSE_IRQ" kernel option for a platform

In reply to Alexander Shiyan
---
 arch/arm/Kconfig                               |    1 +
 arch/arm/mach-clps711x/autcpu12.c              |    1 +
 arch/arm/mach-clps711x/cdb89712.c              |    1 +
 arch/arm/mach-clps711x/clep7312.c              |    1 +
 arch/arm/mach-clps711x/common.h                |    1 +
 arch/arm/mach-clps711x/edb7211.c               |    1 +
 arch/arm/mach-clps711x/fortunet.c              |    1 +
 arch/arm/mach-clps711x/include/mach/clps711x.h |   21 +++++++++++
 arch/arm/mach-clps711x/include/mach/irqs.h     |   46 ------------------------
 arch/arm/mach-clps711x/p720t.c                 |    1 +
 10 files changed, 29 insertions(+), 46 deletions(-)
 delete mode 100644 arch/arm/mach-clps711x/include/mach/irqs.h
arch/arm/Kconfig +1 -0
index 95103a1..34ca399 100644
@@ -376,6 +376,7 @@ config ARCH_CLPS711X
 	select CPU_ARM720T
 	select GENERIC_CLOCKEVENTS
 	select NEED_MACH_MEMORY_H
+	select SPARSE_IRQ
 	help
 	  Support for Cirrus Logic 711x/721x/731x based boards.
 
arch/arm/mach-clps711x/autcpu12.c +1 -0
index c20c30a..6a4752b 100644
@@ -76,6 +76,7 @@ MACHINE_START(AUTCPU12, "autronix autcpu12")
 	.atag_offset	= 0x20000,
 	.map_io		= clps711x_map_io,
 	.init_machine	= autcpu12_init,
+	.nr_irqs	= CLPS711X_NR_IRQS,
 	.init_irq	= clps711x_init_irq,
 	.restart	= clps711x_restart,
 	.timer		= &clps711x_timer,
arch/arm/mach-clps711x/cdb89712.c +1 -0
index 27c9f91..a526715 100644
@@ -142,6 +142,7 @@ MACHINE_START(CDB89712, "Cirrus-CDB89712")
 	.atag_offset	= 0x100,
 	.map_io		= clps711x_map_io,
 	.init_machine	= cdb89712_init,
+	.nr_irqs	= CLPS711X_NR_IRQS,
 	.init_irq	= clps711x_init_irq,
 	.restart	= clps711x_restart,
 	.timer		= &clps711x_timer,
arch/arm/mach-clps711x/clep7312.c +1 -0
index 0301b2c..c76363f 100644
@@ -45,6 +45,7 @@ MACHINE_START(CLEP7212, "Cirrus Logic 7212/7312")
 	.fixup		= fixup_clep7312,
 	.map_io		= clps711x_map_io,
 	.init_machine	= clep7312_init,
+	.nr_irqs	= CLPS711X_NR_IRQS,
 	.init_irq	= clps711x_init_irq,
 	.restart	= clps711x_restart,
 	.timer		= &clps711x_timer,
arch/arm/mach-clps711x/common.h +1 -0
index 83cfece..9757b3e 100644
@@ -4,6 +4,7 @@
  * Common bits.
  */
 
+#define CLPS711X_NR_IRQS	(30)
 #define CLPS711X_NR_GPIO	(4 * 8 + 3)
 #define CLPS711X_GPIO(port,bit)	((port) * 8 + (bit))
 
arch/arm/mach-clps711x/edb7211.c +1 -0
index ef87c43..43a502b 100644
@@ -98,6 +98,7 @@ MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)")
 	.reserve	= edb7211_reserve,
 	.map_io		= edb7211_map_io,
 	.init_machine	= edb7211_init,
+	.nr_irqs	= CLPS711X_NR_IRQS,
 	.init_irq	= clps711x_init_irq,
 	.restart	= clps711x_restart,
 	.timer		= &clps711x_timer,
arch/arm/mach-clps711x/fortunet.c +1 -0
index a7f8305..dca69c3 100644
@@ -83,6 +83,7 @@ MACHINE_START(FORTUNET, "ARM-FortuNet")
 	.fixup		= fortunet_fixup,
 	.map_io		= clps711x_map_io,
 	.init_machine	= fortunet_init,
+	.nr_irqs	= CLPS711X_NR_IRQS,
 	.init_irq	= clps711x_init_irq,
 	.restart	= clps711x_restart,
 	.timer		= &clps711x_timer,
arch/arm/mach-clps711x/include/mach/clps711x.h +21 -0
index aee352c..1f4728d 100644
@@ -277,4 +277,25 @@
 #define MEMCFG_WAITSTATE_2_0	(14 << 2)
 #define MEMCFG_WAITSTATE_1_0	(15 << 2)
 
+/* INTSR1 Interrupts */
+#define IRQ_CSINT		(4)
+#define IRQ_EINT1		(5)
+#define IRQ_EINT2		(6)
+#define IRQ_EINT3		(7)
+#define IRQ_TC1OI		(8)
+#define IRQ_TC2OI		(9)
+#define IRQ_RTCMI		(10)
+#define IRQ_TINT		(11)
+#define IRQ_UTXINT1		(12)
+#define IRQ_URXINT1		(13)
+#define IRQ_UMSINT		(14)
+#define IRQ_SSEOTI		(15)
+
+/* INTSR2 Interrupts */
+#define IRQ_KBDINT		(16 + 0)
+#define IRQ_SS2RX		(16 + 1)
+#define IRQ_SS2TX		(16 + 2)
+#define IRQ_UTXINT2		(16 + 12)
+#define IRQ_URXINT2		(16 + 13)
+
 #endif /* __MACH_CLPS711X_H */
arch/arm/mach-clps711x/include/mach/irqs.h deleted +0 -46

46 lines not on this page · raw message

arch/arm/mach-clps711x/p720t.c +1 -0
index b6e2032..4383ad8 100644
@@ -147,6 +147,7 @@ MACHINE_START(P720T, "ARM-Prospector720T")
 	.init_early	= p720t_init_early,
 	.init_machine	= p720t_init,
 	.init_late	= p720t_init_late,
+	.nr_irqs	= CLPS711X_NR_IRQS,
 	.init_irq	= clps711x_init_irq,
 	.restart	= clps711x_restart,
 	.timer		= &clps711x_timer,
Signature · 1 line
1.7.8.6
#8 lore raw

PATCH 9/15 ARM: clps711x: Implement usage "MULTI_IRQ_HANDLER" kernel option for a platform

In reply to Alexander Shiyan
---
 arch/arm/Kconfig                                  |    1 +
 arch/arm/mach-clps711x/autcpu12.c                 |    1 +
 arch/arm/mach-clps711x/cdb89712.c                 |    1 +
 arch/arm/mach-clps711x/clep7312.c                 |    1 +
 arch/arm/mach-clps711x/common.c                   |   39 ++++++++++++++++
 arch/arm/mach-clps711x/common.h                   |    3 +-
 arch/arm/mach-clps711x/edb7211.c                  |    1 +
 arch/arm/mach-clps711x/fortunet.c                 |    1 +
 arch/arm/mach-clps711x/include/mach/entry-macro.S |   51 ---------------------
 arch/arm/mach-clps711x/p720t.c                    |    1 +
 10 files changed, 48 insertions(+), 52 deletions(-)
 delete mode 100644 arch/arm/mach-clps711x/include/mach/entry-macro.S
arch/arm/Kconfig +1 -0
index 34ca399..2ee4b14 100644
@@ -375,6 +375,7 @@ config ARCH_CLPS711X
 	select COMMON_CLK
 	select CPU_ARM720T
 	select GENERIC_CLOCKEVENTS
+	select MULTI_IRQ_HANDLER
 	select NEED_MACH_MEMORY_H
 	select SPARSE_IRQ
 	help
arch/arm/mach-clps711x/autcpu12.c +1 -0
index 6a4752b..8f9b2e0 100644
@@ -78,6 +78,7 @@ MACHINE_START(AUTCPU12, "autronix autcpu12")
 	.init_machine	= autcpu12_init,
 	.nr_irqs	= CLPS711X_NR_IRQS,
 	.init_irq	= clps711x_init_irq,
+	.handle_irq	= clps711x_handle_irq,
 	.restart	= clps711x_restart,
 	.timer		= &clps711x_timer,
 MACHINE_END
arch/arm/mach-clps711x/cdb89712.c +1 -0
index a526715..88de144 100644
@@ -144,6 +144,7 @@ MACHINE_START(CDB89712, "Cirrus-CDB89712")
 	.init_machine	= cdb89712_init,
 	.nr_irqs	= CLPS711X_NR_IRQS,
 	.init_irq	= clps711x_init_irq,
+	.handle_irq	= clps711x_handle_irq,
 	.restart	= clps711x_restart,
 	.timer		= &clps711x_timer,
 MACHINE_END
arch/arm/mach-clps711x/clep7312.c +1 -0
index c76363f..a6b808c 100644
@@ -47,6 +47,7 @@ MACHINE_START(CLEP7212, "Cirrus Logic 7212/7312")
 	.init_machine	= clep7312_init,
 	.nr_irqs	= CLPS711X_NR_IRQS,
 	.init_irq	= clps711x_init_irq,
+	.handle_irq	= clps711x_handle_irq,
 	.restart	= clps711x_restart,
 	.timer		= &clps711x_timer,
 MACHINE_END
arch/arm/mach-clps711x/common.c +39 -0
index 286d6e6..3cc0380 100644
@@ -29,6 +29,7 @@
 #include <linux/clockchips.h>
 #include <linux/clk-provider.h>
 
+#include <asm/exception.h>
 #include <asm/mach/map.h>
 #include <asm/mach/time.h>
 #include <asm/system_misc.h>
@@ -191,6 +192,44 @@ void __init clps711x_init_irq(void)
 	}
 }
 
+inline u32 fls16(u32 x)
+{
+	u32 r = 15;
+
+	if (!(x & 0xff00)) {
+		x <<= 8;
+		r -= 8;
+	}
+	if (!(x & 0xf000)) {
+		x <<= 4;
+		r -= 4;
+	}
+	if (!(x & 0xc000)) {
+		x <<= 2;
+		r -= 2;
+	}
+	if (!(x & 0x8000))
+		r--;
+
+	return r;
+}
+
+asmlinkage void __exception_irq_entry clps711x_handle_irq(struct pt_regs *regs)
+{
+	u32 irqstat;
+	void __iomem *base = CLPS711X_VIRT_BASE;
+
+	irqstat = readl_relaxed(base + INTSR1) & readl_relaxed(base + INTMR1);
+	if (irqstat) {
+		handle_IRQ(fls16(irqstat), regs);
+		return;
+	}
+
+	irqstat = readl_relaxed(base + INTSR2) & readl_relaxed(base + INTMR2);
+	if (likely(irqstat))
+		handle_IRQ(fls16(irqstat) + 16, regs);
+}
+
 static void clps711x_clockevent_set_mode(enum clock_event_mode mode,
 					 struct clock_event_device *evt)
 {
arch/arm/mach-clps711x/common.h +2 -1
index 9757b3e..9d3e9db 100644
@@ -12,5 +12,6 @@ struct sys_timer;
 
 extern void clps711x_map_io(void);
 extern void clps711x_init_irq(void);
-extern struct sys_timer clps711x_timer;
+extern void clps711x_handle_irq(struct pt_regs *regs);
 extern void clps711x_restart(char mode, const char *cmd);
+extern struct sys_timer clps711x_timer;
arch/arm/mach-clps711x/edb7211.c +1 -0
index 43a502b..5a43160 100644
@@ -100,6 +100,7 @@ MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)")
 	.init_machine	= edb7211_init,
 	.nr_irqs	= CLPS711X_NR_IRQS,
 	.init_irq	= clps711x_init_irq,
+	.handle_irq	= clps711x_handle_irq,
 	.restart	= clps711x_restart,
 	.timer		= &clps711x_timer,
 MACHINE_END
arch/arm/mach-clps711x/fortunet.c +1 -0
index dca69c3..72c3745 100644
@@ -85,6 +85,7 @@ MACHINE_START(FORTUNET, "ARM-FortuNet")
 	.init_machine	= fortunet_init,
 	.nr_irqs	= CLPS711X_NR_IRQS,
 	.init_irq	= clps711x_init_irq,
+	.handle_irq	= clps711x_handle_irq,
 	.restart	= clps711x_restart,
 	.timer		= &clps711x_timer,
 MACHINE_END
arch/arm/mach-clps711x/include/mach/entry-macro.S deleted +0 -51

51 lines not on this page · raw message

arch/arm/mach-clps711x/p720t.c +1 -0
index 4383ad8..0b329c3 100644
@@ -149,6 +149,7 @@ MACHINE_START(P720T, "ARM-Prospector720T")
 	.init_late	= p720t_init_late,
 	.nr_irqs	= CLPS711X_NR_IRQS,
 	.init_irq	= clps711x_init_irq,
+	.handle_irq	= clps711x_handle_irq,
 	.restart	= clps711x_restart,
 	.timer		= &clps711x_timer,
 MACHINE_END
Signature · 1 line
1.7.8.6
#9 lore raw

PATCH 10/15 ARM: clps711x: Add FIQ interrupt handling

In reply to Alexander Shiyan

CLPS711X-target CPU can have a several FIQ interrupts. With this patch we adds handling for a one which will be used for ALSA PCM later. Since FIQ have a separate handler we only add "mask" and "unmask" calls which will used for enable/disable_irq functions.

---
 arch/arm/mach-clps711x/common.c                |   37 ++++++++++++++++++++++-
 arch/arm/mach-clps711x/common.h                |    2 +-
 arch/arm/mach-clps711x/include/mach/clps711x.h |    3 ++
 3 files changed, 39 insertions(+), 3 deletions(-)
arch/arm/mach-clps711x/common.c +35 -2
index 3cc0380..c5d0c63 100644
@@ -30,6 +30,7 @@
 #include <linux/clk-provider.h>
 
 #include <asm/exception.h>
+#include <asm/mach/irq.h>
 #include <asm/mach/map.h>
 #include <asm/mach/time.h>
 #include <asm/system_misc.h>
@@ -91,7 +92,7 @@ static void int1_unmask(struct irq_data *d)
 }
 
 static struct irq_chip int1_chip = {
-	.name		= "Interrupt Vector 1  ",
+	.name		= "Interrupt Vector 1",
 	.irq_ack	= int1_ack,
 	.irq_eoi	= int1_eoi,
 	.irq_mask	= int1_mask,
@@ -128,13 +129,37 @@ static void int2_unmask(struct irq_data *d)
 }
 
 static struct irq_chip int2_chip = {
-	.name		= "Interrupt Vector 2  ",
+	.name		= "Interrupt Vector 2",
 	.irq_ack	= int2_ack,
 	.irq_eoi	= int2_eoi,
 	.irq_mask	= int2_mask,
 	.irq_unmask	= int2_unmask,
 };
 
+static void int3_mask(struct irq_data *d)
+{
+	u32 intmr3;
+
+	intmr3 = clps_readl(INTMR3);
+	intmr3 &= ~(1 << (d->irq - 32));
+	clps_writel(intmr3, INTMR3);
+}
+
+static void int3_unmask(struct irq_data *d)
+{
+	u32 intmr3;
+
+	intmr3 = clps_readl(INTMR3);
+	intmr3 |= 1 << (d->irq - 32);
+	clps_writel(intmr3, INTMR3);
+}
+
+static struct irq_chip int3_chip = {
+	.name		= "Interrupt Vector 3",
+	.irq_mask	= int3_mask,
+	.irq_unmask	= int3_unmask,
+};
+
 struct clps711x_irqdesc {
 	int			nr;
 	struct irq_chip		*chip;
@@ -190,6 +215,14 @@ void __init clps711x_init_irq(void)
 		set_irq_flags(clps711x_irqdescs[i].nr,
 			      IRQF_VALID | IRQF_PROBE);
 	}
+
+	if (IS_ENABLED(CONFIG_FIQ)) {
+		irq_set_chip_and_handler(IRQ_DAIINT, &int3_chip,
+					 handle_bad_irq);
+		set_irq_flags(IRQ_DAIINT,
+			      IRQF_VALID | IRQF_PROBE | IRQF_NOAUTOEN);
+		init_FIQ(0);
+	}
 }
 
 inline u32 fls16(u32 x)
arch/arm/mach-clps711x/common.h +1 -1
index 9d3e9db..d12d647 100644
@@ -4,7 +4,7 @@
  * Common bits.
  */
 
-#define CLPS711X_NR_IRQS	(30)
+#define CLPS711X_NR_IRQS	(33)
 #define CLPS711X_NR_GPIO	(4 * 8 + 3)
 #define CLPS711X_GPIO(port,bit)	((port) * 8 + (bit))
 
arch/arm/mach-clps711x/include/mach/clps711x.h +3 -0
index 1f4728d..01d1b95 100644
@@ -298,4 +298,7 @@
 #define IRQ_UTXINT2		(16 + 12)
 #define IRQ_URXINT2		(16 + 13)
 
+/* INTSR3 Interrupts */
+#define IRQ_DAIINT		(32 + 0)
+
 #endif /* __MACH_CLPS711X_H */
Signature · 1 line
1.7.8.6
#10 lore raw

PATCH 11/15 ARM: clps711x: Unused empty "ACK" calls for IRQ-chips removed

In reply to Alexander Shiyan
---
 arch/arm/mach-clps711x/common.c |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)
arch/arm/mach-clps711x/common.c +0 -10
index c5d0c63..14beac5 100644
@@ -66,10 +66,6 @@ static void int1_mask(struct irq_data *d)
 	clps_writel(intmr1, INTMR1);
 }
 
-static void int1_ack(struct irq_data *d)
-{
-}
-
 static void int1_eoi(struct irq_data *d)
 {
 	switch (d->irq) {
@@ -93,7 +89,6 @@ static void int1_unmask(struct irq_data *d)
 
 static struct irq_chip int1_chip = {
 	.name		= "Interrupt Vector 1",
-	.irq_ack	= int1_ack,
 	.irq_eoi	= int1_eoi,
 	.irq_mask	= int1_mask,
 	.irq_unmask	= int1_unmask,
@@ -108,10 +103,6 @@ static void int2_mask(struct irq_data *d)
 	clps_writel(intmr2, INTMR2);
 }
 
-static void int2_ack(struct irq_data *d)
-{
-}
-
 static void int2_eoi(struct irq_data *d)
 {
 	switch (d->irq) {
@@ -130,7 +121,6 @@ static void int2_unmask(struct irq_data *d)
 
 static struct irq_chip int2_chip = {
 	.name		= "Interrupt Vector 2",
-	.irq_ack	= int2_ack,
 	.irq_eoi	= int2_eoi,
 	.irq_mask	= int2_mask,
 	.irq_unmask	= int2_unmask,
Signature · 1 line
1.7.8.6
#11 lore raw

PATCH 12/15 ARM: clps711x: autcpu12: Special driver for handling NAND memory is removed

In reply to Alexander Shiyan

This patch provide migration to using "gpio-nand" and "basic-mmio-gpio" drivers instead of using special driver for handling NAND memory.

---
 arch/arm/mach-clps711x/autcpu12.c              |   99 ++++++++++
 arch/arm/mach-clps711x/include/mach/autcpu12.h |   10 -
 drivers/mtd/nand/Kconfig                       |    7 -
 drivers/mtd/nand/Makefile                      |    1 -
 drivers/mtd/nand/autcpu12.c                    |  237 ------------------------
 5 files changed, 99 insertions(+), 255 deletions(-)
 delete mode 100644 drivers/mtd/nand/autcpu12.c
arch/arm/mach-clps711x/autcpu12.c +99 -0
index 8f9b2e0..8e2f61b 100644
@@ -23,9 +23,13 @@
 #include <linux/string.h>
 #include <linux/mm.h>
 #include <linux/io.h>
+#include <linux/gpio.h>
 #include <linux/ioport.h>
 #include <linux/interrupt.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/nand-gpio.h>
 #include <linux/platform_device.h>
+#include <linux/basic_mmio_gpio.h>
 
 #include <mach/hardware.h>
 #include <asm/sizes.h>
@@ -43,6 +47,15 @@
 #define AUTCPU12_CS8900_BASE	(CS2_PHYS_BASE + 0x300)
 #define AUTCPU12_CS8900_IRQ	(IRQ_EINT3)
 
+#define AUTCPU12_SMC_BASE	(CS1_PHYS_BASE + 0x06000000)
+#define AUTCPU12_SMC_SEL_BASE	(AUTCPU12_SMC_BASE + 0x10)
+
+#define AUTCPU12_MMGPIO_BASE	(CLPS711X_NR_GPIO)
+#define AUTCPU12_SMC_NCE	(AUTCPU12_MMGPIO_BASE + 0) /* Bit 0 */
+#define AUTCPU12_SMC_RDY	CLPS711X_GPIO(1, 2)
+#define AUTCPU12_SMC_ALE	CLPS711X_GPIO(1, 3)
+#define AUTCPU12_SMC_CLE	CLPS711X_GPIO(1, 3)
+
 static struct resource autcpu12_cs8900_resource[] __initdata = {
 	DEFINE_RES_MEM(AUTCPU12_CS8900_BASE, SZ_1K),
 	DEFINE_RES_IRQ(AUTCPU12_CS8900_IRQ),
@@ -59,6 +72,81 @@ static struct platform_device autcpu12_nvram_pdev __initdata = {
 	.num_resources	= ARRAY_SIZE(autcpu12_nvram_resource),
 };
 
+static struct resource autcpu12_nand_resource[] __initdata = {
+	DEFINE_RES_MEM(AUTCPU12_SMC_BASE, SZ_16),
+};
+
+static struct mtd_partition autcpu12_nand_parts[] __initdata = {
+	{
+		.name	= "AUTCPU12 flash partition 1",
+		.offset	= 0,
+		.size	= SZ_8M,
+	},
+	{
+		.name	= "AUTCPU12 flash partition 2",
+		.offset	= MTDPART_OFS_APPEND,
+		.size	= MTDPART_SIZ_FULL,
+	},
+};
+
+static void __init autcpu12_adjust_parts(struct gpio_nand_platdata *pdata,
+					 size_t sz)
+{
+	switch (sz) {
+	case SZ_16M:
+	case SZ_32M:
+		break;
+	case SZ_64M:
+	case SZ_128M:
+		pdata->parts[0].size = SZ_16M;
+		break;
+	default:
+		pr_warn("Unsupported SmartMedia device size %u\n", sz);
+		break;
+	}
+}
+
+static struct gpio_nand_platdata autcpu12_nand_pdata __initdata = {
+	.gpio_rdy	= AUTCPU12_SMC_RDY,
+	.gpio_nce	= AUTCPU12_SMC_NCE,
+	.gpio_ale	= AUTCPU12_SMC_ALE,
+	.gpio_cle	= AUTCPU12_SMC_CLE,
+	.gpio_nwp	= -1,
+	.chip_delay	= 20,
+	.parts		= autcpu12_nand_parts,
+	.num_parts	= ARRAY_SIZE(autcpu12_nand_parts),
+	.adjust_parts	= autcpu12_adjust_parts,
+};
+
+static struct platform_device autcpu12_nand __initdata = {
+	.name		= "gpio-nand",
+	.id		= -1,
+	.resource	= autcpu12_nand_resource,
+	.num_resources	= ARRAY_SIZE(autcpu12_nand_resource),
+	.dev		= {
+		.platform_data = &autcpu12_nand_pdata,
+	},
+};
+
+static struct resource autcpu12_mmgpio_resource[] __initdata = {
+	DEFINE_RES_MEM_NAMED(AUTCPU12_SMC_SEL_BASE, SZ_1, "dat"),
+};
+
+static struct bgpio_pdata autcpu12_mmgpio_pdata __initdata = {
+	.base	= AUTCPU12_MMGPIO_BASE,
+	.ngpio	= 8,
+};
+
+static struct platform_device autcpu12_mmgpio __initdata = {
+	.name		= "basic-mmio-gpio",
+	.id		= -1,
+	.resource	= autcpu12_mmgpio_resource,
+	.num_resources	= ARRAY_SIZE(autcpu12_mmgpio_resource),
+	.dev		= {
+		.platform_data = &autcpu12_mmgpio_pdata,
+	},
+};
+
 static void __init autcpu12_init(void)
 {
 	platform_device_register_simple("uart-clps711x", 0, NULL, 0);
@@ -68,14 +156,25 @@ static void __init autcpu12_init(void)
 	platform_device_register_simple("cs89x0", 0, autcpu12_cs8900_resource,
 					ARRAY_SIZE(autcpu12_cs8900_resource));
 
+	platform_device_register(&autcpu12_mmgpio);
+
 	platform_device_register(&autcpu12_nvram_pdev);
 }
 
+static void __init autcpu12_init_late(void)
+{
+	if (IS_ENABLED(MTD_NAND_GPIO) && IS_ENABLED(GPIO_GENERIC_PLATFORM)) {
+		/* We are need both drivers to handle NAND */
+		platform_device_register(&autcpu12_nand);
+	}
+}
+
 MACHINE_START(AUTCPU12, "autronix autcpu12")
 	/* Maintainer: Thomas Gleixner */
 	.atag_offset	= 0x20000,
 	.map_io		= clps711x_map_io,
 	.init_machine	= autcpu12_init,
+	.init_late	= autcpu12_init_late,
 	.nr_irqs	= CLPS711X_NR_IRQS,
 	.init_irq	= clps711x_init_irq,
 	.handle_irq	= clps711x_handle_irq,
arch/arm/mach-clps711x/include/mach/autcpu12.h +0 -10
index b077abd..0452f5f 100644
@@ -40,8 +40,6 @@
 
 #define AUTCPU12_PHYS_CSAUX1           	CS1_PHYS_BASE +0x04000000  /* physical */
 
-#define AUTCPU12_PHYS_SMC              	CS1_PHYS_BASE +0x06000000  /* physical */
-
 #define AUTCPU12_PHYS_CAN              	CS1_PHYS_BASE +0x08000000  /* physical */
 
 #define AUTCPU12_PHYS_TOUCH            	CS1_PHYS_BASE +0x0A000000  /* physical */
@@ -50,14 +48,6 @@
 
 #define AUTCPU12_PHYS_LPT              	CS1_PHYS_BASE +0x0E000000  /* physical */
 
-/* 
-* defines for smartmedia card access 
-*/
-#define AUTCPU12_SMC_RDY		(1<<2)
-#define AUTCPU12_SMC_ALE		(1<<3)
-#define AUTCPU12_SMC_CLE  		(1<<4)
-#define AUTCPU12_SMC_PORT_OFFSET	PBDR
-#define AUTCPU12_SMC_SELECT_OFFSET 	0x10
 /*
 * defines for lcd contrast 
 */
drivers/mtd/nand/Kconfig +0 -7
index a803d9b..7aff98a 100644
@@ -49,13 +49,6 @@ config MTD_NAND_MUSEUM_IDS
 	  NAND chips (page size 256 byte, erase size 4-8KiB). The IDs
 	  of these chips were reused by later, larger chips.
 
-config MTD_NAND_AUTCPU12
-	tristate "SmartMediaCard on autronix autcpu12 board"
-	depends on ARCH_AUTCPU12
-	help
-	  This enables the driver for the autronix autcpu12 board to
-	  access the SmartMediaCard.
-
 config MTD_NAND_DENALI
         tristate "Support Denali NAND controller"
         help
drivers/mtd/nand/Makefile +0 -1
index 44fca05..d2bd10b 100644
@@ -11,7 +11,6 @@ obj-$(CONFIG_MTD_SM_COMMON) 		+= sm_common.o
 obj-$(CONFIG_MTD_NAND_CAFE)		+= cafe_nand.o
 obj-$(CONFIG_MTD_NAND_SPIA)		+= spia.o
 obj-$(CONFIG_MTD_NAND_AMS_DELTA)	+= ams-delta.o
-obj-$(CONFIG_MTD_NAND_AUTCPU12)		+= autcpu12.o
 obj-$(CONFIG_MTD_NAND_DENALI)		+= denali.o
 obj-$(CONFIG_MTD_NAND_DENALI_PCI)	+= denali_pci.o
 obj-$(CONFIG_MTD_NAND_DENALI_DT)	+= denali_dt.o
drivers/mtd/nand/autcpu12.c deleted +0 -237

237 lines not on this page · raw message

Signature · 1 line
1.7.8.6
#12 lore raw

PATCH 13/15 ARM: clps711x: Rename board files to match functionality

In reply to Alexander Shiyan
---
 arch/arm/mach-clps711x/Makefile                    |   12 ++++++------
 .../mach-clps711x/{autcpu12.c => board-autcpu12.c} |    0
 .../mach-clps711x/{cdb89712.c => board-cdb89712.c} |    0
 .../mach-clps711x/{clep7312.c => board-clep7312.c} |    0
 .../mach-clps711x/{edb7211.c => board-edb7211.c}   |    0
 .../mach-clps711x/{fortunet.c => board-fortunet.c} |    0
 arch/arm/mach-clps711x/{p720t.c => board-p720t.c}  |    0
 7 files changed, 6 insertions(+), 6 deletions(-)
 rename arch/arm/mach-clps711x/{autcpu12.c => board-autcpu12.c} (100%)
 rename arch/arm/mach-clps711x/{cdb89712.c => board-cdb89712.c} (100%)
 rename arch/arm/mach-clps711x/{clep7312.c => board-clep7312.c} (100%)
 rename arch/arm/mach-clps711x/{edb7211.c => board-edb7211.c} (100%)
 rename arch/arm/mach-clps711x/{fortunet.c => board-fortunet.c} (100%)
 rename arch/arm/mach-clps711x/{p720t.c => board-p720t.c} (100%)
arch/arm/mach-clps711x/Makefile +6 -6
index 9cf2d1c..992995a 100644
@@ -9,9 +9,9 @@ obj-m			:=
 obj-n			:=
 obj-			:=
 
-obj-$(CONFIG_ARCH_AUTCPU12) += autcpu12.o
-obj-$(CONFIG_ARCH_CDB89712) += cdb89712.o
-obj-$(CONFIG_ARCH_CLEP7312) += clep7312.o
-obj-$(CONFIG_ARCH_EDB7211)  += edb7211.o
-obj-$(CONFIG_ARCH_FORTUNET) += fortunet.o
-obj-$(CONFIG_ARCH_P720T)    += p720t.o
+obj-$(CONFIG_ARCH_AUTCPU12)	+= board-autcpu12.o
+obj-$(CONFIG_ARCH_CDB89712)	+= board-cdb89712.o
+obj-$(CONFIG_ARCH_CLEP7312)	+= board-clep7312.o
+obj-$(CONFIG_ARCH_EDB7211)	+= board-edb7211.o
+obj-$(CONFIG_ARCH_FORTUNET)	+= board-fortunet.o
+obj-$(CONFIG_ARCH_P720T)	+= board-p720t.o
arch/arm/mach-clps711x/board-autcpu12.c renamed from arch/arm/mach-clps711x/autcpu12.c +0 -0
similarity index 100%
rename from arch/arm/mach-clps711x/autcpu12.c
rename to arch/arm/mach-clps711x/board-autcpu12.c
arch/arm/mach-clps711x/board-cdb89712.c renamed from arch/arm/mach-clps711x/cdb89712.c +0 -0
similarity index 100%
rename from arch/arm/mach-clps711x/cdb89712.c
rename to arch/arm/mach-clps711x/board-cdb89712.c
arch/arm/mach-clps711x/board-clep7312.c renamed from arch/arm/mach-clps711x/clep7312.c +0 -0
similarity index 100%
rename from arch/arm/mach-clps711x/clep7312.c
rename to arch/arm/mach-clps711x/board-clep7312.c
arch/arm/mach-clps711x/board-edb7211.c renamed from arch/arm/mach-clps711x/edb7211.c +0 -0
similarity index 100%
rename from arch/arm/mach-clps711x/edb7211.c
rename to arch/arm/mach-clps711x/board-edb7211.c
arch/arm/mach-clps711x/board-fortunet.c renamed from arch/arm/mach-clps711x/fortunet.c +0 -0
similarity index 100%
rename from arch/arm/mach-clps711x/fortunet.c
rename to arch/arm/mach-clps711x/board-fortunet.c
arch/arm/mach-clps711x/board-p720t.c renamed from arch/arm/mach-clps711x/p720t.c +0 -0
similarity index 100%
rename from arch/arm/mach-clps711x/p720t.c
rename to arch/arm/mach-clps711x/board-p720t.c
Signature · 1 line
1.7.8.6
#13 lore raw

PATCH 14/15 ARM: clps711x: Update defconfig due latest changes and new kernel symbols

In reply to Alexander Shiyan
---
 arch/arm/configs/clps711x_defconfig |   30 +++++++++++++++++++++---------
 1 files changed, 21 insertions(+), 9 deletions(-)
arch/arm/configs/clps711x_defconfig +21 -9
index 86209d1..1cd94c3 100644
@@ -1,10 +1,14 @@
-CONFIG_EXPERIMENTAL=y
+CONFIG_KERNEL_LZMA=y
 CONFIG_SYSVIPC=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_BLK_DEV_INITRD=y
+CONFIG_RD_LZMA=y
 CONFIG_EMBEDDED=y
+CONFIG_SLOB=y
+CONFIG_JUMP_LABEL=y
+# CONFIG_LBDAF is not set
 CONFIG_PARTITION_ADVANCED=y
-# CONFIG_MSDOS_PARTITION is not set
+# CONFIG_IOSCHED_CFQ is not set
 CONFIG_ARCH_CLPS711X=y
 CONFIG_ARCH_AUTCPU12=y
 CONFIG_ARCH_CDB89712=y
@@ -12,8 +16,10 @@ CONFIG_ARCH_CLEP7312=y
 CONFIG_ARCH_EDB7211=y
 CONFIG_ARCH_P720T=y
 CONFIG_ARCH_FORTUNET=y
+CONFIG_AEABI=y
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
+# CONFIG_COREDUMP is not set
 CONFIG_NET=y
 CONFIG_PACKET=y
 CONFIG_UNIX=y
@@ -22,6 +28,7 @@ CONFIG_INET=y
 CONFIG_IRDA=y
 CONFIG_IRTTY_SIR=y
 CONFIG_EP7211_DONGLE=y
+# CONFIG_WIRELESS is not set
 CONFIG_MTD=y
 CONFIG_MTD_CMDLINE_PARTS=y
 CONFIG_MTD_CHAR=y
@@ -31,24 +38,21 @@ CONFIG_MTD_JEDECPROBE=y
 CONFIG_MTD_CFI_INTELEXT=y
 CONFIG_MTD_CFI_AMDSTD=y
 CONFIG_MTD_CFI_STAA=y
-CONFIG_MTD_CDB89712=y
 CONFIG_MTD_AUTCPU12=y
 CONFIG_MTD_PLATRAM=y
-CONFIG_BLK_DEV_RAM=y
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_GPIO=y
 CONFIG_NETDEVICES=y
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_NET_VENDOR_AMD is not set
+# CONFIG_NET_CADENCE is not set
 # CONFIG_NET_VENDOR_BROADCOM is not set
 # CONFIG_NET_VENDOR_CHELSIO is not set
 CONFIG_CS89x0=y
+CONFIG_CS89x0_PLATFORM=y
 # CONFIG_NET_VENDOR_FARADAY is not set
-# CONFIG_NET_VENDOR_FUJITSU is not set
-# CONFIG_NET_VENDOR_HP is not set
 # CONFIG_NET_VENDOR_INTEL is not set
 # CONFIG_NET_VENDOR_MARVELL is not set
 # CONFIG_NET_VENDOR_MICREL is not set
 # CONFIG_NET_VENDOR_NATSEMI is not set
-# CONFIG_NET_VENDOR_RACAL is not set
 # CONFIG_NET_VENDOR_SEEQ is not set
 # CONFIG_NET_VENDOR_SMSC is not set
 # CONFIG_NET_VENDOR_STMICRO is not set
@@ -59,14 +63,22 @@ CONFIG_CS89x0=y
 # CONFIG_VT is not set
 CONFIG_SERIAL_CLPS711X_CONSOLE=y
 # CONFIG_HW_RANDOM is not set
+CONFIG_SPI=y
+CONFIG_GPIO_GENERIC_PLATFORM=y
 # CONFIG_HWMON is not set
 CONFIG_FB=y
 CONFIG_FB_CLPS711X=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_PLATFORM=y
 # CONFIG_USB_SUPPORT is not set
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
 # CONFIG_IOMMU_SUPPORT is not set
 CONFIG_EXT2_FS=y
+CONFIG_CRAMFS=y
 CONFIG_MINIX_FS=y
 # CONFIG_NETWORK_FILESYSTEMS is not set
 # CONFIG_FTRACE is not set
Signature · 1 line
1.7.8.6
#14 lore raw

PATCH 15/15 MAINTAINERS: Add ARM CLPS711X entry

In reply to Alexander Shiyan
---
 MAINTAINERS |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
MAINTAINERS +6 -0
index 307d822..1cc6a09 100644
@@ -707,6 +707,12 @@ S:	Maintained
 F:	arch/arm/mach-cns3xxx/
 T:	git git://git.infradead.org/users/cbou/linux-cns3xxx.git
 
+ARM/CIRRUS LOGIC CLPS711X ARM ARCHITECTURE
+M:	Alexander Shiyan <[email protected]>
+L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
+S:	Odd Fixes
+F:	arch/arm/mach-clps711x/
+
 ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE
 M:	Hartley Sweeten <[email protected]>
 M:	Ryan Mallon <[email protected]>
Signature · 1 line
1.7.8.6
#15 lore raw

cover ARM: Patchset for CLPS711X

In reply to Alexander Shiyan

Here is a next small patchset for a CLPS711X-target.
The main direction of this patchset - approaching the platform to the possibility of using configurations with multiple platforms in a single kernel. Added support of the majority of the necessary kernel symbol. Also part of the driver code used only for the platform was moved to the board code and converted to the use of standard drivers.

Alexander Shiyan (15):
ARM: clps711x: Load serial driver from boards
ARM: clps711x: Using platform_driver for ethernet device
ARM: clps711x: p720t: Using "leds-gpio" driver for LED control
ARM: clps711x: Transform clps711x-framebuffer to platform driver and
use it
ARM: clps711x: p720t: Unneeded inclusion of head-sa1100.S removed
ARM: clps711x: Always select AUTO_ZRELADDR for a platform
ARM: clps711x: cdb89712: Special driver for handling memory is
removed
ARM: clps711x: Implement usage "SPARSE_IRQ" kernel option for a
platform
ARM: clps711x: Implement usage "MULTI_IRQ_HANDLER" kernel option for
a platform
ARM: clps711x: Add FIQ interrupt handling
ARM: clps711x: Unused empty "ACK" calls for IRQ-chips removed
ARM: clps711x: autcpu12: Special driver for handling NAND memory is
removed
ARM: clps711x: Rename board files to match functionality
ARM: clps711x: Update defconfig due latest changes and new kernel
symbols
MAINTAINERS: Add ARM CLPS711X entry

 MAINTAINERS                                        |    6 +
 arch/arm/Kconfig                                   |    3 +
 arch/arm/boot/compressed/Makefile                  |    5 -
 arch/arm/configs/clps711x_defconfig                |   30 ++-
 arch/arm/mach-clps711x/Kconfig                     |    2 -
 arch/arm/mach-clps711x/Makefile                    |   12 +-
 arch/arm/mach-clps711x/Makefile.boot               |    1 -
 arch/arm/mach-clps711x/autcpu12.c                  |   83 ------
 arch/arm/mach-clps711x/board-autcpu12.c            |  183 +++++++++++++
 arch/arm/mach-clps711x/board-cdb89712.c            |  150 +++++++++++
 .../mach-clps711x/{clep7312.c => board-clep7312.c} |   11 +-
 .../mach-clps711x/{edb7211.c => board-edb7211.c}   |   34 ++-
 .../mach-clps711x/{fortunet.c => board-fortunet.c} |   11 +-
 arch/arm/mach-clps711x/{p720t.c => board-p720t.c}  |   82 +++----
 arch/arm/mach-clps711x/cdb89712.c                  |   63 -----
 arch/arm/mach-clps711x/common.c                    |   86 ++++++-
 arch/arm/mach-clps711x/common.h                    |    7 +-
 arch/arm/mach-clps711x/include/mach/autcpu12.h     |   13 -
 arch/arm/mach-clps711x/include/mach/clps711x.h     |   24 ++
 arch/arm/mach-clps711x/include/mach/entry-macro.S  |   51 ----
 arch/arm/mach-clps711x/include/mach/hardware.h     |   12 +-
 arch/arm/mach-clps711x/include/mach/irqs.h         |   46 ----
 drivers/mtd/maps/Kconfig                           |    7 -
 drivers/mtd/maps/Makefile                          |    1 -
 drivers/mtd/maps/cdb89712.c                        |  278 --------------------
 drivers/mtd/nand/Kconfig                           |    7 -
 drivers/mtd/nand/Makefile                          |    1 -
 drivers/mtd/nand/autcpu12.c                        |  237 -----------------
 drivers/tty/serial/clps711x.c                      |   16 --
 drivers/video/clps711xfb.c                         |   21 +-
 30 files changed, 567 insertions(+), 916 deletions(-)
 delete mode 100644 arch/arm/mach-clps711x/autcpu12.c
 create mode 100644 arch/arm/mach-clps711x/board-autcpu12.c
 create mode 100644 arch/arm/mach-clps711x/board-cdb89712.c
 rename arch/arm/mach-clps711x/{clep7312.c => board-clep7312.c} (85%)
 rename arch/arm/mach-clps711x/{edb7211.c => board-edb7211.c} (75%)
 rename arch/arm/mach-clps711x/{fortunet.c => board-fortunet.c} (89%)
 rename arch/arm/mach-clps711x/{p720t.c => board-p720t.c} (74%)
 delete mode 100644 arch/arm/mach-clps711x/cdb89712.c
 delete mode 100644 arch/arm/mach-clps711x/include/mach/entry-macro.S
 delete mode 100644 arch/arm/mach-clps711x/include/mach/irqs.h
 delete mode 100644 drivers/mtd/maps/cdb89712.c
 delete mode 100644 drivers/mtd/nand/autcpu12.c
Signature · 1 line
1.7.8.6
#16 lore raw

cover ARM: Patchset for CLPS711X

Quoted 6 lines · Alexander Shiyan

Here is a next small patchset for a CLPS711X-target.
The main direction of this patchset - approaching the platform to the possibility of using configurations with multiple platforms in a single kernel. Added support of the majority of the necessary kernel symbol. Also part of the driver code used only for the platform was moved to the board code and converted to the use of standard drivers.

Hi,

Based on the pending comments from Russell, I'll hold off merging these. Please repost with his comments addressed and I'll be happy to merge this set.

Thanks,

-Olof

#17 lore raw

PATCH 1/15 ARM: clps711x: Load serial driver from boards

In reply to Alexander Shiyan

arch/arm/mach-clps711x/autcpu12.c static struct platform_device autcpu12_nvram_pdev __initdata = { · line 83

Quoted 11 lines · Alexander Shiyan

MACHINE_START(AUTCPU12, "autronix autcpu12")

arch/arm/mach-clps711x/autcpu12.c +2 -2
 	/* Maintainer: Thomas Gleixner */
 	.atag_offset	= 0x20000,
-	.init_machine	= autcpu12_init,
 	.map_io		= autcpu12_map_io,
+	.init_machine	= autcpu12_init,
 	.init_irq	= clps711x_init_irq,
-	.timer		= &clps711x_timer,
 	.restart	= clps711x_restart,
+	.timer		= &clps711x_timer,
 MACHINE_END

NAK. If you're going to sort them, arrange them in the same order as in the structure declaration in mach/arch.h. That's the order in which the functions will be called.

IOW, changing the order of .timer to be after .restart is wrong, .restart should be the last. .timer should be immediately before .init_machine. .init_irq should be immediately before .timer.

#18 lore raw

PATCH 1/15 ARM: clps711x: Load serial driver from boards

Quoted 17 lines · On Thu, 1 Nov 2012 12:27:31 +0000 Russell King - ARM Linux…

arch/arm/mach-clps711x/autcpu12.c static struct platform_device autcpu12_nvram_pdev __initdata = { · line 83

Quoted 11 lines · Alexander Shiyan

MACHINE_START(AUTCPU12, "autronix autcpu12")

arch/arm/mach-clps711x/autcpu12.c +2 -2
 	/* Maintainer: Thomas Gleixner */
 	.atag_offset	= 0x20000,
-	.init_machine	= autcpu12_init,
 	.map_io		= autcpu12_map_io,
+	.init_machine	= autcpu12_init,
 	.init_irq	= clps711x_init_irq,
-	.timer		= &clps711x_timer,
 	.restart	= clps711x_restart,
+	.timer		= &clps711x_timer,
 MACHINE_END

NAK. If you're going to sort them, arrange them in the same order as in the structure declaration in mach/arch.h. That's the order in which the functions will be called.

Quoted 3 lines

IOW, changing the order of .timer to be after .restart is wrong, .restart should be the last. .timer should be immediately before .init_machine. .init_irq should be immediately before .timer.

It's just sort by functionality and does not affect on operation. Original sort I will return in the next patch after applying it. Please comment on the rest of the patches in this series. Thanks.

Signature · 1 line
Alexander Shiyan <[email protected]>
#19 lore raw

PATCH 1/15 ARM: clps711x: Load serial driver from boards

Quoted 20 lines · Alexander Shiyan
Quoted 17 lines · On Thu, 1 Nov 2012 12:27:31 +0000 Russell King - ARM Linux…

arch/arm/mach-clps711x/autcpu12.c static struct platform_device autcpu12_nvram_pdev __initdata = { · line 83

Quoted 11 lines · Alexander Shiyan

MACHINE_START(AUTCPU12, "autronix autcpu12")

arch/arm/mach-clps711x/autcpu12.c +2 -2
 	/* Maintainer: Thomas Gleixner */
 	.atag_offset	= 0x20000,
-	.init_machine	= autcpu12_init,
 	.map_io		= autcpu12_map_io,
+	.init_machine	= autcpu12_init,
 	.init_irq	= clps711x_init_irq,
-	.timer		= &clps711x_timer,
 	.restart	= clps711x_restart,
+	.timer		= &clps711x_timer,
 MACHINE_END

NAK. If you're going to sort them, arrange them in the same order as in the structure declaration in mach/arch.h. That's the order in which the functions will be called.

Quoted 5 lines
Quoted 3 lines

IOW, changing the order of .timer to be after .restart is wrong, .restart should be the last. .timer should be immediately before .init_machine. .init_irq should be immediately before .timer.

It's just sort by functionality and does not affect on operation.

Please don't dream up different sorting criteral for structures; it's a _real_ pain if I have to go through all the platforms and change something (which I normally do in a scripted fashion) to have each sub-architecture choosing to do things differently.

Quoted 1 line

Original sort I will return in the next patch after applying it.

The original wasn't actually correct. As you're touching all of these, it would be a good time for _you_ to fix it. Please look at asm/mach/arch.h and ensure that all initializer fields are in the same order as those found in the structure declaration in mach-clps711x. Thanks.