Skip to contentSkip to conversation

ARM: add DT support to the S3C SDI driver

PATCH New Domenico Andreoli 5 participants 9 messages Apr 13, 2011 – May 4, 2011 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: add DT support to the S3C SDI driver

From: Domenico Andreoli <[email protected]>

This patch adds DeviceTree support to the S3C SDI driver.

It implements all the configurations of the platform driver except the set_power() callback and the ocr_avail mask.

---

ocr_avail is a bit mask that could be easily ported to DT. If there is not any better (or readable) way to render it in DT, I will straightforwardly implement it.

set_power() instead deserves some more considerations. Current implementations boil down to gpio on/off settings, its DT implementation is again straightforward. Problem would arise if any board requires some naive implementation, would it require a different of_device_id with proper .data set?

cheers,
Domenico

---
 drivers/mmc/host/s3cmci.c |   83 +++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 78 insertions(+), 5 deletions(-)
drivers/mmc/host/s3cmci.c +78 -5
Index: b/drivers/mmc/host/s3cmci.c
===================================================================
@@ -14,6 +14,7 @@
 #include <linux/module.h>
 #include <linux/dma-mapping.h>
 #include <linux/clk.h>
+#include <linux/slab.h>
 #include <linux/mmc/host.h>
 #include <linux/platform_device.h>
 #include <linux/cpufreq.h>
@@ -22,6 +23,8 @@
 #include <linux/gpio.h>
 #include <linux/irq.h>
 #include <linux/io.h>
+#include <linux/of.h>
+#include <linux/of_gpio.h>
 
 #include <mach/dma.h>
 
@@ -1544,6 +1547,58 @@
 
 #endif /* CONFIG_DEBUG_FS */
 
+#ifdef CONFIG_OF
+
+enum of_s3cmci_flags {
+	OF_S3CMCI_USE_DMA = 1,
+};
+
+static struct s3c24xx_mci_pdata *s3cmci_of_init(struct device *dev)
+{
+	struct s3c24xx_mci_pdata *pdata;
+	const __be32 *spec;
+	enum of_gpio_flags gpio_flags;
+	int gpio;
+	u32 flags;
+
+	pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
+	if(!pdata) {
+		dev_err(dev, "%s: failed to allocate pdata\n", dev->of_node->full_name);
+		return NULL;
+	}
+
+	gpio = of_get_gpio_flags(dev->of_node, 0, &gpio_flags);
+	if (gpio < 0) {
+		pdata->no_detect = 1;
+	} else {
+		pdata->gpio_detect = gpio;
+		pdata->detect_invert = (gpio_flags & OF_GPIO_ACTIVE_LOW) == OF_GPIO_ACTIVE_LOW;
+	}
+
+	gpio = of_get_gpio_flags(dev->of_node, 1, &gpio_flags);
+	if (gpio < 0) {
+		pdata->no_wprotect = 1;
+	} else {
+		pdata->gpio_wprotect = gpio;
+		pdata->wprotect_invert = (gpio_flags & OF_GPIO_ACTIVE_LOW) == OF_GPIO_ACTIVE_LOW;
+	}
+
+	spec = of_get_property(dev->of_node, "flags", 0);
+	flags = spec ? be32_to_cpup(spec) : 0;
+	pdata->use_dma = flags | OF_S3CMCI_USE_DMA;
+
+	return pdata;
+}
+
+#else
+
+static struct s3c24xx_mci_pdata *s3cmci_of_init(struct device *dev)
+{
+	return NULL;
+}
+
+#endif /* CONFIG_OF */
+
 static int __devinit s3cmci_probe(struct platform_device *pdev)
 {
 	struct s3cmci_host *host;
@@ -1552,7 +1607,12 @@
 	int is2440;
 	int i;
 
-	is2440 = platform_get_device_id(pdev)->driver_data;
+	if (platform_get_device_id(pdev))
+		is2440 = platform_get_device_id(pdev)->driver_data;
+	else if (pdev->dev.of_match)
+		is2440 = (int) pdev->dev.of_match->data;
+	else
+		BUG();
 
 	mmc = mmc_alloc_host(sizeof(struct s3cmci_host), &pdev->dev);
 	if (!mmc) {
@@ -1577,11 +1637,11 @@
 	host->pdev	= pdev;
 	host->is2440	= is2440;
 
-	host->pdata = pdev->dev.platform_data;
-	if (!host->pdata) {
+	if (!pdev->dev.platform_data && pdev->dev.of_node)
+		pdev->dev.platform_data = s3cmci_of_init(&pdev->dev);
+	if (!pdev->dev.platform_data)
 		pdev->dev.platform_data = &s3cmci_def_pdata;
-		host->pdata = &s3cmci_def_pdata;
-	}
+	host->pdata = pdev->dev.platform_data;
 
 	spin_lock_init(&host->complete_lock);
 	tasklet_init(&host->pio_tasklet, pio_tasklet, (unsigned long) host);
@@ -1901,12 +1961,25 @@
 #define s3cmci_pm_ops NULL
 #endif /* CONFIG_PM */
 
+#ifdef CONFIG_OF
+
+static const struct of_device_id s3cmci_of_match[] = {
+	{ .compatible = "samsung,s3c2410-sdi", .data = (void *) 0, },
+	{ .compatible = "samsung,s3c2412-sdi", .data = (void *) 1, },
+	{ .compatible = "samsung,s3c2440-sdi", .data = (void *) 1, },
+	{},
+};
+
+#else /* CONFIG_OF */
+#define s3cmci_of_match  NULL
+#endif /* CONFIG_OF */
 
 static struct platform_driver s3cmci_driver = {
 	.driver	= {
 		.name	= "s3c-sdi",
 		.owner	= THIS_MODULE,
 		.pm	= s3cmci_pm_ops,
+		.of_match_table = s3cmci_of_match,
 	},
 	.id_table	= s3cmci_driver_ids,
 	.probe		= s3cmci_probe,
#1 lore raw

PATCH 1/1 ARM: add DT support to the S3C SDI driver

Quoted 15 lines · Domenico Andreoli

From: Domenico Andreoli <[email protected]>

This patch adds DeviceTree support to the S3C SDI driver.

It implements all the configurations of the platform driver except the set_power() callback and the ocr_avail mask.

---

ocr_avail is a bit mask that could be easily ported to DT. If there is not any better (or readable) way to render it in DT, I will straightforwardly implement it.

Quoted 8 lines

set_power() instead deserves some more considerations. Current implementations boil down to gpio on/off settings, its DT implementation is again straightforward. Problem would arise if any board requires some naive implementation, would it require a different of_device_id with proper .data set?

cheers,
Domenico

Looks pretty good do me. One minor comment below, but I think I can pick this one up into the devicetree/test branch.

g.

Quoted 116 lines
---
 drivers/mmc/host/s3cmci.c |   83 +++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 78 insertions(+), 5 deletions(-)

Index: b/drivers/mmc/host/s3cmci.c
===================================================================

drivers/mmc/host/s3cmci.c +65 -5
@@ -14,6 +14,7 @@
 #include <linux/module.h>
 #include <linux/dma-mapping.h>
 #include <linux/clk.h>
+#include <linux/slab.h>
 #include <linux/mmc/host.h>
 #include <linux/platform_device.h>
 #include <linux/cpufreq.h>
@@ -22,6 +23,8 @@
 #include <linux/gpio.h>
 #include <linux/irq.h>
 #include <linux/io.h>
+#include <linux/of.h>
+#include <linux/of_gpio.h>
 
 #include <mach/dma.h>
 
@@ -1544,6 +1547,58 @@
 
 #endif /* CONFIG_DEBUG_FS */
 
+#ifdef CONFIG_OF
+
+enum of_s3cmci_flags {
+	OF_S3CMCI_USE_DMA = 1,
+};
+
+static struct s3c24xx_mci_pdata *s3cmci_of_init(struct device *dev)
+{
+	struct s3c24xx_mci_pdata *pdata;
+	const __be32 *spec;
+	enum of_gpio_flags gpio_flags;
+	int gpio;
+	u32 flags;
+
+	pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
+	if(!pdata) {
+		dev_err(dev, "%s: failed to allocate pdata\n", dev->of_node->full_name);
+		return NULL;
+	}
+
+	gpio = of_get_gpio_flags(dev->of_node, 0, &gpio_flags);
+	if (gpio < 0) {
+		pdata->no_detect = 1;
+	} else {
+		pdata->gpio_detect = gpio;
+		pdata->detect_invert = (gpio_flags & OF_GPIO_ACTIVE_LOW) == OF_GPIO_ACTIVE_LOW;
+	}
+
+	gpio = of_get_gpio_flags(dev->of_node, 1, &gpio_flags);
+	if (gpio < 0) {
+		pdata->no_wprotect = 1;
+	} else {
+		pdata->gpio_wprotect = gpio;
+		pdata->wprotect_invert = (gpio_flags & OF_GPIO_ACTIVE_LOW) == OF_GPIO_ACTIVE_LOW;
+	}
+
+	spec = of_get_property(dev->of_node, "flags", 0);
+	flags = spec ? be32_to_cpup(spec) : 0;
+	pdata->use_dma = flags | OF_S3CMCI_USE_DMA;
+
+	return pdata;
+}
+
+#else
+
+static struct s3c24xx_mci_pdata *s3cmci_of_init(struct device *dev)
+{
+	return NULL;
+}
+
+#endif /* CONFIG_OF */
+
 static int __devinit s3cmci_probe(struct platform_device *pdev)
 {
 	struct s3cmci_host *host;
@@ -1552,7 +1607,12 @@
 	int is2440;
 	int i;
 
-	is2440 = platform_get_device_id(pdev)->driver_data;
+	if (platform_get_device_id(pdev))
+		is2440 = platform_get_device_id(pdev)->driver_data;
+	else if (pdev->dev.of_match)
+		is2440 = (int) pdev->dev.of_match->data;
+	else
+		BUG();
 
 	mmc = mmc_alloc_host(sizeof(struct s3cmci_host), &pdev->dev);
 	if (!mmc) {
@@ -1577,11 +1637,11 @@
 	host->pdev	= pdev;
 	host->is2440	= is2440;
 
-	host->pdata = pdev->dev.platform_data;
-	if (!host->pdata) {
+	if (!pdev->dev.platform_data && pdev->dev.of_node)
+		pdev->dev.platform_data = s3cmci_of_init(&pdev->dev);
+	if (!pdev->dev.platform_data)
 		pdev->dev.platform_data = &s3cmci_def_pdata;
-		host->pdata = &s3cmci_def_pdata;
-	}
+	host->pdata = pdev->dev.platform_data;
 
 	spin_lock_init(&host->complete_lock);
 	tasklet_init(&host->pio_tasklet, pio_tasklet, (unsigned long) host);

drivers/mmc/host/s3cmci.c line 1969

Quoted 9 lines
drivers/mmc/host/s3cmci.c +6 -0
@@ -1901,12 +1961,25 @@
 #define s3cmci_pm_ops NULL
 #endif /* CONFIG_PM */
 
+#ifdef CONFIG_OF
+
+static const struct of_device_id s3cmci_of_match[] = {
+	{ .compatible = "samsung,s3c2410-sdi", .data = (void *) 0, },
+	{ .compatible = "samsung,s3c2412-sdi", .data = (void *) 1, },
+	{ .compatible = "samsung,s3c2440-sdi", .data = (void *) 1, },

A little ugly. I'd rather see a real structure being passed, even if it is almost empty. However, I see that the existing driver is already using this pattern, so I won't make a big deal about it.

Quoted 21 lines
drivers/mmc/host/s3cmci.c +7 -0
+	{},
+};
+
+#else /* CONFIG_OF */
+#define s3cmci_of_match  NULL
+#endif /* CONFIG_OF */
 
 static struct platform_driver s3cmci_driver = {
 	.driver	= {
 		.name	= "s3c-sdi",
 		.owner	= THIS_MODULE,
 		.pm	= s3cmci_pm_ops,
+		.of_match_table = s3cmci_of_match,
 	},
 	.id_table	= s3cmci_driver_ids,
 	.probe		= s3cmci_probe,

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#2 lore raw

PATCH 1/1 ARM: add DT support to the S3C SDI driver

In reply to Domenico Andreoli
Quoted 15 lines · Domenico Andreoli

From: Domenico Andreoli <[email protected]>

This patch adds DeviceTree support to the S3C SDI driver.

It implements all the configurations of the platform driver except the set_power() callback and the ocr_avail mask.

---

ocr_avail is a bit mask that could be easily ported to DT. If there is not any better (or readable) way to render it in DT, I will straightforwardly implement it.

Quoted 5 lines

set_power() instead deserves some more considerations. Current implementations boil down to gpio on/off settings, its DT implementation is again straightforward. Problem would arise if any board requires some naive implementation, would it require a different of_device_id with proper .data set?

It would be better to think out the binding a bit more, but I'd need to know more details about what is possible.

g.

#3 lore raw

PATCH 1/1 ARM: add DT support to the S3C SDI driver

Quoted 10 lines · Grant Likely
Quoted 6 lines · Domenico Andreoli

set_power() instead deserves some more considerations. Current implementations boil down to gpio on/off settings, its DT implementation is again straightforward. Problem would arise if any board requires some naive implementation, would it require a different of_device_id with proper .data set?

It would be better to think out the binding a bit more, but I'd need to know more details about what is possible.

I looked at the arm tree only, MMC/MCI/SDI area. There are some .set_power ops also on the LCD side and who know what else with a different ops name.

The most common case is no .set_power op.

Then we have quite a lot of GPIO cases like this:

static void h1940_set_mmc_power(unsigned char power_mode, unsigned short vdd)

{
    switch (power_mode) {
    case MMC_POWER_OFF:
        gpio_set_value(H1940_LATCH_SD_POWER, 0);
        break;
    case MMC_POWER_UP:
    case MMC_POWER_ON:
        gpio_set_value(H1940_LATCH_SD_POWER, 1);
        break;
    default:
        break;
    };
}

and its derivative:

static int mmc_set_power(struct device *dev, int slot, int power_on, int vdd)

{
    gpio_set_value(H2_TPS_GPIO_MMC_PWR_EN, power_on);
    return 0;
}

then we have a bitwise case on some register (the fpga name is misleading, they are just __raw_readb/__raw_writeb):

static int mmc_set_power(struct device *dev, int slot, int power_on, int vdd)

{
    if (power_on)
        fpga_write(fpga_read(OMAP1510_FPGA_POWER) | (1 << 3), OMAP1510_FPGA_POWER);
    else
        fpga_write(fpga_read(OMAP1510_FPGA_POWER) & ~(1 << 3), OMAP1510_FPGA_POWER);

    return 0;
}

a i2c bitwise case:

static int mmc_set_power(struct device *dev, int slot, int power_on, int vdd)

{
    int err;
    u8 dat = 0;

    err = sx1_i2c_read_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, &dat);
    if (err < 0)
        return err;

    if (power_on)
        dat |= SOFIA_MMC_POWER;
    else
        dat &= ~SOFIA_MMC_POWER;

    return sx1_i2c_write_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, dat);
}

and some other very special cases such as:

static int n8x0_mmc_set_power(struct device *dev, int slot, int power_on, int vdd)

{
    if (machine_is_nokia_n800() || slot == 0)
        return n8x0_mmc_set_power_menelaus(dev, slot, power_on, vdd);

    n810_set_power_emmc(dev, power_on);

    return 0;
}

static int n8x0_mmc_set_power_menelaus(struct device *dev, int slot, int power_on, int vdd)

{
    int mV; 
#ifdef CONFIG_MMC_DEBUG
    dev_dbg(dev, "Set slot %d power: %s (vdd %d)\n", slot + 1,
        power_on ? "on" : "off", vdd);
#endif
    if (slot == 0) {
        if (!power_on)
            return menelaus_set_vmmc(0);
        switch (1 << vdd) {
        case MMC_VDD_33_34:
        case MMC_VDD_32_33:
        case MMC_VDD_31_32:
            mV = 3100;
            break;
        case MMC_VDD_30_31:
            mV = 3000;
            break;
        case MMC_VDD_28_29:
            mV = 2800;
            break;
        case MMC_VDD_165_195:
            mV = 1850;
            break;
        default:
            BUG();
        }   
        return menelaus_set_vmmc(mV);
    } else {
        if (!power_on)
            return menelaus_set_vdcdc(3, 0); 
        switch (1 << vdd) {
        case MMC_VDD_33_34:
        case MMC_VDD_32_33:
            mV = 3300;
            break;
        case MMC_VDD_30_31:
        case MMC_VDD_29_30:
            mV = 3000;
            break;
        case MMC_VDD_28_29:
        case MMC_VDD_27_28:
            mV = 2800;
            break;
        case MMC_VDD_24_25:
        case MMC_VDD_23_24:
            mV = 2400;
            break;
        case MMC_VDD_22_23:
        case MMC_VDD_21_22:
            mV = 2200;
            break;
        case MMC_VDD_20_21:
            mV = 2000;
            break;
        case MMC_VDD_165_195:
            mV = 1800;
            break;
        default:
            BUG();
        }   
        return menelaus_set_vdcdc(3, mV);
    }   
    return 0;
}

static void n810_set_power_emmc(struct device *dev, int power_on)

{
    dev_dbg(dev, "Set EMMC power %s\n", power_on ? "on" : "off");

    if (power_on) {
        gpio_set_value(N810_EMMC_VSD_GPIO, 1);
        msleep(1);
        gpio_set_value(N810_EMMC_VIO_GPIO, 1);
        msleep(1);
    } else {
        gpio_set_value(N810_EMMC_VIO_GPIO, 0);
        msleep(50);
        gpio_set_value(N810_EMMC_VSD_GPIO, 0);
        msleep(50);
    }
}

the first three are straightforward, the i2c could be tricky but very nicely expressed in the DT world, the others are so specific that I doubt they could be re-used on any other board, so I don't see the gain to port them to DT.

When I say port, I mean "import the interface" concept, of course :)

my two cents....

cheers,
Domenico

-----[ Domenico Andreoli, aka cavok
--[ http://www.dandreoli.com/gpgkey.asc
---[ 3A0F 2F80 F79C 678A 8936 4FEE 0677 9033 A20E BC50

#4 lore raw

PATCH 1/1 ARM: add DT support to the S3C SDI driver

In reply to Domenico Andreoli
Quoted 8 lines · On Wednesday 13 April 2011 20:25:47 Domenico Andreoli wrote:

From: Domenico Andreoli <[email protected]>

This patch adds DeviceTree support to the S3C SDI driver.

It implements all the configurations of the platform driver except the set_power() callback and the ocr_avail mask.

Hm, but is there any bootloader with dt support for s3c24xx?

Regards
Vasily

#5 lore raw

PATCH 1/1 ARM: add DT support to the S3C SDI driver

Quoted 11 lines · Vasily Khoruzhick
Quoted 8 lines · On Wednesday 13 April 2011 20:25:47 Domenico Andreoli wrote:

From: Domenico Andreoli <[email protected]>

This patch adds DeviceTree support to the S3C SDI driver.

It implements all the configurations of the platform driver except the set_power() callback and the ocr_avail mask.

Hm, but is there any bootloader with dt support for s3c24xx?

I don't know, probably no - I don't care. IMHO main gain doesn't come from the bootloader.

I use this patch by Jeremy Kerr to bundle dtb with the kernel. Another solution has been proposed [0] but has some issue. More will come, maybe allowing the bundle of multiple dtbs.

cheers,
Domenico

[0] http://article.gmane.org/gmane.linux.drivers.devicetree/5068

arch/arm/Kconfig +4 -0
Index: arm-2.6.git/arch/arm/Kconfig
===================================================================
@@ -1694,6 +1694,10 @@
 	help
 	  Include support for flattened device tree machine descriptions.
 
+config ARM_EMBEDDED_DTB
+	string "Embedded device tree blob" if OF
+	default ""
+
 # Compressed boot loader in ROM.  Yes, we really want to ask about
 # TEXT and BSS so we preserve their values in the config files.
 config ZBOOT_ROM_TEXT
arch/arm/Makefile +1 -1
Index: arm-2.6.git/arch/arm/Makefile
===================================================================
@@ -281,7 +281,7 @@
 # Convert bzImage to zImage
 bzImage: zImage
 
-zImage Image xipImage bootpImage uImage: vmlinux
+zImage Image xipImage bootpImage uImage dtbImage: vmlinux
 	$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
 
 zinstall uinstall install: vmlinux
arch/arm/boot/Makefile +9 -1
Index: arm-2.6.git/arch/arm/boot/Makefile
===================================================================
@@ -27,7 +27,7 @@
 
 export ZRELADDR INITRD_PHYS PARAMS_PHYS
 
-targets := Image zImage xipImage bootpImage uImage
+targets := Image zImage xipImage bootpImage uImage dtbImage
 
 ifeq ($(CONFIG_XIP_KERNEL),y)
 
@@ -90,6 +90,14 @@
 	$(call if_changed,objcopy)
 	@echo '  Kernel: $@ is ready'
 
+$(obj)/dt/dtb: $(obj)/zImage FORCE
+	$(Q)$(MAKE) $(build)=$(obj)/dt $@
+	@:
+
+$(obj)/dtbImage: $(obj)/dt/dtb FORCE
+	$(call if_changed,objcopy)
+	@echo '  Kernel: $@ is ready'
+
 PHONY += initrd FORCE
 initrd:
 	@test "$(INITRD_PHYS)" != "" || \
arch/arm/boot/dt/Makefile new file +15 -0
Index: arm-2.6.git/arch/arm/boot/dt/Makefile
===================================================================
@@ -0,0 +1,15 @@
+#
+# linux/arch/arm/dt/Makefile
+#
+# This file is included by the global makefile so that you can add your own
+# architecture-specific flags and dependencies.
+#
+
+LDFLAGS_dtb	:=-p --no-undefined -X -T
+
+targets	:= dtb dtb.o
+
+$(obj)/dtb:	$(src)/dtb.lds $(src)/dtb.o FORCE
+	$(call if_changed,ld)
+
+$(obj)/dtb.o: arch/arm/boot/zImage FORCE
arch/arm/boot/dt/dtb.S new file +52 -0

52 lines not on this page · raw message

arch/arm/boot/dt/dtb.lds new file +25 -0
Index: arm-2.6.git/arch/arm/boot/dt/dtb.lds
===================================================================
@@ -0,0 +1,25 @@
+/*
+ *  linux/arch/arm/boot/dt/dtb.lds
+ *
+ *  Copyright (C) 2009-2010 Jeremy Kerr <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+OUTPUT_ARCH(arm)
+ENTRY(start)
+SECTIONS
+{
+	.text : {
+		*(.text)
+	}
+
+	.dtb : {
+		*(.dtb)
+	}
+
+	.zimage : {
+		*(.zimage)
+	}
+}

-----[ Domenico Andreoli, aka cavok
--[ http://www.dandreoli.com/gpgkey.asc
---[ 3A0F 2F80 F79C 678A 8936 4FEE 0677 9033 A20E BC50

#6 lore raw

PATCH 1/1 ARM: add DT support to the S3C SDI driver

In reply to Vasily Khoruzhick
Quoted 11 lines · Vasily Khoruzhick
Quoted 8 lines · On Wednesday 13 April 2011 20:25:47 Domenico Andreoli wrote:

From: Domenico Andreoli <[email protected]>

This patch adds DeviceTree support to the S3C SDI driver.

It implements all the configurations of the platform driver except the set_power() callback and the ocr_avail mask.

Hm, but is there any bootloader with dt support for s3c24xx?

On current u-boot mainline, all arm platforms can now add devicetree support by enabling CONFIG_OF_LIBFDT.

g.

A message that is not in the archive (sent off-list or not yet received): 20110504010448.GA4952-e0URQFbLeQY2iJbIjFUEsiwD8/[email protected]

#8 lore raw
Quoted 9 lines · Grant Likely
Quoted 8 lines · Vasily Khoruzhick
Quoted 7 lines · On Wednesday 13 April 2011 20:25:47 Domenico Andreoli wrote:

From: Domenico Andreoli <[email protected]>

This patch adds DeviceTree support to the S3C SDI driver.

It implements all the configurations of the platform driver except the set_power() callback and the ocr_avail mask.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Hm, but is there any bootloader with dt support for s3c24xx?

On current u-boot mainline, all arm platforms can now add devicetree support by enabling CONFIG_OF_LIBFDT.

once u-boot is properly configured, is dtb built in it or is loaded from nvram?

thanks,
domenico

-----[ Domenico Andreoli, aka cavok
 --[ http://cavokz.wordpress.com/gpgkey/
   ---[ 3A0F 2F80 F79C 678A 8936  4FEE 0677 9033 A20E BC50

A message that is not in the archive (sent off-list or not yet received): BANLkTim9UT8epyp7ccFdKq6-uobU2h0wdA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#10 lore raw
Quoted 10 lines · Domenico Andreoli
Quoted 9 lines · Grant Likely
Quoted 8 lines · Vasily Khoruzhick
Quoted 7 lines · On Wednesday 13 April 2011 20:25:47 Domenico Andreoli wrote:

From: Domenico Andreoli <[email protected]>

This patch adds DeviceTree support to the S3C SDI driver.

It implements all the configurations of the platform driver except the set_power() callback and the ocr_avail mask.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Hm, but is there any bootloader with dt support for s3c24xx?

On current u-boot mainline, all arm platforms can now add devicetree support by enabling CONFIG_OF_LIBFDT.

once u-boot is properly configured, is dtb built in it or is loaded from nvram?

Typically it is loaded from the same place the kernel is stored, but it can be loaded from any device supported by u-boot.

g.