summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-samsung/include
diff options
context:
space:
mode:
authorJuergen Beisert <jbe@pengutronix.de>2012-07-28 17:10:47 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-07-30 11:35:27 +0200
commit3ccb2d41b95e9d6326767a297b77152ef541b6c1 (patch)
tree75b31c22cfc5c20254d01631c818ef66d6634931 /arch/arm/mach-samsung/include
parenta781bb98da431297efe4a4e6328edbd4a1f8c2a9 (diff)
downloadbarebox-3ccb2d41b95e9d6326767a297b77152ef541b6c1.tar.gz
barebox-3ccb2d41b95e9d6326767a297b77152ef541b6c1.tar.xz
ARM/Samsung: add generic S3C6410 SoC specific functions
Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-samsung/include')
-rw-r--r--arch/arm/mach-samsung/include/mach/devices-s3c64xx.h40
-rw-r--r--arch/arm/mach-samsung/include/mach/s3c-generic.h17
2 files changed, 57 insertions, 0 deletions
diff --git a/arch/arm/mach-samsung/include/mach/devices-s3c64xx.h b/arch/arm/mach-samsung/include/mach/devices-s3c64xx.h
new file mode 100644
index 0000000000..bcbee972e6
--- /dev/null
+++ b/arch/arm/mach-samsung/include/mach/devices-s3c64xx.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2012 Juergen Beisert
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#ifndef INCLUDE_MACH_DEVICES_S3C64XX_H
+# define INCLUDE_MACH_DEVICES_S3C64XX_H
+
+#include <driver.h>
+#include <mach/s3c64xx-iomap.h>
+
+static inline void s3c64xx_add_uart1(void)
+{
+ add_generic_device("s3c_serial", DEVICE_ID_DYNAMIC, NULL, S3C_UART1_BASE,
+ S3C_UART1_SIZE, IORESOURCE_MEM, NULL);
+}
+
+static inline void s3c64xx_add_uart2(void)
+{
+ add_generic_device("s3c_serial", DEVICE_ID_DYNAMIC, NULL, S3C_UART2_BASE,
+ S3C_UART2_SIZE, IORESOURCE_MEM, NULL);
+}
+
+static inline void s3c64xx_add_uart3(void)
+{
+ add_generic_device("s3c_serial", DEVICE_ID_DYNAMIC, NULL, S3C_UART3_BASE,
+ S3C_UART3_SIZE, IORESOURCE_MEM, NULL);
+}
+
+#endif /* INCLUDE_MACH_DEVICES_S3C64XX_H */
diff --git a/arch/arm/mach-samsung/include/mach/s3c-generic.h b/arch/arm/mach-samsung/include/mach/s3c-generic.h
index 11b083d4a8..b11e8e3ff4 100644
--- a/arch/arm/mach-samsung/include/mach/s3c-generic.h
+++ b/arch/arm/mach-samsung/include/mach/s3c-generic.h
@@ -41,3 +41,20 @@ void s3c24xx_disable_second_sdram_bank(void);
#ifdef CONFIG_ARCH_S5PCxx
void s5p_init_pll(void);
#endif
+
+#ifdef CONFIG_ARCH_S3C64xx
+unsigned s3c_set_epllclk(unsigned, unsigned, unsigned, unsigned);
+uint32_t s3c_get_epllclk(void);
+unsigned s3c_get_hsmmc_clk(int);
+void s3c_set_hsmmc_clk(int, int, unsigned);
+unsigned s3c6410_get_memory_size(void);
+struct s3c6410_chipselect {
+ unsigned adr_setup_t; /* in [ns] */
+ unsigned access_setup_t; /* in [ns] */
+ unsigned access_t; /* in [ns] */
+ unsigned cs_hold_t; /* in [ns] */
+ unsigned adr_hold_t; /* in [ns] */
+ unsigned char width; /* 8 or 16 */
+};
+int s3c6410_setup_chipselect(int, const struct s3c6410_chipselect*);
+#endif