Skip to contentSkip to conversation

add support for Marvell's Dove SoC

PATCH New Saeed Bishara 5 participants 20 messages Nov 24, 2009 – Dec 7, 2009

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover add support for Marvell's Dove SoC

This patch series adds support for the Marvell's Dove SoC (88AP510).

The following interfaces/features are enabled by this series:
CPU in ARMv6 mode
L2 Cache
Uart
Giga Ethernet
SPI
RTC
XOR dma engines
PCIE
USB
SATA
I2C
GPIO

#1 lore raw

PATCH 1/3 ARM: add base support for Marvell Dove SoC

The Marvell Dove (88AP510) is a high-performance, highly integrated, low power SoC with high-end ARM-compatible processor (known as PJ4), graphics processing unit, high-definition video decoding acceleration hardware, and a broad range of peripherals.

---
 arch/arm/Kconfig                              |   13 +
 arch/arm/Makefile                             |    1 +
 arch/arm/boot/compressed/head.S               |    6 +
 arch/arm/configs/dove_defconfig               | 1617 +++++++++++++++++++++++++
 arch/arm/mach-dove/Kconfig                    |   14 +
 arch/arm/mach-dove/Makefile                   |    3 +
 arch/arm/mach-dove/Makefile.boot              |    3 +
 arch/arm/mach-dove/addr-map.c                 |  149 +++
 arch/arm/mach-dove/common.c                   |  777 ++++++++++++
 arch/arm/mach-dove/common.h                   |   40 +
 arch/arm/mach-dove/dove-db-setup.c            |  102 ++
 arch/arm/mach-dove/include/mach/bridge-regs.h |   58 +
 arch/arm/mach-dove/include/mach/debug-macro.S |   20 +
 arch/arm/mach-dove/include/mach/dove.h        |  180 +++
 arch/arm/mach-dove/include/mach/entry-macro.S |   39 +
 arch/arm/mach-dove/include/mach/gpio.h        |   49 +
 arch/arm/mach-dove/include/mach/hardware.h    |   26 +
 arch/arm/mach-dove/include/mach/io.h          |   20 +
 arch/arm/mach-dove/include/mach/irqs.h        |  101 ++
 arch/arm/mach-dove/include/mach/memory.h      |   10 +
 arch/arm/mach-dove/include/mach/pm.h          |   54 +
 arch/arm/mach-dove/include/mach/system.h      |   36 +
 arch/arm/mach-dove/include/mach/timex.h       |    9 +
 arch/arm/mach-dove/include/mach/uncompress.h  |   37 +
 arch/arm/mach-dove/include/mach/vmalloc.h     |    6 +
 arch/arm/mach-dove/irq.c                      |  133 ++
 arch/arm/mach-dove/pcie.c                     |  238 ++++
 arch/arm/mm/Kconfig                           |    2 +-
 arch/arm/mm/proc-v6.S                         |   33 +-
 29 files changed, 3774 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/configs/dove_defconfig
 create mode 100644 arch/arm/mach-dove/Kconfig
 create mode 100644 arch/arm/mach-dove/Makefile
 create mode 100644 arch/arm/mach-dove/Makefile.boot
 create mode 100644 arch/arm/mach-dove/addr-map.c
 create mode 100644 arch/arm/mach-dove/common.c
 create mode 100644 arch/arm/mach-dove/common.h
 create mode 100644 arch/arm/mach-dove/dove-db-setup.c
 create mode 100644 arch/arm/mach-dove/include/mach/bridge-regs.h
 create mode 100644 arch/arm/mach-dove/include/mach/debug-macro.S
 create mode 100644 arch/arm/mach-dove/include/mach/dove.h
 create mode 100644 arch/arm/mach-dove/include/mach/entry-macro.S
 create mode 100644 arch/arm/mach-dove/include/mach/gpio.h
 create mode 100644 arch/arm/mach-dove/include/mach/hardware.h
 create mode 100644 arch/arm/mach-dove/include/mach/io.h
 create mode 100644 arch/arm/mach-dove/include/mach/irqs.h
 create mode 100644 arch/arm/mach-dove/include/mach/memory.h
 create mode 100644 arch/arm/mach-dove/include/mach/pm.h
 create mode 100644 arch/arm/mach-dove/include/mach/system.h
 create mode 100644 arch/arm/mach-dove/include/mach/timex.h
 create mode 100644 arch/arm/mach-dove/include/mach/uncompress.h
 create mode 100644 arch/arm/mach-dove/include/mach/vmalloc.h
 create mode 100644 arch/arm/mach-dove/irq.c
 create mode 100644 arch/arm/mach-dove/pcie.c
arch/arm/Kconfig +13 -0
index 1c4119c..7fae1ef 100644
@@ -433,6 +433,17 @@ config ARCH_L7200
 	  If you have any questions or comments about the Linux kernel port
 	  to this board, send e-mail to <[email protected]>.
 
+config ARCH_DOVE
+	bool "Marvell Dove"
+	select PCI
+	select GENERIC_GPIO
+	select ARCH_REQUIRE_GPIOLIB
+	select GENERIC_TIME
+	select GENERIC_CLOCKEVENTS
+	select PLAT_ORION
+	help
+	  Support for the Marvell Dove SoC 88AP510
+
 config ARCH_KIRKWOOD
 	bool "Marvell Kirkwood"
 	select CPU_FEROCEON
@@ -747,6 +758,8 @@ source "arch/arm/mach-orion5x/Kconfig"
 
 source "arch/arm/mach-kirkwood/Kconfig"
 
+source "arch/arm/mach-dove/Kconfig"
+
 source "arch/arm/plat-s3c24xx/Kconfig"
 source "arch/arm/plat-s3c64xx/Kconfig"
 source "arch/arm/plat-s3c/Kconfig"
arch/arm/Makefile +1 -0
index a73caaf..2ddc323 100644
@@ -122,6 +122,7 @@ machine-$(CONFIG_ARCH_AT91)		:= at91
 machine-$(CONFIG_ARCH_BCMRING)		:= bcmring
 machine-$(CONFIG_ARCH_CLPS711X)		:= clps711x
 machine-$(CONFIG_ARCH_DAVINCI)		:= davinci
+machine-$(CONFIG_ARCH_DOVE)		:= dove
 machine-$(CONFIG_ARCH_EBSA110)		:= ebsa110
 machine-$(CONFIG_ARCH_EP93XX)		:= ep93xx
 machine-$(CONFIG_ARCH_GEMINI)		:= gemini
arch/arm/boot/compressed/head.S +6 -0
index fa6fbf4..d356af7 100644
@@ -743,6 +743,12 @@ proc_types:
 		W(b)	__armv4_mmu_cache_off
 		W(b)	__armv6_mmu_cache_flush
 
+		.word	0x560f5810		@ Marvell PJ4 ARMv6
+		.word	0xff0ffff0
+		W(b)	__armv4_mmu_cache_on
+		W(b)	__armv4_mmu_cache_off
+		W(b)	__armv6_mmu_cache_flush
+
 		.word	0x000f0000		@ new CPU Id
 		.word	0x000f0000
 		W(b)	__armv7_mmu_cache_on
arch/arm/configs/dove_defconfig new file +1617 -0

1,617 lines not on this page · raw message

arch/arm/mach-dove/Kconfig new file +14 -0
new file mode 100644
index 0000000..3b9a32a
@@ -0,0 +1,14 @@
+if ARCH_DOVE
+
+menu "Marvell Dove Implementations"
+
+config MACH_DOVE_DB
+	bool "Marvell DB-MV88AP510 Development Board"
+	select I2C_BOARDINFO
+	help
+	  Say 'Y' here if you want your kernel to support the
+	  Marvell DB-MV88AP510 Development Board.
+
+endmenu
+
+endif
arch/arm/mach-dove/Makefile new file +3 -0
new file mode 100644
index 0000000..7ab3be5
@@ -0,0 +1,3 @@
+obj-y				+= common.o addr-map.o irq.o pcie.o
+
+obj-$(CONFIG_MACH_DOVE_DB)	+= dove-db-setup.o
arch/arm/mach-dove/Makefile.boot new file +3 -0
new file mode 100644
index 0000000..67039c3
@@ -0,0 +1,3 @@
+   zreladdr-y	:= 0x00008000
+params_phys-y	:= 0x00000100
+initrd_phys-y	:= 0x00800000
arch/arm/mach-dove/addr-map.c new file +149 -0

149 lines not on this page · raw message

arch/arm/mach-dove/common.c new file +777 -0

777 lines not on this page · raw message

arch/arm/mach-dove/common.h new file +40 -0
new file mode 100644
index 0000000..b29e893
@@ -0,0 +1,40 @@
+/*
+ * arch/arm/mach-dove/common.h
+ *
+ * Core functions for Marvell Dove 88AP510 System On Chip
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#ifndef __ARCH_DOVE_COMMON_H
+#define __ARCH_DOVE_COMMON_H
+
+struct mv643xx_eth_platform_data;
+struct mv_sata_platform_data;
+
+extern struct sys_timer dove_timer;
+extern struct mbus_dram_target_info dove_mbus_dram_info;
+
+/*
+ * Basic Dove init functions used early by machine-setup.
+ */
+void dove_map_io(void);
+void dove_init(void);
+void dove_init_irq(void);
+void dove_setup_cpu_mbus(void);
+void dove_ge00_init(struct mv643xx_eth_platform_data *eth_data);
+void dove_sata_init(struct mv_sata_platform_data *sata_data);
+void dove_pcie_init(int init_port0, int init_port1);
+void dove_ehci0_init(void);
+void dove_ehci1_init(void);
+void dove_uart0_init(void);
+void dove_uart1_init(void);
+void dove_uart2_init(void);
+void dove_uart3_init(void);
+void dove_spi0_init(void);
+void dove_spi1_init(void);
+void dove_i2c_init(void);
+
+#endif
arch/arm/mach-dove/dove-db-setup.c new file +102 -0

102 lines not on this page · raw message

arch/arm/mach-dove/include/mach/bridge-regs.h new file +58 -0

58 lines not on this page · raw message

arch/arm/mach-dove/include/mach/debug-macro.S new file +20 -0
new file mode 100644
index 0000000..9b89ec7
@@ -0,0 +1,20 @@
+/*
+ * arch/arm/mach-dove/include/mach/debug-macro.S
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <mach/bridge-regs.h>
+
+	.macro	addruart,rx
+	mrc	p15, 0, \rx, c1, c0
+	tst	\rx, #1					@ MMU enabled?
+	ldreq	\rx, =DOVE_SB_REGS_PHYS_BASE
+	ldrne	\rx, =DOVE_SB_REGS_VIRT_BASE
+	orr	\rx, \rx, #0x00012000
+	.endm
+
+#define UART_SHIFT	2
+#include <asm/hardware/debug-8250.S>
arch/arm/mach-dove/include/mach/dove.h new file +180 -0

173 lines not on this page · raw message

arch/arm/mach-dove/include/mach/entry-macro.S new file +39 -0
new file mode 100644
index 0000000..e84c78c

Lines of this file are not shown. View the raw message.

arch/arm/mach-dove/include/mach/gpio.h new file +49 -0

49 lines not on this page · raw message

arch/arm/mach-dove/include/mach/hardware.h new file +26 -0
new file mode 100644
index 0000000..32b0826

Lines of this file are not shown. View the raw message.

arch/arm/mach-dove/include/mach/io.h new file +20 -0
new file mode 100644
index 0000000..3b3e472

Lines of this file are not shown. View the raw message.

arch/arm/mach-dove/include/mach/irqs.h new file +101 -0

101 lines not on this page · raw message

arch/arm/mach-dove/include/mach/memory.h new file +10 -0
new file mode 100644
index 0000000..d668720

Lines of this file are not shown. View the raw message.

arch/arm/mach-dove/include/mach/pm.h new file +54 -0

54 lines not on this page · raw message

arch/arm/mach-dove/include/mach/system.h new file +36 -0
new file mode 100644
index 0000000..356afda

Lines of this file are not shown. View the raw message.

arch/arm/mach-dove/include/mach/timex.h new file +9 -0
new file mode 100644
index 0000000..251d538

Lines of this file are not shown. View the raw message.

arch/arm/mach-dove/include/mach/uncompress.h new file +37 -0
new file mode 100644
index 0000000..2c5cdd7

Lines of this file are not shown. View the raw message.

arch/arm/mach-dove/include/mach/vmalloc.h new file +6 -0
new file mode 100644
index 0000000..a952af2

Lines of this file are not shown. View the raw message.

arch/arm/mach-dove/irq.c new file +133 -0

133 lines not on this page · raw message

arch/arm/mach-dove/pcie.c new file +238 -0

238 lines not on this page · raw message

arch/arm/mm/Kconfig +1 -1
index 9264d81..1549863 100644

Lines of this file are not shown. View the raw message.

arch/arm/mm/proc-v6.S +32 -1
index 70f75d2..ebfe6c1 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.6.0.4

Part of the diff is not shown here. View the raw message.

#2 lore raw

PATCH 1/3 ARM: add base support for Marvell Dove SoC

Hi,
For some reason, my previous email didn't reach the mailing list.
Here is the patch as an attachment with some minor updates (replaced mach/gpio.h to linux/gpio.h)

saeed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ARM-add-base-support-for-Marvell-Dove-SoC.patch.bz2
Type: application/octet-stream
Size: 21270 bytes
Desc: 0001-ARM-add-base-support-for-Marvell-Dove-SoC.patch.bz2
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20091125/d0463ee0/attachment-0001.obj>

#3 lore raw

PATCH 1/3 ARM: add base support for Marvell Dove SoC

Quoted 3 lines · Saeed Bishara

For some reason, my previous email didn't reach the mailing list. Here is the patch as an attachment with some minor updates (replaced
mach/gpio.h to linux/gpio.h)

Also #include <asm/io.h> and (any) #include <mach/io.h> -> linux/io.h please.

#4 lore raw

PATCH 1/3 ARM: add base support for Marvell Dove SoC

Quoted 6 lines · Russell King - ARM Linux
Quoted 3 lines · Saeed Bishara

For some reason, my previous email didn't reach the mailing list. Here is the patch as an attachment with some minor updates (replaced
mach/gpio.h to linux/gpio.h)

Also #include <asm/io.h> and (any) #include <mach/io.h> -> linux/io.h please.

I amended the orion Git repository directly to fix those.

Nicolas

#5 lore raw

PATCH 1/3 ARM: add base support for Marvell Dove SoC

The board id that supported by this patch is 1788, the board name in the machines registry updated to dove_db, but the Type Identifier needs to be changed from MACH_TYPE_MACH_MARVELL_NEW1 to MACH_TYPE_DOVE_DB.

saeed

Quoted 19 lines · Nicolas Pitre
Quoted 6 lines · Russell King - ARM Linux
Quoted 3 lines · Saeed Bishara

? ? For some reason, my previous email didn't reach the mailing list. ? ? Here is the patch as an attachment with some minor updates (replaced mach/gpio.h to linux/gpio.h)

Also #include <asm/io.h> and (any) #include <mach/io.h> -> linux/io.h please.

I amended the orion Git repository directly to fix those.

Nicolas

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#6 lore raw

PATCH 1/3 ARM: add base support for Marvell Dove SoC

Quoted 4 lines · saeed bishara

The board id that supported by this patch is 1788, the board name in the machines registry updated to dove_db, but the Type Identifier needs to be changed from MACH_TYPE_MACH_MARVELL_NEW1 to MACH_TYPE_DOVE_DB.

The orion repo has the right machine identifier already. No changes needed there.

Nicolas

#7 lore raw

PATCH 1/3 ARM: add base support for Marvell Dove SoC

Quoted 9 lines · Nicolas Pitre
Quoted 4 lines · saeed bishara

The board id that supported by this patch is 1788, the board name in the machines registry updated to dove_db, but the Type Identifier needs to be changed from MACH_TYPE_MACH_MARVELL_NEW1 to MACH_TYPE_DOVE_DB.

The orion repo has the right machine identifier already. No changes needed there.

Meanwhile, I've been deleting it from my updates to mainline ever since it was created back in 2008 because it looked like someone screwed up their entry, and registered 1789 instead of talking to me.

This means if I pull the dovedb stuff into mainline now, it's probably going to break builds.

Since I've only just updated the mach-types file in mainline this week, I'm not happy about adding it in, especially as the current update is still outstanding for Linus.

A little bit of communication goes a long way...

#8 lore raw

PATCH 1/3 ARM: add base support for Marvell Dove SoC

Quoted 11 lines · Russell King - ARM Linux
Quoted 9 lines · Nicolas Pitre
Quoted 4 lines · saeed bishara

The board id that supported by this patch is 1788, the board name in the machines registry updated to dove_db, but the Type Identifier needs to be changed from MACH_TYPE_MACH_MARVELL_NEW1 to MACH_TYPE_DOVE_DB.

The orion repo has the right machine identifier already. No changes needed there.

Quoted 6 lines

Meanwhile, I've been deleting it from my updates to mainline ever since it was created back in 2008 because it looked like someone screwed up their entry, and registered 1789 instead of talking to me.

This means if I pull the dovedb stuff into mainline now, it's probably going to break builds.

I think we can live with that. Things will fix themselves when both the machine id update and the Dove support are merged together upstream. Dove is a new architecture so no one ever attempted to build it before anyway.

Nicolas

#9 lore raw

PATCH 1/3 ARM: add base support for Marvell Dove SoC

In reply to saeed bishara
Quoted 4 lines · saeed bishara

The board id that supported by this patch is 1788, the board name in the machines registry updated to dove_db, but the Type Identifier needs to be changed from MACH_TYPE_MACH_MARVELL_NEW1 to MACH_TYPE_DOVE_DB.

Unable to do so. There's another platform using MACH_TYPE_DOVE_DB.

Please chose a different name for your platform.

#10 lore raw

PATCH 1/3 ARM: add base support for Marvell Dove SoC

Quoted 2 lines

Unable to do so. There's another platform using MACH_TYPE_DOVE_DB.

[saeed] can you please change the name of the later platform (id 2552) to MACH_TYPE_DOVE_DB2?

Quoted 2 lines

Please chose a different name for your platform.

#11 lore raw

PATCH 2/3 Add Tauros2 L2 cache controller support

In reply to Saeed Bishara

From: Lennert Buytenhek <[email protected]>

Support for the Tauros2 L2 cache controller as used with the PJ1 and PJ4 CPUs.

---
 arch/arm/configs/dove_defconfig               |    4 +-
 arch/arm/include/asm/hardware/cache-tauros2.h |   11 +
 arch/arm/mach-dove/common.c                   |    4 +
 arch/arm/mm/Kconfig                           |    9 +
 arch/arm/mm/Makefile                          |    2 +-
 arch/arm/mm/cache-tauros2.c                   |  263 +++++++++++++++++++++++++
 6 files changed, 291 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/include/asm/hardware/cache-tauros2.h
 create mode 100644 arch/arm/mm/cache-tauros2.c
arch/arm/configs/dove_defconfig +3 -1
index f2d1ea0..837bb52 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.32-rc6
-# Tue Nov 24 13:48:39 2009
+# Tue Nov 24 13:51:23 2009
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -207,6 +207,8 @@ CONFIG_ARM_THUMB=y
 # CONFIG_CPU_ICACHE_DISABLE is not set
 # CONFIG_CPU_DCACHE_DISABLE is not set
 # CONFIG_CPU_BPREDICT_DISABLE is not set
+CONFIG_OUTER_CACHE=y
+CONFIG_CACHE_TAUROS2=y
 CONFIG_ARM_L1_CACHE_SHIFT=5
 # CONFIG_ARM_ERRATA_411920 is not set
 
arch/arm/include/asm/hardware/cache-tauros2.h new file +11 -0
new file mode 100644
index 0000000..dacfde9
@@ -0,0 +1,11 @@
+/*
+ * arch/arm/plat-orion/include/plat/cache-tauros2.h
+ *
+ * Copyright (C) 2008 Marvell Semiconductor
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+extern void __init tauros2_init(void);
arch/arm/mach-dove/common.c +4 -0
index a9248ce..bf66b13 100644
@@ -20,6 +20,7 @@
 #include <linux/mv643xx_i2c.h>
 #include <linux/ata_platform.h>
 #include <linux/spi/orion_spi.h>
+#include <asm/hardware/cache-tauros2.h>
 #include <asm/page.h>
 #include <asm/setup.h>
 #include <asm/timex.h>
@@ -760,6 +761,9 @@ void __init dove_init(void)
 	printk(KERN_INFO "Dove 88AP510 SoC, ");
 	printk(KERN_INFO "TCLK = %dMHz\n", (tclk + 499999) / 1000000);
 
+#ifdef CONFIG_CACHE_TAUROS2
+	tauros2_init();
+#endif
 	dove_setup_cpu_mbus();
 
 	dove_ge00_shared_data.t_clk = tclk;
arch/arm/mm/Kconfig +9 -0
index 1549863..4958ef2 100644
@@ -764,6 +764,15 @@ config CACHE_L2X0
 	help
 	  This option enables the L2x0 PrimeCell.
 
+config CACHE_TAUROS2
+	bool "Enable the Tauros2 L2 cache controller"
+	depends on ARCH_DOVE
+	default y
+	select OUTER_CACHE
+	help
+	  This option enables the Tauros2 L2 cache controller (as
+	  found on PJ1/PJ4).
+
 config CACHE_XSC3L2
 	bool "Enable the L2 cache on XScale3"
 	depends on CPU_XSC3
arch/arm/mm/Makefile +1 -1
index 055cb2a..06bcf2e 100644
@@ -87,4 +87,4 @@ obj-$(CONFIG_CPU_V7)		+= proc-v7.o
 obj-$(CONFIG_CACHE_FEROCEON_L2)	+= cache-feroceon-l2.o
 obj-$(CONFIG_CACHE_L2X0)	+= cache-l2x0.o
 obj-$(CONFIG_CACHE_XSC3L2)	+= cache-xsc3l2.o
-
+obj-$(CONFIG_CACHE_TAUROS2)	+= cache-tauros2.o
arch/arm/mm/cache-tauros2.c new file +263 -0

263 lines not on this page · raw message

Signature · 1 line
1.6.0.4
#12 lore raw

PATCH 3/3 rtc: add support for Dove soc to the rtc-mv driver.

---
 arch/arm/configs/dove_defconfig |    3 ++-
 drivers/rtc/Kconfig             |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
arch/arm/configs/dove_defconfig +2 -1
index 837bb52..b3a4916 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.32-rc6
-# Tue Nov 24 13:51:23 2009
+# Tue Nov 24 13:53:37 2009
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -1209,6 +1209,7 @@ CONFIG_RTC_INTF_DEV=y
 #
 # on-CPU RTC drivers
 #
+CONFIG_RTC_DRV_MV=y
 CONFIG_DMADEVICES=y
 
 #
drivers/rtc/Kconfig +1 -1
index 3c20dae..e11e1cd 100644
@@ -780,7 +780,7 @@ config RTC_DRV_TX4939
 
 config RTC_DRV_MV
 	tristate "Marvell SoC RTC"
-	depends on ARCH_KIRKWOOD
+	depends on ARCH_KIRKWOOD || ARCH_DOVE
 	help
 	  If you say yes here you will get support for the in-chip RTC
 	  that can be found in some of Marvell's SoC devices, such as
Signature · 1 line
1.6.0.4
#13 lore raw

PATCH 1/3 ARM: add base support for Marvell Dove SoC

In reply to Saeed Bishara
Quoted 26 lines
arch/arm/mm/proc-v6.S +1 -1
index 70f75d2..ebfe6c1 100644
@@ -130,9 +130,16 @@ ENTRY(cpu_v6_set_pte_ext)
 
 
 
-
+ ? ? ? .type ? cpu_v6_name, #object

?cpu_v6_name:
? ? ? ?.asciz ?"ARMv6-compatible processor"
+ ? ? ? .size ? cpu_v6_name, . - cpu_v6_name

arch/arm/mm/proc-v6.S +6 -0
+
+ ? ? ? .type ? cpu_pj4_name, #object
+cpu_pj4_name:
+ ? ? ? .asciz ?"Marvell PJ4 processor"
+ ? ? ? .size ? cpu_pj4_name, . - cpu_pj4_name
+

? ? ? ?.align

? ? ? ?__INIT

arch/arm/mm/proc-v6.S +0 -0
@@ -241,3 +248,27 @@ __v6_proc_info:

? ? ? ?.long ? v6_user_fns
? ? ? ?.long ? v6_cache_fns
? ? ? ?.size ? __v6_proc_info, . - __v6_proc_info

arch/arm/mm/proc-v6.S

Quoted 8 lines
arch/arm/mm/proc-v6.S +8 -0
+
+ ? ? ? .type ? __pj4_v6_proc_info, #object
+__pj4_v6_proc_info:
+ ? ? ? .long ? 0x560f5810
+ ? ? ? .long ? 0xff0ffff0
+ ? ? ? .long ? PMD_TYPE_SECT | \
+ ? ? ? ? ? ? ? PMD_SECT_BUFFERABLE | \
+ ? ? ? ? ? ? ? PMD_SECT_CACHEABLE | \

These two flags are different from flags used in v6 proc_info. Is PJ4 full compatible to armv6? Is there any reason to select PMD_SECT_BUFFERABLE & PMD_SECT_CACHEABLE at here?

Quoted 8 lines

+ ? ? ? ? ? ? ? PMD_SECT_AP_WRITE | \
+ ? ? ? ? ? ? ? PMD_SECT_AP_READ
+ ? ? ? .long ? PMD_TYPE_SECT | \
+ ? ? ? ? ? ? ? PMD_SECT_XN | \
+ ? ? ? ? ? ? ? PMD_SECT_AP_WRITE | \
+ ? ? ? ? ? ? ? PMD_SECT_AP_READ
+ ? ? ? b ? ? ? __v6_setup
+ ? ? ? .long ? cpu_arch_name

Quoted 8 lines

+ ? ? ? .long ? cpu_elf_name
+ ? ? ? .long ? HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP
+ ? ? ? .long ? cpu_pj4_name
+ ? ? ? .long ? v6_processor_functions
+ ? ? ? .long ? v6wbi_tlb_fns
+ ? ? ? .long ? v6_user_fns
+ ? ? ? .long ? v6_cache_fns
+ ? ? ? .size ? __v6_proc_info, . - __v6_proc_info

You created __pj4_v6_proc_info. But you still used __v6_proc_info at here. Why?

#14 lore raw

PATCH 1/3 ARM: add base support for Marvell Dove SoC

Quoted 8 lines · Haojian Zhuang
Quoted 6 lines

+ ? ? ? .long ? cpu_pj4_name
+ ? ? ? .long ? v6_processor_functions
+ ? ? ? .long ? v6wbi_tlb_fns
+ ? ? ? .long ? v6_user_fns
+ ? ? ? .long ? v6_cache_fns
+ ? ? ? .size ? __v6_proc_info, . - __v6_proc_info

You created __pj4_v6_proc_info. But you still used __v6_proc_info at here. Why?

I fixed that one already when committing the patch into Git.

Nicolas

#15 lore raw

PATCH 1/3 ARM: add base support for Marvell Dove SoC

In reply to Haojian Zhuang
Quoted 9 lines
Quoted 6 lines

+__pj4_v6_proc_info:
+ ? ? ? .long ? 0x560f5810
+ ? ? ? .long ? 0xff0ffff0
+ ? ? ? .long ? PMD_TYPE_SECT | \
+ ? ? ? ? ? ? ? PMD_SECT_BUFFERABLE | \
+ ? ? ? ? ? ? ? PMD_SECT_CACHEABLE | \

These two flags are different from flags used in v6 proc_info. Is PJ4 full compatible to armv6? Is there any reason to select PMD_SECT_BUFFERABLE & PMD_SECT_CACHEABLE at here?

good catch, those flags should be replace with PMD_FLAGS, this with break SMP support according to the following commit:
"ARM: ensure initial page tables are setup for SMP systems"

Nico, should I send a patch that deletes those flags or to resend the updated patch?

saeed

#16 lore raw

PATCH 1/3 ARM: add base support for Marvell Dove SoC

Quoted 9 lines · saeed bishara
Quoted 9 lines
Quoted 6 lines

+__pj4_v6_proc_info:
+ ? ? ? .long ? 0x560f5810
+ ? ? ? .long ? 0xff0ffff0
+ ? ? ? .long ? PMD_TYPE_SECT | \
+ ? ? ? ? ? ? ? PMD_SECT_BUFFERABLE | \
+ ? ? ? ? ? ? ? PMD_SECT_CACHEABLE | \

These two flags are different from flags used in v6 proc_info. Is PJ4 full compatible to armv6? Is there any reason to select PMD_SECT_BUFFERABLE & PMD_SECT_CACHEABLE at here?

Quoted 6 lines

good catch, those flags should be replace with PMD_FLAGS, this with break SMP support according to the following commit:
"ARM: ensure initial page tables are setup for SMP systems"

Nico, should I send a patch that deletes those flags or to resend the updated patch?

Please simply send a patch to fix it on top of what's already in the Git repo.

Nicolas

#17 lore raw

PATCH 1/3 ARM: add base support for Marvell Dove SoC

Quoted 13 lines
Quoted 13 lines
Quoted 9 lines
Quoted 6 lines

+__pj4_v6_proc_info:
+ ? ? ? .long ? 0x560f5810
+ ? ? ? .long ? 0xff0ffff0
+ ? ? ? .long ? PMD_TYPE_SECT | \
+ ? ? ? ? ? ? ? PMD_SECT_BUFFERABLE | \
+ ? ? ? ? ? ? ? PMD_SECT_CACHEABLE | \

These two flags are different from flags used in v6 proc_info. Is PJ4 full compatible to armv6? Is there any reason to select PMD_SECT_BUFFERABLE & PMD_SECT_CACHEABLE at here?

good catch, those flags should be replace with PMD_FLAGS, this with break SMP support according to the following commit:
"ARM: ensure initial page tables are setup for SMP systems"

Quoted 9 lines
Quoted 2 lines

Nico, should I send a patch that deletes those flags or to resend the updated patch?

Please simply send a patch to fix it on top of what's already in the Git repo.

Nicolas

Here it is:
---------------------------------------------------

#18 lore raw

PATCH 1/3 ARM: add base support for Marvell Dove SoC

In reply to Saeed Bishara

arch/arm/mm/Kconfig config CPU_FEROCEON_OLD_ID · line 391

Quoted 10 lines · Saeed Bishara
arch/arm/mm/Kconfig +1 -1
index 9264d81..1549863 100644
@@ -388,7 +388,7 @@ config CPU_FEROCEON_OLD_ID
 
 # ARMv6
 config CPU_V6
-	bool "Support ARM V6 processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB || MACH_REALVIEW_PBX
+	bool "Support ARM V6 processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB || MACH_REALVIEW_PBX || ARCH_DOVE

Should I assume that the V6 processor is optional on Dove? Does it run without a processor present? Probably not.

If so, then you don't want to append to this line - doing so makes the option visible. If your platform _always_ has a V6 processor, select it just like everyone else does.

The only reason to extend that conditional is if a V6 processor is to be optional.

#19 lore raw

PATCH 1/3 ARM: add base support for Marvell Dove SoC

Quoted 7 lines · Russell King - ARM Linux
Quoted 6 lines · Saeed Bishara
arch/arm/mm/Kconfig +0 -0
index 9264d81..1549863 100644
@@ -388,7 +388,7 @@ config CPU_FEROCEON_OLD_ID
 
Quoted 7 lines

arch/arm/mm/Kconfig config CPU_FEROCEON_OLD_ID · line 391

Quoted 4 lines
arch/arm/mm/Kconfig +1 -1
 # ARMv6
 config CPU_V6
-	bool "Support ARM V6 processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB || MACH_REALVIEW_PBX
+	bool "Support ARM V6 processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB || MACH_REALVIEW_PBX || ARCH_DOVE

Should I assume that the V6 processor is optional on Dove? Does it run without a processor present? Probably not.

There is an ARMv7 option too.

Quoted 6 lines

If so, then you don't want to append to this line - doing so makes the option visible. If your platform _always_ has a V6 processor, select it just like everyone else does.

The only reason to extend that conditional is if a V6 processor is to be optional.

It is.

Nicolas