From f86af2fc3f276e7467f4afc3b010b64887a48f3f Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Mon, 25 Feb 2013 11:37:58 -0600 Subject: [PATCH] --- yaml --- r: 372351 b: refs/heads/master c: 32cde0b5141030030f950a3c7e971018c81a9360 h: refs/heads/master i: 372349: 570c3ddbb746953f9b812a089daeca48493ec6f8 372347: 96fcae065bf5e0ae0f02cf14a9b787aa7305332d 372343: 3165533a7ba20cf96e83b2e3490ce51fe1dfab77 372335: bd08d9d80e75b86070d43dbb7235337acee17aa7 372319: 68a67f3fc1493ec3cda05e302faf149c35f73475 372287: 7e07a3174cfa926999fde1cbf2a552c9d2fb8e51 372223: 06d7e418110b14a2cb2ddd47db9bf34b5154d0ed v: v3 --- [refs] | 2 +- .../devicetree/bindings/mtd/gpmc-onenand.txt | 3 +++ trunk/arch/arm/mach-omap2/gpmc-onenand.c | 21 +++++++++++++------ 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 81142209b767..1c2438b0e5fd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: acc79980c92ca9e8a39115b60ca832718a8156df +refs/heads/master: 32cde0b5141030030f950a3c7e971018c81a9360 diff --git a/trunk/Documentation/devicetree/bindings/mtd/gpmc-onenand.txt b/trunk/Documentation/devicetree/bindings/mtd/gpmc-onenand.txt index deec9da224a2..b7529424ac88 100644 --- a/trunk/Documentation/devicetree/bindings/mtd/gpmc-onenand.txt +++ b/trunk/Documentation/devicetree/bindings/mtd/gpmc-onenand.txt @@ -10,6 +10,8 @@ Documentation/devicetree/bindings/bus/ti-gpmc.txt Required properties: - reg: The CS line the peripheral is connected to + - gpmc,device-width Width of the ONENAND device connected to the GPMC + in bytes. Must be 1 or 2. Optional properties: @@ -34,6 +36,7 @@ Example for an OMAP3430 board: onenand@0 { reg = <0 0 0>; /* CS0, offset 0 */ + gpmc,device-width = <2>; #address-cells = <1>; #size-cells = <1>; diff --git a/trunk/arch/arm/mach-omap2/gpmc-onenand.c b/trunk/arch/arm/mach-omap2/gpmc-onenand.c index 46aac83d73d4..64b5a8346982 100644 --- a/trunk/arch/arm/mach-omap2/gpmc-onenand.c +++ b/trunk/arch/arm/mach-omap2/gpmc-onenand.c @@ -272,6 +272,10 @@ static int omap2_onenand_setup_async(void __iomem *onenand_base) struct gpmc_timings t; int ret; + if (gpmc_onenand_data->of_node) + gpmc_read_settings_dt(gpmc_onenand_data->of_node, + &onenand_async); + omap2_onenand_set_async_mode(onenand_base); omap2_onenand_calc_async_timings(&t); @@ -300,12 +304,17 @@ static int omap2_onenand_setup_sync(void __iomem *onenand_base, int *freq_ptr) set_onenand_cfg(onenand_base); } - /* - * FIXME: Appears to be legacy code from initial ONENAND commit. - * Unclear what boards this is for and if this can be removed. - */ - if (!cpu_is_omap34xx()) - onenand_sync.wait_on_read = true; + if (gpmc_onenand_data->of_node) { + gpmc_read_settings_dt(gpmc_onenand_data->of_node, + &onenand_sync); + } else { + /* + * FIXME: Appears to be legacy code from initial ONENAND commit. + * Unclear what boards this is for and if this can be removed. + */ + if (!cpu_is_omap34xx()) + onenand_sync.wait_on_read = true; + } omap2_onenand_calc_sync_timings(&t, gpmc_onenand_data->flags, freq);