aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPer Forlin <per.forlin@linaro.org>2010-12-05 06:49:03 -0500
committerLinus Walleij <linus.walleij@stericsson.com>2010-12-08 07:15:39 -0500
commitbab263e0ce624b05bdcf568e83a9ca4ce71f5e3d (patch)
treee3026c8facbad7aeb929ccceb1e2a003cc09dca4
parent9b04f8b9070e60fe9d335613ec538223c159a5c9 (diff)
ux500: Add eMMC support in U5500.
U5500 now boots from sdi0 (onboard eMMC). Change machine type to U5500. Adjust uart and sdi0 clock rates for u5500. All necessary clocks must be enabled before Linux starts because there is no clock tree support in u5500 yet. Signed-off-by: Per Forlin <per.forlin@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
-rw-r--r--arch/arm/mach-ux500/Makefile2
-rw-r--r--arch/arm/mach-ux500/board-u5500-sdi.c49
-rw-r--r--arch/arm/mach-ux500/board-u5500.c3
-rw-r--r--arch/arm/mach-ux500/clock.c2
-rw-r--r--arch/arm/mach-ux500/include/mach/setup.h3
5 files changed, 57 insertions, 2 deletions
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile
index 061201388dac..fb65e598bffb 100644
--- a/arch/arm/mach-ux500/Makefile
+++ b/arch/arm/mach-ux500/Makefile
@@ -6,7 +6,7 @@ obj-y := clock.o cpu.o devices.o devices-common.o
6obj-$(CONFIG_UX500_SOC_DB5500) += cpu-db5500.o devices-db5500.o 6obj-$(CONFIG_UX500_SOC_DB5500) += cpu-db5500.o devices-db5500.o
7obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o prcmu.o 7obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o prcmu.o
8obj-$(CONFIG_MACH_U8500_MOP) += board-mop500.o board-mop500-sdi.o 8obj-$(CONFIG_MACH_U8500_MOP) += board-mop500.o board-mop500-sdi.o
9obj-$(CONFIG_MACH_U5500) += board-u5500.o 9obj-$(CONFIG_MACH_U5500) += board-u5500.o board-u5500-sdi.o
10obj-$(CONFIG_SMP) += platsmp.o headsmp.o 10obj-$(CONFIG_SMP) += platsmp.o headsmp.o
11obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o 11obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
12obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o 12obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o
diff --git a/arch/arm/mach-ux500/board-u5500-sdi.c b/arch/arm/mach-ux500/board-u5500-sdi.c
new file mode 100644
index 000000000000..54712acc0394
--- /dev/null
+++ b/arch/arm/mach-ux500/board-u5500-sdi.c
@@ -0,0 +1,49 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * Author: Hanumath Prasad <ulf.hansson@stericsson.com>
5 * License terms: GNU General Public License (GPL) version 2
6 */
7
8#include <linux/amba/mmci.h>
9#include <linux/mmc/host.h>
10#include <linux/gpio.h>
11
12#include <plat/pincfg.h>
13#include <mach/db5500-regs.h>
14#include <plat/ste_dma40.h>
15
16#include "pins-db5500.h"
17#include "devices-db5500.h"
18#include "ste-dma40-db5500.h"
19
20static pin_cfg_t u5500_sdi_pins[] = {
21 /* SDI0 (POP eMMC) */
22 GPIO5_MC0_DAT0 | PIN_DIR_INPUT | PIN_PULL_UP,
23 GPIO6_MC0_DAT1 | PIN_DIR_INPUT | PIN_PULL_UP,
24 GPIO7_MC0_DAT2 | PIN_DIR_INPUT | PIN_PULL_UP,
25 GPIO8_MC0_DAT3 | PIN_DIR_INPUT | PIN_PULL_UP,
26 GPIO9_MC0_DAT4 | PIN_DIR_INPUT | PIN_PULL_UP,
27 GPIO10_MC0_DAT5 | PIN_DIR_INPUT | PIN_PULL_UP,
28 GPIO11_MC0_DAT6 | PIN_DIR_INPUT | PIN_PULL_UP,
29 GPIO12_MC0_DAT7 | PIN_DIR_INPUT | PIN_PULL_UP,
30 GPIO13_MC0_CMD | PIN_DIR_INPUT | PIN_PULL_UP,
31 GPIO14_MC0_CLK | PIN_DIR_OUTPUT | PIN_VAL_LOW,
32};
33
34static struct mmci_platform_data u5500_sdi0_data = {
35 .ocr_mask = MMC_VDD_165_195,
36 .f_max = 50000000,
37 .capabilities = MMC_CAP_4_BIT_DATA |
38 MMC_CAP_8_BIT_DATA |
39 MMC_CAP_MMC_HIGHSPEED,
40 .gpio_cd = -1,
41 .gpio_wp = -1,
42};
43
44void __init u5500_sdi_init(void)
45{
46 nmk_config_pins(u5500_sdi_pins, ARRAY_SIZE(u5500_sdi_pins));
47
48 db5500_add_sdi0(&u5500_sdi0_data);
49}
diff --git a/arch/arm/mach-ux500/board-u5500.c b/arch/arm/mach-ux500/board-u5500.c
index 9a5db956deba..39d370c1f3b4 100644
--- a/arch/arm/mach-ux500/board-u5500.c
+++ b/arch/arm/mach-ux500/board-u5500.c
@@ -31,10 +31,11 @@ static void __init u5500_init_machine(void)
31{ 31{
32 u5500_init_devices(); 32 u5500_init_devices();
33 33
34 u5500_sdi_init();
34 u5500_uart_init(); 35 u5500_uart_init();
35} 36}
36 37
37MACHINE_START(U8500, "ST-Ericsson U5500 Platform") 38MACHINE_START(U5500, "ST-Ericsson U5500 Platform")
38 .boot_params = 0x00000100, 39 .boot_params = 0x00000100,
39 .map_io = u5500_map_io, 40 .map_io = u5500_map_io,
40 .init_irq = ux500_init_irq, 41 .init_irq = ux500_init_irq,
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c
index 3d4e8eb403ba..598902da31d8 100644
--- a/arch/arm/mach-ux500/clock.c
+++ b/arch/arm/mach-ux500/clock.c
@@ -579,6 +579,8 @@ int __init clk_init(void)
579 clk_prcc_ops.enable = clk_prcc_ops.disable = NULL; 579 clk_prcc_ops.enable = clk_prcc_ops.disable = NULL;
580 clk_prcmu_ops.enable = clk_prcmu_ops.disable = NULL; 580 clk_prcmu_ops.enable = clk_prcmu_ops.disable = NULL;
581 clk_per6clk.rate = 26000000; 581 clk_per6clk.rate = 26000000;
582 clk_uartclk.rate = 36360000;
583 clk_sdmmcclk.rate = 99900000;
582 } 584 }
583 585
584 clkdev_add_table(u8500_common_clks, ARRAY_SIZE(u8500_common_clks)); 586 clkdev_add_table(u8500_common_clks, ARRAY_SIZE(u8500_common_clks));
diff --git a/arch/arm/mach-ux500/include/mach/setup.h b/arch/arm/mach-ux500/include/mach/setup.h
index 322a1c1f2bae..22788a7d35dc 100644
--- a/arch/arm/mach-ux500/include/mach/setup.h
+++ b/arch/arm/mach-ux500/include/mach/setup.h
@@ -22,6 +22,9 @@ extern void __init u5500_init_devices(void);
22extern void __init u8500_init_devices(void); 22extern void __init u8500_init_devices(void);
23 23
24extern void __init ux500_init_irq(void); 24extern void __init ux500_init_irq(void);
25
26extern void __init u5500_sdi_init(void);
27
25/* We re-use nomadik_timer for this platform */ 28/* We re-use nomadik_timer for this platform */
26extern void nmdk_timer_init(void); 29extern void nmdk_timer_init(void);
27 30