summaryrefslogtreecommitdiffstats
path: root/configs/platform-friendlyarm-mini6410/patches/linux-3.8/gain_access_to_the_iROM.diff
blob: 7d2d71342b391a037f22e94f5d1be59144ef1f0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Subject: Enable access to the built in iROM

This let us read the contenct of the so called "BL0", the built in bootloader
in the Samsung S3C6410 CPU.

The content can be read via the mtd framework.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>

---
 arch/arm/mach-s3c64xx/mach-mini6410.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

Index: linux-3.8/arch/arm/mach-s3c64xx/mach-mini6410.c
===================================================================
--- linux-3.8.orig/arch/arm/mach-s3c64xx/mach-mini6410.c
+++ linux-3.8/arch/arm/mach-s3c64xx/mach-mini6410.c
@@ -432,6 +432,19 @@ static struct i2c_board_info mini6410_i2
 	},
 };
 
+static struct resource s3c6410_irom_resource = {
+	.start	= 0x0c000000,
+	.end	= 0x0c000000 + 32768 - 1,
+	.flags	= IORESOURCE_MEM
+};
+
+static struct platform_device s3c6410_irom = {
+	.name		= "map_rom",
+	.id		= -1,
+	.num_resources	= 1,
+	.resource	= &s3c6410_irom_resource,
+};
+
 static struct platform_device *mini6410_devices[] __initdata = {
 	&mini6410_device_eth,
 	&s3c_device_hsmmc0,
@@ -448,6 +461,7 @@ static struct platform_device *mini6410_
 	&s3c_device_timer[1],
 	&s3c_device_hwmon,
 	&mini6410_backlight_device,
+	&s3c6410_irom,
 };
 
 static void __init mini6410_map_io(void)