diff options
author | Florian Fainelli <florian@openwrt.org> | 2007-07-19 16:19:19 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2007-07-19 16:19:19 +0000 |
commit | 4ca403bc3ddf20083f07e973bfa9057d34f1b960 (patch) | |
tree | 8e619d7f0dbc0b617338fb4e255508790907ef8b /target/linux/rb532-2.6/files/drivers/mtd/nand/rbmipsnand.c | |
parent | ae9858eeacb697606a537cf05b189aec4d04c9fa (diff) | |
download | master-187ad058-4ca403bc3ddf20083f07e973bfa9057d34f1b960.tar.gz master-187ad058-4ca403bc3ddf20083f07e973bfa9057d34f1b960.tar.bz2 master-187ad058-4ca403bc3ddf20083f07e973bfa9057d34f1b960.zip |
Suppress promc.c.orig, fix the nand detection with newer boards (#2038)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8063 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/rb532-2.6/files/drivers/mtd/nand/rbmipsnand.c')
-rw-r--r-- | target/linux/rb532-2.6/files/drivers/mtd/nand/rbmipsnand.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/target/linux/rb532-2.6/files/drivers/mtd/nand/rbmipsnand.c b/target/linux/rb532-2.6/files/drivers/mtd/nand/rbmipsnand.c index 47bdbc7c34..35febc6652 100644 --- a/target/linux/rb532-2.6/files/drivers/mtd/nand/rbmipsnand.c +++ b/target/linux/rb532-2.6/files/drivers/mtd/nand/rbmipsnand.c @@ -33,6 +33,8 @@ #define MEM32(x) *((volatile unsigned *) (x)) +extern unsigned int board_type; + struct rb500_nand_info { struct nand_chip chip; struct mtd_info mtd; @@ -123,9 +125,14 @@ static int rbmips_probe(struct platform_device *pdev) return -EIO; } - /* FIXME : this seems to work only for newer RB500, check the version to set the right flags accordingly */ - data->flags1 = LO_FOFF | LO_CEX; - data->flags2 = LO_ULED | LO_ALE | LO_CLE | LO_WPX; + if (board_type > 500) { + data->flags1 = LO_FOFF | LO_CEX; + data->flags2 = LO_ULED | LO_ALE | LO_CLE | LO_WPX; + } + else { + data->flags1 = LO_WPX | LO_FOFF | LO_CEX; + data->flags2 = LO_ULED | LO_ALE | LO_CLE; + } changeLatchU5(data->flags1, data->flags2); |