ARM: EXYNOS: Change System MMU platform device definitions
Subsystems (3)
PATCH v12 2/3 ARM: EXYNOS: Change System MMU platform device definitions
Handling System MMUs with an identifier is not flexible to manage System MMU platform devices because of the following reasons:
1. A device driver which needs to handle System MMU must know the ID.
2. A System MMU may not present in some implementations of Exynos family.
3. Handling System MMU with IOMMU API does not require an ID.
This patch is the result of removing ID of System MMUs. Instead, a device driver that needs to handle its System MMU must use IOMMU API while its descriptor of platform device is given.
This patch also includes the following enhancements:
- A System MMU device becomes a child if its power domain device.
- clkdev
--- arch/arm/mach-exynos/Kconfig | 10 +- arch/arm/mach-exynos/Makefile | 2 +- arch/arm/mach-exynos/clock-exynos4.c | 79 ++-- arch/arm/mach-exynos/clock-exynos4.h | 2 + arch/arm/mach-exynos/clock-exynos4210.c | 11 + arch/arm/mach-exynos/clock-exynos4212.c | 28 ++- arch/arm/mach-exynos/clock-exynos5.c | 90 +++++ arch/arm/mach-exynos/dev-sysmmu.c | 457 ++++++++++++---------- arch/arm/mach-exynos/include/mach/irqs.h | 25 +- arch/arm/mach-exynos/include/mach/map.h | 38 ++ arch/arm/mach-exynos/include/mach/regs-clock.h | 5 + arch/arm/mach-exynos/include/mach/regs-sysmmu.h | 28 -- arch/arm/mach-exynos/include/mach/sysmmu.h | 88 +++-- arch/arm/mach-exynos/mach-armlex4210.c | 1 - arch/arm/mach-exynos/mach-smdkv310.c | 1 - 15 files changed, 529 insertions(+), 336 deletions(-) delete mode 100644 arch/arm/mach-exynos/include/mach/regs-sysmmu.h
arch/arm/mach-exynos/Kconfig +6 -4
@@ -85,10 +85,10 @@ config EXYNOS4_SETUP_FIMD0 help Common setup code for FIMD0. -config EXYNOS4_DEV_SYSMMU +config EXYNOS_DEV_SYSMMU bool help - Common setup code for SYSTEM MMU in EXYNOS4 + Common setup code for SYSTEM MMU in EXYNOS platforms config EXYNOS4_DEV_DWMCI bool
@@ -200,12 +200,12 @@ config MACH_SMDKV310 select S3C_DEV_HSMMC2 select S3C_DEV_HSMMC3 select SAMSUNG_DEV_BACKLIGHT + select EXYNOS_DEV_SYSMMU select EXYNOS4_DEV_AHCI select SAMSUNG_DEV_KEYPAD select EXYNOS4_DEV_DMA select SAMSUNG_DEV_PWM select EXYNOS4_DEV_USB_OHCI - select EXYNOS4_DEV_SYSMMU select EXYNOS4_SETUP_FIMD0 select EXYNOS4_SETUP_I2C1 select EXYNOS4_SETUP_KEYPAD
@@ -224,7 +224,6 @@ config MACH_ARMLEX4210 select S3C_DEV_HSMMC3 select EXYNOS4_DEV_AHCI select EXYNOS4_DEV_DMA - select EXYNOS4_DEV_SYSMMU select EXYNOS4_SETUP_SDHCI help Machine support for Samsung ARMLEX4210 based on EXYNOS4210
@@ -251,6 +250,7 @@ config MACH_UNIVERSAL_C210 select S5P_DEV_MFC select S5P_DEV_ONENAND select S5P_DEV_TV + select EXYNOS_DEV_SYSMMU select EXYNOS4_DEV_DMA select EXYNOS4_SETUP_FIMD0 select EXYNOS4_SETUP_I2C1
@@ -322,6 +322,7 @@ config MACH_ORIGEN select S5P_DEV_USB_EHCI select SAMSUNG_DEV_BACKLIGHT select SAMSUNG_DEV_PWM + select EXYNOS_DEV_SYSMMU select EXYNOS4_DEV_DMA select EXYNOS4_DEV_USB_OHCI select EXYNOS4_SETUP_FIMD0
@@ -345,6 +346,7 @@ config MACH_SMDK4212 select SAMSUNG_DEV_BACKLIGHT select SAMSUNG_DEV_KEYPAD select SAMSUNG_DEV_PWM + select EXYNOS_DEV_SYSMMU select EXYNOS4_DEV_DMA select EXYNOS4_SETUP_I2C1 select EXYNOS4_SETUP_I2C3
arch/arm/mach-exynos/Makefile +1 -1
@@ -50,7 +50,7 @@ obj-$(CONFIG_MACH_EXYNOS5_DT) += mach-exynos5-dt.o obj-y += dev-uart.o obj-$(CONFIG_ARCH_EXYNOS4) += dev-audio.o obj-$(CONFIG_EXYNOS4_DEV_AHCI) += dev-ahci.o -obj-$(CONFIG_EXYNOS4_DEV_SYSMMU) += dev-sysmmu.o +obj-$(CONFIG_EXYNOS_DEV_SYSMMU) += dev-sysmmu.o obj-$(CONFIG_EXYNOS4_DEV_DWMCI) += dev-dwmci.o obj-$(CONFIG_EXYNOS4_DEV_DMA) += dma.o obj-$(CONFIG_EXYNOS4_DEV_USB_OHCI) += dev-ohci.o
arch/arm/mach-exynos/clock-exynos4.c +39 -40
113 lines not on this page · raw message
arch/arm/mach-exynos/clock-exynos4.h +2 -0
@@ -26,5 +26,7 @@ extern struct clk *exynos4_clkset_group_list[];extern int exynos4_clksrc_mask_fsys_ctrl (struct clk *clk,int enable);extern int exynos4_clk_ip_fsys_ctrl (struct clk *clk,int enable);extern int exynos4_clk_ip_lcd1_ctrl (struct clk *clk,int enable); +extern int exynos4_clk_ip_image_ctrl (struct clk *clk,int enable); +extern int exynos4_clk_ip_dmc_ctrl (struct clk *clk,int enable);#endif /* __ASM_ARCH_CLOCK_H */
arch/arm/mach-exynos/clock-exynos4210.c +11 -0
@@ -26,6 +26,7 @@#include <mach/hardware.h> #include <mach/map.h> #include <mach/regs-clock.h> +#include <mach/sysmmu.h> #include "common.h" #include "clock-exynos4.h"
@@ -94,6 +95,16 @@ static struct clk init_clocks_off[] = { .devname = "exynos4-fb.1", .enable = exynos4_clk_ip_lcd1_ctrl, .ctrlbit = (1 << 0), + }, { + .name = SYSMMU_CLOCK_NAME, + .devname = SYSMMU_CLOCK_DEVNAME(2d, 14), + .enable = exynos4_clk_ip_image_ctrl, + .ctrlbit = (1 << 3), + }, { + .name = SYSMMU_CLOCK_NAME, + .devname = SYSMMU_CLOCK_DEVNAME(fimd1, 11), + .enable = exynos4_clk_ip_lcd1_ctrl, + .ctrlbit = (1 << 4), }, };
arch/arm/mach-exynos/clock-exynos4212.c +27 -1
@@ -26,6 +26,7 @@#include <mach/hardware.h> #include <mach/map.h> #include <mach/regs-clock.h> +#include <mach/sysmmu.h> #include "common.h" #include "clock-exynos4.h"
@@ -39,6 +40,16 @@ static struct sleep_save exynos4212_clock_save[] = { };#endif +static int exynos4212_clk_ip_isp0_ctrl (struct clk *clk,int enable) +{ +return s5p_gatectrl (EXYNOS4_CLKGATE_IP_ISP0 , clk, enable); +} + +static int exynos4212_clk_ip_isp1_ctrl (struct clk *clk,int enable) +{ +return s5p_gatectrl (EXYNOS4_CLKGATE_IP_ISP1 , clk, enable); +} +static struct clk *clk_src_mpll_user_list[] = { [0 ] = &clk_fin_mpll, [1 ] = &exynos4_clk_mout_mpll.clk,
@@ -66,7 +77,22 @@ static struct clksrc_clk clksrcs[] = { };static struct clk init_clocks_off[] = { -/* nothing here yet */ + { + .name =SYSMMU_CLOCK_NAME , + .devname =SYSMMU_CLOCK_DEVNAME (2d ,14 ), + .enable = exynos4_clk_ip_dmc_ctrl, + .ctrlbit = (1 <<24 ), + }, { + .name =SYSMMU_CLOCK_NAME , + .devname =SYSMMU_CLOCK_DEVNAME (isp,9 ), + .enable = exynos4212_clk_ip_isp0_ctrl, + .ctrlbit = (7 <<8 ), + }, { + .name =SYSMMU_CLOCK_NAME2 , + .devname =SYSMMU_CLOCK_DEVNAME (isp,9 ), + .enable = exynos4212_clk_ip_isp1_ctrl, + .ctrlbit = (1 <<4 ), + } };#ifdef CONFIG_PM_SLEEP
arch/arm/mach-exynos/clock-exynos5.c +90 -0
108 lines not on this page · raw message
arch/arm/mach-exynos/dev-sysmmu.c +249 -208
480 lines not on this page · raw message
arch/arm/mach-exynos/include/mach/irqs.h +7 -18
@@ -154,6 +154,13 @@#define EXYNOS4_IRQ_SYSMMU_MFC_M1_0 COMBINER_IRQ(5, 6)#define EXYNOS4_IRQ_SYSMMU_PCIE_0 COMBINER_IRQ(5, 7) +#define EXYNOS4_IRQ_SYSMMU_FIMC_LITE0_0 COMBINER_IRQ(16, 0) +#define EXYNOS4_IRQ_SYSMMU_FIMC_LITE1_0 COMBINER_IRQ(16, 1) +#define EXYNOS4_IRQ_SYSMMU_FIMC_ISP_0 COMBINER_IRQ(16, 2) +#define EXYNOS4_IRQ_SYSMMU_FIMC_DRC_0 COMBINER_IRQ(16, 3) +#define EXYNOS4_IRQ_SYSMMU_FIMC_FD_0 COMBINER_IRQ(16, 4) +#define EXYNOS4_IRQ_SYSMMU_FIMC_CX_0 COMBINER_IRQ(16, 5) +#define EXYNOS4_IRQ_FIMD0_FIFO COMBINER_IRQ(11, 0)#define EXYNOS4_IRQ_FIMD0_VSYNC COMBINER_IRQ(11, 1)#define EXYNOS4_IRQ_FIMD0_SYSTEM COMBINER_IRQ(11, 2)
@@ -218,24 +225,6 @@#define IRQ_KEYPAD EXYNOS4_IRQ_KEYPAD#define IRQ_PMU EXYNOS4_IRQ_PMU -#define IRQ_SYSMMU_MDMA0_0 EXYNOS4_IRQ_SYSMMU_MDMA0_0 -#define IRQ_SYSMMU_SSS_0 EXYNOS4_IRQ_SYSMMU_SSS_0 -#define IRQ_SYSMMU_FIMC0_0 EXYNOS4_IRQ_SYSMMU_FIMC0_0 -#define IRQ_SYSMMU_FIMC1_0 EXYNOS4_IRQ_SYSMMU_FIMC1_0 -#define IRQ_SYSMMU_FIMC2_0 EXYNOS4_IRQ_SYSMMU_FIMC2_0 -#define IRQ_SYSMMU_FIMC3_0 EXYNOS4_IRQ_SYSMMU_FIMC3_0 -#define IRQ_SYSMMU_JPEG_0 EXYNOS4_IRQ_SYSMMU_JPEG_0 -#define IRQ_SYSMMU_2D_0 EXYNOS4_IRQ_SYSMMU_2D_0 - -#define IRQ_SYSMMU_ROTATOR_0 EXYNOS4_IRQ_SYSMMU_ROTATOR_0 -#define IRQ_SYSMMU_MDMA1_0 EXYNOS4_IRQ_SYSMMU_MDMA1_0 -#define IRQ_SYSMMU_LCD0_M0_0 EXYNOS4_IRQ_SYSMMU_LCD0_M0_0 -#define IRQ_SYSMMU_LCD1_M1_0 EXYNOS4_IRQ_SYSMMU_LCD1_M1_0 -#define IRQ_SYSMMU_TV_M0_0 EXYNOS4_IRQ_SYSMMU_TV_M0_0 -#define IRQ_SYSMMU_MFC_M0_0 EXYNOS4_IRQ_SYSMMU_MFC_M0_0 -#define IRQ_SYSMMU_MFC_M1_0 EXYNOS4_IRQ_SYSMMU_MFC_M1_0 -#define IRQ_SYSMMU_PCIE_0 EXYNOS4_IRQ_SYSMMU_PCIE_0 -#define IRQ_FIMD0_FIFO EXYNOS4_IRQ_FIMD0_FIFO#define IRQ_FIMD0_VSYNC EXYNOS4_IRQ_FIMD0_VSYNC#define IRQ_FIMD0_SYSTEM EXYNOS4_IRQ_FIMD0_SYSTEM
arch/arm/mach-exynos/include/mach/map.h +38 -0
@@ -91,6 +91,7 @@#define EXYNOS4_PA_PDMA1 0x12690000#define EXYNOS4_PA_SYSMMU_MDMA 0x10A40000 +#define EXYNOS4_PA_SYSMMU_2D_ACP 0x10A40000#define EXYNOS4_PA_SYSMMU_SSS 0x10A50000#define EXYNOS4_PA_SYSMMU_FIMC0 0x11A20000#define EXYNOS4_PA_SYSMMU_FIMC1 0x11A30000
@@ -99,6 +100,12 @@#define EXYNOS4_PA_SYSMMU_JPEG 0x11A60000#define EXYNOS4_PA_SYSMMU_FIMD0 0x11E20000#define EXYNOS4_PA_SYSMMU_FIMD1 0x12220000 +#define EXYNOS4_PA_SYSMMU_FIMC_ISP 0x12260000 +#define EXYNOS4_PA_SYSMMU_FIMC_DRC 0x12270000 +#define EXYNOS4_PA_SYSMMU_FIMC_FD 0x122A0000 +#define EXYNOS4_PA_SYSMMU_ISPCPU 0x122B0000 +#define EXYNOS4_PA_SYSMMU_FIMC_LITE0 0x123B0000 +#define EXYNOS4_PA_SYSMMU_FIMC_LITE1 0x123C0000#define EXYNOS4_PA_SYSMMU_PCIe 0x12620000#define EXYNOS4_PA_SYSMMU_G2D 0x12A20000#define EXYNOS4_PA_SYSMMU_ROTATOR 0x12A30000
@@ -106,6 +113,37 @@#define EXYNOS4_PA_SYSMMU_TV 0x12E20000#define EXYNOS4_PA_SYSMMU_MFC_L 0x13620000#define EXYNOS4_PA_SYSMMU_MFC_R 0x13630000 + +#define EXYNOS5_PA_SYSMMU_MDMA1 0x10A40000 +#define EXYNOS5_PA_SYSMMU_SSS 0x10A50000 +#define EXYNOS5_PA_SYSMMU_2D 0x10A60000 +#define EXYNOS5_PA_SYSMMU_MFC_L 0x11200000 +#define EXYNOS5_PA_SYSMMU_MFC_R 0x11210000 +#define EXYNOS5_PA_SYSMMU_ROTATOR 0x11D40000 +#define EXYNOS5_PA_SYSMMU_MDMA2 0x11D50000 +#define EXYNOS5_PA_SYSMMU_JPEG 0x11F20000 +#define EXYNOS5_PA_SYSMMU_IOP 0x12360000 +#define EXYNOS5_PA_SYSMMU_RTIC 0x12370000 +#define EXYNOS5_PA_SYSMMU_GPS 0x12630000 +#define EXYNOS5_PA_SYSMMU_ISP 0x13260000 +#define EXYNOS5_PA_SYSMMU_DRC 0x12370000 +#define EXYNOS5_PA_SYSMMU_SCALERC 0x13280000 +#define EXYNOS5_PA_SYSMMU_SCALERP 0x13290000 +#define EXYNOS5_PA_SYSMMU_FD 0x132A0000 +#define EXYNOS5_PA_SYSMMU_ISPCPU 0x132B0000 +#define EXYNOS5_PA_SYSMMU_ODC 0x132C0000 +#define EXYNOS5_PA_SYSMMU_DIS0 0x132D0000 +#define EXYNOS5_PA_SYSMMU_DIS1 0x132E0000 +#define EXYNOS5_PA_SYSMMU_3DNR 0x132F0000 +#define EXYNOS5_PA_SYSMMU_LITE0 0x13C40000 +#define EXYNOS5_PA_SYSMMU_LITE1 0x13C50000 +#define EXYNOS5_PA_SYSMMU_GSC0 0x13E80000 +#define EXYNOS5_PA_SYSMMU_GSC1 0x13E90000 +#define EXYNOS5_PA_SYSMMU_GSC2 0x13EA0000 +#define EXYNOS5_PA_SYSMMU_GSC3 0x13EB0000 +#define EXYNOS5_PA_SYSMMU_FIMD1 0x14640000 +#define EXYNOS5_PA_SYSMMU_TV 0x14650000 +#define EXYNOS4_PA_SPI0 0x13920000#define EXYNOS4_PA_SPI1 0x13930000#define EXYNOS4_PA_SPI2 0x13940000
arch/arm/mach-exynos/include/mach/regs-clock.h +5 -0
@@ -135,6 +135,9 @@#define EXYNOS4_CLKGATE_SCLKCPU EXYNOS_CLKREG(0x14800)#define EXYNOS4_CLKGATE_IP_CPU EXYNOS_CLKREG(0x14900) +#define EXYNOS4_CLKGATE_IP_ISP0 EXYNOS_CLKREG(0x18800) +#define EXYNOS4_CLKGATE_IP_ISP1 EXYNOS_CLKREG(0x18804) +#define EXYNOS4_APLL_LOCKTIME (0x1C20)/* 300us */ #define EXYNOS4_APLLCON0_ENABLE_SHIFT (31)
@@ -297,6 +300,8 @@#define EXYNOS5_CLKDIV_PERIC0 EXYNOS_CLKREG(0x10558)#define EXYNOS5_CLKGATE_IP_ACP EXYNOS_CLKREG(0x08800) +#define EXYNOS5_CLKGATE_IP_ISP0 EXYNOS_CLKREG(0x0C800) +#define EXYNOS5_CLKGATE_IP_ISP1 EXYNOS_CLKREG(0x0C804)#define EXYNOS5_CLKGATE_IP_GSCL EXYNOS_CLKREG(0x10920)#define EXYNOS5_CLKGATE_IP_DISP1 EXYNOS_CLKREG(0x10928)#define EXYNOS5_CLKGATE_IP_MFC EXYNOS_CLKREG(0x1092C)
arch/arm/mach-exynos/include/mach/regs-sysmmu.h deleted +0 -28
@@ -1,28 +0,0 @@ -/* linux/arch/arm/mach-exynos4/include/mach/regs-sysmmu.h -* -* Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. -* http://www.samsung.com -* -* EXYNOS4 - System MMU register -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -#ifndef __ASM_ARCH_REGS_SYSMMU_H -#define __ASM_ARCH_REGS_SYSMMU_H __FILE__ - -#define S5P_MMU_CTRL 0x000 -#define S5P_MMU_CFG 0x004 -#define S5P_MMU_STATUS 0x008 -#define S5P_MMU_FLUSH 0x00C -#define S5P_PT_BASE_ADDR 0x014 -#define S5P_INT_STATUS 0x018 -#define S5P_INT_CLEAR 0x01C -#define S5P_PAGE_FAULT_ADDR 0x024 -#define S5P_AW_FAULT_ADDR 0x028 -#define S5P_AR_FAULT_ADDR 0x02C -#define S5P_DEFAULT_SLAVE_ADDR 0x030 - -#endif /* __ASM_ARCH_REGS_SYSMMU_H */
arch/arm/mach-exynos/include/mach/sysmmu.h +54 -34
100 lines not on this page · raw message
arch/arm/mach-exynos/mach-armlex4210.c +0 -1
@@ -154,7 +154,6 @@ static struct platform_device *armlex4210_devices[] __initdata = { &s3c_device_hsmmc3, &s3c_device_rtc, &s3c_device_wdt, - &exynos4_device_sysmmu, &samsung_asoc_dma, &armlex4210_smsc911x, &exynos4_device_ahci,
arch/arm/mach-exynos/mach-smdkv310.c +0 -1
@@ -277,7 +277,6 @@ static struct platform_device *smdkv310_devices[] __initdata = { &s5p_device_mfc_l, &s5p_device_mfc_r, &exynos4_device_spdif, - &exynos4_device_sysmmu, &samsung_asoc_dma, &samsung_asoc_idma, &s5p_device_fimd0,
Signature · 1 line
1.7.1
Quoted 26 lines · Cho KyongHo
Handling System MMUs with an identifier is not flexible to manage System MMU platform devices because of the following reasons:
1. A device driver which needs to handle System MMU must know the ID.
2. A System MMU may not present in some implementations of Exynos family.
3. Handling System MMU with IOMMU API does not require an ID.This patch is the result of removing ID of System MMUs. Instead, a device driver that needs to handle its System MMU must use IOMMU API while its descriptor of platform device is given.
This patch also includes the following enhancements:
- A System MMU device becomes a child if its power domain device.
- clkdevCc Kukjin Kim <[email protected]>Signed-off-by KyongHo Cho <[email protected]>--- arch/arm/mach-exynos/Kconfig | 10 +- arch/arm/mach-exynos/Makefile | 2 +- arch/arm/mach-exynos/clock-exynos4.c | 79 ++-- arch/arm/mach-exynos/clock-exynos4.h | 2 + arch/arm/mach-exynos/clock-exynos4210.c | 11 + arch/arm/mach-exynos/clock-exynos4212.c | 28 ++- arch/arm/mach-exynos/clock-exynos5.c | 90 +++++ arch/arm/mach-exynos/dev-sysmmu.c | 457 ++++++++++++---------- arch/arm/mach-exynos/include/mach/irqs.h | 25 +-
Quoted 8 lines
arch/arm/mach-exynos/include/mach/map.h | 38 ++ arch/arm/mach-exynos/include/mach/regs-clock.h | 5 + arch/arm/mach-exynos/include/mach/regs-sysmmu.h | 28 -- arch/arm/mach-exynos/include/mach/sysmmu.h | 88 +++-- arch/arm/mach-exynos/mach-armlex4210.c | 1 - arch/arm/mach-exynos/mach-smdkv310.c | 1 - 15 files changed, 529 insertions(+), 336 deletions(-) delete mode 100644 arch/arm/mach-exynos/include/mach/regs-sysmmu.h
This patch doesn't apply cleanly against upstream Linux (v3.3-rcX). Please rebase to upstream and resend. The other 2 patches apply fine.
Joerg
Signature · 5 lines
AMD Operating System Research Center Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach General Managers: Alberto Bozzo Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632
Quoted 1 line · Joerg Roedel
On Thu, Mar 15, 2012 at 05:32:39PM +0900, Cho KyongHo wrote:
KyongHo, I looked at 'Cho KyongHo <pullip.cho ...>' and 'KyongHo Cho <pullip.cho ...>' in this series, which one do you want to use?
Quoted 35 lines
Quoted 33 lines
Handling System MMUs with an identifier is not flexible to manage System MMU platform devices because of the following reasons:
1. A device driver which needs to handle System MMU must know the ID.
2. A System MMU may not present in some implementations of Exynos family.
3. Handling System MMU with IOMMU API does not require an ID.This patch is the result of removing ID of System MMUs. Instead, a device driver that needs to handle its System MMU must use IOMMU API while its descriptor of platform device is given.
This patch also includes the following enhancements:
- A System MMU device becomes a child if its power domain device.
- clkdevCc Kukjin Kim<[email protected]>Signed-off-by KyongHo Cho<[email protected]>--- arch/arm/mach-exynos/Kconfig | 10 +- arch/arm/mach-exynos/Makefile | 2 +- arch/arm/mach-exynos/clock-exynos4.c | 79 ++-- arch/arm/mach-exynos/clock-exynos4.h | 2 + arch/arm/mach-exynos/clock-exynos4210.c | 11 + arch/arm/mach-exynos/clock-exynos4212.c | 28 ++- arch/arm/mach-exynos/clock-exynos5.c | 90 +++++ arch/arm/mach-exynos/dev-sysmmu.c | 457 ++++++++++++---------- arch/arm/mach-exynos/include/mach/irqs.h | 25 +- arch/arm/mach-exynos/include/mach/map.h | 38 ++ arch/arm/mach-exynos/include/mach/regs-clock.h | 5 + arch/arm/mach-exynos/include/mach/regs-sysmmu.h | 28 -- arch/arm/mach-exynos/include/mach/sysmmu.h | 88 +++-- arch/arm/mach-exynos/mach-armlex4210.c | 1 - arch/arm/mach-exynos/mach-smdkv310.c | 1 - 15 files changed, 529 insertions(+), 336 deletions(-)Quoted 1 line
delete mode 100644
arch/arm/mach-exynos/include/mach/regs-sysmmu.h
Quoted 3 lines
This patch doesn't apply cleanly against upstream Linux (v3.3-rcX). Please rebase to upstream and resend. The other 2 patches apply fine.
Yes, as KyoungHo said, this has been created on top of Samsung tree for-next because this touches many exynos stuff which has been changed from Samsung tree for upcoming merge window. So if you're ok on this, 1st patch and this should be sent to upstream via samsung tree even though I can't find any topic branch for this yet. And if you want topic branch for your tree, let me know, I can provide it.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
Hi KyongHo, Kukjin,
Quoted 47 lines · Kukjin Kim
Quoted 1 line · Joerg Roedel
On Thu, Mar 15, 2012 at 05:32:39PM +0900, Cho KyongHo wrote:
KyongHo, I looked at 'Cho KyongHo <pullip.cho ...>' and 'KyongHo Cho <pullip.cho ...>' in this series, which one do you want to use?
Quoted 37 lines
Quoted 35 lines
Handling System MMUs with an identifier is not flexible to manage System MMU platform devices because of the following reasons:
1. A device driver which needs to handle System MMU must know the ID.
2. A System MMU may not present in some implementations of Exynos family.
3. Handling System MMU with IOMMU API does not require an ID.This patch is the result of removing ID of System MMUs. Instead, a device driver that needs to handle its System MMU must use IOMMU API while its descriptor of platform device is given.
This patch also includes the following enhancements:
- A System MMU device becomes a child if its power domain device.
- clkdevCc Kukjin Kim<[email protected]>Signed-off-by KyongHo Cho<[email protected]>--- arch/arm/mach-exynos/Kconfig | 10 +- arch/arm/mach-exynos/Makefile | 2 +- arch/arm/mach-exynos/clock-exynos4.c | 79 ++-- arch/arm/mach-exynos/clock-exynos4.h | 2 + arch/arm/mach-exynos/clock-exynos4210.c | 11 + arch/arm/mach-exynos/clock-exynos4212.c | 28 ++- arch/arm/mach-exynos/clock-exynos5.c | 90 +++++ arch/arm/mach-exynos/dev-sysmmu.c | 457 ++++++++++++---------- arch/arm/mach-exynos/include/mach/irqs.h | 25 +- arch/arm/mach-exynos/include/mach/map.h | 38 ++ arch/arm/mach-exynos/include/mach/regs-clock.h | 5 + arch/arm/mach-exynos/include/mach/regs-sysmmu.h | 28 -- arch/arm/mach-exynos/include/mach/sysmmu.h | 88 +++-- arch/arm/mach-exynos/mach-armlex4210.c | 1 - arch/arm/mach-exynos/mach-smdkv310.c | 1 - 15 files changed, 529 insertions(+), 336 deletions(-)Quoted 1 line
delete mode 100644
arch/arm/mach-exynos/include/mach/regs-sysmmu.hQuoted 3 lines
This patch doesn't apply cleanly against upstream Linux (v3.3-rcX). Please rebase to upstream and resend. The other 2 patches apply fine.
Quoted 8 lines
Yes, as KyoungHo said, this has been created on top of Samsung tree for-next because this touches many exynos stuff which has been changed from Samsung tree for upcoming merge window. So if you're ok on this, 1st patch and this should be sent to upstream via samsung tree even though I can't find any topic branch for this yet. And if you want topic branch for your tree, let me know, I can provide it.
Thanks.
Wouldn't it be good to send exynos4 SYSMMU patches now, and send only the exynos5 delta when your for-next(exynos5) changes
get merged to mainline? Manually editing the patches is really pain-some and sometimes error-some :( Can this patch in particular
be split?
Quoted 6 lines
Best regards,
Kgene.Signature · 2 lines
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
Regards,
Subash
Quoted 56 lines · Subash Patel
Hi KyongHo, Kukjin,
Quoted 53 lines · Kukjin Kim
Quoted 1 line · Joerg Roedel
On Thu, Mar 15, 2012 at 05:32:39PM +0900, Cho KyongHo wrote:
KyongHo, I looked at 'Cho KyongHo <pullip.cho ...>' and 'KyongHo Cho <pullip.cho ...>' in this series, which one do you want to use?
Quoted 36 lines
Quoted 33 lines
Handling System MMUs with an identifier is not flexible to manage System MMU platform devices because of the following reasons:
1. A device driver which needs to handle System MMU must know the ID.
2. A System MMU may not present in some implementations of Exynos family.
3. Handling System MMU with IOMMU API does not require an ID.This patch is the result of removing ID of System MMUs. Instead, a device driver that needs to handle its System MMU must use IOMMU API while its descriptor of platform device is given.
This patch also includes the following enhancements:
- A System MMU device becomes a child if its power domain device.
- clkdevCc Kukjin Kim<[email protected]>Signed-off-by KyongHo Cho<[email protected]>---
arch/arm/mach-exynos/Kconfig| 10 +-arch/arm/mach-exynos/Makefile| 2 +-arch/arm/mach-exynos/clock-exynos4.c| 79 ++--arch/arm/mach-exynos/clock-exynos4.h| 2 +arch/arm/mach-exynos/clock-exynos4210.c| 11 +arch/arm/mach-exynos/clock-exynos4212.c| 28 ++-arch/arm/mach-exynos/clock-exynos5.c| 90 +++++arch/arm/mach-exynos/dev-sysmmu.c| 457 ++++++++++++----------arch/arm/mach-exynos/include/mach/irqs.h| 25 +-arch/arm/mach-exynos/include/mach/map.h| 38 ++arch/arm/mach-exynos/include/mach/regs-clock.h| 5 +arch/arm/mach-exynos/include/mach/regs-sysmmu.h| 28 --arch/arm/mach-exynos/include/mach/sysmmu.h| 88 +++--arch/arm/mach-exynos/mach-armlex4210.c| 1 -arch/arm/mach-exynos/mach-smdkv310.c| 1 -Quoted 2 lines
15 files changed, 529 insertions(+), 336 deletions(-)delete mode 100644
arch/arm/mach-exynos/include/mach/regs-sysmmu.hQuoted 3 lines
This patch doesn't apply cleanly against upstream Linux (v3.3-rcX). Please rebase to upstream and resend. The other 2 patches apply fine.
Yes, as KyoungHo said, this has been created on top of Samsung tree for-next because this touches many exynos stuff which has been changed from Samsung tree for upcoming merge window. So if you're ok on this, 1st patch and this should be sent to upstream via samsung tree even though I can't find any topic branch for this yet. And if you want topic branch for your tree, let me know, I can provide it.
Quoted 3 lines
Quoted 1 line
Thanks.
Wouldn't it be good to send exynos4 SYSMMU patches now, and send only the exynos5 delta when your for-next(exynos5) changes
Hmm, it can be a solution for this, but I'm not sure exynos4 and exynos5 can be splitted.
Quoted 1 line
get merged to mainline? Manually editing the patches is really pain-some
YES, absolutely. Nobody like it.
Quoted 2 lines
and sometimes error-some :( Can this patch in particular be split?
Hmm...
Now we don't have much time for upcoming merge window, and this should be in linux-next before open merge window.
Anyway Joerg, how do you want to handle this? Do you want to pick up 1/2/3 all of them in your tree? If so, 2nd patch should be on top of some samsung topic stuff.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
Quoted 3 lines · Kukjin Kim
Anyway Joerg, how do you want to handle this? Do you want to pick up 1/2/3 all of them in your tree? If so, 2nd patch should be on top of some samsung topic stuff.
Since patch 2 only applies to the Samsung tree, it is best to carry this in your tree for merging. Feel free to add my Acked-by to patch 3. But any further patches for the Exynos IOMMU drivers should go through my tree after it is merged.
Thanks,
Joerg
Quoted 10 lines · Joerg Roedel
Quoted 3 lines · Kukjin Kim
Anyway Joerg, how do you want to handle this? Do you want to pick up 1/2/3 all of them in your tree? If so, 2nd patch should be on top of some samsung topic stuff.
Since patch 2 only applies to the Samsung tree, it is best to carry this in your tree for merging. Feel free to add my Acked-by to patch 3. But any further patches for the Exynos IOMMU drivers should go through my tree after it is merged.
Hi Joerg,
Now that 1st and 2nd can be applied cleanly into latest mainline. But unfortunately, I have no chance to send them to Linus now and I'm not sure you can do it during this merge window. If it is possible, please keep going on with my ack.
KyongHo, just note, happens follwoing complaint with checkpatch, but I'm not sure this should be fixed right now. I think, if required, we can fix it later.
ERROR: Macros with complex values should be enclosed in parenthesis #698: FILE: arch/arm/mach-exynos/dev-sysmmu.c:64:
+#define DEFINE_SYSMMU_RESOURCE(core, mem, irq) \
+ DEFINE_RES_MEM_NAMED(core##_PA_SYSMMU_##mem, SZ_4K, #mem), \
+ DEFINE_RES_IRQ_NAMED(core##_IRQ_SYSMMU_##irq##_0, #mem)
ERROR: Macros with complex values should be enclosed in parenthesis #702: FILE: arch/arm/mach-exynos/dev-sysmmu.c:68:
+#define SYSMMU_RESOURCE_DEFINE(core, ipname, mem, irq) \
+ SYSMMU_RESOURCE(core, ipname) { \
+ DEFINE_SYSMMU_RESOURCE(core, mem, irq) \+ }
WARNING: quoted string split across lines #914: FILE: arch/arm/mach-exynos/dev-sysmmu.c:259:
+ pr_err("%s: Failed to add device
resources for "
+ "%s.%d\n", __func__,
total: 2 errors, 1 warnings, 1062 lines checked
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
Quoted 26 lines · Kukjin Kim
Quoted 8 lines · Joerg Roedel
Quoted 4 lines · Kukjin Kim
Anyway Joerg, how do you want to handle this? Do you want to pick up 1/2/3 all of them in your tree? If so, 2nd patch should be on top of some samsung topic stuff.
Quoted 5 lines
Since patch 2 only applies to the Samsung tree, it is best to carry this in your tree for merging. Feel free to add my Acked-by to patch 3. But any further patches for the Exynos IOMMU drivers should go through my tree after it is merged.
Hi Joerg,
Now that 1st and 2nd can be applied cleanly into latest mainline. But unfortunately, I have no chance to send them to Linus now and I'm not sure you can do it during this merge window. If it is possible, please keep going on with my ack.
KyongHo, just note, happens follwoing complaint with checkpatch, but I'm not sure this should be fixed right now. I think, if required, we can fix it later.
Quoted 7 lines
ERROR: Macros with complex values should be enclosed in parenthesis #698: FILE:
arch/arm/mach-exynos/dev-sysmmu.c:64:+#define
DEFINE_SYSMMU_RESOURCE(core, mem, irq)? ? ? ? ? ? ? ? ? ? ? ? \
+ ? ? ?DEFINE_RES_MEM_NAMED(core##_PA_SYSMMU_##mem, SZ_4K, #mem), ? ? ?\
+ ? ? ?DEFINE_RES_IRQ_NAMED(core##_IRQ_SYSMMU_##irq##_0, #mem)
DEFINE_SYSMMU_RESOURCE macro defines 2 array elements. The replacement string must not be enclosed by parenthesis.
Quoted 8 lines
ERROR: Macros with complex values should be enclosed in parenthesis #702: FILE:
arch/arm/mach-exynos/dev-sysmmu.c:68:+#define
SYSMMU_RESOURCE_DEFINE(core, ipname, mem, irq)? ? ? ? ? ? ? ? \
+ ? ? ?SYSMMU_RESOURCE(core, ipname){ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? \
+ ? ? ? ? ? ? ?DEFINE_SYSMMU_RESOURCE(core, mem, irq)? ? ? ? ? ? ? ? ?\
+ ? ? ? }
Ditto.
Quoted 7 lines
WARNING: quoted string split across lines #914: FILE:
arch/arm/mach-exynos/dev-sysmmu.c:259:+ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? pr_err("%s: Failed to add device resources for "
+ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? "%s.%d\n",__func__,
It does not happened in the patch I posted and the email received also does not have such problem. I wonder why the "pr_err(..." line is split into 2 lines.
Thank you for concerning :)
KyongHo.
Quoted 10 lines · Joerg Roedel
Quoted 3 lines · Kukjin Kim
Anyway Joerg, how do you want to handle this? Do you want to pick up 1/2/3 all of them in your tree? If so, 2nd patch should be on top of some samsung topic stuff.
Since patch 2 only applies to the Samsung tree, it is best to carry this in your tree for merging. Feel free to add my Acked-by to patch 3. But any further patches for the Exynos IOMMU drivers should go through my tree after it is merged.
Hi Joerg,
I applied 1st and 2nd patches in my tree.
git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
next/cleanup-samsung-iommu
and my -next.
So please go ahead for 3rd patch in your tree. Note that if you need 1st and 2nd patches for your tree, please merge the 'next/cleanup-samsung-iommu' branch in my tree. If not, will happen useless conflicts.
If any problems, please let me know.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.