mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-28 23:23:55 +08:00
2e618261c9
Helper function for updating nand platform data has been added the capability to take timing structure arguement. Usage of omap_nand_flash_init() has been replaced by modifed one, omap_nand_flash_init was doing things similar to board_nand_init except that NAND CS# were being acquired based on bootloader setting. As CS# is hardwired for a given board, acquiring gpmc CS# has been removed, and updated with the value on board. NAND CS# used in beagle board & omap3evm was found to be CS0. Thomas Weber <thomas.weber.linux@googlemail.com> reported that value of devkit8000 to be CS0. Overo board was found to be using CS0 based on u-boot, while google grep says omap3touchbook too has CS0. Signed-off-by: Afzal Mohammed <afzal@ti.com> Reviewed-by: Jon Hunter <jon-hunter@ti.com> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
63 lines
1.7 KiB
C
63 lines
1.7 KiB
C
/*
|
|
* board-sdp.h
|
|
*
|
|
* Information structures for SDP-specific board config data
|
|
*
|
|
* Copyright (C) 2009 Nokia Corporation
|
|
* Copyright (C) 2009 Texas Instruments
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
#include <linux/mtd/mtd.h>
|
|
#include <linux/mtd/partitions.h>
|
|
#include <plat/gpmc.h>
|
|
|
|
#define PDC_NOR 1
|
|
#define PDC_NAND 2
|
|
#define PDC_ONENAND 3
|
|
#define DBG_MPDB 4
|
|
|
|
struct flash_partitions {
|
|
struct mtd_partition *parts;
|
|
int nr_parts;
|
|
};
|
|
|
|
#if defined(CONFIG_MTD_NAND_OMAP2) || \
|
|
defined(CONFIG_MTD_NAND_OMAP2_MODULE) || \
|
|
defined(CONFIG_MTD_ONENAND_OMAP2) || \
|
|
defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
|
|
extern void board_flash_init(struct flash_partitions [],
|
|
char chip_sel[][GPMC_CS_NUM], int nand_type);
|
|
#else
|
|
static inline void board_flash_init(struct flash_partitions part[],
|
|
char chip_sel[][GPMC_CS_NUM], int nand_type)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#if defined(CONFIG_MTD_NAND_OMAP2) || \
|
|
defined(CONFIG_MTD_NAND_OMAP2_MODULE)
|
|
extern void board_nand_init(struct mtd_partition *nand_parts,
|
|
u8 nr_parts, u8 cs, int nand_type, struct gpmc_timings *gpmc_t);
|
|
extern struct gpmc_timings nand_default_timings[];
|
|
#else
|
|
static inline void board_nand_init(struct mtd_partition *nand_parts,
|
|
u8 nr_parts, u8 cs, int nand_type, struct gpmc_timings *gpmc_t)
|
|
{
|
|
}
|
|
#define nand_default_timings NULL
|
|
#endif
|
|
|
|
#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
|
|
defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
|
|
extern void board_onenand_init(struct mtd_partition *nand_parts,
|
|
u8 nr_parts, u8 cs);
|
|
#else
|
|
static inline void board_onenand_init(struct mtd_partition *nand_parts,
|
|
u8 nr_parts, u8 cs)
|
|
{
|
|
}
|
|
#endif
|