-+/*
-+ if (is_rb500()) {
-+ if (is_rb400()) {
-+ printk("RB400 nand\n");
-+ MEM32(IDT434_REG_BASE + GPIOD) |= GPIO_WPX;
-+ MEM32(IDT434_REG_BASE + GPIOD) &= ~GPIO_CLE;
-+ MEM32(IDT434_REG_BASE + GPIOD) &= ~GPIO_ALE;
-+ rnand.hwcontrol = rbmips_hwcontrol400;
-+ } else {
-+*/
-+ printk("RB500 nand\n");
-+ changeLatchU5(LO_WPX | LO_FOFF | LO_CEX,
-+ LO_ULED | LO_ALE | LO_CLE);
-+ rnand.hwcontrol = rbmips_hwcontrol500;
-+// }
-+
-+ rnand.dev_ready = rb500_dev_ready;
-+ rnand.IO_ADDR_W = (unsigned char *)
-+ KSEG1ADDR(MEM32(IDT434_REG_BASE + DEV2BASE));
-+ rnand.IO_ADDR_R = rnand.IO_ADDR_W;
-+/* } else if (is_rb100()) {
-+ printk("RB100 nand\n");
-+ MEM32(0xB2000064) = 0x100;
-+ MEM32(0xB2000008) = 0x1;
-+ SMEM1(NAND_SET_SPn) = 0x01;
-+ SMEM1(NAND_CLR_WPn) = 0x01;
-+ rnand.IO_ADDR_R = (unsigned char *)KSEG1ADDR(SMEM1_BASE);
-+ rnand.IO_ADDR_W = rnand.IO_ADDR_R;
-+ rnand.hwcontrol = rbmips_hwcontrol100;
-+ rnand.dev_ready = rb100_dev_ready;
-+ }
-+*/
-+ p_nand = (void __iomem *)ioremap(( void*)0x18a20000, 0x1000);
++
++ printk("RB500 nand\n");
++ changeLatchU5(LO_WPX | LO_FOFF | LO_CEX,
++ LO_ULED | LO_ALE | LO_CLE);
++ rnand.cmd_ctrl = rbmips_hwcontrol500;
++
++ rnand.dev_ready = rb500_dev_ready;
++ rnand.IO_ADDR_W = (unsigned char *)
++ KSEG1ADDR(MEM32(IDT434_REG_BASE + DEV2BASE));
++ rnand.IO_ADDR_R = rnand.IO_ADDR_W;
++
++ p_nand = (void __iomem *) ioremap((void *) 0x18a20000, 0x1000);