ARM: at91: remove !DT support for at91rm9200
Subsystems (8)
cover ARM: at91: remove !DT support for at91rm9200
This is the last series of patches that removes the non-Device-Tree board support for older Atmel SoCs.
Again, for the record, it was announced here
https://lkml.org/lkml/2014/9/10/293 ([ANNOUNCE] ARM: at91: removal of board files) two months ago.
Several files beyond at91rm9200 are touched this time as I tried to remove the biggest parts that were related to !DT SoC initializations. More cleanup is certainly needed to remove dead code.
The diffstat is also pretty big as a lot of at91rm9200 boards were remaining.
Bye,
Nicolas Ferre (11):
ARM: at91: remove at91rm9200 legacy boards files
ARM: at91: remove at91rm9200 legacy board support
ARM: at91: switch configuration option to SOC_AT91RM9200
ARM: at91/Kconfig: remove ARCH_AT91RM9200 option for drivers
ARM: at91: always USE_OF from now on
ARM: at91/trivial: update Kconfig comment to mention SAMA5
ARM: at91: remove all !DT related configuration options
ARM: at91: remove clock data in at91sam9n12.c and at91sam9x5.c files
ARM: at91: remove old at91-specific clock driver
ARM: at91: remove legacy IRQ driver and related code
ARM: at91: remove unused IRQ function declarations
arch/arm/Kconfig | 5 +- arch/arm/configs/at91rm9200_defconfig | 161 ---- arch/arm/mach-at91/Kconfig | 34 +- arch/arm/mach-at91/Kconfig.non_dt | 114 --- arch/arm/mach-at91/Makefile | 19 - arch/arm/mach-at91/at91_aic.h | 99 --- arch/arm/mach-at91/at91rm9200.c | 341 --------- arch/arm/mach-at91/at91rm9200_devices.c | 1212 ------------------------------- arch/arm/mach-at91/at91sam9n12.c | 213 +----- arch/arm/mach-at91/at91sam9x5.c | 311 +------- arch/arm/mach-at91/board-1arm.c | 99 --- arch/arm/mach-at91/board-carmeva.c | 167 ----- arch/arm/mach-at91/board-cpuat91.c | 189 ----- arch/arm/mach-at91/board-csb337.c | 260 ------- arch/arm/mach-at91/board-csb637.c | 142 ---- arch/arm/mach-at91/board-dt-rm9200.c | 1 - arch/arm/mach-at91/board-dt-sam9.c | 1 - arch/arm/mach-at91/board-dt-sama5.c | 1 - arch/arm/mach-at91/board-eb9200.c | 126 ---- arch/arm/mach-at91/board-ecbat91.c | 191 ----- arch/arm/mach-at91/board-eco920.c | 160 ---- arch/arm/mach-at91/board-kafa.c | 113 --- arch/arm/mach-at91/board-kb9202.c | 159 ---- arch/arm/mach-at91/board-picotux200.c | 129 ---- arch/arm/mach-at91/board-rm9200ek.c | 196 ----- arch/arm/mach-at91/board-yl-9200.c | 597 --------------- arch/arm/mach-at91/clock.c | 977 ------------------------- arch/arm/mach-at91/clock.h | 49 -- arch/arm/mach-at91/generic.h | 17 - arch/arm/mach-at91/irq.c | 296 -------- arch/arm/mach-at91/pm.c | 22 - arch/arm/mach-at91/setup.c | 13 - drivers/net/ethernet/cadence/Kconfig | 2 +- drivers/rtc/Kconfig | 2 +- drivers/watchdog/Kconfig | 4 +- 35 files changed, 19 insertions(+), 6403 deletions(-) delete mode 100644 arch/arm/configs/at91rm9200_defconfig delete mode 100644 arch/arm/mach-at91/Kconfig.non_dt delete mode 100644 arch/arm/mach-at91/at91_aic.h delete mode 100644 arch/arm/mach-at91/at91rm9200_devices.c delete mode 100644 arch/arm/mach-at91/board-1arm.c delete mode 100644 arch/arm/mach-at91/board-carmeva.c delete mode 100644 arch/arm/mach-at91/board-cpuat91.c delete mode 100644 arch/arm/mach-at91/board-csb337.c delete mode 100644 arch/arm/mach-at91/board-csb637.c delete mode 100644 arch/arm/mach-at91/board-eb9200.c delete mode 100644 arch/arm/mach-at91/board-ecbat91.c delete mode 100644 arch/arm/mach-at91/board-eco920.c delete mode 100644 arch/arm/mach-at91/board-kafa.c delete mode 100644 arch/arm/mach-at91/board-kb9202.c delete mode 100644 arch/arm/mach-at91/board-picotux200.c delete mode 100644 arch/arm/mach-at91/board-rm9200ek.c delete mode 100644 arch/arm/mach-at91/board-yl-9200.c delete mode 100644 arch/arm/mach-at91/clock.c delete mode 100644 arch/arm/mach-at91/clock.h delete mode 100644 arch/arm/mach-at91/irq.c
Signature · 1 line
2.1.3
PATCH 1/11 ARM: at91: remove at91rm9200 legacy boards files
Remove old board files that use at91rm9200 Atmel SoC. The device tree is mature on this SoCs. It must be used now.
--- arch/arm/mach-at91/Makefile | 15 - arch/arm/mach-at91/board-1arm.c | 99 ------ arch/arm/mach-at91/board-carmeva.c | 167 ---------- arch/arm/mach-at91/board-cpuat91.c | 189 ----------- arch/arm/mach-at91/board-csb337.c | 260 --------------- arch/arm/mach-at91/board-csb637.c | 142 -------- arch/arm/mach-at91/board-eb9200.c | 126 ------- arch/arm/mach-at91/board-ecbat91.c | 191 ----------- arch/arm/mach-at91/board-eco920.c | 160 --------- arch/arm/mach-at91/board-kafa.c | 113 ------- arch/arm/mach-at91/board-kb9202.c | 159 --------- arch/arm/mach-at91/board-picotux200.c | 129 -------- arch/arm/mach-at91/board-rm9200ek.c | 196 ----------- arch/arm/mach-at91/board-yl-9200.c | 597 ---------------------------------- 14 files changed, 2543 deletions(-) delete mode 100644 arch/arm/mach-at91/board-1arm.c delete mode 100644 arch/arm/mach-at91/board-carmeva.c delete mode 100644 arch/arm/mach-at91/board-cpuat91.c delete mode 100644 arch/arm/mach-at91/board-csb337.c delete mode 100644 arch/arm/mach-at91/board-csb637.c delete mode 100644 arch/arm/mach-at91/board-eb9200.c delete mode 100644 arch/arm/mach-at91/board-ecbat91.c delete mode 100644 arch/arm/mach-at91/board-eco920.c delete mode 100644 arch/arm/mach-at91/board-kafa.c delete mode 100644 arch/arm/mach-at91/board-kb9202.c delete mode 100644 arch/arm/mach-at91/board-picotux200.c delete mode 100644 arch/arm/mach-at91/board-rm9200ek.c delete mode 100644 arch/arm/mach-at91/board-yl-9200.c
arch/arm/mach-at91/Makefile +0 -15
@@ -22,21 +22,6 @@ obj-$(CONFIG_SOC_SAMA5D4) += sama5d4.o obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200_devices.o -# AT91RM9200 board-specific support -obj-$(CONFIG_MACH_ONEARM) += board-1arm.o -obj-$(CONFIG_MACH_AT91RM9200EK) += board-rm9200ek.o -obj-$(CONFIG_MACH_CSB337) += board-csb337.o -obj-$(CONFIG_MACH_CSB637) += board-csb637.o -obj-$(CONFIG_MACH_CARMEVA) += board-carmeva.o -obj-$(CONFIG_MACH_KB9200) += board-kb9202.o -obj-$(CONFIG_MACH_ATEB9200) += board-eb9200.o -obj-$(CONFIG_MACH_KAFA) += board-kafa.o -obj-$(CONFIG_MACH_PICOTUX2XX) += board-picotux200.o -obj-$(CONFIG_MACH_ECBAT91) += board-ecbat91.o -obj-$(CONFIG_MACH_YL9200) += board-yl-9200.o -obj-$(CONFIG_MACH_CPUAT91) += board-cpuat91.o -obj-$(CONFIG_MACH_ECO920) += board-eco920.o - # AT91SAM board with device-tree obj-$(CONFIG_MACH_AT91RM9200_DT) += board-dt-rm9200.o obj-$(CONFIG_MACH_AT91SAM9_DT) += board-dt-sam9.o
arch/arm/mach-at91/board-1arm.c deleted +0 -99
99 lines not on this page · raw message
arch/arm/mach-at91/board-carmeva.c deleted +0 -167
167 lines not on this page · raw message
arch/arm/mach-at91/board-cpuat91.c deleted +0 -189
189 lines not on this page · raw message
arch/arm/mach-at91/board-csb337.c deleted +0 -260
260 lines not on this page · raw message
arch/arm/mach-at91/board-csb637.c deleted +0 -142
142 lines not on this page · raw message
arch/arm/mach-at91/board-eb9200.c deleted +0 -126
126 lines not on this page · raw message
arch/arm/mach-at91/board-ecbat91.c deleted +0 -191
191 lines not on this page · raw message
arch/arm/mach-at91/board-eco920.c deleted +0 -160
160 lines not on this page · raw message
arch/arm/mach-at91/board-kafa.c deleted +0 -113
113 lines not on this page · raw message
arch/arm/mach-at91/board-kb9202.c deleted +0 -159
159 lines not on this page · raw message
arch/arm/mach-at91/board-picotux200.c deleted +0 -129
129 lines not on this page · raw message
arch/arm/mach-at91/board-rm9200ek.c deleted +0 -196
196 lines not on this page · raw message
arch/arm/mach-at91/board-yl-9200.c deleted +0 -597
597 lines not on this page · raw message
Signature · 1 line
2.1.3
PATCH 2/11 ARM: at91: remove at91rm9200 legacy board support
In reply to Nicolas FerreSecond part of at91rm9200 legacy !DT removal. This is the core !DT support removal for this Atmel SoC.
Note that from now on, the Kconfig.non_dt file and its specialized options are completely removed.
Use the Device Tree for running this board with newer kernels.
--- arch/arm/configs/at91rm9200_defconfig | 161 ---- arch/arm/mach-at91/Kconfig | 5 - arch/arm/mach-at91/Kconfig.non_dt | 114 --- arch/arm/mach-at91/Makefile | 2 - arch/arm/mach-at91/at91rm9200.c | 341 --------- arch/arm/mach-at91/at91rm9200_devices.c | 1212 ------------------------------- 6 files changed, 1835 deletions(-) delete mode 100644 arch/arm/configs/at91rm9200_defconfig delete mode 100644 arch/arm/mach-at91/Kconfig.non_dt delete mode 100644 arch/arm/mach-at91/at91rm9200_devices.c
arch/arm/configs/at91rm9200_defconfig deleted +0 -161
@@ -1,161 +0,0 @@ -# CONFIG_LOCALVERSION_AUTO is not set -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_USER_NS=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_MODULES=y -CONFIG_MODULE_FORCE_LOAD=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_MODULE_SRCVERSION_ALL=y -# CONFIG_BLK_DEV_BSG is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_ARCH_AT91=y -CONFIG_ARCH_AT91RM9200=y -CONFIG_MACH_ONEARM=y -CONFIG_MACH_AT91RM9200EK=y -CONFIG_MACH_CSB337=y -CONFIG_MACH_CSB637=y -CONFIG_MACH_CARMEVA=y -CONFIG_MACH_ATEB9200=y -CONFIG_MACH_KB9200=y -CONFIG_MACH_PICOTUX2XX=y -CONFIG_MACH_KAFA=y -CONFIG_MACH_ECBAT91=y -CONFIG_MACH_YL9200=y -CONFIG_MACH_CPUAT91=y -CONFIG_MACH_ECO920=y -CONFIG_MTD_AT91_DATAFLASH_CARD=y -CONFIG_AT91_TIMER_HZ=100 -# CONFIG_ARM_THUMB is not set -CONFIG_PCCARD=y -CONFIG_AT91_CF=y -CONFIG_AEABI=y -# CONFIG_COMPACTION is not set -CONFIG_ZBOOT_ROM_TEXT=0x10000000 -CONFIG_ZBOOT_ROM_BSS=0x20040000 -CONFIG_KEXEC=y -CONFIG_AUTO_ZRELADDR=y -CONFIG_FPE_NWFPE=y -CONFIG_BINFMT_MISC=y -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set -# CONFIG_INET_XFRM_MODE_TUNNEL is not set -# CONFIG_INET_XFRM_MODE_BEET is not set -# CONFIG_INET_DIAG is not set -CONFIG_IPV6=y -CONFIG_IPV6_PRIVACY=y -CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_STANDALONE is not set -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_JEDECPROBE=y -CONFIG_MTD_CFI_INTELEXT=y -CONFIG_MTD_CFI_AMDSTD=y -CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PLATRAM=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_ATMEL=y -CONFIG_MTD_NAND_PLATFORM=y -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_GLUEBI=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -CONFIG_NETDEVICES=y -CONFIG_MII=y -CONFIG_ARM_AT91_ETHER=y -CONFIG_DAVICOM_PHY=y -CONFIG_SMSC_PHY=y -CONFIG_MICREL_PHY=y -# CONFIG_WLAN is not set -# CONFIG_INPUT_MOUSEDEV is not set -CONFIG_INPUT_EVDEV=y -CONFIG_KEYBOARD_GPIO=y -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -# CONFIG_LEGACY_PTYS is not set -CONFIG_SERIAL_ATMEL=y -CONFIG_SERIAL_ATMEL_CONSOLE=y -CONFIG_HW_RANDOM=y -CONFIG_I2C=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_GPIO=y -CONFIG_SPI=y -CONFIG_SPI_ATMEL=y -CONFIG_GPIO_SYSFS=y -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_WATCHDOG_NOWAYOUT=y -CONFIG_AT91RM9200_WATCHDOG=y -CONFIG_FB=y -CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_TILEBLITTING=y -CONFIG_FB_S1D13XXX=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_BACKLIGHT_GENERIC is not set -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_FONTS=y -CONFIG_LOGO=y -CONFIG_USB=y -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_GADGET=y -CONFIG_USB_AT91=y -CONFIG_USB_G_SERIAL=y -CONFIG_MMC=y -CONFIG_MMC_ATMELMCI=y -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_AT91RM9200=y -CONFIG_EXT4_FS=y -CONFIG_AUTOFS4_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_UBIFS_FS=y -CONFIG_UBIFS_FS_ADVANCED_COMPR=y -CONFIG_NFS_FS=y -CONFIG_ROOT_NFS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_850=y -CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_UTF8=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_FTRACE is not set -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_LL=y -CONFIG_EARLY_PRINTK=y -CONFIG_CRYPTO_PCBC=y -CONFIG_CRYPTO_SHA1=y -CONFIG_XZ_DEC_ARMTHUMB=y
arch/arm/mach-at91/Kconfig +0 -5
@@ -185,11 +185,6 @@ config SOC_AT91SAM9N12 # ---------------------------------------------------------- endif # SOC_SAM_V4_V5 - -if SOC_SAM_V4_V5 -source arch/arm/mach-at91/Kconfig.non_dt -endif - comment "Generic Board Type" config MACH_AT91RM9200_DT
arch/arm/mach-at91/Kconfig.non_dt deleted +0 -114
114 lines not on this page · raw message
arch/arm/mach-at91/Makefile +0 -2
@@ -20,8 +20,6 @@ obj-$(CONFIG_SOC_AT91SAM9RL) += at91sam9rl.o obj-$(CONFIG_SOC_SAMA5D3) += sama5d3.o obj-$(CONFIG_SOC_SAMA5D4) += sama5d4.o -obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200_devices.o - # AT91SAM board with device-tree obj-$(CONFIG_MACH_AT91RM9200_DT) += board-dt-rm9200.o obj-$(CONFIG_MACH_AT91SAM9_DT) += board-dt-sam9.o
arch/arm/mach-at91/at91rm9200.c +0 -341
370 lines not on this page · raw message
arch/arm/mach-at91/at91rm9200_devices.c deleted +0 -1212
1,212 lines not on this page · raw message
Signature · 1 line
2.1.3
PATCH 3/11 ARM: at91: switch configuration option to SOC_AT91RM9200
In reply to Nicolas FerreAs the ARCH_AT91RM9200 is removed because being !DT, we use the SOC_AT91RM9200 variant. This option can certainly be removed once the ST driver is reworked a bit.
--- arch/arm/mach-at91/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-at91/Kconfig +1 -1
@@ -224,7 +224,7 @@ config AT91_TIMER_HZ int "Kernel HZ (jiffies per second)" range 32 1024 depends on ARCH_AT91 - default "128" if ARCH_AT91RM9200 + default "128" if SOC_AT91RM9200 default "100" help On AT91rm9200 chips where you're using a system clock derived
Signature · 1 line
2.1.3
PATCH 4/11 ARM: at91/Kconfig: remove ARCH_AT91RM9200 option for drivers
In reply to Nicolas FerreThe precise selection is useless, so we simply remove these dependencies.
--- drivers/net/ethernet/cadence/Kconfig | 2 +- drivers/rtc/Kconfig | 2 +- drivers/watchdog/Kconfig | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/ethernet/cadence/Kconfig +1 -1
@@ -22,7 +22,7 @@ if NET_CADENCE config ARM_AT91_ETHER tristate "AT91RM9200 Ethernet support" - depends on HAS_DMA && (ARCH_AT91RM9200 || COMPILE_TEST) + depends on HAS_DMA && (ARCH_AT91 || COMPILE_TEST) select MACB ---help--- If you wish to compile a kernel for the AT91RM9200 and enable
drivers/rtc/Kconfig +1 -1
@@ -1110,7 +1110,7 @@ config RTC_DRV_AT91RM9200 config RTC_DRV_AT91SAM9 tristate "AT91SAM9x/AT91CAP9 RTT as RTC" - depends on ARCH_AT91 && !ARCH_AT91RM9200 + depends on ARCH_AT91 help RTC driver for the Atmel AT91SAM9x and AT91CAP9 internal RTT (Real Time Timer). These timers are powered by the backup power
drivers/watchdog/Kconfig +2 -2
@@ -154,14 +154,14 @@ config ARM_SP805_WATCHDOG config AT91RM9200_WATCHDOG tristate "AT91RM9200 watchdog" - depends on ARCH_AT91RM9200 + depends on SOC_AT91RM9200 help Watchdog timer embedded into AT91RM9200 chips. This will reboot your system when the timeout is reached. config AT91SAM9X_WATCHDOG tristate "AT91SAM9X / AT91CAP9 watchdog" - depends on ARCH_AT91 && !ARCH_AT91RM9200 + depends on ARCH_AT91 select WATCHDOG_CORE help Watchdog timer embedded into AT91SAM9X and AT91CAP9 chips. This will
Signature · 1 line
2.1.3
PATCH 5/11 ARM: at91: always USE_OF from now on
In reply to Nicolas FerreAs we always use Device Tree now, we can add the configuration here. Also remove the condition for PINCTRL_AT91.
--- arch/arm/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/Kconfig +2 -1
@@ -376,7 +376,8 @@ config ARCH_AT91 select IRQ_DOMAIN select NEED_MACH_IO_H if PCCARD select PINCTRL - select PINCTRL_AT91 if USE_OF + select PINCTRL_AT91 + select USE_OF help This enables support for systems based on Atmel AT91RM9200 and AT91SAM9* processors.
Signature · 1 line
2.1.3
PATCH 6/11 ARM: at91/trivial: update Kconfig comment to mention SAMA5
In reply to Nicolas FerreCortex-A5 SAMA5 processors were not listed, add this in the AT91 comment.
--- arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/Kconfig +1 -1
@@ -380,7 +380,7 @@ config ARCH_AT91 select USE_OF help This enables support for systems based on Atmel - AT91RM9200 and AT91SAM9* processors. + AT91RM9200, AT91SAM9 and SAMA5 processors. config ARCH_CLPS711X bool "Cirrus Logic CLPS711x/EP721x/EP731x-based"
Signature · 1 line
2.1.3
PATCH 7/11 ARM: at91: remove all !DT related configuration options
In reply to Nicolas FerreOLD_CLK_AT91 & OLD_IRQ_AT91 were only selected by entries in Kconfig.non_dt that are now gone. So we remove all this legacy stuff and select the proper options in the SOC_ entries.
As USE_OF is now selected directly in arch/arm/Kconfig AT91 entry, we can safely remove it everywhere in this file.
--- arch/arm/mach-at91/Kconfig | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-)
arch/arm/mach-at91/Kconfig +7 -20
@@ -15,23 +15,10 @@ config HAVE_AT91_DBGU1 config HAVE_AT91_DBGU2 bool -config AT91_USE_OLD_CLK - bool - config COMMON_CLK_AT91 bool - default USE_OF && !AT91_USE_OLD_CLK select COMMON_CLK -config OLD_CLK_AT91 - bool - default AT91_USE_OLD_CLK - -config OLD_IRQ_AT91 - bool - select MULTI_IRQ_HANDLER - select SPARSE_IRQ - config HAVE_AT91_SMD bool
@@ -40,18 +27,19 @@ config HAVE_AT91_H32MX config SOC_AT91SAM9 bool - select ATMEL_AIC_IRQ if !OLD_IRQ_AT91 + select ATMEL_AIC_IRQ + select COMMON_CLK_AT91 select CPU_ARM926T select GENERIC_CLOCKEVENTS - select MEMORY if USE_OF - select ATMEL_SDRAMC if USE_OF + select MEMORY + select ATMEL_SDRAMC config SOC_SAMA5 bool select ATMEL_AIC5_IRQ + select COMMON_CLK_AT91 select CPU_V7 select GENERIC_CLOCKEVENTS - select USE_OF select MEMORY select ATMEL_SDRAMC select PHYLIB if NETDEVICES
@@ -109,7 +97,8 @@ endif if SOC_SAM_V4_V5 config SOC_AT91RM9200 bool "AT91RM9200" - select ATMEL_AIC_IRQ if !OLD_IRQ_AT91 + select ATMEL_AIC_IRQ + select COMMON_CLK_AT91 select CPU_ARM920T select GENERIC_CLOCKEVENTS select HAVE_AT91_DBGU0
@@ -190,7 +179,6 @@ comment "Generic Board Type" config MACH_AT91RM9200_DT bool "Atmel AT91RM9200 Evaluation Kits with device-tree support" depends on SOC_AT91RM9200 - select USE_OF help Select this if you want to experiment device-tree with an Atmel RM9200 Evaluation Kit.
@@ -198,7 +186,6 @@ config MACH_AT91RM9200_DT config MACH_AT91SAM9_DT bool "Atmel AT91SAM Evaluation Kits with device-tree support" depends on SOC_AT91SAM9 - select USE_OF help Select this if you want to experiment device-tree with an Atmel Evaluation Kit.
Signature · 1 line
2.1.3
PATCH 8/11 ARM: at91: remove clock data in at91sam9n12.c and at91sam9x5.c files
In reply to Nicolas FerreAs the CONFIG_OLD_CLK_AT91 option is gone, let's completely remove the AT91 old clock driver related data.
--- arch/arm/mach-at91/at91sam9n12.c | 213 +-------------------------- arch/arm/mach-at91/at91sam9x5.c | 311 +-------------------------------------- 2 files changed, 4 insertions(+), 520 deletions(-)
arch/arm/mach-at91/at91sam9n12.c +2 -211
@@ -6,219 +6,11 @@* Licensed under GPLv2 or later. */ -#include <linux/module.h> -#include <linux/dma-mapping.h> -#include <linux/clk/at91_pmc.h> +#include <asm/system_misc.h> +#include <mach/hardware.h> -#include <asm/irq.h> -#include <asm/mach/arch.h> -#include <asm/mach/map.h> -#include <mach/at91sam9n12.h> -#include <mach/cpu.h> - -#include "board.h" #include "soc.h" #include "generic.h" -#include "sam9_smc.h" - -#if defined(CONFIG_OLD_CLK_AT91 ) -#include "clock.h" -/* -------------------------------------------------------------------- -* Clocks -* -------------------------------------------------------------------- */ - -/* -* The peripheral clocks. -*/ -static struct clk pioAB_clk = { - .name ="pioAB_clk" , - .pmc_mask =1 <<AT91SAM9N12_ID_PIOAB , - .type =CLK_TYPE_PERIPHERAL , -}; -static struct clk pioCD_clk = { - .name ="pioCD_clk" , - .pmc_mask =1 <<AT91SAM9N12_ID_PIOCD , - .type =CLK_TYPE_PERIPHERAL , -}; -static struct clk usart0_clk = { - .name ="usart0_clk" , - .pmc_mask =1 <<AT91SAM9N12_ID_USART0 , - .type =CLK_TYPE_PERIPHERAL , -}; -static struct clk usart1_clk = { - .name ="usart1_clk" , - .pmc_mask =1 <<AT91SAM9N12_ID_USART1 , - .type =CLK_TYPE_PERIPHERAL , -}; -static struct clk usart2_clk = { - .name ="usart2_clk" , - .pmc_mask =1 <<AT91SAM9N12_ID_USART2 , - .type =CLK_TYPE_PERIPHERAL , -}; -static struct clk usart3_clk = { - .name ="usart3_clk" , - .pmc_mask =1 <<AT91SAM9N12_ID_USART3 , - .type =CLK_TYPE_PERIPHERAL , -}; -static struct clk twi0_clk = { - .name ="twi0_clk" , - .pmc_mask =1 <<AT91SAM9N12_ID_TWI0 , - .type =CLK_TYPE_PERIPHERAL , -}; -static struct clk twi1_clk = { - .name ="twi1_clk" , - .pmc_mask =1 <<AT91SAM9N12_ID_TWI1 , - .type =CLK_TYPE_PERIPHERAL , -}; -static struct clk mmc_clk = { - .name ="mci_clk" , - .pmc_mask =1 <<AT91SAM9N12_ID_MCI , - .type =CLK_TYPE_PERIPHERAL , -}; -static struct clk spi0_clk = { - .name ="spi0_clk" , - .pmc_mask =1 <<AT91SAM9N12_ID_SPI0 , - .type =CLK_TYPE_PERIPHERAL , -}; -static struct clk spi1_clk = { - .name ="spi1_clk" , - .pmc_mask =1 <<AT91SAM9N12_ID_SPI1 , - .type =CLK_TYPE_PERIPHERAL , -}; -static struct clk uart0_clk = { - .name ="uart0_clk" , - .pmc_mask =1 <<AT91SAM9N12_ID_UART0 , - .type =CLK_TYPE_PERIPHERAL , -}; -static struct clk uart1_clk = { - .name ="uart1_clk" , - .pmc_mask =1 <<AT91SAM9N12_ID_UART1 , - .type =CLK_TYPE_PERIPHERAL , -}; -static struct clk tcb_clk = { - .name ="tcb_clk" , - .pmc_mask =1 <<AT91SAM9N12_ID_TCB , - .type =CLK_TYPE_PERIPHERAL , -}; -static struct clk pwm_clk = { - .name ="pwm_clk" , - .pmc_mask =1 <<AT91SAM9N12_ID_PWM , - .type =CLK_TYPE_PERIPHERAL , -}; -static struct clk adc_clk = { - .name ="adc_clk" , - .pmc_mask =1 <<AT91SAM9N12_ID_ADC , - .type =CLK_TYPE_PERIPHERAL , -}; -static struct clk dma_clk = { - .name ="dma_clk" , - .pmc_mask =1 <<AT91SAM9N12_ID_DMA , - .type =CLK_TYPE_PERIPHERAL , -}; -static struct clk uhp_clk = { - .name ="uhp" , - .pmc_mask =1 <<AT91SAM9N12_ID_UHP , - .type =CLK_TYPE_PERIPHERAL , -}; -static struct clk udp_clk = { - .name ="udp_clk" , - .pmc_mask =1 <<AT91SAM9N12_ID_UDP , - .type =CLK_TYPE_PERIPHERAL , -}; -static struct clk lcdc_clk = { - .name ="lcdc_clk" , - .pmc_mask =1 <<AT91SAM9N12_ID_LCDC , - .type =CLK_TYPE_PERIPHERAL , -}; -static struct clk ssc_clk = { - .name ="ssc_clk" , - .pmc_mask =1 <<AT91SAM9N12_ID_SSC , - .type =CLK_TYPE_PERIPHERAL , -}; - -static struct clk *periph_clocks[]__initdata = { - &pioAB_clk, - &pioCD_clk, - &usart0_clk, - &usart1_clk, - &usart2_clk, - &usart3_clk, - &twi0_clk, - &twi1_clk, - &mmc_clk, - &spi0_clk, - &spi1_clk, - &lcdc_clk, - &uart0_clk, - &uart1_clk, - &tcb_clk, - &pwm_clk, - &adc_clk, - &dma_clk, - &uhp_clk, - &udp_clk, - &ssc_clk, -}; - -static struct clk_lookup periph_clocks_lookups[] = { -/* lookup table for DT entries */ -CLKDEV_CON_DEV_ID ("usart" ,"fffff200.serial" , &mck), -CLKDEV_CON_DEV_ID ("usart" ,"f801c000.serial" , &usart0_clk), -CLKDEV_CON_DEV_ID ("usart" ,"f8020000.serial" , &usart1_clk), -CLKDEV_CON_DEV_ID ("usart" ,"f8024000.serial" , &usart2_clk), -CLKDEV_CON_DEV_ID ("usart" ,"f8028000.serial" , &usart3_clk), -CLKDEV_CON_DEV_ID ("t0_clk" ,"f8008000.timer" , &tcb_clk), -CLKDEV_CON_DEV_ID ("t0_clk" ,"f800c000.timer" , &tcb_clk), -CLKDEV_CON_DEV_ID ("mci_clk" ,"f0008000.mmc" , &mmc_clk), -CLKDEV_CON_DEV_ID (NULL ,"f0010000.ssc" , &ssc_clk), -CLKDEV_CON_DEV_ID ("dma_clk" ,"ffffec00.dma-controller" , &dma_clk), -CLKDEV_CON_DEV_ID (NULL ,"f8010000.i2c" , &twi0_clk), -CLKDEV_CON_DEV_ID (NULL ,"f8014000.i2c" , &twi1_clk), -CLKDEV_CON_DEV_ID ("spi_clk" ,"f0000000.spi" , &spi0_clk), -CLKDEV_CON_DEV_ID ("spi_clk" ,"f0004000.spi" , &spi1_clk), -CLKDEV_CON_DEV_ID (NULL ,"fffff400.gpio" , &pioAB_clk), -CLKDEV_CON_DEV_ID (NULL ,"fffff600.gpio" , &pioAB_clk), -CLKDEV_CON_DEV_ID (NULL ,"fffff800.gpio" , &pioCD_clk), -CLKDEV_CON_DEV_ID (NULL ,"fffffa00.gpio" , &pioCD_clk), -/* additional fake clock for macb_hclk */ -CLKDEV_CON_DEV_ID ("hclk" ,"500000.ohci" , &uhp_clk), -CLKDEV_CON_DEV_ID ("ohci_clk" ,"500000.ohci" , &uhp_clk), -CLKDEV_CON_DEV_ID (NULL ,"f8034000.pwm" , &pwm_clk), -}; - -/* -* The two programmable clocks. -* You must configure pin multiplexing to bring these signals out. -*/ -static struct clk pck0 = { - .name ="pck0" , - .pmc_mask =AT91_PMC_PCK0 , - .type =CLK_TYPE_PROGRAMMABLE , - .id =0 , -}; -static struct clk pck1 = { - .name ="pck1" , - .pmc_mask =AT91_PMC_PCK1 , - .type =CLK_TYPE_PROGRAMMABLE , - .id =1 , -}; - -static void __init at91sam9n12_register_clocks (void ) -{ -int i; - -for (i =0 ; i <ARRAY_SIZE (periph_clocks); i++) -clk_register (periph_clocks[i]); -clk_register (&pck0); -clk_register (&pck1); - -clkdev_add_table (periph_clocks_lookups, -ARRAY_SIZE (periph_clocks_lookups)); - -} -#else -#define at91sam9n12_register_clocks NULL -#endif /* -------------------------------------------------------------------- * AT91SAM9N12 processor initialization
@@ -236,6 +28,5 @@ static void __init at91sam9n12_initialize(void)AT91_SOC_START (at91sam9n12) .map_io = at91sam9n12_map_io, - .register_clocks = at91sam9n12_register_clocks, .init = at91sam9n12_initialize,AT91_SOC_END
arch/arm/mach-at91/at91sam9x5.c +2 -309
325 lines not on this page · raw message
Signature · 1 line
2.1.3
PATCH 9/11 ARM: at91: remove old at91-specific clock driver
In reply to Nicolas FerreThis clock driver collection was specific to AT91 and only used in !DT cases. All clocks and the clock trees for all Atmel SoCs are now described by drivers using the common clock framework.
--- arch/arm/mach-at91/Makefile | 1 - arch/arm/mach-at91/clock.c | 977 ------------------------------------------- arch/arm/mach-at91/clock.h | 49 --- arch/arm/mach-at91/generic.h | 11 - arch/arm/mach-at91/setup.c | 9 - 5 files changed, 1047 deletions(-) delete mode 100644 arch/arm/mach-at91/clock.c delete mode 100644 arch/arm/mach-at91/clock.h
arch/arm/mach-at91/Makefile +0 -1
@@ -5,7 +5,6 @@ obj-y := gpio.o setup.o sysirq_mask.o obj-$(CONFIG_OLD_IRQ_AT91) += irq.o -obj-$(CONFIG_OLD_CLK_AT91) += clock.o obj-$(CONFIG_SOC_AT91SAM9) += sam9_smc.o # CPU-specific support
arch/arm/mach-at91/clock.c deleted +0 -977
977 lines not on this page · raw message
arch/arm/mach-at91/clock.h deleted +0 -49
49 lines not on this page · raw message
arch/arm/mach-at91/generic.h +0 -11
@@ -11,7 +11,6 @@#ifndef _AT91_GENERIC_H#define _AT91_GENERIC_H -#include <linux/clkdev.h> #include <linux/of.h> #include <linux/reboot.h>
@@ -49,16 +48,6 @@ extern void at91rm9200_timer_init(void);extern void at91sam926x_ioremap_pit (u32 addr);extern void at91sam926x_pit_init (int irq); -/* Clocks */ -#ifdef CONFIG_OLD_CLK_AT91 -extern int __init at91_clock_init (unsigned long main_clock); -extern int __init at91_dt_clock_init (void ); -#else -static int inline at91_clock_init (unsigned long main_clock) {return 0 ; } -static int inline at91_dt_clock_init (void ) {return 0 ; } -#endif -struct device ; -/* Power Management */ extern void at91_irq_suspend (void );extern void at91_irq_resume (void );
arch/arm/mach-at91/setup.c +0 -9
@@ -460,9 +460,6 @@ void __init at91rm9200_dt_initialize(void) {at91_dt_ramc (); -/* Init clock subsystem */ -at91_dt_clock_init (); -/* Register the processor-specific clocks */ if (at91_boot_soc.register_clocks) at91_boot_soc.register_clocks ();
@@ -474,9 +471,6 @@ void __init at91_dt_initialize(void) {at91_dt_ramc (); -/* Init clock subsystem */ -at91_dt_clock_init (); -/* Register the processor-specific clocks */ if (at91_boot_soc.register_clocks) at91_boot_soc.register_clocks ();
@@ -490,9 +484,6 @@ void __init at91_initialize(unsigned long main_clock) { at91_boot_soc.ioremap_registers (); -/* Init clock subsystem */ -at91_clock_init (main_clock); -/* Register the processor-specific clocks */ at91_boot_soc.register_clocks ();
Signature · 1 line
2.1.3
PATCH 10/11 ARM: at91: remove legacy IRQ driver and related code
In reply to Nicolas FerreRemove irc.c and associated header file. The related code was idendified by the CONFIG_OLD_IRQ_AT91 option that was removed previously. It has been spotted by following coccinelle semantic match:
@rule1@
expression E;
statement S;
@@
(
- if (IS_ENABLED(CONFIG_OLD_IRQ_AT91)) S
|
- if (IS_ENABLED(CONFIG_OLD_IRQ_AT91) && E) S
)
---
Julia,
This is my very first try of coccinelle so forgive my naivety. But I would like to know how you would have done that.
Note as well that the 3 little chunks concerned by the use of coccinelle would have perfectly been removed by hand, but I wanted to have a try ;-)
Thanks, best regards.
Nicolas
arch/arm/mach-at91/Makefile | 1 - arch/arm/mach-at91/at91_aic.h | 99 ------------ arch/arm/mach-at91/board-dt-rm9200.c | 1 - arch/arm/mach-at91/board-dt-sam9.c | 1 - arch/arm/mach-at91/board-dt-sama5.c | 1 - arch/arm/mach-at91/generic.h | 2 - arch/arm/mach-at91/irq.c | 296 ----------------------------------- arch/arm/mach-at91/pm.c | 22 --- arch/arm/mach-at91/setup.c | 4 - 9 files changed, 427 deletions(-) delete mode 100644 arch/arm/mach-at91/at91_aic.h delete mode 100644 arch/arm/mach-at91/irq.c
arch/arm/mach-at91/Makefile +0 -1
@@ -4,7 +4,6 @@ obj-y := gpio.o setup.o sysirq_mask.o -obj-$(CONFIG_OLD_IRQ_AT91) += irq.o obj-$(CONFIG_SOC_AT91SAM9) += sam9_smc.o # CPU-specific support
arch/arm/mach-at91/at91_aic.h deleted +0 -99
99 lines not on this page · raw message
arch/arm/mach-at91/board-dt-rm9200.c +0 -1
@@ -22,7 +22,6 @@#include <asm/mach/map.h> #include <asm/mach/irq.h> -#include "at91_aic.h" #include "generic.h" static void __init at91rm9200_dt_timer_init (void )
arch/arm/mach-at91/board-dt-sam9.c +0 -1
@@ -21,7 +21,6 @@#include <asm/mach/map.h> #include <asm/mach/irq.h> -#include "at91_aic.h" #include "board.h" #include "generic.h"
arch/arm/mach-at91/board-dt-sama5.c +0 -1
@@ -24,7 +24,6 @@#include <asm/mach/map.h> #include <asm/mach/irq.h> -#include "at91_aic.h" #include "generic.h" static void __init sama5_dt_device_init (void )
arch/arm/mach-at91/generic.h +0 -2
@@ -29,8 +29,6 @@ extern void __init at91_dt_initialize(void);/* Interrupts */ extern void __init at91_init_irq_default (void );extern void __init at91_init_interrupts (unsigned int priority[]); -extern void __init at91_aic_init (unsigned int priority[], -unsigned int ext_irq_mask);extern int __init at91_aic_of_init (struct device_node *node,struct device_node *parent); extern int __init at91_aic5_of_init(struct device_node *node,
arch/arm/mach-at91/irq.c deleted +0 -296
296 lines not on this page · raw message
arch/arm/mach-at91/pm.c +0 -22
@@ -29,7 +29,6 @@#include <mach/cpu.h> #include <mach/hardware.h> -#include "at91_aic.h" #include "generic.h" #include "pm.h" #include "gpio.h"
@@ -136,19 +135,6 @@ static int at91_pm_enter(suspend_state_t state)else at91_gpio_suspend (); -if (IS_ENABLED (CONFIG_OLD_IRQ_AT91 ) && at91_aic_base) { -at91_irq_suspend (); - -pr_debug ("AT91: PM - wake mask %08x, pm state %d\n" , -/* remember all the always-wake irqs */ - (at91_pmc_read (AT91_PMC_PCSR ) - | (1 <<AT91_ID_FIQ ) - | (1 <<AT91_ID_SYS ) - | (at91_get_extern_irq ())) - &at91_aic_read (AT91_AIC_IMR ), - state); - } -switch (state) {/* * Suspend-to-RAM is like STANDBY plus slow clock mode, so
@@ -212,17 +198,9 @@ static int at91_pm_enter(suspend_state_t state) goto error; } -if (IS_ENABLED (CONFIG_OLD_IRQ_AT91 ) && at91_aic_base) -pr_debug ("AT91: PM - wakeup %08x\n" , -at91_aic_read (AT91_AIC_IPR ) & -at91_aic_read (AT91_AIC_IMR )); - error: target_state =PM_SUSPEND_ON ; -if (IS_ENABLED (CONFIG_OLD_IRQ_AT91 ) && at91_aic_base) -at91_irq_resume (); -if (of_have_populated_dt ())at91_pinctrl_gpio_resume ();else
arch/arm/mach-at91/setup.c +0 -4
@@ -49,10 +49,6 @@ void __init at91_init_irq_default(void)void __init at91_init_interrupts (unsigned int *priority) { -/* Initialize the AIC interrupt controller */ -if (IS_ENABLED (CONFIG_OLD_IRQ_AT91 )) -at91_aic_init (priority, at91_boot_soc.extern_irq); -/* Enable GPIO interrupts */ at91_gpio_irq_setup (); }
Signature · 1 line
2.1.3
Re: [PATCH 10/11] ARM: at91: remove legacy IRQ driver and related code
Quoted 4 lines · Nicolas Ferre
Remove
irc.cand associated header file. The related code was idendified by theCONFIG_OLD_IRQ_AT91option that was removed previously. It has been spotted by following coccinelle semantic match:
Quoted 9 lines
@rule1@
expression E;
statement S;
@@
(
- if (IS_ENABLED(CONFIG_OLD_IRQ_AT91)) S
|
- if (IS_ENABLED(CONFIG_OLD_IRQ_AT91)&& E) S
)
I would have done:
@@
statement S1,S2;
@@
*if (IS_ENABLED(CONFIG_OLD_IRQ_AT91) && ...)
S1 else S2
There are a lot of things going on here:
1. The * in column 0 means just search for something. It will seem to be -'d in the result, but having * in the specification seems a bit nicer.
2. To be exhausitve, maybe some relevant code has an else. When an if pattern has an else pattern that is just a metavariable that is not used elsewhere, it also considers the possibility that the else is empty, and thus missing completely. This is called an isomorphism. The available isomorphisms are described in the file standard.iso.
3. xxx && ... matches 0 or more occurrences of && with xxx at top level. So it subsumes the two patterns you provided.
4. Another isomorphism will flip the branches of the if and negate the condition. Here that should match a || pattern. On the other hand, in your case that will not be quite good enough, because it will be an || pattern with !IS_ENABLED, not IS_ENABLED. So to be really complete you should put another rule with || rather than &&.
Thanks for trying Coccinelle!
julia
Quoted 565 lines
Signed-off-by Nicolas Ferre <[email protected]>Cc Julia Lawall <[email protected]>---
Julia,This is my very first try of coccinelle so forgive my naivety. But I would like to know how you would have done that.
Note as well that the 3 little chunks concerned by the use of coccinelle would have perfectly been removed by hand, but I wanted to have a try ;-)Thanks, best regards.
Nicolasarch/arm/mach-at91/Makefile | 1 - arch/arm/mach-at91/at91_aic.h | 99 ------------ arch/arm/mach-at91/board-dt-rm9200.c | 1 - arch/arm/mach-at91/board-dt-sam9.c | 1 - arch/arm/mach-at91/board-dt-sama5.c | 1 - arch/arm/mach-at91/generic.h | 2 - arch/arm/mach-at91/irq.c | 296 ----------------------------------- arch/arm/mach-at91/pm.c | 22 --- arch/arm/mach-at91/setup.c | 4 - 9 files changed, 427 deletions(-) delete mode 100644 arch/arm/mach-at91/at91_aic.h delete mode 100644 arch/arm/mach-at91/irq.carch/arm/mach-at91/Makefile +0
-1@@ -4,7 +4,6 @@ obj-y := gpio.o setup.o sysirq_mask.o -obj-$(CONFIG_OLD_IRQ_AT91) += irq.o obj-$(CONFIG_SOC_AT91SAM9) += sam9_smc.o # CPU-specific supportarch/arm/mach-at91/at91_aic.h deleted +0
-99@@ -1,99 +0,0 @@ -/* -* arch/arm/mach-at91/include/mach/at91_aic.h -* -* Copyright (C) 2005 Ivan Kokshaysky -* Copyright (C) SAN People -* -* Advanced Interrupt Controller (AIC) - System peripherals registers. -* Based on AT91RM9200 datasheet revision E. -* -* 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. -*/ - -#ifndef AT91_AIC_H -#define AT91_AIC_H - -#ifndef __ASSEMBLY__ -extern void __iomem *at91_aic_base; - -#define at91_aic_read (field) \ - __raw_readl(at91_aic_base + field) - -#define at91_aic_write (field, value) \ - __raw_writel(value, at91_aic_base + field) -#else -.extern at91_aic_base -#endif - -/* Number of irq lines managed by AIC */ -#define NR_AIC_IRQS 32 -#define NR_AIC5_IRQS 128 - -#define AT91_AIC5_SSR 0x0/* Source Select Register [AIC5] */ -#define AT91_AIC5_INTSEL_MSK (0x7f << 0)/* Interrupt Line Selection Mask */ - -#define AT91_AIC_IRQ_MIN_PRIORITY 0 -#define AT91_AIC_IRQ_MAX_PRIORITY 7 - -#define AT91_AIC_SMR (n) ((n) * 4)/* Source Mode Registers 0-31 */ -#define AT91_AIC5_SMR 0x4/* Source Mode Register [AIC5] */ -#define AT91_AIC_PRIOR (7 << 0)/* Priority Level */ -#define AT91_AIC_SRCTYPE (3 << 5)/* Interrupt Source Type */ -#define AT91_AIC_SRCTYPE_LOW (0 << 5) -#define AT91_AIC_SRCTYPE_FALLING (1 << 5) -#define AT91_AIC_SRCTYPE_HIGH (2 << 5) -#define AT91_AIC_SRCTYPE_RISING (3 << 5) - -#define AT91_AIC_SVR (n) (0x80 + ((n) * 4))/* Source Vector Registers 0-31 */ -#define AT91_AIC5_SVR 0x8/* Source Vector Register [AIC5] */ -#define AT91_AIC_IVR 0x100/* Interrupt Vector Register */ -#define AT91_AIC5_IVR 0x10/* Interrupt Vector Register [AIC5] */ -#define AT91_AIC_FVR 0x104/* Fast Interrupt Vector Register */ -#define AT91_AIC5_FVR 0x14/* Fast Interrupt Vector Register [AIC5] */ -#define AT91_AIC_ISR 0x108/* Interrupt Status Register */ -#define AT91_AIC5_ISR 0x18/* Interrupt Status Register [AIC5] */ -#define AT91_AIC_IRQID (0x1f << 0)/* Current Interrupt Identifier */ - -#define AT91_AIC_IPR 0x10c/* Interrupt Pending Register */ -#define AT91_AIC5_IPR0 0x20/* Interrupt Pending Register 0 [AIC5] */ -#define AT91_AIC5_IPR1 0x24/* Interrupt Pending Register 1 [AIC5] */ -#define AT91_AIC5_IPR2 0x28/* Interrupt Pending Register 2 [AIC5] */ -#define AT91_AIC5_IPR3 0x2c/* Interrupt Pending Register 3 [AIC5] */ -#define AT91_AIC_IMR 0x110/* Interrupt Mask Register */ -#define AT91_AIC5_IMR 0x30/* Interrupt Mask Register [AIC5] */ -#define AT91_AIC_CISR 0x114/* Core Interrupt Status Register */ -#define AT91_AIC5_CISR 0x34/* Core Interrupt Status Register [AIC5] */ -#define AT91_AIC_NFIQ (1 << 0)/* nFIQ Status */ -#define AT91_AIC_NIRQ (1 << 1)/* nIRQ Status */ - -#define AT91_AIC_IECR 0x120/* Interrupt Enable Command Register */ -#define AT91_AIC5_IECR 0x40/* Interrupt Enable Command Register [AIC5] */ -#define AT91_AIC_IDCR 0x124/* Interrupt Disable Command Register */ -#define AT91_AIC5_IDCR 0x44/* Interrupt Disable Command Register [AIC5] */ -#define AT91_AIC_ICCR 0x128/* Interrupt Clear Command Register */ -#define AT91_AIC5_ICCR 0x48/* Interrupt Clear Command Register [AIC5] */ -#define AT91_AIC_ISCR 0x12c/* Interrupt Set Command Register */ -#define AT91_AIC5_ISCR 0x4c/* Interrupt Set Command Register [AIC5] */ -#define AT91_AIC_EOICR 0x130/* End of Interrupt Command Register */ -#define AT91_AIC5_EOICR 0x38/* End of Interrupt Command Register [AIC5] */ -#define AT91_AIC_SPU 0x134/* Spurious Interrupt Vector Register */ -#define AT91_AIC5_SPU 0x3c/* Spurious Interrupt Vector Register [AIC5] */ -#define AT91_AIC_DCR 0x138/* Debug Control Register */ -#define AT91_AIC5_DCR 0x6c/* Debug Control Register [AIC5] */ -#define AT91_AIC_DCR_PROT (1 << 0)/* Protection Mode */ -#define AT91_AIC_DCR_GMSK (1 << 1)/* General Mask */ - -#define AT91_AIC_FFER 0x140/* Fast Forcing Enable Register [SAM9 only] */ -#define AT91_AIC5_FFER 0x50/* Fast Forcing Enable Register [AIC5] */ -#define AT91_AIC_FFDR 0x144/* Fast Forcing Disable Register [SAM9 only] */ -#define AT91_AIC5_FFDR 0x54/* Fast Forcing Disable Register [AIC5] */ -#define AT91_AIC_FFSR 0x148/* Fast Forcing Status Register [SAM9 only] */ -#define AT91_AIC5_FFSR 0x58/* Fast Forcing Status Register [AIC5] */ - -void at91_aic_handle_irq (struct pt_regs *regs); -void at91_aic5_handle_irq (struct pt_regs *regs); - -#endif arch/arm/mach-at91/board-dt-rm9200.c +0
-1@@ -22,7 +22,6 @@#include <asm/mach/map.h> #include <asm/mach/irq.h> -#include "at91_aic.h" #include "generic.h" static void __init at91rm9200_dt_timer_init (void )arch/arm/mach-at91/board-dt-sam9.c +0
-1@@ -21,7 +21,6 @@#include <asm/mach/map.h> #include <asm/mach/irq.h> -#include "at91_aic.h" #include "board.h" #include "generic.h" arch/arm/mach-at91/board-dt-sama5.c +0
-1@@ -24,7 +24,6 @@#include <asm/mach/map.h> #include <asm/mach/irq.h> -#include "at91_aic.h" #include "generic.h" static void __init sama5_dt_device_init (void )arch/arm/mach-at91/generic.h +0
-2@@ -29,8 +29,6 @@ extern void __init at91_dt_initialize(void);/* Interrupts */ extern void __init at91_init_irq_default (void );extern void __init at91_init_interrupts (unsigned int priority[]); -extern void __init at91_aic_init (unsigned int priority[], -unsigned int ext_irq_mask);extern int __init at91_aic_of_init (struct device_node *node,struct device_node *parent); extern int __init at91_aic5_of_init(struct device_node *node,arch/arm/mach-at91/irq.c deleted +0
-296@@ -1,296 +0,0 @@ -/* -* linux/arch/arm/mach-at91/irq.c -* -* Copyright (C) 2004 SAN People -* Copyright (C) 2004 ATMEL -* Copyright (C) Rick Bronson -* -* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#include <linux/init.h> -#include <linux/module.h> -#include <linux/mm.h> -#include <linux/bitmap.h> -#include <linux/types.h> -#include <linux/irq.h> -#include <linux/of.h> -#include <linux/of_address.h> -#include <linux/of_irq.h> -#include <linux/irqdomain.h> -#include <linux/err.h> -#include <linux/slab.h> - -#include <mach/hardware.h> -#include <asm/irq.h> -#include <asm/setup.h> - -#include <asm/exception.h> -#include <asm/mach/arch.h> -#include <asm/mach/irq.h> -#include <asm/mach/map.h> - -#include "at91_aic.h" - -void __iomem *at91_aic_base; -static struct irq_domain *at91_aic_domain; -static struct device_node *at91_aic_np; -static unsigned int n_irqs =NR_AIC_IRQS ; - -#ifdef CONFIG_PM - -static unsigned long *wakeups; -static unsigned long *backups; - -#define set_backup (bit) set_bit(bit, backups) -#define clear_backup (bit) clear_bit(bit, backups) - -static int at91_aic_pm_init (void ) -{ - backups =kzalloc (BITS_TO_LONGS (n_irqs) *sizeof (*backups),GFP_KERNEL ); -if (!backups) -return -ENOMEM ; - - wakeups =kzalloc (BITS_TO_LONGS (n_irqs) *sizeof (*backups),GFP_KERNEL ); -if (!wakeups) { -kfree (backups); -return -ENOMEM ; - } - -return 0 ; -} - -static int at91_aic_set_wake (struct irq_data *d,unsigned value) -{ -if (unlikely (d->hwirq >= n_irqs)) -return -EINVAL ; - -if (value) -set_bit (d->hwirq, wakeups); -else -clear_bit (d->hwirq, wakeups); - -return 0 ; -} - -void at91_irq_suspend (void ) -{ -at91_aic_write (AT91_AIC_IDCR , *backups); -at91_aic_write (AT91_AIC_IECR , *wakeups); -} - -void at91_irq_resume (void ) -{ -at91_aic_write (AT91_AIC_IDCR , *wakeups); -at91_aic_write (AT91_AIC_IECR , *backups); -} - -#else -static inline int at91_aic_pm_init (void ) -{ -return 0 ; -} - -#define set_backup (bit) -#define clear_backup (bit) -#define at91_aic_set_wake NULL - -#endif /* CONFIG_PM */ - -asmlinkage void __exception_irq_entry -at91_aic_handle_irq (struct pt_regs *regs) -{ -u32 irqnr; -u32 irqstat; - - irqnr =at91_aic_read (AT91_AIC_IVR ); - irqstat =at91_aic_read (AT91_AIC_ISR ); - -/* -* ISR value is 0 when there is no current interrupt or when there is -* a spurious interrupt -*/ -if (!irqstat) -at91_aic_write (AT91_AIC_EOICR ,0 ); -else -handle_IRQ (irqnr, regs); -} - -static void at91_aic_mask_irq (struct irq_data *d) -{ -/* Disable interrupt on AIC */ -at91_aic_write (AT91_AIC_IDCR ,1 << d->hwirq); -/* Update ISR cache */ -clear_backup (d->hwirq); -} - -static void at91_aic_unmask_irq (struct irq_data *d) -{ -/* Enable interrupt on AIC */ -at91_aic_write (AT91_AIC_IECR ,1 << d->hwirq); -/* Update ISR cache */ -set_backup (d->hwirq); -} - -static void at91_aic_eoi (struct irq_data *d) -{ -/* -* Mark end-of-interrupt on AIC, the controller doesn't care about -* the value written. Moreover it's a write-only register. -*/ -at91_aic_write (AT91_AIC_EOICR ,0 ); -} - -static unsigned long *at91_extern_irq; - -u32 at91_get_extern_irq (void ) -{ -if (!at91_extern_irq) -return 0 ; -return *at91_extern_irq; -} - -#define is_extern_irq (hwirq) test_bit(hwirq, at91_extern_irq) - -static int at91_aic_compute_srctype (struct irq_data *d,unsigned type) -{ -int srctype; - -switch (type) { -case IRQ_TYPE_LEVEL_HIGH : - srctype =AT91_AIC_SRCTYPE_HIGH ; -break ; -case IRQ_TYPE_EDGE_RISING : - srctype =AT91_AIC_SRCTYPE_RISING ; -break ; -case IRQ_TYPE_LEVEL_LOW : -if ((d->hwirq ==AT91_ID_FIQ ) ||is_extern_irq (d->hwirq))/* only supported on external interrupts */ - srctype =AT91_AIC_SRCTYPE_LOW ; -else - srctype = -EINVAL ; -break ; -case IRQ_TYPE_EDGE_FALLING : -if ((d->hwirq ==AT91_ID_FIQ ) ||is_extern_irq (d->hwirq))/* only supported on external interrupts */ - srctype =AT91_AIC_SRCTYPE_FALLING ; -else - srctype = -EINVAL ; -break ; -default : - srctype = -EINVAL ; - } - -return srctype; -} - -static int at91_aic_set_type (struct irq_data *d,unsigned type) -{ -unsigned int smr; -int srctype; - - srctype =at91_aic_compute_srctype (d, type); -if (srctype <0 ) -return srctype; - - smr =at91_aic_read (AT91_AIC_SMR (d->hwirq)) & ~AT91_AIC_SRCTYPE ; -at91_aic_write (AT91_AIC_SMR (d->hwirq), smr | srctype); - -return 0 ; -} - -static struct irq_chip at91_aic_chip = { - .name ="AIC" , - .irq_mask = at91_aic_mask_irq, - .irq_unmask = at91_aic_unmask_irq, - .irq_set_type = at91_aic_set_type, - .irq_set_wake = at91_aic_set_wake, - .irq_eoi = at91_aic_eoi, -}; - -static void __init at91_aic_hw_init (unsigned int spu_vector) -{ -int i; - -/* -* Perform 8 End Of Interrupt Command to make sure AIC -* will not Lock out nIRQ -*/ -for (i =0 ; i <8 ; i++) -at91_aic_write (AT91_AIC_EOICR ,0 ); - -/* -* Spurious Interrupt ID in Spurious Vector Register. -* When there is no current interrupt, the IRQ Vector Register -* reads the value stored in AIC_SPU -*/ -at91_aic_write (AT91_AIC_SPU , spu_vector); - -/* No debugging in AIC: Debug (Protect) Control Register */ -at91_aic_write (AT91_AIC_DCR ,0 ); - -/* Disable and clear all interrupts initially */ -at91_aic_write (AT91_AIC_IDCR ,0xFFFFFFFF ); -at91_aic_write (AT91_AIC_ICCR ,0xFFFFFFFF ); -} - -/* -* Initialize the AIC interrupt controller. -*/ -void __init at91_aic_init (unsigned int *priority,unsigned int ext_irq_mask) -{ -unsigned int i; -int irq_base; - - at91_extern_irq =kzalloc (BITS_TO_LONGS (n_irqs) - *sizeof (*at91_extern_irq),GFP_KERNEL ); - -if (at91_aic_pm_init () || at91_extern_irq ==NULL ) -panic ("Unable to allocate bit maps\n" ); - - *at91_extern_irq = ext_irq_mask; - - at91_aic_base =ioremap (AT91_AIC ,512 ); -if (!at91_aic_base) -panic ("Unable to ioremap AIC registers\n" ); - -/* Add irq domain for AIC */ - irq_base =irq_alloc_descs (-1 ,0 , n_irqs,0 ); -if (irq_base <0 ) { -WARN (1 ,"Cannot allocate irq_descs, assuming pre-allocated\n" ); - irq_base =0 ; - } - at91_aic_domain =irq_domain_add_legacy (at91_aic_np, n_irqs, - irq_base,0 , - &irq_domain_simple_ops,NULL ); - -if (!at91_aic_domain) -panic ("Unable to add AIC irq domain\n" ); - -irq_set_default_host (at91_aic_domain); - -/* -* The IVR is used by macro get_irqnr_and_base to read and verify. -* The irq number is NR_AIC_IRQS when a spurious interrupt has occurred. -*/ -for (i =0 ; i < n_irqs; i++) { -/* Put hardware irq number in Source Vector Register: */ -at91_aic_write (AT91_AIC_SVR (i),NR_IRQS_LEGACY + i); -/* Active Low interrupt, with the specified priority */ -at91_aic_write (AT91_AIC_SMR (i),AT91_AIC_SRCTYPE_LOW | priority[i]); -irq_set_chip_and_handler (NR_IRQS_LEGACY + i, &at91_aic_chip, handle_fasteoi_irq); -set_irq_flags (i,IRQF_VALID |IRQF_PROBE ); - } - -at91_aic_hw_init (n_irqs); -}arch/arm/mach-at91/pm.c +0
-22@@ -29,7 +29,6 @@#include <mach/cpu.h> #include <mach/hardware.h> -#include "at91_aic.h" #include "generic.h" #include "pm.h" #include "gpio.h" @@ -136,19 +135,6 @@ static int at91_pm_enter(suspend_state_t state)else at91_gpio_suspend (); -if (IS_ENABLED (CONFIG_OLD_IRQ_AT91 ) && at91_aic_base) { -at91_irq_suspend (); - -pr_debug ("AT91: PM - wake mask %08x, pm state %d\n" , -/* remember all the always-wake irqs */ - (at91_pmc_read (AT91_PMC_PCSR ) - | (1 <<AT91_ID_FIQ ) - | (1 <<AT91_ID_SYS ) - | (at91_get_extern_irq ())) - &at91_aic_read (AT91_AIC_IMR ), - state); - } -switch (state) {/* * Suspend-to-RAM is like STANDBY plus slow clock mode, so @@ -212,17 +198,9 @@ static int at91_pm_enter(suspend_state_t state) goto error; } -if (IS_ENABLED (CONFIG_OLD_IRQ_AT91 ) && at91_aic_base) -pr_debug ("AT91: PM - wakeup %08x\n" , -at91_aic_read (AT91_AIC_IPR ) & -at91_aic_read (AT91_AIC_IMR )); - error: target_state =PM_SUSPEND_ON ; -if (IS_ENABLED (CONFIG_OLD_IRQ_AT91 ) && at91_aic_base) -at91_irq_resume (); -if (of_have_populated_dt ())at91_pinctrl_gpio_resume ();else arch/arm/mach-at91/setup.c +0
-5@@ -49,10 +49,6 @@ void __init at91_init_irq_default(void)void __init at91_init_interrupts (unsigned int *priority) { -/* Initialize the AIC interrupt controller */ -if (IS_ENABLED (CONFIG_OLD_IRQ_AT91 )) -at91_aic_init (priority, at91_boot_soc.extern_irq); -/* Enable GPIO interrupts */ at91_gpio_irq_setup (); } --2.1.3
PATCH 11/11 ARM: at91: remove unused IRQ function declarations
In reply to Nicolas FerreSince 3b26f39b0ab1 (ARM: at91: make use of the new AIC driver for dt enabled boards) the old IRQ initialisation functions aren't used anymore: remove their declaration in generic.h.
--- arch/arm/mach-at91/generic.h | 4 ---- 1 file changed, 4 deletions(-)
arch/arm/mach-at91/generic.h +0 -4
@@ -29,10 +29,6 @@ extern void __init at91_dt_initialize(void);/* Interrupts */ extern void __init at91_init_irq_default (void );extern void __init at91_init_interrupts (unsigned int priority[]); -extern int __init at91_aic_of_init (struct device_node *node, -struct device_node *parent); -extern int __init at91_aic5_of_init (struct device_node *node, -struct device_node *parent);extern void __init at91_sysirq_mask_rtc (u32 rtc_base);extern void __init at91_sysirq_mask_rtt (u32 rtt_base);
Signature · 1 line
2.1.3
Quoted 11 lines · On Thursday 27 November 2014 17:06:28 Nicolas Ferre wrote:
This is the last series of patches that removes the non-Device-Tree board support for older Atmel SoCs.
Again, for the record, it was announced here
https://lkml.org/lkml/2014/9/10/293 ([ANNOUNCE] ARM: at91: removal of board files) two months ago.
Several files beyond at91rm9200 are touched this time as I tried to remove the biggest parts that were related to !DT SoC initializations. More cleanup is certainly needed to remove dead code.The diffstat is also pretty big as a lot of at91rm9200 boards were remaining.
Awesome stuff!
Two questions:
- is anything holding this up from getting merged in 3.19?
- Are there any remaining issues that keep us from using multiplatform? I know you all have been working on those a lot, but I haven't checked what is still missing.
Arnd
Quoted 10 lines · Arnd Bergmann
Quoted 9 lines · On Thursday 27 November 2014 17:06:28 Nicolas Ferre wrote:
This is the last series of patches that removes the non-Device-Tree board support for older Atmel SoCs.
Again, for the record, it was announced here
https://lkml.org/lkml/2014/9/10/293 ([ANNOUNCE] ARM: at91: removal of board files) two months ago.
Several files beyond at91rm9200 are touched this time as I tried to remove the biggest parts that were related to !DT SoC initializations. More cleanup is certainly needed to remove dead code.
Quoted 9 lines
Quoted 2 lines
The diffstat is also pretty big as a lot of at91rm9200 boards were remaining.
Awesome stuff!
Two questions:
- is anything holding this up from getting merged in 3.19?
If you think this is not too late in the cycle, I would say go ahead ;)
Quoted 4 lines
- Are there any remaining issues that keep us from using multiplatform? I know you all have been working on those a lot, but I haven't checked what is still missing.
As discussed some weeks ago, I prepared patches to switch sama5d[3-4] to multiplatform. We are still missing the SMC and matrix drivers to switch sam9 and rm9200.
The currently affected drivers are:
- drivers/ata/pata_at91.c (SMC)
- drivers/pcmcia/at91_cf.c (SMC)
- drivers/usb/gadget/udc/at91_udc.c (Matrix, this is the only one for sam9)
- sound/atmel/ac97c.c (that one is still not converted to DT anyway...)
- drivers/watchdog/at91rm9200_wdt.c (WIP, will be converted properly to an MFD)
I'll resume working on that in December.
Do you want me to submit the sama5d[3-4] switch for 3.19? I'll have to rebase on that series. The main remaining issue is that I couldn't work out a way not breaking the defconfigs, even after talking with the Kconfig maintainer so doing first sama5 then sam9/rm9200 will break the defconfigs for sam9/rm9200 twice.
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Quoted 14 lines · On Thursday 27 November 2014 18:12:43 Alexandre Belloni wrote:
Quoted 13 lines · Arnd Bergmann
Quoted 11 lines · On Thursday 27 November 2014 17:06:28 Nicolas Ferre wrote:
This is the last series of patches that removes the non-Device-Tree board support for older Atmel SoCs.
Again, for the record, it was announced here
https://lkml.org/lkml/2014/9/10/293 ([ANNOUNCE] ARM: at91: removal of board files) two months ago.
Several files beyond at91rm9200 are touched this time as I tried to remove the biggest parts that were related to !DT SoC initializations. More cleanup is certainly needed to remove dead code.The diffstat is also pretty big as a lot of at91rm9200 boards were remaining.
Quoted 8 lines
Quoted 6 lines
Awesome stuff!
Two questions:
- is anything holding this up from getting merged in 3.19?
If you think this is not too late in the cycle, I would say go ahead
I'd say we should do it, unless there are last-minute regressions.
Quoted 18 lines
Quoted 4 lines
- Are there any remaining issues that keep us from using multiplatform? I know you all have been working on those a lot, but I haven't checked what is still missing.
As discussed some weeks ago, I prepared patches to switch sama5d[3-4] to multiplatform. We are still missing the SMC and matrix drivers to switch sam9 and rm9200.
The currently affected drivers are:
-drivers/ata/pata_at91.c(SMC)
-drivers/pcmcia/at91_cf.c(SMC)
-drivers/usb/gadget/udc/at91_udc.c(Matrix, this is the only one for sam9)
-sound/atmel/ac97c.c(that one is still not converted to DT anyway...)
-drivers/watchdog/at91rm9200_wdt.c(WIP, will be converted properly to an MFD)
Quoted 1 line
I'll resume working on that in December.
Ok, sounds great.
Quoted 5 lines
Do you want me to submit the sama5d[3-4] switch for 3.19? I'll have to rebase on that series. The main remaining issue is that I couldn't work out a way not breaking the defconfigs, even after talking with the
Kconfigmaintainer so doing first sama5 then sam9/rm9200 will break the defconfigs for sam9/rm9200 twice.
Probably better to do all of mach-at91 at once for 3.20 so we don't break anything trying to make both aproaches work together.
Arnd
Quoted 17 lines · Arnd Bergmann
Quoted 16 lines · On Thursday 27 November 2014 18:12:43 Alexandre Belloni wrote:
Quoted 15 lines · Arnd Bergmann
Quoted 11 lines · On Thursday 27 November 2014 17:06:28 Nicolas Ferre wrote:
This is the last series of patches that removes the non-Device-Tree board support for older Atmel SoCs.
Again, for the record, it was announced here
https://lkml.org/lkml/2014/9/10/293 ([ANNOUNCE] ARM: at91: removal of board files) two months ago.
Several files beyond at91rm9200 are touched this time as I tried to remove the biggest parts that were related to !DT SoC initializations. More cleanup is certainly needed to remove dead code.The diffstat is also pretty big as a lot of at91rm9200 boards were remaining.
Awesome stuff!
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Two questions:
- is anything holding this up from getting merged in 3.19?
If you think this is not too late in the cycle, I would say go ahead
I'd say we should do it, unless there are last-minute regressions.
Arnd,
I am totally in favor for a merge into 3.19.
I wanted to wait one day or two but given that the official announce had been made several months ago, I don't think it makes a big difference.
So, what do you prefer:
1/ I wait today and send you the pull-request this evening (our time) 2/ I send you the pull-request at the beginning of next week but still can make it for 3.19?
(BTW, in the meantime, there is a pending pull-request (at91-cleanup3) but it is true that you needn't pulling it in if you plan to take this one which will be named at91-cleanup4 and that will obviously contain the 3rd one).
Quoted 22 lines
Quoted 18 lines
Quoted 4 lines
- Are there any remaining issues that keep us from using multiplatform? I know you all have been working on those a lot, but I haven't checked what is still missing.
As discussed some weeks ago, I prepared patches to switch sama5d[3-4] to multiplatform. We are still missing the SMC and matrix drivers to switch sam9 and rm9200.
The currently affected drivers are:
-drivers/ata/pata_at91.c(SMC)
-drivers/pcmcia/at91_cf.c(SMC)
-drivers/usb/gadget/udc/at91_udc.c(Matrix, this is the only one for sam9)
-sound/atmel/ac97c.c(that one is still not converted to DT anyway...)
-drivers/watchdog/at91rm9200_wdt.c(WIP, will be converted properly to an MFD)Quoted 1 line
I'll resume working on that in December.
Ok, sounds great.
Quoted 8 lines
Quoted 5 lines
Do you want me to submit the sama5d[3-4] switch for 3.19? I'll have to rebase on that series. The main remaining issue is that I couldn't work out a way not breaking the defconfigs, even after talking with the
Kconfigmaintainer so doing first sama5 then sam9/rm9200 will break the defconfigs for sam9/rm9200 twice.Probably better to do all of mach-at91 at once for 3.20 so we don't break anything trying to make both aproaches work together.
Ok, let's schedule it for 3.20.
Bye,
Signature · 1 line
Nicolas Ferre
Quoted 33 lines · On Friday 28 November 2014 10:36:09 Nicolas Ferre wrote:
Quoted 17 lines · Arnd Bergmann
Quoted 16 lines · On Thursday 27 November 2014 18:12:43 Alexandre Belloni wrote:
Quoted 15 lines · Arnd Bergmann
Quoted 11 lines · On Thursday 27 November 2014 17:06:28 Nicolas Ferre wrote:
This is the last series of patches that removes the non-Device-Tree board support for older Atmel SoCs.
Again, for the record, it was announced here
https://lkml.org/lkml/2014/9/10/293 ([ANNOUNCE] ARM: at91: removal of board files) two months ago.
Several files beyond at91rm9200 are touched this time as I tried to remove the biggest parts that were related to !DT SoC initializations. More cleanup is certainly needed to remove dead code.The diffstat is also pretty big as a lot of at91rm9200 boards were remaining.
Awesome stuff!
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Two questions:
- is anything holding this up from getting merged in 3.19?
If you think this is not too late in the cycle, I would say go ahead
I'd say we should do it, unless there are last-minute regressions.
Arnd,
I am totally in favor for a merge into 3.19.
I wanted to wait one day or two but given that the official announce had been made several months ago, I don't think it makes a big difference.
Quoted 5 lines
So, what do you prefer:
1/ I wait today and send you the pull-request this evening (our time) 2/ I send you the pull-request at the beginning of next week but still can make it for 3.19?
Just send the pull request whenever you have it ready. If some bug shows up, reply to that mail with an updated pull request.
Quoted 4 lines
(BTW, in the meantime, there is a pending pull-request (at91-cleanup3) but it is true that you needn't pulling it in if you plan to take this one which will be named at91-cleanup4 and that will obviously contain the 3rd one).
Yes, I have a backlog of pull requests to look at, should get to that soon today.
Arnd
Quoted 34 lines · Arnd Bergmann
Quoted 33 lines · On Friday 28 November 2014 10:36:09 Nicolas Ferre wrote:
Quoted 17 lines · Arnd Bergmann
Quoted 16 lines · On Thursday 27 November 2014 18:12:43 Alexandre Belloni wrote:
Quoted 15 lines · Arnd Bergmann
Quoted 11 lines · On Thursday 27 November 2014 17:06:28 Nicolas Ferre wrote:
This is the last series of patches that removes the non-Device-Tree board support for older Atmel SoCs.
Again, for the record, it was announced here
https://lkml.org/lkml/2014/9/10/293 ([ANNOUNCE] ARM: at91: removal of board files) two months ago.
Several files beyond at91rm9200 are touched this time as I tried to remove the biggest parts that were related to !DT SoC initializations. More cleanup is certainly needed to remove dead code.The diffstat is also pretty big as a lot of at91rm9200 boards were remaining.
Awesome stuff!
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Two questions:
- is anything holding this up from getting merged in 3.19?
If you think this is not too late in the cycle, I would say go ahead
I'd say we should do it, unless there are last-minute regressions.
Arnd,
I am totally in favor for a merge into 3.19.
I wanted to wait one day or two but given that the official announce had been made several months ago, I don't think it makes a big difference.
Quoted 8 lines
Quoted 5 lines
So, what do you prefer:
1/ I wait today and send you the pull-request this evening (our time) 2/ I send you the pull-request at the beginning of next week but still can make it for 3.19?
Just send the pull request whenever you have it ready. If some bug shows up, reply to that mail with an updated pull request.
Okay, I do it right now then.
Thanks Arnd.
Quoted 11 lines
Quoted 4 lines
(BTW, in the meantime, there is a pending pull-request (at91-cleanup3) but it is true that you needn't pulling it in if you plan to take this one which will be named at91-cleanup4 and that will obviously contain the 3rd one).
Yes, I have a backlog of pull requests to look at, should get to that soon today.
Arnd
Signature · 1 line
Nicolas Ferre
Quoted 4 lines · On Thursday 27 November 2014 18:12:43 Alexandre Belloni wrote:
As discussed some weeks ago, I prepared patches to switch sama5d[3-4] to multiplatform. We are still missing the SMC and matrix drivers to switch sam9 and rm9200.
I just looked at the drivers because I got curious, and to see if there are still any low-hanging fruit, but I guess you already picked them all ;-)
Quoted 3 lines
The currently affected drivers are:
-drivers/ata/pata_at91.c(SMC)
-drivers/pcmcia/at91_cf.c(SMC)
I guess the SMC should live in drivers/memory with an interface similar to mvebu-devbus.c?
Seems doable but nontrivial.
Quoted 2 lines
-
drivers/usb/gadget/udc/at91_udc.c(Matrix, this is the only one for sam9)
Is at91_matrix a pin controller? With the board files removed, the udc driver has the only two remaining calls to at91_matrix_{read,write} for setting the pullup, so that could be modeled as a trivial pinctrl driver
Quoted 1 line
-
sound/atmel/ac97c.c(that one is still not converted to DT anyway...)
This one seems fairly straightforward to do, including a DT binding, but the result is still ugly as it supports the at32 chips that do things very differently.
The patch below gets it to compile and should be enough as a replacement once a compatible string gets added.
Quoted 2 lines
-
drivers/watchdog/at91rm9200_wdt.c(WIP, will be converted properly to an MFD)
I think we discussed this one before. Remind me why we can't just convert it to use watchdog_register() for simplification and then move whatever remains into the arch/arm/mach-at91/at91rm9200_time.c file, or both into drivers/clocksource.
Arnd
8<----
ASoC: atmel/ac97c: remove platform_data dependency
As at91 gets changed to multiplatform, we can't use the mach/cpu.h header any more, but this is ok as it only gets used to check for cpu_is_at32ap7000(), which arch/avr32.
In order to make the driver work without platform_data, this also changes the reset gpio line handling so it can look up the gpio descriptor from DT. It is still missing a compatible string and a binding that describes the valid DT properties.
sound/atmel/ac97c.c +15 -19
@@ -34,10 +34,10 @@#include <linux/platform_data/dma-dw.h> #include <linux/dma/dw.h> +#ifdef CONFIG_AVR32 #include <mach/cpu.h> - -#ifdef CONFIG_ARCH_AT91 -#include <mach/hardware.h> +#else +#define cpu_is_at32ap7000 () (0)#endif #include "ac97c.h"
@@ -78,7 +78,7 @@ struct atmel_ac97c {void __iomem *regs;int irq;int opened; -int reset_pin; +struct gpio_desc *reset_pin; };#define get_chip (card) ((struct atmel_ac97c *)(card)->private_data)
@@ -890,11 +890,11 @@ static void atmel_ac97c_reset(struct atmel_ac97c *chip)ac97c_writel (chip,CAMR ,0 );ac97c_writel (chip,COMR ,0 ); -if (gpio_is_valid (chip->reset_pin)) { -gpio_set_value (chip->reset_pin,0 ); +if (chip->reset_pin) { +gpiod_set_value (chip->reset_pin,0 );/* AC97 v2.2 specifications says minimum 1 us. */ udelay (2 ); -gpio_set_value (chip->reset_pin,1 ); +gpiod_set_value (chip->reset_pin,1 ); }else {ac97c_writel (chip,MR ,AC97C_MR_WRST |AC97C_MR_ENA );udelay (2 );
@@ -923,7 +923,7 @@ static int atmel_ac97c_probe(struct platform_device *pdev) } pdata = pdev->dev.platform_data; -if (!pdata) { +if (cpu_is_at32ap7000 () && !pdata) {dev_dbg (&pdev->dev,"no platform data\n" );return -ENXIO ; }
@@ -980,16 +980,18 @@ static int atmel_ac97c_probe(struct platform_device *pdev) goto err_ioremap; } -if (gpio_is_valid (pdata->reset_pin)) { -if (gpio_request (pdata->reset_pin,"reset_pin" )) { +if (pdata &&gpio_is_valid (pdata->reset_pin)) { +if (devm_gpio_request (&pdev->dev, pdata->reset_pin,"reset" )) {dev_dbg (&pdev->dev,"reset pin not available\n" ); - chip->reset_pin = -ENODEV ; + chip->reset_pin =NULL ; }else {gpio_direction_output (pdata->reset_pin,1 ); - chip->reset_pin = pdata->reset_pin; + chip->reset_pin =gpio_to_desc (pdata->reset_pin); } }else { - chip->reset_pin = -EINVAL ; + chip->reset_pin =devm_gpiod_get (&pdev->dev,"reset" ,0 ); +if (IS_ERR (chip->reset_pin)) + chip->reset_pin =NULL ; }atmel_ac97c_reset (chip);
@@ -1113,9 +1115,6 @@ err_dma: chip->dma.tx_chan =NULL ; } err_ac97_bus: -if (gpio_is_valid (chip->reset_pin)) -gpio_free (chip->reset_pin); -iounmap (chip->regs); err_ioremap:free_irq (irq, chip);
@@ -1170,9 +1169,6 @@ static int atmel_ac97c_remove(struct platform_device *pdev)struct snd_card *card =platform_get_drvdata (pdev);struct atmel_ac97c *chip =get_chip (card); -if (gpio_is_valid (chip->reset_pin)) -gpio_free (chip->reset_pin); -ac97c_writel (chip,CAMR ,0 );ac97c_writel (chip,COMR ,0 );ac97c_writel (chip,MR ,0 );
Hi Arnd,
Quoted 10 lines · On Fri, 28 Nov 2014 00:12:25 +0100 Arnd Bergmann <[email protected]> wrote:
Quoted 4 lines · On Thursday 27 November 2014 18:12:43 Alexandre Belloni wrote:
As discussed some weeks ago, I prepared patches to switch sama5d[3-4] to multiplatform. We are still missing the SMC and matrix drivers to switch sam9 and rm9200.
I just looked at the drivers because I got curious, and to see if there are still any low-hanging fruit, but I guess you already picked them all ;-)
Quoted 6 lines
Quoted 3 lines
The currently affected drivers are:
-drivers/ata/pata_at91.c(SMC)
-drivers/pcmcia/at91_cf.c(SMC)I guess the SMC should live in
drivers/memorywith an interface similar tomvebu-devbus.c?
Actually, there's some work in progress to support the EBI/SMC blocks as a memory controller driver ;-):
http://thread.gmane.org/gmane.linux.kernel/1822096
I'll post a new version soon.
Quoted 10 lines
Seems doable but nontrivial.
Quoted 2 lines
-
drivers/usb/gadget/udc/at91_udc.c(Matrix, this is the only one for sam9)Is
at91_matrixa pin controller? With the board files removed, the udc driver has the only two remaining calls to at91_matrix_{read,write} for setting the pullup, so that could be modeled as a trivial pinctrl driver
The matrix block is containing several system configuration registers. Most of them are related to AHB/APB bus config (master <-> slave priority, burst and some other configs I don't remember). Another register is here to define which HW logic is attached to an external device connected through the EBI (External Bus Interface):
NAND, SDRAM, CompactFlash, ...
And, as you pointed out, there's a register to configure the pullup of the UDC device.
As you can see, the matrix registers might be accessed by different drivers (include the EBI/SMC driver), hence I proposed to expose them as a syscon device (see the EBI/SMC series).
Best Regards,
Boris
Signature · 3 lines
Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
Quoted 22 lines · On Friday 28 November 2014 00:39:38 Boris Brezillon wrote:
Hi Arnd,
Quoted 10 lines · On Fri, 28 Nov 2014 00:12:25 +0100 Arnd Bergmann <[email protected]> wrote:
Quoted 4 lines · On Thursday 27 November 2014 18:12:43 Alexandre Belloni wrote:
As discussed some weeks ago, I prepared patches to switch sama5d[3-4] to multiplatform. We are still missing the SMC and matrix drivers to switch sam9 and rm9200.
I just looked at the drivers because I got curious, and to see if there are still any low-hanging fruit, but I guess you already picked them all
Quoted 6 lines
Quoted 3 lines
The currently affected drivers are:
-drivers/ata/pata_at91.c(SMC)
-drivers/pcmcia/at91_cf.c(SMC)I guess the SMC should live in
drivers/memorywith an interface similar tomvebu-devbus.c?
Quoted 6 lines
Actually, there's some work in progress to support the EBI/SMC blocks as a memory controller driver ;-):
http://thread.gmane.org/gmane.linux.kernel/1822096
I'll post a new version soon.
Ok, cool.
Quoted 20 lines
Quoted 10 lines
Seems doable but nontrivial.
Quoted 2 lines
-
drivers/usb/gadget/udc/at91_udc.c(Matrix, this is the only one for sam9)Is
at91_matrixa pin controller? With the board files removed, the udc driver has the only two remaining calls to at91_matrix_{read,write} for setting the pullup, so that could be modeled as a trivial pinctrl driverThe matrix block is containing several system configuration registers. Most of them are related to AHB/APB bus config (master <-> slave priority, burst and some other configs I don't remember). Another register is here to define which HW logic is attached to an external device connected through the EBI (External Bus Interface):
NAND, SDRAM, CompactFlash, ...
And, as you pointed out, there's a register to configure the pullup of the UDC device.
Quoted 4 lines
As you can see, the matrix registers might be accessed by different drivers (include the EBI/SMC driver), hence I proposed to expose them as a syscon device (see the EBI/SMC series).
Sounds good.
Arnd
Quoted 9 lines · Arnd Bergmann
Quoted 4 lines · On Thursday 27 November 2014 18:12:43 Alexandre Belloni wrote:
As discussed some weeks ago, I prepared patches to switch sama5d[3-4] to multiplatform. We are still missing the SMC and matrix drivers to switch sam9 and rm9200.
I just looked at the drivers because I got curious, and to see if there are still any low-hanging fruit, but I guess you already picked them all ;-)
Yeah, my main goal was to test multiplatform on sama5d3 and it was actually quite easy. The worst still being rm9200 ;)
Quoted 10 lines
Quoted 2 lines
-
sound/atmel/ac97c.c(that one is still not converted to DT anyway...)This one seems fairly straightforward to do, including a DT binding, but the result is still ugly as it supports the at32 chips that do things very differently.
The patch below gets it to compile and should be enough as a replacement once a compatible string gets added.
Actually, some work was done but we never saw an other version of the series. Alexander, are you still interested? Else we can take the patch below.
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-April/246679.html
Quoted 8 lines
Quoted 2 lines
-
drivers/watchdog/at91rm9200_wdt.c(WIP, will be converted properly to an MFD)I think we discussed this one before. Remind me why we can't just convert it to use
watchdog_register()for simplification and then move whatever remains into thearch/arm/mach-at91/at91rm9200_time.cfile, or both intodrivers/clocksource.
Yeah, the new plan is to merge the watchdog with at91rm9200_time.c and move it either to drivers/clocksource or make an mfd. I believe the former would be easier.
Quoted 112 lines
Arnd
8<----
ASoC: atmel/ac97c: removeplatform_datadependencyAs at91 gets changed to multiplatform, we can't use the
mach/cpu.hheader any more, but this is ok as it only gets used to check forcpu_is_at32ap7000(), whicharch/avr32.In order to make the driver work without
platform_data, this also changes the reset gpio line handling so it can look up the gpio descriptor from DT. It is still missing a compatible string and a binding that describes the valid DT properties.Signed-off-by Arnd Bergmann <[email protected]>sound/atmel/ac97c.c +15
-19@@ -34,10 +34,10 @@#include <linux/platform_data/dma-dw.h> #include <linux/dma/dw.h> +#ifdef CONFIG_AVR32 #include <mach/cpu.h> - -#ifdef CONFIG_ARCH_AT91 -#include <mach/hardware.h> +#else +#define cpu_is_at32ap7000 () (0)#endif #include "ac97c.h" @@ -78,7 +78,7 @@ struct atmel_ac97c {void __iomem *regs;int irq;int opened; -int reset_pin; +struct gpio_desc *reset_pin; };#define get_chip (card) ((struct atmel_ac97c *)(card)->private_data)@@ -890,11 +890,11 @@ static void atmel_ac97c_reset(struct atmel_ac97c *chip)ac97c_writel (chip,CAMR ,0 );ac97c_writel (chip,COMR ,0 ); -if (gpio_is_valid (chip->reset_pin)) { -gpio_set_value (chip->reset_pin,0 ); +if (chip->reset_pin) { +gpiod_set_value (chip->reset_pin,0 );/* AC97 v2.2 specifications says minimum 1 us. */ udelay (2 ); -gpio_set_value (chip->reset_pin,1 ); +gpiod_set_value (chip->reset_pin,1 ); }else {ac97c_writel (chip,MR ,AC97C_MR_WRST |AC97C_MR_ENA );udelay (2 );@@ -923,7 +923,7 @@ static int atmel_ac97c_probe(struct platform_device *pdev) } pdata = pdev->dev.platform_data; -if (!pdata) { +if (cpu_is_at32ap7000 () && !pdata) {dev_dbg (&pdev->dev,"no platform data\n" );return -ENXIO ; }@@ -980,16 +980,18 @@ static int atmel_ac97c_probe(struct platform_device *pdev) goto err_ioremap; } -if (gpio_is_valid (pdata->reset_pin)) { -if (gpio_request (pdata->reset_pin,"reset_pin" )) { +if (pdata &&gpio_is_valid (pdata->reset_pin)) { +if (devm_gpio_request (&pdev->dev, pdata->reset_pin,"reset" )) {dev_dbg (&pdev->dev,"reset pin not available\n" ); - chip->reset_pin = -ENODEV ; + chip->reset_pin =NULL ; }else {gpio_direction_output (pdata->reset_pin,1 ); - chip->reset_pin = pdata->reset_pin; + chip->reset_pin =gpio_to_desc (pdata->reset_pin); } }else { - chip->reset_pin = -EINVAL ; + chip->reset_pin =devm_gpiod_get (&pdev->dev,"reset" ,0 ); +if (IS_ERR (chip->reset_pin)) + chip->reset_pin =NULL ; }atmel_ac97c_reset (chip);@@ -1113,9 +1115,6 @@ err_dma: chip->dma.tx_chan =NULL ; } err_ac97_bus: -if (gpio_is_valid (chip->reset_pin)) -gpio_free (chip->reset_pin); -iounmap (chip->regs); err_ioremap:free_irq (irq, chip);@@ -1170,9 +1169,6 @@ static int atmel_ac97c_remove(struct platform_device *pdev)struct snd_card *card =platform_get_drvdata (pdev);struct atmel_ac97c *chip =get_chip (card); -if (gpio_is_valid (chip->reset_pin)) -gpio_free (chip->reset_pin); -ac97c_writel (chip,CAMR ,0 );ac97c_writel (chip,COMR ,0 );ac97c_writel (chip,MR ,0 );
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Hi Alexandre,
On Friday 28 November 2014, 01:28:22 wrote Alexandre Belloni:
Quoted 10 lines
Quoted 9 lines
Quoted 1 line
-
sound/atmel/ac97c.c(that one is still not converted to DT anyway...)This one seems fairly straightforward to do, including a DT binding, but the result is still ugly as it supports the at32 chips that do things very differently.
The patch below gets it to compile and should be enough as a replacement once a compatible string gets added.
Quoted 5 lines
Actually, some work was done but we never saw an other version of the series. Alexander, are you still interested? Else we can take the patch below.
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-April/246679.html
Well, I tried to get a ac97c driver based on alsa soc framework as suggested by Takashi. But I failed so far, I could not get my head around those architecture.
When keeping my DT support on the current driver, the only thing which is open that the bindings should be modifed that they are like soc-ac97link bindings. I could work on that, but I currently don't know when I can get access again to that hardware for testing.
Best regards,
Alexander
Quoted 18 lines · On Friday 28 November 2014 09:27:38 Alexander Stein wrote:
Hi Alexandre,
On Friday 28 November 2014, 01:28:22 wrote Alexandre Belloni:
Quoted 15 lines
Quoted 9 lines
Quoted 1 line
-
sound/atmel/ac97c.c(that one is still not converted to DT anyway...)This one seems fairly straightforward to do, including a DT binding, but the result is still ugly as it supports the at32 chips that do things very differently.
The patch below gets it to compile and should be enough as a replacement once a compatible string gets added.
Actually, some work was done but we never saw an other version of the series. Alexander, are you still interested? Else we can take the patch below.
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-April/246679.html
I see. Yes, the approach is similar, and there are actually multiple independent problems:
- getting the current driver to build with multiplatform (trivial, 5 lines)
- changing the gpio handling to work with DT (simple, both of us did that)
- writing the binding (simple)
- changing the driver to ASoC (not that simple)
Quoted 3 lines
Well, I tried to get a ac97c driver based on alsa soc framework as suggested by Takashi. But I failed so far, I could not get my head around those architecture.
Let's just start with the trivial first patch, that can probably just be merged into 3.19, and then we can build on top of that later if anybody wants to get ac97 working again on at91.
Quoted 2 lines
When keeping my DT support on the current driver, the only thing which is open that the bindings should be modifed that they are like soc-ac97link bindings.
Makes sense, if that binding works on the at91 hardware. I'm not sure whether the pinctrl stuff or the first two gpio lines apply though.
Arnd
8<---
ALSA: atmel: fix building the ac97 driver for at91-multiplatform
at91 will no longer export the mach/cpu.h and mach/hardware.h header files in the future, which would break building the atmel ac97c driver.
Since the cpu_is_* check is only used to find out whether we are running on avr32 or arm/at91, we can hardcode that check in the ARM case.
Unfortunately the driver is missing other work to be useful again on ARM, if anyone wants to actually use it, they need to add a DT binding, and the driver should really be converted to use the ASoC framework.
sound/atmel/ac97c.c +3 -3
@@ -34,10 +34,10 @@#include <linux/platform_data/dma-dw.h> #include <linux/dma/dw.h> +#ifdef CONFIG_AVR32 #include <mach/cpu.h> - -#ifdef CONFIG_ARCH_AT91 -#include <mach/hardware.h> +#else +#define cpu_is_at32ap7000 () (0)#endif #include "ac97c.h"
Quoted 4 lines · Arnd Bergmann
Quoted 4 lines
Quoted 4 lines
Actually, some work was done but we never saw an other version of the series. Alexander, are you still interested? Else we can take the patch below.
Quoted 8 lines
Quoted 1 line
I see. Yes, the approach is similar, and there are actually multiple independent problems:
- getting the current driver to build with multiplatform (trivial, 5 lines)
- changing the gpio handling to work with DT (simple, both of us did that)
- writing the binding (simple)
Yeah, let's focus on those first steps. Takashi was willing to take patches, even if we were not converting the driver to ASoC.
Quoted 10 lines
- changing the driver to ASoC (not that simple)
Quoted 3 lines
Well, I tried to get a ac97c driver based on alsa soc framework as suggested by Takashi. But I failed so far, I could not get my head around those architecture.
Let's just start with the trivial first patch, that can probably just be merged into 3.19, and then we can build on top of that later if anybody wants to get ac97 working again on at91.
Do you want one of us to send that patch to Takashi and the Alsa ML or will you do it?
You can add my ack.
Quoted 43 lines
Quoted 2 lines
When keeping my DT support on the current driver, the only thing which is open that the bindings should be modifed that they are like soc-ac97link bindings.
Makes sense, if that binding works on the at91 hardware. I'm not sure whether the pinctrl stuff or the first two gpio lines apply though.
Arnd
8<---
ALSA: atmel: fix building the ac97 driver for at91-multiplatformat91 will no longer export the
mach/cpu.handmach/hardware.hheader files in the future, which would break building the atmel ac97c driver.Since the cpu_is_* check is only used to find out whether we are running on avr32 or arm/at91, we can hardcode that check in the ARM case.
Unfortunately the driver is missing other work to be useful again on ARM, if anyone wants to actually use it, they need to add a DT binding, and the driver should really be converted to use the ASoC framework.
Signed-off-by Arnd Bergmann <[email protected]>sound/atmel/ac97c.c +3
-3@@ -34,10 +34,10 @@#include <linux/platform_data/dma-dw.h> #include <linux/dma/dw.h> +#ifdef CONFIG_AVR32 #include <mach/cpu.h> - -#ifdef CONFIG_ARCH_AT91 -#include <mach/hardware.h> +#else +#define cpu_is_at32ap7000 () (0)#endif #include "ac97c.h"
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Quoted 23 lines · On Friday 28 November 2014 12:31:12 Alexandre Belloni wrote:
Quoted 4 lines · Arnd Bergmann
Quoted 4 lines
Quoted 4 lines
Actually, some work was done but we never saw an other version of the series. Alexander, are you still interested? Else we can take the patch below.
Quoted 8 lines
Quoted 1 line
I see. Yes, the approach is similar, and there are actually multiple independent problems:
- getting the current driver to build with multiplatform (trivial, 5 lines)
- changing the gpio handling to work with DT (simple, both of us did that)
- writing the binding (simple)Yeah, let's focus on those first steps. Takashi was willing to take patches, even if we were not converting the driver to ASoC.
Quoted 6 lines
- changing the driver to ASoC (not that simple)
Quoted 3 lines
Well, I tried to get a ac97c driver based on alsa soc framework as suggested by Takashi. But I failed so far, I could not get my head around those architecture.
Quoted 8 lines
Quoted 4 lines
Let's just start with the trivial first patch, that can probably just be merged into 3.19, and then we can build on top of that later if anybody wants to get ac97 working again on at91.
Do you want one of us to send that patch to Takashi and the Alsa ML or will you do it?
You can add my ack.
Please send it after you have checked that it actually works, I only took a snippet from my earlier patch assuming it would be sufficient, but I didn't try.
Arnd
Quoted 9 lines · On Thu, 27 Nov 2014 17:06:28 +0100 Nicolas Ferre <[email protected]>…
This is the last series of patches that removes the non-Device-Tree board support for older Atmel SoCs.
Again, for the record, it was announced here
https://lkml.org/lkml/2014/9/10/293 ([ANNOUNCE] ARM: at91: removal of board files) two months ago.
Several files beyond at91rm9200 are touched this time as I tried to remove the biggest parts that were related to !DT SoC initializations. More cleanup is certainly needed to remove dead code.
Quoted 3 lines
The diffstat is also pretty big as a lot of at91rm9200 boards were remaining.
Bye,
On whole series:
Quoted 71 lines
Nicolas Ferre (11):
ARM: at91: remove at91rm9200 legacy boards files
ARM: at91: remove at91rm9200 legacy board support
ARM: at91: switch configuration option toSOC_AT91RM9200
ARM: at91/Kconfig: removeARCH_AT91RM9200option for drivers
ARM: at91: alwaysUSE_OFfrom now on
ARM: at91/trivial: updateKconfigcomment to mention SAMA5
ARM: at91: remove all !DT related configuration options
ARM: at91: remove clock data inat91sam9n12.candat91sam9x5.cfiles
ARM: at91: remove old at91-specific clock driver
ARM: at91: remove legacy IRQ driver and related code
ARM: at91: remove unused IRQ function declarationsarch/arm/Kconfig | 5 +- arch/arm/configs/at91rm9200_defconfig | 161 ---- arch/arm/mach-at91/Kconfig | 34 +- arch/arm/mach-at91/Kconfig.non_dt | 114 --- arch/arm/mach-at91/Makefile | 19 - arch/arm/mach-at91/at91_aic.h | 99 --- arch/arm/mach-at91/at91rm9200.c | 341 --------- arch/arm/mach-at91/at91rm9200_devices.c | 1212 ------------------------------- arch/arm/mach-at91/at91sam9n12.c | 213 +----- arch/arm/mach-at91/at91sam9x5.c | 311 +------- arch/arm/mach-at91/board-1arm.c | 99 --- arch/arm/mach-at91/board-carmeva.c | 167 ----- arch/arm/mach-at91/board-cpuat91.c | 189 ----- arch/arm/mach-at91/board-csb337.c | 260 ------- arch/arm/mach-at91/board-csb637.c | 142 ---- arch/arm/mach-at91/board-dt-rm9200.c | 1 - arch/arm/mach-at91/board-dt-sam9.c | 1 - arch/arm/mach-at91/board-dt-sama5.c | 1 - arch/arm/mach-at91/board-eb9200.c | 126 ---- arch/arm/mach-at91/board-ecbat91.c | 191 ----- arch/arm/mach-at91/board-eco920.c | 160 ---- arch/arm/mach-at91/board-kafa.c | 113 --- arch/arm/mach-at91/board-kb9202.c | 159 ---- arch/arm/mach-at91/board-picotux200.c | 129 ---- arch/arm/mach-at91/board-rm9200ek.c | 196 ----- arch/arm/mach-at91/board-yl-9200.c | 597 --------------- arch/arm/mach-at91/clock.c | 977 ------------------------- arch/arm/mach-at91/clock.h | 49 -- arch/arm/mach-at91/generic.h | 17 - arch/arm/mach-at91/irq.c | 296 -------- arch/arm/mach-at91/pm.c | 22 - arch/arm/mach-at91/setup.c | 13 - drivers/net/ethernet/cadence/Kconfig | 2 +- drivers/rtc/Kconfig | 2 +- drivers/watchdog/Kconfig | 4 +- 35 files changed, 19 insertions(+), 6403 deletions(-) delete mode 100644 arch/arm/configs/at91rm9200_defconfig delete mode 100644 arch/arm/mach-at91/Kconfig.non_dt delete mode 100644 arch/arm/mach-at91/at91_aic.h delete mode 100644 arch/arm/mach-at91/at91rm9200_devices.c delete mode 100644 arch/arm/mach-at91/board-1arm.c delete mode 100644 arch/arm/mach-at91/board-carmeva.c delete mode 100644 arch/arm/mach-at91/board-cpuat91.c delete mode 100644 arch/arm/mach-at91/board-csb337.c delete mode 100644 arch/arm/mach-at91/board-csb637.c delete mode 100644 arch/arm/mach-at91/board-eb9200.c delete mode 100644 arch/arm/mach-at91/board-ecbat91.c delete mode 100644 arch/arm/mach-at91/board-eco920.c delete mode 100644 arch/arm/mach-at91/board-kafa.c delete mode 100644 arch/arm/mach-at91/board-kb9202.c delete mode 100644 arch/arm/mach-at91/board-picotux200.c delete mode 100644 arch/arm/mach-at91/board-rm9200ek.c delete mode 100644 arch/arm/mach-at91/board-yl-9200.c delete mode 100644 arch/arm/mach-at91/clock.c delete mode 100644 arch/arm/mach-at91/clock.h delete mode 100644 arch/arm/mach-at91/irq.c
Signature · 3 lines
Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com