All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 01/12] video: Add S3C24xx framebuffer support
@ 2014-07-22  0:34 Marek Vasut
  2014-07-22  0:34 ` [U-Boot] [PATCH 02/12] arm: s3c24xx: Fix incorrect CONFIG_SYS_S3C2410_NAND_HWECC name Marek Vasut
                   ` (11 more replies)
  0 siblings, 12 replies; 23+ messages in thread
From: Marek Vasut @ 2014-07-22  0:34 UTC (permalink / raw)
  To: u-boot

Add basic framebuffer driver for the S3C24xx family of CPUs.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>
---
 drivers/video/Makefile      |   1 +
 drivers/video/cfb_console.c |   2 +-
 drivers/video/s3c-fb.c      | 172 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 174 insertions(+), 1 deletion(-)
 create mode 100644 drivers/video/s3c-fb.c

diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index 945f35d..7441783 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -33,6 +33,7 @@ obj-$(CONFIG_VIDEO_MB86R0xGDC) += mb86r0xgdc.o videomodes.o
 obj-$(CONFIG_VIDEO_MX3) += mx3fb.o videomodes.o
 obj-$(CONFIG_VIDEO_IPUV3) += mxc_ipuv3_fb.o ipu_common.o ipu_disp.o
 obj-$(CONFIG_VIDEO_MXS) += mxsfb.o videomodes.o
+obj-$(CONFIG_VIDEO_S3C) += s3c-fb.o videomodes.o
 obj-$(CONFIG_VIDEO_OMAP3) += omap3_dss.o
 obj-$(CONFIG_VIDEO_SANDBOX_SDL) += sandbox_sdl.o
 obj-$(CONFIG_VIDEO_SED13806) += sed13806.o
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index b52e9ed..4a56da8 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -135,7 +135,7 @@
 #endif
 #endif
 
-#ifdef CONFIG_VIDEO_MXS
+#if defined(CONFIG_VIDEO_MXS) || defined(CONFIG_VIDEO_S3C)
 #define VIDEO_FB_16BPP_WORD_SWAP
 #endif
 
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
new file mode 100644
index 0000000..521eb75
--- /dev/null
+++ b/drivers/video/s3c-fb.c
@@ -0,0 +1,172 @@
+/*
+ * S3C24x0 LCD driver
+ *
+ * NOTE: Only 16/24 bpp operation with TFT LCD is supported.
+ *
+ * Copyright (C) 2014 Marek Vasut <marex@denx.de>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+#include <common.h>
+#include <malloc.h>
+#include <video_fb.h>
+
+#include <asm/errno.h>
+#include <asm/io.h>
+#include <asm/arch/s3c24x0_cpu.h>
+
+#include "videomodes.h"
+
+static GraphicDevice panel;
+
+/* S3C requires the FB to be 4MiB aligned. */
+#define S3CFB_ALIGN			(4 << 20)
+
+#define S3CFB_LCDCON1_CLKVAL(x)		((x) << 8)
+#define S3CFB_LCDCON1_PNRMODE_TFT	(0x3 << 5)
+#define S3CFB_LCDCON1_BPPMODE_TFT_16BPP	(0xc << 1)
+#define S3CFB_LCDCON1_BPPMODE_TFT_24BPP	(0xd << 1)
+
+#define S3CFB_LCDCON2_VBPD(x)		((x) << 24)
+#define S3CFB_LCDCON2_LINEVAL(x)	((x) << 14)
+#define S3CFB_LCDCON2_VFPD(x)		((x) << 6)
+#define S3CFB_LCDCON2_VSPW(x)		((x) << 0)
+
+#define S3CFB_LCDCON3_HBPD(x)		((x) << 19)
+#define S3CFB_LCDCON3_HOZVAL(x)		((x) << 8)
+#define S3CFB_LCDCON3_HFPD(x)		((x) << 0)
+
+#define S3CFB_LCDCON4_HSPW(x)		((x) << 0)
+
+#define S3CFB_LCDCON5_BPP24BL		(1 << 12)
+#define S3CFB_LCDCON5_FRM565		(1 << 11)
+#define S3CFB_LCDCON5_HWSWP		(1 << 0)
+
+#define	PS2KHZ(ps)			(1000000000UL / (ps))
+
+/*
+ * Example:
+ * setenv videomode video=ctfb:x:800,y:480,depth:16,mode:0,\
+ *            pclk:30066,le:41,ri:89,up:45,lo:12,\
+ *            hs:1,vs:1,sync:100663296,vmode:0
+ */
+static void s3c_lcd_init(GraphicDevice *panel,
+			struct ctfb_res_modes *mode, int bpp)
+{
+	uint32_t clk_divider;
+	struct s3c24x0_lcd *regs = s3c24x0_get_base_lcd();
+
+	/* Stop the controller. */
+	clrbits_le32(&regs->lcdcon1, 1);
+
+	/* Calculate clock divider. */
+	clk_divider = (get_HCLK() / PS2KHZ(mode->pixclock)) / 1000;
+	clk_divider = DIV_ROUND_UP(clk_divider, 2);
+	if (clk_divider)
+		clk_divider -= 1;
+
+	/* Program LCD configuration. */
+	switch (bpp) {
+	case 16:
+		writel(S3CFB_LCDCON1_BPPMODE_TFT_16BPP |
+		       S3CFB_LCDCON1_PNRMODE_TFT |
+		       S3CFB_LCDCON1_CLKVAL(clk_divider),
+		       &regs->lcdcon1);
+		writel(S3CFB_LCDCON5_HWSWP | S3CFB_LCDCON5_FRM565,
+		       &regs->lcdcon5);
+		break;
+	case 24:
+		writel(S3CFB_LCDCON1_BPPMODE_TFT_24BPP |
+		       S3CFB_LCDCON1_PNRMODE_TFT |
+		       S3CFB_LCDCON1_CLKVAL(clk_divider),
+		       &regs->lcdcon1);
+		writel(S3CFB_LCDCON5_BPP24BL, &regs->lcdcon5);
+		break;
+	}
+
+	writel(S3CFB_LCDCON2_LINEVAL(mode->yres - 1) |
+	       S3CFB_LCDCON2_VBPD(mode->upper_margin - 1) |
+	       S3CFB_LCDCON2_VFPD(mode->lower_margin - 1) |
+	       S3CFB_LCDCON2_VSPW(mode->vsync_len - 1),
+	       &regs->lcdcon2);
+
+	writel(S3CFB_LCDCON3_HBPD(mode->right_margin - 1) |
+	       S3CFB_LCDCON3_HFPD(mode->left_margin - 1) |
+	       S3CFB_LCDCON3_HOZVAL(mode->xres - 1),
+	       &regs->lcdcon3);
+
+	writel(S3CFB_LCDCON4_HSPW(mode->hsync_len - 1),
+	       &regs->lcdcon4);
+
+	/* Write FB address. */
+	writel(panel->frameAdrs >> 1, &regs->lcdsaddr1);
+	writel((panel->frameAdrs +
+	       (mode->xres * mode->yres * panel->gdfBytesPP)) >> 1,
+	       &regs->lcdsaddr2);
+	writel(mode->xres * bpp / 16, &regs->lcdsaddr3);
+
+	/* Start the controller. */
+	setbits_le32(&regs->lcdcon1, 1);
+}
+
+void *video_hw_init(void)
+{
+	int bpp = -1;
+	char *penv;
+	void *fb;
+	struct ctfb_res_modes mode;
+
+	puts("Video: ");
+
+	/* Suck display configuration from "videomode" variable */
+	penv = getenv("videomode");
+	if (!penv) {
+		puts("S3CFB: 'videomode' variable not set!\n");
+		return NULL;
+	}
+
+	bpp = video_get_params(&mode, penv);
+
+	/* fill in Graphic device struct */
+	sprintf(panel.modeIdent, "%dx%dx%d", mode.xres, mode.yres, bpp);
+
+	panel.winSizeX = mode.xres;
+	panel.winSizeY = mode.yres;
+	panel.plnSizeX = mode.xres;
+	panel.plnSizeY = mode.yres;
+
+	switch (bpp) {
+	case 24:
+		panel.gdfBytesPP = 4;
+		panel.gdfIndex = GDF_32BIT_X888RGB;
+		break;
+	case 16:
+		panel.gdfBytesPP = 2;
+		panel.gdfIndex = GDF_16BIT_565RGB;
+		break;
+	default:
+		printf("S3CFB: Invalid BPP specified! (bpp = %i)\n", bpp);
+		return NULL;
+	}
+
+	panel.memSize = mode.xres * mode.yres * panel.gdfBytesPP;
+
+	/* Allocate framebuffer */
+	fb = memalign(S3CFB_ALIGN, roundup(panel.memSize, S3CFB_ALIGN));
+	if (!fb) {
+		printf("S3CFB: Error allocating framebuffer!\n");
+		return NULL;
+	}
+
+	/* Wipe framebuffer */
+	memset(fb, 0, panel.memSize);
+
+	panel.frameAdrs = (u32)fb;
+
+	printf("%s\n", panel.modeIdent);
+
+	/* Start framebuffer */
+	s3c_lcd_init(&panel, &mode, bpp);
+
+	return (void *)&panel;
+}
-- 
2.0.0.rc2

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 02/12] arm: s3c24xx: Fix incorrect CONFIG_SYS_S3C2410_NAND_HWECC name
  2014-07-22  0:34 [U-Boot] [PATCH 01/12] video: Add S3C24xx framebuffer support Marek Vasut
@ 2014-07-22  0:34 ` Marek Vasut
  2014-07-22  0:34 ` [U-Boot] [PATCH 03/12] mtd: nand: s3c: Fix data type width in debug() Marek Vasut
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 23+ messages in thread
From: Marek Vasut @ 2014-07-22  0:34 UTC (permalink / raw)
  To: u-boot

The correct name of this symbol is CONFIG_S3C2410_NAND_HWECC , the
_SYS is redundant.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>
---
 include/configs/VCMA9.h    | 2 +-
 include/configs/smdk2410.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/configs/VCMA9.h b/include/configs/VCMA9.h
index d40185e..a2ce7c5 100644
--- a/include/configs/VCMA9.h
+++ b/include/configs/VCMA9.h
@@ -201,7 +201,7 @@
 /* NAND configuration */
 #ifdef CONFIG_CMD_NAND
 #define CONFIG_NAND_S3C2410
-#define CONFIG_SYS_S3C2410_NAND_HWECC
+#define CONFIG_S3C2410_NAND_HWECC
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
 #define CONFIG_SYS_NAND_BASE		0x4E000000
 #define CONFIG_S3C24XX_CUSTOM_NAND_TIMING
diff --git a/include/configs/smdk2410.h b/include/configs/smdk2410.h
index d4ae19f..0d0da28 100644
--- a/include/configs/smdk2410.h
+++ b/include/configs/smdk2410.h
@@ -172,7 +172,7 @@
  */
 #ifdef CONFIG_CMD_NAND
 #define CONFIG_NAND_S3C2410
-#define CONFIG_SYS_S3C2410_NAND_HWECC
+#define CONFIG_S3C2410_NAND_HWECC
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
 #define CONFIG_SYS_NAND_BASE		0x4E000000
 #endif
-- 
2.0.0.rc2

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 03/12] mtd: nand: s3c: Fix data type width in debug()
  2014-07-22  0:34 [U-Boot] [PATCH 01/12] video: Add S3C24xx framebuffer support Marek Vasut
  2014-07-22  0:34 ` [U-Boot] [PATCH 02/12] arm: s3c24xx: Fix incorrect CONFIG_SYS_S3C2410_NAND_HWECC name Marek Vasut
@ 2014-07-22  0:34 ` Marek Vasut
  2014-07-28 23:35   ` Scott Wood
  2014-07-22  0:34 ` [U-Boot] [PATCH 04/12] mtd: nand: s3c: Unify the register definition and naming Marek Vasut
                   ` (9 subsequent siblings)
  11 siblings, 1 reply; 23+ messages in thread
From: Marek Vasut @ 2014-07-22  0:34 UTC (permalink / raw)
  To: u-boot

Printing u32 with %02x is just a bad idea, fix it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>
---
 drivers/mtd/nand/s3c2410_nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/s3c2410_nand.c b/drivers/mtd/nand/s3c2410_nand.c
index db87d07..b607cc5 100644
--- a/drivers/mtd/nand/s3c2410_nand.c
+++ b/drivers/mtd/nand/s3c2410_nand.c
@@ -43,7 +43,7 @@ static void s3c2410_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 	struct nand_chip *chip = mtd->priv;
 	struct s3c2410_nand *nand = s3c2410_get_base_nand();
 
-	debug("hwcontrol(): 0x%02x 0x%02x\n", cmd, ctrl);
+	debug("hwcontrol(): 0x%08x 0x%08x\n", cmd, ctrl);
 
 	if (ctrl & NAND_CTRL_CHANGE) {
 		ulong IO_ADDR_W = (ulong)nand;
-- 
2.0.0.rc2

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 04/12] mtd: nand: s3c: Unify the register definition and naming
  2014-07-22  0:34 [U-Boot] [PATCH 01/12] video: Add S3C24xx framebuffer support Marek Vasut
  2014-07-22  0:34 ` [U-Boot] [PATCH 02/12] arm: s3c24xx: Fix incorrect CONFIG_SYS_S3C2410_NAND_HWECC name Marek Vasut
  2014-07-22  0:34 ` [U-Boot] [PATCH 03/12] mtd: nand: s3c: Fix data type width in debug() Marek Vasut
@ 2014-07-22  0:34 ` Marek Vasut
  2014-07-22  0:34 ` [U-Boot] [PATCH 05/12] mtd: nand: s3c: Add S3C2440 specifics Marek Vasut
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 23+ messages in thread
From: Marek Vasut @ 2014-07-22  0:34 UTC (permalink / raw)
  To: u-boot

Merge struct s3c2410_nand and struct s3c2440_nand into one unified
struct s3c24x0_nand. While at it, fix up and rename the functions
to retrieve the NAND base address and fix up the s3c NAND driver to
reflect this change.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>
---
 arch/arm/include/asm/arch-s3c24x0/s3c2410.h |  4 +--
 arch/arm/include/asm/arch-s3c24x0/s3c2440.h |  4 +--
 arch/arm/include/asm/arch-s3c24x0/s3c24x0.h | 31 ++++++++++++-----------
 drivers/mtd/nand/s3c2410_nand.c             | 38 ++++++++++++++---------------
 4 files changed, 38 insertions(+), 39 deletions(-)

diff --git a/arch/arm/include/asm/arch-s3c24x0/s3c2410.h b/arch/arm/include/asm/arch-s3c24x0/s3c2410.h
index 01fe0f2..1a925fb 100644
--- a/arch/arm/include/asm/arch-s3c24x0/s3c2410.h
+++ b/arch/arm/include/asm/arch-s3c24x0/s3c2410.h
@@ -83,9 +83,9 @@ static inline struct s3c24x0_lcd *s3c24x0_get_base_lcd(void)
 	return (struct s3c24x0_lcd *)S3C24X0_LCD_BASE;
 }
 
-static inline struct s3c2410_nand *s3c2410_get_base_nand(void)
+static inline struct s3c24x0_nand *s3c24x0_get_base_nand(void)
 {
-	return (struct s3c2410_nand *)S3C2410_NAND_BASE;
+	return (struct s3c24x0_nand *)S3C2410_NAND_BASE;
 }
 
 static inline struct s3c24x0_uart
diff --git a/arch/arm/include/asm/arch-s3c24x0/s3c2440.h b/arch/arm/include/asm/arch-s3c24x0/s3c2440.h
index 15a7cb4..bf21bb9 100644
--- a/arch/arm/include/asm/arch-s3c24x0/s3c2440.h
+++ b/arch/arm/include/asm/arch-s3c24x0/s3c2440.h
@@ -81,9 +81,9 @@ static inline struct s3c24x0_lcd *s3c24x0_get_base_lcd(void)
 	return (struct s3c24x0_lcd *)S3C24X0_LCD_BASE;
 }
 
-static inline struct s3c2440_nand *s3c2440_get_base_nand(void)
+static inline struct s3c24x0_nand *s3c24x0_get_base_nand(void)
 {
-	return (struct s3c2440_nand *)S3C2440_NAND_BASE;
+	return (struct s3c24x0_nand *)S3C2440_NAND_BASE;
 }
 
 static inline struct s3c24x0_uart
diff --git a/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h b/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h
index 86d720c..0621e16 100644
--- a/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h
+++ b/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h
@@ -135,34 +135,33 @@ struct s3c24x0_lcd {
 };
 
 
-#ifdef CONFIG_S3C2410
-/* NAND FLASH (see S3C2410 manual chapter 6) */
-struct s3c2410_nand {
-	u32	nfconf;
-	u32	nfcmd;
-	u32	nfaddr;
-	u32	nfdata;
-	u32	nfstat;
-	u32	nfecc;
-};
-#endif
-#ifdef CONFIG_S3C2440
-/* NAND FLASH (see S3C2440 manual chapter 6) */
-struct s3c2440_nand {
+/* NAND FLASH (see manual chapter 6) */
+struct s3c24x0_nand {
 	u32	nfconf;
+#ifndef CONFIG_S3C2410
 	u32	nfcont;
+#endif
 	u32	nfcmd;
 	u32	nfaddr;
 	u32	nfdata;
+#ifndef CONFIG_S3C2410
 	u32	nfeccd0;
 	u32	nfeccd1;
 	u32	nfeccd;
+#endif
 	u32	nfstat;
+#ifdef CONFIG_S3C2410
+	u32	nfecc;
+#else
 	u32	nfstat0;
 	u32	nfstat1;
-};
+	u32	nfmecc0;
+	u32	nfmecc1;
+	u32	nfsecc;
+	u32	nfsblk;
+	u32	nfeblk;
 #endif
-
+};
 
 /* UART (see manual chapter 11) */
 struct s3c24x0_uart {
diff --git a/drivers/mtd/nand/s3c2410_nand.c b/drivers/mtd/nand/s3c2410_nand.c
index b607cc5..f638801 100644
--- a/drivers/mtd/nand/s3c2410_nand.c
+++ b/drivers/mtd/nand/s3c2410_nand.c
@@ -38,10 +38,10 @@ static void nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
 }
 #endif
 
-static void s3c2410_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
+static void s3c24x0_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 {
 	struct nand_chip *chip = mtd->priv;
-	struct s3c2410_nand *nand = s3c2410_get_base_nand();
+	struct s3c24x0_nand *nand = s3c24x0_get_base_nand();
 
 	debug("hwcontrol(): 0x%08x 0x%08x\n", cmd, ctrl);
 
@@ -67,35 +67,35 @@ static void s3c2410_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 		writeb(cmd, chip->IO_ADDR_W);
 }
 
-static int s3c2410_dev_ready(struct mtd_info *mtd)
+static int s3c24x0_dev_ready(struct mtd_info *mtd)
 {
-	struct s3c2410_nand *nand = s3c2410_get_base_nand();
+	struct s3c24x0_nand *nand = s3c24x0_get_base_nand();
 	debug("dev_ready\n");
 	return readl(&nand->nfstat) & 0x01;
 }
 
 #ifdef CONFIG_S3C2410_NAND_HWECC
-void s3c2410_nand_enable_hwecc(struct mtd_info *mtd, int mode)
+void s3c24x0_nand_enable_hwecc(struct mtd_info *mtd, int mode)
 {
-	struct s3c2410_nand *nand = s3c2410_get_base_nand();
-	debug("s3c2410_nand_enable_hwecc(%p, %d)\n", mtd, mode);
+	struct s3c24x0_nand *nand = s3c24x0_get_base_nand();
+	debug("s3c24x0_nand_enable_hwecc(%p, %d)\n", mtd, mode);
 	writel(readl(&nand->nfconf) | S3C2410_NFCONF_INITECC, &nand->nfconf);
 }
 
-static int s3c2410_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
+static int s3c24x0_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
 				      u_char *ecc_code)
 {
-	struct s3c2410_nand *nand = s3c2410_get_base_nand();
+	struct s3c24x0_nand *nand = s3c24x0_get_base_nand();
 	ecc_code[0] = readb(&nand->nfecc);
 	ecc_code[1] = readb(&nand->nfecc + 1);
 	ecc_code[2] = readb(&nand->nfecc + 2);
-	debug("s3c2410_nand_calculate_hwecc(%p,): 0x%02x 0x%02x 0x%02x\n",
-	       mtd , ecc_code[0], ecc_code[1], ecc_code[2]);
+	debug("s3c24x0_nand_calculate_hwecc(%p,): 0x%02x 0x%02x 0x%02x\n",
+	      mtd , ecc_code[0], ecc_code[1], ecc_code[2]);
 
 	return 0;
 }
 
-static int s3c2410_nand_correct_data(struct mtd_info *mtd, u_char *dat,
+static int s3c24x0_nand_correct_data(struct mtd_info *mtd, u_char *dat,
 				     u_char *read_ecc, u_char *calc_ecc)
 {
 	if (read_ecc[0] == calc_ecc[0] &&
@@ -103,7 +103,7 @@ static int s3c2410_nand_correct_data(struct mtd_info *mtd, u_char *dat,
 	    read_ecc[2] == calc_ecc[2])
 		return 0;
 
-	printf("s3c2410_nand_correct_data: not implemented\n");
+	printf("s3c24x0_nand_correct_data: not implemented\n");
 	return -1;
 }
 #endif
@@ -113,7 +113,7 @@ int board_nand_init(struct nand_chip *nand)
 	u_int32_t cfg;
 	u_int8_t tacls, twrph0, twrph1;
 	struct s3c24x0_clock_power *clk_power = s3c24x0_get_base_clock_power();
-	struct s3c2410_nand *nand_reg = s3c2410_get_base_nand();
+	struct s3c24x0_nand *nand_reg = s3c24x0_get_base_nand();
 
 	debug("board_nand_init()\n");
 
@@ -149,14 +149,14 @@ int board_nand_init(struct nand_chip *nand)
 #endif
 
 	/* hwcontrol always must be implemented */
-	nand->cmd_ctrl = s3c2410_hwcontrol;
+	nand->cmd_ctrl = s3c24x0_hwcontrol;
 
-	nand->dev_ready = s3c2410_dev_ready;
+	nand->dev_ready = s3c24x0_dev_ready;
 
 #ifdef CONFIG_S3C2410_NAND_HWECC
-	nand->ecc.hwctl = s3c2410_nand_enable_hwecc;
-	nand->ecc.calculate = s3c2410_nand_calculate_ecc;
-	nand->ecc.correct = s3c2410_nand_correct_data;
+	nand->ecc.hwctl = s3c24x0_nand_enable_hwecc;
+	nand->ecc.calculate = s3c24x0_nand_calculate_ecc;
+	nand->ecc.correct = s3c24x0_nand_correct_data;
 	nand->ecc.mode = NAND_ECC_HW;
 	nand->ecc.size = CONFIG_SYS_NAND_ECCSIZE;
 	nand->ecc.bytes = CONFIG_SYS_NAND_ECCBYTES;
-- 
2.0.0.rc2

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 05/12] mtd: nand: s3c: Add S3C2440 specifics
  2014-07-22  0:34 [U-Boot] [PATCH 01/12] video: Add S3C24xx framebuffer support Marek Vasut
                   ` (2 preceding siblings ...)
  2014-07-22  0:34 ` [U-Boot] [PATCH 04/12] mtd: nand: s3c: Unify the register definition and naming Marek Vasut
@ 2014-07-22  0:34 ` Marek Vasut
  2014-07-22  0:34 ` [U-Boot] [PATCH 06/12] mtd: nand: s3c: Add S3C2440 buffer reading Marek Vasut
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 23+ messages in thread
From: Marek Vasut @ 2014-07-22  0:34 UTC (permalink / raw)
  To: u-boot

Add support for S3C2440 into the NAND driver by filling in the
S3C2440 bits and differences.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>
---
 drivers/mtd/nand/s3c2410_nand.c | 55 ++++++++++++++++++++++++++++++++---------
 1 file changed, 43 insertions(+), 12 deletions(-)

diff --git a/drivers/mtd/nand/s3c2410_nand.c b/drivers/mtd/nand/s3c2410_nand.c
index f638801..a358be4 100644
--- a/drivers/mtd/nand/s3c2410_nand.c
+++ b/drivers/mtd/nand/s3c2410_nand.c
@@ -12,13 +12,22 @@
 #include <asm/io.h>
 
 #define S3C2410_NFCONF_EN          (1<<15)
+#define S3C2440_NFCONT_EN          (1<<0)
 #define S3C2410_NFCONF_512BYTE     (1<<14)
 #define S3C2410_NFCONF_4STEP       (1<<13)
 #define S3C2410_NFCONF_INITECC     (1<<12)
+#define S3C2440_NFCONT_INITECC     (1<<4)
 #define S3C2410_NFCONF_nFCE        (1<<11)
+#define S3C2440_NFCONT_nFCE        (1<<1)
+#ifdef CONFIG_S3C2410
 #define S3C2410_NFCONF_TACLS(x)    ((x)<<8)
 #define S3C2410_NFCONF_TWRPH0(x)   ((x)<<4)
 #define S3C2410_NFCONF_TWRPH1(x)   ((x)<<0)
+#else	/* S3C2412, S3C2440 */
+#define S3C2410_NFCONF_TACLS(x)    ((x)<<12)
+#define S3C2410_NFCONF_TWRPH0(x)   ((x)<<8)
+#define S3C2410_NFCONF_TWRPH1(x)   ((x)<<4)
+#endif
 
 #define S3C2410_ADDR_NALE 4
 #define S3C2410_ADDR_NCLE 8
@@ -42,25 +51,30 @@ static void s3c24x0_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 {
 	struct nand_chip *chip = mtd->priv;
 	struct s3c24x0_nand *nand = s3c24x0_get_base_nand();
+	uint32_t sel_reg, sel_bit;
 
 	debug("hwcontrol(): 0x%08x 0x%08x\n", cmd, ctrl);
 
 	if (ctrl & NAND_CTRL_CHANGE) {
-		ulong IO_ADDR_W = (ulong)nand;
+		chip->IO_ADDR_W = &nand->nfconf;
 
 		if (!(ctrl & NAND_CLE))
-			IO_ADDR_W |= S3C2410_ADDR_NCLE;
+			chip->IO_ADDR_W = &nand->nfaddr;
 		if (!(ctrl & NAND_ALE))
-			IO_ADDR_W |= S3C2410_ADDR_NALE;
+			chip->IO_ADDR_W = &nand->nfcmd;
 
-		chip->IO_ADDR_W = (void *)IO_ADDR_W;
+#ifdef CONFIG_S3C2410
+		sel_reg = (uint32_t)&nand->nfconf;
+		sel_bit = S3C2410_NFCONF_nFCE;
+#else
+		sel_reg = (uint32_t)&nand->nfcont;
+		sel_bit = S3C2440_NFCONT_nFCE;
+#endif
 
 		if (ctrl & NAND_NCE)
-			writel(readl(&nand->nfconf) & ~S3C2410_NFCONF_nFCE,
-			       &nand->nfconf);
+			clrbits_le32(sel_reg, sel_bit);
 		else
-			writel(readl(&nand->nfconf) | S3C2410_NFCONF_nFCE,
-			       &nand->nfconf);
+			setbits_le32(sel_reg, sel_bit);
 	}
 
 	if (cmd != NAND_CMD_NONE)
@@ -79,16 +93,27 @@ void s3c24x0_nand_enable_hwecc(struct mtd_info *mtd, int mode)
 {
 	struct s3c24x0_nand *nand = s3c24x0_get_base_nand();
 	debug("s3c24x0_nand_enable_hwecc(%p, %d)\n", mtd, mode);
-	writel(readl(&nand->nfconf) | S3C2410_NFCONF_INITECC, &nand->nfconf);
+#ifdef CONFIG_S3C2410
+	setbits_le32(&nand->nfconf, S3C2410_NFCONF_INITECC);
+#else
+	setbits_le32(&nand->nfcont, S3C2440_NFCONT_INITECC);
+#endif
 }
 
 static int s3c24x0_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
 				      u_char *ecc_code)
 {
 	struct s3c24x0_nand *nand = s3c24x0_get_base_nand();
+#ifdef CONFIG_S3C2410
 	ecc_code[0] = readb(&nand->nfecc);
 	ecc_code[1] = readb(&nand->nfecc + 1);
 	ecc_code[2] = readb(&nand->nfecc + 2);
+#else
+	uint32_t ecc = readl(&nand->nfmecc0);
+	ecc_code[0] = ecc;
+	ecc_code[1] = ecc >> 8;
+	ecc_code[2] = ecc >> 16;
+#endif
 	debug("s3c24x0_nand_calculate_hwecc(%p,): 0x%02x 0x%02x 0x%02x\n",
 	      mtd , ecc_code[0], ecc_code[1], ecc_code[2]);
 
@@ -110,14 +135,14 @@ static int s3c24x0_nand_correct_data(struct mtd_info *mtd, u_char *dat,
 
 int board_nand_init(struct nand_chip *nand)
 {
-	u_int32_t cfg;
+	uint32_t cfg = 0;
 	u_int8_t tacls, twrph0, twrph1;
 	struct s3c24x0_clock_power *clk_power = s3c24x0_get_base_clock_power();
 	struct s3c24x0_nand *nand_reg = s3c24x0_get_base_nand();
 
 	debug("board_nand_init()\n");
 
-	writel(readl(&clk_power->clkcon) | (1 << 4), &clk_power->clkcon);
+	setbits_le32(&clk_power->clkcon, 1 << 4);
 
 	/* initialize hardware */
 #if defined(CONFIG_S3C24XX_CUSTOM_NAND_TIMING)
@@ -130,12 +155,18 @@ int board_nand_init(struct nand_chip *nand)
 	twrph1 = 8;
 #endif
 
-	cfg = S3C2410_NFCONF_EN;
+#ifdef CONFIG_S3C2410
+	cfg |= S3C2410_NFCONF_EN;
+#endif
 	cfg |= S3C2410_NFCONF_TACLS(tacls - 1);
 	cfg |= S3C2410_NFCONF_TWRPH0(twrph0 - 1);
 	cfg |= S3C2410_NFCONF_TWRPH1(twrph1 - 1);
 	writel(cfg, &nand_reg->nfconf);
 
+#ifndef CONFIG_S3C2410
+	writel(S3C2440_NFCONT_EN, &nand_reg->nfcont);
+#endif
+
 	/* initialize nand_chip data structure */
 	nand->IO_ADDR_R = (void *)&nand_reg->nfdata;
 	nand->IO_ADDR_W = (void *)&nand_reg->nfdata;
-- 
2.0.0.rc2

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 06/12] mtd: nand: s3c: Add S3C2440 buffer reading
  2014-07-22  0:34 [U-Boot] [PATCH 01/12] video: Add S3C24xx framebuffer support Marek Vasut
                   ` (3 preceding siblings ...)
  2014-07-22  0:34 ` [U-Boot] [PATCH 05/12] mtd: nand: s3c: Add S3C2440 specifics Marek Vasut
@ 2014-07-22  0:34 ` Marek Vasut
  2014-07-22  0:34 ` [U-Boot] [PATCH 07/12] mtd: nand: s3c: Add missing correction and select_chip functions Marek Vasut
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 23+ messages in thread
From: Marek Vasut @ 2014-07-22  0:34 UTC (permalink / raw)
  To: u-boot

Add buffer reading code, should make the IO a little faster.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>
---
 drivers/mtd/nand/s3c2410_nand.c | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/drivers/mtd/nand/s3c2410_nand.c b/drivers/mtd/nand/s3c2410_nand.c
index a358be4..c71f874 100644
--- a/drivers/mtd/nand/s3c2410_nand.c
+++ b/drivers/mtd/nand/s3c2410_nand.c
@@ -10,6 +10,7 @@
 #include <nand.h>
 #include <asm/arch/s3c24x0_cpu.h>
 #include <asm/io.h>
+#include <asm/unaligned.h>
 
 #define S3C2410_NFCONF_EN          (1<<15)
 #define S3C2440_NFCONT_EN          (1<<0)
@@ -45,6 +46,39 @@ static void nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
 	for (i = 0; i < len; i++)
 		buf[i] = readb(this->IO_ADDR_R);
 }
+#elif !defined(CONFIG_S3C2410)
+static void s3c2440_read_buf(struct mtd_info *mtd, u_char *buf, int len)
+{
+	struct s3c24x0_nand *nand = s3c24x0_get_base_nand();
+	uint32_t data;
+
+	while (len >= 4) {
+		data = readl(&nand->nfdata);
+		put_unaligned_le32(data, buf);
+		buf += 4;
+		len -= 4;
+	}
+
+	for (; len & 3; len--)
+		*buf++ = readb(&nand->nfdata);
+}
+
+static void s3c2440_write_buf(struct mtd_info *mtd, const u_char *buf,
+			      int len)
+{
+	struct s3c24x0_nand *nand = s3c24x0_get_base_nand();
+	uint32_t data;
+
+	while (len >= 4) {
+		data = get_unaligned_le32(buf);
+		writel(data, &nand->nfdata);
+		buf += 4;
+		len -= 4;
+	}
+
+	for (; len & 3; len--, buf++)
+		writeb(*buf, &nand->nfdata);
+}
 #endif
 
 static void s3c24x0_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
@@ -177,6 +211,9 @@ int board_nand_init(struct nand_chip *nand)
 	/* read_byte and write_byte are default */
 #ifdef CONFIG_NAND_SPL
 	nand->read_buf = nand_read_buf;
+#elif !defined(CONFIG_S3C2410)
+	nand->read_buf = s3c2440_read_buf;
+	nand->write_buf = s3c2440_write_buf;
 #endif
 
 	/* hwcontrol always must be implemented */
-- 
2.0.0.rc2

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 07/12] mtd: nand: s3c: Add missing correction and select_chip functions
  2014-07-22  0:34 [U-Boot] [PATCH 01/12] video: Add S3C24xx framebuffer support Marek Vasut
                   ` (4 preceding siblings ...)
  2014-07-22  0:34 ` [U-Boot] [PATCH 06/12] mtd: nand: s3c: Add S3C2440 buffer reading Marek Vasut
@ 2014-07-22  0:34 ` Marek Vasut
  2014-07-22  0:34 ` [U-Boot] [PATCH 08/12] i2c: s3c: Implant support for S3C2440 Marek Vasut
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 23+ messages in thread
From: Marek Vasut @ 2014-07-22  0:34 UTC (permalink / raw)
  To: u-boot

Implant a missing ECC correction implementation and select_chip
implementation from Linux.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>
---
 drivers/mtd/nand/s3c2410_nand.c | 89 ++++++++++++++++++++++++++++++++++++++---
 1 file changed, 84 insertions(+), 5 deletions(-)

diff --git a/drivers/mtd/nand/s3c2410_nand.c b/drivers/mtd/nand/s3c2410_nand.c
index c71f874..511e85b 100644
--- a/drivers/mtd/nand/s3c2410_nand.c
+++ b/drivers/mtd/nand/s3c2410_nand.c
@@ -157,16 +157,93 @@ static int s3c24x0_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
 static int s3c24x0_nand_correct_data(struct mtd_info *mtd, u_char *dat,
 				     u_char *read_ecc, u_char *calc_ecc)
 {
-	if (read_ecc[0] == calc_ecc[0] &&
-	    read_ecc[1] == calc_ecc[1] &&
-	    read_ecc[2] == calc_ecc[2])
+	unsigned int diff0, diff1, diff2;
+	unsigned int bit, byte;
+
+	debug("%s(%p,%p,%p,%p)\n", __func__, mtd, dat, read_ecc, calc_ecc);
+
+	diff0 = read_ecc[0] ^ calc_ecc[0];
+	diff1 = read_ecc[1] ^ calc_ecc[1];
+	diff2 = read_ecc[2] ^ calc_ecc[2];
+
+	debug("%s: rd %*phN calc %*phN diff %02x%02x%02x\n",
+	      __func__, 3, read_ecc, 3, calc_ecc,
+	      diff0, diff1, diff2);
+
+	if (diff0 == 0 && diff1 == 0 && diff2 == 0)
+		return 0;		/* ECC is ok */
+
+	/* sometimes people do not think about using the ECC, so check
+	 * to see if we have an 0xff,0xff,0xff read ECC and then ignore
+	 * the error, on the assumption that this is an un-eccd page.
+	 */
+	if (read_ecc[0] == 0xff && read_ecc[1] == 0xff && read_ecc[2] == 0xff
+	    /*&& info->platform->ignore_unset_ecc*/)
 		return 0;
 
-	printf("s3c24x0_nand_correct_data: not implemented\n");
+	/* Can we correct this ECC (ie, one row and column change).
+	 * Note, this is similar to the 256 error code on smartmedia */
+
+	if (((diff0 ^ (diff0 >> 1)) & 0x55) == 0x55 &&
+	    ((diff1 ^ (diff1 >> 1)) & 0x55) == 0x55 &&
+	    ((diff2 ^ (diff2 >> 1)) & 0x55) == 0x55) {
+		/* calculate the bit position of the error */
+
+		bit  = ((diff2 >> 3) & 1) |
+		       ((diff2 >> 4) & 2) |
+		       ((diff2 >> 5) & 4);
+
+		/* calculate the byte position of the error */
+
+		byte = ((diff2 << 7) & 0x100) |
+		       ((diff1 << 0) & 0x80)  |
+		       ((diff1 << 1) & 0x40)  |
+		       ((diff1 << 2) & 0x20)  |
+		       ((diff1 << 3) & 0x10)  |
+		       ((diff0 >> 4) & 0x08)  |
+		       ((diff0 >> 3) & 0x04)  |
+		       ((diff0 >> 2) & 0x02)  |
+		       ((diff0 >> 1) & 0x01);
+
+		debug("correcting error bit %d, byte %d\n", bit, byte);
+
+		dat[byte] ^= (1 << bit);
+		return 1;
+	}
+
+	/* if there is only one bit difference in the ECC, then
+	 * one of only a row or column parity has changed, which
+	 * means the error is most probably in the ECC itself */
+
+	diff0 |= (diff1 << 8);
+	diff0 |= (diff2 << 16);
+
+	if ((diff0 & ~(1<<fls(diff0))) == 0)
+		return 1;
+
 	return -1;
 }
 #endif
 
+static void s3c24x0_nand_select_chip(struct mtd_info *mtd, int chip)
+{
+	struct s3c24x0_nand *nand = s3c24x0_get_base_nand();
+	uint32_t sel_reg, sel_bit;
+
+#ifdef CONFIG_S3C2410
+	sel_reg = (uint32_t)&nand->nfconf;
+	sel_bit = S3C2410_NFCONF_nFCE;
+#else
+	sel_reg = (uint32_t)&nand->nfcont;
+	sel_bit = S3C2440_NFCONT_nFCE;
+#endif
+
+	if (chip == -1)
+		setbits_le32(sel_reg, sel_bit);
+	else
+		clrbits_le32(sel_reg, sel_bit);
+}
+
 int board_nand_init(struct nand_chip *nand)
 {
 	uint32_t cfg = 0;
@@ -205,7 +282,7 @@ int board_nand_init(struct nand_chip *nand)
 	nand->IO_ADDR_R = (void *)&nand_reg->nfdata;
 	nand->IO_ADDR_W = (void *)&nand_reg->nfdata;
 
-	nand->select_chip = NULL;
+	nand->select_chip = s3c24x0_nand_select_chip;
 
 	/* read_buf and write_buf are default */
 	/* read_byte and write_byte are default */
@@ -221,6 +298,8 @@ int board_nand_init(struct nand_chip *nand)
 
 	nand->dev_ready = s3c24x0_dev_ready;
 
+	nand->chip_delay = 50;
+
 #ifdef CONFIG_S3C2410_NAND_HWECC
 	nand->ecc.hwctl = s3c24x0_nand_enable_hwecc;
 	nand->ecc.calculate = s3c24x0_nand_calculate_ecc;
-- 
2.0.0.rc2

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 08/12] i2c: s3c: Implant support for S3C2440
  2014-07-22  0:34 [U-Boot] [PATCH 01/12] video: Add S3C24xx framebuffer support Marek Vasut
                   ` (5 preceding siblings ...)
  2014-07-22  0:34 ` [U-Boot] [PATCH 07/12] mtd: nand: s3c: Add missing correction and select_chip functions Marek Vasut
@ 2014-07-22  0:34 ` Marek Vasut
  2014-07-22  0:34 ` [U-Boot] [PATCH 09/12] gpio: s3c: Fix the GPIO driver Marek Vasut
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 23+ messages in thread
From: Marek Vasut @ 2014-07-22  0:34 UTC (permalink / raw)
  To: u-boot

This is a matter of simple additional ifdefery to cater
for the different register layout of the S3C2440 chip.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>
---
 drivers/i2c/s3c24x0_i2c.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c
index fd328f0..927cf61 100644
--- a/drivers/i2c/s3c24x0_i2c.c
+++ b/drivers/i2c/s3c24x0_i2c.c
@@ -153,7 +153,7 @@ static int GetI2CSDA(void)
 {
 	struct s3c24x0_gpio *gpio = s3c24x0_get_base_gpio();
 
-#ifdef CONFIG_S3C2410
+#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)
 	return (readl(&gpio->gpedat) & 0x8000) >> 15;
 #endif
 #ifdef CONFIG_S3C2400
@@ -165,7 +165,7 @@ static void SetI2CSCL(int x)
 {
 	struct s3c24x0_gpio *gpio = s3c24x0_get_base_gpio();
 
-#ifdef CONFIG_S3C2410
+#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)
 	writel((readl(&gpio->gpedat) & ~0x4000) |
 					(x & 1) << 14, &gpio->gpedat);
 #endif
@@ -427,7 +427,7 @@ static void s3c24x0_i2c_init(struct i2c_adapter *adap, int speed, int slaveadd)
 	int i;
 
 	if ((readl(&i2c->iicstat) & I2CSTAT_BSY) || GetI2CSDA() == 0) {
-#ifdef CONFIG_S3C2410
+#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)
 		ulong old_gpecon = readl(&gpio->gpecon);
 #endif
 #ifdef CONFIG_S3C2400
@@ -436,7 +436,7 @@ static void s3c24x0_i2c_init(struct i2c_adapter *adap, int speed, int slaveadd)
 		/* bus still busy probably by (most) previously interrupted
 		   transfer */
 
-#ifdef CONFIG_S3C2410
+#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)
 		/* set I2CSDA and I2CSCL (GPE15, GPE14) to GPIO */
 		writel((readl(&gpio->gpecon) & ~0xF0000000) | 0x10000000,
 		       &gpio->gpecon);
@@ -462,7 +462,7 @@ static void s3c24x0_i2c_init(struct i2c_adapter *adap, int speed, int slaveadd)
 		udelay(1000);
 
 		/* restore pin functions */
-#ifdef CONFIG_S3C2410
+#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)
 		writel(old_gpecon, &gpio->gpecon);
 #endif
 #ifdef CONFIG_S3C2400
-- 
2.0.0.rc2

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 09/12] gpio: s3c: Fix the GPIO driver
  2014-07-22  0:34 [U-Boot] [PATCH 01/12] video: Add S3C24xx framebuffer support Marek Vasut
                   ` (6 preceding siblings ...)
  2014-07-22  0:34 ` [U-Boot] [PATCH 08/12] i2c: s3c: Implant support for S3C2440 Marek Vasut
@ 2014-07-22  0:34 ` Marek Vasut
  2014-07-22  0:34 ` [U-Boot] [PATCH 10/12] arm: s3c: Unify the S3C24xx SDI structure Marek Vasut
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 23+ messages in thread
From: Marek Vasut @ 2014-07-22  0:34 UTC (permalink / raw)
  To: u-boot

The GPIO driver didn't correctly compute the bank offset
from the GPIO number and caused random writes into the
GPIO block address space. Fix the driver so it actually
does the writes correctly. While at it, make use of the
clrsetbits_le32() mechanisms.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>
---
 drivers/gpio/s3c2440_gpio.c | 75 +++++++++++++++++++++++++--------------------
 1 file changed, 42 insertions(+), 33 deletions(-)

diff --git a/drivers/gpio/s3c2440_gpio.c b/drivers/gpio/s3c2440_gpio.c
index e1e2d3f..d6c7eeb 100644
--- a/drivers/gpio/s3c2440_gpio.c
+++ b/drivers/gpio/s3c2440_gpio.c
@@ -8,53 +8,50 @@
 #include <asm/arch/s3c2440.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <errno.h>
 
 #define GPIO_INPUT  0x0
 #define GPIO_OUTPUT 0x1
 
-/* 0x4 means that we want DAT and not CON register */
-#define GPIO_PORT(x)	((((x) >> 5) & 0x3) + 0x4)
-#define GPIO_BIT(x)		((x) & 0x3f)
+#define S3C_GPIO_CON	0x0
+#define S3C_GPIO_DAT	0x4
 
-/*
- * It's how we calculate the full port address
- * We have to get the number of the port + 1 (Port A is at 0x56000001 ...)
- * We move it at the second digit, and finally we add 0x4 because we want
- * to modify GPIO DAT and not CON
- */
-#define GPIO_FULLPORT(x) (S3C24X0_GPIO_BASE | ((GPIO_PORT(gpio) + 1) << 1))
+static uint32_t s3c_gpio_get_bank_addr(unsigned gpio)
+{
+	/* There is up to 16 pins per bank, one bank is 0x10 big. */
+	uint32_t addr = gpio & ~0xf;
+
+	if (addr >= 0x80 && addr != 0xd0) {	/* Wrong GPIO bank. */
+		printf("Invalid GPIO bank (bank %02x)\n", addr);
+		return 0xffffffff;
+	}
+
+	return addr | S3C24X0_GPIO_BASE;
+}
 
 int gpio_set_value(unsigned gpio, int value)
 {
-	unsigned l = readl(GPIO_FULLPORT(gpio));
-	unsigned bit;
-	unsigned port = GPIO_FULLPORT(gpio);
-
-	/*
-	 * All GPIO Port have a configuration on
-	 * 2 bits excepted the first GPIO (A) which
-	 * have only 1 bit of configuration.
-	 */
-	if (!GPIO_PORT(gpio))
-		bit = (0x1 << GPIO_BIT(gpio));
-	else
-		bit = (0x3 << GPIO_BIT(gpio));
+	uint32_t addr = s3c_gpio_get_bank_addr(gpio);
+
+	if (addr == 0xffffffff)
+		return -EINVAL;
 
 	if (value)
-		l |= bit;
+		setbits_le32(addr | S3C_GPIO_DAT, 1 << (gpio & 0xf));
 	else
-		l &= ~bit;
+		clrbits_le32(addr | S3C_GPIO_DAT, 1 << (gpio & 0xf));
 
-	return writel(l, port);
+	return 0;
 }
 
 int gpio_get_value(unsigned gpio)
 {
-	unsigned l = readl(GPIO_FULLPORT(gpio));
+	uint32_t addr = s3c_gpio_get_bank_addr(gpio);
+
+	if (addr == 0xffffffff)
+		return -EINVAL;
 
-	if (GPIO_PORT(gpio) == 0) /* PORT A */
-		return (l >> GPIO_BIT(gpio)) & 0x1;
-	return (l >> GPIO_BIT(gpio)) & 0x3;
+	return !!(readl(addr | S3C_GPIO_DAT) & (1 << (gpio & 0xf)));
 }
 
 int gpio_request(unsigned gpio, const char *label)
@@ -67,13 +64,25 @@ int gpio_free(unsigned gpio)
 	return 0;
 }
 
+static int s3c_gpio_direction(unsigned gpio, uint8_t dir)
+{
+	uint32_t addr = s3c_gpio_get_bank_addr(gpio);
+	const uint32_t mask = 0x3 << ((gpio & 0xf) << 1);
+	const uint32_t dirm = dir << ((gpio & 0xf) << 1);
+
+	if (addr == 0xffffffff)
+		return -EINVAL;
+
+	clrsetbits_le32(addr | S3C_GPIO_CON, mask, dirm);
+	return 0;
+}
+
 int gpio_direction_input(unsigned gpio)
 {
-	return writel(GPIO_INPUT << GPIO_BIT(gpio), GPIO_FULLPORT(gpio));
+	return s3c_gpio_direction(gpio, GPIO_INPUT);
 }
 
 int gpio_direction_output(unsigned gpio, int value)
 {
-	writel(GPIO_OUTPUT << GPIO_BIT(gpio), GPIO_FULLPORT(gpio));
-	return gpio_set_value(gpio, value);
+	return s3c_gpio_direction(gpio, GPIO_OUTPUT);
 }
-- 
2.0.0.rc2

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 10/12] arm: s3c: Unify the S3C24xx SDI structure
  2014-07-22  0:34 [U-Boot] [PATCH 01/12] video: Add S3C24xx framebuffer support Marek Vasut
                   ` (7 preceding siblings ...)
  2014-07-22  0:34 ` [U-Boot] [PATCH 09/12] gpio: s3c: Fix the GPIO driver Marek Vasut
@ 2014-07-22  0:34 ` Marek Vasut
  2014-07-22  0:34 ` [U-Boot] [PATCH 11/12] mmc: s3c: Add SD driver Marek Vasut
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 23+ messages in thread
From: Marek Vasut @ 2014-07-22  0:34 UTC (permalink / raw)
  To: u-boot

Unify the register structure so they can be easily used across all
of S3C24xx lineup.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>
---
 arch/arm/include/asm/arch-s3c24x0/s3c2410.h |  4 ++--
 arch/arm/include/asm/arch-s3c24x0/s3c2440.h |  4 ++--
 arch/arm/include/asm/arch-s3c24x0/s3c24x0.h | 13 ++++++-------
 3 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/arch/arm/include/asm/arch-s3c24x0/s3c2410.h b/arch/arm/include/asm/arch-s3c24x0/s3c2410.h
index 1a925fb..8773ce3 100644
--- a/arch/arm/include/asm/arch-s3c24x0/s3c2410.h
+++ b/arch/arm/include/asm/arch-s3c24x0/s3c2410.h
@@ -139,9 +139,9 @@ static inline struct s3c24x0_spi *s3c24x0_get_base_spi(void)
 	return (struct s3c24x0_spi *)S3C24X0_SPI_BASE;
 }
 
-static inline struct s3c2410_sdi *s3c2410_get_base_sdi(void)
+static inline struct s3c24x0_sdi *s3c24x0_get_base_sdi(void)
 {
-	return (struct s3c2410_sdi *)S3C2410_SDI_BASE;
+	return (struct s3c24x0_sdi *)S3C2410_SDI_BASE;
 }
 
 #endif /*__S3C2410_H__*/
diff --git a/arch/arm/include/asm/arch-s3c24x0/s3c2440.h b/arch/arm/include/asm/arch-s3c24x0/s3c2440.h
index bf21bb9..7a525f2 100644
--- a/arch/arm/include/asm/arch-s3c24x0/s3c2440.h
+++ b/arch/arm/include/asm/arch-s3c24x0/s3c2440.h
@@ -137,9 +137,9 @@ static inline struct s3c24x0_spi *s3c24x0_get_base_spi(void)
 	return (struct s3c24x0_spi *)S3C24X0_SPI_BASE;
 }
 
-static inline struct s3c2440_sdi *s3c2440_get_base_sdi(void)
+static inline struct s3c24x0_sdi *s3c24x0_get_base_sdi(void)
 {
-	return (struct s3c2440_sdi *)S3C2440_SDI_BASE;
+	return (struct s3c24x0_sdi *)S3C2440_SDI_BASE;
 }
 
 #endif /*__S3C2440_H__*/
diff --git a/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h b/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h
index 0621e16..b9f752d 100644
--- a/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h
+++ b/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h
@@ -674,7 +674,7 @@ struct s3c2400_mmc {
 
 
 /* SD INTERFACE (see S3C2410 manual chapter 19) */
-struct s3c2410_sdi {
+struct s3c24x0_sdi {
 	u32	sdicon;
 	u32	sdipre;
 	u32	sdicarg;
@@ -690,14 +690,13 @@ struct s3c2410_sdi {
 	u32	sdidcnt;
 	u32	sdidsta;
 	u32	sdifsta;
-#ifdef __BIG_ENDIAN
-	u8	res[3];
-	u8	sdidat;
+#ifdef CONFIG_S3C2410
+	u32	sdidat;
+	u32	sdiimsk;
 #else
-	u8	sdidat;
-	u8	res[3];
-#endif
 	u32	sdiimsk;
+	u32	sdidat;
+#endif
 };
 
 #endif /*__S3C24X0_H__*/
-- 
2.0.0.rc2

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 11/12] mmc: s3c: Add SD driver
  2014-07-22  0:34 [U-Boot] [PATCH 01/12] video: Add S3C24xx framebuffer support Marek Vasut
                   ` (8 preceding siblings ...)
  2014-07-22  0:34 ` [U-Boot] [PATCH 10/12] arm: s3c: Unify the S3C24xx SDI structure Marek Vasut
@ 2014-07-22  0:34 ` Marek Vasut
  2014-08-01 16:25   ` Pantelis Antoniou
  2014-08-01 16:26   ` Pantelis Antoniou
  2014-07-22  0:34 ` [U-Boot] [PATCH 12/12] net: smc911x: Keep MAC programmed Marek Vasut
  2014-07-22  9:25 ` [U-Boot] [PATCH 01/12] video: Add S3C24xx framebuffer support Wolfgang Denk
  11 siblings, 2 replies; 23+ messages in thread
From: Marek Vasut @ 2014-07-22  0:34 UTC (permalink / raw)
  To: u-boot

Implement SD driver for the S3C24xx family. This implementation
is currently only capable of using the PIO transfers, DMA is not
supported.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>
---
 arch/arm/include/asm/arch-s3c24x0/s3c24x0.h |   6 +
 drivers/mmc/Makefile                        |   1 +
 drivers/mmc/s3c_sdi.c                       | 321 ++++++++++++++++++++++++++++
 3 files changed, 328 insertions(+)
 create mode 100644 drivers/mmc/s3c_sdi.c

diff --git a/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h b/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h
index b9f752d..2dae9fc 100644
--- a/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h
+++ b/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h
@@ -699,4 +699,10 @@ struct s3c24x0_sdi {
 #endif
 };
 
+#ifdef CONFIG_CMD_MMC
+#include <mmc.h>
+int s3cmmc_initialize(bd_t *bis, int (*getcd)(struct mmc *),
+		      int (*getwp)(struct mmc *));
+#endif
+
 #endif /*__S3C24X0_H__*/
diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile
index 34febf5..a3d033b 100644
--- a/drivers/mmc/Makefile
+++ b/drivers/mmc/Makefile
@@ -22,6 +22,7 @@ obj-$(CONFIG_PXA_MMC_GENERIC) += pxa_mmc_gen.o
 obj-$(CONFIG_SDHCI) += sdhci.o
 obj-$(CONFIG_BCM2835_SDHCI) += bcm2835_sdhci.o
 obj-$(CONFIG_KONA_SDHCI) += kona_sdhci.o
+obj-$(CONFIG_S3C_SDI) += s3c_sdi.o
 obj-$(CONFIG_S5P_SDHCI) += s5p_sdhci.o
 obj-$(CONFIG_SH_MMCIF) += sh_mmcif.o
 obj-$(CONFIG_SPEAR_SDHCI) += spear_sdhci.o
diff --git a/drivers/mmc/s3c_sdi.c b/drivers/mmc/s3c_sdi.c
new file mode 100644
index 0000000..1b5b705
--- /dev/null
+++ b/drivers/mmc/s3c_sdi.c
@@ -0,0 +1,321 @@
+/*
+ * S3C24xx SD/MMC driver
+ *
+ * Based on OpenMoko S3C24xx driver by Harald Welte <laforge@openmoko.org>
+ *
+ * Copyright (C) 2014 Marek Vasut <marex@denx.de>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <common.h>
+#include <malloc.h>
+#include <mmc.h>
+#include <errno.h>
+#include <asm/arch/s3c24x0_cpu.h>
+#include <asm/io.h>
+#include <asm/unaligned.h>
+
+#define S3C2440_SDICON_SDRESET		(1 << 8)
+#define S3C2410_SDICON_FIFORESET	(1 << 1)
+#define S3C2410_SDICON_CLOCKTYPE	(1 << 0)
+
+#define S3C2410_SDICMDCON_LONGRSP	(1 << 10)
+#define S3C2410_SDICMDCON_WAITRSP	(1 << 9)
+#define S3C2410_SDICMDCON_CMDSTART	(1 << 8)
+#define S3C2410_SDICMDCON_SENDERHOST	(1 << 6)
+#define S3C2410_SDICMDCON_INDEX		0x3f
+
+#define S3C2410_SDICMDSTAT_CRCFAIL	(1 << 12)
+#define S3C2410_SDICMDSTAT_CMDSENT	(1 << 11)
+#define S3C2410_SDICMDSTAT_CMDTIMEOUT	(1 << 10)
+#define S3C2410_SDICMDSTAT_RSPFIN	(1 << 9)
+
+#define S3C2440_SDIDCON_DS_WORD		(2 << 22)
+#define S3C2410_SDIDCON_TXAFTERRESP	(1 << 20)
+#define S3C2410_SDIDCON_RXAFTERCMD	(1 << 19)
+#define S3C2410_SDIDCON_BLOCKMODE	(1 << 17)
+#define S3C2410_SDIDCON_WIDEBUS		(1 << 16)
+#define S3C2440_SDIDCON_DATSTART	(1 << 14)
+#define S3C2410_SDIDCON_XFER_RXSTART	(2 << 12)
+#define S3C2410_SDIDCON_XFER_TXSTART	(3 << 12)
+#define S3C2410_SDIDCON_BLKNUM		0x7ff
+
+#define S3C2410_SDIDSTA_FIFOFAIL	(1 << 8)
+#define S3C2410_SDIDSTA_CRCFAIL		(1 << 7)
+#define S3C2410_SDIDSTA_RXCRCFAIL	(1 << 6)
+#define S3C2410_SDIDSTA_DATATIMEOUT	(1 << 5)
+#define S3C2410_SDIDSTA_XFERFINISH	(1 << 4)
+
+#define S3C2410_SDIFSTA_TFHALF		(1 << 11)
+#define S3C2410_SDIFSTA_COUNTMASK	0x7f
+
+/*
+ * WARNING: We only support one SD IP block.
+ * NOTE: It's not likely there will ever exist an S3C24xx with two,
+ *      @least not in this universe all right.
+ */
+static int wide_bus;
+
+static int
+s3cmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
+{
+	struct s3c24x0_sdi *sdi_regs = s3c24x0_get_base_sdi();
+	uint32_t sdiccon, sdicsta, sdidcon, sdidsta, sdidat, sdifsta;
+	uint32_t sdicsta_wait_bit = S3C2410_SDICMDSTAT_CMDSENT;
+	unsigned int timeout = 100000;
+	int ret = 0, xfer_len, data_offset = 0;
+	const uint32_t sdidsta_err_mask = S3C2410_SDIDSTA_FIFOFAIL |
+		S3C2410_SDIDSTA_CRCFAIL | S3C2410_SDIDSTA_RXCRCFAIL |
+		S3C2410_SDIDSTA_DATATIMEOUT;
+
+
+	writel(0xffffffff, &sdi_regs->sdicsta);
+	writel(0xffffffff, &sdi_regs->sdidsta);
+	writel(0xffffffff, &sdi_regs->sdifsta);
+
+	/* Set up data transfer (if applicable). */
+	if (data) {
+		writel(data->blocksize, &sdi_regs->sdibsize);
+
+		sdidcon = data->blocks & S3C2410_SDIDCON_BLKNUM;
+		sdidcon |= S3C2410_SDIDCON_BLOCKMODE;
+#if defined(CONFIG_S3C2440)
+		sdidcon |= S3C2440_SDIDCON_DS_WORD | S3C2440_SDIDCON_DATSTART;
+#endif
+		if (wide_bus)
+			sdidcon |= S3C2410_SDIDCON_WIDEBUS;
+
+		if (data->flags & MMC_DATA_READ) {
+			sdidcon |= S3C2410_SDIDCON_RXAFTERCMD;
+			sdidcon |= S3C2410_SDIDCON_XFER_RXSTART;
+		} else {
+			sdidcon |= S3C2410_SDIDCON_TXAFTERRESP;
+			sdidcon |= S3C2410_SDIDCON_XFER_TXSTART;
+		}
+
+		writel(sdidcon, &sdi_regs->sdidcon);
+	}
+
+	/* Write CMD arg. */
+	writel(cmd->cmdarg, &sdi_regs->sdicarg);
+
+	/* Write CMD index. */
+	sdiccon = cmd->cmdidx & S3C2410_SDICMDCON_INDEX;
+	sdiccon |= S3C2410_SDICMDCON_SENDERHOST;
+	sdiccon |= S3C2410_SDICMDCON_CMDSTART;
+
+	/* Command with short response. */
+	if (cmd->resp_type & MMC_RSP_PRESENT) {
+		sdiccon |= S3C2410_SDICMDCON_WAITRSP;
+		sdicsta_wait_bit = S3C2410_SDICMDSTAT_RSPFIN;
+	}
+
+	/* Command with long response. */
+	if (cmd->resp_type & MMC_RSP_136)
+		sdiccon |= S3C2410_SDICMDCON_LONGRSP;
+
+	/* Start the command. */
+	writel(sdiccon, &sdi_regs->sdiccon);
+
+	/* Wait for the command to complete or for response. */
+	for (timeout = 100000; timeout; timeout--) {
+		sdicsta = readl(&sdi_regs->sdicsta);
+		if (sdicsta & sdicsta_wait_bit)
+			break;
+
+		if (sdicsta & S3C2410_SDICMDSTAT_CMDTIMEOUT)
+			timeout = 1;
+	}
+
+	/* Clean the status bits. */
+	setbits_le32(&sdi_regs->sdicsta, 0xf << 9);
+
+	if (!timeout) {
+		puts("S3C SDI: Command timed out!\n");
+		ret = TIMEOUT;
+		goto error;
+	}
+
+	/* Read out the response. */
+	if (cmd->resp_type & MMC_RSP_136) {
+		cmd->response[0] = readl(&sdi_regs->sdirsp0);
+		cmd->response[1] = readl(&sdi_regs->sdirsp1);
+		cmd->response[2] = readl(&sdi_regs->sdirsp2);
+		cmd->response[3] = readl(&sdi_regs->sdirsp3);
+	} else {
+		cmd->response[0] = readl(&sdi_regs->sdirsp0);
+	}
+
+	/* If there are no data, we're done. */
+	if (!data)
+		return 0;
+
+	xfer_len = data->blocksize * data->blocks;
+
+	while (xfer_len > 0) {
+		sdidsta = readl(&sdi_regs->sdidsta);
+		sdifsta = readl(&sdi_regs->sdifsta);
+
+		if (sdidsta & sdidsta_err_mask) {
+			printf("S3C SDI: Data error (sdta=0x%08x)\n", sdidsta);
+			ret = -EIO;
+			goto error;
+		}
+
+		if (data->flags & MMC_DATA_READ) {
+			if ((sdifsta & S3C2410_SDIFSTA_COUNTMASK) < 4)
+				continue;
+			sdidat = readl(&sdi_regs->sdidat);
+			put_unaligned_le32(sdidat, data->dest + data_offset);
+		} else {	/* Write */
+			/* TX FIFO half full. */
+			if (!(sdifsta & S3C2410_SDIFSTA_TFHALF))
+				continue;
+
+			/* TX FIFO is below 32b full, write. */
+			sdidat = get_unaligned_le32(data->src + data_offset);
+			writel(sdidat, &sdi_regs->sdidat);
+		}
+		data_offset += 4;
+		xfer_len -= 4;
+	}
+
+	/* Wait for the command to complete or for response. */
+	for (timeout = 100000; timeout; timeout--) {
+		sdidsta = readl(&sdi_regs->sdidsta);
+		if (sdidsta & S3C2410_SDIDSTA_XFERFINISH)
+			break;
+
+		if (sdidsta & S3C2410_SDIDSTA_DATATIMEOUT)
+			timeout = 1;
+	}
+
+	/* Clear status bits. */
+	writel(0x6f8, &sdi_regs->sdidsta);
+
+	if (!timeout) {
+		puts("S3C SDI: Command timed out!\n");
+		ret = TIMEOUT;
+		goto error;
+	}
+
+	writel(0, &sdi_regs->sdidcon);
+
+	return 0;
+error:
+	return ret;
+}
+
+static void s3cmmc_set_ios(struct mmc *mmc)
+{
+	struct s3c24x0_sdi *sdi_regs = s3c24x0_get_base_sdi();
+	uint32_t divider = 0;
+
+	wide_bus = (mmc->bus_width == 4);
+
+	if (!mmc->clock)
+		return;
+
+	divider = DIV_ROUND_UP(get_PCLK(), mmc->clock);
+	if (divider)
+		divider--;
+
+	writel(divider, &sdi_regs->sdipre);
+	mdelay(125);
+}
+
+static int s3cmmc_init(struct mmc *mmc)
+{
+	struct s3c24x0_clock_power *clk_power = s3c24x0_get_base_clock_power();
+	struct s3c24x0_sdi *sdi_regs = s3c24x0_get_base_sdi();
+
+	/* Start the clock. */
+	setbits_le32(&clk_power->clkcon, 1 << 9);
+
+#if defined(CONFIG_S3C2440)
+	writel(S3C2440_SDICON_SDRESET, &sdi_regs->sdicon);
+	mdelay(10);
+	writel(0x7fffff, &sdi_regs->sdidtimer);
+#else
+	writel(0xffff, &sdi_regs->sdidtimer);
+#endif
+	writel(MMC_MAX_BLOCK_LEN, &sdi_regs->sdibsize);
+	writel(0x0, &sdi_regs->sdiimsk);
+
+	writel(S3C2410_SDICON_FIFORESET | S3C2410_SDICON_CLOCKTYPE,
+	       &sdi_regs->sdicon);
+
+	mdelay(125);
+
+	return 0;
+}
+
+struct s3cmmc_priv {
+	struct mmc_config	cfg;
+	int (*getcd)(struct mmc *);
+	int (*getwp)(struct mmc *);
+};
+
+static int s3cmmc_getcd(struct mmc *mmc)
+{
+	struct s3cmmc_priv *priv = mmc->priv;
+	if (priv->getcd)
+		return priv->getcd(mmc);
+	else
+		return 0;
+}
+
+static int s3cmmc_getwp(struct mmc *mmc)
+{
+	struct s3cmmc_priv *priv = mmc->priv;
+	if (priv->getwp)
+		return priv->getwp(mmc);
+	else
+		return 0;
+}
+
+static const struct mmc_ops s3cmmc_ops = {
+	.send_cmd	= s3cmmc_send_cmd,
+	.set_ios	= s3cmmc_set_ios,
+	.init		= s3cmmc_init,
+	.getcd		= s3cmmc_getcd,
+	.getwp		= s3cmmc_getwp,
+};
+
+int s3cmmc_initialize(bd_t *bis, int (*getcd)(struct mmc *),
+		      int (*getwp)(struct mmc *))
+{
+	struct s3cmmc_priv	*priv;
+	struct mmc		*mmc;
+	struct mmc_config	*cfg;
+
+	priv = calloc(1, sizeof(*priv));
+	if (!priv)
+		return -ENOMEM;
+	cfg = &priv->cfg;
+
+	cfg->name = "S3C MMC";
+	cfg->ops = &s3cmmc_ops;
+	cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
+	cfg->host_caps = MMC_MODE_4BIT | MMC_MODE_HC | MMC_MODE_HS;
+	cfg->f_min = 400000;
+	cfg->f_max = get_PCLK() / 2;
+	cfg->b_max = 0x80;
+
+#if defined(CONFIG_S3C2410)
+	/*
+	 * S3C2410 has some bug that prevents reliable
+	 * operation at higher speed
+	 */
+	cfg->f_max /= 2;
+#endif
+
+	mmc = mmc_create(cfg, priv);
+	if (!mmc) {
+		free(priv);
+		return -ENOMEM;
+	}
+
+	return 0;
+}
-- 
2.0.0.rc2

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 12/12] net: smc911x: Keep MAC programmed
  2014-07-22  0:34 [U-Boot] [PATCH 01/12] video: Add S3C24xx framebuffer support Marek Vasut
                   ` (9 preceding siblings ...)
  2014-07-22  0:34 ` [U-Boot] [PATCH 11/12] mmc: s3c: Add SD driver Marek Vasut
@ 2014-07-22  0:34 ` Marek Vasut
  2014-07-22 20:43   ` Joe Hershberger
  2014-07-22  9:25 ` [U-Boot] [PATCH 01/12] video: Add S3C24xx framebuffer support Wolfgang Denk
  11 siblings, 1 reply; 23+ messages in thread
From: Marek Vasut @ 2014-07-22  0:34 UTC (permalink / raw)
  To: u-boot

Make sure to keep the MAC address programmed in the SMC911x ADDRH
and ADDRL registers. Linux can read those registers to determine
the MAC address on EEPROM-less configurations.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Tom Rini <trini@ti.com>
---
 drivers/net/smc911x.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index b097c1a..5959672 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -187,6 +187,7 @@ static int smc911x_send(struct eth_device *dev, void *packet, int length)
 static void smc911x_halt(struct eth_device *dev)
 {
 	smc911x_reset(dev);
+	smc911x_handle_mac_address(dev);
 }
 
 static int smc911x_rx(struct eth_device *dev)
-- 
2.0.0.rc2

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 01/12] video: Add S3C24xx framebuffer support
  2014-07-22  0:34 [U-Boot] [PATCH 01/12] video: Add S3C24xx framebuffer support Marek Vasut
                   ` (10 preceding siblings ...)
  2014-07-22  0:34 ` [U-Boot] [PATCH 12/12] net: smc911x: Keep MAC programmed Marek Vasut
@ 2014-07-22  9:25 ` Wolfgang Denk
  2014-07-23  3:00   ` Marek Vasut
  11 siblings, 1 reply; 23+ messages in thread
From: Wolfgang Denk @ 2014-07-22  9:25 UTC (permalink / raw)
  To: u-boot

Dear Marek,

In message <1405989293-6629-1-git-send-email-marex@denx.de> you wrote:
> Add basic framebuffer driver for the S3C24xx family of CPUs.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Anatolij Gustschin <agust@denx.de>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Lukasz Majewski <l.majewski@samsung.com>
> Cc: Minkyu Kang <mk7.kang@samsung.com>
> Cc: Vladimir Zapolskiy <vz@mleia.com>
> ---
>  drivers/video/Makefile      |   1 +
>  drivers/video/cfb_console.c |   2 +-
>  drivers/video/s3c-fb.c      | 172 ++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 174 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/video/s3c-fb.c
> 
> diff --git a/drivers/video/Makefile b/drivers/video/Makefile
> index 945f35d..7441783 100644
> --- a/drivers/video/Makefile
> +++ b/drivers/video/Makefile
> @@ -33,6 +33,7 @@ obj-$(CONFIG_VIDEO_MB86R0xGDC) += mb86r0xgdc.o videomodes.o
>  obj-$(CONFIG_VIDEO_MX3) += mx3fb.o videomodes.o
>  obj-$(CONFIG_VIDEO_IPUV3) += mxc_ipuv3_fb.o ipu_common.o ipu_disp.o
>  obj-$(CONFIG_VIDEO_MXS) += mxsfb.o videomodes.o
> +obj-$(CONFIG_VIDEO_S3C) += s3c-fb.o videomodes.o
>  obj-$(CONFIG_VIDEO_OMAP3) += omap3_dss.o
>  obj-$(CONFIG_VIDEO_SANDBOX_SDL) += sandbox_sdl.o
>  obj-$(CONFIG_VIDEO_SED13806) += sed13806.o

can you please fix the sort oder of this ist?  Thanks.

...
> +	/* Suck display configuration from "videomode" variable */
> +	penv = getenv("videomode");
> +	if (!penv) {
> +		puts("S3CFB: 'videomode' variable not set!\n");
> +		return NULL;
> +	}
> +
> +	bpp = video_get_params(&mode, penv);

Should there not be some error handling in case we pass invalid data?

> +	/* Allocate framebuffer */
> +	fb = memalign(S3CFB_ALIGN, roundup(panel.memSize, S3CFB_ALIGN));
> +	if (!fb) {
> +		printf("S3CFB: Error allocating framebuffer!\n");
> +		return NULL;
> +	}

Should we not use the gd->fb_base frame buffer allocation as provided
in lib/board.c ?


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Bus error -- please leave by the rear door.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 12/12] net: smc911x: Keep MAC programmed
  2014-07-22  0:34 ` [U-Boot] [PATCH 12/12] net: smc911x: Keep MAC programmed Marek Vasut
@ 2014-07-22 20:43   ` Joe Hershberger
  0 siblings, 0 replies; 23+ messages in thread
From: Joe Hershberger @ 2014-07-22 20:43 UTC (permalink / raw)
  To: u-boot

On Mon, Jul 21, 2014 at 7:34 PM, Marek Vasut <marex@denx.de> wrote:
>
> Make sure to keep the MAC address programmed in the SMC911x ADDRH
> and ADDRL registers. Linux can read those registers to determine
> the MAC address on EEPROM-less configurations.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Joe Hershberger <joe.hershberger@ni.com>
> Cc: Tom Rini <trini@ti.com>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 01/12] video: Add S3C24xx framebuffer support
  2014-07-22  9:25 ` [U-Boot] [PATCH 01/12] video: Add S3C24xx framebuffer support Wolfgang Denk
@ 2014-07-23  3:00   ` Marek Vasut
  0 siblings, 0 replies; 23+ messages in thread
From: Marek Vasut @ 2014-07-23  3:00 UTC (permalink / raw)
  To: u-boot

On Tuesday, July 22, 2014 at 11:25:09 AM, Wolfgang Denk wrote:
[...]
> > diff --git a/drivers/video/Makefile b/drivers/video/Makefile
> > index 945f35d..7441783 100644
> > --- a/drivers/video/Makefile
> > +++ b/drivers/video/Makefile
> > @@ -33,6 +33,7 @@ obj-$(CONFIG_VIDEO_MB86R0xGDC) += mb86r0xgdc.o
> > videomodes.o
> > 
> >  obj-$(CONFIG_VIDEO_MX3) += mx3fb.o videomodes.o
> >  obj-$(CONFIG_VIDEO_IPUV3) += mxc_ipuv3_fb.o ipu_common.o ipu_disp.o
> >  obj-$(CONFIG_VIDEO_MXS) += mxsfb.o videomodes.o
> > 
> > +obj-$(CONFIG_VIDEO_S3C) += s3c-fb.o videomodes.o
> > 
> >  obj-$(CONFIG_VIDEO_OMAP3) += omap3_dss.o
> >  obj-$(CONFIG_VIDEO_SANDBOX_SDL) += sandbox_sdl.o
> >  obj-$(CONFIG_VIDEO_SED13806) += sed13806.o
> 
> can you please fix the sort oder of this ist?  Thanks.

Will do in V2, thanks.

> ...
> 
> > +	/* Suck display configuration from "videomode" variable */
> > +	penv = getenv("videomode");
> > +	if (!penv) {
> > +		puts("S3CFB: 'videomode' variable not set!\n");
> > +		return NULL;
> > +	}
> > +
> > +	bpp = video_get_params(&mode, penv);
> 
> Should there not be some error handling in case we pass invalid data?

There is one, about 10 lines further there is a 'switch (bpp) {}' statement. The 
default branch will trigger a fail.

> > +	/* Allocate framebuffer */
> > +	fb = memalign(S3CFB_ALIGN, roundup(panel.memSize, S3CFB_ALIGN));
> > +	if (!fb) {
> > +		printf("S3CFB: Error allocating framebuffer!\n");
> > +		return NULL;
> > +	}
> 
> Should we not use the gd->fb_base frame buffer allocation as provided
> in lib/board.c ?

I use CONFIG_VIDEO , not CONFIG_LCD here. My understanding is that CONFIG_VIDEO 
is what should be used and CONFIG_LCD is legacy. Please correct me if I'm wrong. 
Only the CONFIG_LCD will reserve the memory, CONFIG_VIDEO will not. It might be 
a good idea to explicitly set gd->fb_addr in the driver though. What do you 
think ?

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 03/12] mtd: nand: s3c: Fix data type width in debug()
  2014-07-22  0:34 ` [U-Boot] [PATCH 03/12] mtd: nand: s3c: Fix data type width in debug() Marek Vasut
@ 2014-07-28 23:35   ` Scott Wood
  2014-07-29  0:09     ` Marek Vasut
  0 siblings, 1 reply; 23+ messages in thread
From: Scott Wood @ 2014-07-28 23:35 UTC (permalink / raw)
  To: u-boot

On Tue, 2014-07-22 at 02:34 +0200, Marek Vasut wrote:
> Printing u32 with %02x is just a bad idea, fix it.

Why is it "just a bad idea" if the values aren't expected to exceed
0xff?

-Scott

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 03/12] mtd: nand: s3c: Fix data type width in debug()
  2014-07-28 23:35   ` Scott Wood
@ 2014-07-29  0:09     ` Marek Vasut
  2014-07-29  0:12       ` Scott Wood
  0 siblings, 1 reply; 23+ messages in thread
From: Marek Vasut @ 2014-07-29  0:09 UTC (permalink / raw)
  To: u-boot

On Tuesday, July 29, 2014 at 01:35:57 AM, Scott Wood wrote:
> On Tue, 2014-07-22 at 02:34 +0200, Marek Vasut wrote:
> > Printing u32 with %02x is just a bad idea, fix it.
> 
> Why is it "just a bad idea" if the values aren't expected to exceed
> 0xff?

NAND_CMD_DEPLETE1 is 0x100 for example. I doubt anyone will use AND with this 
controller, but I'd be much happier to see the print properly matching the 
variable we're printing.

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 03/12] mtd: nand: s3c: Fix data type width in debug()
  2014-07-29  0:09     ` Marek Vasut
@ 2014-07-29  0:12       ` Scott Wood
  2014-07-29  1:11         ` Marek Vasut
  0 siblings, 1 reply; 23+ messages in thread
From: Scott Wood @ 2014-07-29  0:12 UTC (permalink / raw)
  To: u-boot

On Tue, 2014-07-29 at 02:09 +0200, Marek Vasut wrote:
> On Tuesday, July 29, 2014 at 01:35:57 AM, Scott Wood wrote:
> > On Tue, 2014-07-22 at 02:34 +0200, Marek Vasut wrote:
> > > Printing u32 with %02x is just a bad idea, fix it.
> > 
> > Why is it "just a bad idea" if the values aren't expected to exceed
> > 0xff?
> 
> NAND_CMD_DEPLETE1 is 0x100 for example. I doubt anyone will use AND with this 
> controller, but I'd be much happier to see the print properly matching the 
> variable we're printing.

It will match it.  %02x doesn't restrict the output to two characters;
it just makes sure there are at least two characters.

-Scott

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 03/12] mtd: nand: s3c: Fix data type width in debug()
  2014-07-29  0:12       ` Scott Wood
@ 2014-07-29  1:11         ` Marek Vasut
  2014-07-29  1:22           ` Scott Wood
  0 siblings, 1 reply; 23+ messages in thread
From: Marek Vasut @ 2014-07-29  1:11 UTC (permalink / raw)
  To: u-boot

On Tuesday, July 29, 2014 at 02:12:47 AM, Scott Wood wrote:
> On Tue, 2014-07-29 at 02:09 +0200, Marek Vasut wrote:
> > On Tuesday, July 29, 2014 at 01:35:57 AM, Scott Wood wrote:
> > > On Tue, 2014-07-22 at 02:34 +0200, Marek Vasut wrote:
> > > > Printing u32 with %02x is just a bad idea, fix it.
> > > 
> > > Why is it "just a bad idea" if the values aren't expected to exceed
> > > 0xff?
> > 
> > NAND_CMD_DEPLETE1 is 0x100 for example. I doubt anyone will use AND with
> > this controller, but I'd be much happier to see the print properly
> > matching the variable we're printing.
> 
> It will match it.  %02x doesn't restrict the output to two characters;
> it just makes sure there are at least two characters.

The output with %02x in this case is 0xffffffXY , so there is something really 
wrong going on. With %08x, the output is as expected (because that does match 
ths size of the variable).

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 03/12] mtd: nand: s3c: Fix data type width in debug()
  2014-07-29  1:11         ` Marek Vasut
@ 2014-07-29  1:22           ` Scott Wood
  2014-07-29  4:21             ` Marek Vasut
  0 siblings, 1 reply; 23+ messages in thread
From: Scott Wood @ 2014-07-29  1:22 UTC (permalink / raw)
  To: u-boot

On Tue, 2014-07-29 at 03:11 +0200, Marek Vasut wrote:
> On Tuesday, July 29, 2014 at 02:12:47 AM, Scott Wood wrote:
> > On Tue, 2014-07-29 at 02:09 +0200, Marek Vasut wrote:
> > > On Tuesday, July 29, 2014 at 01:35:57 AM, Scott Wood wrote:
> > > > On Tue, 2014-07-22 at 02:34 +0200, Marek Vasut wrote:
> > > > > Printing u32 with %02x is just a bad idea, fix it.
> > > > 
> > > > Why is it "just a bad idea" if the values aren't expected to exceed
> > > > 0xff?
> > > 
> > > NAND_CMD_DEPLETE1 is 0x100 for example. I doubt anyone will use AND with
> > > this controller, but I'd be much happier to see the print properly
> > > matching the variable we're printing.
> > 
> > It will match it.  %02x doesn't restrict the output to two characters;
> > it just makes sure there are at least two characters.
> 
> The output with %02x in this case is 0xffffffXY , so there is something really 
> wrong going on. With %08x, the output is as expected (because that does match 
> ths size of the variable).

Is that for NAND_CMD_NONE which is -1?  Or something else?

Also regarding the changelog, neither of these values are declared as
u32.

-Scott

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 03/12] mtd: nand: s3c: Fix data type width in debug()
  2014-07-29  1:22           ` Scott Wood
@ 2014-07-29  4:21             ` Marek Vasut
  0 siblings, 0 replies; 23+ messages in thread
From: Marek Vasut @ 2014-07-29  4:21 UTC (permalink / raw)
  To: u-boot

On Tuesday, July 29, 2014 at 03:22:29 AM, Scott Wood wrote:
> On Tue, 2014-07-29 at 03:11 +0200, Marek Vasut wrote:
> > On Tuesday, July 29, 2014 at 02:12:47 AM, Scott Wood wrote:
> > > On Tue, 2014-07-29 at 02:09 +0200, Marek Vasut wrote:
> > > > On Tuesday, July 29, 2014 at 01:35:57 AM, Scott Wood wrote:
> > > > > On Tue, 2014-07-22 at 02:34 +0200, Marek Vasut wrote:
> > > > > > Printing u32 with %02x is just a bad idea, fix it.
> > > > > 
> > > > > Why is it "just a bad idea" if the values aren't expected to exceed
> > > > > 0xff?
> > > > 
> > > > NAND_CMD_DEPLETE1 is 0x100 for example. I doubt anyone will use AND
> > > > with this controller, but I'd be much happier to see the print
> > > > properly matching the variable we're printing.
> > > 
> > > It will match it.  %02x doesn't restrict the output to two characters;
> > > it just makes sure there are at least two characters.
> > 
> > The output with %02x in this case is 0xffffffXY , so there is something
> > really wrong going on. With %08x, the output is as expected (because
> > that does match ths size of the variable).
> 
> Is that for NAND_CMD_NONE which is -1?  Or something else?

OK, now it makes sense.

> Also regarding the changelog, neither of these values are declared as
> u32.

They're int and unsigned int, which on ARMv7 and lower (this is armv4) is 32bit 
with GCC.

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 11/12] mmc: s3c: Add SD driver
  2014-07-22  0:34 ` [U-Boot] [PATCH 11/12] mmc: s3c: Add SD driver Marek Vasut
@ 2014-08-01 16:25   ` Pantelis Antoniou
  2014-08-01 16:26   ` Pantelis Antoniou
  1 sibling, 0 replies; 23+ messages in thread
From: Pantelis Antoniou @ 2014-08-01 16:25 UTC (permalink / raw)
  To: u-boot

Hi Marek,

On Jul 22, 2014, at 3:34 AM, Marek Vasut wrote:

> Implement SD driver for the S3C24xx family. This implementation
> is currently only capable of using the PIO transfers, DMA is not
> supported.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Lukasz Majewski <l.majewski@samsung.com>
> Cc: Minkyu Kang <mk7.kang@samsung.com>
> Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
> Cc: Vladimir Zapolskiy <vz@mleia.com>
> ---
> arch/arm/include/asm/arch-s3c24x0/s3c24x0.h |   6 +
> drivers/mmc/Makefile                        |   1 +
> drivers/mmc/s3c_sdi.c                       | 321 ++++++++++++++++++++++++++++
> 3 files changed, 328 insertions(+)
> create mode 100644 drivers/mmc/s3c_sdi.c
> 

[snip]

Applied, thanks

-- Pantelis

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 11/12] mmc: s3c: Add SD driver
  2014-07-22  0:34 ` [U-Boot] [PATCH 11/12] mmc: s3c: Add SD driver Marek Vasut
  2014-08-01 16:25   ` Pantelis Antoniou
@ 2014-08-01 16:26   ` Pantelis Antoniou
  1 sibling, 0 replies; 23+ messages in thread
From: Pantelis Antoniou @ 2014-08-01 16:26 UTC (permalink / raw)
  To: u-boot

Hi Marek,

On Jul 22, 2014, at 3:34 AM, Marek Vasut wrote:

> Implement SD driver for the S3C24xx family. This implementation
> is currently only capable of using the PIO transfers, DMA is not
> supported.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Lukasz Majewski <l.majewski@samsung.com>
> Cc: Minkyu Kang <mk7.kang@samsung.com>
> Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
> Cc: Vladimir Zapolskiy <vz@mleia.com>
> ---
> arch/arm/include/asm/arch-s3c24x0/s3c24x0.h |   6 +
> drivers/mmc/Makefile                        |   1 +
> drivers/mmc/s3c_sdi.c                       | 321 ++++++++++++++++++++++++++++
> 3 files changed, 328 insertions(+)
> create mode 100644 drivers/mmc/s3c_sdi.c
> 
[snip]

Applied, thanks.

-- Pantelis

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2014-08-01 16:26 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-22  0:34 [U-Boot] [PATCH 01/12] video: Add S3C24xx framebuffer support Marek Vasut
2014-07-22  0:34 ` [U-Boot] [PATCH 02/12] arm: s3c24xx: Fix incorrect CONFIG_SYS_S3C2410_NAND_HWECC name Marek Vasut
2014-07-22  0:34 ` [U-Boot] [PATCH 03/12] mtd: nand: s3c: Fix data type width in debug() Marek Vasut
2014-07-28 23:35   ` Scott Wood
2014-07-29  0:09     ` Marek Vasut
2014-07-29  0:12       ` Scott Wood
2014-07-29  1:11         ` Marek Vasut
2014-07-29  1:22           ` Scott Wood
2014-07-29  4:21             ` Marek Vasut
2014-07-22  0:34 ` [U-Boot] [PATCH 04/12] mtd: nand: s3c: Unify the register definition and naming Marek Vasut
2014-07-22  0:34 ` [U-Boot] [PATCH 05/12] mtd: nand: s3c: Add S3C2440 specifics Marek Vasut
2014-07-22  0:34 ` [U-Boot] [PATCH 06/12] mtd: nand: s3c: Add S3C2440 buffer reading Marek Vasut
2014-07-22  0:34 ` [U-Boot] [PATCH 07/12] mtd: nand: s3c: Add missing correction and select_chip functions Marek Vasut
2014-07-22  0:34 ` [U-Boot] [PATCH 08/12] i2c: s3c: Implant support for S3C2440 Marek Vasut
2014-07-22  0:34 ` [U-Boot] [PATCH 09/12] gpio: s3c: Fix the GPIO driver Marek Vasut
2014-07-22  0:34 ` [U-Boot] [PATCH 10/12] arm: s3c: Unify the S3C24xx SDI structure Marek Vasut
2014-07-22  0:34 ` [U-Boot] [PATCH 11/12] mmc: s3c: Add SD driver Marek Vasut
2014-08-01 16:25   ` Pantelis Antoniou
2014-08-01 16:26   ` Pantelis Antoniou
2014-07-22  0:34 ` [U-Boot] [PATCH 12/12] net: smc911x: Keep MAC programmed Marek Vasut
2014-07-22 20:43   ` Joe Hershberger
2014-07-22  9:25 ` [U-Boot] [PATCH 01/12] video: Add S3C24xx framebuffer support Wolfgang Denk
2014-07-23  3:00   ` Marek Vasut

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.