Skip to content

Commit

Permalink
Merge tag 'at91-cleanup' of git://github.com/at91linux/linux-at91 int…
Browse files Browse the repository at this point in the history
…o next/cleanup

Merge "at91: cleanup for 3.18" from Nicolas Ferre:

First batch of AT91 cleanup for 3.18:
Following the merge of AIC/AIC5 code as standard irqchip drivers during early
3.17 merge window, we can use these drivers for AT91 DT-enabled chips and
boards.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

* tag 'at91-cleanup' of git://github.com/at91linux/linux-at91:
  ARM: at91: remove old irq material
  ARM: at91: make use of the new AIC driver for dt enabled boards
  ARM: at91: enclose at91_aic_xx calls in IS_ENABLED(CONFIG_OLD_IRQ_AT91) blocks
  ARM: at91: introduce OLD_IRQ_AT91 Kconfig option
  • Loading branch information
Arnd Bergmann committed Sep 5, 2014
2 parents 184df9d + 2626063 commit 32dc5ca
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 325 deletions.
17 changes: 9 additions & 8 deletions arch/arm/mach-at91/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ config OLD_CLK_AT91
bool
default AT91_PMC_UNIT && AT91_USE_OLD_CLK

config OLD_IRQ_AT91
bool
select MULTI_IRQ_HANDLER
select SPARSE_IRQ

config AT91_SAM9_ALT_RESET
bool
default !ARCH_AT91X40
Expand All @@ -45,18 +50,16 @@ config HAVE_AT91_SMD
config SOC_AT91SAM9
bool
select AT91_SAM9_TIME
select ATMEL_AIC_IRQ if !OLD_IRQ_AT91
select CPU_ARM926T
select GENERIC_CLOCKEVENTS
select MULTI_IRQ_HANDLER
select SPARSE_IRQ

config SOC_SAMA5
bool
select AT91_SAM9_TIME
select ATMEL_AIC5_IRQ
select CPU_V7
select GENERIC_CLOCKEVENTS
select MULTI_IRQ_HANDLER
select SPARSE_IRQ
select USE_OF

menu "Atmel AT91 System-on-Chip"
Expand All @@ -70,8 +73,7 @@ config ARCH_AT91X40
depends on !MMU
select CPU_ARM7TDMI
select ARCH_USES_GETTIMEOFFSET
select MULTI_IRQ_HANDLER
select SPARSE_IRQ
select OLD_IRQ_AT91

help
Select this if you are using one of Atmel's AT91X40 SoC.
Expand Down Expand Up @@ -108,11 +110,10 @@ endif
if SOC_SAM_V4_V5
config SOC_AT91RM9200
bool "AT91RM9200"
select ATMEL_AIC_IRQ if !OLD_IRQ_AT91
select CPU_ARM920T
select GENERIC_CLOCKEVENTS
select HAVE_AT91_DBGU0
select MULTI_IRQ_HANDLER
select SPARSE_IRQ
select HAVE_AT91_USB_CLK

config SOC_AT91SAM9260
Expand Down
6 changes: 6 additions & 0 deletions arch/arm/mach-at91/Kconfig.non_dt
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,37 @@ config ARCH_AT91RM9200
bool "AT91RM9200"
select SOC_AT91RM9200
select AT91_USE_OLD_CLK
select OLD_IRQ_AT91

config ARCH_AT91SAM9260
bool "AT91SAM9260 or AT91SAM9XE or AT91SAM9G20"
select SOC_AT91SAM9260
select AT91_USE_OLD_CLK
select OLD_IRQ_AT91

config ARCH_AT91SAM9261
bool "AT91SAM9261 or AT91SAM9G10"
select SOC_AT91SAM9261
select AT91_USE_OLD_CLK
select OLD_IRQ_AT91

config ARCH_AT91SAM9263
bool "AT91SAM9263"
select SOC_AT91SAM9263
select AT91_USE_OLD_CLK
select OLD_IRQ_AT91

config ARCH_AT91SAM9RL
bool "AT91SAM9RL"
select SOC_AT91SAM9RL
select AT91_USE_OLD_CLK
select OLD_IRQ_AT91

config ARCH_AT91SAM9G45
bool "AT91SAM9G45"
select SOC_AT91SAM9G45
select AT91_USE_OLD_CLK
select OLD_IRQ_AT91

endchoice

Expand Down
3 changes: 2 additions & 1 deletion arch/arm/mach-at91/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
# Makefile for the linux kernel.
#

obj-y := irq.o gpio.o setup.o sysirq_mask.o
obj-y := gpio.o setup.o sysirq_mask.o
obj-m :=
obj-n :=
obj- :=

obj-$(CONFIG_OLD_IRQ_AT91) += irq.o
obj-$(CONFIG_OLD_CLK_AT91) += clock.o
obj-$(CONFIG_AT91_SAM9_ALT_RESET) += at91sam9_alt_reset.o
obj-$(CONFIG_AT91_SAM9G45_RESET) += at91sam9g45_reset.o
Expand Down
13 changes: 0 additions & 13 deletions arch/arm/mach-at91/board-dt-rm9200.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,6 @@
#include "at91_aic.h"
#include "generic.h"


static const struct of_device_id irq_of_match[] __initconst = {
{ .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init },
{ /*sentinel*/ }
};

static void __init at91rm9200_dt_init_irq(void)
{
of_irq_init(irq_of_match);
}

static const char *at91rm9200_dt_board_compat[] __initdata = {
"atmel,at91rm9200",
NULL
Expand All @@ -43,8 +32,6 @@ static const char *at91rm9200_dt_board_compat[] __initdata = {
DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200 (Device Tree)")
.init_time = at91rm9200_timer_init,
.map_io = at91_map_io,
.handle_irq = at91_aic_handle_irq,
.init_early = at91rm9200_dt_initialize,
.init_irq = at91rm9200_dt_init_irq,
.dt_compat = at91rm9200_dt_board_compat,
MACHINE_END
13 changes: 0 additions & 13 deletions arch/arm/mach-at91/board-dt-sam9.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,6 @@ static void __init sam9_dt_timer_init(void)
at91sam926x_pit_init();
}

static const struct of_device_id irq_of_match[] __initconst = {

{ .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init },
{ /*sentinel*/ }
};

static void __init at91_dt_init_irq(void)
{
of_irq_init(irq_of_match);
}

static const char *at91_dt_board_compat[] __initdata = {
"atmel,at91sam9",
NULL
Expand All @@ -54,8 +43,6 @@ DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM (Device Tree)")
/* Maintainer: Atmel */
.init_time = sam9_dt_timer_init,
.map_io = at91_map_io,
.handle_irq = at91_aic_handle_irq,
.init_early = at91_dt_initialize,
.init_irq = at91_dt_init_irq,
.dt_compat = at91_dt_board_compat,
MACHINE_END
13 changes: 0 additions & 13 deletions arch/arm/mach-at91/board-dt-sama5.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,6 @@ static void __init sama5_dt_timer_init(void)
at91sam926x_pit_init();
}

static const struct of_device_id irq_of_match[] __initconst = {

{ .compatible = "atmel,sama5d3-aic", .data = at91_aic5_of_init },
{ /*sentinel*/ }
};

static void __init at91_dt_init_irq(void)
{
of_irq_init(irq_of_match);
}

static int ksz9021rn_phy_fixup(struct phy_device *phy)
{
int value;
Expand Down Expand Up @@ -82,9 +71,7 @@ DT_MACHINE_START(sama5_dt, "Atmel SAMA5 (Device Tree)")
/* Maintainer: Atmel */
.init_time = sama5_dt_timer_init,
.map_io = at91_map_io,
.handle_irq = at91_aic5_handle_irq,
.init_early = at91_dt_initialize,
.init_irq = at91_dt_init_irq,
.init_machine = sama5_dt_device_init,
.dt_compat = sama5_dt_board_compat,
MACHINE_END
Loading

0 comments on commit 32dc5ca

Please sign in to comment.