Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
ab5a4e63
Commit
ab5a4e63
authored
May 20, 2012
by
Kukjin Kim
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'next/devel-samsung' into next/devel-samsung-2
parents
36be5051
5ddfa842
Changes
42
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
1918 additions
and
805 deletions
+1918
-805
arch/arm/mach-exynos/Kconfig
arch/arm/mach-exynos/Kconfig
+16
-8
arch/arm/mach-exynos/Makefile
arch/arm/mach-exynos/Makefile
+4
-3
arch/arm/mach-exynos/Makefile.boot
arch/arm/mach-exynos/Makefile.boot
+3
-0
arch/arm/mach-exynos/clock-exynos4.c
arch/arm/mach-exynos/clock-exynos4.c
+39
-40
arch/arm/mach-exynos/clock-exynos4.h
arch/arm/mach-exynos/clock-exynos4.h
+2
-0
arch/arm/mach-exynos/clock-exynos4210.c
arch/arm/mach-exynos/clock-exynos4210.c
+11
-0
arch/arm/mach-exynos/clock-exynos4212.c
arch/arm/mach-exynos/clock-exynos4212.c
+37
-1
arch/arm/mach-exynos/clock-exynos5.c
arch/arm/mach-exynos/clock-exynos5.c
+90
-0
arch/arm/mach-exynos/dev-drm.c
arch/arm/mach-exynos/dev-drm.c
+29
-0
arch/arm/mach-exynos/dev-sysmmu.c
arch/arm/mach-exynos/dev-sysmmu.c
+249
-208
arch/arm/mach-exynos/dma.c
arch/arm/mach-exynos/dma.c
+114
-27
arch/arm/mach-exynos/include/mach/irqs.h
arch/arm/mach-exynos/include/mach/irqs.h
+7
-18
arch/arm/mach-exynos/include/mach/map.h
arch/arm/mach-exynos/include/mach/map.h
+41
-0
arch/arm/mach-exynos/include/mach/regs-clock.h
arch/arm/mach-exynos/include/mach/regs-clock.h
+5
-0
arch/arm/mach-exynos/include/mach/regs-pmu.h
arch/arm/mach-exynos/include/mach/regs-pmu.h
+9
-1
arch/arm/mach-exynos/include/mach/regs-sysmmu.h
arch/arm/mach-exynos/include/mach/regs-sysmmu.h
+0
-28
arch/arm/mach-exynos/include/mach/spi-clocks.h
arch/arm/mach-exynos/include/mach/spi-clocks.h
+1
-1
arch/arm/mach-exynos/include/mach/sysmmu.h
arch/arm/mach-exynos/include/mach/sysmmu.h
+54
-34
arch/arm/mach-exynos/mach-armlex4210.c
arch/arm/mach-exynos/mach-armlex4210.c
+0
-1
arch/arm/mach-exynos/mach-smdkv310.c
arch/arm/mach-exynos/mach-smdkv310.c
+0
-1
arch/arm/mach-exynos/pm.c
arch/arm/mach-exynos/pm.c
+1
-1
arch/arm/mach-exynos/pmu.c
arch/arm/mach-exynos/pmu.c
+20
-4
arch/arm/mach-s3c24xx/Kconfig
arch/arm/mach-s3c24xx/Kconfig
+5
-0
arch/arm/mach-s3c24xx/Makefile
arch/arm/mach-s3c24xx/Makefile
+1
-0
arch/arm/mach-s3c24xx/clock-s3c2416.c
arch/arm/mach-s3c24xx/clock-s3c2416.c
+1
-0
arch/arm/mach-s3c24xx/clock-s3c2443.c
arch/arm/mach-s3c24xx/clock-s3c2443.c
+6
-0
arch/arm/mach-s3c24xx/common-s3c2443.c
arch/arm/mach-s3c24xx/common-s3c2443.c
+10
-5
arch/arm/mach-s3c24xx/dma-s3c2443.c
arch/arm/mach-s3c24xx/dma-s3c2443.c
+12
-4
arch/arm/mach-s3c24xx/include/mach/dma.h
arch/arm/mach-s3c24xx/include/mach/dma.h
+4
-0
arch/arm/mach-s3c24xx/include/mach/map.h
arch/arm/mach-s3c24xx/include/mach/map.h
+5
-0
arch/arm/mach-s3c24xx/setup-spi.c
arch/arm/mach-s3c24xx/setup-spi.c
+39
-0
arch/arm/plat-s5p/Kconfig
arch/arm/plat-s5p/Kconfig
+0
-8
arch/arm/plat-s5p/Makefile
arch/arm/plat-s5p/Makefile
+0
-1
arch/arm/plat-s5p/sysmmu.c
arch/arm/plat-s5p/sysmmu.c
+0
-313
arch/arm/plat-samsung/Kconfig
arch/arm/plat-samsung/Kconfig
+1
-1
arch/arm/plat-samsung/include/plat/devs.h
arch/arm/plat-samsung/include/plat/devs.h
+2
-1
arch/arm/plat-samsung/include/plat/dma-pl330.h
arch/arm/plat-samsung/include/plat/dma-pl330.h
+1
-0
arch/arm/plat-samsung/include/plat/sysmmu.h
arch/arm/plat-samsung/include/plat/sysmmu.h
+0
-95
drivers/iommu/Kconfig
drivers/iommu/Kconfig
+21
-0
drivers/iommu/Makefile
drivers/iommu/Makefile
+1
-0
drivers/iommu/exynos-iommu.c
drivers/iommu/exynos-iommu.c
+1076
-0
drivers/spi/Kconfig
drivers/spi/Kconfig
+1
-1
No files found.
arch/arm/mach-exynos/Kconfig
View file @
ab5a4e63
...
...
@@ -61,6 +61,7 @@ config SOC_EXYNOS5250
bool "SAMSUNG EXYNOS5250"
default y
depends on ARCH_EXYNOS5
select SAMSUNG_DMADEV
help
Enable EXYNOS5250 SoC support
...
...
@@ -70,7 +71,7 @@ config EXYNOS4_MCT
help
Use MCT (Multi Core Timer) as kernel timers
config EXYNOS
4
_DEV_DMA
config EXYNOS_DEV_DMA
bool
help
Compile in amba device definitions for DMA controller
...
...
@@ -80,15 +81,20 @@ config EXYNOS4_DEV_AHCI
help
Compile in platform device definitions for AHCI
config EXYNOS_DEV_DRM
bool
help
Compile in platform device definitions for core DRM device
config EXYNOS4_SETUP_FIMD0
bool
help
Common setup code for FIMD0.
config EXYNOS
4
_DEV_SYSMMU
config EXYNOS_DEV_SYSMMU
bool
help
Common setup code for SYSTEM MMU in EXYNOS
4
Common setup code for SYSTEM MMU in EXYNOS
platforms
config EXYNOS4_DEV_DWMCI
bool
...
...
@@ -161,7 +167,7 @@ config EXYNOS4_SETUP_USB_PHY
help
Common setup code for USB PHY controller
config EXYNOS
4
_SETUP_SPI
config EXYNOS_SETUP_SPI
bool
help
Common setup code for SPI GPIO configurations.
...
...
@@ -200,12 +206,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
...
...
@@ -223,8 +229,7 @@ config MACH_ARMLEX4210
select S3C_DEV_HSMMC2
select S3C_DEV_HSMMC3
select EXYNOS4_DEV_AHCI
select EXYNOS4_DEV_DMA
select EXYNOS4_DEV_SYSMMU
select EXYNOS_DEV_DMA
select EXYNOS4_SETUP_SDHCI
help
Machine support for Samsung ARMLEX4210 based on EXYNOS4210
...
...
@@ -254,6 +259,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
...
...
@@ -325,6 +331,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
...
...
@@ -348,7 +355,8 @@ config MACH_SMDK4212
select SAMSUNG_DEV_BACKLIGHT
select SAMSUNG_DEV_KEYPAD
select SAMSUNG_DEV_PWM
select EXYNOS4_DEV_DMA
select EXYNOS_DEV_SYSMMU
select EXYNOS_DEV_DMA
select EXYNOS4_SETUP_I2C1
select EXYNOS4_SETUP_I2C3
select EXYNOS4_SETUP_I2C7
...
...
arch/arm/mach-exynos/Makefile
View file @
ab5a4e63
...
...
@@ -50,10 +50,11 @@ 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_EXYNOS4_DEV_DWMCI)
+=
dev-dwmci.o
obj-$(CONFIG_EXYNOS
4
_DEV_DMA)
+=
dma.o
obj-$(CONFIG_EXYNOS_DEV_DMA)
+=
dma.o
obj-$(CONFIG_EXYNOS4_DEV_USB_OHCI)
+=
dev-ohci.o
obj-$(CONFIG_EXYNOS_DEV_DRM)
+=
dev-drm.o
obj-$(CONFIG_EXYNOS_DEV_SYSMMU)
+=
dev-sysmmu.o
obj-$(CONFIG_ARCH_EXYNOS)
+=
setup-i2c0.o
obj-$(CONFIG_EXYNOS4_SETUP_FIMC)
+=
setup-fimc.o
...
...
@@ -68,4 +69,4 @@ obj-$(CONFIG_EXYNOS4_SETUP_I2C7) += setup-i2c7.o
obj-$(CONFIG_EXYNOS4_SETUP_KEYPAD)
+=
setup-keypad.o
obj-$(CONFIG_EXYNOS4_SETUP_SDHCI_GPIO)
+=
setup-sdhci-gpio.o
obj-$(CONFIG_EXYNOS4_SETUP_USB_PHY)
+=
setup-usb-phy.o
obj-$(CONFIG_EXYNOS
4
_SETUP_SPI)
+=
setup-spi.o
obj-$(CONFIG_EXYNOS_SETUP_SPI)
+=
setup-spi.o
arch/arm/mach-exynos/Makefile.boot
View file @
ab5a4e63
zreladdr-y
+=
0x40008000
params_phys-y
:=
0x40000100
dtb-$(CONFIG_MACH_EXYNOS4_DT)
+=
exynos4210-origen.dtb exynos4210-smdkv310.dtb
dtb-$(CONFIG_MACH_EXYNOS5_DT)
+=
exynos5250-smdk5250.dtb
arch/arm/mach-exynos/clock-exynos4.c
View file @
ab5a4e63
...
...
@@ -168,7 +168,7 @@ static int exynos4_clk_ip_tv_ctrl(struct clk *clk, int enable)
return
s5p_gatectrl
(
EXYNOS4_CLKGATE_IP_TV
,
clk
,
enable
);
}
static
int
exynos4_clk_ip_image_ctrl
(
struct
clk
*
clk
,
int
enable
)
int
exynos4_clk_ip_image_ctrl
(
struct
clk
*
clk
,
int
enable
)
{
return
s5p_gatectrl
(
EXYNOS4_CLKGATE_IP_IMAGE
,
clk
,
enable
);
}
...
...
@@ -198,6 +198,11 @@ static int exynos4_clk_ip_perir_ctrl(struct clk *clk, int enable)
return
s5p_gatectrl
(
EXYNOS4_CLKGATE_IP_PERIR
,
clk
,
enable
);
}
int
exynos4_clk_ip_dmc_ctrl
(
struct
clk
*
clk
,
int
enable
)
{
return
s5p_gatectrl
(
EXYNOS4_CLKGATE_IP_DMC
,
clk
,
enable
);
}
static
int
exynos4_clk_hdmiphy_ctrl
(
struct
clk
*
clk
,
int
enable
)
{
return
s5p_gatectrl
(
S5P_HDMI_PHY_CONTROL
,
clk
,
enable
);
...
...
@@ -678,61 +683,55 @@ static struct clk exynos4_init_clocks_off[] = {
.
enable
=
exynos4_clk_ip_peril_ctrl
,
.
ctrlbit
=
(
1
<<
14
),
},
{
.
name
=
"SYSMMU_MDMA"
,
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
mfc_l
,
0
),
.
enable
=
exynos4_clk_ip_mfc_ctrl
,
.
ctrlbit
=
(
1
<<
1
),
},
{
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
mfc_r
,
1
),
.
enable
=
exynos4_clk_ip_mfc_ctrl
,
.
ctrlbit
=
(
1
<<
2
),
},
{
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
tv
,
2
),
.
enable
=
exynos4_clk_ip_tv_ctrl
,
.
ctrlbit
=
(
1
<<
4
),
},
{
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
jpeg
,
3
),
.
enable
=
exynos4_clk_ip_cam_ctrl
,
.
ctrlbit
=
(
1
<<
11
),
},
{
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
rot
,
4
),
.
enable
=
exynos4_clk_ip_image_ctrl
,
.
ctrlbit
=
(
1
<<
5
),
.
ctrlbit
=
(
1
<<
4
),
},
{
.
name
=
"SYSMMU_FIMC0"
,
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
fimc0
,
5
),
.
enable
=
exynos4_clk_ip_cam_ctrl
,
.
ctrlbit
=
(
1
<<
7
),
},
{
.
name
=
"SYSMMU_FIMC1"
,
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
fimc1
,
6
),
.
enable
=
exynos4_clk_ip_cam_ctrl
,
.
ctrlbit
=
(
1
<<
8
),
},
{
.
name
=
"SYSMMU_FIMC2"
,
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
fimc2
,
7
),
.
enable
=
exynos4_clk_ip_cam_ctrl
,
.
ctrlbit
=
(
1
<<
9
),
},
{
.
name
=
"SYSMMU_FIMC3"
,
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
fimc3
,
8
),
.
enable
=
exynos4_clk_ip_cam_ctrl
,
.
ctrlbit
=
(
1
<<
10
),
},
{
.
name
=
"SYSMMU_JPEG"
,
.
enable
=
exynos4_clk_ip_cam_ctrl
,
.
ctrlbit
=
(
1
<<
11
),
},
{
.
name
=
"SYSMMU_FIMD0"
,
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
fimd0
,
10
),
.
enable
=
exynos4_clk_ip_lcd0_ctrl
,
.
ctrlbit
=
(
1
<<
4
),
},
{
.
name
=
"SYSMMU_FIMD1"
,
.
enable
=
exynos4_clk_ip_lcd1_ctrl
,
.
ctrlbit
=
(
1
<<
4
),
},
{
.
name
=
"SYSMMU_PCIe"
,
.
enable
=
exynos4_clk_ip_fsys_ctrl
,
.
ctrlbit
=
(
1
<<
18
),
},
{
.
name
=
"SYSMMU_G2D"
,
.
enable
=
exynos4_clk_ip_image_ctrl
,
.
ctrlbit
=
(
1
<<
3
),
},
{
.
name
=
"SYSMMU_ROTATOR"
,
.
enable
=
exynos4_clk_ip_image_ctrl
,
.
ctrlbit
=
(
1
<<
4
),
},
{
.
name
=
"SYSMMU_TV"
,
.
enable
=
exynos4_clk_ip_tv_ctrl
,
.
ctrlbit
=
(
1
<<
4
),
},
{
.
name
=
"SYSMMU_MFC_L"
,
.
enable
=
exynos4_clk_ip_mfc_ctrl
,
.
ctrlbit
=
(
1
<<
1
),
},
{
.
name
=
"SYSMMU_MFC_R"
,
.
enable
=
exynos4_clk_ip_mfc_ctrl
,
.
ctrlbit
=
(
1
<<
2
),
}
};
...
...
arch/arm/mach-exynos/clock-exynos4.h
View file @
ab5a4e63
...
...
@@ -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
View file @
ab5a4e63
...
...
@@ -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
(
2
d
,
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
View file @
ab5a4e63
...
...
@@ -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,32 @@ static struct clksrc_clk clksrcs[] = {
};
static
struct
clk
init_clocks_off
[]
=
{
/* nothing here yet */
{
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
2
d
,
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
),
},
{
.
name
=
"flite"
,
.
devname
=
"exynos-fimc-lite.0"
,
.
enable
=
exynos4212_clk_ip_isp0_ctrl
,
.
ctrlbit
=
(
1
<<
4
),
},
{
.
name
=
"flite"
,
.
devname
=
"exynos-fimc-lite.1"
,
.
enable
=
exynos4212_clk_ip_isp0_ctrl
,
.
ctrlbit
=
(
1
<<
3
),
}
};
#ifdef CONFIG_PM_SLEEP
...
...
arch/arm/mach-exynos/clock-exynos5.c
View file @
ab5a4e63
...
...
@@ -82,6 +82,11 @@ static int exynos5_clksrc_mask_peric0_ctrl(struct clk *clk, int enable)
return
s5p_gatectrl
(
EXYNOS5_CLKSRC_MASK_PERIC0
,
clk
,
enable
);
}
static
int
exynos5_clk_ip_acp_ctrl
(
struct
clk
*
clk
,
int
enable
)
{
return
s5p_gatectrl
(
EXYNOS5_CLKGATE_IP_ACP
,
clk
,
enable
);
}
static
int
exynos5_clk_ip_core_ctrl
(
struct
clk
*
clk
,
int
enable
)
{
return
s5p_gatectrl
(
EXYNOS5_CLKGATE_IP_CORE
,
clk
,
enable
);
...
...
@@ -127,6 +132,21 @@ static int exynos5_clk_ip_peris_ctrl(struct clk *clk, int enable)
return
s5p_gatectrl
(
EXYNOS5_CLKGATE_IP_PERIS
,
clk
,
enable
);
}
static
int
exynos5_clk_ip_gscl_ctrl
(
struct
clk
*
clk
,
int
enable
)
{
return
s5p_gatectrl
(
EXYNOS5_CLKGATE_IP_GSCL
,
clk
,
enable
);
}
static
int
exynos5_clk_ip_isp0_ctrl
(
struct
clk
*
clk
,
int
enable
)
{
return
s5p_gatectrl
(
EXYNOS5_CLKGATE_IP_ISP0
,
clk
,
enable
);
}
static
int
exynos5_clk_ip_isp1_ctrl
(
struct
clk
*
clk
,
int
enable
)
{
return
s5p_gatectrl
(
EXYNOS5_CLKGATE_IP_ISP1
,
clk
,
enable
);
}
/* Core list of CMU_CPU side */
static
struct
clksrc_clk
exynos5_clk_mout_apll
=
{
...
...
@@ -630,6 +650,76 @@ static struct clk exynos5_init_clocks_off[] = {
.
parent
=
&
exynos5_clk_aclk_66
.
clk
,
.
enable
=
exynos5_clk_ip_peric_ctrl
,
.
ctrlbit
=
(
1
<<
14
),
},
{
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
mfc_l
,
0
),
.
enable
=
&
exynos5_clk_ip_mfc_ctrl
,
.
ctrlbit
=
(
1
<<
1
),
},
{
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
mfc_r
,
1
),
.
enable
=
&
exynos5_clk_ip_mfc_ctrl
,
.
ctrlbit
=
(
1
<<
2
),
},
{
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
tv
,
2
),
.
enable
=
&
exynos5_clk_ip_disp1_ctrl
,
.
ctrlbit
=
(
1
<<
9
)
},
{
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
jpeg
,
3
),
.
enable
=
&
exynos5_clk_ip_gen_ctrl
,
.
ctrlbit
=
(
1
<<
7
),
},
{
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
rot
,
4
),
.
enable
=
&
exynos5_clk_ip_gen_ctrl
,
.
ctrlbit
=
(
1
<<
6
)
},
{
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
gsc0
,
5
),
.
enable
=
&
exynos5_clk_ip_gscl_ctrl
,
.
ctrlbit
=
(
1
<<
7
),
},
{
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
gsc1
,
6
),
.
enable
=
&
exynos5_clk_ip_gscl_ctrl
,
.
ctrlbit
=
(
1
<<
8
),
},
{
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
gsc2
,
7
),
.
enable
=
&
exynos5_clk_ip_gscl_ctrl
,
.
ctrlbit
=
(
1
<<
9
),
},
{
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
gsc3
,
8
),
.
enable
=
&
exynos5_clk_ip_gscl_ctrl
,
.
ctrlbit
=
(
1
<<
10
),
},
{
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
isp
,
9
),
.
enable
=
&
exynos5_clk_ip_isp0_ctrl
,
.
ctrlbit
=
(
0x3F
<<
8
),
},
{
.
name
=
SYSMMU_CLOCK_NAME2
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
isp
,
9
),
.
enable
=
&
exynos5_clk_ip_isp1_ctrl
,
.
ctrlbit
=
(
0xF
<<
4
),
},
{
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
camif0
,
12
),
.
enable
=
&
exynos5_clk_ip_gscl_ctrl
,
.
ctrlbit
=
(
1
<<
11
),
},
{
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
camif1
,
13
),
.
enable
=
&
exynos5_clk_ip_gscl_ctrl
,
.
ctrlbit
=
(
1
<<
12
),
},
{
.
name
=
SYSMMU_CLOCK_NAME
,
.
devname
=
SYSMMU_CLOCK_DEVNAME
(
2
d
,
14
),
.
enable
=
&
exynos5_clk_ip_acp_ctrl
,
.
ctrlbit
=
(
1
<<
7
)
}
};
...
...
arch/arm/mach-exynos/dev-drm.c
0 → 100644
View file @
ab5a4e63
/*
* linux/arch/arm/mach-exynos/dev-drm.c
*
* Copyright (c) 2012 Samsung Electronics Co., Ltd.
* http://www.samsung.com
*
* EXYNOS - core DRM device
*
* 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.
*/
#include <linux/kernel.h>
#include <linux/dma-mapping.h>
#include <linux/platform_device.h>
#include <plat/devs.h>
static
u64
exynos_drm_dma_mask
=
DMA_BIT_MASK
(
32
);
struct
platform_device
exynos_device_drm
=
{
.
name
=
"exynos-drm"
,
.
dev
=
{
.
dma_mask
=
&
exynos_drm_dma_mask
,
.
coherent_dma_mask
=
DMA_BIT_MASK
(
32
),
}
};
arch/arm/mach-exynos/dev-sysmmu.c
View file @
ab5a4e63
This diff is collapsed.
Click to expand it.
arch/arm/mach-exynos/dma.c
View file @
ab5a4e63
...
...
@@ -103,10 +103,45 @@ static u8 exynos4212_pdma0_peri[] = {
DMACH_MIPI_HSI5
,
};
struct
dma_pl330_platdata
exynos4_pdma0_pdata
;
static
u8
exynos5250_pdma0_peri
[]
=
{
DMACH_PCM0_RX
,
DMACH_PCM0_TX
,
DMACH_PCM2_RX
,
DMACH_PCM2_TX
,
DMACH_SPI0_RX
,
DMACH_SPI0_TX
,
DMACH_SPI2_RX
,
DMACH_SPI2_TX
,
DMACH_I2S0S_TX
,
DMACH_I2S0_RX
,
DMACH_I2S0_TX
,
DMACH_I2S2_RX
,
DMACH_I2S2_TX
,
DMACH_UART0_RX
,
DMACH_UART0_TX
,
DMACH_UART2_RX
,
DMACH_UART2_TX
,
DMACH_UART4_RX
,
DMACH_UART4_TX
,
DMACH_SLIMBUS0_RX
,
DMACH_SLIMBUS0_TX
,
DMACH_SLIMBUS2_RX
,
DMACH_SLIMBUS2_TX
,
DMACH_SLIMBUS4_RX
,
DMACH_SLIMBUS4_TX
,
DMACH_AC97_MICIN
,
DMACH_AC97_PCMIN
,
DMACH_AC97_PCMOUT
,
DMACH_MIPI_HSI0
,
DMACH_MIPI_HSI2
,
DMACH_MIPI_HSI4
,
DMACH_MIPI_HSI6
,
};
static
struct
dma_pl330_platdata
exynos_pdma0_pdata
;
static
AMBA_AHB_DEVICE
(
exynos
4
_pdma0
,
"dma-pl330.0"
,
0x00041330
,
EXYNOS4_PA_PDMA0
,
{
EXYNOS4_IRQ_PDMA0
},
&
exynos
4
_pdma0_pdata
);
static
AMBA_AHB_DEVICE
(
exynos_pdma0
,
"dma-pl330.0"
,
0x00041330
,
EXYNOS4_PA_PDMA0
,
{
EXYNOS4_IRQ_PDMA0
},
&
exynos_pdma0_pdata
);
static
u8
exynos4210_pdma1_peri
[]
=
{
DMACH_PCM0_RX
,
...
...
@@ -169,10 +204,45 @@ static u8 exynos4212_pdma1_peri[] = {
DMACH_MIPI_HSI7
,
};
static
struct
dma_pl330_platdata
exynos4_pdma1_pdata
;
static
u8
exynos5250_pdma1_peri
[]
=
{
DMACH_PCM0_RX
,
DMACH_PCM0_TX
,
DMACH_PCM1_RX
,
DMACH_PCM1_TX
,
DMACH_SPI1_RX
,
DMACH_SPI1_TX
,
DMACH_PWM
,
DMACH_SPDIF
,
DMACH_I2S0S_TX
,
DMACH_I2S0_RX
,
DMACH_I2S0_TX
,
DMACH_I2S1_RX
,
DMACH_I2S1_TX
,
DMACH_UART0_RX
,
DMACH_UART0_TX
,
DMACH_UART1_RX
,
DMACH_UART1_TX
,
DMACH_UART3_RX
,
DMACH_UART3_TX
,
DMACH_SLIMBUS1_RX
,
DMACH_SLIMBUS1_TX
,
DMACH_SLIMBUS3_RX
,
DMACH_SLIMBUS3_TX
,
DMACH_SLIMBUS5_RX
,
DMACH_SLIMBUS5_TX
,
DMACH_SLIMBUS0AUX_RX
,
DMACH_SLIMBUS0AUX_TX
,
DMACH_DISP1
,
DMACH_MIPI_HSI1
,
DMACH_MIPI_HSI3
,
DMACH_MIPI_HSI5
,
DMACH_MIPI_HSI7
,
};
static
AMBA_AHB_DEVICE
(
exynos4_pdma1
,
"dma-pl330.1"
,
0x00041330
,
EXYNOS4_PA_PDMA1
,
{
EXYNOS4_IRQ_PDMA1
},
&
exynos4_pdma1_pdata
);
static
struct
dma_pl330_platdata
exynos_pdma1_pdata
;
static
AMBA_AHB_DEVICE
(
exynos_pdma1
,
"dma-pl330.1"
,
0x00041330
,
EXYNOS4_PA_PDMA1
,
{
EXYNOS4_IRQ_PDMA1
},
&
exynos_pdma1_pdata
);
static
u8
mdma_peri
[]
=
{
DMACH_MTOM_0
,
...
...
@@ -185,46 +255,63 @@ static u8 mdma_peri[] = {
DMACH_MTOM_7
,
};
static
struct
dma_pl330_platdata
exynos
4
_mdma1_pdata
=
{
static
struct
dma_pl330_platdata
exynos_mdma1_pdata
=
{
.
nr_valid_peri
=
ARRAY_SIZE
(
mdma_peri
),
.
peri_id
=
mdma_peri
,
};
static
AMBA_AHB_DEVICE
(
exynos
4
_mdma1
,
"dma-pl330.2"
,
0x00041330
,
EXYNOS4_PA_MDMA1
,
{
EXYNOS4_IRQ_MDMA1
},
&
exynos
4
_mdma1_pdata
);
static
AMBA_AHB_DEVICE
(
exynos_mdma1
,
"dma-pl330.2"
,
0x00041330
,
EXYNOS4_PA_MDMA1
,
{
EXYNOS4_IRQ_MDMA1
},
&
exynos_mdma1_pdata
);
static
int
__init
exynos
4
_dma_init
(
void
)
static
int
__init
exynos_dma_init
(
void
)
{
if
(
of_have_populated_dt
())
return
0
;
if
(
soc_is_exynos4210
())
{
exynos
4
_pdma0_pdata
.
nr_valid_peri
=
exynos_pdma0_pdata
.
nr_valid_peri
=
ARRAY_SIZE
(
exynos4210_pdma0_peri
);
exynos
4
_pdma0_pdata
.
peri_id
=
exynos4210_pdma0_peri
;
exynos
4
_pdma1_pdata
.
nr_valid_peri
=
exynos_pdma0_pdata
.
peri_id
=
exynos4210_pdma0_peri
;
exynos_pdma1_pdata
.
nr_valid_peri
=
ARRAY_SIZE
(
exynos4210_pdma1_peri
);
exynos
4
_pdma1_pdata
.
peri_id
=
exynos4210_pdma1_peri
;
exynos_pdma1_pdata
.
peri_id
=
exynos4210_pdma1_peri
;
}
else
if
(
soc_is_exynos4212
()
||
soc_is_exynos4412
())
{
exynos
4
_pdma0_pdata
.
nr_valid_peri
=
exynos_pdma0_pdata
.
nr_valid_peri
=
ARRAY_SIZE
(
exynos4212_pdma0_peri
);
exynos
4
_pdma0_pdata
.
peri_id
=
exynos4212_pdma0_peri
;
exynos
4
_pdma1_pdata
.
nr_valid_peri
=
exynos_pdma0_pdata
.
peri_id
=
exynos4212_pdma0_peri
;
exynos_pdma1_pdata
.
nr_valid_peri
=
ARRAY_SIZE
(
exynos4212_pdma1_peri
);
exynos4_pdma1_pdata
.
peri_id
=
exynos4212_pdma1_peri
;
exynos_pdma1_pdata
.
peri_id
=
exynos4212_pdma1_peri
;
}
else
if
(
soc_is_exynos5250
())
{
exynos_pdma0_pdata
.
nr_valid_peri
=
ARRAY_SIZE
(
exynos5250_pdma0_peri
);
exynos_pdma0_pdata
.
peri_id
=
exynos5250_pdma0_peri
;
exynos_pdma1_pdata
.
nr_valid_peri
=
ARRAY_SIZE
(
exynos5250_pdma1_peri
);
exynos_pdma1_pdata
.
peri_id
=
exynos5250_pdma1_peri
;
exynos_pdma0_device
.
res
.
start
=
EXYNOS5_PA_PDMA0
;
exynos_pdma0_device
.
res
.
end
=
EXYNOS5_PA_PDMA0
+
SZ_4K
;
exynos_pdma0_device
.
irq
[
0
]
=
EXYNOS5_IRQ_PDMA0
;
exynos_pdma1_device
.
res
.
start
=
EXYNOS5_PA_PDMA1
;
exynos_pdma1_device
.
res
.
end
=
EXYNOS5_PA_PDMA1
+
SZ_4K
;
exynos_pdma0_device
.
irq
[
0
]
=
EXYNOS5_IRQ_PDMA1
;
exynos_mdma1_device
.
res
.
start
=
EXYNOS5_PA_MDMA1
;
exynos_mdma1_device
.
res
.
end
=
EXYNOS5_PA_MDMA1
+
SZ_4K
;
exynos_pdma0_device
.
irq
[
0
]
=
EXYNOS5_IRQ_MDMA1
;
}
dma_cap_set
(
DMA_SLAVE
,
exynos
4
_pdma0_pdata
.
cap_mask
);
dma_cap_set
(
DMA_CYCLIC
,
exynos
4
_pdma0_pdata
.
cap_mask
);
amba_device_register
(
&
exynos
4
_pdma0_device
,
&
iomem_resource
);
dma_cap_set
(
DMA_SLAVE
,
exynos_pdma0_pdata
.
cap_mask
);
dma_cap_set
(
DMA_CYCLIC
,
exynos_pdma0_pdata
.
cap_mask
);
amba_device_register
(
&
exynos_pdma0_device
,
&
iomem_resource
);
dma_cap_set
(
DMA_SLAVE
,
exynos
4
_pdma1_pdata
.
cap_mask
);
dma_cap_set
(
DMA_CYCLIC
,
exynos
4
_pdma1_pdata
.
cap_mask
);
amba_device_register
(
&
exynos
4
_pdma1_device
,
&
iomem_resource
);
dma_cap_set
(
DMA_SLAVE
,
exynos_pdma1_pdata
.
cap_mask
);
dma_cap_set
(
DMA_CYCLIC
,
exynos_pdma1_pdata
.
cap_mask
);
amba_device_register
(
&
exynos_pdma1_device
,
&
iomem_resource
);
dma_cap_set
(
DMA_MEMCPY
,
exynos
4
_mdma1_pdata
.
cap_mask
);
amba_device_register
(
&
exynos
4
_mdma1_device
,
&
iomem_resource
);
dma_cap_set
(
DMA_MEMCPY
,
exynos_mdma1_pdata
.
cap_mask
);
amba_device_register
(
&
exynos_mdma1_device
,
&
iomem_resource
);
return
0
;
}
arch_initcall
(
exynos
4
_dma_init
);
arch_initcall
(
exynos_dma_init
);
arch/arm/mach-exynos/include/mach/irqs.h
View file @
ab5a4e63
...
...
@@ -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)
...
...
@@ -220,24 +227,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
View file @
ab5a4e63
...
...
@@ -34,6 +34,9 @@
#define EXYNOS4_PA_JPEG 0x11840000
/* x = 0...1 */
#define EXYNOS4_PA_FIMC_LITE(x) (0x12390000 + ((x) * 0x10000))
#define EXYNOS4_PA_G2D 0x12800000
#define EXYNOS4_PA_I2S0 0x03830000
...
...
@@ -95,6 +98,7 @@
#define EXYNOS5_PA_PDMA1 0x121B0000
#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
...
...
@@ -103,6 +107,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
...
...
@@ -110,6 +120,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
View file @
ab5a4e63
...
...
@@ -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)
...
...
@@ -303,6 +306,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-pmu.h
View file @
ab5a4e63
...
...
@@ -177,7 +177,7 @@
#define S5P_PMU_LCD1_CONF S5P_PMUREG(0x3CA0)
/* Only for EXYNOS4
2
12 */
/* Only for EXYNOS4
x
12 */
#define S5P_ISP_ARM_LOWPWR S5P_PMUREG(0x1050)
#define S5P_DIS_IRQ_ISP_ARM_LOCAL_LOWPWR S5P_PMUREG(0x1054)
#define S5P_DIS_IRQ_ISP_ARM_CENTRAL_LOWPWR S5P_PMUREG(0x1058)
...
...
@@ -218,4 +218,12 @@
#define S5P_SECSS_MEM_OPTION S5P_PMUREG(0x2EC8)
#define S5P_ROTATOR_MEM_OPTION S5P_PMUREG(0x2F48)
/* Only for EXYNOS4412 */
#define S5P_ARM_CORE2_LOWPWR S5P_PMUREG(0x1020)
#define S5P_DIS_IRQ_CORE2 S5P_PMUREG(0x1024)
#define S5P_DIS_IRQ_CENTRAL2 S5P_PMUREG(0x1028)
#define S5P_ARM_CORE3_LOWPWR S5P_PMUREG(0x1030)
#define S5P_DIS_IRQ_CORE3 S5P_PMUREG(0x1034)
#define S5P_DIS_IRQ_CENTRAL3 S5P_PMUREG(0x1038)
#endif
/* __ASM_ARCH_REGS_PMU_H */
arch/arm/mach-exynos/include/mach/regs-sysmmu.h
deleted
100644 → 0
View file @
36be5051
/* 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/spi-clocks.h
View file @
ab5a4e63
...
...
@@ -11,6 +11,6 @@
#define __ASM_ARCH_SPI_CLKS_H __FILE__
/* Must source from SCLK_SPI */
#define EXYNOS
4
_SPI_SRCCLK_SCLK 0
#define EXYNOS_SPI_SRCCLK_SCLK 0
#endif
/* __ASM_ARCH_SPI_CLKS_H */
arch/arm/mach-exynos/include/mach/sysmmu.h
View file @
ab5a4e63
/* linux/arch/arm/mach-exynos4/include/mach/sysmmu.h
*
* Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
/*
* Copyright (c) 2011-2012 Samsung Electronics Co., Ltd.
* http://www.samsung.com
*
*
Samsung sysmmu driver for EXYNOS4
*
EXYNOS - System MMU support
*
* 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_ARM_ARCH_SYSMMU_H
#define __ASM_ARM_ARCH_SYSMMU_H __FILE__
enum
exynos4_sysmmu_ips
{
SYSMMU_MDMA
,
SYSMMU_SSS
,
SYSMMU_FIMC0
,
SYSMMU_FIMC1
,
SYSMMU_FIMC2
,
SYSMMU_FIMC3
,
SYSMMU_JPEG
,
SYSMMU_FIMD0
,
SYSMMU_FIMD1
,
SYSMMU_PCIe
,
SYSMMU_G2D
,
SYSMMU_ROTATOR
,
SYSMMU_MDMA2
,
SYSMMU_TV
,
SYSMMU_MFC_L
,
SYSMMU_MFC_R
,
EXYNOS4_SYSMMU_TOTAL_IPNUM
,
*/
#ifndef _ARM_MACH_EXYNOS_SYSMMU_H_
#define _ARM_MACH_EXYNOS_SYSMMU_H_
struct
sysmmu_platform_data
{
char
*
dbgname
;
/* comma(,) separated list of clock names for clock gating */
char
*
clockname
;
};
#define S5P_SYSMMU_TOTAL_IPNUM EXYNOS4_SYSMMU_TOTAL_IPNUM
#define SYSMMU_DEVNAME_BASE "exynos-sysmmu"
#define SYSMMU_CLOCK_NAME "sysmmu"
#define SYSMMU_CLOCK_NAME2 "sysmmu_mc"
#ifdef CONFIG_EXYNOS_DEV_SYSMMU
#include <linux/device.h>
struct
platform_device
;
#define SYSMMU_PLATDEV(ipname) exynos_device_sysmmu_##ipname
extern
struct
platform_device
SYSMMU_PLATDEV
(
mfc_l
);
extern
struct
platform_device
SYSMMU_PLATDEV
(
mfc_r
);
extern
struct
platform_device
SYSMMU_PLATDEV
(
tv
);
extern
struct
platform_device
SYSMMU_PLATDEV
(
jpeg
);
extern
struct
platform_device
SYSMMU_PLATDEV
(
rot
);
extern
struct
platform_device
SYSMMU_PLATDEV
(
fimc0
);
extern
struct
platform_device
SYSMMU_PLATDEV
(
fimc1
);
extern
struct
platform_device
SYSMMU_PLATDEV
(
fimc2
);
extern
struct
platform_device
SYSMMU_PLATDEV
(
fimc3
);
extern
struct
platform_device
SYSMMU_PLATDEV
(
gsc0
);
extern
struct
platform_device
SYSMMU_PLATDEV
(
gsc1
);
extern
struct
platform_device
SYSMMU_PLATDEV
(
gsc2
);
extern
struct
platform_device
SYSMMU_PLATDEV
(
gsc3
);
extern
struct
platform_device
SYSMMU_PLATDEV
(
isp
);
extern
struct
platform_device
SYSMMU_PLATDEV
(
fimd0
);
extern
struct
platform_device
SYSMMU_PLATDEV
(
fimd1
);
extern
struct
platform_device
SYSMMU_PLATDEV
(
camif0
);
extern
struct
platform_device
SYSMMU_PLATDEV
(
camif1
);
extern
struct
platform_device
SYSMMU_PLATDEV
(
2
d
);
extern
const
char
*
sysmmu_ips_name
[
EXYNOS4_SYSMMU_TOTAL_IPNUM
];
#ifdef CONFIG_IOMMU_API
static
inline
void
platform_set_sysmmu
(
struct
device
*
sysmmu
,
struct
device
*
dev
)
{
dev
->
archdata
.
iommu
=
sysmmu
;
}
#endif
typedef
enum
exynos4_sysmmu_ips
sysmmu_ips
;
#else
/* !CONFIG_EXYNOS_DEV_SYSMMU */
#define platform_set_sysmmu(dev, sysmmu) do { } while (0)
#endif
void
sysmmu_clk_init
(
struct
device
*
dev
,
sysmmu_ips
ips
);
void
sysmmu_clk_enable
(
sysmmu_ips
ips
);
void
sysmmu_clk_disable
(
sysmmu_ips
ips
);
#define SYSMMU_CLOCK_DEVNAME(ipname, id) (SYSMMU_DEVNAME_BASE "." #id)
#endif
/* _
_ASM_ARM_ARCH_SYSMMU_H
*/
#endif
/* _
ARM_MACH_EXYNOS_SYSMMU_H_
*/
arch/arm/mach-exynos/mach-armlex4210.c
View file @
ab5a4e63
...
...
@@ -157,7 +157,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
View file @
ab5a4e63
...
...
@@ -281,7 +281,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
,
...
...
arch/arm/mach-exynos/pm.c
View file @
ab5a4e63
...
...
@@ -313,7 +313,7 @@ static int exynos4_pm_suspend(void)
tmp
&=
~
S5P_CENTRAL_LOWPWR_CFG
;
__raw_writel
(
tmp
,
S5P_CENTRAL_SEQ_CONFIGURATION
);
if
(
soc_is_exynos4212
())
{
if
(
soc_is_exynos4212
()
||
soc_is_exynos4412
()
)
{
tmp
=
__raw_readl
(
S5P_CENTRAL_SEQ_OPTION
);
tmp
&=
~
(
S5P_USE_STANDBYWFI_ISP_ARM
|
S5P_USE_STANDBYWFE_ISP_ARM
);
...
...
arch/arm/mach-exynos/pmu.c
View file @
ab5a4e63
...
...
@@ -94,7 +94,7 @@ static struct exynos4_pmu_conf exynos4210_pmu_config[] = {
{
PMU_TABLE_END
,},
};
static
struct
exynos4_pmu_conf
exynos4
2
12_pmu_config
[]
=
{
static
struct
exynos4_pmu_conf
exynos4
x
12_pmu_config
[]
=
{
{
S5P_ARM_CORE0_LOWPWR
,
{
0x0
,
0x0
,
0x2
}
},
{
S5P_DIS_IRQ_CORE0
,
{
0x0
,
0x0
,
0x0
}
},
{
S5P_DIS_IRQ_CENTRAL0
,
{
0x0
,
0x0
,
0x0
}
},
...
...
@@ -202,6 +202,16 @@ static struct exynos4_pmu_conf exynos4212_pmu_config[] = {
{
PMU_TABLE_END
,},
};
static
struct
exynos4_pmu_conf
exynos4412_pmu_config
[]
=
{
{
S5P_ARM_CORE2_LOWPWR
,
{
0x0
,
0x0
,
0x2
}
},
{
S5P_DIS_IRQ_CORE2
,
{
0x0
,
0x0
,
0x0
}
},
{
S5P_DIS_IRQ_CENTRAL2
,
{
0x0
,
0x0
,
0x0
}
},
{
S5P_ARM_CORE3_LOWPWR
,
{
0x0
,
0x0
,
0x2
}
},
{
S5P_DIS_IRQ_CORE3
,
{
0x0
,
0x0
,
0x0
}
},
{
S5P_DIS_IRQ_CENTRAL3
,
{
0x0
,
0x0
,
0x0
}
},
{
PMU_TABLE_END
,},
};
void
exynos4_sys_powerdown_conf
(
enum
sys_powerdown
mode
)
{
unsigned
int
i
;
...
...
@@ -209,6 +219,12 @@ void exynos4_sys_powerdown_conf(enum sys_powerdown mode)
for
(
i
=
0
;
(
exynos4_pmu_config
[
i
].
reg
!=
PMU_TABLE_END
)
;
i
++
)
__raw_writel
(
exynos4_pmu_config
[
i
].
val
[
mode
],
exynos4_pmu_config
[
i
].
reg
);
if
(
soc_is_exynos4412
())
{
for
(
i
=
0
;
exynos4412_pmu_config
[
i
].
reg
!=
PMU_TABLE_END
;
i
++
)
__raw_writel
(
exynos4412_pmu_config
[
i
].
val
[
mode
],
exynos4412_pmu_config
[
i
].
reg
);
}
}
static
int
__init
exynos4_pmu_init
(
void
)
...
...
@@ -218,9 +234,9 @@ static int __init exynos4_pmu_init(void)
if
(
soc_is_exynos4210
())
{
exynos4_pmu_config
=
exynos4210_pmu_config
;
pr_info
(
"EXYNOS4210 PMU Initialize
\n
"
);
}
else
if
(
soc_is_exynos4212
())
{
exynos4_pmu_config
=
exynos4
2
12_pmu_config
;
pr_info
(
"EXYNOS4
2
12 PMU Initialize
\n
"
);
}
else
if
(
soc_is_exynos4212
()
||
soc_is_exynos4412
()
)
{
exynos4_pmu_config
=
exynos4
x
12_pmu_config
;
pr_info
(
"EXYNOS4
x
12 PMU Initialize
\n
"
);
}
else
{
pr_info
(
"EXYNOS4: PMU not supported
\n
"
);
}
...
...
arch/arm/mach-s3c24xx/Kconfig
View file @
ab5a4e63
...
...
@@ -518,6 +518,11 @@ config S3C2443_DMA
help
Internal config node for S3C2443 DMA support
config S3C2443_SETUP_SPI
bool
help
Common setup code for SPI GPIO configurations
endif # CPU_S3C2443 || CPU_S3C2416
if CPU_S3C2443
...
...
arch/arm/mach-s3c24xx/Makefile
View file @
ab5a4e63
...
...
@@ -91,5 +91,6 @@ obj-$(CONFIG_MACH_OSIRIS_DVS) += mach-osiris-dvs.o
# device setup
obj-$(CONFIG_S3C2416_SETUP_SDHCI_GPIO)
+=
setup-sdhci-gpio.o
obj-$(CONFIG_S3C2443_SETUP_SPI)
+=
setup-spi.o
obj-$(CONFIG_ARCH_S3C24XX)
+=
setup-i2c.o
obj-$(CONFIG_S3C24XX_SETUP_TS)
+=
setup-ts.o
arch/arm/mach-s3c24xx/clock-s3c2416.c
View file @
ab5a4e63
...
...
@@ -144,6 +144,7 @@ static struct clk_lookup s3c2416_clk_lookup[] = {
CLKDEV_INIT
(
"s3c-sdhci.0"
,
"mmc_busclk.0"
,
&
hsmmc0_clk
),
CLKDEV_INIT
(
"s3c-sdhci.0"
,
"mmc_busclk.2"
,
&
hsmmc_mux0
.
clk
),
CLKDEV_INIT
(
"s3c-sdhci.1"
,
"mmc_busclk.2"
,
&
hsmmc_mux1
.
clk
),
CLKDEV_INIT
(
"s3c64xx-spi.0"
,
"spi_busclk2"
,
&
hsspi_mux
.
clk
),
};
void
__init
s3c2416_init_clocks
(
int
xtal
)
...
...
arch/arm/mach-s3c24xx/clock-s3c2443.c
View file @
ab5a4e63
...
...
@@ -179,6 +179,11 @@ static struct clk *clks[] __initdata = {
&
clk_hsmmc
,
};
static
struct
clk_lookup
s3c2443_clk_lookup
[]
=
{
CLKDEV_INIT
(
"s3c-sdhci.1"
,
"mmc_busclk.2"
,
&
clk_hsmmc
),
CLKDEV_INIT
(
"s3c64xx-spi.0"
,
"spi_busclk2"
,
&
clk_hsspi
.
clk
),
};
void
__init
s3c2443_init_clocks
(
int
xtal
)
{
unsigned
long
epllcon
=
__raw_readl
(
S3C2443_EPLLCON
);
...
...
@@ -210,6 +215,7 @@ void __init s3c2443_init_clocks(int xtal)
s3c_register_clocks
(
init_clocks_off
,
ARRAY_SIZE
(
init_clocks_off
));
s3c_disable_clocks
(
init_clocks_off
,
ARRAY_SIZE
(
init_clocks_off
));
clkdev_add_table
(
s3c2443_clk_lookup
,
ARRAY_SIZE
(
s3c2443_clk_lookup
));
s3c_pwmclk_init
();
}
arch/arm/mach-s3c24xx/common-s3c2443.c
View file @
ab5a4e63
...
...
@@ -423,11 +423,6 @@ static struct clk init_clocks_off[] = {
.
parent
=
&
clk_p
,
.
enable
=
s3c2443_clkcon_enable_p
,
.
ctrlbit
=
S3C2443_PCLKCON_IIS
,
},
{
.
name
=
"hsspi"
,
.
parent
=
&
clk_p
,
.
enable
=
s3c2443_clkcon_enable_p
,
.
ctrlbit
=
S3C2443_PCLKCON_HSSPI
,
},
{
.
name
=
"adc"
,
.
parent
=
&
clk_p
,
...
...
@@ -562,6 +557,14 @@ static struct clk hsmmc1_clk = {
.
ctrlbit
=
S3C2443_HCLKCON_HSMMC
,
};
static
struct
clk
hsspi_clk
=
{
.
name
=
"spi"
,
.
devname
=
"s3c64xx-spi.0"
,
.
parent
=
&
clk_p
,
.
enable
=
s3c2443_clkcon_enable_p
,
.
ctrlbit
=
S3C2443_PCLKCON_HSSPI
,
};
/* EPLLCON compatible enough to get on/off information */
void
__init_or_cpufreq
s3c2443_common_setup_clocks
(
pll_fn
get_mpll
)
...
...
@@ -612,6 +615,7 @@ static struct clk *clks[] __initdata = {
&
clk_usb_bus
,
&
clk_armdiv
,
&
hsmmc1_clk
,
&
hsspi_clk
,
};
static
struct
clksrc_clk
*
clksrcs
[]
__initdata
=
{
...
...
@@ -629,6 +633,7 @@ static struct clk_lookup s3c2443_clk_lookup[] = {
CLKDEV_INIT
(
NULL
,
"clk_uart_baud2"
,
&
clk_p
),
CLKDEV_INIT
(
NULL
,
"clk_uart_baud3"
,
&
clk_esys_uart
.
clk
),
CLKDEV_INIT
(
"s3c-sdhci.1"
,
"mmc_busclk.0"
,
&
hsmmc1_clk
),
CLKDEV_INIT
(
"s3c64xx-spi.0"
,
"spi_busclk0"
,
&
hsspi_clk
),
};
void
__init
s3c2443_common_init_clocks
(
int
xtal
,
pll_fn
get_mpll
,
...
...
arch/arm/mach-s3c24xx/dma-s3c2443.c
View file @
ab5a4e63
...
...
@@ -55,12 +55,20 @@ static struct s3c24xx_dma_map __initdata s3c2443_dma_mappings[] = {
.
name
=
"sdi"
,
.
channels
=
MAP
(
S3C2443_DMAREQSEL_SDI
),
},
[
DMACH_SPI0
]
=
{
.
name
=
"spi0"
,
[
DMACH_SPI0_RX
]
=
{
.
name
=
"spi0-rx"
,
.
channels
=
MAP
(
S3C2443_DMAREQSEL_SPI0RX
),
},
[
DMACH_SPI0_TX
]
=
{
.
name
=
"spi0-tx"
,
.
channels
=
MAP
(
S3C2443_DMAREQSEL_SPI0TX
),
},
[
DMACH_SPI1
]
=
{
/* only on S3C2443/S3C2450 */
.
name
=
"spi1"
,
[
DMACH_SPI1_RX
]
=
{
/* only on S3C2443/S3C2450 */
.
name
=
"spi1-rx"
,
.
channels
=
MAP
(
S3C2443_DMAREQSEL_SPI1RX
),
},
[
DMACH_SPI1_TX
]
=
{
/* only on S3C2443/S3C2450 */
.
name
=
"spi1-tx"
,
.
channels
=
MAP
(
S3C2443_DMAREQSEL_SPI1TX
),
},
[
DMACH_UART0
]
=
{
...
...
arch/arm/mach-s3c24xx/include/mach/dma.h
View file @
ab5a4e63
...
...
@@ -47,6 +47,10 @@ enum dma_ch {
DMACH_UART2_SRC2
,
DMACH_UART3
,
/* s3c2443 has extra uart */
DMACH_UART3_SRC2
,
DMACH_SPI0_TX
,
/* s3c2443/2416/2450 hsspi0 */
DMACH_SPI0_RX
,
/* s3c2443/2416/2450 hsspi0 */
DMACH_SPI1_TX
,
/* s3c2443/2450 hsspi1 */
DMACH_SPI1_RX
,
/* s3c2443/2450 hsspi1 */
DMACH_MAX
,
/* the end entry */
};
...
...
arch/arm/mach-s3c24xx/include/mach/map.h
View file @
ab5a4e63
...
...
@@ -98,6 +98,8 @@
/* SPI */
#define S3C2410_PA_SPI (0x59000000)
#define S3C2443_PA_SPI0 (0x52000000)
#define S3C2443_PA_SPI1 S3C2410_PA_SPI
/* SDI */
#define S3C2410_PA_SDI (0x5A000000)
...
...
@@ -162,4 +164,7 @@
#define S3C_PA_WDT S3C2410_PA_WATCHDOG
#define S3C_PA_NAND S3C24XX_PA_NAND
#define S3C_PA_SPI0 S3C2443_PA_SPI0
#define S3C_PA_SPI1 S3C2443_PA_SPI1
#endif
/* __ASM_ARCH_MAP_H */
arch/arm/mach-s3c24xx/setup-spi.c
0 → 100644
View file @
ab5a4e63
/*
* HS-SPI device setup for S3C2443/S3C2416
*
* Copyright (C) 2011 Samsung Electronics Ltd.
* http://www.samsung.com/
*
* 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.
*/
#include <linux/gpio.h>
#include <linux/platform_device.h>
#include <plat/gpio-cfg.h>
#include <plat/s3c64xx-spi.h>
#include <mach/hardware.h>
#include <mach/regs-gpio.h>
#ifdef CONFIG_S3C64XX_DEV_SPI0
struct
s3c64xx_spi_info
s3c64xx_spi0_pdata
__initdata
=
{
.
fifo_lvl_mask
=
0x7f
,
.
rx_lvl_offset
=
13
,
.
tx_st_done
=
21
,
.
high_speed
=
1
,
};
int
s3c64xx_spi0_cfg_gpio
(
struct
platform_device
*
pdev
)
{
/* enable hsspi bit in misccr */
s3c2410_modify_misccr
(
S3C2416_MISCCR_HSSPI_EN2
,
1
);
s3c_gpio_cfgall_range
(
S3C2410_GPE
(
11
),
3
,
S3C_GPIO_SFN
(
2
),
S3C_GPIO_PULL_UP
);
return
0
;
}
#endif
arch/arm/plat-s5p/Kconfig
View file @
ab5a4e63
...
...
@@ -50,14 +50,6 @@ config S5P_PM
Common code for power management support on S5P and newer SoCs
Note: Do not select this for S5P6440 and S5P6450.
comment "System MMU"
config S5P_SYSTEM_MMU
bool "S5P SYSTEM MMU"
depends on ARCH_EXYNOS4
help
Say Y here if you want to enable System MMU
config S5P_SLEEP
bool
help
...
...
arch/arm/plat-s5p/Makefile
View file @
ab5a4e63
...
...
@@ -16,7 +16,6 @@ obj-y += clock.o
obj-y
+=
irq.o
obj-$(CONFIG_S5P_EXT_INT)
+=
irq-eint.o
obj-$(CONFIG_S5P_GPIO_INT)
+=
irq-gpioint.o
obj-$(CONFIG_S5P_SYSTEM_MMU)
+=
sysmmu.o
obj-$(CONFIG_S5P_PM)
+=
pm.o irq-pm.o
obj-$(CONFIG_S5P_SLEEP)
+=
sleep.o
obj-$(CONFIG_S5P_HRT)
+=
s5p-time.o
...
...
arch/arm/plat-s5p/sysmmu.c
deleted
100644 → 0
View file @
36be5051
/* linux/arch/arm/plat-s5p/sysmmu.c
*
* Copyright (c) 2010 Samsung Electronics Co., Ltd.
* http://www.samsung.com
*
* 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.
*/
#include <linux/io.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/export.h>
#include <asm/pgtable.h>
#include <mach/map.h>
#include <mach/regs-sysmmu.h>
#include <plat/sysmmu.h>
#define CTRL_ENABLE 0x5
#define CTRL_BLOCK 0x7
#define CTRL_DISABLE 0x0
static
struct
device
*
dev
;
static
unsigned
short
fault_reg_offset
[
SYSMMU_FAULTS_NUM
]
=
{
S5P_PAGE_FAULT_ADDR
,
S5P_AR_FAULT_ADDR
,
S5P_AW_FAULT_ADDR
,
S5P_DEFAULT_SLAVE_ADDR
,
S5P_AR_FAULT_ADDR
,
S5P_AR_FAULT_ADDR
,
S5P_AW_FAULT_ADDR
,
S5P_AW_FAULT_ADDR
};
static
char
*
sysmmu_fault_name
[
SYSMMU_FAULTS_NUM
]
=
{
"PAGE FAULT"
,
"AR MULTI-HIT FAULT"
,
"AW MULTI-HIT FAULT"
,
"BUS ERROR"
,
"AR SECURITY PROTECTION FAULT"
,
"AR ACCESS PROTECTION FAULT"
,
"AW SECURITY PROTECTION FAULT"
,
"AW ACCESS PROTECTION FAULT"
};
static
int
(
*
fault_handlers
[
S5P_SYSMMU_TOTAL_IPNUM
])(
enum
S5P_SYSMMU_INTERRUPT_TYPE
itype
,
unsigned
long
pgtable_base
,
unsigned
long
fault_addr
);
/*
* If adjacent 2 bits are true, the system MMU is enabled.
* The system MMU is disabled, otherwise.
*/
static
unsigned
long
sysmmu_states
;
static
inline
void
set_sysmmu_active
(
sysmmu_ips
ips
)
{
sysmmu_states
|=
3
<<
(
ips
*
2
);
}
static
inline
void
set_sysmmu_inactive
(
sysmmu_ips
ips
)
{
sysmmu_states
&=
~
(
3
<<
(
ips
*
2
));
}
static
inline
int
is_sysmmu_active
(
sysmmu_ips
ips
)
{
return
sysmmu_states
&
(
3
<<
(
ips
*
2
));
}
static
void
__iomem
*
sysmmusfrs
[
S5P_SYSMMU_TOTAL_IPNUM
];
static
inline
void
sysmmu_block
(
sysmmu_ips
ips
)
{
__raw_writel
(
CTRL_BLOCK
,
sysmmusfrs
[
ips
]
+
S5P_MMU_CTRL
);
dev_dbg
(
dev
,
"%s is blocked.
\n
"
,
sysmmu_ips_name
[
ips
]);
}
static
inline
void
sysmmu_unblock
(
sysmmu_ips
ips
)
{
__raw_writel
(
CTRL_ENABLE
,
sysmmusfrs
[
ips
]
+
S5P_MMU_CTRL
);
dev_dbg
(
dev
,
"%s is unblocked.
\n
"
,
sysmmu_ips_name
[
ips
]);
}
static
inline
void
__sysmmu_tlb_invalidate
(
sysmmu_ips
ips
)
{
__raw_writel
(
0x1
,
sysmmusfrs
[
ips
]
+
S5P_MMU_FLUSH
);
dev_dbg
(
dev
,
"TLB of %s is invalidated.
\n
"
,
sysmmu_ips_name
[
ips
]);
}
static
inline
void
__sysmmu_set_ptbase
(
sysmmu_ips
ips
,
unsigned
long
pgd
)
{
if
(
unlikely
(
pgd
==
0
))
{
pgd
=
(
unsigned
long
)
ZERO_PAGE
(
0
);
__raw_writel
(
0x20
,
sysmmusfrs
[
ips
]
+
S5P_MMU_CFG
);
/* 4KB LV1 */
}
else
{
__raw_writel
(
0x0
,
sysmmusfrs
[
ips
]
+
S5P_MMU_CFG
);
/* 16KB LV1 */
}
__raw_writel
(
pgd
,
sysmmusfrs
[
ips
]
+
S5P_PT_BASE_ADDR
);
dev_dbg
(
dev
,
"Page table base of %s is initialized with 0x%08lX.
\n
"
,
sysmmu_ips_name
[
ips
],
pgd
);
__sysmmu_tlb_invalidate
(
ips
);
}
void
sysmmu_set_fault_handler
(
sysmmu_ips
ips
,
int
(
*
handler
)(
enum
S5P_SYSMMU_INTERRUPT_TYPE
itype
,
unsigned
long
pgtable_base
,
unsigned
long
fault_addr
))
{
BUG_ON
(
!
((
ips
>=
SYSMMU_MDMA
)
&&
(
ips
<
S5P_SYSMMU_TOTAL_IPNUM
)));
fault_handlers
[
ips
]
=
handler
;
}
static
irqreturn_t
s5p_sysmmu_irq
(
int
irq
,
void
*
dev_id
)
{
/* SYSMMU is in blocked when interrupt occurred. */
unsigned
long
base
=
0
;
sysmmu_ips
ips
=
(
sysmmu_ips
)
dev_id
;
enum
S5P_SYSMMU_INTERRUPT_TYPE
itype
;
itype
=
(
enum
S5P_SYSMMU_INTERRUPT_TYPE
)
__ffs
(
__raw_readl
(
sysmmusfrs
[
ips
]
+
S5P_INT_STATUS
));
BUG_ON
(
!
((
itype
>=
0
)
&&
(
itype
<
8
)));
dev_alert
(
dev
,
"%s occurred by %s.
\n
"
,
sysmmu_fault_name
[
itype
],
sysmmu_ips_name
[
ips
]);
if
(
fault_handlers
[
ips
])
{
unsigned
long
addr
;
base
=
__raw_readl
(
sysmmusfrs
[
ips
]
+
S5P_PT_BASE_ADDR
);
addr
=
__raw_readl
(
sysmmusfrs
[
ips
]
+
fault_reg_offset
[
itype
]);
if
(
fault_handlers
[
ips
](
itype
,
base
,
addr
))
{
__raw_writel
(
1
<<
itype
,
sysmmusfrs
[
ips
]
+
S5P_INT_CLEAR
);
dev_notice
(
dev
,
"%s from %s is resolved."
" Retrying translation.
\n
"
,
sysmmu_fault_name
[
itype
],
sysmmu_ips_name
[
ips
]);
}
else
{
base
=
0
;
}
}
sysmmu_unblock
(
ips
);
if
(
!
base
)
dev_notice
(
dev
,
"%s from %s is not handled.
\n
"
,
sysmmu_fault_name
[
itype
],
sysmmu_ips_name
[
ips
]);
return
IRQ_HANDLED
;
}
void
s5p_sysmmu_set_tablebase_pgd
(
sysmmu_ips
ips
,
unsigned
long
pgd
)
{
if
(
is_sysmmu_active
(
ips
))
{
sysmmu_block
(
ips
);
__sysmmu_set_ptbase
(
ips
,
pgd
);
sysmmu_unblock
(
ips
);
}
else
{
dev_dbg
(
dev
,
"%s is disabled. "
"Skipping initializing page table base.
\n
"
,
sysmmu_ips_name
[
ips
]);
}
}
void
s5p_sysmmu_enable
(
sysmmu_ips
ips
,
unsigned
long
pgd
)
{
if
(
!
is_sysmmu_active
(
ips
))
{
sysmmu_clk_enable
(
ips
);
__sysmmu_set_ptbase
(
ips
,
pgd
);
__raw_writel
(
CTRL_ENABLE
,
sysmmusfrs
[
ips
]
+
S5P_MMU_CTRL
);
set_sysmmu_active
(
ips
);
dev_dbg
(
dev
,
"%s is enabled.
\n
"
,
sysmmu_ips_name
[
ips
]);
}
else
{
dev_dbg
(
dev
,
"%s is already enabled.
\n
"
,
sysmmu_ips_name
[
ips
]);
}
}
void
s5p_sysmmu_disable
(
sysmmu_ips
ips
)
{
if
(
is_sysmmu_active
(
ips
))
{
__raw_writel
(
CTRL_DISABLE
,
sysmmusfrs
[
ips
]
+
S5P_MMU_CTRL
);
set_sysmmu_inactive
(
ips
);
sysmmu_clk_disable
(
ips
);
dev_dbg
(
dev
,
"%s is disabled.
\n
"
,
sysmmu_ips_name
[
ips
]);
}
else
{
dev_dbg
(
dev
,
"%s is already disabled.
\n
"
,
sysmmu_ips_name
[
ips
]);
}
}
void
s5p_sysmmu_tlb_invalidate
(
sysmmu_ips
ips
)
{
if
(
is_sysmmu_active
(
ips
))
{
sysmmu_block
(
ips
);
__sysmmu_tlb_invalidate
(
ips
);
sysmmu_unblock
(
ips
);
}
else
{
dev_dbg
(
dev
,
"%s is disabled. "
"Skipping invalidating TLB.
\n
"
,
sysmmu_ips_name
[
ips
]);
}
}
static
int
s5p_sysmmu_probe
(
struct
platform_device
*
pdev
)
{
int
i
,
ret
;
struct
resource
*
res
,
*
mem
;
dev
=
&
pdev
->
dev
;
for
(
i
=
0
;
i
<
S5P_SYSMMU_TOTAL_IPNUM
;
i
++
)
{
int
irq
;
sysmmu_clk_init
(
dev
,
i
);
sysmmu_clk_disable
(
i
);
res
=
platform_get_resource
(
pdev
,
IORESOURCE_MEM
,
i
);
if
(
!
res
)
{
dev_err
(
dev
,
"Failed to get the resource of %s.
\n
"
,
sysmmu_ips_name
[
i
]);
ret
=
-
ENODEV
;
goto
err_res
;
}
mem
=
request_mem_region
(
res
->
start
,
resource_size
(
res
),
pdev
->
name
);
if
(
!
mem
)
{
dev_err
(
dev
,
"Failed to request the memory region of %s.
\n
"
,
sysmmu_ips_name
[
i
]);
ret
=
-
EBUSY
;
goto
err_res
;
}
sysmmusfrs
[
i
]
=
ioremap
(
res
->
start
,
resource_size
(
res
));
if
(
!
sysmmusfrs
[
i
])
{
dev_err
(
dev
,
"Failed to ioremap() for %s.
\n
"
,
sysmmu_ips_name
[
i
]);
ret
=
-
ENXIO
;
goto
err_reg
;
}
irq
=
platform_get_irq
(
pdev
,
i
);
if
(
irq
<=
0
)
{
dev_err
(
dev
,
"Failed to get the IRQ resource of %s.
\n
"
,
sysmmu_ips_name
[
i
]);
ret
=
-
ENOENT
;
goto
err_map
;
}
if
(
request_irq
(
irq
,
s5p_sysmmu_irq
,
IRQF_DISABLED
,
pdev
->
name
,
(
void
*
)
i
))
{
dev_err
(
dev
,
"Failed to request IRQ for %s.
\n
"
,
sysmmu_ips_name
[
i
]);
ret
=
-
ENOENT
;
goto
err_map
;
}
}
return
0
;
err_map:
iounmap
(
sysmmusfrs
[
i
]);
err_reg:
release_mem_region
(
mem
->
start
,
resource_size
(
mem
));
err_res:
return
ret
;
}
static
int
s5p_sysmmu_remove
(
struct
platform_device
*
pdev
)
{
return
0
;
}
int
s5p_sysmmu_runtime_suspend
(
struct
device
*
dev
)
{
return
0
;
}
int
s5p_sysmmu_runtime_resume
(
struct
device
*
dev
)
{
return
0
;
}
const
struct
dev_pm_ops
s5p_sysmmu_pm_ops
=
{
.
runtime_suspend
=
s5p_sysmmu_runtime_suspend
,
.
runtime_resume
=
s5p_sysmmu_runtime_resume
,
};
static
struct
platform_driver
s5p_sysmmu_driver
=
{
.
probe
=
s5p_sysmmu_probe
,
.
remove
=
s5p_sysmmu_remove
,
.
driver
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"s5p-sysmmu"
,
.
pm
=
&
s5p_sysmmu_pm_ops
,
}
};
static
int
__init
s5p_sysmmu_init
(
void
)
{
return
platform_driver_register
(
&
s5p_sysmmu_driver
);
}
arch_initcall
(
s5p_sysmmu_init
);
arch/arm/plat-samsung/Kconfig
View file @
ab5a4e63
...
...
@@ -291,7 +291,7 @@ config S3C_DMA
config SAMSUNG_DMADEV
bool
select DMADEVICES
select PL330_DMA if (
CPU_EXYNOS4210
|| CPU_S5PV210 || CPU_S5PC100 || \
select PL330_DMA if (
ARCH_EXYNOS5 || ARCH_EXYNOS4
|| CPU_S5PV210 || CPU_S5PC100 || \
CPU_S5P6450 || CPU_S5P6440)
select ARM_AMBA
help
...
...
arch/arm/plat-samsung/include/plat/devs.h
View file @
ab5a4e63
...
...
@@ -133,7 +133,8 @@ extern struct platform_device exynos4_device_pcm1;
extern
struct
platform_device
exynos4_device_pcm2
;
extern
struct
platform_device
exynos4_device_pd
[];
extern
struct
platform_device
exynos4_device_spdif
;
extern
struct
platform_device
exynos4_device_sysmmu
;
extern
struct
platform_device
exynos_device_drm
;
extern
struct
platform_device
samsung_asoc_dma
;
extern
struct
platform_device
samsung_asoc_idma
;
...
...
arch/arm/plat-samsung/include/plat/dma-pl330.h
View file @
ab5a4e63
...
...
@@ -90,6 +90,7 @@ enum dma_ch {
DMACH_MIPI_HSI5
,
DMACH_MIPI_HSI6
,
DMACH_MIPI_HSI7
,
DMACH_DISP1
,
DMACH_MTOM_0
,
DMACH_MTOM_1
,
DMACH_MTOM_2
,
...
...
arch/arm/plat-samsung/include/plat/sysmmu.h
deleted
100644 → 0
View file @
36be5051
/* linux/arch/arm/plat-samsung/include/plat/sysmmu.h
*
* Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
* http://www.samsung.com
*
* Samsung System MMU driver for S5P platform
*
* 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 __PLAT_SAMSUNG_SYSMMU_H
#define __PLAT_SAMSUNG_SYSMMU_H __FILE__
enum
S5P_SYSMMU_INTERRUPT_TYPE
{
SYSMMU_PAGEFAULT
,
SYSMMU_AR_MULTIHIT
,
SYSMMU_AW_MULTIHIT
,
SYSMMU_BUSERROR
,
SYSMMU_AR_SECURITY
,
SYSMMU_AR_ACCESS
,
SYSMMU_AW_SECURITY
,
SYSMMU_AW_PROTECTION
,
/* 7 */
SYSMMU_FAULTS_NUM
};
#ifdef CONFIG_S5P_SYSTEM_MMU
#include <mach/sysmmu.h>
/**
* s5p_sysmmu_enable() - enable system mmu of ip
* @ips: The ip connected system mmu.
* #pgd: Base physical address of the 1st level page table
*
* This function enable system mmu to transfer address
* from virtual address to physical address
*/
void
s5p_sysmmu_enable
(
sysmmu_ips
ips
,
unsigned
long
pgd
);
/**
* s5p_sysmmu_disable() - disable sysmmu mmu of ip
* @ips: The ip connected system mmu.
*
* This function disable system mmu to transfer address
* from virtual address to physical address
*/
void
s5p_sysmmu_disable
(
sysmmu_ips
ips
);
/**
* s5p_sysmmu_set_tablebase_pgd() - set page table base address to refer page table
* @ips: The ip connected system mmu.
* @pgd: The page table base address.
*
* This function set page table base address
* When system mmu transfer address from virtaul address to physical address,
* system mmu refer address information from page table
*/
void
s5p_sysmmu_set_tablebase_pgd
(
sysmmu_ips
ips
,
unsigned
long
pgd
);
/**
* s5p_sysmmu_tlb_invalidate() - flush all TLB entry in system mmu
* @ips: The ip connected system mmu.
*
* This function flush all TLB entry in system mmu
*/
void
s5p_sysmmu_tlb_invalidate
(
sysmmu_ips
ips
);
/** s5p_sysmmu_set_fault_handler() - Fault handler for System MMUs
* @itype: type of fault.
* @pgtable_base: the physical address of page table base. This is 0 if @ips is
* SYSMMU_BUSERROR.
* @fault_addr: the device (virtual) address that the System MMU tried to
* translated. This is 0 if @ips is SYSMMU_BUSERROR.
* Called when interrupt occurred by the System MMUs
* The device drivers of peripheral devices that has a System MMU can implement
* a fault handler to resolve address translation fault by System MMU.
* The meanings of return value and parameters are described below.
* return value: non-zero if the fault is correctly resolved.
* zero if the fault is not handled.
*/
void
s5p_sysmmu_set_fault_handler
(
sysmmu_ips
ips
,
int
(
*
handler
)(
enum
S5P_SYSMMU_INTERRUPT_TYPE
itype
,
unsigned
long
pgtable_base
,
unsigned
long
fault_addr
));
#else
#define s5p_sysmmu_enable(ips, pgd) do { } while (0)
#define s5p_sysmmu_disable(ips) do { } while (0)
#define s5p_sysmmu_set_tablebase_pgd(ips, pgd) do { } while (0)
#define s5p_sysmmu_tlb_invalidate(ips) do { } while (0)
#define s5p_sysmmu_set_fault_handler(ips, handler) do { } while (0)
#endif
#endif
/* __ASM_PLAT_SYSMMU_H */
drivers/iommu/Kconfig
View file @
ab5a4e63
...
...
@@ -162,4 +162,25 @@ config TEGRA_IOMMU_SMMU
space through the SMMU (System Memory Management Unit)
hardware included on Tegra SoCs.
config EXYNOS_IOMMU
bool "Exynos IOMMU Support"
depends on ARCH_EXYNOS && EXYNOS_DEV_SYSMMU
select IOMMU_API
help
Support for the IOMMU(System MMU) of Samsung Exynos application
processor family. This enables H/W multimedia accellerators to see
non-linear physical memory chunks as a linear memory in their
address spaces
If unsure, say N here.
config EXYNOS_IOMMU_DEBUG
bool "Debugging log for Exynos IOMMU"
depends on EXYNOS_IOMMU
help
Select this to see the detailed log message that shows what
happens in the IOMMU driver
Say N unless you need kernel log message for IOMMU debugging
endif # IOMMU_SUPPORT
drivers/iommu/Makefile
View file @
ab5a4e63
...
...
@@ -10,3 +10,4 @@ obj-$(CONFIG_OMAP_IOVMM) += omap-iovmm.o
obj-$(CONFIG_OMAP_IOMMU_DEBUG)
+=
omap-iommu-debug.o
obj-$(CONFIG_TEGRA_IOMMU_GART)
+=
tegra-gart.o
obj-$(CONFIG_TEGRA_IOMMU_SMMU)
+=
tegra-smmu.o
obj-$(CONFIG_EXYNOS_IOMMU)
+=
exynos-iommu.o
drivers/iommu/exynos-iommu.c
0 → 100644
View file @
ab5a4e63
This diff is collapsed.
Click to expand it.
drivers/spi/Kconfig
View file @
ab5a4e63
...
...
@@ -311,7 +311,7 @@ config SPI_S3C24XX_FIQ
config SPI_S3C64XX
tristate "Samsung S3C64XX series type SPI"
depends on (ARCH_S3C64XX || ARCH_S5P64X0 || ARCH_EXYNOS)
depends on (ARCH_S3C
24XX || ARCH_S3C
64XX || ARCH_S5P64X0 || ARCH_EXYNOS)
select S3C64XX_DMA if ARCH_S3C64XX
help
SPI driver for Samsung S3C64XX and newer SoCs.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment