summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu J. Poirier <mathieu.poirier@linaro.org>2011-02-14 14:35:53 -0700
committerMathieu J. Poirier <mathieu.poirier@linaro.org>2011-02-14 14:35:53 -0700
commit3240a1ab310fac143eef856a98bece96fa1a47ff (patch)
tree08408399a33a1f808cc1527d1cf2a4c2a3abbe4d
parent4035e3996f903064c91e6e1ce9b1328018c6a9d3 (diff)
Adding base support for snowball.
- Initial pin configuration. - Introduction of u8500_is_snowball. - Introduction of new machine type. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
-rw-r--r--board/st/u8500/u8500.c29
-rw-r--r--include/asm-arm/arch-db8500/cpu.h9
-rw-r--r--include/asm-arm/mach-types.h5
3 files changed, 37 insertions, 6 deletions
diff --git a/board/st/u8500/u8500.c b/board/st/u8500/u8500.c
index 019d3fef4..43f21eed0 100644
--- a/board/st/u8500/u8500.c
+++ b/board/st/u8500/u8500.c
@@ -136,9 +136,20 @@ pin_cfg_t gpio_cfg_hrefv60[] = {
GPIO66_GPIO | PIN_OUTPUT_LOW, /* DISP2 RST */
};
+pin_cfg_t gpio_cfg_snowball[] = {
+ /* MMC0 (MicroSD card) */
+ GPIO217_GPIO | PIN_OUTPUT_HIGH, /* MMC_EN */
+ GPIO218_GPIO | PIN_INPUT_NOPULL, /* MMC_CD */
+ GPIO228_GPIO | PIN_OUTPUT_HIGH, /* SD_SEL */
+
+ /* eMMC */
+ GPIO167_GPIO | PIN_OUTPUT_HIGH, /* RSTn_MLC */
+};
+
#define BOARD_ID_MOP500 0
#define BOARD_ID_HREF 1
#define BOARD_ID_HREFV60 2
+#define BOARD_ID_SNOWBALL 3
int board_id; /* set in probe_href() */
int errno;
@@ -338,17 +349,23 @@ static void probe_href(void)
board_id = BOARD_ID_MOP500;
else
board_id = BOARD_ID_HREF;
- } else
+ } else if(u8500_is_snowball()) {
+ gd->bd->bi_arch_number = MACH_TYPE_SNOWBALL;
+
+ db8500_gpio_config_pins(gpio_cfg_snowball,
+ ARRAY_SIZE(gpio_cfg_snowball));
+
+ board_id = BOARD_ID_SNOWBALL;
+ } else{
/* No GPIOE => HREF+ 2.0 V60 or later */
gd->bd->bi_arch_number = MACH_TYPE_HREFV60;
- }
- if (gd->bd->bi_arch_number == MACH_TYPE_HREFV60) {
- db8500_gpio_config_pins(gpio_cfg_hrefv60,
+ db8500_gpio_config_pins(gpio_cfg_hrefv60,
+
ARRAY_SIZE(gpio_cfg_hrefv60));
- board_id = BOARD_ID_HREFV60;
+ board_id = BOARD_ID_HREFV60;
+ }
}
-
}
#define BATT_OK_SEL1_TH_F_MASK 0xF0
diff --git a/include/asm-arm/arch-db8500/cpu.h b/include/asm-arm/arch-db8500/cpu.h
index a9d62f4b0..2d18d08d7 100644
--- a/include/asm-arm/arch-db8500/cpu.h
+++ b/include/asm-arm/arch-db8500/cpu.h
@@ -39,6 +39,15 @@ static inline unsigned int read_cpuid(void)
return val;
}
+static inline int u8500_is_snowball(void)
+{
+#ifdef CONFIG_SNOWBALL
+ return 1;
+#else
+ return 0;
+#endif
+}
+
static inline int u8500_is_earlydrop(void)
{
return read_cpuid() == CPUID_DB8500ED;
diff --git a/include/asm-arm/mach-types.h b/include/asm-arm/mach-types.h
index 28ef1e9f2..aa736068b 100644
--- a/include/asm-arm/mach-types.h
+++ b/include/asm-arm/mach-types.h
@@ -3170,6 +3170,11 @@ extern unsigned int __machine_arch_type;
/* manually added, but official value */
#define MACH_TYPE_HREFV60 3293 /* 0x0cdd */
+/* Manually added, unofficial value.
+ * Needs to be kept in sync with kernel machine_id.
+ */
+#define MACH_TYPE_SNOWBALL 2368
+
#ifdef CONFIG_ARCH_EBSA110
# ifdef machine_arch_type
# undef machine_arch_type