diff options
| author | Tony Lindgren <tony@atomide.com> | 2012-10-16 14:54:19 -0700 | 
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2012-10-16 14:54:19 -0700 | 
| commit | 94709014ea8d2f24fbc1e6eb6982e801e325bd47 (patch) | |
| tree | a99f2f7184d414d44fccb648a71565cab2c670b3 /arch/arm/mach-omap2/board-flash.c | |
| parent | ddffeb8c4d0331609ef2581d84de4d763607bd37 (diff) | |
| parent | 3ef5d0071cf6c8b9a00b559232bb700ad59999d7 (diff) | |
| download | olio-linux-3.10-94709014ea8d2f24fbc1e6eb6982e801e325bd47.tar.xz olio-linux-3.10-94709014ea8d2f24fbc1e6eb6982e801e325bd47.zip  | |
Merge tag 'gpmc-czimage' of git://gitorious.org/x0148406-public/linux-kernel into omap-for-v3.8/cleanup-headers-gpmc
gpmc cleanup for common ARM zImage
Diffstat (limited to 'arch/arm/mach-omap2/board-flash.c')
| -rw-r--r-- | arch/arm/mach-omap2/board-flash.c | 50 | 
1 files changed, 26 insertions, 24 deletions
diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c index e642acf9cad..020b96b91f7 100644 --- a/arch/arm/mach-omap2/board-flash.c +++ b/arch/arm/mach-omap2/board-flash.c @@ -18,13 +18,15 @@  #include <linux/io.h>  #include <plat/cpu.h> -#include <plat/gpmc.h> +#include "gpmc.h"  #include <linux/platform_data/mtd-nand-omap2.h>  #include <linux/platform_data/mtd-onenand-omap2.h>  #include <plat/tc.h>  #include "common.h"  #include "board-flash.h" +#include "gpmc-onenand.h" +#include "gpmc-nand.h"  #define REG_FPGA_REV			0x10  #define REG_FPGA_DIP_SWITCH_INPUT2	0x60 @@ -104,36 +106,35 @@ __init board_onenand_init(struct mtd_partition *onenand_parts,  		defined(CONFIG_MTD_NAND_OMAP2_MODULE)  /* Note that all values in this struct are in nanoseconds */ -static struct gpmc_timings nand_timings = { +struct gpmc_timings nand_default_timings[1] = { +	{ +		.sync_clk = 0, -	.sync_clk = 0, +		.cs_on = 0, +		.cs_rd_off = 36, +		.cs_wr_off = 36, -	.cs_on = 0, -	.cs_rd_off = 36, -	.cs_wr_off = 36, +		.adv_on = 6, +		.adv_rd_off = 24, +		.adv_wr_off = 36, -	.adv_on = 6, -	.adv_rd_off = 24, -	.adv_wr_off = 36, +		.we_off = 30, +		.oe_off = 48, -	.we_off = 30, -	.oe_off = 48, +		.access = 54, +		.rd_cycle = 72, +		.wr_cycle = 72, -	.access = 54, -	.rd_cycle = 72, -	.wr_cycle = 72, - -	.wr_access = 30, -	.wr_data_mux_bus = 0, +		.wr_access = 30, +		.wr_data_mux_bus = 0, +	},  }; -static struct omap_nand_platform_data board_nand_data = { -	.gpmc_t		= &nand_timings, -}; +static struct omap_nand_platform_data board_nand_data;  void -__init board_nand_init(struct mtd_partition *nand_parts, -			u8 nr_parts, u8 cs, int nand_type) +__init board_nand_init(struct mtd_partition *nand_parts, u8 nr_parts, u8 cs, +				int nand_type, struct gpmc_timings *gpmc_t)  {  	board_nand_data.cs		= cs;  	board_nand_data.parts		= nand_parts; @@ -141,7 +142,7 @@ __init board_nand_init(struct mtd_partition *nand_parts,  	board_nand_data.devsize		= nand_type;  	board_nand_data.ecc_opt = OMAP_ECC_HAMMING_CODE_DEFAULT; -	gpmc_nand_init(&board_nand_data); +	gpmc_nand_init(&board_nand_data, gpmc_t);  }  #endif /* CONFIG_MTD_NAND_OMAP2 || CONFIG_MTD_NAND_OMAP2_MODULE */ @@ -238,5 +239,6 @@ void __init board_flash_init(struct flash_partitions partition_info[],  		pr_err("NAND: Unable to find configuration in GPMC\n");  	else  		board_nand_init(partition_info[2].parts, -			partition_info[2].nr_parts, nandcs, nand_type); +			partition_info[2].nr_parts, nandcs, +			nand_type, nand_default_timings);  }  |