blob: ba56e86df4653d7cf3ba1feaf483aae6d0081489 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Minkyu Kang0aa1a6b2011-01-24 15:33:50 +09002/*
3 * Copyright (C) 2010 Samsung Electronics
4 * Kyungmin Park <kyungmin.park@samsung.com>
Minkyu Kang0aa1a6b2011-01-24 15:33:50 +09005 */
6
Tom Rinidec7ea02024-05-20 13:35:03 -06007#include <config.h>
Minkyu Kang0aa1a6b2011-01-24 15:33:50 +09008#include <linux/mtd/mtd.h>
9#include <linux/mtd/onenand.h>
Lukasz Majewskiece4ac22011-11-09 11:27:14 +010010#include <linux/mtd/samsung_onenand.h>
Minkyu Kang0aa1a6b2011-01-24 15:33:50 +090011
Ladislav Michl11732712016-07-12 20:28:20 +020012int onenand_board_init(struct mtd_info *mtd)
Minkyu Kang0aa1a6b2011-01-24 15:33:50 +090013{
14 struct onenand_chip *this = mtd->priv;
15
Tom Rini6a5dccc2022-11-16 13:10:41 -050016 this->base = (void *)CFG_SYS_ONENAND_BASE;
Minkyu Kang0aa1a6b2011-01-24 15:33:50 +090017 this->options |= ONENAND_RUNTIME_BADBLOCK_CHECK;
Lukasz Majewskiece4ac22011-11-09 11:27:14 +010018 this->chip_probe = s5pc210_chip_probe;
Ladislav Michl11732712016-07-12 20:28:20 +020019
20 return 0;
Minkyu Kang0aa1a6b2011-01-24 15:33:50 +090021}