blob: c67c107b16c28a253854088e64bde32d23d9961f [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Minkyu Kang1ecdd832010-05-31 22:02:42 +09002/*
3 * Copyright (C) 2008-2009 Samsung Electronics
4 * Kyungmin Park <kyungmin.park@samsung.com>
Minkyu Kang1ecdd832010-05-31 22:02:42 +09005 */
6
Tom Riniabb9a042024-05-18 20:20:43 -06007#include <common.h>
Minkyu Kang1ecdd832010-05-31 22:02:42 +09008#include <linux/mtd/mtd.h>
9#include <linux/mtd/onenand.h>
10#include <linux/mtd/samsung_onenand.h>
11#include <onenand_uboot.h>
12
Ladislav Michl11732712016-07-12 20:28:20 +020013int onenand_board_init(struct mtd_info *mtd)
Minkyu Kang1ecdd832010-05-31 22:02:42 +090014{
15 struct onenand_chip *this = mtd->priv;
16
Tom Rini6a5dccc2022-11-16 13:10:41 -050017 this->base = (void *)CFG_SYS_ONENAND_BASE;
Minkyu Kang1ecdd832010-05-31 22:02:42 +090018 this->options |= ONENAND_RUNTIME_BADBLOCK_CHECK;
Lukasz Majewskiece4ac22011-11-09 11:27:14 +010019 this->chip_probe = s5pc110_chip_probe;
Ladislav Michl11732712016-07-12 20:28:20 +020020
21 return 0;
Minkyu Kang1ecdd832010-05-31 22:02:42 +090022}