Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 372339
b: refs/heads/master
c: 9f83315
h: refs/heads/master
i:
  372337: 0395d3b
  372335: bd08d9d
v: v3
  • Loading branch information
Jon Hunter committed Apr 1, 2013
1 parent f849044 commit b9e7651
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: be9f10c04fb13d32fc30d599c1971a10916a2209
refs/heads/master: 9f8331562aa1fd72e80dd6037c958cb3faf4cc38
13 changes: 13 additions & 0 deletions trunk/arch/arm/mach-omap2/gpmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@
#define GPMC_HAS_WR_ACCESS 0x1
#define GPMC_HAS_WR_DATA_MUX_BUS 0x2

#define GPMC_NR_WAITPINS 4

/* XXX: Only NAND irq has been considered,currently these are the only ones used
*/
#define GPMC_NR_IRQ 2
Expand Down Expand Up @@ -153,6 +155,7 @@ static struct resource gpmc_cs_mem[GPMC_CS_NUM];
static DEFINE_SPINLOCK(gpmc_mem_lock);
/* Define chip-selects as reserved by default until probe completes */
static unsigned int gpmc_cs_map = ((1 << GPMC_CS_NUM) - 1);
static unsigned int gpmc_nr_waitpins;
static struct device *gpmc_dev;
static int gpmc_irq;
static resource_size_t phys_base, mem_size;
Expand Down Expand Up @@ -1294,6 +1297,13 @@ static int gpmc_probe_dt(struct platform_device *pdev)
if (!of_id)
return 0;

ret = of_property_read_u32(pdev->dev.of_node, "gpmc,num-waitpins",
&gpmc_nr_waitpins);
if (ret < 0) {
pr_err("%s: number of wait pins not found!\n", __func__);
return ret;
}

for_each_node_by_name(child, "nand") {
ret = gpmc_probe_nand_child(pdev, child);
if (ret < 0) {
Expand Down Expand Up @@ -1372,6 +1382,9 @@ static int gpmc_probe(struct platform_device *pdev)
/* Now the GPMC is initialised, unreserve the chip-selects */
gpmc_cs_map = 0;

if (!pdev->dev.of_node)
gpmc_nr_waitpins = GPMC_NR_WAITPINS;

rc = gpmc_probe_dt(pdev);
if (rc < 0) {
clk_disable_unprepare(gpmc_l3_clk);
Expand Down

0 comments on commit b9e7651

Please sign in to comment.