[PATCH 0/4] ARM OMAP2+ GPMC: various fixes and bus children

From: Robert ABEL
Date: Mon Feb 16 2015 - 10:56:37 EST



I found a few more bugs in the GPMC driver. The first three patches should be self-explanatory:

*debug output was unaligned --> align it
*GPMCFCLKDIVIDER is used in all use cases --> always program it
*WAITMONITORINGTIME was computed in FCLK ticks instead of CLK ticks --> compute in CLK ticks

The last patch adds bus children to the GPMC. Currently, the GPMC driver
only supports direct children, which means one child with unique settings per CS region.

This patch adds explicit code inside the GPMC driver to probe for busses and
instantiate their children. (As opposed to adding the GPMC to of_default_bus_match_table
so it would be matched when the DT is first populated.)

GPMC properties apply to busses as well as direct children and map to whole CS regions.

Example:

&gpmc {
ranges = </* CS0 */ 0 /* offset (broken) */ 0x0000 /* OCP address */ 0x1000000 /* size */ 0x1000000>;

my_bus: nor@0,0x0000 { /* CS0; offset 0x0000 */

compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges = </* address */ 0x0000 /* parent address */ 0 0x0000 /* size */ 0x1000000>;
reg = </* parent address */0 0x0000 /* size */ 0x1000000>;
bank-width = <2>; /* GPMC_DEVWIDTH_16BIT */

gpmc,sync-read;
gpmc,sync-write;
gpmc,sync-clk-ps = ...;
... etc. ...
reg-io-width = <2>;

my_subdev0: subdev@0x0000 { /* address 0x0000 */

compatible = "my,driver0";
reg = </* parent address */ 0x0000 /* size */ 0x0800000>;

};
... etc. ...
my_subdevN: subdev@0x8000 { /* address 0x8000 */

compatible = "my,driverN";
reg = </* parent address */ 0x0000 /* size */ 0x0800000>;

};

};

};


Robert ABEL (4):
ARM OMAP2+ GPMC: fix debug output alignment
ARM OMAP2+ GPMC: always program GPMCFCLKDIVIDER
ARM OMAP2+ GPMC: fix WAITMONITORINGTIME divider bug
ARM OMAP2+ GPMC: add bus children

arch/arm/mach-omap2/gpmc.c | 105 ++++++++++++++++++++++++++++++++++-----------
1 file changed, 81 insertions(+), 24 deletions(-)

--
2.3.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/