Date:2011-03-06 23:06:56 (11 years 7 months ago)
Author:Peter Zotov
Commit:0c2fd9f20f1e5ef9706eabc3565b23f2b8c08ca6
Message:Added MTD configuration for XZ0032 board.

Files: arch/mips/jz47xx/jz4750/board-xz0032.c (1 diff)

Change Details

arch/mips/jz47xx/jz4750/board-xz0032.c
2121
2222#include "../clock.h"
2323
24#include <jz4750_nand.h>
25
26/* NAND */
27static struct nand_ecclayout xz0032_ecclayout = {
28    .eccbytes = 52,
29    .eccpos = {
30        3, 4, 5, 6, 7, 8, 9, 10,
31        11, 12, 13, 14, 15, 16, 17, 18,
32        19, 20, 21, 22, 23, 24, 25, 26,
33        27, 28, 29, 30, 31, 32, 33, 34,
34        35, 36, 37, 38, 39, 40, 41, 42,
35        43, 44, 45, 46, 47, 48, 49, 50,
36        51, 52, 53, 54, 55,
37    },
38    .oobfree = {
39        { .offset = 0, .length = 3 },
40        { .offset = 56, .length = 8 },
41    },
42};
43
44static struct mtd_partition xz0032_partitions[] = {
45    {
46        .name = "u-boot",
47        .offset = 0,
48        .size = 1 * 0x100000,
49    },
50    {
51        .name = "kernel",
52        .offset = 1 * 0x100000,
53        .size = 15 * 0x100000,
54    },
55    {
56        .name = "rootfs",
57        .offset = 16 * 0x100000,
58        .size = (1024 - 16) * 0x100000,
59    },
60};
61
62static struct jz_nand_platform_data xz0032_nand_pdata = {
63    .bch_8bit = 1,
64    .ecc_layout = &xz0032_ecclayout,
65    .partitions = xz0032_partitions,
66    .num_partitions = ARRAY_SIZE(xz0032_partitions),
67    .busy_gpio = 91,
68};
69
2470static struct platform_device *jz_platform_devices[] __initdata = {
2571    &jz4750_rtc_device,
2672    &jz4750_udc_device,
73    &jz4750_nand_device,
2774};
2875
2976static int __init xz0032_init_platform_devices(void)
3077{
78    jz4750_nand_device.dev.platform_data = &xz0032_nand_pdata;
79
3180    jz4750_serial_device_register();
3281
3382    return platform_add_devices(jz_platform_devices,

Archive Download the corresponding diff file



interactive