diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/pxa3xx_nand.h | 44 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/tosa.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/tosa.c | 37 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/mxc_nand.h | 27 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/onenand.h | 6 |
6 files changed, 107 insertions, 11 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 4853f9df37bd..df39d20f7425 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -192,6 +192,8 @@ config VECTORS_BASE | |||
192 | 192 | ||
193 | source "init/Kconfig" | 193 | source "init/Kconfig" |
194 | 194 | ||
195 | source "kernel/Kconfig.freezer" | ||
196 | |||
195 | menu "System Type" | 197 | menu "System Type" |
196 | 198 | ||
197 | choice | 199 | choice |
diff --git a/arch/arm/mach-pxa/include/mach/pxa3xx_nand.h b/arch/arm/mach-pxa/include/mach/pxa3xx_nand.h index eb4b190b6657..eb35fca9aea5 100644 --- a/arch/arm/mach-pxa/include/mach/pxa3xx_nand.h +++ b/arch/arm/mach-pxa/include/mach/pxa3xx_nand.h | |||
@@ -4,6 +4,43 @@ | |||
4 | #include <linux/mtd/mtd.h> | 4 | #include <linux/mtd/mtd.h> |
5 | #include <linux/mtd/partitions.h> | 5 | #include <linux/mtd/partitions.h> |
6 | 6 | ||
7 | struct pxa3xx_nand_timing { | ||
8 | unsigned int tCH; /* Enable signal hold time */ | ||
9 | unsigned int tCS; /* Enable signal setup time */ | ||
10 | unsigned int tWH; /* ND_nWE high duration */ | ||
11 | unsigned int tWP; /* ND_nWE pulse time */ | ||
12 | unsigned int tRH; /* ND_nRE high duration */ | ||
13 | unsigned int tRP; /* ND_nRE pulse width */ | ||
14 | unsigned int tR; /* ND_nWE high to ND_nRE low for read */ | ||
15 | unsigned int tWHR; /* ND_nWE high to ND_nRE low for status read */ | ||
16 | unsigned int tAR; /* ND_ALE low to ND_nRE low delay */ | ||
17 | }; | ||
18 | |||
19 | struct pxa3xx_nand_cmdset { | ||
20 | uint16_t read1; | ||
21 | uint16_t read2; | ||
22 | uint16_t program; | ||
23 | uint16_t read_status; | ||
24 | uint16_t read_id; | ||
25 | uint16_t erase; | ||
26 | uint16_t reset; | ||
27 | uint16_t lock; | ||
28 | uint16_t unlock; | ||
29 | uint16_t lock_status; | ||
30 | }; | ||
31 | |||
32 | struct pxa3xx_nand_flash { | ||
33 | const struct pxa3xx_nand_timing *timing; /* NAND Flash timing */ | ||
34 | const struct pxa3xx_nand_cmdset *cmdset; | ||
35 | |||
36 | uint32_t page_per_block;/* Pages per block (PG_PER_BLK) */ | ||
37 | uint32_t page_size; /* Page size in bytes (PAGE_SZ) */ | ||
38 | uint32_t flash_width; /* Width of Flash memory (DWIDTH_M) */ | ||
39 | uint32_t dfc_width; /* Width of flash controller(DWIDTH_C) */ | ||
40 | uint32_t num_blocks; /* Number of physical blocks in Flash */ | ||
41 | uint32_t chip_id; | ||
42 | }; | ||
43 | |||
7 | struct pxa3xx_nand_platform_data { | 44 | struct pxa3xx_nand_platform_data { |
8 | 45 | ||
9 | /* the data flash bus is shared between the Static Memory | 46 | /* the data flash bus is shared between the Static Memory |
@@ -12,8 +49,11 @@ struct pxa3xx_nand_platform_data { | |||
12 | */ | 49 | */ |
13 | int enable_arbiter; | 50 | int enable_arbiter; |
14 | 51 | ||
15 | struct mtd_partition *parts; | 52 | const struct mtd_partition *parts; |
16 | unsigned int nr_parts; | 53 | unsigned int nr_parts; |
54 | |||
55 | const struct pxa3xx_nand_flash * flash; | ||
56 | size_t num_flash; | ||
17 | }; | 57 | }; |
18 | 58 | ||
19 | extern void pxa3xx_set_nand_info(struct pxa3xx_nand_platform_data *info); | 59 | extern void pxa3xx_set_nand_info(struct pxa3xx_nand_platform_data *info); |
diff --git a/arch/arm/mach-pxa/include/mach/tosa.h b/arch/arm/mach-pxa/include/mach/tosa.h index a72803f0461b..8bce6d8615b9 100644 --- a/arch/arm/mach-pxa/include/mach/tosa.h +++ b/arch/arm/mach-pxa/include/mach/tosa.h | |||
@@ -59,8 +59,6 @@ | |||
59 | * TC6393XB GPIOs | 59 | * TC6393XB GPIOs |
60 | */ | 60 | */ |
61 | #define TOSA_TC6393XB_GPIO_BASE (NR_BUILTIN_GPIO + 2 * 12) | 61 | #define TOSA_TC6393XB_GPIO_BASE (NR_BUILTIN_GPIO + 2 * 12) |
62 | #define TOSA_TC6393XB_GPIO(i) (TOSA_TC6393XB_GPIO_BASE + (i)) | ||
63 | #define TOSA_TC6393XB_GPIO_BIT(gpio) (1 << (gpio - TOSA_TC6393XB_GPIO_BASE)) | ||
64 | 62 | ||
65 | #define TOSA_GPIO_TG_ON (TOSA_TC6393XB_GPIO_BASE + 0) | 63 | #define TOSA_GPIO_TG_ON (TOSA_TC6393XB_GPIO_BASE + 0) |
66 | #define TOSA_GPIO_L_MUTE (TOSA_TC6393XB_GPIO_BASE + 1) | 64 | #define TOSA_GPIO_L_MUTE (TOSA_TC6393XB_GPIO_BASE + 1) |
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 130e37e4ebdd..a6c4694359ca 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
@@ -706,16 +706,39 @@ static struct tmio_nand_data tosa_tc6393xb_nand_config = { | |||
706 | .badblock_pattern = &tosa_tc6393xb_nand_bbt, | 706 | .badblock_pattern = &tosa_tc6393xb_nand_bbt, |
707 | }; | 707 | }; |
708 | 708 | ||
709 | static struct tc6393xb_platform_data tosa_tc6393xb_setup = { | 709 | static int tosa_tc6393xb_setup(struct platform_device *dev) |
710 | { | ||
711 | int rc; | ||
712 | |||
713 | rc = gpio_request(TOSA_GPIO_CARD_VCC_ON, "CARD_VCC_ON"); | ||
714 | if (rc) | ||
715 | goto err_req; | ||
716 | |||
717 | rc = gpio_direction_output(TOSA_GPIO_CARD_VCC_ON, 1); | ||
718 | if (rc) | ||
719 | goto err_dir; | ||
720 | |||
721 | return rc; | ||
722 | |||
723 | err_dir: | ||
724 | gpio_free(TOSA_GPIO_CARD_VCC_ON); | ||
725 | err_req: | ||
726 | return rc; | ||
727 | } | ||
728 | |||
729 | static void tosa_tc6393xb_teardown(struct platform_device *dev) | ||
730 | { | ||
731 | gpio_free(TOSA_GPIO_CARD_VCC_ON); | ||
732 | } | ||
733 | |||
734 | static struct tc6393xb_platform_data tosa_tc6393xb_data = { | ||
710 | .scr_pll2cr = 0x0cc1, | 735 | .scr_pll2cr = 0x0cc1, |
711 | .scr_gper = 0x3300, | 736 | .scr_gper = 0x3300, |
712 | .scr_gpo_dsr = | ||
713 | TOSA_TC6393XB_GPIO_BIT(TOSA_GPIO_CARD_VCC_ON), | ||
714 | .scr_gpo_doecr = | ||
715 | TOSA_TC6393XB_GPIO_BIT(TOSA_GPIO_CARD_VCC_ON), | ||
716 | 737 | ||
717 | .irq_base = IRQ_BOARD_START, | 738 | .irq_base = IRQ_BOARD_START, |
718 | .gpio_base = TOSA_TC6393XB_GPIO_BASE, | 739 | .gpio_base = TOSA_TC6393XB_GPIO_BASE, |
740 | .setup = tosa_tc6393xb_setup, | ||
741 | .teardown = tosa_tc6393xb_teardown, | ||
719 | 742 | ||
720 | .enable = tosa_tc6393xb_enable, | 743 | .enable = tosa_tc6393xb_enable, |
721 | .disable = tosa_tc6393xb_disable, | 744 | .disable = tosa_tc6393xb_disable, |
@@ -723,6 +746,8 @@ static struct tc6393xb_platform_data tosa_tc6393xb_setup = { | |||
723 | .resume = tosa_tc6393xb_resume, | 746 | .resume = tosa_tc6393xb_resume, |
724 | 747 | ||
725 | .nand_data = &tosa_tc6393xb_nand_config, | 748 | .nand_data = &tosa_tc6393xb_nand_config, |
749 | |||
750 | .resume_restore = 1, | ||
726 | }; | 751 | }; |
727 | 752 | ||
728 | 753 | ||
@@ -730,7 +755,7 @@ static struct platform_device tc6393xb_device = { | |||
730 | .name = "tc6393xb", | 755 | .name = "tc6393xb", |
731 | .id = -1, | 756 | .id = -1, |
732 | .dev = { | 757 | .dev = { |
733 | .platform_data = &tosa_tc6393xb_setup, | 758 | .platform_data = &tosa_tc6393xb_data, |
734 | }, | 759 | }, |
735 | .num_resources = ARRAY_SIZE(tc6393xb_resources), | 760 | .num_resources = ARRAY_SIZE(tc6393xb_resources), |
736 | .resource = tc6393xb_resources, | 761 | .resource = tc6393xb_resources, |
diff --git a/arch/arm/plat-mxc/include/mach/mxc_nand.h b/arch/arm/plat-mxc/include/mach/mxc_nand.h new file mode 100644 index 000000000000..2b972df22d12 --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/mxc_nand.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright 2008 Sascha Hauer, kernel@pengutronix.de | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version 2 | ||
8 | * of the License, or (at your option) any later version. | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
17 | * MA 02110-1301, USA. | ||
18 | */ | ||
19 | |||
20 | #ifndef __ASM_ARCH_NAND_H | ||
21 | #define __ASM_ARCH_NAND_H | ||
22 | |||
23 | struct mxc_nand_platform_data { | ||
24 | int width; /* data bus width in bytes */ | ||
25 | int hw_ecc; /* 0 if supress hardware ECC */ | ||
26 | }; | ||
27 | #endif /* __ASM_ARCH_NAND_H */ | ||
diff --git a/arch/arm/plat-omap/include/mach/onenand.h b/arch/arm/plat-omap/include/mach/onenand.h index d57f20226b28..4649d302c263 100644 --- a/arch/arm/plat-omap/include/mach/onenand.h +++ b/arch/arm/plat-omap/include/mach/onenand.h | |||
@@ -16,6 +16,10 @@ struct omap_onenand_platform_data { | |||
16 | int gpio_irq; | 16 | int gpio_irq; |
17 | struct mtd_partition *parts; | 17 | struct mtd_partition *parts; |
18 | int nr_parts; | 18 | int nr_parts; |
19 | int (*onenand_setup)(void __iomem *); | 19 | int (*onenand_setup)(void __iomem *, int freq); |
20 | int dma_channel; | 20 | int dma_channel; |
21 | }; | 21 | }; |
22 | |||
23 | int omap2_onenand_rephase(void); | ||
24 | |||
25 | #define ONENAND_MAX_PARTITIONS 8 | ||