initial suport for Alpscale ASM9260
Subsystems (9)
cover initial suport for Alpscale ASM9260
This patchset provide initial support for Alpscale ASM9260, ARM based SoC.
Oleksij Rempel (7):
ARM: add mach-asm9260
add include/debug/asm9260.S
ARM: dts: add DT for Alpscale ASM9260 SoC
clk: add clk-asm9260 driver
clocksource: add asm9260_timer driver
irqchip: add irq-asm9260 driver
tty/serial: add asm9260-serial driver
arch/arm/Kconfig | 16 + arch/arm/Kconfig.debug | 33 +- arch/arm/Makefile | 1 + arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/asm9260-devkit.dts | 15 + arch/arm/boot/dts/asm9260.dtsi | 425 ++++++++++++ arch/arm/include/debug/asm9260.S | 31 + arch/arm/mach-asm9260/Kconfig | 66 ++ arch/arm/mach-asm9260/Makefile | 11 + arch/arm/mach-asm9260/Makefile.boot | 2 + arch/arm/mach-asm9260/core.c | 77 +++ drivers/clk/Makefile | 1 + drivers/clk/clk-asm9260.c | 159 +++++ drivers/clocksource/Makefile | 1 + drivers/clocksource/asm9260_timer.c | 232 +++++++ drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-asm9260.c | 237 +++++++ drivers/tty/serial/Kconfig | 19 + drivers/tty/serial/Makefile | 1 + drivers/tty/serial/asm9260_serial.c | 1236 ++++++++++++++++++++++++++++++++++ include/uapi/linux/serial_core.h | 2 + 21 files changed, 2565 insertions(+), 3 deletions(-) create mode 100644 arch/arm/boot/dts/asm9260-devkit.dts create mode 100644 arch/arm/boot/dts/asm9260.dtsi create mode 100644 arch/arm/include/debug/asm9260.S create mode 100644 arch/arm/mach-asm9260/Kconfig create mode 100644 arch/arm/mach-asm9260/Makefile create mode 100644 arch/arm/mach-asm9260/Makefile.boot create mode 100644 arch/arm/mach-asm9260/core.c create mode 100644 drivers/clk/clk-asm9260.c create mode 100644 drivers/clocksource/asm9260_timer.c create mode 100644 drivers/irqchip/irq-asm9260.c create mode 100644 drivers/tty/serial/asm9260_serial.c
Signature · 1 line
1.9.1
PATCH 1/7 ARM: add mach-asm9260
--- arch/arm/Kconfig | 16 ++++++++ arch/arm/Makefile | 1 + arch/arm/mach-asm9260/Kconfig | 66 +++++++++++++++++++++++++++++++ arch/arm/mach-asm9260/Makefile | 11 ++++++ arch/arm/mach-asm9260/Makefile.boot | 2 + arch/arm/mach-asm9260/core.c | 77 +++++++++++++++++++++++++++++++++++++ 6 files changed, 173 insertions(+) create mode 100644 arch/arm/mach-asm9260/Kconfig create mode 100644 arch/arm/mach-asm9260/Makefile create mode 100644 arch/arm/mach-asm9260/Makefile.boot create mode 100644 arch/arm/mach-asm9260/core.c
arch/arm/Kconfig +16 -0
@@ -373,6 +373,20 @@ config ARCH_AT91 This enables support for systems based on Atmel AT91RM9200 and AT91SAM9* processors. +config MACH_ASM9260 + bool "Alpscale ASM9260" + select ARCH_REQUIRE_GPIOLIB + select COMMON_CLK + select IRQ_DOMAIN + select SPARSE_IRQ + select MULTI_IRQ_HANDLER + select GENERIC_IRQ_CHIP + select GENERIC_CLOCKEVENTS + select CLKSRC_MMIO + select CPU_ARM926T + help + Support for Alpscale ASM9260 based platform. + config ARCH_CLPS711X bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" select ARCH_REQUIRE_GPIOLIB
@@ -915,6 +929,8 @@ source "arch/arm/mach-mvebu/Kconfig" source "arch/arm/mach-at91/Kconfig" +source "arch/arm/mach-asm9260/Kconfig" + source "arch/arm/mach-axxia/Kconfig" source "arch/arm/mach-bcm/Kconfig"
arch/arm/Makefile +1 -0
@@ -143,6 +143,7 @@ textofs-$(CONFIG_ARCH_AXXIA) := 0x00308000 # Machine directory name. This list is sorted alphanumerically # by CONFIG_* macro name. machine-$(CONFIG_ARCH_AT91) += at91 +machine-$(CONFIG_MACH_ASM9260) += asm9260 machine-$(CONFIG_ARCH_AXXIA) += axxia machine-$(CONFIG_ARCH_BCM) += bcm machine-$(CONFIG_ARCH_BERLIN) += berlin
arch/arm/mach-asm9260/Kconfig new file +66 -0
66 lines not on this page · raw message
arch/arm/mach-asm9260/Makefile new file +11 -0
@@ -0,0 +1,11 @@ +# +# Makefile for the linux kernel. +# + +# Object file lists. + +obj-y := core.o +obj-m := +obj-n := +obj- := +
arch/arm/mach-asm9260/Makefile.boot new file +2 -0
@@ -0,0 +1,2 @@ +zreladdr-y := 0x20008000 +
arch/arm/mach-asm9260/core.c new file +77 -0
77 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 1/7 ARM: add mach-asm9260
On Sun, Sep 14, 2014 at 12:13:22AM +0200, Oleksij Rempel wrote:
Could you please add a description of the SoC? Perhaps a link to documentation, or at least a slick sheet? Also, are there any products on the market with this SoC, which ones?
thx,
Jason.
Quoted 248 lines
Signed-off-by Oleksij Rempel <[email protected]>--- arch/arm/Kconfig | 16 ++++++++ arch/arm/Makefile | 1 + arch/arm/mach-asm9260/Kconfig | 66 +++++++++++++++++++++++++++++++ arch/arm/mach-asm9260/Makefile | 11 ++++++ arch/arm/mach-asm9260/Makefile.boot | 2 + arch/arm/mach-asm9260/core.c | 77 +++++++++++++++++++++++++++++++++++++ 6 files changed, 173 insertions(+) create mode 100644 arch/arm/mach-asm9260/Kconfig create mode 100644 arch/arm/mach-asm9260/Makefile create mode 100644 arch/arm/mach-asm9260/Makefile.boot create mode 100644 arch/arm/mach-asm9260/core.carch/arm/Kconfig +16
-0@@ -373,6 +373,20 @@ config ARCH_AT91 This enables support for systems based on Atmel AT91RM9200 and AT91SAM9* processors. +config MACH_ASM9260 + bool "Alpscale ASM9260" + select ARCH_REQUIRE_GPIOLIB + select COMMON_CLK + select IRQ_DOMAIN + select SPARSE_IRQ + select MULTI_IRQ_HANDLER + select GENERIC_IRQ_CHIP + select GENERIC_CLOCKEVENTS + select CLKSRC_MMIO + select CPU_ARM926T + help + Support for Alpscale ASM9260 based platform. + config ARCH_CLPS711X bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" select ARCH_REQUIRE_GPIOLIB@@ -915,6 +929,8 @@ source "arch/arm/mach-mvebu/Kconfig" source "arch/arm/mach-at91/Kconfig" +source "arch/arm/mach-asm9260/Kconfig" + source "arch/arm/mach-axxia/Kconfig" source "arch/arm/mach-bcm/Kconfig"arch/arm/Makefile +1
-0@@ -143,6 +143,7 @@ textofs-$(CONFIG_ARCH_AXXIA) := 0x00308000 # Machine directory name. This list is sorted alphanumerically # by CONFIG_* macro name. machine-$(CONFIG_ARCH_AT91) += at91 +machine-$(CONFIG_MACH_ASM9260) += asm9260 machine-$(CONFIG_ARCH_AXXIA) += axxia machine-$(CONFIG_ARCH_BCM) += bcm machine-$(CONFIG_ARCH_BERLIN) += berlinarch/arm/mach-asm9260/Kconfig new file +66
-0@@ -0,0 +1,66 @@ +if MACH_ASM9260 + +menu "ASM9260T EVK Uart Enable" + +config ENABLE_UART0 + bool "Enable UART0" + depends on SERIAL_ASM9260 + default n + +config ENABLE_UART1 + bool "Enable UART1" + depends on SERIAL_ASM9260 + default n + +config ENABLE_UART2 + bool "Enable UART2" + depends on SERIAL_ASM9260 + default n + + +config ENABLE_UART3 + bool "Enable UART3" + depends on SERIAL_ASM9260 + default n + + +config ENABLE_UART4 + bool "Enable UART4" + depends on SERIAL_ASM9260 + default n + + +config ENABLE_UART5 + bool "Enable UART5" + depends on SERIAL_ASM9260 + default n + + +config ENABLE_UART6 + bool "Enable UART6" + depends on SERIAL_ASM9260 + default n + + +config ENABLE_UART7 + bool "Enable UART7" + depends on SERIAL_ASM9260 + default n + + +config ENABLE_UART8 + bool "Enable UART8" + depends on SERIAL_ASM9260 + default n + + +config ENABLE_UART9 + bool "Enable UART9" + depends on SERIAL_ASM9260 + default n + +endmenu + + +endif +arch/arm/mach-asm9260/Makefile new file +11
-0@@ -0,0 +1,11 @@ +# +# Makefile for the linux kernel. +# + +# Object file lists. + +obj-y := core.o +obj-m := +obj-n := +obj- := +arch/arm/mach-asm9260/Makefile.boot new file +2
-0@@ -0,0 +1,2 @@ +zreladdr-y := 0x20008000 +arch/arm/mach-asm9260/core.c new file +77
-0@@ -0,0 +1,77 @@ +/* +* Copyright (C) 2014 Oleksij Rempel <[email protected]> +* Co-author: Du Huanpeng <[email protected]> +* map_desc based on: +* linux/arch/arm/mach-asm9260/core.c +* Copyright (C) 2011-2014 Alpscale +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License along +* with this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ + +#include <linux/of_platform.h> +#include <asm/mach/arch.h> +#include <asm/mach/map.h> + +static struct map_desc asm9260_io_desc[]__initdata = { + {/* IO space */ + .virtual = (unsigned long )0xf0000000 , + .pfn =__phys_to_pfn (0x80000000 ), + .length =0x00800000 , + .type =MT_DEVICE + }, + {/* LCD IO space */ + .virtual = (unsigned long )0xf0a00000 , + .pfn =__phys_to_pfn (0x80800000 ), + .length =0x00009000 , + .type =MT_DEVICE + }, + {/* GPIO IO space */ + .virtual = (unsigned long )0xf0800000 , + .pfn =__phys_to_pfn (0x50000000 ), + .length =0x00100000 , + .type =MT_DEVICE + }, + {/* SRAM space Cacheable */ + .virtual = (unsigned long )0xd0000000 , + .pfn =__phys_to_pfn (0x40000000 ), + .length =0x00100000 , +#ifdef CONFIG_SRAM_MEM_CACHED + .type =MT_MEMORY +#else + .type =MT_DEVICE +#endif + }, +}; + +static void __init asm9260_map_io (void ) +{ +iotable_init (asm9260_io_desc,ARRAY_SIZE (asm9260_io_desc)); +} + +static void __init asm9260_init (void ) +{ +of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL ); +} + +static const char *const asm9260_dt_board_compat[]__initconst = { +"alpscale,asm9260" , +NULL +}; + +DT_MACHINE_START (ASM9260 ,"Alpscale ASM9260 (Device Tree Support)" ) + .map_io = asm9260_map_io, + .init_machine = asm9260_init, + .dt_compat = asm9260_dt_board_compat, +MACHINE_END Signature · 7 lines
1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/7 ARM: add mach-asm9260
Am 14.09.2014 um 09:12 schrieb Jason Cooper:
Quoted 7 lines · Oleksij Rempel
Could you please add a description of the SoC? Perhaps a link to documentation, or at least a slick sheet? Also, are there any products on the market with this SoC, which ones?
thx,
Hi,
it is low cost (?) SoC targeted for market in China and India which trying to "replace" AT91SAM9G25.
Here is some info:
http://www.alphascale.com/index.asp?ics/615.html
Quoted 251 lines
Jason.
Quoted 248 lines
Signed-off-by Oleksij Rempel <[email protected]>--- arch/arm/Kconfig | 16 ++++++++ arch/arm/Makefile | 1 + arch/arm/mach-asm9260/Kconfig | 66 +++++++++++++++++++++++++++++++ arch/arm/mach-asm9260/Makefile | 11 ++++++ arch/arm/mach-asm9260/Makefile.boot | 2 + arch/arm/mach-asm9260/core.c | 77 +++++++++++++++++++++++++++++++++++++ 6 files changed, 173 insertions(+) create mode 100644 arch/arm/mach-asm9260/Kconfig create mode 100644 arch/arm/mach-asm9260/Makefile create mode 100644 arch/arm/mach-asm9260/Makefile.boot create mode 100644 arch/arm/mach-asm9260/core.carch/arm/Kconfig +16
-0@@ -373,6 +373,20 @@ config ARCH_AT91 This enables support for systems based on Atmel AT91RM9200 and AT91SAM9* processors. +config MACH_ASM9260 + bool "Alpscale ASM9260" + select ARCH_REQUIRE_GPIOLIB + select COMMON_CLK + select IRQ_DOMAIN + select SPARSE_IRQ + select MULTI_IRQ_HANDLER + select GENERIC_IRQ_CHIP + select GENERIC_CLOCKEVENTS + select CLKSRC_MMIO + select CPU_ARM926T + help + Support for Alpscale ASM9260 based platform. + config ARCH_CLPS711X bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" select ARCH_REQUIRE_GPIOLIB@@ -915,6 +929,8 @@ source "arch/arm/mach-mvebu/Kconfig" source "arch/arm/mach-at91/Kconfig" +source "arch/arm/mach-asm9260/Kconfig" + source "arch/arm/mach-axxia/Kconfig" source "arch/arm/mach-bcm/Kconfig"arch/arm/Makefile +1
-0@@ -143,6 +143,7 @@ textofs-$(CONFIG_ARCH_AXXIA) := 0x00308000 # Machine directory name. This list is sorted alphanumerically # by CONFIG_* macro name. machine-$(CONFIG_ARCH_AT91) += at91 +machine-$(CONFIG_MACH_ASM9260) += asm9260 machine-$(CONFIG_ARCH_AXXIA) += axxia machine-$(CONFIG_ARCH_BCM) += bcm machine-$(CONFIG_ARCH_BERLIN) += berlinarch/arm/mach-asm9260/Kconfig new file +66
-0@@ -0,0 +1,66 @@ +if MACH_ASM9260 + +menu "ASM9260T EVK Uart Enable" + +config ENABLE_UART0 + bool "Enable UART0" + depends on SERIAL_ASM9260 + default n + +config ENABLE_UART1 + bool "Enable UART1" + depends on SERIAL_ASM9260 + default n + +config ENABLE_UART2 + bool "Enable UART2" + depends on SERIAL_ASM9260 + default n + + +config ENABLE_UART3 + bool "Enable UART3" + depends on SERIAL_ASM9260 + default n + + +config ENABLE_UART4 + bool "Enable UART4" + depends on SERIAL_ASM9260 + default n + + +config ENABLE_UART5 + bool "Enable UART5" + depends on SERIAL_ASM9260 + default n + + +config ENABLE_UART6 + bool "Enable UART6" + depends on SERIAL_ASM9260 + default n + + +config ENABLE_UART7 + bool "Enable UART7" + depends on SERIAL_ASM9260 + default n + + +config ENABLE_UART8 + bool "Enable UART8" + depends on SERIAL_ASM9260 + default n + + +config ENABLE_UART9 + bool "Enable UART9" + depends on SERIAL_ASM9260 + default n + +endmenu + + +endif +arch/arm/mach-asm9260/Makefile new file +11
-0@@ -0,0 +1,11 @@ +# +# Makefile for the linux kernel. +# + +# Object file lists. + +obj-y := core.o +obj-m := +obj-n := +obj- := +arch/arm/mach-asm9260/Makefile.boot new file +2
-0@@ -0,0 +1,2 @@ +zreladdr-y := 0x20008000 +arch/arm/mach-asm9260/core.c new file +77
-0@@ -0,0 +1,77 @@ +/* +* Copyright (C) 2014 Oleksij Rempel <[email protected]> +* Co-author: Du Huanpeng <[email protected]> +* map_desc based on: +* linux/arch/arm/mach-asm9260/core.c +* Copyright (C) 2011-2014 Alpscale +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License along +* with this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ + +#include <linux/of_platform.h> +#include <asm/mach/arch.h> +#include <asm/mach/map.h> + +static struct map_desc asm9260_io_desc[]__initdata = { + {/* IO space */ + .virtual = (unsigned long )0xf0000000 , + .pfn =__phys_to_pfn (0x80000000 ), + .length =0x00800000 , + .type =MT_DEVICE + }, + {/* LCD IO space */ + .virtual = (unsigned long )0xf0a00000 , + .pfn =__phys_to_pfn (0x80800000 ), + .length =0x00009000 , + .type =MT_DEVICE + }, + {/* GPIO IO space */ + .virtual = (unsigned long )0xf0800000 , + .pfn =__phys_to_pfn (0x50000000 ), + .length =0x00100000 , + .type =MT_DEVICE + }, + {/* SRAM space Cacheable */ + .virtual = (unsigned long )0xd0000000 , + .pfn =__phys_to_pfn (0x40000000 ), + .length =0x00100000 , +#ifdef CONFIG_SRAM_MEM_CACHED + .type =MT_MEMORY +#else + .type =MT_DEVICE +#endif + }, +}; + +static void __init asm9260_map_io (void ) +{ +iotable_init (asm9260_io_desc,ARRAY_SIZE (asm9260_io_desc)); +} + +static void __init asm9260_init (void ) +{ +of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL ); +} + +static const char *const asm9260_dt_board_compat[]__initconst = { +"alpscale,asm9260" , +NULL +}; + +DT_MACHINE_START (ASM9260 ,"Alpscale ASM9260 (Device Tree Support)" ) + .map_io = asm9260_map_io, + .init_machine = asm9260_init, + .dt_compat = asm9260_dt_board_compat, +MACHINE_END Signature · 7 lines
1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 10 lines
Regards, Oleksij -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 213 bytes Desc: OpenPGP digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140914/e58968e1/attachment.sig>
PATCH 1/7 ARM: add mach-asm9260
Quoted 11 lines · Oleksij Rempel
Am 14.09.2014 um 09:12 schrieb Jason Cooper:
Quoted 7 lines · Oleksij Rempel
Could you please add a description of the SoC? Perhaps a link to documentation, or at least a slick sheet? Also, are there any products on the market with this SoC, which ones?
thx,
Hi,
Quoted 8 lines
it is low cost (?) SoC targeted for market in China and India which trying to "replace" AT91SAM9G25.
Here is some info:
http://www.alphascale.com/index.asp?ics/615.html
Ok, please include this information is the commit log of the next version of this patch.
thx,
Jason.
PATCH 1/7 ARM: add mach-asm9260
Hi,
Quoted 15 lines · Jason Cooper
Quoted 14 lines · Oleksij Rempel
Am 14.09.2014 um 09:12 schrieb Jason Cooper:
Quoted 7 lines · Oleksij Rempel
Could you please add a description of the SoC? Perhaps a link to documentation, or at least a slick sheet? Also, are there any products on the market with this SoC, which ones?
thx,
Hi,
it is low cost (?) SoC targeted for market in China and India which trying to "replace" AT91SAM9G25.
Quoted 9 lines
Quoted 5 lines
Here is some info:
http://www.alphascale.com/index.asp?ics/615.htmlOk, please include this information is the commit log of the next version of this patch.
I would also suggest to call it AlphaScale instead of Alpscale as it allows to get more useful information when searching the web.
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/7 ARM: add mach-asm9260
On 17/09/2014 15:46, Alexandre Belloni :
Quoted 17 lines
Hi,
Quoted 14 lines · Jason Cooper
Quoted 13 lines · Oleksij Rempel
Am 14.09.2014 um 09:12 schrieb Jason Cooper:
Quoted 7 lines · Oleksij Rempel
Could you please add a description of the SoC? Perhaps a link to documentation, or at least a slick sheet? Also, are there any products on the market with this SoC, which ones?
thx,
Hi,
it is low cost (?) SoC targeted for market in China and India which trying to "replace" AT91SAM9G25.
Well, I won't say "replace" but "compete with" Atmel AT91SAM9G25. AT91SAM9G25 is here to stay ;-)
Quoted 13 lines
Quoted 9 lines
Quoted 5 lines
Here is some info:
http://www.alphascale.com/index.asp?ics/615.htmlOk, please include this information is the commit log of the next version of this patch.
I would also suggest to call it AlphaScale instead of Alpscale as it allows to get more useful information when searching the web.
Signature · 1 line
Nicolas Ferre
PATCH 1/7 ARM: add mach-asm9260
Am 17.09.2014 um 15:53 schrieb Nicolas Ferre:
Quoted 14 lines
On 17/09/2014 15:46, Alexandre Belloni :
Quoted 13 lines
Hi,
Quoted 10 lines · Jason Cooper
Quoted 9 lines · Oleksij Rempel
Am 14.09.2014 um 09:12 schrieb Jason Cooper:
Quoted 7 lines · Oleksij Rempel
Could you please add a description of the SoC? Perhaps a link to documentation, or at least a slick sheet? Also, are there any products on the market with this SoC, which ones?
thx,
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Hi,
it is low cost (?) SoC targeted for market in China and India which trying to "replace" AT91SAM9G25.
Well, I won't say "replace" but "compete with" Atmel AT91SAM9G25. AT91SAM9G25 is here to stay ;-)
Hehe.. :D sure. I like this version.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
Ok, please include this information is the commit log of the next version of this patch.
I would also suggest to call it AlphaScale instead of Alpscale as it allows to get more useful information when searching the web.
Ok will fix it. Seems like they had this name confusion for some time. There is even www.alpscale.cn website mirrored with www.alphascale.com.
Signature · 10 lines
Regards, Oleksij -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 213 bytes Desc: OpenPGP digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140918/8b8f7423/attachment.sig>
PATCH 2/7 add include/debug/asm9260.S
In reply to Oleksij Rempel--- arch/arm/Kconfig.debug | 33 ++++++++++++++++++++++++++++++--- arch/arm/include/debug/asm9260.S | 31 +++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 arch/arm/include/debug/asm9260.S
arch/arm/Kconfig.debug +30 -3
@@ -937,6 +937,27 @@ choice options; the platform specific options are deprecated and will be soon removed. + 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 + endchoice config DEBUG_EXYNOS_UART
@@ -1017,6 +1038,7 @@ config DEBUG_LL_INCLUDE default "debug/vf.S" if DEBUG_VF_UART default "debug/vt8500.S" if DEBUG_VT8500_UART0 default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 + default "debug/asm9260.S" if DEBUG_ASM9260_UART default "mach/debug-macro.S" # Compatibility options for PL01x
@@ -1072,6 +1094,7 @@ config DEBUG_UART_PHYS default 0x50008000 if DEBUG_S3C24XX_UART && (DEBUG_S3C_UART2 || \ DEBUG_S3C2410_UART2) default 0x7c0003f8 if FOOTBRIDGE + default 0x80010000 if DEBUG_ASM9260_UART default 0x80070000 if DEBUG_IMX23_UART default 0x80074000 if DEBUG_IMX28_UART default 0x80230000 if DEBUG_PICOXCELL_UART
@@ -1103,7 +1126,8 @@ config DEBUG_UART_PHYS depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ DEBUG_LL_UART_EFM32 || \ DEBUG_UART_8250 || DEBUG_UART_PL01X || \ - DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART + DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || \ + DEBUG_S3C24XX_UART || DEBUG_ASM9260_UART config DEBUG_UART_VIRT hex "Virtual base address of debug UART"
@@ -1111,6 +1135,7 @@ config DEBUG_UART_VIRT default 0xe1000000 if DEBUG_MSM_UART default 0xf0000be0 if ARCH_EBSA110 default 0xf0009000 if DEBUG_CNS3XXX + default 0xf0010000 if DEBUG_ASM9260_UART default 0xf01fb000 if DEBUG_NOMADIK_UART default 0xf0201000 if DEBUG_BCM2835 default 0xf1000300 if DEBUG_BCM_5301X
@@ -1170,7 +1195,8 @@ config DEBUG_UART_VIRT default DEBUG_UART_PHYS if !MMU depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ DEBUG_UART_8250 || DEBUG_UART_PL01X || \ - DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART + DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || \ + DEBUG_S3C24XX_UART || DEBUG_ASM9260_UART config DEBUG_UART_8250_SHIFT int "Register offset shift for the 8250 debug UART"
@@ -1212,7 +1238,8 @@ config DEBUG_UNCOMPRESS config UNCOMPRESS_INCLUDE string default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM || \ - PLAT_SAMSUNG || ARCH_EFM32 + PLAT_SAMSUNG || ARCH_EFM32 || \ + MACH_ASM9260 default "mach/uncompress.h" config EARLY_PRINTK
arch/arm/include/debug/asm9260.S new file +31 -0
@@ -0,0 +1,31 @@ +/* arch/arm/mach-imx/include/mach/debug-macro.S + * + * 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 <[email protected]> + * + * 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
Signature · 1 line
1.9.1
PATCH 3/7 ARM: dts: add DT for Alpscale ASM9260 SoC
In reply to Oleksij Rempel--- arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/asm9260-devkit.dts | 15 ++ arch/arm/boot/dts/asm9260.dtsi | 425 +++++++++++++++++++++++++++++++++++ 3 files changed, 442 insertions(+) create mode 100644 arch/arm/boot/dts/asm9260-devkit.dts create mode 100644 arch/arm/boot/dts/asm9260.dtsi
arch/arm/boot/dts/Makefile +2 -0
@@ -446,6 +446,8 @@ dtb-$(CONFIG_MACH_DOVE) += dove-cm-a510.dtb \ dove-d3plug.dtb \ dove-dove-db.dtb +dtb-$(CONFIG_MACH_ASM9260) += asm9260-devkit.dtb + targets += dtbs dtbs_install targets += $(dtb-y) endif
arch/arm/boot/dts/asm9260-devkit.dts new file +15 -0
@@ -0,0 +1,15 @@ +/dts-v1/; +#include "asm9260.dtsi" + +/ { + model = "Alpscale asm9260 Development Kit"; + compatible = "alpscale,asm9260devkit", "alpscale,asm9260"; + + chosen { + bootargs = "mem=32M earlyprintk=serial console=ttyS4,115200n8 root=/dev/mtdblock1 init=/linuxrc mtdparts=NAND:4M at 10M(logo)ro,60M at 14M(root)ro"; + }; + +}; +&uart4 { + status = "okay"; +};
arch/arm/boot/dts/asm9260.dtsi new file +425 -0
425 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 4/7 clk: add clk-asm9260 driver
In reply to Oleksij Rempel--- drivers/clk/Makefile | 1 + drivers/clk/clk-asm9260.c | 159 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+) create mode 100644 drivers/clk/clk-asm9260.c
drivers/clk/Makefile +1 -0
@@ -38,6 +38,7 @@ obj-$(CONFIG_ARCH_HI3xxx) += hisilicon/ obj-$(CONFIG_ARCH_HIP04) += hisilicon/ obj-$(CONFIG_ARCH_HIX5HD2) += hisilicon/ obj-$(CONFIG_COMMON_CLK_KEYSTONE) += keystone/ +obj-$(CONFIG_MACH_ASM9260) += clk-asm9260.o ifeq ($(CONFIG_COMMON_CLK), y) obj-$(CONFIG_ARCH_MMP) += mmp/ endif
drivers/clk/clk-asm9260.c new file +159 -0
159 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 4/7 clk: add clk-asm9260 driver
Hi,
Please have a look at https://lkml.org/lkml/2014/5/14/598 which describe the preferred way of implementing clocks in the CCF where you only declare the clock generator in the DT instead of each separate clocks.
Quoted 192 lines · Oleksij Rempel
Signed-off-by Oleksij Rempel <[email protected]>--- drivers/clk/Makefile | 1 + drivers/clk/clk-asm9260.c | 159 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+) create mode 100644 drivers/clk/clk-asm9260.cdrivers/clk/Makefile +1
-0@@ -38,6 +38,7 @@ obj-$(CONFIG_ARCH_HI3xxx) += hisilicon/ obj-$(CONFIG_ARCH_HIP04) += hisilicon/ obj-$(CONFIG_ARCH_HIX5HD2) += hisilicon/ obj-$(CONFIG_COMMON_CLK_KEYSTONE) += keystone/ +obj-$(CONFIG_MACH_ASM9260) += clk-asm9260.o ifeq ($(CONFIG_COMMON_CLK), y) obj-$(CONFIG_ARCH_MMP) += mmp/ endifdrivers/clk/clk-asm9260.c new file +159
-0@@ -0,0 +1,159 @@ +/* +* U300 clock implementation +* Copyright (C) 2007-2012 ST-Ericsson AB +* License terms: GNU General Public License (GPL) version 2 +* Author: Linus Walleij <[email protected]> +* Author: Jonas Aaberg <[email protected]> +*/ +#include <linux/clk.h> +#include <linux/clkdev.h> +#include <linux/err.h> +#include <linux/io.h> +#include <linux/clk-provider.h> +#include <linux/spinlock.h> +#include <linux/of.h> +#include <linux/of_address.h> + +static DEFINE_SPINLOCK (asm9260_clk_lock); + +struct asm9260_clk { +void __iomem *reg; +char *parent_name; +}; + +static void __iomem *asm9260_get_sreg (struct device_node *node) +{ +u32 reg; +void __iomem *iomem; +struct device_node *srnp; +int ret; + + ret =of_property_read_u32 (node,"reg" , ®); +if (WARN_ON (ret)) +return NULL ; + + srnp =of_find_compatible_node (NULL ,NULL ,"alpscale,asm9260-sregs" ); + iomem =of_iomap (srnp,0 ); + iomem += reg; + +return iomem; +} + +/* +* On this chip gate used to disable or to update clock +* after new source was selected +*/ + +static void __init asm9260_gate_init (struct device_node *node) +{ +struct clk *clk; +const char *clk_name = node->name; +void __iomem *iomem; +const char *parent_name; +u32 bit; +int ret; + + iomem =asm9260_get_sreg (node); + parent_name =of_clk_get_parent_name (node,0 ); + + ret =of_property_read_u32 (node,"bit-index" , &bit); +if (WARN_ON (ret)) +return ; + + clk =clk_register_gate (NULL , clk_name, parent_name, +CLK_SET_RATE_PARENT , iomem, bit,0 , + &asm9260_clk_lock); + +if (!IS_ERR (clk)) +of_clk_add_provider (node, of_clk_src_simple_get, clk); +} +CLK_OF_DECLARE (asm9260_gate,"alpscale,asm9260-gate-clock" , asm9260_gate_init); + + +static void __init asm9260_div_init (struct device_node *node) +{ +struct clk *clk; +const char *clk_name = node->name; +void __iomem *iomem; +const char *parent_name; + + iomem =asm9260_get_sreg (node); + + parent_name =of_clk_get_parent_name (node,0 ); + clk =clk_register_divider (NULL , clk_name, parent_name, +CLK_SET_RATE_PARENT , iomem,0 ,8 ,CLK_DIVIDER_ONE_BASED , + &asm9260_clk_lock); + +if (!IS_ERR (clk)) +of_clk_add_provider (node, of_clk_src_simple_get, clk); +} +CLK_OF_DECLARE (asm9260_div,"alpscale,asm9260-div-clock" , asm9260_div_init); + +/* +* Simple one bit MUX for two sources +*/ +static void __init asm9260_bimux_init (struct device_node *node) +{ +struct clk *clk; +const char *clk_name = node->name; +u8 num_parents; +void __iomem *iomem; +const char **parent_names; +int ret, i; +u32 *table; + + iomem =asm9260_get_sreg (node); +if (!iomem) +return ; + + num_parents =of_clk_get_parent_count (node); +if (WARN_ON (!num_parents || num_parents >2 )) +return ; + + parent_names =kzalloc (sizeof (char *) * num_parents,GFP_KERNEL ); +if (WARN_ON (!parent_names)) +return ; + + table =kzalloc (sizeof (u32) * num_parents,GFP_KERNEL ); +if (WARN_ON (!table)) +return ; + + ret =of_property_read_u32_array (node,"mux-table" , table, + num_parents); +if (WARN_ON (ret)) +return ; + +for (i =0 ; i < num_parents; i++) + parent_names[i] =of_clk_get_parent_name (node, i); + + clk =clk_register_mux_table (NULL , clk_name, parent_names, + num_parents,0 , iomem,0 ,1 ,0 , table, + &asm9260_clk_lock); + +if (!IS_ERR (clk)) +of_clk_add_provider (node, of_clk_src_simple_get, clk); +} +CLK_OF_DECLARE (asm9260_bimux,"alpscale,asm9260-bimux-clock" , asm9260_bimux_init); + +static void __init asm9260_pll_init (struct device_node *node) +{ +struct clk *clk; +const char *clk_name = node->name; +u32 rate; +void __iomem *iomem; +const char *parent_name; +u32 accuracy =0 ; + + iomem =asm9260_get_sreg (node); + rate = (ioread32 (iomem) &0xffff ) *1000000 ; + + parent_name =of_clk_get_parent_name (node,0 ); + accuracy =clk_get_accuracy (__clk_lookup (parent_name)); + clk =clk_register_fixed_rate_with_accuracy (NULL , clk_name, parent_name, +0 , rate, + accuracy); + +if (!IS_ERR (clk)) +of_clk_add_provider (node, of_clk_src_simple_get, clk); +} +CLK_OF_DECLARE (asm9260_pll,"alpscale,asm9260-pll-clock" , asm9260_pll_init);Signature · 7 lines
1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 4/7 clk: add clk-asm9260 driver
Am 17.09.2014 um 15:54 schrieb Alexandre Belloni:
Quoted 5 lines
Hi,
Please have a look at https://lkml.org/lkml/2014/5/14/598 which describe the preferred way of implementing clocks in the CCF where you only declare the clock generator in the DT instead of each separate clocks.
hm... if i see it correctly. i will need to move almost everything from DT to clk-driver. And i will need to create separate driver for other SoC provided by AlphaScale. On other side with current (generic) driver i will need only to change DT and it will work.
May be instead of going qcom way, it will be better to have generic gate, div and mux bindings for DT? Sure it will make DT a bit fuzzy, but it will dramatically reduce kernel code and reduce the time of providing code to upstream.
I don't think drivers/clk/qcom/gcc-msm8974.c is less complicated solution.
Signature · 10 lines
Regards, Oleksij -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 213 bytes Desc: OpenPGP digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140918/a206d61a/attachment.sig>
PATCH 4/7 clk: add clk-asm9260 driver
Hi,
Quoted 12 lines · Oleksij Rempel
Am 17.09.2014 um 15:54 schrieb Alexandre Belloni:
Quoted 5 lines
Hi,
Please have a look at https://lkml.org/lkml/2014/5/14/598 which describe the preferred way of implementing clocks in the CCF where you only declare the clock generator in the DT instead of each separate clocks.
hm... if i see it correctly. i will need to move almost everything from DT to clk-driver. And i will need to create separate driver for other SoC provided by AlphaScale. On other side with current (generic) driver i will need only to change DT and it will work.
Quoted 6 lines
May be instead of going qcom way, it will be better to have generic gate, div and mux bindings for DT? Sure it will make DT a bit fuzzy, but it will dramatically reduce kernel code and reduce the time of providing code to upstream.
I don't think
drivers/clk/qcom/gcc-msm8974.cis less complicated solution.
IT is not less complicated but it is more flexible (for exemple when setting flags on individual clocks, like CLK_SET_RATE_PARENT or CLK_IGNORE_UNUSED). Describing all the individual clocks in DT is a mistake we made in at91 and it will definitely bother you in the future, for example when you realize that your clock controller is also taking care of reset or power management.
Also, this is the kind of driver you write only once per SoC so it is about the same doing it in DT or in C with the added advantage that doing it in C takes less memory and is probably faster.
You can have a look at how it has been done for the berlin SoCs to see how you can easily reuse code between drivers.
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 4/7 clk: add clk-asm9260 driver
Am 18.09.2014 um 09:56 schrieb Alexandre Belloni:
Quoted 29 lines
Hi,
Quoted 12 lines · Oleksij Rempel
Am 17.09.2014 um 15:54 schrieb Alexandre Belloni:
Quoted 5 lines
Hi,
Please have a look at https://lkml.org/lkml/2014/5/14/598 which describe the preferred way of implementing clocks in the CCF where you only declare the clock generator in the DT instead of each separate clocks.
hm... if i see it correctly. i will need to move almost everything from DT to clk-driver. And i will need to create separate driver for other SoC provided by AlphaScale. On other side with current (generic) driver i will need only to change DT and it will work.
Quoted 6 lines
May be instead of going qcom way, it will be better to have generic gate, div and mux bindings for DT? Sure it will make DT a bit fuzzy, but it will dramatically reduce kernel code and reduce the time of providing code to upstream.
I don't think
drivers/clk/qcom/gcc-msm8974.cis less complicated solution.IT is not less complicated but it is more flexible (for exemple when setting flags on individual clocks, like
CLK_SET_RATE_PARENTorCLK_IGNORE_UNUSED). Describing all the individual clocks in DT is a mistake we made in at91 and it will definitely bother you in the future, for example when you realize that your clock controller is also taking care of reset or power management.
Quoted 6 lines
Also, this is the kind of driver you write only once per SoC so it is about the same doing it in DT or in C with the added advantage that doing it in C takes less memory and is probably faster.
You can have a look at how it has been done for the berlin SoCs to see how you can easily reuse code between drivers.
Ok, thank you. i'll rewrite it.
Signature · 2 lines
Regards, Oleksij
PATCH 4/7 clk: add clk-asm9260 driver
In reply to Alexandre BelloniAm 18.09.2014 um 09:56 schrieb Alexandre Belloni:
Quoted 29 lines
Hi,
Quoted 12 lines · Oleksij Rempel
Am 17.09.2014 um 15:54 schrieb Alexandre Belloni:
Quoted 5 lines
Hi,
Please have a look at https://lkml.org/lkml/2014/5/14/598 which describe the preferred way of implementing clocks in the CCF where you only declare the clock generator in the DT instead of each separate clocks.
hm... if i see it correctly. i will need to move almost everything from DT to clk-driver. And i will need to create separate driver for other SoC provided by AlphaScale. On other side with current (generic) driver i will need only to change DT and it will work.
Quoted 6 lines
May be instead of going qcom way, it will be better to have generic gate, div and mux bindings for DT? Sure it will make DT a bit fuzzy, but it will dramatically reduce kernel code and reduce the time of providing code to upstream.
I don't think
drivers/clk/qcom/gcc-msm8974.cis less complicated solution.IT is not less complicated but it is more flexible (for exemple when setting flags on individual clocks, like
CLK_SET_RATE_PARENTorCLK_IGNORE_UNUSED). Describing all the individual clocks in DT is a mistake we made in at91 and it will definitely bother you in the future, for example when you realize that your clock controller is also taking care of reset or power management.
Quoted 6 lines
Also, this is the kind of driver you write only once per SoC so it is about the same doing it in DT or in C with the added advantage that doing it in C takes less memory and is probably faster.
You can have a look at how it has been done for the berlin SoCs to see how you can easily reuse code between drivers.
What is the correct way to handle/define i2s MCLK input? I have I2S mux clock with choice of 3 sources: Xtal, PLL and MCLK. One of pins can be configured as MCLK src. Should i define fixedrate-clk?
Signature · 10 lines
Regards, Oleksij -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 213 bytes Desc: OpenPGP digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140920/0b0c4daf/attachment.sig>
PATCH 4/7 clk: add clk-asm9260 driver
Quoted 8 lines · Oleksij Rempel
Am 18.09.2014 um 09:56 schrieb Alexandre Belloni:
Quoted 2 lines
You can have a look at how it has been done for the berlin SoCs to see how you can easily reuse code between drivers.
What is the correct way to handle/define i2s MCLK input? I have I2S mux clock with choice of 3 sources: Xtal, PLL and MCLK. One of pins can be configured as MCLK src. Should i define fixedrate-clk?
It depends on where is your mux, if it is in the I2S controller adress range, I would simply give 3 parent clocks to your I2S controller, like:
i2s at 8fffffff {
compatible = "...";
reg = <0x8fffffff 0x100>;
clocks = <&xtal, &clkc CLKID_MCK, &clkc CLKID_PLL>;
}
If it is part of your clock generator, then simply register a clock mux with 3 parents as part of your clock controller binding. And use something like:
clocks = <&clck CLKID_I2S>;
Have a look at how this is done for berlin2, search for clk_register_mux()
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 5/7 clocksource: add asm9260_timer driver
In reply to Oleksij Rempel--- drivers/clocksource/Makefile | 1 + drivers/clocksource/asm9260_timer.c | 232 ++++++++++++++++++++++++++++++++++++ 2 files changed, 233 insertions(+) create mode 100644 drivers/clocksource/asm9260_timer.c
drivers/clocksource/Makefile +1 -0
@@ -41,3 +41,4 @@ obj-$(CONFIG_CLKSRC_METAG_GENERIC) += metag_generic.o obj-$(CONFIG_ARCH_HAS_TICK_BROADCAST) += dummy_timer.o obj-$(CONFIG_ARCH_KEYSTONE) += timer-keystone.o obj-$(CONFIG_CLKSRC_VERSATILE) += versatile.o +obj-$(CONFIG_MACH_ASM9260) += asm9260_timer.o
drivers/clocksource/asm9260_timer.c new file +232 -0
232 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 6/7 irqchip: add irq-asm9260 driver
In reply to Oleksij Rempel--- drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-asm9260.c | 237 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 238 insertions(+) create mode 100644 drivers/irqchip/irq-asm9260.c
drivers/irqchip/Makefile +1 -0
@@ -30,3 +30,4 @@ obj-$(CONFIG_XTENSA) += irq-xtensa-pic.o obj-$(CONFIG_XTENSA_MX) += irq-xtensa-mx.o obj-$(CONFIG_IRQ_CROSSBAR) += irq-crossbar.o obj-$(CONFIG_BRCMSTB_L2_IRQ) += irq-brcmstb-l2.o +obj-$(CONFIG_MACH_ASM9260) += irq-asm9260.o
drivers/irqchip/irq-asm9260.c new file +237 -0
237 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 6/7 irqchip: add irq-asm9260 driver
Oleksij,
Quoted 6 lines · Oleksij Rempel
Signed-off-by Oleksij Rempel <[email protected]>--- drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-asm9260.c | 237 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 238 insertions(+) create mode 100644 drivers/irqchip/irq-asm9260.c
Please don't forget to Cc me, I'm helping tglx with irqchip-related stuff.
Quoted 88 lines
drivers/irqchip/Makefile +1
-0@@ -30,3 +30,4 @@ obj-$(CONFIG_XTENSA) += irq-xtensa-pic.o obj-$(CONFIG_XTENSA_MX) += irq-xtensa-mx.o obj-$(CONFIG_IRQ_CROSSBAR) += irq-crossbar.o obj-$(CONFIG_BRCMSTB_L2_IRQ) += irq-brcmstb-l2.o +obj-$(CONFIG_MACH_ASM9260) += irq-asm9260.odrivers/irqchip/irq-asm9260.c new file +73
-0@@ -0,0 +1,237 @@ +/* +* Copyright (C) 2014 Oleksij Rempel <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License along +* with this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/irq.h> +#include <linux/irqdomain.h> +#include <linux/io.h> +#include <linux/of.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> +#include <asm/exception.h> +#include <linux/bitops.h> +#include <linux/delay.h> + +#include "irqchip.h" + +#define SET_REG 4 +#define CLR_REG 8 + +#define HW_ICOLL_VECTOR 0x0000 +/* bits 31:2 +* This register presents the vector address for the interrupt currently +* active on the CPU IRQ input. Writing to this register notifies the +* interrupt collector that the interrupt service routine for the current +* interrupt has been entered. +* The exception trap should have a LDPC instruction from this address: +* LDPC HW_ICOLL_VECTOR_ADDR; IRQ exception at 0xffff0018 +*/ + +#define HW_ICOLL_LEVELACK 0x0010 +/* The Interrupt Collector Level Acknowledge Register is used by software to +* indicate the completion of an interrupt on a specific level. +* This register is written at the very end of an interrupt service routine. If +* nesting is used then the CPU irq must be turned on before writing to this +* register to avoid a race condition in the CPU interrupt hardware. +*/ +#define BM_LEVELn (nr) BIT(nr) + +#define HW_ICOLL_CTRL 0x0020 +/* BM_CTRL_SFTRST and BM_CTRL_CLKGATE are not available on asm9260. */ +#define BM_CTRL_SFTRST BIT(31) +#define BM_CTRL_CLKGATE BIT(30) +#define BM_CTRL_NO_NESTING BIT(19) +/* disable interrupt level nesting */ +#define BM_CTRL_ARM_RSE_MODE BIT(18) +/* Set this bit to one enable the RISC32-style read side effect associated with +* the vector address register. In this mode, interrupt in-service is signaled +* by the read of the HW_ICOLL_VECTOR register to acquire the interrupt vector +* address. Set this bit to zero for normal operation, in which the ISR signals +* in-service explicitly by means of a write to the HW_ICOLL_VECTOR register. +* 0 - Must Write to Vector register to go in-service. +* 1 - Go in-service as a read side effect +*/ +#define BM_CTRL_IRQ_ENABLE BIT(16) + +#define HW_ICOLL_STAT_OFFSET 0x0030 +/* bits 5:0
drivers/irqchip/irq-asm9260.c line 83
Quoted 10 lines
drivers/irqchip/irq-asm9260.c new file +10
-0+* Vector number of current interrupt. Multiply by 4 and add to vector base +* address to obtain the value in HW_ICOLL_VECTOR. +*/ + +#define HW_ICOLL_RAW0 0x0040 +#define HW_ICOLL_RAW1 0x0050 +/* This register provides a read-only view of the raw interrupt request lines +* coming from various parts of the chip. Its purpose is to improve diagnostic +* observability. +*/
wrt all of the above comment, please follow the kernel coding style:
/*
* Begin multi-line text.
*/
Also, please place the comment _above_ the code it is referring to.
drivers/irqchip/irq-asm9260.c line 93
Quoted 10 lines
drivers/irqchip/irq-asm9260.c new file +10
-0+ +#define HW_ICOLL_INTERRUPT0 0x0060 +#define HW_ICOLL_INTERRUPTn (n) (0x0060 + ((n) >> 2) * 0x10) +#define HW_ICOLL_INTERRUPTn_SET (n) (HW_ICOLL_INTERRUPTn(n) \ + + SET_REG) +#define HW_ICOLL_INTERRUPTn_CLR (n) (HW_ICOLL_INTERRUPTn(n) \ + + CLR_REG) +#define BM_INT_PRIORITY_MASK 0x3 +/* WARNING: Modifying the priority of an enabled interrupt may result in +* undefined behavior. */
multi-line comment style.
Quoted 66 lines
drivers/irqchip/irq-asm9260.c new file +66
-0+#define BM_INT_ENABLE BIT(2) +#define BM_INT_SOFTIRQ BIT(3) + +#define BM_ICOLL_INTERRUPTn_SHIFT (n) (((n) & 0x3) << 3) +#define BM_ICOLL_INTERRUPTn_ENABLE (n) (1 << (2 + \ + BM_ICOLL_INTERRUPTn_SHIFT(n))) + +#define HW_ICOLL_VBASE 0x0160 +/* bits 31:2 +* This bitfield holds the upper 30 bits of the base address of the vector +* table. */ + +#define HW_ICOLL_CLEAR0 0x01d0 +#define HW_ICOLL_CLEAR1 0x01e0 +#define HW_ICOLL_CLEARn (n) (0x01d0 + ((n >> 5) * 0x10) \ + + SET_REG) +#define BM_CLEAR_BIT (n) BIT(n & 0x1f) + +#define HW_ICOLL_UNDEF_VECTOR 0x01f0 +/* Scratchpad */ + +#define ICOLL_NUM_IRQS 64 + +static void __iomem *icoll_base; +static struct irq_domain *icoll_domain; +static int use_cached_level =1 ; +static u8 level_cache[ICOLL_NUM_IRQS ]; + +static unsigned int irq_get_level (struct irq_data *d) +{ +unsigned int tmp; + +if (use_cached_level) +return level_cache[d->hwirq]; + + tmp =readl_relaxed (icoll_base +HW_ICOLL_INTERRUPTn_SET (d->hwirq)); +return (tmp >>BM_ICOLL_INTERRUPTn_SHIFT (d->hwirq)) &0x3 ; +} + +static void irq_set_level (int hwirq,int level) +{ +if (unlikely (level <0 || level >3 )) { +pr_err ("%s Wrong level (%i) for irq (%i)!" , __func__, level, + hwirq); +return ; + } +if (use_cached_level) + level_cache[hwirq] = level; + +writel_relaxed (level <<BM_ICOLL_INTERRUPTn_SHIFT (hwirq), + icoll_base +HW_ICOLL_INTERRUPTn (hwirq)); +} + +static void icoll_ack_irq (struct irq_data *d) +{ +readl_relaxed (icoll_base +HW_ICOLL_VECTOR ); +} + +static void icoll_mask_irq (struct irq_data *d) +{ +writel_relaxed (BM_ICOLL_INTERRUPTn_ENABLE (d->hwirq), + icoll_base +HW_ICOLL_INTERRUPTn_CLR (d->hwirq)); +} + +static void icoll_unmask_irq (struct irq_data *d) +{
drivers/irqchip/irq-asm9260.c line 169
Quoted 10 lines
drivers/irqchip/irq-asm9260.c new file +10
-0+u32 level; + +writel_relaxed (BM_CLEAR_BIT (d->hwirq), + icoll_base +HW_ICOLL_CLEARn (d->hwirq)); + + level =irq_get_level (d); +writel_relaxed (BM_LEVELn (level), icoll_base +HW_ICOLL_LEVELACK ); + +writel_relaxed (BM_ICOLL_INTERRUPTn_ENABLE (d->hwirq), + icoll_base +HW_ICOLL_INTERRUPTn_SET (d->hwirq));
mutex?
Quoted 4 lines
drivers/irqchip/irq-asm9260.c new file +4
-0+} + +static struct irq_chip asm9260_icoll_chip = { + .irq_ack = icoll_ack_irq,
drivers/irqchip/irq-asm9260.c line 183
Quoted 10 lines
drivers/irqchip/irq-asm9260.c new file +10
-0+ .irq_mask = icoll_mask_irq, + .irq_unmask = icoll_unmask_irq, +}; + +asmlinkage void __exception_irq_entry icoll_handle_irq(struct pt_regs *regs) +{ +u32 irqnr; + + irqnr =irq_find_mapping (icoll_domain, +readl_relaxed (icoll_base +HW_ICOLL_STAT_OFFSET ));
Please check the return value of irq_find_mapping()
drivers/irqchip/irq-asm9260.c line 185
Quoted 2 lines
drivers/irqchip/irq-asm9260.c new file +2
-0+ +handle_IRQ (irqnr, regs);
We're in the progress of converting to handle_domain_irq(), please take a look at the series in
git://git.infradead.org/users/jcooper/linux.git irqchip/handle_domain
Quoted 13 lines
drivers/irqchip/irq-asm9260.c new file +13
-0+} + +static int icoll_irq_domain_map (struct irq_domain *d,unsigned int virq, +irq_hw_number_t hw) +{ +irq_set_chip_and_handler (virq, &asm9260_icoll_chip, handle_level_irq); +set_irq_flags (virq,IRQF_VALID ); + +return 0 ; +} + +static struct irq_domain_ops icoll_irq_domain_ops = { + .map = icoll_irq_domain_map,
drivers/irqchip/irq-asm9260.c line 208
Quoted 10 lines
drivers/irqchip/irq-asm9260.c new file +10
-0+ .xlate = irq_domain_xlate_onecell, +}; + +static int __init icoll_of_init (struct device_node *np, +struct device_node *interrupt_parent) +{ +struct resource res; +int i; + +of_address_to_resource (np,0 , &res);
Please check the return value of of_address_to_resource().
Quoted 11 lines
drivers/irqchip/irq-asm9260.c new file +11
-0+if (!request_mem_region (res.start,resource_size (&res), np->name)) +panic ("%s: unable to request mem region" , np->name); + + icoll_base =ioremap_nocache (res.start,resource_size (&res)); +if (!icoll_base) +panic ("%s: unable to map resource" , np->name); + +/* enable IRQ controller */ +writel_relaxed (BM_CTRL_ARM_RSE_MODE |BM_CTRL_IRQ_ENABLE , + icoll_base +HW_ICOLL_CTRL ); +
drivers/irqchip/irq-asm9260.c line 229
Quoted 10 lines
drivers/irqchip/irq-asm9260.c new file +10
-0+/* This ICOLL has no reset option. So, set all priorities +* manually to 0. */ +for (i =0 ; i <16 *0x10 ; i +=0x10 ) +writel (0 , icoll_base +HW_ICOLL_INTERRUPT0 + i); + +/* set timer 0 priority level high. TODO: should be done by DT */ +irq_set_level (29 ,3 ); + + icoll_domain =irq_domain_add_linear (np,ICOLL_NUM_IRQS , + &icoll_irq_domain_ops,NULL );
Please check return value of irq_domain_add_linear().
thx,
Jason.
Quoted 16 lines
drivers/irqchip/irq-asm9260.c new file +8
-0+ +irq_set_default_host (icoll_domain); + +set_handle_irq (icoll_handle_irq); + +return icoll_domain ?0 : -ENODEV ; +} +IRQCHIP_DECLARE (asm9260,"alpscale,asm9260-icall" , icoll_of_init);Signature · 7 lines
1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 6/7 irqchip: add irq-asm9260 driver
Hi Jason,
thx for review.
How about irq priority system which provide this controller, do it make sense to implement it? Or it es better to allow kernel make needed decision?
Am 14.09.2014 um 09:37 schrieb Jason Cooper:
Quoted 307 lines
Oleksij,
Quoted 6 lines · Oleksij Rempel
Signed-off-by Oleksij Rempel <[email protected]>--- drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-asm9260.c | 237 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 238 insertions(+) create mode 100644 drivers/irqchip/irq-asm9260.cPlease don't forget to Cc me, I'm helping tglx with irqchip-related stuff.
Quoted 88 lines
drivers/irqchip/Makefile +1
-0@@ -30,3 +30,4 @@ obj-$(CONFIG_XTENSA) += irq-xtensa-pic.o obj-$(CONFIG_XTENSA_MX) += irq-xtensa-mx.o obj-$(CONFIG_IRQ_CROSSBAR) += irq-crossbar.o obj-$(CONFIG_BRCMSTB_L2_IRQ) += irq-brcmstb-l2.o +obj-$(CONFIG_MACH_ASM9260) += irq-asm9260.odrivers/irqchip/irq-asm9260.c new file +73
-0@@ -0,0 +1,237 @@ +/* +* Copyright (C) 2014 Oleksij Rempel <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License along +* with this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/irq.h> +#include <linux/irqdomain.h> +#include <linux/io.h> +#include <linux/of.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> +#include <asm/exception.h> +#include <linux/bitops.h> +#include <linux/delay.h> + +#include "irqchip.h" + +#define SET_REG 4 +#define CLR_REG 8 + +#define HW_ICOLL_VECTOR 0x0000 +/* bits 31:2 +* This register presents the vector address for the interrupt currently +* active on the CPU IRQ input. Writing to this register notifies the +* interrupt collector that the interrupt service routine for the current +* interrupt has been entered. +* The exception trap should have a LDPC instruction from this address: +* LDPC HW_ICOLL_VECTOR_ADDR; IRQ exception at 0xffff0018 +*/ + +#define HW_ICOLL_LEVELACK 0x0010 +/* The Interrupt Collector Level Acknowledge Register is used by software to +* indicate the completion of an interrupt on a specific level. +* This register is written at the very end of an interrupt service routine. If +* nesting is used then the CPU irq must be turned on before writing to this +* register to avoid a race condition in the CPU interrupt hardware. +*/ +#define BM_LEVELn (nr) BIT(nr) + +#define HW_ICOLL_CTRL 0x0020 +/* BM_CTRL_SFTRST and BM_CTRL_CLKGATE are not available on asm9260. */ +#define BM_CTRL_SFTRST BIT(31) +#define BM_CTRL_CLKGATE BIT(30) +#define BM_CTRL_NO_NESTING BIT(19) +/* disable interrupt level nesting */ +#define BM_CTRL_ARM_RSE_MODE BIT(18) +/* Set this bit to one enable the RISC32-style read side effect associated with +* the vector address register. In this mode, interrupt in-service is signaled +* by the read of the HW_ICOLL_VECTOR register to acquire the interrupt vector +* address. Set this bit to zero for normal operation, in which the ISR signals +* in-service explicitly by means of a write to the HW_ICOLL_VECTOR register. +* 0 - Must Write to Vector register to go in-service. +* 1 - Go in-service as a read side effect +*/ +#define BM_CTRL_IRQ_ENABLE BIT(16) + +#define HW_ICOLL_STAT_OFFSET 0x0030 +/* bits 5:0 drivers/irqchip/irq-asm9260.c line 83
Quoted 10 lines
drivers/irqchip/irq-asm9260.c new file +10
-0+* Vector number of current interrupt. Multiply by 4 and add to vector base +* address to obtain the value in HW_ICOLL_VECTOR. +*/ + +#define HW_ICOLL_RAW0 0x0040 +#define HW_ICOLL_RAW1 0x0050 +/* This register provides a read-only view of the raw interrupt request lines +* coming from various parts of the chip. Its purpose is to improve diagnostic +* observability. +*/ wrt all of the above comment, please follow the kernel coding style:
/*
* Begin multi-line text.
*/Also, please place the comment _above_ the code it is referring to.
drivers/irqchip/irq-asm9260.c line 93
Quoted 10 lines
drivers/irqchip/irq-asm9260.c new file +10
-0+ +#define HW_ICOLL_INTERRUPT0 0x0060 +#define HW_ICOLL_INTERRUPTn (n) (0x0060 + ((n) >> 2) * 0x10) +#define HW_ICOLL_INTERRUPTn_SET (n) (HW_ICOLL_INTERRUPTn(n) \ + + SET_REG) +#define HW_ICOLL_INTERRUPTn_CLR (n) (HW_ICOLL_INTERRUPTn(n) \ + + CLR_REG) +#define BM_INT_PRIORITY_MASK 0x3 +/* WARNING: Modifying the priority of an enabled interrupt may result in +* undefined behavior. */ multi-line comment style.
Quoted 66 lines
drivers/irqchip/irq-asm9260.c new file +66
-0+#define BM_INT_ENABLE BIT(2) +#define BM_INT_SOFTIRQ BIT(3) + +#define BM_ICOLL_INTERRUPTn_SHIFT (n) (((n) & 0x3) << 3) +#define BM_ICOLL_INTERRUPTn_ENABLE (n) (1 << (2 + \ + BM_ICOLL_INTERRUPTn_SHIFT(n))) + +#define HW_ICOLL_VBASE 0x0160 +/* bits 31:2 +* This bitfield holds the upper 30 bits of the base address of the vector +* table. */ + +#define HW_ICOLL_CLEAR0 0x01d0 +#define HW_ICOLL_CLEAR1 0x01e0 +#define HW_ICOLL_CLEARn (n) (0x01d0 + ((n >> 5) * 0x10) \ + + SET_REG) +#define BM_CLEAR_BIT (n) BIT(n & 0x1f) + +#define HW_ICOLL_UNDEF_VECTOR 0x01f0 +/* Scratchpad */ + +#define ICOLL_NUM_IRQS 64 + +static void __iomem *icoll_base; +static struct irq_domain *icoll_domain; +static int use_cached_level =1 ; +static u8 level_cache[ICOLL_NUM_IRQS ]; + +static unsigned int irq_get_level (struct irq_data *d) +{ +unsigned int tmp; + +if (use_cached_level) +return level_cache[d->hwirq]; + + tmp =readl_relaxed (icoll_base +HW_ICOLL_INTERRUPTn_SET (d->hwirq)); +return (tmp >>BM_ICOLL_INTERRUPTn_SHIFT (d->hwirq)) &0x3 ; +} + +static void irq_set_level (int hwirq,int level) +{ +if (unlikely (level <0 || level >3 )) { +pr_err ("%s Wrong level (%i) for irq (%i)!" , __func__, level, + hwirq); +return ; + } +if (use_cached_level) + level_cache[hwirq] = level; + +writel_relaxed (level <<BM_ICOLL_INTERRUPTn_SHIFT (hwirq), + icoll_base +HW_ICOLL_INTERRUPTn (hwirq)); +} + +static void icoll_ack_irq (struct irq_data *d) +{ +readl_relaxed (icoll_base +HW_ICOLL_VECTOR ); +} + +static void icoll_mask_irq (struct irq_data *d) +{ +writel_relaxed (BM_ICOLL_INTERRUPTn_ENABLE (d->hwirq), + icoll_base +HW_ICOLL_INTERRUPTn_CLR (d->hwirq)); +} + +static void icoll_unmask_irq (struct irq_data *d) +{drivers/irqchip/irq-asm9260.c line 169
Quoted 10 lines
drivers/irqchip/irq-asm9260.c new file +10
-0+u32 level; + +writel_relaxed (BM_CLEAR_BIT (d->hwirq), + icoll_base +HW_ICOLL_CLEARn (d->hwirq)); + + level =irq_get_level (d); +writel_relaxed (BM_LEVELn (level), icoll_base +HW_ICOLL_LEVELACK ); + +writel_relaxed (BM_ICOLL_INTERRUPTn_ENABLE (d->hwirq), + icoll_base +HW_ICOLL_INTERRUPTn_SET (d->hwirq));mutex?
Quoted 4 lines
drivers/irqchip/irq-asm9260.c new file +4
-0+} + +static struct irq_chip asm9260_icoll_chip = { + .irq_ack = icoll_ack_irq,drivers/irqchip/irq-asm9260.c line 183
Quoted 10 lines
drivers/irqchip/irq-asm9260.c new file +10
-0+ .irq_mask = icoll_mask_irq, + .irq_unmask = icoll_unmask_irq, +}; + +asmlinkage void __exception_irq_entry icoll_handle_irq(struct pt_regs *regs) +{ +u32 irqnr; + + irqnr =irq_find_mapping (icoll_domain, +readl_relaxed (icoll_base +HW_ICOLL_STAT_OFFSET ));Please check the return value of
irq_find_mapping()drivers/irqchip/irq-asm9260.c line 185
Quoted 2 lines
drivers/irqchip/irq-asm9260.c new file +2
-0+ +handle_IRQ (irqnr, regs);We're in the progress of converting to
handle_domain_irq(), please take a look at the series in
git://git.infradead.org/users/jcooper/linux.gitirqchip/handle_domainQuoted 13 lines
drivers/irqchip/irq-asm9260.c new file +13
-0+} + +static int icoll_irq_domain_map (struct irq_domain *d,unsigned int virq, +irq_hw_number_t hw) +{ +irq_set_chip_and_handler (virq, &asm9260_icoll_chip, handle_level_irq); +set_irq_flags (virq,IRQF_VALID ); + +return 0 ; +} + +static struct irq_domain_ops icoll_irq_domain_ops = { + .map = icoll_irq_domain_map,drivers/irqchip/irq-asm9260.c line 208
Quoted 10 lines
drivers/irqchip/irq-asm9260.c new file +10
-0+ .xlate = irq_domain_xlate_onecell, +}; + +static int __init icoll_of_init (struct device_node *np, +struct device_node *interrupt_parent) +{ +struct resource res; +int i; + +of_address_to_resource (np,0 , &res);Please check the return value of
of_address_to_resource().Quoted 11 lines
drivers/irqchip/irq-asm9260.c new file +11
-0+if (!request_mem_region (res.start,resource_size (&res), np->name)) +panic ("%s: unable to request mem region" , np->name); + + icoll_base =ioremap_nocache (res.start,resource_size (&res)); +if (!icoll_base) +panic ("%s: unable to map resource" , np->name); + +/* enable IRQ controller */ +writel_relaxed (BM_CTRL_ARM_RSE_MODE |BM_CTRL_IRQ_ENABLE , + icoll_base +HW_ICOLL_CTRL ); +drivers/irqchip/irq-asm9260.c line 229
Quoted 10 lines
drivers/irqchip/irq-asm9260.c new file +10
-0+/* This ICOLL has no reset option. So, set all priorities +* manually to 0. */ +for (i =0 ; i <16 *0x10 ; i +=0x10 ) +writel (0 , icoll_base +HW_ICOLL_INTERRUPT0 + i); + +/* set timer 0 priority level high. TODO: should be done by DT */ +irq_set_level (29 ,3 ); + + icoll_domain =irq_domain_add_linear (np,ICOLL_NUM_IRQS , + &icoll_irq_domain_ops,NULL );Please check return value of
irq_domain_add_linear().thx,
Jason.
Quoted 16 lines
drivers/irqchip/irq-asm9260.c new file +8
-0+ +irq_set_default_host (icoll_domain); + +set_handle_irq (icoll_handle_irq); + +return icoll_domain ?0 : -ENODEV ; +} +IRQCHIP_DECLARE (asm9260,"alpscale,asm9260-icall" , icoll_of_init);Signature · 7 lines
1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 10 lines
Regards, Oleksij -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 213 bytes Desc: OpenPGP digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140915/2b51b1fa/attachment.sig>
PATCH 6/7 irqchip: add irq-asm9260 driver
Quoted 2 lines · Oleksij Rempel
How about irq priority system which provide this controller, do it make sense to implement it? Or it es better to allow kernel make needed decision?
Let's keep it simple for now. If you discover a problem down the road, we can address it at the time.
thx,
Jason.
PATCH 7/7 tty/serial: add asm9260-serial driver
In reply to Oleksij Rempel--- drivers/tty/serial/Kconfig | 19 + drivers/tty/serial/Makefile | 1 + drivers/tty/serial/asm9260_serial.c | 1236 +++++++++++++++++++++++++++++++++++ include/uapi/linux/serial_core.h | 2 + 4 files changed, 1258 insertions(+) create mode 100644 drivers/tty/serial/asm9260_serial.c
drivers/tty/serial/Kconfig +19 -0
@@ -1552,6 +1552,25 @@ config SERIAL_MEN_Z135 This driver can also be build as a module. If so, the module will be called men_z135_uart.ko +config SERIAL_ASM9260 + tristate "ASM9260 controller serial support" + depends on MACH_ASM9260 + select SERIAL_CORE + help + If you have an asm9260 based Base IO card + and wish to use the serial ports on this card, say Y. + Otherwise, say N. + +config SERIAL_ASM9260_CONSOLE + bool "ASM9260 console support" + depends on SERIAL_ASM9260 + select SERIAL_CORE_CONSOLE + help + If you want to support serial console on borad asm9260 + say Y. Otherwise, say N. + +source "arch/arm/mach-asm9260/Kconfig" + endmenu config SERIAL_MCTRL_GPIO
drivers/tty/serial/Makefile +1 -0
@@ -95,3 +95,4 @@ obj-$(CONFIG_SERIAL_MEN_Z135) += men_z135_uart.o # GPIOLIB helpers for modem control lines obj-$(CONFIG_SERIAL_MCTRL_GPIO) += serial_mctrl_gpio.o +obj-$(CONFIG_SERIAL_ASM9260) += asm9260_serial.o
drivers/tty/serial/asm9260_serial.c new file +1236 -0
1,236 lines not on this page · raw message
include/uapi/linux/serial_core.h +2 -0
@@ -244,4 +244,6 @@/* SC16IS74xx */ #define PORT_SC16IS7XX 108 +/* Alpscale ASM9260 */ +#define PORT_ASM9260 109#endif /* _UAPILINUX_SERIAL_CORE_H */
Signature · 1 line
1.9.1