summaryrefslogtreecommitdiffstats
path: root/board/socrates
diff options
context:
space:
mode:
Diffstat (limited to 'board/socrates')
-rw-r--r--board/socrates/nand.c6
-rw-r--r--board/socrates/socrates.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/board/socrates/nand.c b/board/socrates/nand.c
index 15e6ea6944..a67d812c81 100644
--- a/board/socrates/nand.c
+++ b/board/socrates/nand.c
@@ -48,7 +48,7 @@ static void sc_nand_write_byte(struct mtd_info *mtd, u_char byte)
static void sc_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len)
{
int i;
- struct nand_chip *this = mtd->priv;
+ struct nand_chip *this = mtd_to_nand(mtd);
for (i = 0; i < len; i++) {
out_be32(this->IO_ADDR_W,
@@ -88,7 +88,7 @@ static u16 sc_nand_read_word(struct mtd_info *mtd)
static void sc_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
{
int i;
- struct nand_chip *this = mtd->priv;
+ struct nand_chip *this = mtd_to_nand(mtd);
int val;
val = (state & FPGA_NAND_ENABLE) | FPGA_NAND_CMD_READ;
@@ -105,7 +105,7 @@ static void sc_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
*/
static int sc_nand_device_ready(struct mtd_info *mtdinfo)
{
- struct nand_chip *this = mtdinfo->priv;
+ struct nand_chip *this = mtd_to_nand(mtdinfo);
if (in_be32(this->IO_ADDR_W) & FPGA_NAND_BUSY)
return 0; /* busy */
diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c
index 953a43ff31..8b34a80e8f 100644
--- a/board/socrates/socrates.c
+++ b/board/socrates/socrates.c
@@ -217,7 +217,7 @@ int board_early_init_r (void)
}
#endif /* CONFIG_BOARD_EARLY_INIT_R */
-#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
+#ifdef CONFIG_OF_BOARD_SETUP
int ft_board_setup(void *blob, bd_t *bd)
{
u32 val[12];
@@ -253,7 +253,7 @@ int ft_board_setup(void *blob, bd_t *bd)
return 0;
}
-#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
+#endif /* CONFIG_OF_BOARD_SETUP */
#define DEFAULT_BRIGHTNESS 25
#define BACKLIGHT_ENABLE (1 << 31)