diff options
author | Pawit Pornkitprasan <p.pawit@gmail.com> | 2011-12-24 09:34:37 +0700 |
---|---|---|
committer | Pawit Pornkitprasan <p.pawit@gmail.com> | 2011-12-24 09:35:11 +0700 |
commit | fdc19983538bec90010fa7f344a7417ff4731ba8 (patch) | |
tree | 8a84a1edd1c026b71fec4756caf27cbbb9e827d5 /drivers/mtd/onenand | |
parent | b55e9ac4df4d240b39eda4cd9c0198453dd59061 (diff) | |
download | kernel_samsung_aries-fdc19983538bec90010fa7f344a7417ff4731ba8.zip kernel_samsung_aries-fdc19983538bec90010fa7f344a7417ff4731ba8.tar.gz kernel_samsung_aries-fdc19983538bec90010fa7f344a7417ff4731ba8.tar.bz2 |
Added support for aries
Reverts "S5PC11X : FIMC apply v4l2 standard for asynchronous dequeue/queue"
5f4b037e6ebb18d65a3ac896032eb559d7fe2baf
Diffstat (limited to 'drivers/mtd/onenand')
-rw-r--r-- | drivers/mtd/onenand/samsung.c | 50 | ||||
-rw-r--r-- | drivers/mtd/onenand/samsung.h | 46 | ||||
-rw-r--r-- | drivers/mtd/onenand/samsung_fascinate.h | 68 | ||||
-rw-r--r-- | drivers/mtd/onenand/samsung_gsm.h | 98 |
4 files changed, 224 insertions, 38 deletions
diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c index 9532cc9..25c19b8 100644 --- a/drivers/mtd/onenand/samsung.c +++ b/drivers/mtd/onenand/samsung.c @@ -40,44 +40,18 @@ enum soc_type { TYPE_S5PC110, }; -struct mtd_partition s3c_partition_info[] = { - { - .name = "misc", - .offset = (768*SZ_1K), /* for bootloader */ - .size = (256*SZ_1K), - .mask_flags = MTD_CAP_NANDFLASH, - }, - { - .name = "recovery", - .offset = MTDPART_OFS_APPEND, - .size = (5*SZ_1M), - }, - { - .name = "kernel", - .offset = MTDPART_OFS_APPEND, - .size = (5*SZ_1M), - }, - { - .name = "ramdisk", - .offset = MTDPART_OFS_APPEND, - .size = (3*SZ_1M), - }, - { - .name = "system", - .offset = MTDPART_OFS_APPEND, - .size = (90*SZ_1M), - }, - { - .name = "cache", - .offset = MTDPART_OFS_APPEND, - .size = (80*SZ_1M), - }, - { - .name = "userdata", - .offset = MTDPART_OFS_APPEND, - .size = MTDPART_SIZ_FULL, - } -}; +/* START OF DEVICE SPECIFIC PARTITION LAYOUT */ + +#if defined(CONFIG_SAMSUNG_CAPTIVATE) || defined(CONFIG_SAMSUNG_GALAXYS) || defined(CONFIG_SAMSUNG_GALAXYSB) || defined(CONFIG_SAMSUNG_VIBRANT) +#include "samsung_gsm.h" +#elif defined(CONFIG_SAMSUNG_FASCINATE) +#include "samsung_fascinate.h" +#else +#error Should not be used on aries devices (can brick!). +#include "samsung.h" +#endif + +/* END OF DEVICE SPECIFIC PARTITION LAYOUT */ #define ONENAND_ERASE_STATUS 0x00 #define ONENAND_MULTI_ERASE_SET 0x01 diff --git a/drivers/mtd/onenand/samsung.h b/drivers/mtd/onenand/samsung.h new file mode 100644 index 0000000..2024eb2 --- /dev/null +++ b/drivers/mtd/onenand/samsung.h @@ -0,0 +1,46 @@ +/* linux/drivers/mtd/onenand/samsung.h + * + * Generic Partition Layout for S5PV210 + * + */ + + +struct mtd_partition s3c_partition_info[] = { + { + .name = "misc", + .offset = (768*SZ_1K), /* for bootloader */ + .size = (256*SZ_1K), + .mask_flags = MTD_CAP_NANDFLASH, + }, + { + .name = "recovery", + .offset = MTDPART_OFS_APPEND, + .size = (5*SZ_1M), + }, + { + .name = "kernel", + .offset = MTDPART_OFS_APPEND, + .size = (5*SZ_1M), + }, + { + .name = "ramdisk", + .offset = MTDPART_OFS_APPEND, + .size = (3*SZ_1M), + }, + { + .name = "system", + .offset = MTDPART_OFS_APPEND, + .size = (90*SZ_1M), + }, + { + .name = "cache", + .offset = MTDPART_OFS_APPEND, + .size = (80*SZ_1M), + }, + { + .name = "userdata", + .offset = MTDPART_OFS_APPEND, + .size = MTDPART_SIZ_FULL, + } +}; + diff --git a/drivers/mtd/onenand/samsung_fascinate.h b/drivers/mtd/onenand/samsung_fascinate.h new file mode 100644 index 0000000..ca8446d --- /dev/null +++ b/drivers/mtd/onenand/samsung_fascinate.h @@ -0,0 +1,68 @@ +/* linux/drivers/mtd/onenand/samsung_fascinate.h + * + * Partition Layout for Samsung Fascinate + * + */ + +struct mtd_partition s3c_partition_info[] = { + + /*This is partition layout from the oneNAND it SHOULD match the pitfile on the second page of the NAND. + It will work if it doesn't but beware to write below the adress 0x01200000 there are the bootloaders. + Currently we won't map them, but we should keep that in mind for later things like flashing bootloader + from Linux. There is a partition 'efs' starting @ 0x00080000 40 256K pages long, it contains data for + the modem like IMSI we don't touch it for now, but we need the data from it, we create a partition + for that and copy the data from it. For this you need a image from it and mount it as vfat or copy + it on a kernel with rfs support on the phone. + + Partitions on the lower NAND adresses: + + 0x00000000 - 0x0003FFFF = first stage bootloader + 0x00040000 - 0x0007FFFF = PIT for second stage bootloader + 0x00080000 - 0x00A7FFFF = EFS: IMSI and NVRAM for the modem + 0x00A80000 - 0x00BBFFFF = second stage bootloader + 0x00BC0000 - 0x00CFFFFF = backup of the second stage bootloader (should be loaded if the other fails, unconfirmed!) + 0x00D00000 - 0x011FFFFF = PARAM.lfs config the bootloader + + ######################################################################################### + ######################################################################################### + ###### NEVER TOUCH THE FIRST 2 256k PAGES! THEY CONTAIN THE FIRST STAGE BOOTLOADER ###### + ######################################################################################### + #########################################################################################*/ + + { + .name = "boot", + .offset = (72*SZ_256K), + .size = (30*SZ_256K), //101 + }, + { + .name = "recovery", + .offset = (102*SZ_256K), + .size = (30*SZ_256K), //131 + }, + { + .name = "system", + .offset = (132*SZ_256K), + .size = (1000*SZ_256K), //1131 + }, + { + .name = "cache", + .offset = (1132*SZ_256K), + .size = (240*SZ_256K), //1371 + }, + { + .name = "datadata", + .offset = (1372*SZ_256K), + .size = (632*SZ_256K), //2003 + }, + { /* The reservoir area is used by Samsung's Block Management Layer (BML) + to map good blocks from this reservoir to bad blocks in user + partitions. A special tool (bml_over_mtd) is needed to write + partition images using bad block mapping. + Currently, this is required for flashing the "boot" partition, + as Samsung's stock bootloader expects BML partitions.*/ + .name = "reservoir", + .offset = (2004*SZ_256K), + .size = (44*SZ_256K), //2047 + }, +}; + diff --git a/drivers/mtd/onenand/samsung_gsm.h b/drivers/mtd/onenand/samsung_gsm.h new file mode 100644 index 0000000..4b2268f --- /dev/null +++ b/drivers/mtd/onenand/samsung_gsm.h @@ -0,0 +1,98 @@ +/* linux/drivers/mtd/onenand/samsung_galaxys.h + * + * Partition Layout for Samsung Galaxy S (GSM variants) + * + */ + +struct mtd_partition s3c_partition_info[] = { + + /*This is partition layout from the oneNAND it SHOULD match the pitfile on the second page of the NAND. + It will work if it doesn't but beware to write below the adress 0x01200000 there are the bootloaders. + Currently we won't map them, but we should keep that in mind for later things like flashing bootloader + from Linux. There is a partition 'efs' starting @ 0x00080000 40 256K pages long, it contains data for + the modem like IMSI we don't touch it for now, but we need the data from it, we create a partition + for that and copy the data from it. For this you need a image from it and mount it as vfat or copy + it on a kernel with rfs support on the phone. + + Partitions on the lower NAND adresses: + + 0x00000000 - 0x0003FFFF = first stage bootloader + 0x00040000 - 0x0007FFFF = PIT for second stage bootloader + 0x00080000 - 0x00A7FFFF = EFS: IMSI and NVRAM for the modem + 0x00A80000 - 0x00BBFFFF = second stage bootloader + 0x00BC0000 - 0x00CFFFFF = backup of the second stage bootloader (should be loaded if the other fails, unconfirmed!) + 0x00D00000 - 0x011FFFFF = PARAM.lfs config the bootloader + + ######################################################################################### + ######################################################################################### + ###### NEVER TOUCH THE FIRST 2 256k PAGES! THEY CONTAIN THE FIRST STAGE BOOTLOADER ###### + ######################################################################################### + #########################################################################################*/ + + { + .name = "boot", + .offset = (72*SZ_256K), + .size = (30*SZ_256K), //101 + }, + { + .name = "recovery", + .offset = (102*SZ_256K), + .size = (30*SZ_256K), //131 + }, + { + .name = "system", + .offset = (132*SZ_256K), + .size = (1000*SZ_256K), //1131 + }, + { + .name = "cache", + .offset = (1132*SZ_256K), + .size = (70*SZ_256K), //1201 + }, + { /* we should consider moving this before the modem at the end + that would allow us to change the partitions before without + loosing ths sensible data*/ + .name = "efs", + .offset = (1890*SZ_256K), + .size = (50*SZ_256K), //1939 + }, + { /* the modem firmware has to be mtd5 as the userspace samsung ril uses + this device hardcoded, but I placed it at the end of the NAND to be + able to change the other partition layout without moving it */ + .name = "radio", + .offset = (1940*SZ_256K), + .size = (64*SZ_256K), //2003 + }, + { + .name = "datadata", + .offset = (1202*SZ_256K), + .size = (688*SZ_256K), //1889 + }, + { /* The reservoir area is used by Samsung's Block Management Layer (BML) + to map good blocks from this reservoir to bad blocks in user + partitions. A special tool (bml_over_mtd) is needed to write + partition images using bad block mapping. + Currently, this is required for flashing the "boot" partition, + as Samsung's stock bootloader expects BML partitions.*/ + .name = "reservoir", + .offset = (2004*SZ_256K), + .size = (44*SZ_256K), //2047 + }, + + + + /* param.lfs partition is used to config the bootloader. + Params: SERIAL_SPEED, LCD_LEVEL, BOOT_DELAY, LOAD_RAMDISK, SWITCH_SEL, PHONE_DEBUG_ON, + LCD_DIM_LEVEL, LCD_DIM_TIME, MELODY_MODE, REBOOT_MODE, NATION_SEL, LANGUAGE_SEL, + SET_DEFAULT_PARAM, VERSION_LINE, COMMAND_LINE, BOOT_VERSION + */ +/* + { + .name = "param", + .offset = (52*SZ_256K), + .size = (20*SZ_256K), //71 + }, +*/ +}; + + |