]> git.baikalelectronics.ru Git - uboot.git/commit
ram: ast2600: Fix incorrect statement of the register polling
authorDylan Hung <dylan_hung@aspeedtech.com>
Fri, 11 Nov 2022 07:30:06 +0000 (15:30 +0800)
committerTom Rini <trini@konsulko.com>
Thu, 24 Nov 2022 21:25:54 +0000 (16:25 -0500)
commitc9e4dfa4db1ec731927283351b7b41eb0fddc772
tree6b863adff5c739099b2b63d7eb66496148a7efa2
parent289f1f108cb2083a23b1246e87d9d9c4629132b8
ram: ast2600: Fix incorrect statement of the register polling

The condition "~data" in the if-statement is a typo.  The original
intention is to poll if SDRAM_PHYCTRL0_INIT bit equals to 0. So use
"data == 0" for instead.

Besides, the bit[1] of "phy_status" register is hardwired to
SDRAM_PHYCTRL0_INIT (with inverse logic). Since SDRAM_PHYCTRL0_INIT has
already done, remove the unnecessary checking of phy_status[1].

Fixes: 2ed1355b80dd ("ram: aspeed: Add AST2600 DRAM control support")
Review-by: Ryan Chen <ryan_chen@aspeedtech.com>
Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
drivers/ram/aspeed/sdram_ast2600.c