提交 64945f25 编写于 作者: ZHJ0125's avatar ZHJ0125 🐢

Do Linux Training

上级 0d9bf7e8
......@@ -190,8 +190,10 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
# Default value for CROSS_COMPILE is not to prefix executables
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?=
# ARCH ?= $(SUBARCH)
# CROSS_COMPILE ?=
ARCH ?= arm
CROSS_COMPILE ?= arm-linux-
# Architecture as present in compile.h
UTS_MACHINE := $(ARCH)
......
......@@ -54,6 +54,66 @@
#include <asm/plat-s3c24xx/common-smdk.h>
/* ZhangHoujin Edited in 2020.06.29 */
#include <asm/arch /fb.h>
#include <linux/platform_device.h>
static struct s3c2410fb_display up2410_fb[] __initdata =
{
{
.lcdcon5 = (1<<12)|(1<<11)|(1<<9)|(1<<8)|(1<<0),
.type = (3<<5),
.width = 640,
.height = 480,
.pixclock = 39721,
.xres = 640,
.yres = 480,
.bpp = 16,
.left_margin = 40,
.right_margin = 32,
.hsync_len = 32,
.vsync_len = 2,
.upper_margin = 35,
.lower_margin = 5,
},
};
static struct s3c2410fb_mach_info up2410_fb_info __initdata =
{
.displays = up2410_fb,
.num_displays = 1,
.default_display = 0,
.gpcup = 0xffffffff,
.gpcup_mask = 0x0,
.gpccon = 0xaaaaaaaa,
.gpccon_mask = 0x0,
.gpdup = 0xffffffff,
.gpdup_mask = 0x0,
.gpdcon = 0xaaaaaaaa,
.gpdcon_mask = 0x0,
.lpcsel = 0,
};
static struct resource s3c_dm9ks_resource[] = {
[0] = {
.start = 0x10000000,
.end = 0x10000040,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_EINT2,
.end = IRQ_EINT2,
.flags = IORESOURCE_IRQ,
},
};
struct platform_device s3c_device_dm9ks = {
.name = "s3c2410-dm9ks",
.id = -1,
.num_resources = ARRAY_SIZE(s3c_dm9ks_resource),
.resource = s3c_dm9ks_resource,
};
/* End of Edited */
static struct map_desc smdk2410_iodesc[] __initdata = {
/* nothing here yet */
};
......@@ -92,6 +152,7 @@ static struct platform_device *smdk2410_devices[] __initdata = {
&s3c_device_wdt,
&s3c_device_i2c,
&s3c_device_iis,
&s3c_device_dm9ks,
};
static void __init smdk2410_map_io(void)
......@@ -105,6 +166,7 @@ static void __init smdk2410_init(void)
{
platform_add_devices(smdk2410_devices, ARRAY_SIZE(smdk2410_devices));
smdk_machine_init();
s3c24xx_fb_set_platdata(&up2410_fb_info);
}
MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switch
......
......@@ -106,49 +106,74 @@ static struct platform_device smdk_led7 = {
/* NAND parititon from 2.4.18-swl5 */
// static struct mtd_partition smdk_default_nand_part[] = {
// [0] = {
// .name = "Boot Agent",
// .size = SZ_16K,
// .offset = 0,
// },
// [1] = {
// .name = "S3C2410 flash partition 1",
// .offset = 0,
// .size = SZ_2M,
// },
// [2] = {
// .name = "S3C2410 flash partition 2",
// .offset = SZ_4M,
// .size = SZ_4M,
// },
// [3] = {
// .name = "S3C2410 flash partition 3",
// .offset = SZ_8M,
// .size = SZ_2M,
// },
// [4] = {
// .name = "S3C2410 flash partition 4",
// .offset = SZ_1M * 10,
// .size = SZ_4M,
// },
// [5] = {
// .name = "S3C2410 flash partition 5",
// .offset = SZ_1M * 14,
// .size = SZ_1M * 10,
// },
// [6] = {
// .name = "S3C2410 flash partition 6",
// .offset = SZ_1M * 24,
// .size = SZ_1M * 24,
// },
// [7] = {
// .name = "S3C2410 flash partition 7",
// .offset = SZ_1M * 48,
// .size = SZ_16M,
// }
// };
/* ZhangHoujin Edited in 2020.06.29 */
static struct mtd_partition smdk_default_nand_part[] = {
[0] = {
.name = "Boot Agent",
.size = SZ_16K,
.offset = 0,
.name = "Bootloader",
.size = 0x80000,
.offset = 0,
},
[1] = {
.name = "S3C2410 flash partition 1",
.offset = 0,
.size = SZ_2M,
.name = "Linux Kernel",
.offset = 0x80000,
.size = SZ_2M,
},
[2] = {
.name = "S3C2410 flash partition 2",
.offset = SZ_4M,
.size = SZ_4M,
.name = "Root File System",
.offset = 0x280000,
.size = SZ_4M,
},
[3] = {
.name = "S3C2410 flash partition 3",
.offset = SZ_8M,
.size = SZ_2M,
},
[4] = {
.name = "S3C2410 flash partition 4",
.offset = SZ_1M * 10,
.size = SZ_4M,
.name = "User Space",
.offset = 0x680000,
.size = 0x3980000,
},
[5] = {
.name = "S3C2410 flash partition 5",
.offset = SZ_1M * 14,
.size = SZ_1M * 10,
},
[6] = {
.name = "S3C2410 flash partition 6",
.offset = SZ_1M * 24,
.size = SZ_1M * 24,
},
[7] = {
.name = "S3C2410 flash partition 7",
.offset = SZ_1M * 48,
.size = SZ_16M,
}
};
static struct s3c2410_nand_set smdk_nand_sets[] = {
[0] = {
.name = "NAND",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册