* [PATCH V4 0/3] ARM: Kirkwood: Convert DNS-325 & DNS-320 to access nand via devicetree (was: Add support for DNS-320 and DNS-325 using devicetree) @ 2012-03-31 13:53 Jamie Lentin 2012-03-31 13:53 ` [PATCH V4 1/3] mtd: Add orion_nand devicetree bindings Jamie Lentin [not found] ` <1333201985-2222-1-git-send-email-jm-Pj/HzkgeCk7QXOPxS62xeg@public.gmane.org> 0 siblings, 2 replies; 6+ messages in thread From: Jamie Lentin @ 2012-03-31 13:53 UTC (permalink / raw) To: Arnd Bergmann, Jason, Grant Likely Cc: devicetree-discuss, Jamie Lentin, linux-arm-kernel Right, I've stopped being lazy and researched what the various properties contain and documented them. In the process I noticed that all other drivers have bank-width in bytes, so I changed orion_nand to match. If using orion_nand without devicetree, the width property is still in bits though. Hopefully this isn't considered too bad? They have different names at least. I've left out everything that has been merged into either Grant or Jason's tree. Hopefully this was a useful thing to do. Thanks again to everyone reviewing. Changes since v3: Add support for DNS-320 and DNS-325 using devicetree * Remove patches that are already merged * Add documentation on orion_nand devicetree bindings * Convert bank-width to be in bytes to match other properties * Make defaults more explicit Changes since v2: Add support for DNS-320 and DNS-325 using devicetree * Split patches further, separating orion_nand and kirkwood changes * dts renames: "bank-width", not "width". "okay", not "ok" * Separate documentation out into separate patch, add references to partition.txt to all mtd bindings. Changes since v1: Add support for DNS-320 and DNS-325 using devicetree * Rebase against kirkwood_dt_for_3.4, removing premature devicetree ports. * Move additions into a separate board-dnskw.c. It could be separated further into a board-dns320.c and board-dns325.c but it probably isn't worth it. * s/marvell,/mrvl,/g * Include an example dtb partition in documentation * Copy structure of serial nodes to allow common options for NAND to be set in kirkwood.dtsi * Simplifications in orion-nand.c Jamie Lentin (3): mtd: Add orion_nand devicetree bindings kirkwood: Allow nand to be configured via. devicetree ARM: kirkwood: Define DNS-320/DNS-325 NAND in fdt .../devicetree/bindings/mtd/orion-nand.txt | 50 ++++++++++++++++++++ arch/arm/boot/dts/kirkwood-dns320.dts | 35 ++++++++++++++ arch/arm/boot/dts/kirkwood-dns325.dts | 35 ++++++++++++++ arch/arm/boot/dts/kirkwood.dtsi | 15 ++++++- arch/arm/mach-kirkwood/board-dnskw.c | 31 ------------ arch/arm/mach-kirkwood/common.c | 12 +++++ drivers/mtd/nand/orion_nand.c | 41 +++++++++++++++- 7 files changed, 185 insertions(+), 34 deletions(-) create mode 100644 Documentation/devicetree/bindings/mtd/orion-nand.txt -- 1.7.9.1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH V4 1/3] mtd: Add orion_nand devicetree bindings 2012-03-31 13:53 [PATCH V4 0/3] ARM: Kirkwood: Convert DNS-325 & DNS-320 to access nand via devicetree (was: Add support for DNS-320 and DNS-325 using devicetree) Jamie Lentin @ 2012-03-31 13:53 ` Jamie Lentin [not found] ` <1333201985-2222-2-git-send-email-jm-Pj/HzkgeCk7QXOPxS62xeg@public.gmane.org> [not found] ` <1333201985-2222-1-git-send-email-jm-Pj/HzkgeCk7QXOPxS62xeg@public.gmane.org> 1 sibling, 1 reply; 6+ messages in thread From: Jamie Lentin @ 2012-03-31 13:53 UTC (permalink / raw) To: Arnd Bergmann, Jason, Grant Likely Cc: devicetree-discuss, Jamie Lentin, linux-arm-kernel Allow a NAND chip using the orion_nand driver to be described using devicetree. Signed-off-by: Jamie Lentin <jm@lentin.co.uk> --- * Document all parameters. * Convert bank-width to be in bytes * Add explicit defaults for cle, ale and bank-width .../devicetree/bindings/mtd/orion-nand.txt | 50 ++++++++++++++++++++ drivers/mtd/nand/orion_nand.c | 41 +++++++++++++++- 2 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/mtd/orion-nand.txt diff --git a/Documentation/devicetree/bindings/mtd/orion-nand.txt b/Documentation/devicetree/bindings/mtd/orion-nand.txt new file mode 100644 index 0000000..b2356b7 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/orion-nand.txt @@ -0,0 +1,50 @@ +NAND support for Marvell Orion SoC platforms + +Required properties: +- compatible : "mrvl,orion-nand". +- reg : Base physical address of the NAND and length of memory mapped + region + +Optional properties: +- cle : Address line number connected to CLE. Default is 0 +- ale : Address line number connected to ALE. Default is 1 +- bank-width : Width in bytes of the device. Default is 1 +- chip-delay : Chip dependent delay for transferring data from array to read + registers in usecs + +The device tree may optionally contain sub-nodes describing partitions of the +address space. See partition.txt for more detail. + +Example: + +nand@f4000000 { + #address-cells = <1>; + #size-cells = <1>; + cle = <0>; + ale = <1>; + bank-width = <1>; + chip-delay = <25>; + compatible = "mrvl,orion-nand"; + reg = <0xf4000000 0x400>; + + partition@0 { + label = "u-boot"; + reg = <0x0000000 0x100000>; + read-only; + }; + + partition@100000 { + label = "uImage"; + reg = <0x0100000 0x200000>; + }; + + partition@300000 { + label = "dtb"; + reg = <0x0300000 0x100000>; + }; + + partition@400000 { + label = "root"; + reg = <0x0400000 0x7d00000>; + }; +}; diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c index 29f505a..dd3ece8 100644 --- a/drivers/mtd/nand/orion_nand.c +++ b/drivers/mtd/nand/orion_nand.c @@ -13,6 +13,7 @@ #include <linux/slab.h> #include <linux/module.h> #include <linux/platform_device.h> +#include <linux/of.h> #include <linux/mtd/mtd.h> #include <linux/mtd/nand.h> #include <linux/mtd/partitions.h> @@ -74,11 +75,13 @@ static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) static int __init orion_nand_probe(struct platform_device *pdev) { struct mtd_info *mtd; + struct mtd_part_parser_data ppdata = {}; struct nand_chip *nc; struct orion_nand_data *board; struct resource *res; void __iomem *io_base; int ret = 0; + u32 val = 0; nc = kzalloc(sizeof(struct nand_chip) + sizeof(struct mtd_info), GFP_KERNEL); if (!nc) { @@ -101,7 +104,32 @@ static int __init orion_nand_probe(struct platform_device *pdev) goto no_res; } - board = pdev->dev.platform_data; + if (pdev->dev.of_node) { + board = devm_kzalloc(&pdev->dev, sizeof(struct orion_nand_data), + GFP_KERNEL); + if (!board) { + printk(KERN_ERR "orion_nand: failed to allocate board structure.\n"); + ret = -ENOMEM; + goto no_res; + } + if (!of_property_read_u32(pdev->dev.of_node, "cle", &val)) + board->cle = (u8)val; + else + board->cle = 0; + if (!of_property_read_u32(pdev->dev.of_node, "ale", &val)) + board->ale = (u8)val; + else + board->ale = 1; + if (!of_property_read_u32(pdev->dev.of_node, + "bank-width", &val)) + board->width = (u8)val * 8; + else + board->width = 8; + if (!of_property_read_u32(pdev->dev.of_node, + "chip-delay", &val)) + board->chip_delay = (u8)val; + } else + board = pdev->dev.platform_data; mtd->priv = nc; mtd->owner = THIS_MODULE; @@ -129,7 +157,8 @@ static int __init orion_nand_probe(struct platform_device *pdev) } mtd->name = "orion_nand"; - ret = mtd_device_parse_register(mtd, NULL, 0, + ppdata.of_node = pdev->dev.of_node; + ret = mtd_device_parse_register(mtd, NULL, &ppdata, board->parts, board->nr_parts); if (ret) { nand_release(mtd); @@ -161,11 +190,19 @@ static int __devexit orion_nand_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_OF +static struct of_device_id orion_nand_of_match_table[] = { + { .compatible = "mrvl,orion-nand", }, + {}, +}; +#endif + static struct platform_driver orion_nand_driver = { .remove = __devexit_p(orion_nand_remove), .driver = { .name = "orion_nand", .owner = THIS_MODULE, + .of_match_table = of_match_ptr(orion_nand_of_match_table), }, }; -- 1.7.9.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
[parent not found: <1333201985-2222-2-git-send-email-jm-Pj/HzkgeCk7QXOPxS62xeg@public.gmane.org>]
* [PATCH V4.1 1/3] mtd: Add orion_nand devicetree bindings [not found] ` <1333201985-2222-2-git-send-email-jm-Pj/HzkgeCk7QXOPxS62xeg@public.gmane.org> @ 2012-04-05 21:12 ` Jamie Lentin 0 siblings, 0 replies; 6+ messages in thread From: Jamie Lentin @ 2012-04-05 21:12 UTC (permalink / raw) To: Andrew Lunn, Arnd Bergmann, Jason, Grant Likely Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Jamie Lentin, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r Allow a NAND chip using the orion_nand driver to be described using devicetree. Signed-off-by: Jamie Lentin <jm-Pj/HzkgeCk7QXOPxS62xeg@public.gmane.org> --- * WARN when bank-width is out of range, as suggested by Andrew Lunn * Document all parameters. * Convert bank-width to be in bytes * Add explicit defaults for cle, ale and bank-width .../devicetree/bindings/mtd/orion-nand.txt | 50 ++++++++++++++++++++ drivers/mtd/nand/orion_nand.c | 45 +++++++++++++++++- 2 files changed, 93 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/mtd/orion-nand.txt diff --git a/Documentation/devicetree/bindings/mtd/orion-nand.txt b/Documentation/devicetree/bindings/mtd/orion-nand.txt new file mode 100644 index 0000000..b2356b7 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/orion-nand.txt @@ -0,0 +1,50 @@ +NAND support for Marvell Orion SoC platforms + +Required properties: +- compatible : "mrvl,orion-nand". +- reg : Base physical address of the NAND and length of memory mapped + region + +Optional properties: +- cle : Address line number connected to CLE. Default is 0 +- ale : Address line number connected to ALE. Default is 1 +- bank-width : Width in bytes of the device. Default is 1 +- chip-delay : Chip dependent delay for transferring data from array to read + registers in usecs + +The device tree may optionally contain sub-nodes describing partitions of the +address space. See partition.txt for more detail. + +Example: + +nand@f4000000 { + #address-cells = <1>; + #size-cells = <1>; + cle = <0>; + ale = <1>; + bank-width = <1>; + chip-delay = <25>; + compatible = "mrvl,orion-nand"; + reg = <0xf4000000 0x400>; + + partition@0 { + label = "u-boot"; + reg = <0x0000000 0x100000>; + read-only; + }; + + partition@100000 { + label = "uImage"; + reg = <0x0100000 0x200000>; + }; + + partition@300000 { + label = "dtb"; + reg = <0x0300000 0x100000>; + }; + + partition@400000 { + label = "root"; + reg = <0x0400000 0x7d00000>; + }; +}; diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c index 29f505a..678ba73 100644 --- a/drivers/mtd/nand/orion_nand.c +++ b/drivers/mtd/nand/orion_nand.c @@ -13,6 +13,7 @@ #include <linux/slab.h> #include <linux/module.h> #include <linux/platform_device.h> +#include <linux/of.h> #include <linux/mtd/mtd.h> #include <linux/mtd/nand.h> #include <linux/mtd/partitions.h> @@ -74,11 +75,13 @@ static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) static int __init orion_nand_probe(struct platform_device *pdev) { struct mtd_info *mtd; + struct mtd_part_parser_data ppdata = {}; struct nand_chip *nc; struct orion_nand_data *board; struct resource *res; void __iomem *io_base; int ret = 0; + u32 val = 0; nc = kzalloc(sizeof(struct nand_chip) + sizeof(struct mtd_info), GFP_KERNEL); if (!nc) { @@ -101,7 +104,32 @@ static int __init orion_nand_probe(struct platform_device *pdev) goto no_res; } - board = pdev->dev.platform_data; + if (pdev->dev.of_node) { + board = devm_kzalloc(&pdev->dev, sizeof(struct orion_nand_data), + GFP_KERNEL); + if (!board) { + printk(KERN_ERR "orion_nand: failed to allocate board structure.\n"); + ret = -ENOMEM; + goto no_res; + } + if (!of_property_read_u32(pdev->dev.of_node, "cle", &val)) + board->cle = (u8)val; + else + board->cle = 0; + if (!of_property_read_u32(pdev->dev.of_node, "ale", &val)) + board->ale = (u8)val; + else + board->ale = 1; + if (!of_property_read_u32(pdev->dev.of_node, + "bank-width", &val)) + board->width = (u8)val * 8; + else + board->width = 8; + if (!of_property_read_u32(pdev->dev.of_node, + "chip-delay", &val)) + board->chip_delay = (u8)val; + } else + board = pdev->dev.platform_data; mtd->priv = nc; mtd->owner = THIS_MODULE; @@ -115,6 +143,10 @@ static int __init orion_nand_probe(struct platform_device *pdev) if (board->chip_delay) nc->chip_delay = board->chip_delay; + WARN(board->width > 16, + "%d bit bus width out of range (devicetree bank-width specified in bytes)", + board->width); + if (board->width == 16) nc->options |= NAND_BUSWIDTH_16; @@ -129,7 +161,8 @@ static int __init orion_nand_probe(struct platform_device *pdev) } mtd->name = "orion_nand"; - ret = mtd_device_parse_register(mtd, NULL, 0, + ppdata.of_node = pdev->dev.of_node; + ret = mtd_device_parse_register(mtd, NULL, &ppdata, board->parts, board->nr_parts); if (ret) { nand_release(mtd); @@ -161,11 +194,19 @@ static int __devexit orion_nand_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_OF +static struct of_device_id orion_nand_of_match_table[] = { + { .compatible = "mrvl,orion-nand", }, + {}, +}; +#endif + static struct platform_driver orion_nand_driver = { .remove = __devexit_p(orion_nand_remove), .driver = { .name = "orion_nand", .owner = THIS_MODULE, + .of_match_table = of_match_ptr(orion_nand_of_match_table), }, }; -- 1.7.9.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
[parent not found: <1333201985-2222-1-git-send-email-jm-Pj/HzkgeCk7QXOPxS62xeg@public.gmane.org>]
* [PATCH V4 2/3] kirkwood: Allow nand to be configured via. devicetree [not found] ` <1333201985-2222-1-git-send-email-jm-Pj/HzkgeCk7QXOPxS62xeg@public.gmane.org> @ 2012-03-31 13:53 ` Jamie Lentin 2012-03-31 13:53 ` [PATCH V4 3/3] ARM: kirkwood: Define DNS-320/DNS-325 NAND in fdt Jamie Lentin 2012-03-31 18:12 ` [PATCH V4 0/3] ARM: Kirkwood: Convert DNS-325 & DNS-320 to access nand via devicetree (was: Add support for DNS-320 and DNS-325 using devicetree) Jason Cooper 2 siblings, 0 replies; 6+ messages in thread From: Jamie Lentin @ 2012-03-31 13:53 UTC (permalink / raw) To: Arnd Bergmann, Jason, Grant Likely Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Jamie Lentin, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r Add default configuration for NAND, to be enabled in your board config. Ensure clock gating is set appropriately when the NAND is enabled. Signed-off-by: Jamie Lentin <jm-Pj/HzkgeCk7QXOPxS62xeg@public.gmane.org> --- Update bank-width to be in bytes arch/arm/boot/dts/kirkwood.dtsi | 15 ++++++++++++++- arch/arm/mach-kirkwood/common.c | 12 ++++++++++++ 2 files changed, 26 insertions(+), 1 deletions(-) diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi index 3474ef8..926528b 100644 --- a/arch/arm/boot/dts/kirkwood.dtsi +++ b/arch/arm/boot/dts/kirkwood.dtsi @@ -5,7 +5,7 @@ ocp@f1000000 { compatible = "simple-bus"; - ranges = <0 0xf1000000 0x1000000>; + ranges = <0 0xf1000000 0x4000000>; #address-cells = <1>; #size-cells = <1>; @@ -32,5 +32,18 @@ reg = <0x10300 0x20>; interrupts = <53>; }; + + nand@3000000 { + #address-cells = <1>; + #size-cells = <1>; + cle = <0>; + ale = <1>; + bank-width = <1>; + compatible = "mrvl,orion-nand"; + reg = <0x3000000 0x400>; + chip-delay = <25>; + /* set partition map and/or chip-delay in board dts */ + status = "disabled"; + }; }; }; diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index a02cae8..3ad0373 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c @@ -15,6 +15,7 @@ #include <linux/ata_platform.h> #include <linux/mtd/nand.h> #include <linux/dma-mapping.h> +#include <linux/of.h> #include <net/dsa.h> #include <asm/page.h> #include <asm/timex.h> @@ -482,6 +483,9 @@ static int __init kirkwood_clock_gate(void) unsigned int curr = readl(CLOCK_GATING_CTRL); u32 dev, rev; +#ifdef CONFIG_OF + struct device_node *np; +#endif kirkwood_pcie_id(&dev, &rev); printk(KERN_DEBUG "Gating clock of unused units\n"); printk(KERN_DEBUG "before: 0x%08x\n", curr); @@ -489,6 +493,14 @@ static int __init kirkwood_clock_gate(void) /* Make sure those units are accessible */ writel(curr | CGC_SATA0 | CGC_SATA1 | CGC_PEX0 | CGC_PEX1, CLOCK_GATING_CTRL); +#ifdef CONFIG_OF + np = of_find_compatible_node(NULL, NULL, "mrvl,orion-nand"); + if (np && of_device_is_available(np)) { + kirkwood_clk_ctrl |= CGC_RUNIT; + of_node_put(np); + } +#endif + /* For SATA: first shutdown the phy */ if (!(kirkwood_clk_ctrl & CGC_SATA0)) { /* Disable PLL and IVREF */ -- 1.7.9.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH V4 3/3] ARM: kirkwood: Define DNS-320/DNS-325 NAND in fdt [not found] ` <1333201985-2222-1-git-send-email-jm-Pj/HzkgeCk7QXOPxS62xeg@public.gmane.org> 2012-03-31 13:53 ` [PATCH V4 2/3] kirkwood: Allow nand to be configured via. devicetree Jamie Lentin @ 2012-03-31 13:53 ` Jamie Lentin 2012-03-31 18:12 ` [PATCH V4 0/3] ARM: Kirkwood: Convert DNS-325 & DNS-320 to access nand via devicetree (was: Add support for DNS-320 and DNS-325 using devicetree) Jason Cooper 2 siblings, 0 replies; 6+ messages in thread From: Jamie Lentin @ 2012-03-31 13:53 UTC (permalink / raw) To: Arnd Bergmann, Jason, Grant Likely Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Jamie Lentin, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r Use devicetree to define NAND partitions. Use D-link partition scheme by default, to be vaguely compatible with their userland. Acked-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org> Acked-by: Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org> Signed-off-by: Jamie Lentin <jm-Pj/HzkgeCk7QXOPxS62xeg@public.gmane.org> --- Unchanged since V3 arch/arm/boot/dts/kirkwood-dns320.dts | 35 +++++++++++++++++++++++++++++++++ arch/arm/boot/dts/kirkwood-dns325.dts | 35 +++++++++++++++++++++++++++++++++ arch/arm/mach-kirkwood/board-dnskw.c | 31 ----------------------------- 3 files changed, 70 insertions(+), 31 deletions(-) diff --git a/arch/arm/boot/dts/kirkwood-dns320.dts b/arch/arm/boot/dts/kirkwood-dns320.dts index 78c834f..dc09a73 100644 --- a/arch/arm/boot/dts/kirkwood-dns320.dts +++ b/arch/arm/boot/dts/kirkwood-dns320.dts @@ -25,5 +25,40 @@ clock-frequency = <166666667>; status = "okay"; }; + + nand@3000000 { + status = "okay"; + + partition@0 { + label = "u-boot"; + reg = <0x0000000 0x100000>; + read-only; + }; + + partition@100000 { + label = "uImage"; + reg = <0x0100000 0x500000>; + }; + + partition@600000 { + label = "ramdisk"; + reg = <0x0600000 0x500000>; + }; + + partition@b00000 { + label = "image"; + reg = <0x0b00000 0x6600000>; + }; + + partition@7100000 { + label = "mini firmware"; + reg = <0x7100000 0xa00000>; + }; + + partition@7b00000 { + label = "config"; + reg = <0x7b00000 0x500000>; + }; + }; }; }; diff --git a/arch/arm/boot/dts/kirkwood-dns325.dts b/arch/arm/boot/dts/kirkwood-dns325.dts index 23241ab..c2a5562 100644 --- a/arch/arm/boot/dts/kirkwood-dns325.dts +++ b/arch/arm/boot/dts/kirkwood-dns325.dts @@ -20,5 +20,40 @@ clock-frequency = <200000000>; status = "okay"; }; + + nand@3000000 { + status = "okay"; + + partition@0 { + label = "u-boot"; + reg = <0x0000000 0x100000>; + read-only; + }; + + partition@100000 { + label = "uImage"; + reg = <0x0100000 0x500000>; + }; + + partition@600000 { + label = "ramdisk"; + reg = <0x0600000 0x500000>; + }; + + partition@b00000 { + label = "image"; + reg = <0x0b00000 0x6600000>; + }; + + partition@7100000 { + label = "mini firmware"; + reg = <0x7100000 0xa00000>; + }; + + partition@7b00000 { + label = "config"; + reg = <0x7b00000 0x500000>; + }; + }; }; }; diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c index 7cb7f6a..dc4e80a 100644 --- a/arch/arm/mach-kirkwood/board-dnskw.c +++ b/arch/arm/mach-kirkwood/board-dnskw.c @@ -23,7 +23,6 @@ #include <linux/gpio_keys.h> #include <linux/gpio-fan.h> #include <linux/leds.h> -#include <linux/mtd/physmap.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> #include <asm/mach/map.h> @@ -32,35 +31,6 @@ #include "common.h" #include "mpp.h" -static struct mtd_partition dnskw_nand_parts[] = { - { - .name = "u-boot", - .offset = 0, - .size = SZ_1M, - .mask_flags = MTD_WRITEABLE - }, { - .name = "uImage", - .offset = MTDPART_OFS_NXTBLK, - .size = 5 * SZ_1M - }, { - .name = "ramdisk", - .offset = MTDPART_OFS_NXTBLK, - .size = 5 * SZ_1M - }, { - .name = "image", - .offset = MTDPART_OFS_NXTBLK, - .size = 102 * SZ_1M - }, { - .name = "mini firmware", - .offset = MTDPART_OFS_NXTBLK, - .size = 10 * SZ_1M - }, { - .name = "config", - .offset = MTDPART_OFS_NXTBLK, - .size = 5 * SZ_1M - }, -}; - static struct mv643xx_eth_platform_data dnskw_ge00_data = { .phy_addr = MV643XX_ETH_PHY_ADDR(8), }; @@ -272,7 +242,6 @@ static void __init dnskw_gpio_register(unsigned gpio, char *name, int def) void __init dnskw_init(void) { kirkwood_mpp_conf(dnskw_mpp_config); - kirkwood_nand_init(ARRAY_AND_SIZE(dnskw_nand_parts), 25); kirkwood_ehci_init(); kirkwood_ge00_init(&dnskw_ge00_data); -- 1.7.9.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH V4 0/3] ARM: Kirkwood: Convert DNS-325 & DNS-320 to access nand via devicetree (was: Add support for DNS-320 and DNS-325 using devicetree) [not found] ` <1333201985-2222-1-git-send-email-jm-Pj/HzkgeCk7QXOPxS62xeg@public.gmane.org> 2012-03-31 13:53 ` [PATCH V4 2/3] kirkwood: Allow nand to be configured via. devicetree Jamie Lentin 2012-03-31 13:53 ` [PATCH V4 3/3] ARM: kirkwood: Define DNS-320/DNS-325 NAND in fdt Jamie Lentin @ 2012-03-31 18:12 ` Jason Cooper 2 siblings, 0 replies; 6+ messages in thread From: Jason Cooper @ 2012-03-31 18:12 UTC (permalink / raw) To: Jamie Lentin Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r On Sat, Mar 31, 2012 at 02:53:02PM +0100, Jamie Lentin wrote: > Right, I've stopped being lazy and researched what the various properties > contain and documented them. > > In the process I noticed that all other drivers have bank-width in bytes, > so I changed orion_nand to match. If using orion_nand without devicetree, > the width property is still in bits though. Hopefully this isn't considered too > bad? They have different names at least. > > I've left out everything that has been merged into either Grant or Jason's > tree. Hopefully this was a useful thing to do. > > Thanks again to everyone reviewing. > > Changes since v3: Add support for DNS-320 and DNS-325 using devicetree > * Remove patches that are already merged > * Add documentation on orion_nand devicetree bindings > * Convert bank-width to be in bytes to match other properties > * Make defaults more explicit > > Changes since v2: Add support for DNS-320 and DNS-325 using devicetree > * Split patches further, separating orion_nand and kirkwood changes > * dts renames: "bank-width", not "width". "okay", not "ok" > * Separate documentation out into separate patch, add references to > partition.txt to all mtd bindings. > > Changes since v1: Add support for DNS-320 and DNS-325 using devicetree > * Rebase against kirkwood_dt_for_3.4, removing premature devicetree ports. > * Move additions into a separate board-dnskw.c. It could be separated further > into a board-dns320.c and board-dns325.c but it probably isn't worth it. > * s/marvell,/mrvl,/g > * Include an example dtb partition in documentation > * Copy structure of serial nodes to allow common options for NAND to be set > in kirkwood.dtsi > * Simplifications in orion-nand.c > > Jamie Lentin (3): > mtd: Add orion_nand devicetree bindings > kirkwood: Allow nand to be configured via. devicetree > ARM: kirkwood: Define DNS-320/DNS-325 NAND in fdt > > .../devicetree/bindings/mtd/orion-nand.txt | 50 ++++++++++++++++++++ > arch/arm/boot/dts/kirkwood-dns320.dts | 35 ++++++++++++++ > arch/arm/boot/dts/kirkwood-dns325.dts | 35 ++++++++++++++ > arch/arm/boot/dts/kirkwood.dtsi | 15 ++++++- > arch/arm/mach-kirkwood/board-dnskw.c | 31 ------------ > arch/arm/mach-kirkwood/common.c | 12 +++++ > drivers/mtd/nand/orion_nand.c | 41 +++++++++++++++- > 7 files changed, 185 insertions(+), 34 deletions(-) > create mode 100644 Documentation/devicetree/bindings/mtd/orion-nand.txt Looks good, I'll let it sit a few days to catch any other comments. For the whole series: Acked-by: Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org> thx, Jason. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-04-05 21:12 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-03-31 13:53 [PATCH V4 0/3] ARM: Kirkwood: Convert DNS-325 & DNS-320 to access nand via devicetree (was: Add support for DNS-320 and DNS-325 using devicetree) Jamie Lentin 2012-03-31 13:53 ` [PATCH V4 1/3] mtd: Add orion_nand devicetree bindings Jamie Lentin [not found] ` <1333201985-2222-2-git-send-email-jm-Pj/HzkgeCk7QXOPxS62xeg@public.gmane.org> 2012-04-05 21:12 ` [PATCH V4.1 " Jamie Lentin [not found] ` <1333201985-2222-1-git-send-email-jm-Pj/HzkgeCk7QXOPxS62xeg@public.gmane.org> 2012-03-31 13:53 ` [PATCH V4 2/3] kirkwood: Allow nand to be configured via. devicetree Jamie Lentin 2012-03-31 13:53 ` [PATCH V4 3/3] ARM: kirkwood: Define DNS-320/DNS-325 NAND in fdt Jamie Lentin 2012-03-31 18:12 ` [PATCH V4 0/3] ARM: Kirkwood: Convert DNS-325 & DNS-320 to access nand via devicetree (was: Add support for DNS-320 and DNS-325 using devicetree) Jason Cooper
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).