From 7d7ef547d3fa47ac0df667a6e399eb1ebc60ec2d Mon Sep 17 00:00:00 2001 From: Olof Johansson Date: Sat, 8 Nov 2014 22:39:51 -0800 Subject: [PATCH 1/5] ARM: at91: fix build breakage due to legacy board removals Fixes the following missing includes: arch/arm/mach-at91/at91sam9g45.c: In function 'at91sam9g45_init_time': arch/arm/mach-at91/at91sam9g45.c:39:23: error: 'NR_IRQS_LEGACY' undeclared (first use in this function) at91sam926x_pit_init(NR_IRQS_LEGACY + AT91_ID_SYS); ^ arch/arm/mach-at91/at91sam9g45.c:39:23: note: each undeclared identifier is reported only once for each function it appears in make[3]: *** [arch/arm/mach-at91/at91sam9g45.o] Error 1 arch/arm/mach-at91/at91sam9rl.c: In function 'at91sam9rl_init_time': arch/arm/mach-at91/at91sam9rl.c:51:23: error: 'NR_IRQS_LEGACY' undeclared (first use in this function) at91sam926x_pit_init(NR_IRQS_LEGACY + AT91_ID_SYS); Cc: Nicolas Ferre Signed-off-by: Olof Johansson --- arch/arm/mach-at91/at91sam9g45.c | 1 + arch/arm/mach-at91/at91sam9rl.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c index dd03f652cca4..042f7c623c8f 100644 --- a/arch/arm/mach-at91/at91sam9g45.c +++ b/arch/arm/mach-at91/at91sam9g45.c @@ -11,6 +11,7 @@ */ #include +#include #include #include diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c index 6ca7fc5ca812..97efb2ef9fb4 100644 --- a/arch/arm/mach-at91/at91sam9rl.c +++ b/arch/arm/mach-at91/at91sam9rl.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include From b75d47b4772c199225a351f3b8543e6e16b9c08b Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Mon, 10 Nov 2014 10:32:12 +0100 Subject: [PATCH 2/5] ARM: at91: remove useless init_time for DT-only SoCs init_time is only needed when booting non-DT boards, we can thus safely remove init_time functions. Signed-off-by: Boris Brezillon Signed-off-by: Nicolas Ferre --- arch/arm/mach-at91/at91sam9g45.c | 7 ------- arch/arm/mach-at91/at91sam9rl.c | 7 ------- 2 files changed, 14 deletions(-) diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c index 042f7c623c8f..2ad0db4caa9b 100644 --- a/arch/arm/mach-at91/at91sam9g45.c +++ b/arch/arm/mach-at91/at91sam9g45.c @@ -11,7 +11,6 @@ */ #include -#include #include #include @@ -35,13 +34,7 @@ static void __init at91sam9g45_initialize(void) at91_sysirq_mask_rtt(AT91SAM9G45_BASE_RTT); } -static void __init at91sam9g45_init_time(void) -{ - at91sam926x_pit_init(NR_IRQS_LEGACY + AT91_ID_SYS); -} - AT91_SOC_START(at91sam9g45) .map_io = at91sam9g45_map_io, .init = at91sam9g45_initialize, - .init_time = at91sam9g45_init_time, AT91_SOC_END diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c index 97efb2ef9fb4..bd7e56889b43 100644 --- a/arch/arm/mach-at91/at91sam9rl.c +++ b/arch/arm/mach-at91/at91sam9rl.c @@ -10,7 +10,6 @@ */ #include -#include #include #include #include @@ -47,13 +46,7 @@ static void __init at91sam9rl_initialize(void) at91_sysirq_mask_rtt(AT91SAM9RL_BASE_RTT); } -static void __init at91sam9rl_init_time(void) -{ - at91sam926x_pit_init(NR_IRQS_LEGACY + AT91_ID_SYS); -} - AT91_SOC_START(at91sam9rl) .map_io = at91sam9rl_map_io, .init = at91sam9rl_initialize, - .init_time = at91sam9rl_init_time, AT91_SOC_END From 4386e1fbcdacfbbc97a856f9e73b178bd5f6a3e1 Mon Sep 17 00:00:00 2001 From: Nicolas Ferre Date: Mon, 10 Nov 2014 12:14:28 +0100 Subject: [PATCH 3/5] ARM: at91: remove unused CONFIG_ARCH_AT91SAM9G45 option The CONFIG_ARCH_AT91SAM9G45 config option was removed by ("ARM: at91: remove at91sam9g45/9m10 legacy board support") so cleanup the use of it. Reported-by: Paul Bolle Signed-off-by: Nicolas Ferre Acked-by: Boris Brezillon --- arch/arm/mach-at91/Makefile.boot | 6 ------ arch/arm/mach-at91/board.h | 4 ---- 2 files changed, 10 deletions(-) diff --git a/arch/arm/mach-at91/Makefile.boot b/arch/arm/mach-at91/Makefile.boot index 5309f9b6aabc..29ed0fa374ca 100644 --- a/arch/arm/mach-at91/Makefile.boot +++ b/arch/arm/mach-at91/Makefile.boot @@ -3,12 +3,6 @@ # PARAMS_PHYS must be within 4MB of ZRELADDR # INITRD_PHYS must be in RAM -ifeq ($(CONFIG_ARCH_AT91SAM9G45),y) - zreladdr-y += 0x70008000 -params_phys-y := 0x70000100 -initrd_phys-y := 0x70410000 -else zreladdr-y += 0x20008000 params_phys-y := 0x20000100 initrd_phys-y := 0x20410000 -endif diff --git a/arch/arm/mach-at91/board.h b/arch/arm/mach-at91/board.h index 836e9a537e0c..d268ec3781dd 100644 --- a/arch/arm/mach-at91/board.h +++ b/arch/arm/mach-at91/board.h @@ -56,11 +56,7 @@ extern void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data); extern void __init at91_add_device_nand(struct atmel_nand_data *data); /* I2C*/ -#if defined(CONFIG_ARCH_AT91SAM9G45) -extern void __init at91_add_device_i2c(short i2c_id, struct i2c_board_info *devices, int nr_devices); -#else extern void __init at91_add_device_i2c(struct i2c_board_info *devices, int nr_devices); -#endif /* SPI */ extern void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices); From 93d2cf468adfcbb58895cc1d4052099e23392c82 Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Mon, 10 Nov 2014 21:45:53 +0100 Subject: [PATCH 4/5] ARM: at91: remove CONFIG_MACH_SAMA5_DT CONFIG_MACH_SAMA5_DT is useless as the only way to boot on sama5 based boards is to use device tree. Signed-off-by: Alexandre Belloni Acked-by: Boris Brezillon [nicolas.ferre@atmel.com: adapt on top of cleanup branch] Signed-off-by: Nicolas Ferre --- arch/arm/configs/sama5_defconfig | 1 - arch/arm/mach-at91/Kconfig | 10 +--------- arch/arm/mach-at91/Makefile | 2 +- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_defconfig index c9089c927daf..299ca18bbd75 100644 --- a/arch/arm/configs/sama5_defconfig +++ b/arch/arm/configs/sama5_defconfig @@ -20,7 +20,6 @@ CONFIG_ARCH_AT91=y CONFIG_SOC_SAM_V7=y CONFIG_SOC_SAMA5D3=y CONFIG_SOC_SAMA5D4=y -CONFIG_MACH_SAMA5_DT=y CONFIG_AEABI=y CONFIG_UACCESS_WITH_MEMCPY=y CONFIG_ZBOOT_ROM_TEXT=0x0 diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index a82ee4e7e980..162a88930a8b 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -54,6 +54,7 @@ config SOC_SAMA5 select USE_OF select MEMORY select ATMEL_SDRAMC + select PHYLIB if NETDEVICES menu "Atmel AT91 System-on-Chip" @@ -207,15 +208,6 @@ config MACH_AT91SAM9_DT Select this if you want to experiment device-tree with an Atmel Evaluation Kit. -config MACH_SAMA5_DT - bool "Atmel SAMA5 Evaluation Kits with device-tree support" - depends on SOC_SAMA5 - select USE_OF - select PHYLIB if NETDEVICES - help - Select this if you want to experiment device-tree with - an Atmel Evaluation Kit. - # ---------------------------------------------------------- comment "AT91 Feature Selections" diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index df48363d7384..ae8aa1a898e8 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile @@ -71,7 +71,7 @@ obj-$(CONFIG_MACH_AT91RM9200_DT) += board-dt-rm9200.o obj-$(CONFIG_MACH_AT91SAM9_DT) += board-dt-sam9.o # SAMA5 board with device-tree -obj-$(CONFIG_MACH_SAMA5_DT) += board-dt-sama5.o +obj-$(CONFIG_SOC_SAMA5) += board-dt-sama5.o # Drivers obj-y += leds.o From f0a0a58e6f46c2dded813ee860b9cbd795b4e571 Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Fri, 7 Nov 2014 21:58:21 +0100 Subject: [PATCH 5/5] ARM: at91: move sdramc/ddrsdr header to include/soc/at91 Move the (DDR) SDRAM controller headers to include/soc/at91 to remove the dependency on mach/ headers from the at91-reset driver. Signed-off-by: Alexandre Belloni Signed-off-by: Nicolas Ferre --- MAINTAINERS | 1 + arch/arm/mach-at91/include/mach/at91_ramc.h | 6 +++--- arch/arm/mach-at91/pm.h | 1 - drivers/power/reset/at91-reset.c | 4 ++-- .../include/mach => include/soc/at91}/at91rm9200_sdramc.h | 0 .../include/mach => include/soc/at91}/at91sam9_ddrsdr.h | 0 .../include/mach => include/soc/at91}/at91sam9_sdramc.h | 0 7 files changed, 6 insertions(+), 6 deletions(-) rename {arch/arm/mach-at91/include/mach => include/soc/at91}/at91rm9200_sdramc.h (100%) rename {arch/arm/mach-at91/include/mach => include/soc/at91}/at91sam9_ddrsdr.h (100%) rename {arch/arm/mach-at91/include/mach => include/soc/at91}/at91sam9_sdramc.h (100%) diff --git a/MAINTAINERS b/MAINTAINERS index dab92a78d1d5..9b604e7cc869 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -861,6 +861,7 @@ W: http://maxim.org.za/at91_26.html W: http://www.linux4sam.org S: Supported F: arch/arm/mach-at91/ +F: include/soc/at91/ F: arch/arm/boot/dts/at91*.dts F: arch/arm/boot/dts/at91*.dtsi F: arch/arm/boot/dts/sama*.dts diff --git a/arch/arm/mach-at91/include/mach/at91_ramc.h b/arch/arm/mach-at91/include/mach/at91_ramc.h index d8aeb278614e..e4492b151fee 100644 --- a/arch/arm/mach-at91/include/mach/at91_ramc.h +++ b/arch/arm/mach-at91/include/mach/at91_ramc.h @@ -25,8 +25,8 @@ extern void __iomem *at91_ramc_base[]; #define AT91_MEMCTRL_SDRAMC 1 #define AT91_MEMCTRL_DDRSDR 2 -#include -#include -#include +#include +#include +#include #endif /* __AT91_RAMC_H__ */ diff --git a/arch/arm/mach-at91/pm.h b/arch/arm/mach-at91/pm.h index c5101dcb4fb0..d2c89963af2d 100644 --- a/arch/arm/mach-at91/pm.h +++ b/arch/arm/mach-at91/pm.h @@ -14,7 +14,6 @@ #include #include -#include #ifdef CONFIG_PM extern void at91_pm_set_standby(void (*at91_standby)(void)); diff --git a/drivers/power/reset/at91-reset.c b/drivers/power/reset/at91-reset.c index 3cb36693343a..69a75d99ae92 100644 --- a/drivers/power/reset/at91-reset.c +++ b/drivers/power/reset/at91-reset.c @@ -19,8 +19,8 @@ #include -#include -#include +#include +#include #define AT91_RSTC_CR 0x00 /* Reset Controller Control Register */ #define AT91_RSTC_PROCRST BIT(0) /* Processor Reset */ diff --git a/arch/arm/mach-at91/include/mach/at91rm9200_sdramc.h b/include/soc/at91/at91rm9200_sdramc.h similarity index 100% rename from arch/arm/mach-at91/include/mach/at91rm9200_sdramc.h rename to include/soc/at91/at91rm9200_sdramc.h diff --git a/arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h b/include/soc/at91/at91sam9_ddrsdr.h similarity index 100% rename from arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h rename to include/soc/at91/at91sam9_ddrsdr.h diff --git a/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h b/include/soc/at91/at91sam9_sdramc.h similarity index 100% rename from arch/arm/mach-at91/include/mach/at91sam9_sdramc.h rename to include/soc/at91/at91sam9_sdramc.h