diff mbox

[v4] ARM: add lolevel debug support for asm9260

Message ID 1415086486-10260-1-git-send-email-linux@rempel-privat.de (mailing list archive)
State New, archived
Headers show

Commit Message

Oleksij Rempel Nov. 4, 2014, 7:34 a.m. UTC
Since there is no public documentation, this patch also provide register
offsets for different UART units on this SoC.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
---
 arch/arm/Kconfig.debug           | 28 ++++++++++++++++++++++++++--
 arch/arm/include/debug/asm9260.S | 29 +++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/include/debug/asm9260.S

Comments

Oleksij Rempel Nov. 24, 2014, 11:08 a.m. UTC | #1
This is reduced patchset to provide initial support for Alphascale ASM9260

Oleksij Rempel (2):
  ARM: add mach-asm9260
  ARM: add lolevel debug support for asm9260

 arch/arm/Kconfig                 |  2 ++
 arch/arm/Kconfig.debug           | 28 ++++++++++++++++++++++++++--
 arch/arm/include/debug/asm9260.S | 29 +++++++++++++++++++++++++++++
 arch/arm/mach-asm9260/Kconfig    |  6 ++++++
 4 files changed, 63 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/include/debug/asm9260.S
 create mode 100644 arch/arm/mach-asm9260/Kconfig
Arnd Bergmann Nov. 28, 2014, 2:09 p.m. UTC | #2
On Monday 24 November 2014, Oleksij Rempel wrote:
> This is reduced patchset to provide initial support for Alphascale ASM9260
> 
> Oleksij Rempel (2):
>   ARM: add mach-asm9260
>   ARM: add lolevel debug support for asm9260
> 

Applied to next/soc, thanks a lot for keeping this up!

Are you planning to send some matching dts files for 3.19 as well?

	Arnd
Oleksij Rempel Nov. 28, 2014, 2:13 p.m. UTC | #3
Am 28.11.2014 um 15:09 schrieb Arnd Bergmann:
> On Monday 24 November 2014, Oleksij Rempel wrote:
>> This is reduced patchset to provide initial support for Alphascale ASM9260
>>
>> Oleksij Rempel (2):
>>   ARM: add mach-asm9260
>>   ARM: add lolevel debug support for asm9260
>>
> 
> Applied to next/soc, thanks a lot for keeping this up!
> 
> Are you planning to send some matching dts files for 3.19 as well?
> 
> 	Arnd
> 
Sure i'll send them ASAP.

Thank you all for reviewing, applying and patience we me!! :)
Oleksij Rempel Nov. 28, 2014, 3:05 p.m. UTC | #4
it is secong logical part of ASM9260 patch set.

Oleksij Rempel (1):
  ARM: clk: add clk-asm9260 driver

 drivers/clk/Makefile                           |   1 +
 drivers/clk/clk-asm9260.c                      | 359 +++++++++++++++++++++++++
 include/dt-bindings/clock/alphascale,asm9260.h |  97 +++++++
 3 files changed, 457 insertions(+)
 create mode 100644 drivers/clk/clk-asm9260.c
 create mode 100644 include/dt-bindings/clock/alphascale,asm9260.h
Arnd Bergmann Nov. 28, 2014, 4:34 p.m. UTC | #5
On Friday 28 November 2014 16:05:19 Oleksij Rempel wrote:
> it is secong logical part of ASM9260 patch set.
> 

Note that there is no reason to wait for one part to be applied before
sending the next one, as long as you introduce no build breakage.

	Arnd
Oleksij Rempel Nov. 28, 2014, 4:50 p.m. UTC | #6
Oleksij Rempel (2):
  ARM: irqchip: mxs: prepare driver for HW with different offsets
  ARM: irqchip: mxs: add Alpascale ASM9260 support

 drivers/irqchip/Kconfig                    |   5 +
 drivers/irqchip/Makefile                   |   2 +-
 drivers/irqchip/alphascale_asm9260-icoll.h | 109 +++++++++++++++++++++
 drivers/irqchip/irq-mxs.c                  | 150 ++++++++++++++++++++++++++---
 4 files changed, 249 insertions(+), 17 deletions(-)
 create mode 100644 drivers/irqchip/alphascale_asm9260-icoll.h
Oleksij Rempel Nov. 28, 2014, 4:54 p.m. UTC | #7
Oleksij Rempel (4):
  ARM: clocksource: add asm9260_timer driver
  ARM: dts: add DT for Alphascale ASM9260 SoC
  ARM: add alphascale,acc.txt bindings documentation
  add Alphascale to vendor-prefixes.txt

 .../devicetree/bindings/clock/alphascale,acc.txt   | 115 +++++++++++
 .../devicetree/bindings/vendor-prefixes.txt        |   1 +
 arch/arm/boot/dts/Makefile                         |   2 +
 arch/arm/boot/dts/alphascale-asm9260-devkit.dts    |  13 ++
 arch/arm/boot/dts/alphascale-asm9260.dtsi          |  63 ++++++
 drivers/clocksource/Kconfig                        |   9 +
 drivers/clocksource/Makefile                       |   1 +
 drivers/clocksource/asm9260_timer.c                | 220 +++++++++++++++++++++
 8 files changed, 424 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/alphascale,acc.txt
 create mode 100644 arch/arm/boot/dts/alphascale-asm9260-devkit.dts
 create mode 100644 arch/arm/boot/dts/alphascale-asm9260.dtsi
 create mode 100644 drivers/clocksource/asm9260_timer.c
Oleksij Rempel Jan. 6, 2015, 11:06 a.m. UTC | #8
Hello all,

any updates here?

Am 28.11.2014 um 17:54 schrieb Oleksij Rempel:
> Oleksij Rempel (4):
>   ARM: clocksource: add asm9260_timer driver
>   ARM: dts: add DT for Alphascale ASM9260 SoC
>   ARM: add alphascale,acc.txt bindings documentation
>   add Alphascale to vendor-prefixes.txt
> 
>  .../devicetree/bindings/clock/alphascale,acc.txt   | 115 +++++++++++
>  .../devicetree/bindings/vendor-prefixes.txt        |   1 +
>  arch/arm/boot/dts/Makefile                         |   2 +
>  arch/arm/boot/dts/alphascale-asm9260-devkit.dts    |  13 ++
>  arch/arm/boot/dts/alphascale-asm9260.dtsi          |  63 ++++++
>  drivers/clocksource/Kconfig                        |   9 +
>  drivers/clocksource/Makefile                       |   1 +
>  drivers/clocksource/asm9260_timer.c                | 220 +++++++++++++++++++++
>  8 files changed, 424 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/clock/alphascale,acc.txt
>  create mode 100644 arch/arm/boot/dts/alphascale-asm9260-devkit.dts
>  create mode 100644 arch/arm/boot/dts/alphascale-asm9260.dtsi
>  create mode 100644 drivers/clocksource/asm9260_timer.c
>
Arnd Bergmann Jan. 6, 2015, 2:11 p.m. UTC | #9
On Tuesday 06 January 2015 12:06:36 Oleksij Rempel wrote:
> Hello all,
> 
> any updates here?
> 
> Am 28.11.2014 um 17:54 schrieb Oleksij Rempel:
> > Oleksij Rempel (4):
> >   ARM: clocksource: add asm9260_timer driver
> >   ARM: dts: add DT for Alphascale ASM9260 SoC
> >   ARM: add alphascale,acc.txt bindings documentation
> >   add Alphascale to vendor-prefixes.txt
> > 
> 

I think this fell through the cracks because you were not
very explicit about what you expected to happen with the patches.

Please submit the parts that are missing to the respective
maintainers again. The clocksource driver should get sent
as a standalone patch to the addresses listed in the MAINTAINERS
file, the rest should be addressed to arm@kernel.org with
an introductory message asking for merging.

I usually do some sweeps through my inbox looking for anything
with [GIT PULL] in the subject, or mails that got sent to
arm@kernel.org, but this one was neither.

If we miss some patches that you think should have been merged
already, it also helps to send a reminder about it.

	Arnd
Oleksij Rempel Jan. 8, 2015, 8:59 a.m. UTC | #10
Hello,
this patch provides clk support for Alphascale asm9260 SoC.
As was suggested by one of ARM maintainers, I explicitly ask you to
merge this patch :D

Oleksij Rempel (1):
  ARM: clk: add clk-asm9260 driver

 drivers/clk/Makefile                           |   1 +
 drivers/clk/clk-asm9260.c                      | 359 +++++++++++++++++++++++++
 include/dt-bindings/clock/alphascale,asm9260.h |  97 +++++++
 3 files changed, 457 insertions(+)
 create mode 100644 drivers/clk/clk-asm9260.c
 create mode 100644 include/dt-bindings/clock/alphascale,asm9260.h
Oleksij Rempel Jan. 8, 2015, 9:01 a.m. UTC | #11
Am 28.11.2014 um 17:50 schrieb Oleksij Rempel:
> Oleksij Rempel (2):
>   ARM: irqchip: mxs: prepare driver for HW with different offsets
>   ARM: irqchip: mxs: add Alpascale ASM9260 support
> 
>  drivers/irqchip/Kconfig                    |   5 +
>  drivers/irqchip/Makefile                   |   2 +-
>  drivers/irqchip/alphascale_asm9260-icoll.h | 109 +++++++++++++++++++++
>  drivers/irqchip/irq-mxs.c                  | 150 ++++++++++++++++++++++++++---
>  4 files changed, 249 insertions(+), 17 deletions(-)
>  create mode 100644 drivers/irqchip/alphascale_asm9260-icoll.h
> 

Any update here, should i resend this patches?
Oleksij Rempel Jan. 8, 2015, 9:16 a.m. UTC | #12
Hello,
this patches provide DT support for Alphascale asm9260 SoC.
As was suggested..., I explicitly ask you to merge them :D

Oleksij Rempel (3):
  ARM: dts: add DT for Alphascale ASM9260 SoC
  ARM: add alphascale,acc.txt bindings documentation
  add Alphascale to vendor-prefixes.txt

 .../devicetree/bindings/clock/alphascale,acc.txt   | 115 +++++++++++++++++++++
 .../devicetree/bindings/vendor-prefixes.txt        |   1 +
 arch/arm/boot/dts/Makefile                         |   2 +-
 arch/arm/boot/dts/alphascale-asm9260-devkit.dts    |  13 +++
 arch/arm/boot/dts/alphascale-asm9260.dtsi          |  63 +++++++++++
 5 files changed, 193 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/clock/alphascale,acc.txt
 create mode 100644 arch/arm/boot/dts/alphascale-asm9260-devkit.dts
 create mode 100644 arch/arm/boot/dts/alphascale-asm9260.dtsi
Olof Johansson Jan. 20, 2015, 12:30 a.m. UTC | #13
On Thu, Jan 08, 2015 at 10:16:44AM +0100, Oleksij Rempel wrote:
> Hello,
> this patches provide DT support for Alphascale asm9260 SoC.
> As was suggested..., I explicitly ask you to merge them :D

Thanks, I've applied these three patches to a local asm/dt branch
that has been merged into next/dt.


-Olof
Oleksij Rempel Jan. 20, 2015, 9:19 a.m. UTC | #14
Am 20.01.2015 um 01:30 schrieb Olof Johansson:
> On Thu, Jan 08, 2015 at 10:16:44AM +0100, Oleksij Rempel wrote:
>> Hello,
>> this patches provide DT support for Alphascale asm9260 SoC.
>> As was suggested..., I explicitly ask you to merge them :D
> 
> Thanks, I've applied these three patches to a local asm/dt branch
> that has been merged into next/dt.

Thank you!
diff mbox

Patch

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index d8f6a2e..606865f 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -93,6 +93,27 @@  choice
 	prompt "Kernel low-level debugging port"
 	depends on DEBUG_LL
 
+	config DEBUG_ASM9260_UART
+		bool "Kernel low-level debugging via asm9260 UART"
+		depends on MACH_ASM9260
+		help
+		  Say Y here if you want the debug print routines to direct
+		  their output to an UART or USART port on asm9260 based
+		  machines.
+
+		    DEBUG_UART_PHYS | DEBUG_UART_VIRT
+
+		    0x80000000      | 0xf0000000     | UART0
+		    0x80004000      | 0xf0004000     | UART1
+		    0x80008000      | 0xf0008000     | UART2
+		    0x8000c000      | 0xf000c000     | UART3
+		    0x80010000      | 0xf0010000     | UART4
+		    0x80014000      | 0xf0014000     | UART5
+		    0x80018000      | 0xf0018000     | UART6
+		    0x8001c000      | 0xf001c000     | UART7
+		    0x80020000      | 0xf0020000     | UART8
+		    0x80024000      | 0xf0024000     | UART9
+
 	config AT91_DEBUG_LL_DBGU0
 		bool "Kernel low-level debugging on rm9200, 9260/9g20, 9261/9g10 and 9rl"
 		depends on HAVE_AT91_DBGU0
@@ -1042,6 +1063,7 @@  config DEBUG_STI_UART
 config DEBUG_LL_INCLUDE
 	string
 	default "debug/8250.S" if DEBUG_LL_UART_8250 || DEBUG_UART_8250
+	default "debug/asm9260.S" if DEBUG_ASM9260_UART
 	default "debug/clps711x.S" if DEBUG_CLPS711X_UART1 || DEBUG_CLPS711X_UART2
 	default "debug/meson.S" if DEBUG_MESON_UARTAO
 	default "debug/pl01x.S" if DEBUG_LL_UART_PL01X || DEBUG_UART_PL01X
@@ -1135,6 +1157,7 @@  config DEBUG_UART_PHYS
 	default 0x78000000 if DEBUG_CNS3XXX
 	default 0x7c0003f8 if FOOTBRIDGE
 	default 0x78000000 if DEBUG_CNS3XXX
+	default 0x80010000 if DEBUG_ASM9260_UART
 	default 0x80070000 if DEBUG_IMX23_UART
 	default 0x80074000 if DEBUG_IMX28_UART
 	default 0x80230000 if DEBUG_PICOXCELL_UART
@@ -1171,13 +1194,14 @@  config DEBUG_UART_PHYS
 		DEBUG_LL_UART_EFM32 || \
 		DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \
 		DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART || \
-		DEBUG_UART_BCM63XX
+		DEBUG_UART_BCM63XX || DEBUG_ASM9260_UART
 
 config DEBUG_UART_VIRT
 	hex "Virtual base address of debug UART"
 	default 0xe0010fe0 if ARCH_RPC
 	default 0xe1000000 if DEBUG_MSM_UART
 	default 0xf0000be0 if ARCH_EBSA110
+	default 0xf0010000 if DEBUG_ASM9260_UART
 	default 0xf01fb000 if DEBUG_NOMADIK_UART
 	default 0xf0201000 if DEBUG_BCM2835
 	default 0xf1000300 if DEBUG_BCM_5301X
@@ -1244,7 +1268,7 @@  config DEBUG_UART_VIRT
 	depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \
 		DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \
 		DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART || \
-		DEBUG_UART_BCM63XX
+		DEBUG_UART_BCM63XX || DEBUG_ASM9260_UART
 
 config DEBUG_UART_8250_SHIFT
 	int "Register offset shift for the 8250 debug UART"
diff --git a/arch/arm/include/debug/asm9260.S b/arch/arm/include/debug/asm9260.S
new file mode 100644
index 0000000..292f85b
--- /dev/null
+++ b/arch/arm/include/debug/asm9260.S
@@ -0,0 +1,29 @@ 
+/* Debugging macro include header
+ *
+ *  Copyright (C) 1994-1999 Russell King
+ *  Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
+ *  Modified for ASM9260 by Oleksij Remepl <linux@rempel-privat.de>
+ *
+ * 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.
+ *
+ */
+
+		.macro	addruart, rp, rv, tmp
+		ldr	\rp, = CONFIG_DEBUG_UART_PHYS
+		ldr	\rv, = CONFIG_DEBUG_UART_VIRT
+		.endm
+
+		.macro	waituart,rd,rx
+		.endm
+
+		.macro	senduart,rd,rx
+		str	\rd, [\rx, #0x50]	@ TXDATA
+		.endm
+
+		.macro	busyuart,rd,rx
+1002:		ldr	\rd, [\rx, #0x60]	@ STAT
+		tst	\rd, #1 << 27		@ TXEMPTY
+		beq	1002b			@ wait until transmit done
+		.endm