diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 74a873ad493f0a61de23df093e1593b0ed71e46c..453ae2feaeeec69b1dd87a9fd50def7c471c3327 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -117,17 +117,20 @@ choice config AT91_DEBUG_LL_DBGU0 bool "Kernel low-level debugging on rm9200, 9260/9g20, 9261/9g10, 9rl, 9x5, 9n12" select DEBUG_AT91_UART - depends on HAVE_AT91_DBGU0 + depends on ARCH_AT91 + depends on SOC_AT91RM9200 || SOC_AT91SAM9 config AT91_DEBUG_LL_DBGU1 bool "Kernel low-level debugging on 9263, 9g45 and sama5d3" select DEBUG_AT91_UART - depends on HAVE_AT91_DBGU1 + depends on ARCH_AT91 + depends on SOC_AT91SAM9 || SOC_SAMA5 config AT91_DEBUG_LL_DBGU2 bool "Kernel low-level debugging on sama5d4" select DEBUG_AT91_UART - depends on HAVE_AT91_DBGU2 + depends on ARCH_AT91 + depends on SOC_SAMA5 config DEBUG_BCM2835 bool "Kernel low-level debugging on BCM2835 PL011 UART" @@ -1148,6 +1151,10 @@ choice endchoice +config DEBUG_AT91_UART + bool + depends on ARCH_AT91 + config DEBUG_EXYNOS_UART bool @@ -1208,8 +1215,7 @@ config DEBUG_LL_INCLUDE string default "debug/sa1100.S" if DEBUG_SA1100 default "debug/8250.S" if DEBUG_LL_UART_8250 || DEBUG_UART_8250 - default "debug/at91.S" if AT91_DEBUG_LL_DBGU0 || AT91_DEBUG_LL_DBGU1 || \ - AT91_DEBUG_LL_DBGU2 + default "debug/at91.S" if DEBUG_AT91_UART 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 diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index b7dcef50db23a04a0e7b7a21f34baf65b15ad1f4..c6956b863b9dfe5f1b8d9018e743a4d91559d048 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -6,15 +6,6 @@ config HAVE_AT91_UTMI config HAVE_AT91_USB_CLK bool -config HAVE_AT91_DBGU0 - bool - -config HAVE_AT91_DBGU1 - bool - -config HAVE_AT91_DBGU2 - bool - config COMMON_CLK_AT91 bool select COMMON_CLK @@ -70,7 +61,6 @@ config SOC_SAMA5D3 bool "SAMA5D3 family" select SOC_SAMA5 select HAVE_FB_ATMEL - select HAVE_AT91_DBGU1 select HAVE_AT91_UTMI select HAVE_AT91_SMD select HAVE_AT91_USB_CLK @@ -81,7 +71,6 @@ config SOC_SAMA5D3 config SOC_SAMA5D4 bool "SAMA5D4 family" select SOC_SAMA5 - select HAVE_AT91_DBGU2 select CLKSRC_MMIO select CACHE_L2X0 select CACHE_PL310 @@ -101,12 +90,10 @@ config SOC_AT91RM9200 select COMMON_CLK_AT91 select CPU_ARM920T select GENERIC_CLOCKEVENTS - select HAVE_AT91_DBGU0 select HAVE_AT91_USB_CLK config SOC_AT91SAM9260 bool "AT91SAM9260, AT91SAM9XE or AT91SAM9G20" - select HAVE_AT91_DBGU0 select SOC_AT91SAM9 select HAVE_AT91_USB_CLK help @@ -115,7 +102,6 @@ config SOC_AT91SAM9260 config SOC_AT91SAM9261 bool "AT91SAM9261 or AT91SAM9G10" - select HAVE_AT91_DBGU0 select HAVE_FB_ATMEL select SOC_AT91SAM9 select HAVE_AT91_USB_CLK @@ -124,21 +110,18 @@ config SOC_AT91SAM9261 config SOC_AT91SAM9263 bool "AT91SAM9263" - select HAVE_AT91_DBGU1 select HAVE_FB_ATMEL select SOC_AT91SAM9 select HAVE_AT91_USB_CLK config SOC_AT91SAM9RL bool "AT91SAM9RL" - select HAVE_AT91_DBGU0 select HAVE_FB_ATMEL select SOC_AT91SAM9 select HAVE_AT91_UTMI config SOC_AT91SAM9G45 bool "AT91SAM9G45 or AT91SAM9M10 families" - select HAVE_AT91_DBGU1 select HAVE_FB_ATMEL select SOC_AT91SAM9 select HAVE_AT91_UTMI @@ -149,7 +132,6 @@ config SOC_AT91SAM9G45 config SOC_AT91SAM9X5 bool "AT91SAM9x5 family" - select HAVE_AT91_DBGU0 select HAVE_FB_ATMEL select SOC_AT91SAM9 select HAVE_AT91_UTMI @@ -164,7 +146,6 @@ config SOC_AT91SAM9X5 config SOC_AT91SAM9N12 bool "AT91SAM9N12 family" - select HAVE_AT91_DBGU0 select HAVE_FB_ATMEL select SOC_AT91SAM9 select HAVE_AT91_USB_CLK diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c index ab9841c8b0d5d544b9caae7009edd6cc4fb25d56..37b7ce4c6a3b182ea3c8f5d673cb320983edbd1b 100644 --- a/arch/arm/mach-at91/at91sam9260.c +++ b/arch/arm/mach-at91/at91sam9260.c @@ -22,11 +22,5 @@ * AT91SAM9260 processor initialization * -------------------------------------------------------------------- */ -static void __init at91sam9260_initialize(void) -{ - arm_pm_idle = at91sam9_idle; -} - AT91_SOC_START(at91sam9260) - .init = at91sam9260_initialize, AT91_SOC_END diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c index 2029096b93fa925b1c8508e3c44eb5762a88c82d..aebbf76b6038110b5c93fa1cd1b1761abe293c24 100644 --- a/arch/arm/mach-at91/at91sam9261.c +++ b/arch/arm/mach-at91/at91sam9261.c @@ -21,11 +21,5 @@ * AT91SAM9261 processor initialization * -------------------------------------------------------------------- */ -static void __init at91sam9261_initialize(void) -{ - arm_pm_idle = at91sam9_idle; -} - AT91_SOC_START(at91sam9261) - .init = at91sam9261_initialize, AT91_SOC_END diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c index 1fe672a055139ac757d605177178cd4551a52145..dca29457d9cc9f61533f79f76817735804b447c6 100644 --- a/arch/arm/mach-at91/at91sam9263.c +++ b/arch/arm/mach-at91/at91sam9263.c @@ -20,11 +20,5 @@ * AT91SAM9263 processor initialization * -------------------------------------------------------------------- */ -static void __init at91sam9263_initialize(void) -{ - arm_pm_idle = at91sam9_idle; -} - AT91_SOC_START(at91sam9263) - .init = at91sam9263_initialize, AT91_SOC_END diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c index d0493df40a13b64654410a03587ef32d1215e85a..4957a9ef748a11bf956ece36347d6d3426d72547 100644 --- a/arch/arm/mach-at91/at91sam9g45.c +++ b/arch/arm/mach-at91/at91sam9g45.c @@ -19,11 +19,6 @@ /* -------------------------------------------------------------------- * AT91SAM9G45 processor initialization * -------------------------------------------------------------------- */ -static void __init at91sam9g45_initialize(void) -{ - arm_pm_idle = at91sam9_idle; -} AT91_SOC_START(at91sam9g45) - .init = at91sam9g45_initialize, AT91_SOC_END diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c index 33acae30bb0bdbafeba960299c31769cbdf55737..6cb40e4ec20f3565295d0652870ca188fe8fb0e4 100644 --- a/arch/arm/mach-at91/at91sam9rl.c +++ b/arch/arm/mach-at91/at91sam9rl.c @@ -21,11 +21,5 @@ * AT91SAM9RL processor initialization * -------------------------------------------------------------------- */ -static void __init at91sam9rl_initialize(void) -{ - arm_pm_idle = at91sam9_idle; -} - AT91_SOC_START(at91sam9rl) - .init = at91sam9rl_initialize, AT91_SOC_END diff --git a/arch/arm/mach-at91/board-dt-rm9200.c b/arch/arm/mach-at91/board-dt-rm9200.c index 5f82a65153e197c80a1072da2dc92b6d8de9ae47..d47c4433444dc428dfb899c21d9b1ffe45c992af 100644 --- a/arch/arm/mach-at91/board-dt-rm9200.c +++ b/arch/arm/mach-at91/board-dt-rm9200.c @@ -33,14 +33,14 @@ static void __init at91rm9200_dt_timer_init(void) static void __init rm9200_dt_device_init(void) { - at91_rm9200_pm_init(); - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + + at91_rm9200_pm_init(); } -static const char *at91rm9200_dt_board_compat[] __initdata = { +static const char *at91rm9200_dt_board_compat[] __initconst = { "atmel,at91rm9200", NULL }; diff --git a/arch/arm/mach-at91/board-dt-sam9.c b/arch/arm/mach-at91/board-dt-sam9.c index 0fe1ced608c58257a29301dac9152cca88c83c3a..f5d922e57655dd542ab215be3b2c179e09f4da7c 100644 --- a/arch/arm/mach-at91/board-dt-sam9.c +++ b/arch/arm/mach-at91/board-dt-sam9.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -26,11 +27,13 @@ static void __init sam9_dt_device_init(void) { - at91_sam9260_pm_init(); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + + arm_pm_idle = at91sam9_idle; + at91_sam9260_pm_init(); } -static const char *at91_dt_board_compat[] __initdata = { +static const char *at91_dt_board_compat[] __initconst = { "atmel,at91sam9", NULL }; @@ -45,8 +48,10 @@ MACHINE_END static void __init sam9g45_dt_device_init(void) { - at91_sam9g45_pm_init(); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + + arm_pm_idle = at91sam9_idle; + at91_sam9g45_pm_init(); } static const char *at91_9g45_board_compat[] __initconst = { @@ -61,3 +66,25 @@ DT_MACHINE_START(at91sam9g45_dt, "Atmel AT91SAM9G45") .init_machine = sam9g45_dt_device_init, .dt_compat = at91_9g45_board_compat, MACHINE_END + +static void __init sam9x5_dt_device_init(void) +{ + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + + arm_pm_idle = at91sam9_idle; + at91_sam9x5_pm_init(); +} + +static const char *at91_9x5_board_compat[] __initconst = { + "atmel,at91sam9x5", + "atmel,at91sam9n12", + NULL +}; + +DT_MACHINE_START(at91sam9x5_dt, "Atmel AT91SAM9") + /* Maintainer: Atmel */ + .map_io = at91_map_io, + .init_early = at91_dt_initialize, + .init_machine = sam9x5_dt_device_init, + .dt_compat = at91_9x5_board_compat, +MACHINE_END diff --git a/arch/arm/mach-at91/board-dt-sama5.c b/arch/arm/mach-at91/board-dt-sama5.c index 44d372a22a29d29ba0dbb0cafda7270545c4feca..86cffcdef14502d312fc3cd43beea9947a50ba0a 100644 --- a/arch/arm/mach-at91/board-dt-sama5.c +++ b/arch/arm/mach-at91/board-dt-sama5.c @@ -28,8 +28,8 @@ static void __init sama5_dt_device_init(void) { - at91_sam9260_pm_init(); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + at91_sam9x5_pm_init(); } static const char *sama5_dt_board_compat[] __initconst = { diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index 44fc725edcf1668e3c5a03cade7507363da3212a..a8ee83ef6cd416ddd068ee3bd19630f55395a517 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h @@ -36,10 +36,12 @@ extern void at91_ioremap_matrix(u32 base_addr); extern void __init at91_rm9200_pm_init(void); extern void __init at91_sam9260_pm_init(void); extern void __init at91_sam9g45_pm_init(void); +extern void __init at91_sam9x5_pm_init(void); #else void __init at91_rm9200_pm_init(void) { } void __init at91_sam9260_pm_init(void) { } void __init at91_sam9g45_pm_init(void) { } +void __init at91_sam9x5_pm_init(void) { } #endif #endif /* _AT91_GENERIC_H */ diff --git a/arch/arm/mach-at91/include/mach/system_rev.h b/arch/arm/mach-at91/include/mach/system_rev.h deleted file mode 100644 index ef79a9aafc08495c11cab9a5bd31c67ec8de24a2..0000000000000000000000000000000000000000 --- a/arch/arm/mach-at91/include/mach/system_rev.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD - * - * Under GPLv2 only - */ - -#ifndef __ARCH_SYSTEM_REV_H__ -#define __ARCH_SYSTEM_REV_H__ - -#include - -/* - * board revision encoding - * mach specific - * the 16-31 bit are reserved for at91 generic information - * - * bit 31: - * 0 => nand 8 bit - * 1 => nand 16 bit - */ -#define BOARD_HAVE_NAND_16BIT (1 << 31) -static inline int board_have_nand_16bit(void) -{ - return (system_rev & BOARD_HAVE_NAND_16BIT) ? 1 : 0; -} - -#endif /* __ARCH_SYSTEM_REV_H__ */ diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index 81f2f12d3cc1546d669d66c2451fca01ae4123b2..87c1fd8aa1b6e13a7102a19f9f07cf4b48a10410 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c @@ -306,3 +306,10 @@ void __init at91_sam9g45_pm_init(void) at91_pm_data.memctrl = AT91_MEMCTRL_DDRSDR; return at91_pm_init(); } + +void __init at91_sam9x5_pm_init(void) +{ + at91_pm_data.uhp_udp_mask = AT91SAM926x_PMC_UHP | AT91SAM926x_PMC_UDP; + at91_pm_data.memctrl = AT91_MEMCTRL_DDRSDR; + return at91_pm_init(); +} diff --git a/arch/arm/mach-at91/pm_slowclock.S b/arch/arm/mach-at91/pm_slowclock.S index 20018779bae7a50db61b75ca8a1e9ebf1858d02d..556151e85ec4c71712373098ce731c68674a757b 100644 --- a/arch/arm/mach-at91/pm_slowclock.S +++ b/arch/arm/mach-at91/pm_slowclock.S @@ -17,15 +17,6 @@ #include #include - -#ifdef CONFIG_SOC_AT91SAM9263 -/* - * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use; - * handle those cases both here and in the Suspend-To-RAM support. - */ -#warning Assuming EB1 SDRAM controller is *NOT* used -#endif - /* * When SLOWDOWN_MASTER_CLOCK is defined we will also slow down the Master * clock during suspend by adjusting its prescalar and divisor.