summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-samsung/include/mach/s3c24xx-nand.h
diff options
context:
space:
mode:
authorJuergen Beisert <jbe@pengutronix.de>2012-01-02 12:43:52 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2012-01-02 13:32:13 +0100
commitb29b8f43d56b62e406349a5cf1ed56f17454c1f7 (patch)
tree7743f2d09f341da4305bebea36d687511f68cddd /arch/arm/mach-samsung/include/mach/s3c24xx-nand.h
parentcbc08bfb42f6c220d5539dc74ce99e9d6ee1ff06 (diff)
downloadbarebox-b29b8f43d56b62e406349a5cf1ed56f17454c1f7.tar.gz
barebox-b29b8f43d56b62e406349a5cf1ed56f17454c1f7.tar.xz
MACH SAMSUNG/S3C: Use the correct CPU family name to reflect NAND driver's usage
The aready existing NAND controller driver in Barebox is for the S3C24XX family only. Change the name of the file to reflect this fact (and free the way to add more recent Samsung NAND controllers) 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/mach/s3c24xx-nand.h')
-rw-r--r--arch/arm/mach-samsung/include/mach/s3c24xx-nand.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/arch/arm/mach-samsung/include/mach/s3c24xx-nand.h b/arch/arm/mach-samsung/include/mach/s3c24xx-nand.h
new file mode 100644
index 0000000000..7610b4e29d
--- /dev/null
+++ b/arch/arm/mach-samsung/include/mach/s3c24xx-nand.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2009 Juergen Beisert, Pengutronix
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ */
+
+#ifdef CONFIG_S3C24XX_NAND_BOOT
+extern void s3c24x0_nand_load_image(void*, int, int);
+#endif
+
+/**
+ * Locate the timing bits for the NFCONF register
+ * @param setup is the TACLS clock count
+ * @param access is the TWRPH0 clock count
+ * @param hold is the TWRPH1 clock count
+ *
+ * @note A clock count of 0 means always 1 HCLK clock.
+ * @note Clock count settings depend on the NAND flash requirements and the current HCLK speed
+ */
+#ifdef CONFIG_CPU_S3C2410
+# define CALC_NFCONF_TIMING(setup, access, hold) \
+ ((setup << 8) + (access << 4) + (hold << 0))
+#endif
+#ifdef CONFIG_CPU_S3C2440
+# define CALC_NFCONF_TIMING(setup, access, hold) \
+ ((setup << 12) + (access << 8) + (hold << 4))
+#endif
+
+/**
+ * Define platform specific data for the NAND controller and its device
+ */
+struct s3c24x0_nand_platform_data {
+ uint32_t nand_timing; /**< value for the NFCONF register (timing bits only) */
+ char flash_bbt; /**< force a flash based BBT */
+};
+
+/**
+ * @file
+ * @brief Basic declaration to use the s3c24x0 NAND driver
+ */