ARM: EXYNOS4: Add support for SATA on ARMLEX4210
Subsystems (3)
PATCH v2 1/1 ARM: EXYNOS4: Add support for SATA on ARMLEX4210
Adds the device definitions, platform specific initialization and clocks for SATA on ARMLEX4210.
Signed-off-by Abhilash Kesavan <[email protected]>
---
Changes in v2:
- Rebased to Kgene's latest for-next branch
- Followed suggestion for platform_device definition
arch/arm/mach-exynos4/Kconfig | 1 + arch/arm/mach-exynos4/Makefile | 1 + arch/arm/mach-exynos4/clock.c | 7 + arch/arm/mach-exynos4/dev-ahci.c | 263 +++++++++++++++++++++++++ arch/arm/mach-exynos4/include/mach/map.h | 4 + arch/arm/mach-exynos4/include/mach/regs-pmu.h | 2 + arch/arm/mach-exynos4/mach-armlex4210.c | 1 + arch/arm/plat-samsung/include/plat/devs.h | 1 + 8 files changed, 280 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-exynos4/dev-ahci.c
arch/arm/mach-exynos4/Kconfig +1 -0
@@ -129,6 +129,7 @@ config MACH_ARMLEX4210 select S3C_DEV_HSMMC3 select EXYNOS4_DEV_SYSMMU select EXYNOS4_SETUP_SDHCI + select SATA_AHCI_PLATFORM help Machine support for Samsung ARMLEX4210 based on EXYNOS4210
arch/arm/mach-exynos4/Makefile +1 -0
@@ -52,3 +52,4 @@ obj-$(CONFIG_EXYNOS4_SETUP_I2C6) += setup-i2c6.o obj-$(CONFIG_EXYNOS4_SETUP_I2C7) += setup-i2c7.o obj-$(CONFIG_EXYNOS4_SETUP_SDHCI) += setup-sdhci.o obj-$(CONFIG_EXYNOS4_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o +obj-$(CONFIG_SATA_AHCI_PLATFORM) += dev-ahci.o
arch/arm/mach-exynos4/clock.c +7 -0
@@ -432,6 +432,12 @@ static struct clk init_clocks_off[] = { .enable = exynos4_clk_ip_lcd1_ctrl, .ctrlbit = (1 << 0), }, { + .name = "sataphy", + .id = -1, + .parent = &clk_aclk_133.clk, + .enable = exynos4_clk_ip_fsys_ctrl, + .ctrlbit = (1 << 3), + }, { .name = "hsmmc", .id = 0, .parent = &clk_aclk_133.clk,
@@ -464,6 +470,7 @@ static struct clk init_clocks_off[] = { }, { .name = "sata", .id = -1, + .parent = &clk_aclk_133.clk, .enable = exynos4_clk_ip_fsys_ctrl, .ctrlbit = (1 << 10), }, {
arch/arm/mach-exynos4/dev-ahci.c new file +263 -0
263 lines not on this page · raw message
arch/arm/mach-exynos4/include/mach/map.h +4 -0
@@ -93,6 +93,10 @@#define EXYNOS4_PA_HSMMC (x) (0x12510000 + ((x) * 0x10000)) +#define EXYNOS4_PA_SATA 0x12560000 +#define EXYNOS4_PA_SATAPHY 0x125D0000 +#define EXYNOS4_PA_SATAPHY_CTRL 0x126B0000 +#define EXYNOS4_PA_SROMC 0x12570000#define EXYNOS4_PA_UART 0x13800000
arch/arm/mach-exynos4/include/mach/regs-pmu.h +2 -0
@@ -38,6 +38,7 @@#define S5P_MIPI_DPHY_SRESETN (1 << 1)#define S5P_MIPI_DPHY_MRESETN (1 << 2) +#define S5P_PMU_SATA_PHY_CONTROL S5P_PMUREG(0x0720)#define S5P_INFORM0 S5P_PMUREG(0x0800)#define S5P_INFORM1 S5P_PMUREG(0x0804)#define S5P_INFORM2 S5P_PMUREG(0x0808)
@@ -153,6 +154,7 @@#define S5P_PMU_LCD1_CONF S5P_PMUREG(0x3CA0)#define S5P_PMU_GPS_CONF S5P_PMUREG(0x3CE0) +#define S5P_PMU_SATA_PHY_CONTROL_EN 0x1#define S5P_INT_LOCAL_PWR_EN 0x7#define S5P_CHECK_SLEEP 0x00000BAD
arch/arm/mach-exynos4/mach-armlex4210.c +1 -0
@@ -158,6 +158,7 @@ static struct platform_device *armlex4210_devices[] __initdata = { &exynos4_device_sysmmu, &samsung_asoc_dma, &armlex4210_smsc911x, + &exynos4_device_ahci, };static void __init armlex4210_smsc911x_init (void )
arch/arm/plat-samsung/include/plat/devs.h +1 -0
@@ -108,6 +108,7 @@ extern struct platform_device exynos4_device_i2s1;extern struct platform_device exynos4_device_i2s2;extern struct platform_device exynos4_device_spdif;extern struct platform_device exynos4_device_pd[]; +extern struct platform_device exynos4_device_ahci;extern struct platform_device s5p6442_device_pcm0;extern struct platform_device s5p6442_device_pcm1;
Signature · 1 line
1.6.6.1