diff options
author | Denys Dmytriyenko <denys@ti.com> | 2014-06-21 03:34:55 +0000 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2014-06-23 17:56:50 -0400 |
commit | 5a82920f4f2fe7b4a4cd723521464c08d3a870e4 (patch) | |
tree | 1f03bdabb7296602ae4d0d0a4ddc901c9b9fff9d /recipes-bsp | |
parent | bf0741681d3ddd0c02fbbbe8b19cd7bf19d43c7b (diff) | |
download | meta-ti-5a82920f4f2fe7b4a4cd723521464c08d3a870e4.tar.gz |
u-boot: remove old platform-specific versions
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes-bsp')
81 files changed, 0 insertions, 11658 deletions
diff --git a/recipes-bsp/u-boot/u-boot-am180x-2010.12/am180x-evm/0001-da850evm-change-default-memory-to-not-limit-at-32MB.patch b/recipes-bsp/u-boot/u-boot-am180x-2010.12/am180x-evm/0001-da850evm-change-default-memory-to-not-limit-at-32MB.patch deleted file mode 100644 index b19575b3..00000000 --- a/recipes-bsp/u-boot/u-boot-am180x-2010.12/am180x-evm/0001-da850evm-change-default-memory-to-not-limit-at-32MB.patch +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | From df5c87c4e1be1670475eba1187301a2f7a7aca30 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chase Maupin <Chase.Maupin@ti.com> | ||
3 | Date: Wed, 22 Jun 2011 12:12:09 -0500 | ||
4 | Subject: [PATCH] da850evm: change default memory to not limit at 32MB | ||
5 | |||
6 | * Change the default mem= option passed to the Linux kernel to | ||
7 | not limit the memory to 32MB. | ||
8 | * This change is used by AM devices that do not need to reserve | ||
9 | space for the DSP image. By removing the mem= option we get | ||
10 | access to all of the memory on the system. | ||
11 | * Limiting the memory to 32MB causes out-of-memory errors | ||
12 | when running large applications such as web browsers | ||
13 | |||
14 | Signed-off-by: Chase Maupin <Chase.Maupin@ti.com> | ||
15 | --- | ||
16 | include/configs/da850evm.h | 2 +- | ||
17 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
18 | |||
19 | diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h | ||
20 | index 4a1e0af..55badc9 100755 | ||
21 | --- a/include/configs/da850evm.h | ||
22 | +++ b/include/configs/da850evm.h | ||
23 | @@ -184,7 +184,7 @@ | ||
24 | #define CONFIG_CMDLINE_TAG | ||
25 | #define CONFIG_REVISION_TAG | ||
26 | #define CONFIG_SETUP_MEMORY_TAGS | ||
27 | -#define CONFIG_BOOTARGS "mem=32M console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait ip=off" | ||
28 | +#define CONFIG_BOOTARGS "console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait ip=off" | ||
29 | #define CONFIG_BOOTCOMMAND "if mmc rescan 0; then if fatload mmc 0 0xc0600000 boot.scr; then source 0xc0600000; else fatload mmc 0 0xc0700000 uImage; bootm c0700000; fi; else sf probe 0; sf read 0xc0700000 0x80000 0x220000; bootm 0xc0700000; fi" | ||
30 | #define CONFIG_BOOTDELAY 3 | ||
31 | |||
32 | -- | ||
33 | 1.7.0.4 | ||
34 | |||
diff --git a/recipes-bsp/u-boot/u-boot-am180x_2010.12.bb b/recipes-bsp/u-boot/u-boot-am180x_2010.12.bb deleted file mode 100644 index b2852c40..00000000 --- a/recipes-bsp/u-boot/u-boot-am180x_2010.12.bb +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | require u-boot-ti.inc | ||
2 | |||
3 | DESCRIPTION = "u-boot bootloader for AM180x devices" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=4c6cde5df68eff615d36789dc18edd3b" | ||
5 | |||
6 | COMPATIBLE_MACHINE = "am180x-evm" | ||
7 | |||
8 | PR = "r0" | ||
9 | |||
10 | SRC_URI = "git://arago-project.org/git/projects/u-boot-davinci.git;protocol=git;branch=${BRANCH}" | ||
11 | |||
12 | # For the am180x we want to enable all the memory on the EVM, but for other | ||
13 | # devices that use the DSP we do not want this change because that memory | ||
14 | # is used for the DSP | ||
15 | SRC_URI_append_am180x-evm = " file://0001-da850evm-change-default-memory-to-not-limit-at-32MB.patch" | ||
16 | |||
17 | BRANCH = "03.21.00.03" | ||
18 | |||
19 | # v2010.12_DAVINCIPSP_03.21.00.04 | ||
20 | SRCREV = "1254a0b58d900b7035cfb36bf4e1b05dfbf09997" | ||
21 | |||
22 | UBOOT_SUFFIX = "bin" | ||
diff --git a/recipes-bsp/u-boot/u-boot-am33x_2011.10rc.bb b/recipes-bsp/u-boot/u-boot-am33x_2011.10rc.bb deleted file mode 100644 index d1a82363..00000000 --- a/recipes-bsp/u-boot/u-boot-am33x_2011.10rc.bb +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | require u-boot-ti.inc | ||
2 | |||
3 | # No patches for other machines yet | ||
4 | COMPATIBLE_MACHINE = "(ti33x)" | ||
5 | |||
6 | DEFAULT_PREFERENCE_ti33x = "99" | ||
7 | |||
8 | PV = "2011.09+git" | ||
9 | PR = "r30" | ||
10 | |||
11 | SPL_BINARY = "MLO" | ||
12 | |||
13 | SRC_URI = "git://arago-project.org/git/projects/u-boot-am33x.git;protocol=git;branch=master \ | ||
14 | file://2011.09git/0001-am335x_evm-add-option-to-boot-kernel-from-boot-in-ex.patch \ | ||
15 | file://2011.09git/0002-am335x_evm-set-bootdelay-to-1.patch \ | ||
16 | file://2011.09git/0003-am335x-evm-make-MMC-rootfs-RO-on-boot-so-fsck-works.patch \ | ||
17 | file://2011.09git/0004-am335x_evm-switch-to-ext4.patch \ | ||
18 | file://2011.09git/0005-am335x-evm-enable-i2c2-pinmux-for-beaglebone.patch \ | ||
19 | file://2011.09git/0006-ext2load-increase-read-speed.patch \ | ||
20 | file://2011.09git/0007-am335x-evm-fix-ext2load-and-specify-partition-for-bo.patch \ | ||
21 | file://2011.09git/0008-am335x-evm-load-uImage-from-boot-instead-of-VFAT.patch \ | ||
22 | file://2011.09git/0009-ext4fs-ls-load-support.patch \ | ||
23 | file://2011.09git/0010-am335x-switch-to-ext4-mode.patch \ | ||
24 | file://0001-config-Always-use-GNU-ld.patch \ | ||
25 | " | ||
26 | |||
27 | SRCREV = "dc52533ccff00a12761f793d66b39e4f6a4a3bba" | ||
diff --git a/recipes-bsp/u-boot/u-boot-am3517_2011.09.bb b/recipes-bsp/u-boot/u-boot-am3517_2011.09.bb deleted file mode 100644 index 06b8cf1a..00000000 --- a/recipes-bsp/u-boot/u-boot-am3517_2011.09.bb +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | require u-boot-ti.inc | ||
2 | |||
3 | DESCRIPTION = "u-boot bootloader for ARM MPU devices" | ||
4 | |||
5 | COMPATIBLE_MACHINE = "omap3" | ||
6 | |||
7 | DEFAULT_PREFERENCE = "-1" | ||
8 | |||
9 | PR = "r1+gitr${SRCPV}" | ||
10 | |||
11 | SRC_URI = "git://arago-project.org/git/projects/u-boot-am33x.git;protocol=git;branch=${BRANCH} \ | ||
12 | file://0001-armv7-Unaligned-access-fix.patch \ | ||
13 | " | ||
14 | |||
15 | BRANCH = "AM335XPSP_04.06.00.08" | ||
16 | |||
17 | # Lock to the commit corresponding to tag "v2011.09_AM335xPSP_04.06.00.08" | ||
18 | SRCREV = "1e4626f0d5f3bb04ec974e76a5d9029875269d31" | ||
19 | |||
20 | # Set the name of the SPL that will built so that it is also packaged with u-boot. | ||
21 | SPL_BINARY = "MLO" | ||
diff --git a/recipes-bsp/u-boot/u-boot-beagleboard_2011.09.bb b/recipes-bsp/u-boot/u-boot-beagleboard_2011.09.bb deleted file mode 100644 index 519df169..00000000 --- a/recipes-bsp/u-boot/u-boot-beagleboard_2011.09.bb +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | require u-boot-ti.inc | ||
2 | |||
3 | PR = "r7" | ||
4 | |||
5 | SPL_BINARY = "MLO" | ||
6 | |||
7 | # No patches for other machines yet | ||
8 | COMPATIBLE_MACHINE = "(beagleboard)" | ||
9 | |||
10 | SRC_URI = "git://git.denx.de/u-boot.git;protocol=git \ | ||
11 | file://2011.09/0001-omap3-mem-Comment-enable_gpmc_cs_config-more.patch \ | ||
12 | file://2011.09/0002-OMAP3-Update-SDRC-dram_init-to-always-call-make_cs1_.patch \ | ||
13 | file://2011.09/0003-OMAP3-Add-a-helper-function-to-set-timings-in-SDRC.patch \ | ||
14 | file://2011.09/0004-OMAP3-Change-mem_ok-to-clear-again-after-reading-bac.patch \ | ||
15 | file://2011.09/0005-OMAP3-Remove-get_mem_type-prototype.patch \ | ||
16 | file://2011.09/0006-omap3-mem-Add-MCFG-helper-macro.patch \ | ||
17 | file://2011.09/0007-OMAP3-Add-optimal-SDRC-autorefresh-control-values.patch \ | ||
18 | file://2011.09/0008-OMAP3-Suffix-all-Micron-memory-timing-parts-with-the.patch \ | ||
19 | file://2011.09/0009-OMAP3-SPL-Rework-memory-initalization-and-devkit8000.patch \ | ||
20 | file://2011.09/0010-OMAP3-SPL-Add-identify_nand_chip-function.patch \ | ||
21 | file://2011.09/0011-OMAP3-Add-SPL-support-to-Beagleboard.patch \ | ||
22 | file://2011.09/0012-OMAP3-Add-SPL-support-to-omap3_evm.patch \ | ||
23 | file://2011.09/0013-AM3517-Add-SPL-support.patch \ | ||
24 | file://2011.09/0014-AM3517-CraneBoard-Add-SPL-support.patch \ | ||
25 | file://2011.09/0015-HACK-beagleboard-config-disable-cache-for-USB.patch \ | ||
26 | file://2011.09/0016-beagleboard-config-enable-gpio-command.patch \ | ||
27 | file://2011.09/0017-Increased-some-timeout-durations-for-MMC-and-EHCI.patch \ | ||
28 | file://2011.09/0018-beagleboard-mount-rootfs-RO-instead-of-RW-at-boot.patch \ | ||
29 | file://2011.09/0019-BeagleBoard-config-Really-switch-to-ttyO2.patch \ | ||
30 | file://2011.09/0020-beagleboard-add-support-for-TCT-Beacon-board.patch \ | ||
31 | file://2011.09/0021-beagleboard-add-support-for-scanning-loop-through-ex.patch \ | ||
32 | file://0001-config-Always-use-GNU-ld.patch \ | ||
33 | file://fw_env.config \ | ||
34 | " | ||
35 | |||
36 | SRCREV = "fdbe8b9a2d1858ba35dd6214315563ad44d4a0e3" | ||
diff --git a/recipes-bsp/u-boot/u-boot/0001-OMAP3-Beagle-Pin-Mux-initialization-glitch-fix.patch b/recipes-bsp/u-boot/u-boot/0001-OMAP3-Beagle-Pin-Mux-initialization-glitch-fix.patch deleted file mode 100644 index 7e88d704..00000000 --- a/recipes-bsp/u-boot/u-boot/0001-OMAP3-Beagle-Pin-Mux-initialization-glitch-fix.patch +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | From 7b250f8be3b8c496796dcdc954c9e5959cefea2c Mon Sep 17 00:00:00 2001 | ||
2 | From: Bob Feretich <bob.feretich@rafresearch.com> | ||
3 | Date: Thu, 24 Feb 2011 13:16:44 +0000 | ||
4 | Subject: [PATCH 01/16] OMAP3 Beagle Pin Mux initialization glitch fix | ||
5 | |||
6 | The below patch reverses the order of two segments in the board file. | ||
7 | Output pins need to have their values initialized, before they are | ||
8 | exposed to the logic outside the chip. | ||
9 | |||
10 | Signed-off-by: Bob Feretich <bob.feretich@rafresearch.com> | ||
11 | Cc: Wolfgang Denk <wd@denx.de> | ||
12 | --- | ||
13 | board/ti/beagle/beagle.c | 12 ++++++------ | ||
14 | 1 files changed, 6 insertions(+), 6 deletions(-) | ||
15 | |||
16 | diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c | ||
17 | index c066d6e..929461c 100644 | ||
18 | --- a/board/ti/beagle/beagle.c | ||
19 | +++ b/board/ti/beagle/beagle.c | ||
20 | @@ -239,17 +239,17 @@ int misc_init_r(void) | ||
21 | twl4030_power_init(); | ||
22 | twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); | ||
23 | |||
24 | - /* Configure GPIOs to output */ | ||
25 | - writel(~(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), &gpio6_base->oe); | ||
26 | - writel(~(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 | | ||
27 | - GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe); | ||
28 | - | ||
29 | - /* Set GPIOs */ | ||
30 | + /* Set GPIO states before they are made outputs */ | ||
31 | writel(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1, | ||
32 | &gpio6_base->setdataout); | ||
33 | writel(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 | | ||
34 | GPIO15 | GPIO14 | GPIO13 | GPIO12, &gpio5_base->setdataout); | ||
35 | |||
36 | + /* Configure GPIOs to output */ | ||
37 | + writel(~(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), &gpio6_base->oe); | ||
38 | + writel(~(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 | | ||
39 | + GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe); | ||
40 | + | ||
41 | dieid_num_r(); | ||
42 | |||
43 | return 0; | ||
44 | -- | ||
45 | 1.6.6.1 | ||
46 | |||
diff --git a/recipes-bsp/u-boot/u-boot/0001-armv7-Unaligned-access-fix.patch b/recipes-bsp/u-boot/u-boot/0001-armv7-Unaligned-access-fix.patch deleted file mode 100644 index 35307ac0..00000000 --- a/recipes-bsp/u-boot/u-boot/0001-armv7-Unaligned-access-fix.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From 40f1e7db785f477a2aa145a3b47bd498c48ad52d Mon Sep 17 00:00:00 2001 | ||
2 | From: Steve Kipisz <s-kipisz2@ti.com> | ||
3 | Date: Fri, 14 Jun 2013 05:16:52 -0500 | ||
4 | Subject: [PATCH] armv7:Unaligned access fix | ||
5 | |||
6 | This fixes an unaligned access data abort introduced when using gcc 4.7 | ||
7 | or higher. The Linaro toolchain uses gcc 4.7.3. This is documented in u-boot | ||
8 | doc/README.arm-unaligned-accesses. | ||
9 | |||
10 | Signed-off-by: Steve Kipisz <s-kipisz2@ti.com> | ||
11 | --- | ||
12 | arch/arm/cpu/armv7/config.mk | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/arch/arm/cpu/armv7/config.mk b/arch/arm/cpu/armv7/config.mk | ||
16 | index 9c3e2f3..9736da8 100644 | ||
17 | --- a/arch/arm/cpu/armv7/config.mk | ||
18 | +++ b/arch/arm/cpu/armv7/config.mk | ||
19 | @@ -20,7 +20,7 @@ | ||
20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
21 | # MA 02111-1307 USA | ||
22 | # | ||
23 | -PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float | ||
24 | +PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float -mno-unaligned-access | ||
25 | |||
26 | # If armv7-a is not supported by GCC fall-back to armv5, which is | ||
27 | # supported by more tool-chains | ||
28 | -- | ||
29 | 1.7.9.5 | ||
30 | |||
diff --git a/recipes-bsp/u-boot/u-boot/0001-config-Always-use-GNU-ld.patch b/recipes-bsp/u-boot/u-boot/0001-config-Always-use-GNU-ld.patch deleted file mode 100644 index 64685e39..00000000 --- a/recipes-bsp/u-boot/u-boot/0001-config-Always-use-GNU-ld.patch +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | From a8dc33253472328f2af04973575f26e9106db1c3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 21 Dec 2011 08:53:02 -0800 | ||
4 | Subject: [PATCH] config: Always use GNU ld | ||
5 | |||
6 | This patch makes sure that we always use the GNU ld. u-boot uses certain | ||
7 | construct e.g. OVERLAY which are not implemented in gold therefore it | ||
8 | always needs GNU ld for linking. It works well if default linker in | ||
9 | toolchain is GNU ld but in some cases we can have gold to be the | ||
10 | default linker and also ship GNU ld but not as default in such cases | ||
11 | its called $(PREFIX)ld.bfd, with this patch we make sure that if | ||
12 | $(PREFIX)ld.bfd exists than we use that for our ld. This way it | ||
13 | does not matter what the default ld is. | ||
14 | |||
15 | Upstream-status: Pending | ||
16 | |||
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
18 | --- | ||
19 | config.mk | 4 +++- | ||
20 | 1 files changed, 3 insertions(+), 1 deletions(-) | ||
21 | |||
22 | diff --git a/config.mk b/config.mk | ||
23 | index ddaa477..139dfa0 100644 | ||
24 | --- a/config.mk | ||
25 | +++ b/config.mk | ||
26 | @@ -126,11 +126,13 @@ cc-option = $(strip $(if $(findstring $1,$(CC_OPTIONS)),$1,\ | ||
27 | $(if $(call cc-option-sys,$1),$1,$2))) | ||
28 | endif | ||
29 | |||
30 | +exists_bfd_ld = $(shell if $(CROSS_COMPILE)ld.bfd -v > /dev/null 2>&1; \ | ||
31 | + then echo "$(1)"; else echo "$(2)"; fi; ) | ||
32 | # | ||
33 | # Include the make variables (CC, etc...) | ||
34 | # | ||
35 | AS = $(CROSS_COMPILE)as | ||
36 | -LD = $(CROSS_COMPILE)ld | ||
37 | +LD = $(call exists_bfd_ld, "$(CROSS_COMPILE)ld.bfd", "$(CROSS_COMPILE)ld") | ||
38 | CC = $(CROSS_COMPILE)gcc | ||
39 | CPP = $(CC) -E | ||
40 | AR = $(CROSS_COMPILE)ar | ||
41 | -- | ||
42 | 1.7.9.1 | ||
43 | |||
diff --git a/recipes-bsp/u-boot/u-boot/0001-omap3evm-Change-default-console-serial-port-from.patch b/recipes-bsp/u-boot/u-boot/0001-omap3evm-Change-default-console-serial-port-from.patch deleted file mode 100644 index d171b78a..00000000 --- a/recipes-bsp/u-boot/u-boot/0001-omap3evm-Change-default-console-serial-port-from.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From 6b23ecf49d1c2ee5227ff57101919af46ecd7396 Mon Sep 17 00:00:00 2001 | ||
2 | From: Roger Monk <r-monk@ti.com> | ||
3 | Date: Fri, 9 Jul 2010 08:37:04 +0100 | ||
4 | Subject: [PATCH] omap3evm: Change default 'console' serial port from ttyS2 to ttyS0 | ||
5 | |||
6 | * Update default kernel console env variable ($(console)) | ||
7 | to use ttyS0 (instead of ttyS2) to match the serial port | ||
8 | used by x-loader and u-boot | ||
9 | |||
10 | Signed-off-by: Roger Monk <r-monk@ti.com> | ||
11 | --- | ||
12 | include/configs/omap3_evm.h | 2 +- | ||
13 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
14 | |||
15 | diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h | ||
16 | index 73a5c98..d01d733 100644 | ||
17 | --- a/include/configs/omap3_evm.h | ||
18 | +++ b/include/configs/omap3_evm.h | ||
19 | @@ -203,7 +203,7 @@ | ||
20 | #define CONFIG_EXTRA_ENV_SETTINGS \ | ||
21 | "loadaddr=0x82000000\0" \ | ||
22 | "usbtty=cdc_acm\0" \ | ||
23 | - "console=ttyS2,115200n8\0" \ | ||
24 | + "console=ttyS0,115200n8\0" \ | ||
25 | "mmcargs=setenv bootargs console=${console} " \ | ||
26 | "root=/dev/mmcblk0p2 rw " \ | ||
27 | "rootfstype=ext3 rootwait\0" \ | ||
28 | -- | ||
29 | 1.6.0.4 | ||
30 | |||
diff --git a/recipes-bsp/u-boot/u-boot/0002-OMAP-Remove-omapfb.debug-y-from-Beagle-and-Overo-env.patch b/recipes-bsp/u-boot/u-boot/0002-OMAP-Remove-omapfb.debug-y-from-Beagle-and-Overo-env.patch deleted file mode 100644 index 707cc790..00000000 --- a/recipes-bsp/u-boot/u-boot/0002-OMAP-Remove-omapfb.debug-y-from-Beagle-and-Overo-env.patch +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | From 0588da9057fddb5f6a6a04aedd7e0a79eb39e9e5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Steve Sakoman <steve@sakoman.com> | ||
3 | Date: Thu, 30 Dec 2010 07:19:44 +0000 | ||
4 | Subject: [PATCH 02/16] OMAP: Remove omapfb.debug=y from Beagle and Overo env settings | ||
5 | |||
6 | The kernel DSS2 code is mature now, and keeping this setting hurts performance | ||
7 | |||
8 | Signed-off-by: Steve Sakoman <steve@sakoman.com> | ||
9 | --- | ||
10 | include/configs/omap3_beagle.h | 2 -- | ||
11 | include/configs/omap3_overo.h | 2 -- | ||
12 | 2 files changed, 0 insertions(+), 4 deletions(-) | ||
13 | |||
14 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
15 | index 5cfa4cb..8b580ef 100644 | ||
16 | --- a/include/configs/omap3_beagle.h | ||
17 | +++ b/include/configs/omap3_beagle.h | ||
18 | @@ -203,7 +203,6 @@ | ||
19 | "mpurate=${mpurate} " \ | ||
20 | "vram=${vram} " \ | ||
21 | "omapfb.mode=dvi:${dvimode} " \ | ||
22 | - "omapfb.debug=y " \ | ||
23 | "omapdss.def_disp=${defaultdisplay} " \ | ||
24 | "root=${mmcroot} " \ | ||
25 | "rootfstype=${mmcrootfstype}\0" \ | ||
26 | @@ -211,7 +210,6 @@ | ||
27 | "mpurate=${mpurate} " \ | ||
28 | "vram=${vram} " \ | ||
29 | "omapfb.mode=dvi:${dvimode} " \ | ||
30 | - "omapfb.debug=y " \ | ||
31 | "omapdss.def_disp=${defaultdisplay} " \ | ||
32 | "root=${nandroot} " \ | ||
33 | "rootfstype=${nandrootfstype}\0" \ | ||
34 | diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h | ||
35 | index 1b3d439..06a28f6 100644 | ||
36 | --- a/include/configs/omap3_overo.h | ||
37 | +++ b/include/configs/omap3_overo.h | ||
38 | @@ -169,7 +169,6 @@ | ||
39 | "mpurate=${mpurate} " \ | ||
40 | "vram=${vram} " \ | ||
41 | "omapfb.mode=dvi:${dvimode} " \ | ||
42 | - "omapfb.debug=y " \ | ||
43 | "omapdss.def_disp=${defaultdisplay} " \ | ||
44 | "root=${mmcroot} " \ | ||
45 | "rootfstype=${mmcrootfstype}\0" \ | ||
46 | @@ -177,7 +176,6 @@ | ||
47 | "mpurate=${mpurate} " \ | ||
48 | "vram=${vram} " \ | ||
49 | "omapfb.mode=dvi:${dvimode} " \ | ||
50 | - "omapfb.debug=y " \ | ||
51 | "omapdss.def_disp=${defaultdisplay} " \ | ||
52 | "root=${nandroot} " \ | ||
53 | "rootfstype=${nandrootfstype}\0" \ | ||
54 | -- | ||
55 | 1.6.6.1 | ||
56 | |||
diff --git a/recipes-bsp/u-boot/u-boot/0003-omap3_beagle-enable-the-use-of-a-plain-text-file-nam.patch b/recipes-bsp/u-boot/u-boot/0003-omap3_beagle-enable-the-use-of-a-plain-text-file-nam.patch deleted file mode 100644 index a68859e8..00000000 --- a/recipes-bsp/u-boot/u-boot/0003-omap3_beagle-enable-the-use-of-a-plain-text-file-nam.patch +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | From 58ca6009d4101e5fd45ef9df22aa360d1662e9e9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Holler <holler@ahsoftware.de> | ||
3 | Date: Mon, 24 Jan 2011 13:08:49 +0000 | ||
4 | Subject: [PATCH 03/16] omap3_beagle: enable the use of a plain text file named uEnv.txt instead of boot.scr | ||
5 | |||
6 | Using the new env import command it is possible to use plain text files instead | ||
7 | of script-images. Plain text files are much easier to handle. | ||
8 | |||
9 | E.g. If your boot.scr contains the following: | ||
10 | ----------------------------------- | ||
11 | setenv dvimode 1024x768-16@60 | ||
12 | run loaduimage | ||
13 | run mmcboot | ||
14 | ----------------------------------- | ||
15 | you could create a file named uEnv.txt and use that instead of boot.scr: | ||
16 | ----------------------------------- | ||
17 | dvimode=1024x768-16@60 | ||
18 | uenvcmd=run loaduimage; run mmcboot | ||
19 | ----------------------------------- | ||
20 | The variable uenvcmd (if existent) will be executed (using run) after uEnv.txt | ||
21 | was loaded. If uenvcmd doesn't exist the default boot sequence will be started, | ||
22 | therefore you could just use | ||
23 | ----------------------------------- | ||
24 | dvimode=1024x768-16@60 | ||
25 | ----------------------------------- | ||
26 | as uEnv.txt because loaduimage and mmcboot is part of the default boot sequence. | ||
27 | --- | ||
28 | Changes for v2: | ||
29 | - Eliminated else redundant clause that would be ignored if boot | ||
30 | succeeds. | ||
31 | |||
32 | Changes for v3: | ||
33 | - Removed boot.scr | ||
34 | |||
35 | Changes for v4: | ||
36 | - Removed comment about boot.scr being supported. | ||
37 | --- | ||
38 | include/configs/omap3_beagle.h | 28 ++++++++++++++++------------ | ||
39 | 1 files changed, 16 insertions(+), 12 deletions(-) | ||
40 | |||
41 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
42 | index 8b580ef..c85537c 100644 | ||
43 | --- a/include/configs/omap3_beagle.h | ||
44 | +++ b/include/configs/omap3_beagle.h | ||
45 | @@ -213,9 +213,9 @@ | ||
46 | "omapdss.def_disp=${defaultdisplay} " \ | ||
47 | "root=${nandroot} " \ | ||
48 | "rootfstype=${nandrootfstype}\0" \ | ||
49 | - "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \ | ||
50 | - "bootscript=echo Running bootscript from mmc ...; " \ | ||
51 | - "source ${loadaddr}\0" \ | ||
52 | + "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \ | ||
53 | + "importbootenv=echo Importing environment from mmc ...; " \ | ||
54 | + "env import -t $loadaddr $filesize\0" \ | ||
55 | "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ | ||
56 | "mmcboot=echo Booting from mmc ...; " \ | ||
57 | "run mmcargs; " \ | ||
58 | @@ -227,15 +227,19 @@ | ||
59 | |||
60 | #define CONFIG_BOOTCOMMAND \ | ||
61 | "if mmc rescan ${mmcdev}; then " \ | ||
62 | - "if run loadbootscript; then " \ | ||
63 | - "run bootscript; " \ | ||
64 | - "else " \ | ||
65 | - "if run loaduimage; then " \ | ||
66 | - "run mmcboot; " \ | ||
67 | - "else run nandboot; " \ | ||
68 | - "fi; " \ | ||
69 | - "fi; " \ | ||
70 | - "else run nandboot; fi" | ||
71 | + "echo SD/MMC found on device ${mmcdev};" \ | ||
72 | + "if run loadbootenv; then " \ | ||
73 | + "run importbootenv;" \ | ||
74 | + "fi;" \ | ||
75 | + "if test -n $uenvcmd; then " \ | ||
76 | + "echo Running uenvcmd ...;" \ | ||
77 | + "run uenvcmd;" \ | ||
78 | + "fi;" \ | ||
79 | + "if run loaduimage; then " \ | ||
80 | + "run mmcboot;" \ | ||
81 | + "fi;" \ | ||
82 | + "fi;" \ | ||
83 | + "run nandboot;" \ | ||
84 | |||
85 | #define CONFIG_AUTO_COMPLETE 1 | ||
86 | /* | ||
87 | -- | ||
88 | 1.6.6.1 | ||
89 | |||
diff --git a/recipes-bsp/u-boot/u-boot/0004-OMAP3-BeagleBoard-Enable-pullups-on-i2c2.patch b/recipes-bsp/u-boot/u-boot/0004-OMAP3-BeagleBoard-Enable-pullups-on-i2c2.patch deleted file mode 100644 index 4840d869..00000000 --- a/recipes-bsp/u-boot/u-boot/0004-OMAP3-BeagleBoard-Enable-pullups-on-i2c2.patch +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
1 | From 6859e4b88c405ed40c898d259227f158da5f867a Mon Sep 17 00:00:00 2001 | ||
2 | From: Steve Kipisz <s-kipisz2@ti.com> | ||
3 | Date: Thu, 5 Aug 2010 10:36:07 -0500 | ||
4 | Subject: [PATCH 04/16] OMAP3: BeagleBoard: Enable pullups on i2c2. | ||
5 | |||
6 | This allows the reading of EEPROMS on the expansion bus without adding | ||
7 | external pull-ups. | ||
8 | --- | ||
9 | v2 updates | ||
10 | * Updated per http://patchwork.ozlabs.org/patch/71997/ | ||
11 | * Added description | ||
12 | * Used OMAP34XX_CTRL_BASE | ||
13 | * Used structure and writel to perform write | ||
14 | |||
15 | v3 updates | ||
16 | * Included v3 in the subject line | ||
17 | * Fixed structure name typo that got messed up in generating patch | ||
18 | * Removed some extraneous blank lines | ||
19 | |||
20 | v4 updates | ||
21 | * Fixed typo in typecast | ||
22 | --- | ||
23 | arch/arm/include/asm/arch-omap3/omap3.h | 14 ++++++++++++++ | ||
24 | board/ti/beagle/beagle.c | 4 ++++ | ||
25 | 2 files changed, 18 insertions(+), 0 deletions(-) | ||
26 | |||
27 | diff --git a/arch/arm/include/asm/arch-omap3/omap3.h b/arch/arm/include/asm/arch-omap3/omap3.h | ||
28 | index 3957c79..cc2b541 100644 | ||
29 | --- a/arch/arm/include/asm/arch-omap3/omap3.h | ||
30 | +++ b/arch/arm/include/asm/arch-omap3/omap3.h | ||
31 | @@ -50,6 +50,20 @@ | ||
32 | /* CONTROL */ | ||
33 | #define OMAP34XX_CTRL_BASE (OMAP34XX_L4_IO_BASE + 0x2000) | ||
34 | |||
35 | +#ifndef __ASSEMBLY__ | ||
36 | +/* Signal Integrity Parameter Control Registers */ | ||
37 | +struct control_prog_io { | ||
38 | + unsigned char res[0x408]; | ||
39 | + unsigned int io2; /* 0x408 */ | ||
40 | + unsigned char res2[0x38]; | ||
41 | + unsigned int io0; /* 0x444 */ | ||
42 | + unsigned int io1; /* 0x448 */ | ||
43 | +}; | ||
44 | +#endif /* __ASSEMBLY__ */ | ||
45 | + | ||
46 | +/* Bit definition for CONTROL_PROG_IO1 */ | ||
47 | +#define PRG_I2C2_PULLUPRESX 0x00000001 | ||
48 | + | ||
49 | /* UART */ | ||
50 | #define OMAP34XX_UART1 (OMAP34XX_L4_IO_BASE + 0x6a000) | ||
51 | #define OMAP34XX_UART2 (OMAP34XX_L4_IO_BASE + 0x6c000) | ||
52 | diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c | ||
53 | index 929461c..9d03b24 100644 | ||
54 | --- a/board/ti/beagle/beagle.c | ||
55 | +++ b/board/ti/beagle/beagle.c | ||
56 | @@ -148,6 +148,10 @@ int misc_init_r(void) | ||
57 | { | ||
58 | struct gpio *gpio5_base = (struct gpio *)OMAP34XX_GPIO5_BASE; | ||
59 | struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE; | ||
60 | + struct control_prog_io *prog_io_base = (struct control_prog_io *)OMAP34XX_CTRL_BASE; | ||
61 | + | ||
62 | + /* Enable i2c2 pullup resisters */ | ||
63 | + writel(~(PRG_I2C2_PULLUPRESX), &prog_io_base->io1); | ||
64 | |||
65 | switch (get_board_revision()) { | ||
66 | case REVISION_AXBX: | ||
67 | -- | ||
68 | 1.6.6.1 | ||
69 | |||
diff --git a/recipes-bsp/u-boot/u-boot/0005-ARMV7-OMAP3-BeagleBoard-add-xM-rev-B-to-ID-table.patch b/recipes-bsp/u-boot/u-boot/0005-ARMV7-OMAP3-BeagleBoard-add-xM-rev-B-to-ID-table.patch deleted file mode 100644 index 0e8dd840..00000000 --- a/recipes-bsp/u-boot/u-boot/0005-ARMV7-OMAP3-BeagleBoard-add-xM-rev-B-to-ID-table.patch +++ /dev/null | |||
@@ -1,111 +0,0 @@ | |||
1 | From d2d1669e4e2d4eeb996305278c6e4df0b1e04a8d Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Wed, 3 Nov 2010 14:48:31 +0100 | ||
4 | Subject: [PATCH 05/16] ARMV7: OMAP3: BeagleBoard: add xM rev B to ID table | ||
5 | |||
6 | Patch was updated by Jason Kridner <jkridner@beagleboard.org>: | ||
7 | * Use tabs to match style of other board revisions | ||
8 | * Only include board revisions that exist | ||
9 | * Default to the same configuration as the latest revision, but | ||
10 | without setting 'beaglerev' | ||
11 | --- | ||
12 | v2 Changes | ||
13 | * Updated with feedback from http://patchwork.ozlabs.org/patch/71995/ | ||
14 | * Removed setting of mpurate based on board revision | ||
15 | * Set mpurate to auto in default environment variables | ||
16 | |||
17 | Cc: Koen Kooi <koen@dominion.thruhere.net> | ||
18 | --- | ||
19 | board/ti/beagle/beagle.c | 22 +++++++++++++++++----- | ||
20 | board/ti/beagle/beagle.h | 3 ++- | ||
21 | include/configs/omap3_beagle.h | 2 +- | ||
22 | 3 files changed, 20 insertions(+), 7 deletions(-) | ||
23 | |||
24 | diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c | ||
25 | index 9d03b24..87a952e 100644 | ||
26 | --- a/board/ti/beagle/beagle.c | ||
27 | +++ b/board/ti/beagle/beagle.c | ||
28 | @@ -157,18 +157,15 @@ int misc_init_r(void) | ||
29 | case REVISION_AXBX: | ||
30 | printf("Beagle Rev Ax/Bx\n"); | ||
31 | setenv("beaglerev", "AxBx"); | ||
32 | - setenv("mpurate", "600"); | ||
33 | break; | ||
34 | case REVISION_CX: | ||
35 | printf("Beagle Rev C1/C2/C3\n"); | ||
36 | setenv("beaglerev", "Cx"); | ||
37 | - setenv("mpurate", "600"); | ||
38 | MUX_BEAGLE_C(); | ||
39 | break; | ||
40 | case REVISION_C4: | ||
41 | printf("Beagle Rev C4\n"); | ||
42 | setenv("beaglerev", "C4"); | ||
43 | - setenv("mpurate", "720"); | ||
44 | MUX_BEAGLE_C(); | ||
45 | /* Set VAUX2 to 1.8V for EHCI PHY */ | ||
46 | twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, | ||
47 | @@ -176,10 +173,19 @@ int misc_init_r(void) | ||
48 | TWL4030_PM_RECEIVER_VAUX2_DEV_GRP, | ||
49 | TWL4030_PM_RECEIVER_DEV_GRP_P1); | ||
50 | break; | ||
51 | - case REVISION_XM: | ||
52 | + case REVISION_XM_A: | ||
53 | printf("Beagle xM Rev A\n"); | ||
54 | setenv("beaglerev", "xMA"); | ||
55 | - setenv("mpurate", "1000"); | ||
56 | + MUX_BEAGLE_XM(); | ||
57 | + /* Set VAUX2 to 1.8V for EHCI PHY */ | ||
58 | + twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, | ||
59 | + TWL4030_PM_RECEIVER_VAUX2_VSEL_18, | ||
60 | + TWL4030_PM_RECEIVER_VAUX2_DEV_GRP, | ||
61 | + TWL4030_PM_RECEIVER_DEV_GRP_P1); | ||
62 | + break; | ||
63 | + case REVISION_XM_B: | ||
64 | + printf("Beagle xM Rev B\n"); | ||
65 | + setenv("beaglerev", "xMB"); | ||
66 | MUX_BEAGLE_XM(); | ||
67 | /* Set VAUX2 to 1.8V for EHCI PHY */ | ||
68 | twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, | ||
69 | @@ -189,6 +195,12 @@ int misc_init_r(void) | ||
70 | break; | ||
71 | default: | ||
72 | printf("Beagle unknown 0x%02x\n", get_board_revision()); | ||
73 | + MUX_BEAGLE_XM(); | ||
74 | + /* Set VAUX2 to 1.8V for EHCI PHY */ | ||
75 | + twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, | ||
76 | + TWL4030_PM_RECEIVER_VAUX2_VSEL_18, | ||
77 | + TWL4030_PM_RECEIVER_VAUX2_DEV_GRP, | ||
78 | + TWL4030_PM_RECEIVER_DEV_GRP_P1); | ||
79 | } | ||
80 | |||
81 | switch (get_expansion_id()) { | ||
82 | diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h | ||
83 | index b22b653..b0e26e5 100644 | ||
84 | --- a/board/ti/beagle/beagle.h | ||
85 | +++ b/board/ti/beagle/beagle.h | ||
86 | @@ -37,7 +37,8 @@ const omap3_sysinfo sysinfo = { | ||
87 | #define REVISION_AXBX 0x7 | ||
88 | #define REVISION_CX 0x6 | ||
89 | #define REVISION_C4 0x5 | ||
90 | -#define REVISION_XM 0x0 | ||
91 | +#define REVISION_XM_A 0x0 | ||
92 | +#define REVISION_XM_B 0x1 | ||
93 | |||
94 | /* | ||
95 | * IEN - Input Enable | ||
96 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
97 | index c85537c..51e14d0 100644 | ||
98 | --- a/include/configs/omap3_beagle.h | ||
99 | +++ b/include/configs/omap3_beagle.h | ||
100 | @@ -190,7 +190,7 @@ | ||
101 | "loadaddr=0x82000000\0" \ | ||
102 | "usbtty=cdc_acm\0" \ | ||
103 | "console=ttyS2,115200n8\0" \ | ||
104 | - "mpurate=500\0" \ | ||
105 | + "mpurate=auto\0" \ | ||
106 | "vram=12M\0" \ | ||
107 | "dvimode=1024x768MR-16@60\0" \ | ||
108 | "defaultdisplay=dvi\0" \ | ||
109 | -- | ||
110 | 1.6.6.1 | ||
111 | |||
diff --git a/recipes-bsp/u-boot/u-boot/0006-OMAP3-BeagleBoard-add-more-expansionboard-IDs.patch b/recipes-bsp/u-boot/u-boot/0006-OMAP3-BeagleBoard-add-more-expansionboard-IDs.patch deleted file mode 100644 index 1d16cf7a..00000000 --- a/recipes-bsp/u-boot/u-boot/0006-OMAP3-BeagleBoard-add-more-expansionboard-IDs.patch +++ /dev/null | |||
@@ -1,95 +0,0 @@ | |||
1 | From 40cdd86d6040714f79e81bb813596748490aa948 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Wed, 3 Nov 2010 14:39:15 +0100 | ||
4 | Subject: [PATCH 06/16] OMAP3: BeagleBoard: add more expansionboard IDs | ||
5 | |||
6 | Information on configurations pulled from | ||
7 | http://www.elinux.org/BeagleBoardPinMux#Vendor_and_Device_IDs | ||
8 | |||
9 | Boards added: | ||
10 | * Added BeagleBoardToys WiFi, VGA and LCD boards | ||
11 | * Added KBADC Beagle FPGA board | ||
12 | * Added Brainmux LCDog and LCDog Touch | ||
13 | * Added Liquidware BeagleTouch | ||
14 | --- | ||
15 | v2 updates | ||
16 | * Removed unused definitions | ||
17 | * Added BeagleBoardToys board configurations | ||
18 | * Made definition names consistent as VENDOR_BOARD | ||
19 | --- | ||
20 | board/ti/beagle/beagle.c | 30 +++++++++++++++++++++++++++++- | ||
21 | board/ti/beagle/beagle.h | 12 ++++++++++++ | ||
22 | 2 files changed, 41 insertions(+), 1 deletions(-) | ||
23 | |||
24 | diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c | ||
25 | index 87a952e..97e9e12 100644 | ||
26 | --- a/board/ti/beagle/beagle.c | ||
27 | +++ b/board/ti/beagle/beagle.c | ||
28 | @@ -48,7 +48,12 @@ | ||
29 | #define TINCANTOOLS_TRAINER 0x04000100 | ||
30 | #define TINCANTOOLS_SHOWDOG 0x03000100 | ||
31 | #define KBADC_BEAGLEFPGA 0x01000600 | ||
32 | - | ||
33 | +#define LW_BEAGLETOUCH 0x01000700 | ||
34 | +#define BRAINMUX_LCDOG 0x01000800 | ||
35 | +#define BRAINMUX_LCDOGTOUCH 0x02000800 | ||
36 | +#define BBTOYS_WIFI 0x01000B00 | ||
37 | +#define BBTOYS_VGA 0x02000B00 | ||
38 | +#define BBTOYS_LCD 0x03000B00 | ||
39 | #define BEAGLE_NO_EEPROM 0xffffffff | ||
40 | |||
41 | DECLARE_GLOBAL_DATA_PTR; | ||
42 | @@ -239,6 +244,29 @@ int misc_init_r(void) | ||
43 | MUX_KBADC_BEAGLEFPGA(); | ||
44 | setenv("buddy", "beaglefpga"); | ||
45 | break; | ||
46 | + case LW_BEAGLETOUCH: | ||
47 | + printf("Recognized Liquidware BeagleTouch board\n"); | ||
48 | + setenv("buddy", "beagletouch"); | ||
49 | + break; | ||
50 | + case BRAINMUX_LCDOG: | ||
51 | + printf("Recognized Brainmux LCDog board\n"); | ||
52 | + setenv("buddy", "lcdog"); | ||
53 | + break; | ||
54 | + case BRAINMUX_LCDOGTOUCH: | ||
55 | + printf("Recognized Brainmux LCDog Touch board\n"); | ||
56 | + setenv("buddy", "lcdogtouch"); | ||
57 | + break; | ||
58 | + case BBTOYS_WIFI: | ||
59 | + printf("Recognized BeagleBoardToys WiFi board\n"); | ||
60 | + MUX_BBTOYS_WIFI() | ||
61 | + setenv("buddy", "bbtoys-wifi"); | ||
62 | + break;; | ||
63 | + case BBTOYS_VGA: | ||
64 | + printf("Recognized BeagleBoardToys VGA board\n"); | ||
65 | + break;; | ||
66 | + case BBTOYS_LCD: | ||
67 | + printf("Recognized BeagleBoardToys LCD board\n"); | ||
68 | + break;; | ||
69 | case BEAGLE_NO_EEPROM: | ||
70 | printf("No EEPROM on expansion board\n"); | ||
71 | setenv("buddy", "none"); | ||
72 | diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h | ||
73 | index b0e26e5..0f21790 100644 | ||
74 | --- a/board/ti/beagle/beagle.h | ||
75 | +++ b/board/ti/beagle/beagle.h | ||
76 | @@ -458,4 +458,16 @@ const omap3_sysinfo sysinfo = { | ||
77 | MUX_VAL(CP(MCBSP1_DR), (IEN | PTU | EN | M1)) /*MCSPI4_SOMI*/\ | ||
78 | MUX_VAL(CP(MCBSP1_FSX), (IDIS | PTU | DIS | M1)) /*MCSPI4_CS0*/ | ||
79 | |||
80 | +#define MUX_BBTOYS_WIFI() \ | ||
81 | + MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M0)) /*MMC2_CLK*/\ | ||
82 | + MUX_VAL(CP(MMC2_CMD), (IEN | PTU | EN | M0)) /*MMC2_CMD*/\ | ||
83 | + MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M0)) /*MMC2_DAT0*/\ | ||
84 | + MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M0)) /*MMC2_DAT1*/\ | ||
85 | + MUX_VAL(CP(MMC2_DAT2), (IEN | PTU | EN | M0)) /*MMC2_DAT2*/\ | ||
86 | + MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M0)) /*MMC2_DAT3*/\ | ||
87 | + MUX_VAL(CP(MMC2_DAT4), (IDIS | PTU | EN | M4)) /*GPIO_136 FM_EN/BT_WU*/\ | ||
88 | + MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M4)) /*GPIO_137 WLAN_IRQ*/\ | ||
89 | + MUX_VAL(CP(MMC2_DAT6), (IDIS | PTU | EN | M4)) /*GPIO_138 BT_EN*/\ | ||
90 | + MUX_VAL(CP(MMC2_DAT7), (IDIS | PTU | EN | M4)) /*GPIO_139 WLAN_EN*/ | ||
91 | + | ||
92 | #endif | ||
93 | -- | ||
94 | 1.6.6.1 | ||
95 | |||
diff --git a/recipes-bsp/u-boot/u-boot/0007-OMAP3-Add-DSS-driver-for-OMAP3.patch b/recipes-bsp/u-boot/u-boot/0007-OMAP3-Add-DSS-driver-for-OMAP3.patch deleted file mode 100644 index a1b3b0e2..00000000 --- a/recipes-bsp/u-boot/u-boot/0007-OMAP3-Add-DSS-driver-for-OMAP3.patch +++ /dev/null | |||
@@ -1,435 +0,0 @@ | |||
1 | From 8a249fc1c57ab01a78996e33e74a71757a9448b1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Syed Mohammed Khasim <khasim@ti.com> | ||
3 | Date: Tue, 12 Jan 2010 23:57:28 +0530 | ||
4 | Subject: [PATCH 07/16] OMAP3: Add DSS driver for OMAP3 | ||
5 | |||
6 | Supports dynamic panel configuration | ||
7 | Supports dynamic tv standard selection | ||
8 | Adds support for DSS register access through generic APIs | ||
9 | |||
10 | Incorporated DSS register access using structures. | ||
11 | |||
12 | Previous discussions are here | ||
13 | http://www.mail-archive.com/u-boot@lists.denx.de/msg27150.html | ||
14 | --- | ||
15 | v2 updates: | ||
16 | * Enable panel output for BeagleBoard | ||
17 | * BeagleBoard: Update DVI-D orange screen frequencies for xM | ||
18 | |||
19 | Signed-off-by: Syed Mohammed Khasim <khasim@ti.com> | ||
20 | --- | ||
21 | arch/arm/include/asm/arch-omap3/dss.h | 173 +++++++++++++++++++++++++++++++++ | ||
22 | board/ti/beagle/beagle.c | 22 ++++ | ||
23 | board/ti/beagle/beagle.h | 26 +++++ | ||
24 | drivers/video/Makefile | 2 + | ||
25 | drivers/video/omap3_dss.c | 130 +++++++++++++++++++++++++ | ||
26 | 5 files changed, 353 insertions(+), 0 deletions(-) | ||
27 | create mode 100644 arch/arm/include/asm/arch-omap3/dss.h | ||
28 | create mode 100644 drivers/video/omap3_dss.c | ||
29 | |||
30 | diff --git a/arch/arm/include/asm/arch-omap3/dss.h b/arch/arm/include/asm/arch-omap3/dss.h | ||
31 | new file mode 100644 | ||
32 | index 0000000..e5e3b0d | ||
33 | --- /dev/null | ||
34 | +++ b/arch/arm/include/asm/arch-omap3/dss.h | ||
35 | @@ -0,0 +1,173 @@ | ||
36 | +/* | ||
37 | + * (C) Copyright 2010 | ||
38 | + * Texas Instruments, <www.ti.com> | ||
39 | + * Syed Mohammed Khasim <khasim@ti.com> | ||
40 | + * | ||
41 | + * Referred to Linux DSS driver files for OMAP3 | ||
42 | + * | ||
43 | + * See file CREDITS for list of people who contributed to this | ||
44 | + * project. | ||
45 | + * | ||
46 | + * This program is free software; you can redistribute it and/or | ||
47 | + * modify it under the terms of the GNU General Public License as | ||
48 | + * published by the Free Software Foundation's version 2 of | ||
49 | + * the License. | ||
50 | + * | ||
51 | + * This program is distributed in the hope that it will be useful, | ||
52 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
53 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
54 | + * GNU General Public License for more details. | ||
55 | + * | ||
56 | + * You should have received a copy of the GNU General Public License | ||
57 | + * along with this program; if not, write to the Free Software | ||
58 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
59 | + * MA 02111-1307 USA | ||
60 | + */ | ||
61 | + | ||
62 | +#ifndef DSS_H | ||
63 | +#define DSS_H | ||
64 | + | ||
65 | +/* | ||
66 | + * DSS Base Registers | ||
67 | + */ | ||
68 | +#define OMAP3_DSS_BASE 0x48050040 | ||
69 | +#define OMAP3_DISPC_BASE 0x48050440 | ||
70 | +#define OMAP3_VENC_BASE 0x48050C00 | ||
71 | + | ||
72 | +/* DSS Registers */ | ||
73 | +struct dss_regs { | ||
74 | + u32 control; /* 0x40 */ | ||
75 | + u32 sdi_control; /* 0x44 */ | ||
76 | + u32 pll_control; /* 0x48 */ | ||
77 | +}; | ||
78 | + | ||
79 | +/* DISPC Registers */ | ||
80 | +struct dispc_regs { | ||
81 | + u32 control; /* 0x40 */ | ||
82 | + u32 config; /* 0x44 */ | ||
83 | + u32 reserve_2; /* 0x48 */ | ||
84 | + u32 default_color0; /* 0x4C */ | ||
85 | + u32 default_color1; /* 0x50 */ | ||
86 | + u32 trans_color0; /* 0x54 */ | ||
87 | + u32 trans_color1; /* 0x58 */ | ||
88 | + u32 line_status; /* 0x5C */ | ||
89 | + u32 line_number; /* 0x60 */ | ||
90 | + u32 timing_h; /* 0x64 */ | ||
91 | + u32 timing_v; /* 0x68 */ | ||
92 | + u32 pol_freq; /* 0x6C */ | ||
93 | + u32 divisor; /* 0x70 */ | ||
94 | + u32 global_alpha; /* 0x74 */ | ||
95 | + u32 size_dig; /* 0x78 */ | ||
96 | + u32 size_lcd; /* 0x7C */ | ||
97 | +}; | ||
98 | + | ||
99 | +/* VENC Registers */ | ||
100 | +struct venc_regs { | ||
101 | + u32 rev_id; /* 0x00 */ | ||
102 | + u32 status; /* 0x04 */ | ||
103 | + u32 f_control; /* 0x08 */ | ||
104 | + u32 reserve_1; /* 0x0C */ | ||
105 | + u32 vidout_ctrl; /* 0x10 */ | ||
106 | + u32 sync_ctrl; /* 0x14 */ | ||
107 | + u32 reserve_2; /* 0x18 */ | ||
108 | + u32 llen; /* 0x1C */ | ||
109 | + u32 flens; /* 0x20 */ | ||
110 | + u32 hfltr_ctrl; /* 0x24 */ | ||
111 | + u32 cc_carr_wss_carr; /* 0x28 */ | ||
112 | + u32 c_phase; /* 0x2C */ | ||
113 | + u32 gain_u; /* 0x30 */ | ||
114 | + u32 gain_v; /* 0x34 */ | ||
115 | + u32 gain_y; /* 0x38 */ | ||
116 | + u32 black_level; /* 0x3C */ | ||
117 | + u32 blank_level; /* 0x40 */ | ||
118 | + u32 x_color; /* 0x44 */ | ||
119 | + u32 m_control; /* 0x48 */ | ||
120 | + u32 bstamp_wss_data; /* 0x4C */ | ||
121 | + u32 s_carr; /* 0x50 */ | ||
122 | + u32 line21; /* 0x54 */ | ||
123 | + u32 ln_sel; /* 0x58 */ | ||
124 | + u32 l21__wc_ctl; /* 0x5C */ | ||
125 | + u32 htrigger_vtrigger; /* 0x60 */ | ||
126 | + u32 savid__eavid; /* 0x64 */ | ||
127 | + u32 flen__fal; /* 0x68 */ | ||
128 | + u32 lal__phase_reset; /* 0x6C */ | ||
129 | + u32 hs_int_start_stop_x; /* 0x70 */ | ||
130 | + u32 hs_ext_start_stop_x; /* 0x74 */ | ||
131 | + u32 vs_int_start_x; /* 0x78 */ | ||
132 | + u32 vs_int_stop_x__vs_int_start_y; /* 0x7C */ | ||
133 | + u32 vs_int_stop_y__vs_ext_start_x; /* 0x80 */ | ||
134 | + u32 vs_ext_stop_x__vs_ext_start_y; /* 0x84 */ | ||
135 | + u32 vs_ext_stop_y; /* 0x88 */ | ||
136 | + u32 reserve_3; /* 0x8C */ | ||
137 | + u32 avid_start_stop_x; /* 0x90 */ | ||
138 | + u32 avid_start_stop_y; /* 0x94 */ | ||
139 | + u32 reserve_4; /* 0x98 */ | ||
140 | + u32 reserve_5; /* 0x9C */ | ||
141 | + u32 fid_int_start_x__fid_int_start_y; /* 0xA0 */ | ||
142 | + u32 fid_int_offset_y__fid_ext_start_x; /* 0xA4 */ | ||
143 | + u32 fid_ext_start_y__fid_ext_offset_y; /* 0xA8 */ | ||
144 | + u32 reserve_6; /* 0xAC */ | ||
145 | + u32 tvdetgp_int_start_stop_x; /* 0xB0 */ | ||
146 | + u32 tvdetgp_int_start_stop_y; /* 0xB4 */ | ||
147 | + u32 gen_ctrl; /* 0xB8 */ | ||
148 | + u32 reserve_7; /* 0xBC */ | ||
149 | + u32 reserve_8; /* 0xC0 */ | ||
150 | + u32 output_control; /* 0xC4 */ | ||
151 | + u32 dac_b__dac_c; /* 0xC8 */ | ||
152 | + u32 height_width; /* 0xCC */ | ||
153 | +}; | ||
154 | + | ||
155 | +/* Few Register Offsets */ | ||
156 | +#define FRAME_MODE_SHIFT 1 | ||
157 | +#define TFTSTN_SHIFT 3 | ||
158 | +#define DATALINES_SHIFT 8 | ||
159 | + | ||
160 | +/* Enabling Display controller */ | ||
161 | +#define LCD_ENABLE 1 | ||
162 | +#define DIG_ENABLE (1 << 1) | ||
163 | +#define GO_LCD (1 << 5) | ||
164 | +#define GO_DIG (1 << 6) | ||
165 | +#define GP_OUT0 (1 << 15) | ||
166 | +#define GP_OUT1 (1 << 16) | ||
167 | + | ||
168 | +#define DISPC_ENABLE (LCD_ENABLE | \ | ||
169 | + DIG_ENABLE | \ | ||
170 | + GO_LCD | \ | ||
171 | + GO_DIG | \ | ||
172 | + GP_OUT0| \ | ||
173 | + GP_OUT1) | ||
174 | + | ||
175 | +/* Configure VENC DSS Params */ | ||
176 | +#define VENC_CLK_ENABLE (1 << 3) | ||
177 | +#define DAC_DEMEN (1 << 4) | ||
178 | +#define DAC_POWERDN (1 << 5) | ||
179 | +#define VENC_OUT_SEL (1 << 6) | ||
180 | +#define DIG_LPP_SHIFT 16 | ||
181 | +#define VENC_DSS_CONFIG (VENC_CLK_ENABLE | \ | ||
182 | + DAC_DEMEN | \ | ||
183 | + DAC_POWERDN | \ | ||
184 | + VENC_OUT_SEL) | ||
185 | +/* | ||
186 | + * Panel Configuration | ||
187 | + */ | ||
188 | +struct panel_config { | ||
189 | + u32 timing_h; | ||
190 | + u32 timing_v; | ||
191 | + u32 pol_freq; | ||
192 | + u32 divisor; | ||
193 | + u32 lcd_size; | ||
194 | + u32 panel_type; | ||
195 | + u32 data_lines; | ||
196 | + u32 load_mode; | ||
197 | + u32 panel_color; | ||
198 | +}; | ||
199 | + | ||
200 | +/* | ||
201 | + * Generic DSS Functions | ||
202 | + */ | ||
203 | +void omap3_dss_venc_config(const struct venc_regs *venc_cfg, | ||
204 | + u32 height, u32 width); | ||
205 | +void omap3_dss_panel_config(const struct panel_config *panel_cfg); | ||
206 | +void omap3_dss_enable(void); | ||
207 | + | ||
208 | +#endif /* DSS_H */ | ||
209 | diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c | ||
210 | index 97e9e12..56e7afc 100644 | ||
211 | --- a/board/ti/beagle/beagle.c | ||
212 | +++ b/board/ti/beagle/beagle.c | ||
213 | @@ -146,6 +146,27 @@ unsigned int get_expansion_id(void) | ||
214 | } | ||
215 | |||
216 | /* | ||
217 | + * Configure DSS to display background color on DVID | ||
218 | + * Configure VENC to display color bar on S-Video | ||
219 | + */ | ||
220 | +void display_init(void) | ||
221 | +{ | ||
222 | + omap3_dss_venc_config(&venc_config_std_tv, VENC_HEIGHT, VENC_WIDTH); | ||
223 | + switch (get_board_revision()) { | ||
224 | + case REVISION_AXBX: | ||
225 | + case REVISION_CX: | ||
226 | + case REVISION_C4: | ||
227 | + omap3_dss_panel_config(&dvid_cfg); | ||
228 | + break; | ||
229 | + case REVISION_XM_A: | ||
230 | + case REVISION_XM_B: | ||
231 | + default: | ||
232 | + omap3_dss_panel_config(&dvid_cfg_xm); | ||
233 | + break; | ||
234 | + } | ||
235 | +} | ||
236 | + | ||
237 | +/* | ||
238 | * Routine: misc_init_r | ||
239 | * Description: Configure board specific parts | ||
240 | */ | ||
241 | @@ -282,6 +303,7 @@ int misc_init_r(void) | ||
242 | |||
243 | twl4030_power_init(); | ||
244 | twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); | ||
245 | + display_init(); | ||
246 | |||
247 | /* Set GPIO states before they are made outputs */ | ||
248 | writel(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1, | ||
249 | diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h | ||
250 | index 0f21790..48228dc 100644 | ||
251 | --- a/board/ti/beagle/beagle.h | ||
252 | +++ b/board/ti/beagle/beagle.h | ||
253 | @@ -470,4 +470,30 @@ const omap3_sysinfo sysinfo = { | ||
254 | MUX_VAL(CP(MMC2_DAT6), (IDIS | PTU | EN | M4)) /*GPIO_138 BT_EN*/\ | ||
255 | MUX_VAL(CP(MMC2_DAT7), (IDIS | PTU | EN | M4)) /*GPIO_139 WLAN_EN*/ | ||
256 | |||
257 | +/* | ||
258 | + * Configure Timings for DVI D | ||
259 | + */ | ||
260 | +static const struct panel_config dvid_cfg = { | ||
261 | + .timing_h = 0x0ff03f31, /* Horizantal timing */ | ||
262 | + .timing_v = 0x01400504, /* Vertical timing */ | ||
263 | + .pol_freq = 0x00007028, /* Pol Freq */ | ||
264 | + .divisor = 0x00010006, /* 72Mhz Pixel Clock */ | ||
265 | + .lcd_size = 0x02ff03ff, /* 1024x768 */ | ||
266 | + .panel_type = 0x01, /* TFT */ | ||
267 | + .data_lines = 0x03, /* 24 Bit RGB */ | ||
268 | + .load_mode = 0x02, /* Frame Mode */ | ||
269 | + .panel_color = DVI_BEAGLE_ORANGE_COL /* ORANGE */ | ||
270 | +}; | ||
271 | + | ||
272 | +static const struct panel_config dvid_cfg_xm = { | ||
273 | + .timing_h = 0x1a4024c9, /* Horizantal timing */ | ||
274 | + .timing_v = 0x02c00509, /* Vertical timing */ | ||
275 | + .pol_freq = 0x00007028, /* Pol Freq */ | ||
276 | + .divisor = 0x00010001, /* 96MHz Pixel Clock */ | ||
277 | + .lcd_size = 0x02ff03ff, /* 1024x768 */ | ||
278 | + .panel_type = 0x01, /* TFT */ | ||
279 | + .data_lines = 0x03, /* 24 Bit RGB */ | ||
280 | + .load_mode = 0x02, /* Frame Mode */ | ||
281 | + .panel_color = DVI_BEAGLE_ORANGE_COL /* ORANGE */ | ||
282 | +}; | ||
283 | #endif | ||
284 | diff --git a/drivers/video/Makefile b/drivers/video/Makefile | ||
285 | index 2c53a6f..6baa7ca 100644 | ||
286 | --- a/drivers/video/Makefile | ||
287 | +++ b/drivers/video/Makefile | ||
288 | @@ -41,6 +41,8 @@ COBJS-$(CONFIG_SED156X) += sed156x.o | ||
289 | COBJS-$(CONFIG_VIDEO_SM501) += sm501.o | ||
290 | COBJS-$(CONFIG_VIDEO_SMI_LYNXEM) += smiLynxEM.o videomodes.o | ||
291 | COBJS-$(CONFIG_VIDEO_VCXK) += bus_vcxk.o | ||
292 | +COBJS-$(CONFIG_VIDEO_OMAP3) += omap3_dss.o | ||
293 | +COBJS-y += videomodes.o | ||
294 | |||
295 | COBJS := $(COBJS-y) | ||
296 | SRCS := $(COBJS:.o=.c) | ||
297 | diff --git a/drivers/video/omap3_dss.c b/drivers/video/omap3_dss.c | ||
298 | new file mode 100644 | ||
299 | index 0000000..69c705a | ||
300 | --- /dev/null | ||
301 | +++ b/drivers/video/omap3_dss.c | ||
302 | @@ -0,0 +1,130 @@ | ||
303 | +/* | ||
304 | + * (C) Copyright 2010 | ||
305 | + * Texas Instruments, <www.ti.com> | ||
306 | + * Syed Mohammed Khasim <khasim@ti.com> | ||
307 | + * | ||
308 | + * Referred to Linux DSS driver files for OMAP3 | ||
309 | + * | ||
310 | + * See file CREDITS for list of people who contributed to this | ||
311 | + * project. | ||
312 | + * | ||
313 | + * This program is free software; you can redistribute it and/or | ||
314 | + * modify it under the terms of the GNU General Public License as | ||
315 | + * published by the Free Software Foundation's version 2 of | ||
316 | + * the License. | ||
317 | + * | ||
318 | + * This program is distributed in the hope that it will be useful, | ||
319 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
320 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
321 | + * GNU General Public License for more details. | ||
322 | + * | ||
323 | + * You should have received a copy of the GNU General Public License | ||
324 | + * along with this program; if not, write to the Free Software | ||
325 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
326 | + * MA 02111-1307 USA | ||
327 | + */ | ||
328 | + | ||
329 | +#include <common.h> | ||
330 | +#include <asm/io.h> | ||
331 | +#include <asm/arch/dss.h> | ||
332 | + | ||
333 | +/* | ||
334 | + * Configure VENC for a given Mode (NTSC / PAL) | ||
335 | + */ | ||
336 | +void omap3_dss_venc_config(const struct venc_regs *venc_cfg, | ||
337 | + u32 height, u32 width) | ||
338 | +{ | ||
339 | + struct venc_regs *venc = (struct venc_regs *) OMAP3_VENC_BASE; | ||
340 | + struct dss_regs *dss = (struct dss_regs *) OMAP3_DSS_BASE; | ||
341 | + struct dispc_regs *dispc = (struct dispc_regs *) OMAP3_DISPC_BASE; | ||
342 | + | ||
343 | + writel(venc_cfg->status, &venc->status); | ||
344 | + writel(venc_cfg->f_control, &venc->f_control); | ||
345 | + writel(venc_cfg->vidout_ctrl, &venc->vidout_ctrl); | ||
346 | + writel(venc_cfg->sync_ctrl, &venc->sync_ctrl); | ||
347 | + writel(venc_cfg->llen, &venc->llen); | ||
348 | + writel(venc_cfg->flens, &venc->flens); | ||
349 | + writel(venc_cfg->hfltr_ctrl, &venc->hfltr_ctrl); | ||
350 | + writel(venc_cfg->cc_carr_wss_carr, &venc->cc_carr_wss_carr); | ||
351 | + writel(venc_cfg->c_phase, &venc->c_phase); | ||
352 | + writel(venc_cfg->gain_u, &venc->gain_u); | ||
353 | + writel(venc_cfg->gain_v, &venc->gain_v); | ||
354 | + writel(venc_cfg->gain_y, &venc->gain_y); | ||
355 | + writel(venc_cfg->black_level, &venc->black_level); | ||
356 | + writel(venc_cfg->blank_level, &venc->blank_level); | ||
357 | + writel(venc_cfg->x_color, &venc->x_color); | ||
358 | + writel(venc_cfg->m_control, &venc->m_control); | ||
359 | + writel(venc_cfg->bstamp_wss_data, &venc->bstamp_wss_data); | ||
360 | + writel(venc_cfg->s_carr, &venc->s_carr); | ||
361 | + writel(venc_cfg->line21, &venc->line21); | ||
362 | + writel(venc_cfg->ln_sel, &venc->ln_sel); | ||
363 | + writel(venc_cfg->l21__wc_ctl, &venc->l21__wc_ctl); | ||
364 | + writel(venc_cfg->htrigger_vtrigger, &venc->htrigger_vtrigger); | ||
365 | + writel(venc_cfg->savid__eavid, &venc->savid__eavid); | ||
366 | + writel(venc_cfg->flen__fal, &venc->flen__fal); | ||
367 | + writel(venc_cfg->lal__phase_reset, &venc->lal__phase_reset); | ||
368 | + writel(venc_cfg->hs_int_start_stop_x, | ||
369 | + &venc->hs_int_start_stop_x); | ||
370 | + writel(venc_cfg->hs_ext_start_stop_x, | ||
371 | + &venc->hs_ext_start_stop_x); | ||
372 | + writel(venc_cfg->vs_int_start_x, &venc->vs_int_start_x); | ||
373 | + writel(venc_cfg->vs_int_stop_x__vs_int_start_y, | ||
374 | + &venc->vs_int_stop_x__vs_int_start_y); | ||
375 | + writel(venc_cfg->vs_int_stop_y__vs_ext_start_x, | ||
376 | + &venc->vs_int_stop_y__vs_ext_start_x); | ||
377 | + writel(venc_cfg->vs_ext_stop_x__vs_ext_start_y, | ||
378 | + &venc->vs_ext_stop_x__vs_ext_start_y); | ||
379 | + writel(venc_cfg->vs_ext_stop_y, &venc->vs_ext_stop_y); | ||
380 | + writel(venc_cfg->avid_start_stop_x, &venc->avid_start_stop_x); | ||
381 | + writel(venc_cfg->avid_start_stop_y, &venc->avid_start_stop_y); | ||
382 | + writel(venc_cfg->fid_int_start_x__fid_int_start_y, | ||
383 | + &venc->fid_int_start_x__fid_int_start_y); | ||
384 | + writel(venc_cfg->fid_int_offset_y__fid_ext_start_x, | ||
385 | + &venc->fid_int_offset_y__fid_ext_start_x); | ||
386 | + writel(venc_cfg->fid_ext_start_y__fid_ext_offset_y, | ||
387 | + &venc->fid_ext_start_y__fid_ext_offset_y); | ||
388 | + writel(venc_cfg->tvdetgp_int_start_stop_x, | ||
389 | + &venc->tvdetgp_int_start_stop_x); | ||
390 | + writel(venc_cfg->tvdetgp_int_start_stop_y, | ||
391 | + &venc->tvdetgp_int_start_stop_y); | ||
392 | + writel(venc_cfg->gen_ctrl, &venc->gen_ctrl); | ||
393 | + writel(venc_cfg->output_control, &venc->output_control); | ||
394 | + writel(venc_cfg->dac_b__dac_c, &venc->dac_b__dac_c); | ||
395 | + | ||
396 | + /* Configure DSS for VENC Settings */ | ||
397 | + writel(VENC_DSS_CONFIG, &dss->control); | ||
398 | + | ||
399 | + /* Configure height and width for Digital out */ | ||
400 | + writel(((height << DIG_LPP_SHIFT) | width), &dispc->size_dig); | ||
401 | +} | ||
402 | + | ||
403 | +/* | ||
404 | + * Configure Panel Specific Parameters | ||
405 | + */ | ||
406 | +void omap3_dss_panel_config(const struct panel_config *panel_cfg) | ||
407 | +{ | ||
408 | + struct dispc_regs *dispc = (struct dispc_regs *) OMAP3_DISPC_BASE; | ||
409 | + | ||
410 | + writel(panel_cfg->timing_h, &dispc->timing_h); | ||
411 | + writel(panel_cfg->timing_v, &dispc->timing_v); | ||
412 | + writel(panel_cfg->pol_freq, &dispc->pol_freq); | ||
413 | + writel(panel_cfg->divisor, &dispc->divisor); | ||
414 | + writel(panel_cfg->lcd_size, &dispc->size_lcd); | ||
415 | + writel((panel_cfg->load_mode << FRAME_MODE_SHIFT), &dispc->config); | ||
416 | + writel(((panel_cfg->panel_type << TFTSTN_SHIFT) | | ||
417 | + (panel_cfg->data_lines << DATALINES_SHIFT)), &dispc->control); | ||
418 | + writel(panel_cfg->panel_color, &dispc->default_color0); | ||
419 | +} | ||
420 | + | ||
421 | +/* | ||
422 | + * Enable LCD and DIGITAL OUT in DSS | ||
423 | + */ | ||
424 | +void omap3_dss_enable(void) | ||
425 | +{ | ||
426 | + struct dispc_regs *dispc = (struct dispc_regs *) OMAP3_DISPC_BASE; | ||
427 | + u32 l = 0; | ||
428 | + | ||
429 | + l = readl(&dispc->control); | ||
430 | + l |= DISPC_ENABLE; | ||
431 | + writel(l, &dispc->control); | ||
432 | +} | ||
433 | -- | ||
434 | 1.6.6.1 | ||
435 | |||
diff --git a/recipes-bsp/u-boot/u-boot/0008-BeagleBoard-Added-userbutton-command.patch b/recipes-bsp/u-boot/u-boot/0008-BeagleBoard-Added-userbutton-command.patch deleted file mode 100644 index 411bb7b7..00000000 --- a/recipes-bsp/u-boot/u-boot/0008-BeagleBoard-Added-userbutton-command.patch +++ /dev/null | |||
@@ -1,100 +0,0 @@ | |||
1 | From 31110e039b1982590df08c66e53924f454e3e3f1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Kridner <jkridner@beagleboard.org> | ||
3 | Date: Wed, 21 Jul 2010 07:41:25 -0500 | ||
4 | Subject: [PATCH 08/16] BeagleBoard: Added userbutton command | ||
5 | |||
6 | Based on commit f1099c7c43caf5bac3bf6a65aa266fade4747072 | ||
7 | Author: Greg Turner <gregturner@ti.com> | ||
8 | Date: Tue May 25 09:19:06 2010 -0500 | ||
9 | |||
10 | New u-boot command for status of USER button on BeagleBoard-xM | ||
11 | |||
12 | Modified bootcmd to check the staus at boot time and set | ||
13 | filename of the boot script. | ||
14 | |||
15 | * Moved to a BeagleBoard specific file. | ||
16 | * Removed changes to default boot command from adding userbutton | ||
17 | command. | ||
18 | * Made to handle pre-xM boards. | ||
19 | * Flipped polarity of the return value to avoid confusion. Success (0) | ||
20 | is when the button is pressed. Failure (1) is when the button is NOT | ||
21 | pressed. | ||
22 | * Used latest revision getting function. | ||
23 | * Used latest macros for board revision. | ||
24 | --- | ||
25 | board/ti/beagle/beagle.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++ | ||
26 | 1 files changed, 55 insertions(+), 0 deletions(-) | ||
27 | |||
28 | diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c | ||
29 | index 56e7afc..04e4259 100644 | ||
30 | --- a/board/ti/beagle/beagle.c | ||
31 | +++ b/board/ti/beagle/beagle.c | ||
32 | @@ -38,6 +38,7 @@ | ||
33 | #include <asm/arch/gpio.h> | ||
34 | #include <asm/mach-types.h> | ||
35 | #include "beagle.h" | ||
36 | +#include <command.h> | ||
37 | |||
38 | #define TWL4030_I2C_BUS 0 | ||
39 | #define EXPANSION_EEPROM_I2C_BUS 1 | ||
40 | @@ -339,3 +340,57 @@ int board_mmc_init(bd_t *bis) | ||
41 | return 0; | ||
42 | } | ||
43 | #endif | ||
44 | + | ||
45 | +/* | ||
46 | + * This command returns the status of the user button on beagle xM | ||
47 | + * Input - none | ||
48 | + * Returns - 1 if button is held down | ||
49 | + * 0 if button is not held down | ||
50 | + */ | ||
51 | +int do_userbutton (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) | ||
52 | +{ | ||
53 | + int button = 0; | ||
54 | + int gpio; | ||
55 | + | ||
56 | + /* | ||
57 | + * pass address parameter as argv[0] (aka command name), | ||
58 | + * and all remaining args | ||
59 | + */ | ||
60 | + switch (get_board_revision()) { | ||
61 | + case REVISION_AXBX: | ||
62 | + case REVISION_CX: | ||
63 | + case REVISION_C4: | ||
64 | + gpio = 7; | ||
65 | + break; | ||
66 | + case REVISION_XM_A: | ||
67 | + case REVISION_XM_B: | ||
68 | + default: | ||
69 | + gpio = 4; | ||
70 | + break; | ||
71 | + } | ||
72 | + omap_request_gpio(gpio); | ||
73 | + omap_set_gpio_direction(gpio, 1); | ||
74 | + printf("The user button is currently "); | ||
75 | + if(omap_get_gpio_datain(gpio)) | ||
76 | + { | ||
77 | + button = 1; | ||
78 | + printf("PRESSED.\n"); | ||
79 | + } | ||
80 | + else | ||
81 | + { | ||
82 | + button = 0; | ||
83 | + printf("NOT pressed.\n"); | ||
84 | + } | ||
85 | + | ||
86 | + omap_free_gpio(gpio); | ||
87 | + | ||
88 | + return !button; | ||
89 | +} | ||
90 | + | ||
91 | +/* -------------------------------------------------------------------- */ | ||
92 | + | ||
93 | +U_BOOT_CMD( | ||
94 | + userbutton, CONFIG_SYS_MAXARGS, 1, do_userbutton, | ||
95 | + "Return the status of the BeagleBoard USER button", | ||
96 | + "" | ||
97 | +); | ||
98 | -- | ||
99 | 1.6.6.1 | ||
100 | |||
diff --git a/recipes-bsp/u-boot/u-boot/0009-OMAP3-beagle-pass-expansionboard-name-in-bootargs.patch b/recipes-bsp/u-boot/u-boot/0009-OMAP3-beagle-pass-expansionboard-name-in-bootargs.patch deleted file mode 100644 index 7da18afa..00000000 --- a/recipes-bsp/u-boot/u-boot/0009-OMAP3-beagle-pass-expansionboard-name-in-bootargs.patch +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | From ca7179112840cdca717ac0c958a9ab226d1bdf25 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Mon, 22 Nov 2010 11:51:32 +0100 | ||
4 | Subject: [PATCH 09/16] OMAP3: beagle: pass expansionboard name in bootargs | ||
5 | |||
6 | --- | ||
7 | include/configs/omap3_beagle.h | 13 +++++++++++++ | ||
8 | 1 files changed, 13 insertions(+), 0 deletions(-) | ||
9 | |||
10 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
11 | index 51e14d0..9d569a5 100644 | ||
12 | --- a/include/configs/omap3_beagle.h | ||
13 | +++ b/include/configs/omap3_beagle.h | ||
14 | @@ -191,6 +191,7 @@ | ||
15 | "usbtty=cdc_acm\0" \ | ||
16 | "console=ttyS2,115200n8\0" \ | ||
17 | "mpurate=auto\0" \ | ||
18 | + "buddy=none "\ | ||
19 | "vram=12M\0" \ | ||
20 | "dvimode=1024x768MR-16@60\0" \ | ||
21 | "defaultdisplay=dvi\0" \ | ||
22 | @@ -201,6 +202,7 @@ | ||
23 | "nandrootfstype=jffs2\0" \ | ||
24 | "mmcargs=setenv bootargs console=${console} " \ | ||
25 | "mpurate=${mpurate} " \ | ||
26 | + "buddy=${buddy} "\ | ||
27 | "vram=${vram} " \ | ||
28 | "omapfb.mode=dvi:${dvimode} " \ | ||
29 | "omapdss.def_disp=${defaultdisplay} " \ | ||
30 | @@ -208,6 +210,7 @@ | ||
31 | "rootfstype=${mmcrootfstype}\0" \ | ||
32 | "nandargs=setenv bootargs console=${console} " \ | ||
33 | "mpurate=${mpurate} " \ | ||
34 | + "buddy=${buddy} "\ | ||
35 | "vram=${vram} " \ | ||
36 | "omapfb.mode=dvi:${dvimode} " \ | ||
37 | "omapdss.def_disp=${defaultdisplay} " \ | ||
38 | @@ -216,6 +219,16 @@ | ||
39 | "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \ | ||
40 | "importbootenv=echo Importing environment from mmc ...; " \ | ||
41 | "env import -t $loadaddr $filesize\0" \ | ||
42 | + "ramargs=setenv bootargs console=${console} " \ | ||
43 | + "${optargs} " \ | ||
44 | + "mpurate=${mpurate} " \ | ||
45 | + "buddy=${buddy} "\ | ||
46 | + "vram=${vram} " \ | ||
47 | + "omapfb.mode=dvi:${dvimode} " \ | ||
48 | + "omapdss.def_disp=${defaultdisplay} " \ | ||
49 | + "root=${ramroot} " \ | ||
50 | + "rootfstype=${ramrootfstype}\0" \ | ||
51 | + "loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ | ||
52 | "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ | ||
53 | "mmcboot=echo Booting from mmc ...; " \ | ||
54 | "run mmcargs; " \ | ||
55 | -- | ||
56 | 1.6.6.1 | ||
57 | |||
diff --git a/recipes-bsp/u-boot/u-boot/0010-Enable-DSS-driver-for-Beagle.patch b/recipes-bsp/u-boot/u-boot/0010-Enable-DSS-driver-for-Beagle.patch deleted file mode 100644 index 8766d89b..00000000 --- a/recipes-bsp/u-boot/u-boot/0010-Enable-DSS-driver-for-Beagle.patch +++ /dev/null | |||
@@ -1,107 +0,0 @@ | |||
1 | From 2226921518eebb215ddadce09efb35b99a9db8ac Mon Sep 17 00:00:00 2001 | ||
2 | From: Syed Mohammed Khasim <khasim@ti.com> | ||
3 | Date: Sun, 11 Apr 2010 17:44:39 +0200 | ||
4 | Subject: [PATCH 10/16] Enable DSS driver for Beagle | ||
5 | |||
6 | Configures DSS to display color bar on Svideo | ||
7 | Configures DSS to display background color on DVID | ||
8 | |||
9 | Signed-off-by: Syed Mohammed Khasim <khasim@ti.com> | ||
10 | --- | ||
11 | board/ti/beagle/beagle.c | 1 + | ||
12 | board/ti/beagle/beagle.h | 60 ++++++++++++++++++++++++++++++++++++++++++++++ | ||
13 | 2 files changed, 61 insertions(+), 0 deletions(-) | ||
14 | |||
15 | diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c | ||
16 | index 04e4259..7c80a97 100644 | ||
17 | --- a/board/ti/beagle/beagle.c | ||
18 | +++ b/board/ti/beagle/beagle.c | ||
19 | @@ -318,6 +318,7 @@ int misc_init_r(void) | ||
20 | GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe); | ||
21 | |||
22 | dieid_num_r(); | ||
23 | + omap3_dss_enable(); | ||
24 | |||
25 | return 0; | ||
26 | } | ||
27 | diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h | ||
28 | index 48228dc..bdf2a6f 100644 | ||
29 | --- a/board/ti/beagle/beagle.h | ||
30 | +++ b/board/ti/beagle/beagle.h | ||
31 | @@ -23,6 +23,8 @@ | ||
32 | #ifndef _BEAGLE_H_ | ||
33 | #define _BEAGLE_H_ | ||
34 | |||
35 | +#include <asm/arch/dss.h> | ||
36 | + | ||
37 | const omap3_sysinfo sysinfo = { | ||
38 | DDR_STACKED, | ||
39 | "OMAP3 Beagle board", | ||
40 | @@ -471,6 +473,64 @@ const omap3_sysinfo sysinfo = { | ||
41 | MUX_VAL(CP(MMC2_DAT7), (IDIS | PTU | EN | M4)) /*GPIO_139 WLAN_EN*/ | ||
42 | |||
43 | /* | ||
44 | + * Display Configuration | ||
45 | + */ | ||
46 | + | ||
47 | +#define DVI_BEAGLE_ORANGE_COL 0x00FF8000 | ||
48 | +#define VENC_HEIGHT 0x00ef | ||
49 | +#define VENC_WIDTH 0x027f | ||
50 | + | ||
51 | +/* | ||
52 | + * Configure VENC in DSS for Beagle to generate Color Bar | ||
53 | + * | ||
54 | + * Kindly refer to OMAP TRM for definition of these values. | ||
55 | + */ | ||
56 | +static const struct venc_regs venc_config_std_tv = { | ||
57 | + .status = 0x0000001B, | ||
58 | + .f_control = 0x00000040, | ||
59 | + .vidout_ctrl = 0x00000000, | ||
60 | + .sync_ctrl = 0x00008000, | ||
61 | + .llen = 0x00008359, | ||
62 | + .flens = 0x0000020C, | ||
63 | + .hfltr_ctrl = 0x00000000, | ||
64 | + .cc_carr_wss_carr = 0x043F2631, | ||
65 | + .c_phase = 0x00000024, | ||
66 | + .gain_u = 0x00000130, | ||
67 | + .gain_v = 0x00000198, | ||
68 | + .gain_y = 0x000001C0, | ||
69 | + .black_level = 0x0000006A, | ||
70 | + .blank_level = 0x0000005C, | ||
71 | + .x_color = 0x00000000, | ||
72 | + .m_control = 0x00000001, | ||
73 | + .bstamp_wss_data = 0x0000003F, | ||
74 | + .s_carr = 0x21F07C1F, | ||
75 | + .line21 = 0x00000000, | ||
76 | + .ln_sel = 0x00000015, | ||
77 | + .l21__wc_ctl = 0x00001400, | ||
78 | + .htrigger_vtrigger = 0x00000000, | ||
79 | + .savid__eavid = 0x069300F4, | ||
80 | + .flen__fal = 0x0016020C, | ||
81 | + .lal__phase_reset = 0x00060107, | ||
82 | + .hs_int_start_stop_x = 0x008D034E, | ||
83 | + .hs_ext_start_stop_x = 0x000F0359, | ||
84 | + .vs_int_start_x = 0x01A00000, | ||
85 | + .vs_int_stop_x__vs_int_start_y = 0x020501A0, | ||
86 | + .vs_int_stop_y__vs_ext_start_x = 0x01AC0024, | ||
87 | + .vs_ext_stop_x__vs_ext_start_y = 0x020D01AC, | ||
88 | + .vs_ext_stop_y = 0x00000006, | ||
89 | + .avid_start_stop_x = 0x03480079, | ||
90 | + .avid_start_stop_y = 0x02040024, | ||
91 | + .fid_int_start_x__fid_int_start_y = 0x0001008A, | ||
92 | + .fid_int_offset_y__fid_ext_start_x = 0x01AC0106, | ||
93 | + .fid_ext_start_y__fid_ext_offset_y = 0x01060006, | ||
94 | + .tvdetgp_int_start_stop_x = 0x00140001, | ||
95 | + .tvdetgp_int_start_stop_y = 0x00010001, | ||
96 | + .gen_ctrl = 0x00FF0000, | ||
97 | + .output_control = 0x0000000D, | ||
98 | + .dac_b__dac_c = 0x00000000 | ||
99 | +}; | ||
100 | + | ||
101 | +/* | ||
102 | * Configure Timings for DVI D | ||
103 | */ | ||
104 | static const struct panel_config dvid_cfg = { | ||
105 | -- | ||
106 | 1.6.6.1 | ||
107 | |||
diff --git a/recipes-bsp/u-boot/u-boot/0011-Add-led-command.patch b/recipes-bsp/u-boot/u-boot/0011-Add-led-command.patch deleted file mode 100644 index e51ee5e2..00000000 --- a/recipes-bsp/u-boot/u-boot/0011-Add-led-command.patch +++ /dev/null | |||
@@ -1,213 +0,0 @@ | |||
1 | From e3e94bd49df4b4588cc5c95392b872eadb531fc4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Kridner <jkridner@beagleboard.org> | ||
3 | Date: Thu, 20 May 2010 05:41:26 -0500 | ||
4 | Subject: [PATCH 11/16] Add 'led' command | ||
5 | |||
6 | This patch allows any board implementing the coloured LED API | ||
7 | to control the LEDs from the console. | ||
8 | |||
9 | led [green | yellow | red | all ] [ on | off ] | ||
10 | |||
11 | or | ||
12 | |||
13 | led [ 1 | 2 | 3 | all ] [ on | off ] | ||
14 | |||
15 | Adds configuration item CONFIG_CMD_LED enabling the command. | ||
16 | |||
17 | Partially based on patch from Ulf Samuelsson: | ||
18 | http://www.mail-archive.com/u-boot@lists.denx.de/msg09593.html. | ||
19 | |||
20 | Updated based on feedback: | ||
21 | http://www.mail-archive.com/u-boot@lists.denx.de/msg41847.html | ||
22 | https://groups.google.com/d/topic/beagleboard/8Wf1HiK_QBo/discussion | ||
23 | * Fixed a handful of style issues. | ||
24 | * Significantly reduced the number of #ifdefs and redundant code | ||
25 | * Converted redundant code into loops test against a structure | ||
26 | * Made use of cmd_usage() | ||
27 | * Introduced a str_onoff() function, but haven't yet put it in common | ||
28 | * Eliminated trailing newline | ||
29 | |||
30 | v2 updates | ||
31 | * Test every LED in case "all" is used. Previously, the code broke from | ||
32 | the loop after setting the state of only one LED. | ||
33 | * Corrected swapped on/off in structure definition | ||
34 | * Removed trailing white space | ||
35 | --- | ||
36 | common/Makefile | 1 + | ||
37 | common/cmd_led.c | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
38 | 2 files changed, 153 insertions(+), 0 deletions(-) | ||
39 | create mode 100644 common/cmd_led.c | ||
40 | |||
41 | diff --git a/common/Makefile b/common/Makefile | ||
42 | index 048df0c..29a0ead 100644 | ||
43 | --- a/common/Makefile | ||
44 | +++ b/common/Makefile | ||
45 | @@ -105,6 +105,7 @@ COBJS-$(CONFIG_CMD_IRQ) += cmd_irq.o | ||
46 | COBJS-$(CONFIG_CMD_ITEST) += cmd_itest.o | ||
47 | COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o | ||
48 | COBJS-$(CONFIG_CMD_CRAMFS) += cmd_cramfs.o | ||
49 | +COBJS-$(CONFIG_CMD_LED) += cmd_led.o | ||
50 | COBJS-$(CONFIG_CMD_LICENSE) += cmd_license.o | ||
51 | COBJS-y += cmd_load.o | ||
52 | COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o | ||
53 | diff --git a/common/cmd_led.c b/common/cmd_led.c | ||
54 | new file mode 100644 | ||
55 | index 0000000..7f02fe6 | ||
56 | --- /dev/null | ||
57 | +++ b/common/cmd_led.c | ||
58 | @@ -0,0 +1,152 @@ | ||
59 | +/* | ||
60 | + * (C) Copyright 2010 | ||
61 | + * Jason Kridner <jkridner@beagleboard.org> | ||
62 | + * | ||
63 | + * Based on cmd_led.c patch from: | ||
64 | + * http://www.mail-archive.com/u-boot@lists.denx.de/msg06873.html | ||
65 | + * (C) Copyright 2008 | ||
66 | + * Ulf Samuelsson <ulf.samuelsson@atmel.com> | ||
67 | + * | ||
68 | + * See file CREDITS for list of people who contributed to this | ||
69 | + * project. | ||
70 | + * | ||
71 | + * This program is free software; you can redistribute it and/or | ||
72 | + * modify it under the terms of the GNU General Public License as | ||
73 | + * published by the Free Software Foundation; either version 2 of | ||
74 | + * the License, or (at your option) any later version. | ||
75 | + * | ||
76 | + * This program is distributed in the hope that it will be useful, | ||
77 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
78 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
79 | + * GNU General Public License for more details. | ||
80 | + * | ||
81 | + * You should have received a copy of the GNU General Public License | ||
82 | + * along with this program; if not, write to the Free Software | ||
83 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
84 | + * MA 02111-1307 USA | ||
85 | + */ | ||
86 | + | ||
87 | +#include <common.h> | ||
88 | +#include <config.h> | ||
89 | +#include <command.h> | ||
90 | +#include <status_led.h> | ||
91 | + | ||
92 | +struct led_tbl_s { | ||
93 | + char *string; /* String for use in the command */ | ||
94 | + led_id_t mask; /* Mask used for calling __led_set() */ | ||
95 | + void (*off)(void); /* Optional fucntion for turning LED off */ | ||
96 | + void (*on)(void); /* Optional fucntion for turning LED on */ | ||
97 | +}; | ||
98 | + | ||
99 | +typedef struct led_tbl_s led_tbl_t; | ||
100 | + | ||
101 | +static const led_tbl_t led_commands[] = { | ||
102 | +#ifdef CONFIG_BOARD_SPECIFIC_LED | ||
103 | +#ifdef STATUS_LED_BIT | ||
104 | + { "0", STATUS_LED_BIT, NULL, NULL }, | ||
105 | +#endif | ||
106 | +#ifdef STATUS_LED_BIT1 | ||
107 | + { "1", STATUS_LED_BIT1, NULL, NULL }, | ||
108 | +#endif | ||
109 | +#ifdef STATUS_LED_BIT2 | ||
110 | + { "2", STATUS_LED_BIT2, NULL, NULL }, | ||
111 | +#endif | ||
112 | +#ifdef STATUS_LED_BIT3 | ||
113 | + { "3", STATUS_LED_BIT3, NULL, NULL }, | ||
114 | +#endif | ||
115 | +#endif | ||
116 | +#ifdef STATUS_LED_GREEN | ||
117 | + { "green", STATUS_LED_GREEN, green_LED_off, green_LED_on }, | ||
118 | +#endif | ||
119 | +#ifdef STATUS_LED_YELLOW | ||
120 | + { "yellow", STATUS_LED_YELLOW, yellow_LED_off, yellow_LED_on }, | ||
121 | +#endif | ||
122 | +#ifdef STATUS_LED_RED | ||
123 | + { "red", STATUS_LED_RED, red_LED_off, red_LED_on }, | ||
124 | +#endif | ||
125 | +#ifdef STATUS_LED_BLUE | ||
126 | + { "blue", STATUS_LED_BLUE, blue_LED_off, blue_LED_on }, | ||
127 | +#endif | ||
128 | + { NULL, 0, NULL, NULL } | ||
129 | +}; | ||
130 | + | ||
131 | +int str_onoff (char *var) | ||
132 | +{ | ||
133 | + if (strcmp(var, "off") == 0) { | ||
134 | + return 0; | ||
135 | + } | ||
136 | + if (strcmp(var, "on") == 0) { | ||
137 | + return 1; | ||
138 | + } | ||
139 | + return -1; | ||
140 | +} | ||
141 | + | ||
142 | +int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) | ||
143 | +{ | ||
144 | + int state, i; | ||
145 | + | ||
146 | + /* Validate arguments */ | ||
147 | + if ((argc != 3)) { | ||
148 | + return cmd_usage(cmdtp); | ||
149 | + } | ||
150 | + | ||
151 | + state = str_onoff(argv[2]); | ||
152 | + if (state < 0) { | ||
153 | + return cmd_usage(cmdtp); | ||
154 | + } | ||
155 | + | ||
156 | + for (i = 0; led_commands[i].string; i++) { | ||
157 | + if ((strcmp("all", argv[1]) == 0) || | ||
158 | + (strcmp(led_commands[i].string, argv[1]) == 0)) { | ||
159 | + if (led_commands[i].on) { | ||
160 | + if (state) { | ||
161 | + led_commands[i].on(); | ||
162 | + } else { | ||
163 | + led_commands[i].off(); | ||
164 | + } | ||
165 | + } else { | ||
166 | + __led_set(led_commands[i].mask, state); | ||
167 | + } | ||
168 | + } | ||
169 | + } | ||
170 | + | ||
171 | + /* If we ran out of matches, print Usage */ | ||
172 | + if (!led_commands[i].string && !(strcmp("all", argv[1]) == 0)) { | ||
173 | + return cmd_usage(cmdtp); | ||
174 | + } | ||
175 | + | ||
176 | + return 0; | ||
177 | +} | ||
178 | + | ||
179 | +U_BOOT_CMD( | ||
180 | + led, 3, 1, do_led, | ||
181 | + "led\t- [" | ||
182 | +#ifdef CONFIG_BOARD_SPECIFIC_LED | ||
183 | +#ifdef STATUS_LED_BIT | ||
184 | + "0|" | ||
185 | +#endif | ||
186 | +#ifdef STATUS_LED_BIT1 | ||
187 | + "1|" | ||
188 | +#endif | ||
189 | +#ifdef STATUS_LED_BIT2 | ||
190 | + "2|" | ||
191 | +#endif | ||
192 | +#ifdef STATUS_LED_BIT3 | ||
193 | + "3|" | ||
194 | +#endif | ||
195 | +#endif | ||
196 | +#ifdef STATUS_LED_GREEN | ||
197 | + "green|" | ||
198 | +#endif | ||
199 | +#ifdef STATUS_LED_YELLOW | ||
200 | + "yellow|" | ||
201 | +#endif | ||
202 | +#ifdef STATUS_LED_RED | ||
203 | + "red|" | ||
204 | +#endif | ||
205 | +#ifdef STATUS_LED_BLUE | ||
206 | + "blue|" | ||
207 | +#endif | ||
208 | + "all] [on|off]\n", | ||
209 | + "led [led_name] [on|off] sets or clears led(s)\n" | ||
210 | +); | ||
211 | -- | ||
212 | 1.6.6.1 | ||
213 | |||
diff --git a/recipes-bsp/u-boot/u-boot/0012-BeagleBoard-Added-LED-driver.patch b/recipes-bsp/u-boot/u-boot/0012-BeagleBoard-Added-LED-driver.patch deleted file mode 100644 index 01897aff..00000000 --- a/recipes-bsp/u-boot/u-boot/0012-BeagleBoard-Added-LED-driver.patch +++ /dev/null | |||
@@ -1,160 +0,0 @@ | |||
1 | From 35271d72072841c16687ffd51f08ec65cdac3b3e Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Kridner <jkridner@beagleboard.org> | ||
3 | Date: Thu, 20 May 2010 06:14:01 -0500 | ||
4 | Subject: [PATCH 12/16] BeagleBoard: Added LED driver | ||
5 | |||
6 | Added LED driver using status_led. USR0 is set to monitor the boot | ||
7 | status. USR1 is set to be the green LED. | ||
8 | |||
9 | Included adding configuration and command to the default configuration. | ||
10 | |||
11 | v2 updates | ||
12 | * Fixed USR0/USR1 to be LED 0/1 respectively | ||
13 | --- | ||
14 | board/ti/beagle/Makefile | 4 ++- | ||
15 | board/ti/beagle/beagle.c | 7 ++++ | ||
16 | board/ti/beagle/led.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++ | ||
17 | 3 files changed, 101 insertions(+), 1 deletions(-) | ||
18 | create mode 100644 board/ti/beagle/led.c | ||
19 | |||
20 | diff --git a/board/ti/beagle/Makefile b/board/ti/beagle/Makefile | ||
21 | index 3b4aaac..d9f445f 100644 | ||
22 | --- a/board/ti/beagle/Makefile | ||
23 | +++ b/board/ti/beagle/Makefile | ||
24 | @@ -25,8 +25,10 @@ include $(TOPDIR)/config.mk | ||
25 | |||
26 | LIB = $(obj)lib$(BOARD).o | ||
27 | |||
28 | -COBJS := beagle.o | ||
29 | +COBJS-y := $(BOARD).o | ||
30 | +COBJS-$(CONFIG_STATUS_LED) += led.o | ||
31 | |||
32 | +COBJS := $(sort $(COBJS-y)) | ||
33 | SRCS := $(COBJS:.o=.c) | ||
34 | OBJS := $(addprefix $(obj),$(COBJS)) | ||
35 | |||
36 | diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c | ||
37 | index 7c80a97..905b151 100644 | ||
38 | --- a/board/ti/beagle/beagle.c | ||
39 | +++ b/board/ti/beagle/beagle.c | ||
40 | @@ -30,6 +30,9 @@ | ||
41 | * MA 02111-1307 USA | ||
42 | */ | ||
43 | #include <common.h> | ||
44 | +#ifdef CONFIG_STATUS_LED | ||
45 | +#include <status_led.h> | ||
46 | +#endif | ||
47 | #include <twl4030.h> | ||
48 | #include <asm/io.h> | ||
49 | #include <asm/arch/mmc_host_def.h> | ||
50 | @@ -80,6 +83,10 @@ int board_init(void) | ||
51 | /* boot param addr */ | ||
52 | gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100); | ||
53 | |||
54 | +#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT) | ||
55 | + status_led_set (STATUS_LED_BOOT, STATUS_LED_ON); | ||
56 | +#endif | ||
57 | + | ||
58 | return 0; | ||
59 | } | ||
60 | |||
61 | diff --git a/board/ti/beagle/led.c b/board/ti/beagle/led.c | ||
62 | new file mode 100644 | ||
63 | index 0000000..fe80e19 | ||
64 | --- /dev/null | ||
65 | +++ b/board/ti/beagle/led.c | ||
66 | @@ -0,0 +1,91 @@ | ||
67 | +/* | ||
68 | + * Copyright (c) 2010 Texas Instruments, Inc. | ||
69 | + * Jason Kridner <jkridner@beagleboard.org> | ||
70 | + * | ||
71 | + * This program is free software; you can redistribute it and/or | ||
72 | + * modify it under the terms of the GNU General Public License as | ||
73 | + * published by the Free Software Foundation; either version 2 of | ||
74 | + * the License, or (at your option) any later version. | ||
75 | + * | ||
76 | + * This program is distributed in the hope that it will be useful, | ||
77 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
78 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
79 | + * GNU General Public License for more details. | ||
80 | + * | ||
81 | + * You should have received a copy of the GNU General Public License | ||
82 | + * along with this program; if not, write to the Free Software | ||
83 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
84 | + * MA 02111-1307 USA | ||
85 | + */ | ||
86 | +#include <common.h> | ||
87 | +#include <status_led.h> | ||
88 | +#include <asm/arch/cpu.h> | ||
89 | +#include <asm/io.h> | ||
90 | +#include <asm/arch/sys_proto.h> | ||
91 | +#include <asm/arch/gpio.h> | ||
92 | + | ||
93 | +static unsigned int saved_state[2] = {STATUS_LED_OFF, STATUS_LED_OFF}; | ||
94 | + | ||
95 | +/* GPIO pins for the LEDs */ | ||
96 | +#define BEAGLE_LED_USR0 150 | ||
97 | +#define BEAGLE_LED_USR1 149 | ||
98 | + | ||
99 | +#ifdef STATUS_LED_GREEN | ||
100 | +void green_LED_off (void) | ||
101 | +{ | ||
102 | + __led_set (STATUS_LED_GREEN, 0); | ||
103 | +} | ||
104 | + | ||
105 | +void green_LED_on (void) | ||
106 | +{ | ||
107 | + __led_set (STATUS_LED_GREEN, 1); | ||
108 | +} | ||
109 | +#endif | ||
110 | + | ||
111 | +void __led_init (led_id_t mask, int state) | ||
112 | +{ | ||
113 | + __led_set (mask, state); | ||
114 | +} | ||
115 | + | ||
116 | +void __led_toggle (led_id_t mask) | ||
117 | +{ | ||
118 | +#ifdef STATUS_LED_BIT | ||
119 | + if (STATUS_LED_BIT & mask) { | ||
120 | + if (STATUS_LED_ON == saved_state[0]) | ||
121 | + __led_set(STATUS_LED_BIT, 0); | ||
122 | + else | ||
123 | + __led_set(STATUS_LED_BIT, 1); | ||
124 | + } | ||
125 | +#endif | ||
126 | +#ifdef STATUS_LED_BIT1 | ||
127 | + if (STATUS_LED_BIT1 & mask) { | ||
128 | + if (STATUS_LED_ON == saved_state[1]) | ||
129 | + __led_set(STATUS_LED_BIT1, 0); | ||
130 | + else | ||
131 | + __led_set(STATUS_LED_BIT1, 1); | ||
132 | + } | ||
133 | +#endif | ||
134 | +} | ||
135 | + | ||
136 | +void __led_set (led_id_t mask, int state) | ||
137 | +{ | ||
138 | +#ifdef STATUS_LED_BIT | ||
139 | + if (STATUS_LED_BIT & mask) { | ||
140 | + if (!omap_request_gpio(BEAGLE_LED_USR0)) { | ||
141 | + omap_set_gpio_direction(BEAGLE_LED_USR0, 0); | ||
142 | + omap_set_gpio_dataout(BEAGLE_LED_USR0, state); | ||
143 | + } | ||
144 | + saved_state[0] = state; | ||
145 | + } | ||
146 | +#endif | ||
147 | +#ifdef STATUS_LED_BIT1 | ||
148 | + if (STATUS_LED_BIT1 & mask) { | ||
149 | + if (!omap_request_gpio(BEAGLE_LED_USR1)) { | ||
150 | + omap_set_gpio_direction(BEAGLE_LED_USR1, 0); | ||
151 | + omap_set_gpio_dataout(BEAGLE_LED_USR1, state); | ||
152 | + } | ||
153 | + saved_state[1] = state; | ||
154 | + } | ||
155 | +#endif | ||
156 | +} | ||
157 | + | ||
158 | -- | ||
159 | 1.6.6.1 | ||
160 | |||
diff --git a/recipes-bsp/u-boot/u-boot/0013-OMAP3-BeagleBoard-updated-default-configuration.patch b/recipes-bsp/u-boot/u-boot/0013-OMAP3-BeagleBoard-updated-default-configuration.patch deleted file mode 100644 index 9c9a3fd4..00000000 --- a/recipes-bsp/u-boot/u-boot/0013-OMAP3-BeagleBoard-updated-default-configuration.patch +++ /dev/null | |||
@@ -1,184 +0,0 @@ | |||
1 | From da8fa305fd10331958cd18c9c27c9e062b886fc4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Kridner <jkridner@beagleboard.org> | ||
3 | Date: Wed, 21 Jul 2010 07:41:25 -0500 | ||
4 | Subject: [PATCH 13/16] OMAP3: BeagleBoard: updated default configuration | ||
5 | |||
6 | * Decrease bootdelay to 3, use VGA for default resolution | ||
7 | * Add CONFIG_SYS_MEMTEST_SCRATCH to point to a scratch memory area. | ||
8 | * Add camera to default bootargs | ||
9 | * Move ramdisk parameters. This will make it easier to reprogram the ramdisk size. | ||
10 | * Improved boot env var setting | ||
11 | * Enabled evaluation of expressions with 'setexpr' | ||
12 | * Made room for a 64MB ramdisk by moving from 0x81600000 to 0x81000000 | ||
13 | * Removed expression from 'ramroot' that wouldn't be evaluated | ||
14 | * Doubled console I/O buffer size from 256 to 512 | ||
15 | * Doubled maximum command arguments size from 16 to 32 | ||
16 | * Enable multibus support for I2C | ||
17 | * Added USER button switch from uEnv.txt to user.txt | ||
18 | * Enable LEDs | ||
19 | Added LED driver using status_led. USR0 is set to monitor | ||
20 | the boot status. USR1 is set to be the GREEN LED. | ||
21 | --- | ||
22 | include/configs/omap3_beagle.h | 62 ++++++++++++++++++++++++++++++++------- | ||
23 | 1 files changed, 51 insertions(+), 11 deletions(-) | ||
24 | |||
25 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
26 | index 9d569a5..73d4d4e 100644 | ||
27 | --- a/include/configs/omap3_beagle.h | ||
28 | +++ b/include/configs/omap3_beagle.h | ||
29 | @@ -108,9 +108,27 @@ | ||
30 | #define CONFIG_OMAP_HSMMC 1 | ||
31 | #define CONFIG_DOS_PARTITION 1 | ||
32 | |||
33 | +/* Status LED */ | ||
34 | +#define CONFIG_STATUS_LED 1 | ||
35 | +#define CONFIG_BOARD_SPECIFIC_LED 1 | ||
36 | +#define STATUS_LED_BIT 0x01 | ||
37 | +#define STATUS_LED_STATE STATUS_LED_ON | ||
38 | +#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2) | ||
39 | +#define STATUS_LED_BIT1 0x02 | ||
40 | +#define STATUS_LED_STATE1 STATUS_LED_ON | ||
41 | +#define STATUS_LED_PERIOD1 (CONFIG_SYS_HZ / 2) | ||
42 | +#define STATUS_LED_BOOT STATUS_LED_BIT | ||
43 | +#define STATUS_LED_GREEN STATUS_LED_BIT1 | ||
44 | + | ||
45 | /* DDR - I use Micron DDR */ | ||
46 | #define CONFIG_OMAP3_MICRON_DDR 1 | ||
47 | |||
48 | +/* Enable Multi Bus support for I2C */ | ||
49 | +#define CONFIG_I2C_MULTI_BUS 1 | ||
50 | + | ||
51 | +/* Probe all devices */ | ||
52 | +#define CONFIG_SYS_I2C_NOPROBES {0x0, 0x0} | ||
53 | + | ||
54 | /* USB */ | ||
55 | #define CONFIG_MUSB_UDC 1 | ||
56 | #define CONFIG_USB_OMAP3 1 | ||
57 | @@ -138,6 +156,9 @@ | ||
58 | #define CONFIG_CMD_I2C /* I2C serial bus support */ | ||
59 | #define CONFIG_CMD_MMC /* MMC support */ | ||
60 | #define CONFIG_CMD_NAND /* NAND support */ | ||
61 | +#define CONFIG_CMD_LED /* LED support */ | ||
62 | +#define CONFIG_VIDEO_OMAP3 /* DSS Support */ | ||
63 | +#define CONFIG_CMD_SETEXPR /* Evaluate expressions */ | ||
64 | |||
65 | #undef CONFIG_CMD_FLASH /* flinfo, erase, protect */ | ||
66 | #undef CONFIG_CMD_FPGA /* FPGA configuration Support */ | ||
67 | @@ -184,45 +205,56 @@ | ||
68 | /* partition */ | ||
69 | |||
70 | /* Environment information */ | ||
71 | -#define CONFIG_BOOTDELAY 10 | ||
72 | +#define CONFIG_BOOTDELAY 3 | ||
73 | |||
74 | #define CONFIG_EXTRA_ENV_SETTINGS \ | ||
75 | - "loadaddr=0x82000000\0" \ | ||
76 | + "loadaddr=0x80200000\0" \ | ||
77 | + "rdaddr=0x81000000\0" \ | ||
78 | "usbtty=cdc_acm\0" \ | ||
79 | "console=ttyS2,115200n8\0" \ | ||
80 | "mpurate=auto\0" \ | ||
81 | "buddy=none "\ | ||
82 | + "optargs=\0" \ | ||
83 | + "camera=lbcm3m1\0" \ | ||
84 | "vram=12M\0" \ | ||
85 | - "dvimode=1024x768MR-16@60\0" \ | ||
86 | + "dvimode=640x480MR-16@60\0" \ | ||
87 | "defaultdisplay=dvi\0" \ | ||
88 | "mmcdev=0\0" \ | ||
89 | "mmcroot=/dev/mmcblk0p2 rw\0" \ | ||
90 | "mmcrootfstype=ext3 rootwait\0" \ | ||
91 | "nandroot=/dev/mtdblock4 rw\0" \ | ||
92 | "nandrootfstype=jffs2\0" \ | ||
93 | + "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=0x81000000,64M\0" \ | ||
94 | + "ramrootfstype=ext2\0" \ | ||
95 | "mmcargs=setenv bootargs console=${console} " \ | ||
96 | + "${optargs} " \ | ||
97 | "mpurate=${mpurate} " \ | ||
98 | "buddy=${buddy} "\ | ||
99 | + "camera=${camera} "\ | ||
100 | "vram=${vram} " \ | ||
101 | "omapfb.mode=dvi:${dvimode} " \ | ||
102 | "omapdss.def_disp=${defaultdisplay} " \ | ||
103 | "root=${mmcroot} " \ | ||
104 | "rootfstype=${mmcrootfstype}\0" \ | ||
105 | "nandargs=setenv bootargs console=${console} " \ | ||
106 | + "${optargs} " \ | ||
107 | "mpurate=${mpurate} " \ | ||
108 | "buddy=${buddy} "\ | ||
109 | + "camera=${camera} "\ | ||
110 | "vram=${vram} " \ | ||
111 | "omapfb.mode=dvi:${dvimode} " \ | ||
112 | "omapdss.def_disp=${defaultdisplay} " \ | ||
113 | "root=${nandroot} " \ | ||
114 | "rootfstype=${nandrootfstype}\0" \ | ||
115 | - "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \ | ||
116 | + "bootenv=uEnv.txt\0" \ | ||
117 | + "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ | ||
118 | "importbootenv=echo Importing environment from mmc ...; " \ | ||
119 | "env import -t $loadaddr $filesize\0" \ | ||
120 | "ramargs=setenv bootargs console=${console} " \ | ||
121 | "${optargs} " \ | ||
122 | "mpurate=${mpurate} " \ | ||
123 | "buddy=${buddy} "\ | ||
124 | + "camera=${camera} "\ | ||
125 | "vram=${vram} " \ | ||
126 | "omapfb.mode=dvi:${dvimode} " \ | ||
127 | "omapdss.def_disp=${defaultdisplay} " \ | ||
128 | @@ -237,11 +269,18 @@ | ||
129 | "run nandargs; " \ | ||
130 | "nand read ${loadaddr} 280000 400000; " \ | ||
131 | "bootm ${loadaddr}\0" \ | ||
132 | + "ramboot=echo Booting from ramdisk ...; " \ | ||
133 | + "run ramargs; " \ | ||
134 | + "bootm ${loadaddr}\0" \ | ||
135 | |||
136 | #define CONFIG_BOOTCOMMAND \ | ||
137 | "if mmc rescan ${mmcdev}; then " \ | ||
138 | + "if userbutton; then " \ | ||
139 | + "setenv bootenv user.txt;" \ | ||
140 | + "fi;" \ | ||
141 | "echo SD/MMC found on device ${mmcdev};" \ | ||
142 | "if run loadbootenv; then " \ | ||
143 | + "echo Loaded environment from ${bootenv};" \ | ||
144 | "run importbootenv;" \ | ||
145 | "fi;" \ | ||
146 | "if test -n $uenvcmd; then " \ | ||
147 | @@ -252,7 +291,7 @@ | ||
148 | "run mmcboot;" \ | ||
149 | "fi;" \ | ||
150 | "fi;" \ | ||
151 | - "run nandboot;" \ | ||
152 | + "run nandboot;" | ||
153 | |||
154 | #define CONFIG_AUTO_COMPLETE 1 | ||
155 | /* | ||
156 | @@ -262,18 +301,19 @@ | ||
157 | #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ | ||
158 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " | ||
159 | #define CONFIG_SYS_PROMPT "OMAP3 beagleboard.org # " | ||
160 | -#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ | ||
161 | +#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ | ||
162 | /* Print Buffer Size */ | ||
163 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ | ||
164 | sizeof(CONFIG_SYS_PROMPT) + 16) | ||
165 | -#define CONFIG_SYS_MAXARGS 16 /* max number of command args */ | ||
166 | +#define CONFIG_SYS_MAXARGS 32 /* max number of command args */ | ||
167 | /* Boot Argument Buffer Size */ | ||
168 | #define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE) | ||
169 | |||
170 | -#define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0) /* memtest */ | ||
171 | - /* works on */ | ||
172 | -#define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \ | ||
173 | - 0x01F00000) /* 31MB */ | ||
174 | +#define CONFIG_SYS_ALT_MEMTEST 1 | ||
175 | +#define CONFIG_SYS_MEMTEST_START (0x82000000) /* memtest */ | ||
176 | + /* defaults */ | ||
177 | +#define CONFIG_SYS_MEMTEST_END (0x87FFFFFF) /* 128MB */ | ||
178 | +#define CONFIG_SYS_MEMTEST_SCRATCH (0x81000000) /* dummy address */ | ||
179 | |||
180 | #define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0) /* default */ | ||
181 | /* load address */ | ||
182 | -- | ||
183 | 1.6.6.1 | ||
184 | |||
diff --git a/recipes-bsp/u-boot/u-boot/0014-Corrected-LED-name-match-finding-avoiding-extraneous.patch b/recipes-bsp/u-boot/u-boot/0014-Corrected-LED-name-match-finding-avoiding-extraneous.patch deleted file mode 100644 index e01092af..00000000 --- a/recipes-bsp/u-boot/u-boot/0014-Corrected-LED-name-match-finding-avoiding-extraneous.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | From abc09e8f0b8e02dbfec8bb3c2e024ef9f1bdf4f0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Kridner <jkridner@beagleboard.org> | ||
3 | Date: Tue, 8 Mar 2011 20:42:01 -0600 | ||
4 | Subject: [PATCH 14/16] Corrected LED name match finding avoiding extraneous Usage printouts | ||
5 | |||
6 | --- | ||
7 | common/cmd_led.c | 5 +++-- | ||
8 | 1 files changed, 3 insertions(+), 2 deletions(-) | ||
9 | |||
10 | diff --git a/common/cmd_led.c b/common/cmd_led.c | ||
11 | index 7f02fe6..ca2227f 100644 | ||
12 | --- a/common/cmd_led.c | ||
13 | +++ b/common/cmd_led.c | ||
14 | @@ -83,7 +83,7 @@ int str_onoff (char *var) | ||
15 | |||
16 | int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) | ||
17 | { | ||
18 | - int state, i; | ||
19 | + int state, i, match = 0; | ||
20 | |||
21 | /* Validate arguments */ | ||
22 | if ((argc != 3)) { | ||
23 | @@ -98,6 +98,7 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) | ||
24 | for (i = 0; led_commands[i].string; i++) { | ||
25 | if ((strcmp("all", argv[1]) == 0) || | ||
26 | (strcmp(led_commands[i].string, argv[1]) == 0)) { | ||
27 | + match = 1; | ||
28 | if (led_commands[i].on) { | ||
29 | if (state) { | ||
30 | led_commands[i].on(); | ||
31 | @@ -111,7 +112,7 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) | ||
32 | } | ||
33 | |||
34 | /* If we ran out of matches, print Usage */ | ||
35 | - if (!led_commands[i].string && !(strcmp("all", argv[1]) == 0)) { | ||
36 | + if (!match) { | ||
37 | return cmd_usage(cmdtp); | ||
38 | } | ||
39 | |||
40 | -- | ||
41 | 1.6.6.1 | ||
42 | |||
diff --git a/recipes-bsp/u-boot/u-boot/0015-omap3_beagle-Switch-default-console-from-ttyS2-to-tt.patch b/recipes-bsp/u-boot/u-boot/0015-omap3_beagle-Switch-default-console-from-ttyS2-to-tt.patch deleted file mode 100644 index 2db0810b..00000000 --- a/recipes-bsp/u-boot/u-boot/0015-omap3_beagle-Switch-default-console-from-ttyS2-to-tt.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | From 1a88890580917571811950eabd877cccdb643cb1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Holler <holler@ahsoftware.de> | ||
3 | Date: Thu, 17 Feb 2011 22:37:57 +0000 | ||
4 | Subject: [PATCH 15/16] omap3_beagle: Switch default console from ttyS2 to ttyO2 | ||
5 | |||
6 | Linux kernels >= 2.6.36 are using ttyOn instead ttySn for the | ||
7 | serials on OMAPs. | ||
8 | |||
9 | Signed-off-by: Alexander Holler <holler@ahsoftware.de> | ||
10 | --- | ||
11 | include/configs/omap3_beagle.h | 2 +- | ||
12 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
13 | |||
14 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
15 | index 73d4d4e..de572e8 100644 | ||
16 | --- a/include/configs/omap3_beagle.h | ||
17 | +++ b/include/configs/omap3_beagle.h | ||
18 | @@ -211,7 +211,7 @@ | ||
19 | "loadaddr=0x80200000\0" \ | ||
20 | "rdaddr=0x81000000\0" \ | ||
21 | "usbtty=cdc_acm\0" \ | ||
22 | - "console=ttyS2,115200n8\0" \ | ||
23 | + "console=ttyO2,115200n8\0" \ | ||
24 | "mpurate=auto\0" \ | ||
25 | "buddy=none "\ | ||
26 | "optargs=\0" \ | ||
27 | -- | ||
28 | 1.6.6.1 | ||
29 | |||
diff --git a/recipes-bsp/u-boot/u-boot/0016-BeagleBoard-Load-kernel-via-MMC-ext2-not-fat.patch b/recipes-bsp/u-boot/u-boot/0016-BeagleBoard-Load-kernel-via-MMC-ext2-not-fat.patch deleted file mode 100644 index bdcdeb40..00000000 --- a/recipes-bsp/u-boot/u-boot/0016-BeagleBoard-Load-kernel-via-MMC-ext2-not-fat.patch +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | From 03757f19b4affb531d1606e468e0411acd8d57cb Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Kridner <jkridner@beagleboard.org> | ||
3 | Date: Wed, 9 Mar 2011 18:48:19 -0600 | ||
4 | Subject: [PATCH 16/16] BeagleBoard: Load kernel via MMC ext2, not fat | ||
5 | |||
6 | --- | ||
7 | include/configs/omap3_beagle.h | 3 ++- | ||
8 | 1 files changed, 2 insertions(+), 1 deletions(-) | ||
9 | |||
10 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
11 | index de572e8..3a102e5 100644 | ||
12 | --- a/include/configs/omap3_beagle.h | ||
13 | +++ b/include/configs/omap3_beagle.h | ||
14 | @@ -261,7 +261,8 @@ | ||
15 | "root=${ramroot} " \ | ||
16 | "rootfstype=${ramrootfstype}\0" \ | ||
17 | "loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ | ||
18 | - "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ | ||
19 | + "loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ | ||
20 | + "loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} /boot/uImage\0" \ | ||
21 | "mmcboot=echo Booting from mmc ...; " \ | ||
22 | "run mmcargs; " \ | ||
23 | "bootm ${loadaddr}\0" \ | ||
24 | -- | ||
25 | 1.6.6.1 | ||
26 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0001-omap3-mem-Comment-enable_gpmc_cs_config-more.patch b/recipes-bsp/u-boot/u-boot/2011.09/0001-omap3-mem-Comment-enable_gpmc_cs_config-more.patch deleted file mode 100644 index 38da967d..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09/0001-omap3-mem-Comment-enable_gpmc_cs_config-more.patch +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | From 81630b54970a9274140b1c14caa31da6331a62fa Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Rini <trini@ti.com> | ||
3 | Date: Fri, 18 Nov 2011 12:47:58 +0000 | ||
4 | Subject: [PATCH 01/21] omap3: mem: Comment enable_gpmc_cs_config more | ||
5 | |||
6 | Expand the "enable the config" comment to explain what the bit shifts | ||
7 | are and define out two of the magic numbers. | ||
8 | |||
9 | Signed-off-by: Tom Rini <trini@ti.com> | ||
10 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
11 | --- | ||
12 | arch/arm/cpu/armv7/omap3/mem.c | 12 +++++++++--- | ||
13 | arch/arm/include/asm/arch-omap3/mem.h | 4 ++++ | ||
14 | 2 files changed, 13 insertions(+), 3 deletions(-) | ||
15 | |||
16 | diff --git a/arch/arm/cpu/armv7/omap3/mem.c b/arch/arm/cpu/armv7/omap3/mem.c | ||
17 | index a01c303..2f1efea 100644 | ||
18 | --- a/arch/arm/cpu/armv7/omap3/mem.c | ||
19 | +++ b/arch/arm/cpu/armv7/omap3/mem.c | ||
20 | @@ -105,9 +105,15 @@ void enable_gpmc_cs_config(const u32 *gpmc_config, struct gpmc_cs *cs, u32 base, | ||
21 | writel(gpmc_config[3], &cs->config4); | ||
22 | writel(gpmc_config[4], &cs->config5); | ||
23 | writel(gpmc_config[5], &cs->config6); | ||
24 | - /* Enable the config */ | ||
25 | - writel((((size & 0xF) << 8) | ((base >> 24) & 0x3F) | | ||
26 | - (1 << 6)), &cs->config7); | ||
27 | + | ||
28 | + /* | ||
29 | + * Enable the config. size is the CS size and goes in | ||
30 | + * bits 11:8. We set bit 6 to enable this CS and the base | ||
31 | + * address goes into bits 5:0. | ||
32 | + */ | ||
33 | + writel((size << 8) | (GPMC_CS_ENABLE << 6) | | ||
34 | + ((base >> 24) & GPMC_BASEADDR_MASK), | ||
35 | + &cs->config7); | ||
36 | sdelay(2000); | ||
37 | } | ||
38 | |||
39 | diff --git a/arch/arm/include/asm/arch-omap3/mem.h b/arch/arm/include/asm/arch-omap3/mem.h | ||
40 | index db6a696..abf4e82 100644 | ||
41 | --- a/arch/arm/include/asm/arch-omap3/mem.h | ||
42 | +++ b/arch/arm/include/asm/arch-omap3/mem.h | ||
43 | @@ -259,6 +259,10 @@ enum { | ||
44 | #define GPMC_SIZE_32M 0xE | ||
45 | #define GPMC_SIZE_16M 0xF | ||
46 | |||
47 | +#define GPMC_BASEADDR_MASK 0x3F | ||
48 | + | ||
49 | +#define GPMC_CS_ENABLE 0x1 | ||
50 | + | ||
51 | #define SMNAND_GPMC_CONFIG1 0x00000800 | ||
52 | #define SMNAND_GPMC_CONFIG2 0x00141400 | ||
53 | #define SMNAND_GPMC_CONFIG3 0x00141400 | ||
54 | -- | ||
55 | 1.7.2.5 | ||
56 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0002-OMAP3-Update-SDRC-dram_init-to-always-call-make_cs1_.patch b/recipes-bsp/u-boot/u-boot/2011.09/0002-OMAP3-Update-SDRC-dram_init-to-always-call-make_cs1_.patch deleted file mode 100644 index cb128738..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09/0002-OMAP3-Update-SDRC-dram_init-to-always-call-make_cs1_.patch +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | From 42db3ebdd76628017e7ab83752e9b288ec4f26a0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Rini <trini@ti.com> | ||
3 | Date: Fri, 18 Nov 2011 12:47:59 +0000 | ||
4 | Subject: [PATCH 02/21] OMAP3: Update SDRC dram_init to always call make_cs1_contiguous() | ||
5 | |||
6 | We update the comment in make_cs1_contiguous() to be a little bit | ||
7 | more clear (it's been copy/pasted from other silicons) and then | ||
8 | explain in dram_init() why we need to always try this. | ||
9 | |||
10 | Note that in the previous behavior we were always calling this on | ||
11 | boards that never had cs1 populated anyhow so making sure we do | ||
12 | this always is fine and will correct things like omap3evm detecting | ||
13 | an invalid amount of memory (384MB). | ||
14 | |||
15 | Signed-off-by: Tom Rini <trini@ti.com> | ||
16 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
17 | --- | ||
18 | arch/arm/cpu/armv7/omap3/sdrc.c | 23 +++++++++++------------ | ||
19 | 1 files changed, 11 insertions(+), 12 deletions(-) | ||
20 | |||
21 | diff --git a/arch/arm/cpu/armv7/omap3/sdrc.c b/arch/arm/cpu/armv7/omap3/sdrc.c | ||
22 | index 0dd1955..66ce33f 100644 | ||
23 | --- a/arch/arm/cpu/armv7/omap3/sdrc.c | ||
24 | +++ b/arch/arm/cpu/armv7/omap3/sdrc.c | ||
25 | @@ -58,10 +58,9 @@ u32 is_mem_sdr(void) | ||
26 | |||
27 | /* | ||
28 | * make_cs1_contiguous - | ||
29 | - * - For es2 and above remap cs1 behind cs0 to allow command line | ||
30 | - * mem=xyz use all memory with out discontinuous support compiled in. | ||
31 | - * Could do it at the ATAG, but there really is two banks... | ||
32 | - * - Called as part of 2nd phase DDR init. | ||
33 | + * - When we have CS1 populated we want to have it mapped after cs0 to allow | ||
34 | + * command line mem=xyz use all memory with out discontinuous support | ||
35 | + * compiled in. We could do it in the ATAG, but there really is two banks... | ||
36 | */ | ||
37 | void make_cs1_contiguous(void) | ||
38 | { | ||
39 | @@ -207,16 +206,16 @@ int dram_init(void) | ||
40 | |||
41 | size0 = get_sdr_cs_size(CS0); | ||
42 | /* | ||
43 | - * If a second bank of DDR is attached to CS1 this is | ||
44 | - * where it can be started. Early init code will init | ||
45 | - * memory on CS0. | ||
46 | + * We always need to have cs_cfg point at where the second | ||
47 | + * bank would be, if present. Failure to do so can lead to | ||
48 | + * strange situations where memory isn't detected and | ||
49 | + * configured correctly. CS0 will already have been setup | ||
50 | + * at this point. | ||
51 | */ | ||
52 | - if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) { | ||
53 | - do_sdrc_init(CS1, NOT_EARLY); | ||
54 | - make_cs1_contiguous(); | ||
55 | + make_cs1_contiguous(); | ||
56 | + do_sdrc_init(CS1, NOT_EARLY); | ||
57 | + size1 = get_sdr_cs_size(CS1); | ||
58 | |||
59 | - size1 = get_sdr_cs_size(CS1); | ||
60 | - } | ||
61 | gd->ram_size = size0 + size1; | ||
62 | |||
63 | return 0; | ||
64 | -- | ||
65 | 1.7.2.5 | ||
66 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0003-OMAP3-Add-a-helper-function-to-set-timings-in-SDRC.patch b/recipes-bsp/u-boot/u-boot/2011.09/0003-OMAP3-Add-a-helper-function-to-set-timings-in-SDRC.patch deleted file mode 100644 index 71e49afd..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09/0003-OMAP3-Add-a-helper-function-to-set-timings-in-SDRC.patch +++ /dev/null | |||
@@ -1,172 +0,0 @@ | |||
1 | From a186210c5003db4df2a4f97bd6d4cb2dc616a591 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Rini <trini@ti.com> | ||
3 | Date: Fri, 18 Nov 2011 12:48:00 +0000 | ||
4 | Subject: [PATCH 03/21] OMAP3: Add a helper function to set timings in SDRC | ||
5 | |||
6 | Since we go through the sequence to setup the SDRC timings more than | ||
7 | once, break this logic out into its own function and have that function | ||
8 | call mem_ok() to make sure the memory is usable. | ||
9 | |||
10 | Signed-off-by: Tom Rini <trini@ti.com> | ||
11 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
12 | --- | ||
13 | arch/arm/cpu/armv7/omap3/sdrc.c | 116 ++++++++++++++++++++------------------ | ||
14 | 1 files changed, 61 insertions(+), 55 deletions(-) | ||
15 | |||
16 | diff --git a/arch/arm/cpu/armv7/omap3/sdrc.c b/arch/arm/cpu/armv7/omap3/sdrc.c | ||
17 | index 66ce33f..2756024 100644 | ||
18 | --- a/arch/arm/cpu/armv7/omap3/sdrc.c | ||
19 | +++ b/arch/arm/cpu/armv7/omap3/sdrc.c | ||
20 | @@ -108,14 +108,45 @@ u32 get_sdr_cs_offset(u32 cs) | ||
21 | } | ||
22 | |||
23 | /* | ||
24 | + * write_sdrc_timings - | ||
25 | + * - Takes CS and associated timings and initalize SDRAM | ||
26 | + * - Test CS to make sure it's OK for use | ||
27 | + */ | ||
28 | +static void write_sdrc_timings(u32 cs, struct sdrc_actim *sdrc_actim_base, | ||
29 | + u32 mcfg, u32 ctrla, u32 ctrlb, u32 rfr_ctrl, u32 mr) | ||
30 | +{ | ||
31 | + /* Setup timings we got from the board. */ | ||
32 | + writel(mcfg, &sdrc_base->cs[cs].mcfg); | ||
33 | + writel(ctrla, &sdrc_actim_base->ctrla); | ||
34 | + writel(ctrlb, &sdrc_actim_base->ctrlb); | ||
35 | + writel(rfr_ctrl, &sdrc_base->cs[cs].rfr_ctrl); | ||
36 | + writel(CMD_NOP, &sdrc_base->cs[cs].manual); | ||
37 | + writel(CMD_PRECHARGE, &sdrc_base->cs[cs].manual); | ||
38 | + writel(CMD_AUTOREFRESH, &sdrc_base->cs[cs].manual); | ||
39 | + writel(CMD_AUTOREFRESH, &sdrc_base->cs[cs].manual); | ||
40 | + writel(mr, &sdrc_base->cs[cs].mr); | ||
41 | + | ||
42 | + /* | ||
43 | + * Test ram in this bank | ||
44 | + * Disable if bad or not present | ||
45 | + */ | ||
46 | + if (!mem_ok(cs)) | ||
47 | + writel(0, &sdrc_base->cs[cs].mcfg); | ||
48 | +} | ||
49 | + | ||
50 | +/* | ||
51 | * do_sdrc_init - | ||
52 | - * - Initialize the SDRAM for use. | ||
53 | - * - code called once in C-Stack only context for CS0 and a possible 2nd | ||
54 | - * time depending on memory configuration from stack+global context | ||
55 | + * - Code called once in C-Stack only context for CS0 and with early being | ||
56 | + * true and a possible 2nd time depending on memory configuration from | ||
57 | + * stack+global context. | ||
58 | */ | ||
59 | void do_sdrc_init(u32 cs, u32 early) | ||
60 | { | ||
61 | struct sdrc_actim *sdrc_actim_base0, *sdrc_actim_base1; | ||
62 | + u32 mcfg, ctrla, ctrlb, rfr_ctrl, mr; | ||
63 | + | ||
64 | + sdrc_actim_base0 = (struct sdrc_actim *)SDRC_ACTIM_CTRL0_BASE; | ||
65 | + sdrc_actim_base1 = (struct sdrc_actim *)SDRC_ACTIM_CTRL1_BASE; | ||
66 | |||
67 | if (early) { | ||
68 | /* reset sdrc controller */ | ||
69 | @@ -127,73 +158,48 @@ void do_sdrc_init(u32 cs, u32 early) | ||
70 | /* setup sdrc to ball mux */ | ||
71 | writel(SDRC_SHARING, &sdrc_base->sharing); | ||
72 | |||
73 | - /* Disable Power Down of CKE cuz of 1 CKE on combo part */ | ||
74 | + /* Disable Power Down of CKE because of 1 CKE on combo part */ | ||
75 | writel(WAKEUPPROC | SRFRONRESET | PAGEPOLICY_HIGH, | ||
76 | &sdrc_base->power); | ||
77 | |||
78 | writel(ENADLL | DLLPHASE_90, &sdrc_base->dlla_ctrl); | ||
79 | sdelay(0x20000); | ||
80 | - } | ||
81 | - | ||
82 | /* As long as V_MCFG and V_RFR_CTRL is not defined for all OMAP3 boards we need | ||
83 | * to prevent this to be build in non-SPL build */ | ||
84 | #ifdef CONFIG_SPL_BUILD | ||
85 | - /* If we use a SPL there is no x-loader nor config header so we have | ||
86 | - * to do the job ourselfs | ||
87 | - */ | ||
88 | - if (cs == CS0) { | ||
89 | - sdrc_actim_base0 = (struct sdrc_actim *)SDRC_ACTIM_CTRL0_BASE; | ||
90 | - | ||
91 | - /* General SDRC config */ | ||
92 | - writel(V_MCFG, &sdrc_base->cs[cs].mcfg); | ||
93 | - writel(V_RFR_CTRL, &sdrc_base->cs[cs].rfr_ctrl); | ||
94 | - | ||
95 | - /* AC timings */ | ||
96 | - writel(V_ACTIMA_165, &sdrc_actim_base0->ctrla); | ||
97 | - writel(V_ACTIMB_165, &sdrc_actim_base0->ctrlb); | ||
98 | - | ||
99 | - /* Initialize */ | ||
100 | - writel(CMD_NOP, &sdrc_base->cs[cs].manual); | ||
101 | - writel(CMD_PRECHARGE, &sdrc_base->cs[cs].manual); | ||
102 | - writel(CMD_AUTOREFRESH, &sdrc_base->cs[cs].manual); | ||
103 | - writel(CMD_AUTOREFRESH, &sdrc_base->cs[cs].manual); | ||
104 | + /* | ||
105 | + * If we use a SPL there is no x-loader nor config header so | ||
106 | + * we have to do the job ourselfs | ||
107 | + */ | ||
108 | + | ||
109 | + mcfg = V_MCFG; | ||
110 | + ctrla = V_ACTIMA_165; | ||
111 | + ctrlb = V_ACTIMB_165; | ||
112 | + rfr_ctrl = V_RFR_CTRL; | ||
113 | + mr = V_MR; | ||
114 | + | ||
115 | + write_sdrc_timings(CS0, sdrc_actim_base0, mcfg, ctrla, ctrlb, | ||
116 | + rfr_ctrl, mr); | ||
117 | +#endif | ||
118 | |||
119 | - writel(V_MR, &sdrc_base->cs[cs].mr); | ||
120 | } | ||
121 | -#endif | ||
122 | |||
123 | /* | ||
124 | - * SDRC timings are set up by x-load or config header | ||
125 | - * We don't need to redo them here. | ||
126 | - * Older x-loads configure only CS0 | ||
127 | - * configure CS1 to handle this ommission | ||
128 | + * If we aren't using SPL we have been loaded by some | ||
129 | + * other means which may not have correctly initialized | ||
130 | + * both CS0 and CS1 (such as some older versions of x-loader) | ||
131 | + * so we may be asked now to setup CS1. | ||
132 | */ | ||
133 | if (cs == CS1) { | ||
134 | - sdrc_actim_base0 = (struct sdrc_actim *)SDRC_ACTIM_CTRL0_BASE; | ||
135 | - sdrc_actim_base1 = (struct sdrc_actim *)SDRC_ACTIM_CTRL1_BASE; | ||
136 | - writel(readl(&sdrc_base->cs[CS0].mcfg), | ||
137 | - &sdrc_base->cs[CS1].mcfg); | ||
138 | - writel(readl(&sdrc_base->cs[CS0].rfr_ctrl), | ||
139 | - &sdrc_base->cs[CS1].rfr_ctrl); | ||
140 | - writel(readl(&sdrc_actim_base0->ctrla), | ||
141 | - &sdrc_actim_base1->ctrla); | ||
142 | - writel(readl(&sdrc_actim_base0->ctrlb), | ||
143 | - &sdrc_actim_base1->ctrlb); | ||
144 | - | ||
145 | - writel(CMD_NOP, &sdrc_base->cs[cs].manual); | ||
146 | - writel(CMD_PRECHARGE, &sdrc_base->cs[cs].manual); | ||
147 | - writel(CMD_AUTOREFRESH, &sdrc_base->cs[cs].manual); | ||
148 | - writel(CMD_AUTOREFRESH, &sdrc_base->cs[cs].manual); | ||
149 | - writel(readl(&sdrc_base->cs[CS0].mr), | ||
150 | - &sdrc_base->cs[CS1].mr); | ||
151 | - } | ||
152 | + mcfg = readl(&sdrc_base->cs[CS0].mcfg), | ||
153 | + rfr_ctrl = readl(&sdrc_base->cs[CS0].rfr_ctrl); | ||
154 | + ctrla = readl(&sdrc_actim_base0->ctrla), | ||
155 | + ctrlb = readl(&sdrc_actim_base0->ctrlb); | ||
156 | + mr = readl(&sdrc_base->cs[CS0].mr); | ||
157 | + write_sdrc_timings(cs, sdrc_actim_base1, mcfg, ctrla, ctrlb, | ||
158 | + rfr_ctrl, mr); | ||
159 | |||
160 | - /* | ||
161 | - * Test ram in this bank | ||
162 | - * Disable if bad or not present | ||
163 | - */ | ||
164 | - if (!mem_ok(cs)) | ||
165 | - writel(0, &sdrc_base->cs[cs].mcfg); | ||
166 | + } | ||
167 | } | ||
168 | |||
169 | /* | ||
170 | -- | ||
171 | 1.7.2.5 | ||
172 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0004-OMAP3-Change-mem_ok-to-clear-again-after-reading-bac.patch b/recipes-bsp/u-boot/u-boot/2011.09/0004-OMAP3-Change-mem_ok-to-clear-again-after-reading-bac.patch deleted file mode 100644 index 30d912c5..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09/0004-OMAP3-Change-mem_ok-to-clear-again-after-reading-bac.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From 0cf0d611823f6e1f3b63f9233c145a3940a89694 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Rini <trini@ti.com> | ||
3 | Date: Fri, 18 Nov 2011 12:48:01 +0000 | ||
4 | Subject: [PATCH 04/21] OMAP3: Change mem_ok to clear again after reading back | ||
5 | |||
6 | It's possible to need to call this function on the same banks multiple | ||
7 | times so we want to be sure that 'pos A' is cleared out again at the | ||
8 | end. | ||
9 | |||
10 | Signed-off-by: Tom Rini <trini@ti.com> | ||
11 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
12 | --- | ||
13 | arch/arm/cpu/armv7/omap3/mem.c | 1 + | ||
14 | 1 files changed, 1 insertions(+), 0 deletions(-) | ||
15 | |||
16 | diff --git a/arch/arm/cpu/armv7/omap3/mem.c b/arch/arm/cpu/armv7/omap3/mem.c | ||
17 | index 2f1efea..2fe5ac7 100644 | ||
18 | --- a/arch/arm/cpu/armv7/omap3/mem.c | ||
19 | +++ b/arch/arm/cpu/armv7/omap3/mem.c | ||
20 | @@ -86,6 +86,7 @@ u32 mem_ok(u32 cs) | ||
21 | writel(0x0, addr + 4); /* remove pattern off the bus */ | ||
22 | val1 = readl(addr + 0x400); /* get pos A value */ | ||
23 | val2 = readl(addr); /* get val2 */ | ||
24 | + writel(0x0, addr + 0x400); /* clear pos A */ | ||
25 | |||
26 | if ((val1 != 0) || (val2 != pattern)) /* see if pos A val changed */ | ||
27 | return 0; | ||
28 | -- | ||
29 | 1.7.2.5 | ||
30 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0005-OMAP3-Remove-get_mem_type-prototype.patch b/recipes-bsp/u-boot/u-boot/2011.09/0005-OMAP3-Remove-get_mem_type-prototype.patch deleted file mode 100644 index ec1b5f76..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09/0005-OMAP3-Remove-get_mem_type-prototype.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | From 45ccdf2ba3aa6e5f258c463691c85ac4529246e6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Rini <trini@ti.com> | ||
3 | Date: Fri, 18 Nov 2011 12:48:02 +0000 | ||
4 | Subject: [PATCH 05/21] OMAP3: Remove get_mem_type prototype | ||
5 | |||
6 | This function doesn't exist for omap3 | ||
7 | |||
8 | Signed-off-by: Tom Rini <trini@ti.com> | ||
9 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
10 | --- | ||
11 | arch/arm/include/asm/arch-omap3/sys_proto.h | 1 - | ||
12 | 1 files changed, 0 insertions(+), 1 deletions(-) | ||
13 | |||
14 | diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h b/arch/arm/include/asm/arch-omap3/sys_proto.h | ||
15 | index 995e7cb..9e64410 100644 | ||
16 | --- a/arch/arm/include/asm/arch-omap3/sys_proto.h | ||
17 | +++ b/arch/arm/include/asm/arch-omap3/sys_proto.h | ||
18 | @@ -49,7 +49,6 @@ void set_muxconf_regs(void); | ||
19 | u32 get_cpu_family(void); | ||
20 | u32 get_cpu_rev(void); | ||
21 | u32 get_sku_id(void); | ||
22 | -u32 get_mem_type(void); | ||
23 | u32 get_sysboot_value(void); | ||
24 | u32 is_gpmc_muxed(void); | ||
25 | u32 get_gpmc0_type(void); | ||
26 | -- | ||
27 | 1.7.2.5 | ||
28 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0006-omap3-mem-Add-MCFG-helper-macro.patch b/recipes-bsp/u-boot/u-boot/2011.09/0006-omap3-mem-Add-MCFG-helper-macro.patch deleted file mode 100644 index 475febff..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09/0006-omap3-mem-Add-MCFG-helper-macro.patch +++ /dev/null | |||
@@ -1,97 +0,0 @@ | |||
1 | From bd50b147ff61a5203815296eac726b0a244c3cb2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Rini <trini@ti.com> | ||
3 | Date: Fri, 18 Nov 2011 12:48:03 +0000 | ||
4 | Subject: [PATCH 06/21] omap3: mem: Add MCFG helper macro | ||
5 | |||
6 | This adds an MCFG macro to calculate the correct value, similar to | ||
7 | the ACTIMA/ACTIMB macros and adds a comment that all of the potential | ||
8 | values here are documented in the TRM. Then we convert the Micron | ||
9 | value to use this macro. | ||
10 | |||
11 | Signed-off-by: Tom Rini <trini@ti.com> | ||
12 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
13 | --- | ||
14 | arch/arm/include/asm/arch-omap3/mem.h | 46 +++++++++++++++++++++----------- | ||
15 | 1 files changed, 30 insertions(+), 16 deletions(-) | ||
16 | |||
17 | diff --git a/arch/arm/include/asm/arch-omap3/mem.h b/arch/arm/include/asm/arch-omap3/mem.h | ||
18 | index abf4e82..12ff3b0 100644 | ||
19 | --- a/arch/arm/include/asm/arch-omap3/mem.h | ||
20 | +++ b/arch/arm/include/asm/arch-omap3/mem.h | ||
21 | @@ -39,6 +39,12 @@ enum { | ||
22 | |||
23 | #define EARLY_INIT 1 | ||
24 | |||
25 | +/* | ||
26 | + * For a full explanation of these registers and values please see | ||
27 | + * the Technical Reference Manual (TRM) for any of the processors in | ||
28 | + * this family. | ||
29 | + */ | ||
30 | + | ||
31 | /* Slower full frequency range default timings for x32 operation*/ | ||
32 | #define SDRC_SHARING 0x00000100 | ||
33 | #define SDRC_MR_0_SDR 0x00000031 | ||
34 | @@ -86,6 +92,27 @@ enum { | ||
35 | ACTIM_CTRLB_TXP(b) | \ | ||
36 | ACTIM_CTRLB_TXSR(d) | ||
37 | |||
38 | +/* | ||
39 | + * Values used in the MCFG register. Only values we use today | ||
40 | + * are defined and the rest can be found in the TRM. Unless otherwise | ||
41 | + * noted all fields are one bit. | ||
42 | + */ | ||
43 | +#define V_MCFG_RAMTYPE_DDR (0x1) | ||
44 | +#define V_MCFG_DEEPPD_EN (0x1 << 3) | ||
45 | +#define V_MCFG_B32NOT16_32 (0x1 << 4) | ||
46 | +#define V_MCFG_BANKALLOCATION_RBC (0x2 << 6) /* 6:7 */ | ||
47 | +#define V_MCFG_RAMSIZE(a) ((((a)/(1024*1024))/2) << 8) /* 8:17 */ | ||
48 | +#define V_MCFG_ADDRMUXLEGACY_FLEX (0x1 << 19) | ||
49 | +#define V_MCFG_CASWIDTH_10B (0x5 << 20) /* 20:22 */ | ||
50 | +#define V_MCFG_RASWIDTH(a) ((a) << 24) /* 24:26 */ | ||
51 | + | ||
52 | +/* Macro to construct MCFG */ | ||
53 | +#define MCFG(a, b) \ | ||
54 | + V_MCFG_RASWIDTH(b) | V_MCFG_CASWIDTH_10B | \ | ||
55 | + V_MCFG_ADDRMUXLEGACY_FLEX | V_MCFG_RAMSIZE(a) | \ | ||
56 | + V_MCFG_BANKALLOCATION_RBC | \ | ||
57 | + V_MCFG_B32NOT16_32 | V_MCFG_DEEPPD_EN | V_MCFG_RAMTYPE_DDR | ||
58 | + | ||
59 | /* Infineon part of 3430SDP (165MHz optimized) 6.06ns */ | ||
60 | #define INFINEON_TDAL_165 6 /* Twr/Tck + Trp/tck */ | ||
61 | /* 15/6 + 18/6 = 5.5 -> 6 */ | ||
62 | @@ -138,21 +165,8 @@ enum { | ||
63 | ACTIM_CTRLB(MICRON_TWTR_165, MICRON_TCKE_165, \ | ||
64 | MICRON_TXP_165, MICRON_XSR_165) | ||
65 | |||
66 | -#define MICRON_RAMTYPE 0x1 | ||
67 | -#define MICRON_DDRTYPE 0x0 | ||
68 | -#define MICRON_DEEPPD 0x1 | ||
69 | -#define MICRON_B32NOT16 0x1 | ||
70 | -#define MICRON_BANKALLOCATION 0x2 | ||
71 | -#define MICRON_RAMSIZE ((PHYS_SDRAM_1_SIZE/(1024*1024))/2) | ||
72 | -#define MICRON_ADDRMUXLEGACY 0x1 | ||
73 | -#define MICRON_CASWIDTH 0x5 | ||
74 | -#define MICRON_RASWIDTH 0x2 | ||
75 | -#define MICRON_LOCKSTATUS 0x0 | ||
76 | -#define MICRON_V_MCFG ((MICRON_LOCKSTATUS << 30) | (MICRON_RASWIDTH << 24) | \ | ||
77 | - (MICRON_CASWIDTH << 20) | (MICRON_ADDRMUXLEGACY << 19) | \ | ||
78 | - (MICRON_RAMSIZE << 8) | (MICRON_BANKALLOCATION << 6) | \ | ||
79 | - (MICRON_B32NOT16 << 4) | (MICRON_DEEPPD << 3) | \ | ||
80 | - (MICRON_DDRTYPE << 2) | (MICRON_RAMTYPE)) | ||
81 | +#define MICRON_RASWIDTH 0x2 | ||
82 | +#define MICRON_V_MCFG(size) MCFG((size), MICRON_RASWIDTH) | ||
83 | |||
84 | #define MICRON_ARCV 2030 | ||
85 | #define MICRON_ARE 0x1 | ||
86 | @@ -199,7 +213,7 @@ enum { | ||
87 | #ifdef CONFIG_OMAP3_MICRON_DDR | ||
88 | #define V_ACTIMA_165 MICRON_V_ACTIMA_165 | ||
89 | #define V_ACTIMB_165 MICRON_V_ACTIMB_165 | ||
90 | -#define V_MCFG MICRON_V_MCFG | ||
91 | +#define V_MCFG MICRON_V_MCFG(PHYS_SDRAM_1_SIZE) | ||
92 | #define V_RFR_CTRL MICRON_V_RFR_CTRL | ||
93 | #define V_MR MICRON_V_MR | ||
94 | #endif | ||
95 | -- | ||
96 | 1.7.2.5 | ||
97 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0007-OMAP3-Add-optimal-SDRC-autorefresh-control-values.patch b/recipes-bsp/u-boot/u-boot/2011.09/0007-OMAP3-Add-optimal-SDRC-autorefresh-control-values.patch deleted file mode 100644 index 2024094c..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09/0007-OMAP3-Add-optimal-SDRC-autorefresh-control-values.patch +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | From 67ea79f7a99d7168915a5db8a577814ec501774e Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Rini <trini@ti.com> | ||
3 | Date: Fri, 18 Nov 2011 12:48:04 +0000 | ||
4 | Subject: [PATCH 07/21] OMAP3: Add optimal SDRC autorefresh control values | ||
5 | |||
6 | This adds the optimal SDRC autorefresh control register values for | ||
7 | 100Mhz, 133MHz, 165MHz and 200MHz clocks. We switch to using this | ||
8 | to provide the default 165MHz value. | ||
9 | |||
10 | Signed-off-by: Tom Rini <trini@ti.com> | ||
11 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
12 | --- | ||
13 | arch/arm/include/asm/arch-omap3/mem.h | 16 +++++++++++----- | ||
14 | 1 files changed, 11 insertions(+), 5 deletions(-) | ||
15 | |||
16 | diff --git a/arch/arm/include/asm/arch-omap3/mem.h b/arch/arm/include/asm/arch-omap3/mem.h | ||
17 | index 12ff3b0..912c737 100644 | ||
18 | --- a/arch/arm/include/asm/arch-omap3/mem.h | ||
19 | +++ b/arch/arm/include/asm/arch-omap3/mem.h | ||
20 | @@ -49,6 +49,16 @@ enum { | ||
21 | #define SDRC_SHARING 0x00000100 | ||
22 | #define SDRC_MR_0_SDR 0x00000031 | ||
23 | |||
24 | +/* | ||
25 | + * SDRC autorefresh control values. This register consists of autorefresh | ||
26 | + * enable at bits 0:1 and an autorefresh counter value in bits 8:23. The | ||
27 | + * counter is a result of ( tREFI / tCK ) - 50. | ||
28 | + */ | ||
29 | +#define SDP_3430_SDRC_RFR_CTRL_100MHz 0x0002da01 | ||
30 | +#define SDP_3430_SDRC_RFR_CTRL_133MHz 0x0003de01 /* 7.8us/7.5ns - 50=0x3de */ | ||
31 | +#define SDP_3430_SDRC_RFR_CTRL_165MHz 0x0004e201 /* 7.8us/6ns - 50=0x4e2 */ | ||
32 | +#define SDP_3430_SDRC_RFR_CTRL_200MHz 0x0005e601 /* 7.8us/5ns - 50=0x5e6 */ | ||
33 | + | ||
34 | #define DLL_OFFSET 0 | ||
35 | #define DLL_WRITEDDRCLKX2DIS 1 | ||
36 | #define DLL_ENADLL 1 | ||
37 | @@ -168,10 +178,6 @@ enum { | ||
38 | #define MICRON_RASWIDTH 0x2 | ||
39 | #define MICRON_V_MCFG(size) MCFG((size), MICRON_RASWIDTH) | ||
40 | |||
41 | -#define MICRON_ARCV 2030 | ||
42 | -#define MICRON_ARE 0x1 | ||
43 | -#define MICRON_V_RFR_CTRL ((MICRON_ARCV << 8) | (MICRON_ARE)) | ||
44 | - | ||
45 | #define MICRON_BL 0x2 | ||
46 | #define MICRON_SIL 0x0 | ||
47 | #define MICRON_CASL 0x3 | ||
48 | @@ -214,7 +220,7 @@ enum { | ||
49 | #define V_ACTIMA_165 MICRON_V_ACTIMA_165 | ||
50 | #define V_ACTIMB_165 MICRON_V_ACTIMB_165 | ||
51 | #define V_MCFG MICRON_V_MCFG(PHYS_SDRAM_1_SIZE) | ||
52 | -#define V_RFR_CTRL MICRON_V_RFR_CTRL | ||
53 | +#define V_RFR_CTRL SDP_3430_SDRC_RFR_CTRL_165MHz | ||
54 | #define V_MR MICRON_V_MR | ||
55 | #endif | ||
56 | |||
57 | -- | ||
58 | 1.7.2.5 | ||
59 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0008-OMAP3-Suffix-all-Micron-memory-timing-parts-with-the.patch b/recipes-bsp/u-boot/u-boot/2011.09/0008-OMAP3-Suffix-all-Micron-memory-timing-parts-with-the.patch deleted file mode 100644 index 79f4efb6..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09/0008-OMAP3-Suffix-all-Micron-memory-timing-parts-with-the.patch +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | From 0e9f4ab3cafdc1de638ab7a603a750acd4688967 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Rini <trini@ti.com> | ||
3 | Date: Fri, 18 Nov 2011 12:48:05 +0000 | ||
4 | Subject: [PATCH 08/21] OMAP3: Suffix all Micron memory timing parts with their speed | ||
5 | |||
6 | Signed-off-by: Tom Rini <trini@ti.com> | ||
7 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
8 | --- | ||
9 | arch/arm/include/asm/arch-omap3/mem.h | 21 +++++++++++---------- | ||
10 | 1 files changed, 11 insertions(+), 10 deletions(-) | ||
11 | |||
12 | diff --git a/arch/arm/include/asm/arch-omap3/mem.h b/arch/arm/include/asm/arch-omap3/mem.h | ||
13 | index 912c737..4f996d9 100644 | ||
14 | --- a/arch/arm/include/asm/arch-omap3/mem.h | ||
15 | +++ b/arch/arm/include/asm/arch-omap3/mem.h | ||
16 | @@ -175,15 +175,16 @@ enum { | ||
17 | ACTIM_CTRLB(MICRON_TWTR_165, MICRON_TCKE_165, \ | ||
18 | MICRON_TXP_165, MICRON_XSR_165) | ||
19 | |||
20 | -#define MICRON_RASWIDTH 0x2 | ||
21 | -#define MICRON_V_MCFG(size) MCFG((size), MICRON_RASWIDTH) | ||
22 | +#define MICRON_RASWIDTH_165 0x2 | ||
23 | +#define MICRON_V_MCFG_165(size) MCFG((size), MICRON_RASWIDTH_165) | ||
24 | |||
25 | -#define MICRON_BL 0x2 | ||
26 | -#define MICRON_SIL 0x0 | ||
27 | -#define MICRON_CASL 0x3 | ||
28 | -#define MICRON_WBST 0x0 | ||
29 | -#define MICRON_V_MR ((MICRON_WBST << 9) | (MICRON_CASL << 4) | \ | ||
30 | - (MICRON_SIL << 3) | (MICRON_BL)) | ||
31 | +#define MICRON_BL_165 0x2 | ||
32 | +#define MICRON_SIL_165 0x0 | ||
33 | +#define MICRON_CASL_165 0x3 | ||
34 | +#define MICRON_WBST_165 0x0 | ||
35 | +#define MICRON_V_MR_165 ((MICRON_WBST_165 << 9) | \ | ||
36 | + (MICRON_CASL_165 << 4) | (MICRON_SIL_165 << 3) | \ | ||
37 | + (MICRON_BL_165)) | ||
38 | |||
39 | /* NUMONYX part of IGEP v2 (165MHz optimized) 6.06ns */ | ||
40 | #define NUMONYX_TDAL_165 6 /* Twr/Tck + Trp/tck */ | ||
41 | @@ -219,9 +220,9 @@ enum { | ||
42 | #ifdef CONFIG_OMAP3_MICRON_DDR | ||
43 | #define V_ACTIMA_165 MICRON_V_ACTIMA_165 | ||
44 | #define V_ACTIMB_165 MICRON_V_ACTIMB_165 | ||
45 | -#define V_MCFG MICRON_V_MCFG(PHYS_SDRAM_1_SIZE) | ||
46 | +#define V_MCFG MICRON_V_MCFG_165(PHYS_SDRAM_1_SIZE) | ||
47 | #define V_RFR_CTRL SDP_3430_SDRC_RFR_CTRL_165MHz | ||
48 | -#define V_MR MICRON_V_MR | ||
49 | +#define V_MR MICRON_V_MR_165 | ||
50 | #endif | ||
51 | |||
52 | #ifdef CONFIG_OMAP3_NUMONYX_DDR | ||
53 | -- | ||
54 | 1.7.2.5 | ||
55 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0009-OMAP3-SPL-Rework-memory-initalization-and-devkit8000.patch b/recipes-bsp/u-boot/u-boot/2011.09/0009-OMAP3-SPL-Rework-memory-initalization-and-devkit8000.patch deleted file mode 100644 index 7c12e7a5..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09/0009-OMAP3-SPL-Rework-memory-initalization-and-devkit8000.patch +++ /dev/null | |||
@@ -1,174 +0,0 @@ | |||
1 | From bf66bbd9347874b6ad13f7747288327e968022d2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Rini <trini@ti.com> | ||
3 | Date: Fri, 18 Nov 2011 12:48:06 +0000 | ||
4 | Subject: [PATCH 09/21] OMAP3 SPL: Rework memory initalization and devkit8000 support | ||
5 | |||
6 | This changes to making the board be responsible for providing the | ||
7 | memory initialization timings in SPL and converts the devkit8000 | ||
8 | to this framework. In SPL we try and initialize both CS0 and CS1. | ||
9 | |||
10 | Cc: Frederik Kriewitz <frederik@kriewitz.eu> | ||
11 | Signed-off-by: Tom Rini <trini@ti.com> | ||
12 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
13 | --- | ||
14 | arch/arm/cpu/armv7/omap3/sdrc.c | 28 ++++++++++++++------------ | ||
15 | arch/arm/include/asm/arch-omap3/mem.h | 26 ------------------------- | ||
16 | arch/arm/include/asm/arch-omap3/sys_proto.h | 2 + | ||
17 | board/timll/devkit8000/devkit8000.c | 21 ++++++++++++++++++++ | ||
18 | include/configs/devkit8000.h | 5 ---- | ||
19 | 5 files changed, 38 insertions(+), 44 deletions(-) | ||
20 | |||
21 | diff --git a/arch/arm/cpu/armv7/omap3/sdrc.c b/arch/arm/cpu/armv7/omap3/sdrc.c | ||
22 | index 2756024..a27b4b1 100644 | ||
23 | --- a/arch/arm/cpu/armv7/omap3/sdrc.c | ||
24 | +++ b/arch/arm/cpu/armv7/omap3/sdrc.c | ||
25 | @@ -148,6 +148,18 @@ void do_sdrc_init(u32 cs, u32 early) | ||
26 | sdrc_actim_base0 = (struct sdrc_actim *)SDRC_ACTIM_CTRL0_BASE; | ||
27 | sdrc_actim_base1 = (struct sdrc_actim *)SDRC_ACTIM_CTRL1_BASE; | ||
28 | |||
29 | + /* | ||
30 | + * When called in the early context this may be SPL and we will | ||
31 | + * need to set all of the timings. This ends up being board | ||
32 | + * specific so we call a helper function to take care of this | ||
33 | + * for us. Otherwise, to be safe, we need to copy the settings | ||
34 | + * from the first bank to the second. We will setup CS0, | ||
35 | + * then set cs_cfg to the appropriate value then try and | ||
36 | + * setup CS1. | ||
37 | + */ | ||
38 | +#ifdef CONFIG_SPL_BUILD | ||
39 | + get_board_mem_timings(&mcfg, &ctrla, &ctrlb, &rfr_ctrl, &mr); | ||
40 | +#endif | ||
41 | if (early) { | ||
42 | /* reset sdrc controller */ | ||
43 | writel(SOFTRESET, &sdrc_base->sysconfig); | ||
44 | @@ -164,22 +176,12 @@ void do_sdrc_init(u32 cs, u32 early) | ||
45 | |||
46 | writel(ENADLL | DLLPHASE_90, &sdrc_base->dlla_ctrl); | ||
47 | sdelay(0x20000); | ||
48 | -/* As long as V_MCFG and V_RFR_CTRL is not defined for all OMAP3 boards we need | ||
49 | - * to prevent this to be build in non-SPL build */ | ||
50 | #ifdef CONFIG_SPL_BUILD | ||
51 | - /* | ||
52 | - * If we use a SPL there is no x-loader nor config header so | ||
53 | - * we have to do the job ourselfs | ||
54 | - */ | ||
55 | - | ||
56 | - mcfg = V_MCFG; | ||
57 | - ctrla = V_ACTIMA_165; | ||
58 | - ctrlb = V_ACTIMB_165; | ||
59 | - rfr_ctrl = V_RFR_CTRL; | ||
60 | - mr = V_MR; | ||
61 | - | ||
62 | write_sdrc_timings(CS0, sdrc_actim_base0, mcfg, ctrla, ctrlb, | ||
63 | rfr_ctrl, mr); | ||
64 | + make_cs1_contiguous(); | ||
65 | + write_sdrc_timings(CS0, sdrc_actim_base1, mcfg, ctrla, ctrlb, | ||
66 | + rfr_ctrl, mr); | ||
67 | #endif | ||
68 | |||
69 | } | ||
70 | diff --git a/arch/arm/include/asm/arch-omap3/mem.h b/arch/arm/include/asm/arch-omap3/mem.h | ||
71 | index 4f996d9..09f5872 100644 | ||
72 | --- a/arch/arm/include/asm/arch-omap3/mem.h | ||
73 | +++ b/arch/arm/include/asm/arch-omap3/mem.h | ||
74 | @@ -212,32 +212,6 @@ enum { | ||
75 | ACTIM_CTRLB(NUMONYX_TWTR_165, NUMONYX_TCKE_165, \ | ||
76 | NUMONYX_TXP_165, NUMONYX_XSR_165) | ||
77 | |||
78 | -#ifdef CONFIG_OMAP3_INFINEON_DDR | ||
79 | -#define V_ACTIMA_165 INFINEON_V_ACTIMA_165 | ||
80 | -#define V_ACTIMB_165 INFINEON_V_ACTIMB_165 | ||
81 | -#endif | ||
82 | - | ||
83 | -#ifdef CONFIG_OMAP3_MICRON_DDR | ||
84 | -#define V_ACTIMA_165 MICRON_V_ACTIMA_165 | ||
85 | -#define V_ACTIMB_165 MICRON_V_ACTIMB_165 | ||
86 | -#define V_MCFG MICRON_V_MCFG_165(PHYS_SDRAM_1_SIZE) | ||
87 | -#define V_RFR_CTRL SDP_3430_SDRC_RFR_CTRL_165MHz | ||
88 | -#define V_MR MICRON_V_MR_165 | ||
89 | -#endif | ||
90 | - | ||
91 | -#ifdef CONFIG_OMAP3_NUMONYX_DDR | ||
92 | -#define V_ACTIMA_165 NUMONYX_V_ACTIMA_165 | ||
93 | -#define V_ACTIMB_165 NUMONYX_V_ACTIMB_165 | ||
94 | -#endif | ||
95 | - | ||
96 | -#if !defined(V_ACTIMA_165) || !defined(V_ACTIMB_165) | ||
97 | -#error "Please choose the right DDR type in config header" | ||
98 | -#endif | ||
99 | - | ||
100 | -#if defined(CONFIG_SPL_BUILD) && (!defined(V_MCFG) || !defined(V_RFR_CTRL)) | ||
101 | -#error "Please choose the right DDR type in config header" | ||
102 | -#endif | ||
103 | - | ||
104 | /* | ||
105 | * GPMC settings - | ||
106 | * Definitions is as per the following format | ||
107 | diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h b/arch/arm/include/asm/arch-omap3/sys_proto.h | ||
108 | index 9e64410..80e167b 100644 | ||
109 | --- a/arch/arm/include/asm/arch-omap3/sys_proto.h | ||
110 | +++ b/arch/arm/include/asm/arch-omap3/sys_proto.h | ||
111 | @@ -38,6 +38,8 @@ void per_clocks_enable(void); | ||
112 | void memif_init(void); | ||
113 | void sdrc_init(void); | ||
114 | void do_sdrc_init(u32, u32); | ||
115 | +void get_board_mem_timings(u32 *mcfg, u32 *ctrla, u32 *ctrlb, u32 *rfr_ctrl, | ||
116 | + u32 *mr); | ||
117 | void emif4_init(void); | ||
118 | void gpmc_init(void); | ||
119 | void enable_gpmc_cs_config(const u32 *gpmc_config, struct gpmc_cs *cs, u32 base, | ||
120 | diff --git a/board/timll/devkit8000/devkit8000.c b/board/timll/devkit8000/devkit8000.c | ||
121 | index fee0dff..b06aab6 100644 | ||
122 | --- a/board/timll/devkit8000/devkit8000.c | ||
123 | +++ b/board/timll/devkit8000/devkit8000.c | ||
124 | @@ -138,3 +138,24 @@ int board_eth_init(bd_t *bis) | ||
125 | return dm9000_initialize(bis); | ||
126 | } | ||
127 | #endif | ||
128 | + | ||
129 | +/* | ||
130 | + * Routine: get_board_mem_timings | ||
131 | + * Description: If we use SPL then there is no x-loader nor config header | ||
132 | + * so we have to setup the DDR timings ourself on the first bank. This | ||
133 | + * provides the timing values back to the function that configures | ||
134 | + * the memory. We have either one or two banks of 128MB DDR. | ||
135 | + */ | ||
136 | +void get_board_mem_timings(u32 *mcfg, u32 *ctrla, u32 *ctrlb, u32 *rfr_ctrl, | ||
137 | + u32 *mr) | ||
138 | +{ | ||
139 | + /* General SDRC config */ | ||
140 | + *mcfg = MICRON_V_MCFG_165(128 << 20); | ||
141 | + *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz; | ||
142 | + | ||
143 | + /* AC timings */ | ||
144 | + *ctrla = MICRON_V_ACTIMA_165; | ||
145 | + *ctrlb = MICRON_V_ACTIMB_165; | ||
146 | + | ||
147 | + *mr = MICRON_V_MR_165; | ||
148 | +} | ||
149 | diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h | ||
150 | index e1743dc..b3e60cd 100644 | ||
151 | --- a/include/configs/devkit8000.h | ||
152 | +++ b/include/configs/devkit8000.h | ||
153 | @@ -68,10 +68,6 @@ | ||
154 | #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10)) | ||
155 | |||
156 | /* Hardware drivers */ | ||
157 | - | ||
158 | -/* DDR - I use Micron DDR */ | ||
159 | -#define CONFIG_OMAP3_MICRON_DDR 1 | ||
160 | - | ||
161 | /* DM9000 */ | ||
162 | #define CONFIG_NET_RETRY_COUNT 20 | ||
163 | #define CONFIG_DRIVER_DM9000 1 | ||
164 | @@ -284,7 +280,6 @@ | ||
165 | /* Physical Memory Map */ | ||
166 | #define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */ | ||
167 | #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0 | ||
168 | -#define PHYS_SDRAM_1_SIZE (128 << 20) /* at least 128 MiB */ | ||
169 | #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1 | ||
170 | |||
171 | /* SDRAM Bank Allocation method */ | ||
172 | -- | ||
173 | 1.7.2.5 | ||
174 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0010-OMAP3-SPL-Add-identify_nand_chip-function.patch b/recipes-bsp/u-boot/u-boot/2011.09/0010-OMAP3-SPL-Add-identify_nand_chip-function.patch deleted file mode 100644 index 94ef0de3..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09/0010-OMAP3-SPL-Add-identify_nand_chip-function.patch +++ /dev/null | |||
@@ -1,142 +0,0 @@ | |||
1 | From 290ebce5d39112ce80c6180206952aa5cc0ea871 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Rini <trini@ti.com> | ||
3 | Date: Fri, 18 Nov 2011 12:48:07 +0000 | ||
4 | Subject: [PATCH 10/21] OMAP3 SPL: Add identify_nand_chip function | ||
5 | |||
6 | A number of boards are populated with a PoP chip for both DDR and NAND | ||
7 | memory. Other boards may simply use this as an easy way to identify | ||
8 | board revs. So we provide a function that can be called early to reset | ||
9 | the NAND chip and return the result of NAND_CMD_READID. All of this | ||
10 | code is put into spl_id_nand.c and controlled via CONFIG_SPL_OMAP3_ID_NAND. | ||
11 | |||
12 | Signed-off-by: Tom Rini <trini@ti.com> | ||
13 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
14 | --- | ||
15 | arch/arm/cpu/armv7/omap3/Makefile | 3 + | ||
16 | arch/arm/cpu/armv7/omap3/spl_id_nand.c | 87 +++++++++++++++++++++++++++ | ||
17 | arch/arm/include/asm/arch-omap3/sys_proto.h | 1 + | ||
18 | 3 files changed, 91 insertions(+), 0 deletions(-) | ||
19 | create mode 100644 arch/arm/cpu/armv7/omap3/spl_id_nand.c | ||
20 | |||
21 | diff --git a/arch/arm/cpu/armv7/omap3/Makefile b/arch/arm/cpu/armv7/omap3/Makefile | ||
22 | index 8e85891..4b38e45 100644 | ||
23 | --- a/arch/arm/cpu/armv7/omap3/Makefile | ||
24 | +++ b/arch/arm/cpu/armv7/omap3/Makefile | ||
25 | @@ -31,6 +31,9 @@ COBJS += board.o | ||
26 | COBJS += clock.o | ||
27 | COBJS += mem.o | ||
28 | COBJS += sys_info.o | ||
29 | +ifdef CONFIG_SPL_BUILD | ||
30 | +COBJS-$(CONFIG_SPL_OMAP3_ID_NAND) += spl_id_nand.o | ||
31 | +endif | ||
32 | |||
33 | COBJS-$(CONFIG_EMIF4) += emif4.o | ||
34 | COBJS-$(CONFIG_SDRC) += sdrc.o | ||
35 | diff --git a/arch/arm/cpu/armv7/omap3/spl_id_nand.c b/arch/arm/cpu/armv7/omap3/spl_id_nand.c | ||
36 | new file mode 100644 | ||
37 | index 0000000..0871fc9 | ||
38 | --- /dev/null | ||
39 | +++ b/arch/arm/cpu/armv7/omap3/spl_id_nand.c | ||
40 | @@ -0,0 +1,87 @@ | ||
41 | +/* | ||
42 | + * (C) Copyright 2011 | ||
43 | + * Texas Instruments, <www.ti.com> | ||
44 | + * | ||
45 | + * Author : | ||
46 | + * Tom Rini <trini@ti.com> | ||
47 | + * | ||
48 | + * Initial Code from: | ||
49 | + * Richard Woodruff <r-woodruff2@ti.com> | ||
50 | + * Jian Zhang <jzhang@ti.com> | ||
51 | + * | ||
52 | + * This program is free software; you can redistribute it and/or | ||
53 | + * modify it under the terms of the GNU General Public License as | ||
54 | + * published by the Free Software Foundation; either version 2 of | ||
55 | + * the License, or (at your option) any later version. | ||
56 | + * | ||
57 | + * This program is distributed in the hope that it will be useful, | ||
58 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
59 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
60 | + * GNU General Public License for more details. | ||
61 | + * | ||
62 | + * You should have received a copy of the GNU General Public License | ||
63 | + * along with this program; if not, write to the Free Software | ||
64 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
65 | + * MA 02111-1307 USA | ||
66 | + */ | ||
67 | + | ||
68 | +#include <common.h> | ||
69 | +#include <linux/mtd/nand.h> | ||
70 | +#include <asm/io.h> | ||
71 | +#include <asm/arch/sys_proto.h> | ||
72 | +#include <asm/arch/mem.h> | ||
73 | + | ||
74 | +static struct gpmc *gpmc_config = (struct gpmc *)GPMC_BASE; | ||
75 | + | ||
76 | +/* nand_command: Send a flash command to the flash chip */ | ||
77 | +static void nand_command(u8 command) | ||
78 | +{ | ||
79 | + writeb(command, &gpmc_config->cs[0].nand_cmd); | ||
80 | + | ||
81 | + if (command == NAND_CMD_RESET) { | ||
82 | + unsigned char ret_val; | ||
83 | + writeb(NAND_CMD_STATUS, &gpmc_config->cs[0].nand_cmd); | ||
84 | + do { | ||
85 | + /* Wait until ready */ | ||
86 | + ret_val = readl(&gpmc_config->cs[0].nand_dat); | ||
87 | + } while ((ret_val & NAND_STATUS_READY) != NAND_STATUS_READY); | ||
88 | + } | ||
89 | +} | ||
90 | + | ||
91 | +/* | ||
92 | + * Many boards will want to know the results of the NAND_CMD_READID command | ||
93 | + * in order to decide what to do about DDR initialization. This function | ||
94 | + * allows us to do that very early and to pass those results back to the | ||
95 | + * board so it can make whatever decisions need to be made. | ||
96 | + */ | ||
97 | +void identify_nand_chip(int *mfr, int *id) | ||
98 | +{ | ||
99 | + /* Make sure that we have setup GPMC for NAND correctly. */ | ||
100 | + writel(M_NAND_GPMC_CONFIG1, &gpmc_config->cs[0].config1); | ||
101 | + writel(M_NAND_GPMC_CONFIG2, &gpmc_config->cs[0].config2); | ||
102 | + writel(M_NAND_GPMC_CONFIG3, &gpmc_config->cs[0].config3); | ||
103 | + writel(M_NAND_GPMC_CONFIG4, &gpmc_config->cs[0].config4); | ||
104 | + writel(M_NAND_GPMC_CONFIG5, &gpmc_config->cs[0].config5); | ||
105 | + writel(M_NAND_GPMC_CONFIG6, &gpmc_config->cs[0].config6); | ||
106 | + | ||
107 | + /* | ||
108 | + * Enable the config. The CS size goes in bits 11:8. We set | ||
109 | + * bit 6 to enable the CS and the base address goes into bits 5:0. | ||
110 | + */ | ||
111 | + writel((GPMC_SIZE_128M << 8) | (GPMC_CS_ENABLE << 6) | | ||
112 | + ((NAND_BASE >> 24) & GPMC_BASEADDR_MASK), | ||
113 | + &gpmc_config->cs[0].config7); | ||
114 | + | ||
115 | + sdelay(2000); | ||
116 | + | ||
117 | + /* Issue a RESET and then READID */ | ||
118 | + nand_command(NAND_CMD_RESET); | ||
119 | + nand_command(NAND_CMD_READID); | ||
120 | + | ||
121 | + /* Set the address to read to 0x0 */ | ||
122 | + writeb(0x0, &gpmc_config->cs[0].nand_adr); | ||
123 | + | ||
124 | + /* Read off the manufacturer and device id. */ | ||
125 | + *mfr = readb(&gpmc_config->cs[0].nand_dat); | ||
126 | + *id = readb(&gpmc_config->cs[0].nand_dat); | ||
127 | +} | ||
128 | diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h b/arch/arm/include/asm/arch-omap3/sys_proto.h | ||
129 | index 80e167b..e5031d5 100644 | ||
130 | --- a/arch/arm/include/asm/arch-omap3/sys_proto.h | ||
131 | +++ b/arch/arm/include/asm/arch-omap3/sys_proto.h | ||
132 | @@ -40,6 +40,7 @@ void sdrc_init(void); | ||
133 | void do_sdrc_init(u32, u32); | ||
134 | void get_board_mem_timings(u32 *mcfg, u32 *ctrla, u32 *ctrlb, u32 *rfr_ctrl, | ||
135 | u32 *mr); | ||
136 | +void identify_nand_chip(int *mfr, int *id); | ||
137 | void emif4_init(void); | ||
138 | void gpmc_init(void); | ||
139 | void enable_gpmc_cs_config(const u32 *gpmc_config, struct gpmc_cs *cs, u32 base, | ||
140 | -- | ||
141 | 1.7.2.5 | ||
142 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0011-OMAP3-Add-SPL-support-to-Beagleboard.patch b/recipes-bsp/u-boot/u-boot/2011.09/0011-OMAP3-Add-SPL-support-to-Beagleboard.patch deleted file mode 100644 index a32c21d1..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09/0011-OMAP3-Add-SPL-support-to-Beagleboard.patch +++ /dev/null | |||
@@ -1,315 +0,0 @@ | |||
1 | From 4ce72b52b5eeb172c1118fbd6e23d49eeec30ad2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Rini <trini@ti.com> | ||
3 | Date: Fri, 18 Nov 2011 12:48:08 +0000 | ||
4 | Subject: [PATCH 11/21] OMAP3: Add SPL support to Beagleboard | ||
5 | |||
6 | This introduces 200MHz Micron parts timing information based on x-loader | ||
7 | to <asm/arch-omap3/mem.h> and Numonyx MCFG calculation. The memory init | ||
8 | logic is also based on what x-loader does in these cases. Note that | ||
9 | while previously u-boot would be flashed in with SW ECC in this case it | ||
10 | now must be flashed with HW ECC. We also change CONFIG_SYS_TEXT_BASE to | ||
11 | 0x80100000. | ||
12 | |||
13 | Cc: Dirk Behme <dirk.behme@gmail.com> | ||
14 | Beagleboard rev C5, xM rev A: | ||
15 | Tested-by: Tom Rini <trini@ti.com> | ||
16 | Beagleboard xM rev C: | ||
17 | Tested-by: Matt Ranostay <mranostay@gmail.com> | ||
18 | Beagleboard rev B7, C2, xM rev B: | ||
19 | Tested-by: Matt Porter <mporter@ti.com> | ||
20 | Signed-off-by: Tom Rini <trini@ti.com> | ||
21 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
22 | --- | ||
23 | arch/arm/include/asm/arch-omap3/mem.h | 29 +++++++++++++ | ||
24 | board/ti/beagle/beagle.c | 71 ++++++++++++++++++++++++++++++++- | ||
25 | board/ti/beagle/config.mk | 33 --------------- | ||
26 | include/configs/omap3_beagle.h | 59 +++++++++++++++++++++++++-- | ||
27 | 4 files changed, 153 insertions(+), 39 deletions(-) | ||
28 | delete mode 100644 board/ti/beagle/config.mk | ||
29 | |||
30 | diff --git a/arch/arm/include/asm/arch-omap3/mem.h b/arch/arm/include/asm/arch-omap3/mem.h | ||
31 | index 09f5872..4ea5f74 100644 | ||
32 | --- a/arch/arm/include/asm/arch-omap3/mem.h | ||
33 | +++ b/arch/arm/include/asm/arch-omap3/mem.h | ||
34 | @@ -186,6 +186,32 @@ enum { | ||
35 | (MICRON_CASL_165 << 4) | (MICRON_SIL_165 << 3) | \ | ||
36 | (MICRON_BL_165)) | ||
37 | |||
38 | +/* Micron part (200MHz optimized) 5 ns */ | ||
39 | +#define MICRON_TDAL_200 6 | ||
40 | +#define MICRON_TDPL_200 3 | ||
41 | +#define MICRON_TRRD_200 2 | ||
42 | +#define MICRON_TRCD_200 3 | ||
43 | +#define MICRON_TRP_200 3 | ||
44 | +#define MICRON_TRAS_200 8 | ||
45 | +#define MICRON_TRC_200 11 | ||
46 | +#define MICRON_TRFC_200 15 | ||
47 | +#define MICRON_V_ACTIMA_200 \ | ||
48 | + ACTIM_CTRLA(MICRON_TRFC_200, MICRON_TRC_200, \ | ||
49 | + MICRON_TRAS_200, MICRON_TRP_200, \ | ||
50 | + MICRON_TRCD_200, MICRON_TRRD_200, \ | ||
51 | + MICRON_TDPL_200, MICRON_TDAL_200) | ||
52 | + | ||
53 | +#define MICRON_TWTR_200 2 | ||
54 | +#define MICRON_TCKE_200 4 | ||
55 | +#define MICRON_TXP_200 2 | ||
56 | +#define MICRON_XSR_200 23 | ||
57 | +#define MICRON_V_ACTIMB_200 \ | ||
58 | + ACTIM_CTRLB(MICRON_TWTR_200, MICRON_TCKE_200, \ | ||
59 | + MICRON_TXP_200, MICRON_XSR_200) | ||
60 | + | ||
61 | +#define MICRON_RASWIDTH_200 0x3 | ||
62 | +#define MICRON_V_MCFG_200(size) MCFG((size), MICRON_RASWIDTH_200) | ||
63 | + | ||
64 | /* NUMONYX part of IGEP v2 (165MHz optimized) 6.06ns */ | ||
65 | #define NUMONYX_TDAL_165 6 /* Twr/Tck + Trp/tck */ | ||
66 | /* 15/6 + 18/6 = 5.5 -> 6 */ | ||
67 | @@ -212,6 +238,9 @@ enum { | ||
68 | ACTIM_CTRLB(NUMONYX_TWTR_165, NUMONYX_TCKE_165, \ | ||
69 | NUMONYX_TXP_165, NUMONYX_XSR_165) | ||
70 | |||
71 | +#define NUMONYX_RASWIDTH_165 0x4 | ||
72 | +#define NUMONYX_V_MCFG_165(size) MCFG((size), NUMONYX_RASWIDTH_165) | ||
73 | + | ||
74 | /* | ||
75 | * GPMC settings - | ||
76 | * Definitions is as per the following format | ||
77 | diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c | ||
78 | index 9482c5e..6a457cb 100644 | ||
79 | --- a/board/ti/beagle/beagle.c | ||
80 | +++ b/board/ti/beagle/beagle.c | ||
81 | @@ -1,5 +1,5 @@ | ||
82 | /* | ||
83 | - * (C) Copyright 2004-2008 | ||
84 | + * (C) Copyright 2004-2011 | ||
85 | * Texas Instruments, <www.ti.com> | ||
86 | * | ||
87 | * Author : | ||
88 | @@ -34,9 +34,11 @@ | ||
89 | #include <status_led.h> | ||
90 | #endif | ||
91 | #include <twl4030.h> | ||
92 | +#include <linux/mtd/nand.h> | ||
93 | #include <asm/io.h> | ||
94 | #include <asm/arch/mmc_host_def.h> | ||
95 | #include <asm/arch/mux.h> | ||
96 | +#include <asm/arch/mem.h> | ||
97 | #include <asm/arch/sys_proto.h> | ||
98 | #include <asm/gpio.h> | ||
99 | #include <asm/mach-types.h> | ||
100 | @@ -135,6 +137,69 @@ int get_board_revision(void) | ||
101 | return revision; | ||
102 | } | ||
103 | |||
104 | +#ifdef CONFIG_SPL_BUILD | ||
105 | +/* | ||
106 | + * Routine: get_board_mem_timings | ||
107 | + * Description: If we use SPL then there is no x-loader nor config header | ||
108 | + * so we have to setup the DDR timings ourself on both banks. | ||
109 | + */ | ||
110 | +void get_board_mem_timings(u32 *mcfg, u32 *ctrla, u32 *ctrlb, u32 *rfr_ctrl, | ||
111 | + u32 *mr) | ||
112 | +{ | ||
113 | + int pop_mfr, pop_id; | ||
114 | + | ||
115 | + /* | ||
116 | + * We need to identify what PoP memory is on the board so that | ||
117 | + * we know what timings to use. If we can't identify it then | ||
118 | + * we know it's an xM. To map the ID values please see nand_ids.c | ||
119 | + */ | ||
120 | + identify_nand_chip(&pop_mfr, &pop_id); | ||
121 | + | ||
122 | + *mr = MICRON_V_MR_165; | ||
123 | + switch (get_board_revision()) { | ||
124 | + case REVISION_C4: | ||
125 | + if (pop_mfr == NAND_MFR_STMICRO && pop_id == 0xba) { | ||
126 | + /* 512MB DDR */ | ||
127 | + *mcfg = NUMONYX_V_MCFG_165(512 << 20); | ||
128 | + *ctrla = NUMONYX_V_ACTIMA_165; | ||
129 | + *ctrlb = NUMONYX_V_ACTIMB_165; | ||
130 | + *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz; | ||
131 | + break; | ||
132 | + } else if (pop_mfr == NAND_MFR_MICRON && pop_id == 0xbc) { | ||
133 | + /* Beagleboard Rev C5, 256MB DDR */ | ||
134 | + *mcfg = MICRON_V_MCFG_200(256 << 20); | ||
135 | + *ctrla = MICRON_V_ACTIMA_200; | ||
136 | + *ctrlb = MICRON_V_ACTIMB_200; | ||
137 | + *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz; | ||
138 | + break; | ||
139 | + } | ||
140 | + case REVISION_XM_A: | ||
141 | + case REVISION_XM_B: | ||
142 | + case REVISION_XM_C: | ||
143 | + if (pop_mfr == 0) { | ||
144 | + /* 256MB DDR */ | ||
145 | + *mcfg = MICRON_V_MCFG_200(256 << 20); | ||
146 | + *ctrla = MICRON_V_ACTIMA_200; | ||
147 | + *ctrlb = MICRON_V_ACTIMB_200; | ||
148 | + *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz; | ||
149 | + } else { | ||
150 | + /* 512MB DDR */ | ||
151 | + *mcfg = NUMONYX_V_MCFG_165(512 << 20); | ||
152 | + *ctrla = NUMONYX_V_ACTIMA_165; | ||
153 | + *ctrlb = NUMONYX_V_ACTIMB_165; | ||
154 | + *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz; | ||
155 | + } | ||
156 | + break; | ||
157 | + default: | ||
158 | + /* Assume 128MB and Micron/165MHz timings to be safe */ | ||
159 | + *mcfg = MICRON_V_MCFG_165(128 << 20); | ||
160 | + *ctrla = MICRON_V_ACTIMA_165; | ||
161 | + *ctrlb = MICRON_V_ACTIMB_165; | ||
162 | + *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz; | ||
163 | + } | ||
164 | +} | ||
165 | +#endif | ||
166 | + | ||
167 | /* | ||
168 | * Routine: get_expansion_id | ||
169 | * Description: This function checks for expansion board by checking I2C | ||
170 | @@ -367,7 +432,7 @@ void set_muxconf_regs(void) | ||
171 | MUX_BEAGLE(); | ||
172 | } | ||
173 | |||
174 | -#ifdef CONFIG_GENERIC_MMC | ||
175 | +#if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD) | ||
176 | int board_mmc_init(bd_t *bis) | ||
177 | { | ||
178 | omap_mmc_init(0); | ||
179 | @@ -476,6 +541,7 @@ int ehci_hcd_init(void) | ||
180 | |||
181 | #endif /* CONFIG_USB_EHCI */ | ||
182 | |||
183 | +#ifndef CONFIG_SPL_BUILD | ||
184 | /* | ||
185 | * This command returns the status of the user button on beagle xM | ||
186 | * Input - none | ||
187 | @@ -528,3 +594,4 @@ U_BOOT_CMD( | ||
188 | "Return the status of the BeagleBoard USER button", | ||
189 | "" | ||
190 | ); | ||
191 | +#endif | ||
192 | diff --git a/board/ti/beagle/config.mk b/board/ti/beagle/config.mk | ||
193 | deleted file mode 100644 | ||
194 | index cf055db..0000000 | ||
195 | --- a/board/ti/beagle/config.mk | ||
196 | +++ /dev/null | ||
197 | @@ -1,33 +0,0 @@ | ||
198 | -# | ||
199 | -# (C) Copyright 2006 | ||
200 | -# Texas Instruments, <www.ti.com> | ||
201 | -# | ||
202 | -# Beagle Board uses OMAP3 (ARM-CortexA8) cpu | ||
203 | -# see http://www.ti.com/ for more information on Texas Instruments | ||
204 | -# | ||
205 | -# See file CREDITS for list of people who contributed to this | ||
206 | -# project. | ||
207 | -# | ||
208 | -# This program is free software; you can redistribute it and/or | ||
209 | -# modify it under the terms of the GNU General Public License as | ||
210 | -# published by the Free Software Foundation; either version 2 of | ||
211 | -# the License, or (at your option) any later version. | ||
212 | -# | ||
213 | -# This program is distributed in the hope that it will be useful, | ||
214 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
215 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
216 | -# GNU General Public License for more details. | ||
217 | -# | ||
218 | -# You should have received a copy of the GNU General Public License | ||
219 | -# along with this program; if not, write to the Free Software | ||
220 | -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
221 | -# MA 02111-1307 USA | ||
222 | -# | ||
223 | -# Physical Address: | ||
224 | -# 8000'0000 (bank0) | ||
225 | -# A000/0000 (bank1) | ||
226 | -# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000 | ||
227 | -# (mem base + reserved) | ||
228 | - | ||
229 | -# For use with external or internal boots. | ||
230 | -CONFIG_SYS_TEXT_BASE = 0x80008000 | ||
231 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
232 | index 15e40c5..941ec38 100644 | ||
233 | --- a/include/configs/omap3_beagle.h | ||
234 | +++ b/include/configs/omap3_beagle.h | ||
235 | @@ -111,9 +111,6 @@ | ||
236 | #define STATUS_LED_BOOT STATUS_LED_BIT | ||
237 | #define STATUS_LED_GREEN STATUS_LED_BIT1 | ||
238 | |||
239 | -/* DDR - I use Micron DDR */ | ||
240 | -#define CONFIG_OMAP3_MICRON_DDR 1 | ||
241 | - | ||
242 | /* Enable Multi Bus support for I2C */ | ||
243 | #define CONFIG_I2C_MULTI_BUS 1 | ||
244 | |||
245 | @@ -347,7 +344,6 @@ | ||
246 | */ | ||
247 | #define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */ | ||
248 | #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0 | ||
249 | -#define PHYS_SDRAM_1_SIZE (32 << 20) /* at least 32 MiB */ | ||
250 | #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1 | ||
251 | |||
252 | /* SDRAM Bank Allocation method */ | ||
253 | @@ -390,4 +386,59 @@ | ||
254 | |||
255 | #define CONFIG_OMAP3_SPI | ||
256 | |||
257 | +/* Defines for SPL */ | ||
258 | +#define CONFIG_SPL | ||
259 | +#define CONFIG_SPL_NAND_SIMPLE | ||
260 | +#define CONFIG_SPL_TEXT_BASE 0x40200800 | ||
261 | +#define CONFIG_SPL_MAX_SIZE (45 * 1024) | ||
262 | +#define CONFIG_SPL_STACK LOW_LEVEL_SRAM_STACK | ||
263 | + | ||
264 | +#define CONFIG_SPL_BSS_START_ADDR 0x80000000 | ||
265 | +#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */ | ||
266 | + | ||
267 | +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */ | ||
268 | +#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x200 /* 256 KB */ | ||
269 | +#define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION 1 | ||
270 | +#define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME "u-boot.img" | ||
271 | + | ||
272 | +#define CONFIG_SPL_LIBCOMMON_SUPPORT | ||
273 | +#define CONFIG_SPL_LIBDISK_SUPPORT | ||
274 | +#define CONFIG_SPL_I2C_SUPPORT | ||
275 | +#define CONFIG_SPL_LIBGENERIC_SUPPORT | ||
276 | +#define CONFIG_SPL_MMC_SUPPORT | ||
277 | +#define CONFIG_SPL_FAT_SUPPORT | ||
278 | +#define CONFIG_SPL_SERIAL_SUPPORT | ||
279 | +#define CONFIG_SPL_NAND_SUPPORT | ||
280 | +#define CONFIG_SPL_POWER_SUPPORT | ||
281 | +#define CONFIG_SPL_OMAP3_ID_NAND | ||
282 | +#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds" | ||
283 | + | ||
284 | +/* NAND boot config */ | ||
285 | +#define CONFIG_SYS_NAND_5_ADDR_CYCLE | ||
286 | +#define CONFIG_SYS_NAND_PAGE_COUNT 64 | ||
287 | +#define CONFIG_SYS_NAND_PAGE_SIZE 2048 | ||
288 | +#define CONFIG_SYS_NAND_OOBSIZE 64 | ||
289 | +#define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024) | ||
290 | +#define CONFIG_SYS_NAND_BAD_BLOCK_POS 0 | ||
291 | +#define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9,\ | ||
292 | + 10, 11, 12, 13} | ||
293 | +#define CONFIG_SYS_NAND_ECCSIZE 512 | ||
294 | +#define CONFIG_SYS_NAND_ECCBYTES 3 | ||
295 | +#define CONFIG_SYS_NAND_ECCSTEPS (CONFIG_SYS_NAND_PAGE_SIZE / \ | ||
296 | + CONFIG_SYS_NAND_ECCSIZE) | ||
297 | +#define CONFIG_SYS_NAND_ECCTOTAL (CONFIG_SYS_NAND_ECCBYTES * \ | ||
298 | + CONFIG_SYS_NAND_ECCSTEPS) | ||
299 | +#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE | ||
300 | +#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 | ||
301 | + | ||
302 | +/* | ||
303 | + * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM | ||
304 | + * 64 bytes before this address should be set aside for u-boot.img's | ||
305 | + * header. That is 0x800FFFC0--0x80100000 should not be used for any | ||
306 | + * other needs. | ||
307 | + */ | ||
308 | +#define CONFIG_SYS_TEXT_BASE 0x80100000 | ||
309 | +#define CONFIG_SYS_SPL_MALLOC_START 0x80208000 | ||
310 | +#define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000 | ||
311 | + | ||
312 | #endif /* __CONFIG_H */ | ||
313 | -- | ||
314 | 1.7.2.5 | ||
315 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0012-OMAP3-Add-SPL-support-to-omap3_evm.patch b/recipes-bsp/u-boot/u-boot/2011.09/0012-OMAP3-Add-SPL-support-to-omap3_evm.patch deleted file mode 100644 index 7121ff7e..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09/0012-OMAP3-Add-SPL-support-to-omap3_evm.patch +++ /dev/null | |||
@@ -1,319 +0,0 @@ | |||
1 | From a2985d6ef29ee6eb09ad1b40cf09f955549e66e2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Rini <trini@ti.com> | ||
3 | Date: Fri, 18 Nov 2011 12:48:09 +0000 | ||
4 | Subject: [PATCH 12/21] OMAP3: Add SPL support to omap3_evm | ||
5 | |||
6 | Add Hynix 200MHz timing information to <asm/arch-omap3/mem.h>. | ||
7 | This also changes CONFIG_SYS_TEXT_BASE to 0x80100000. | ||
8 | |||
9 | Signed-off-by: Tom Rini <trini@ti.com> | ||
10 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
11 | --- | ||
12 | arch/arm/include/asm/arch-omap3/mem.h | 26 ++++++++++++++++++++ | ||
13 | board/ti/evm/config.mk | 33 ------------------------- | ||
14 | board/ti/evm/evm.c | 41 ++++++++++++++++++++++++++++++- | ||
15 | include/configs/omap3_evm.h | 27 +++++++++++++++++++++ | ||
16 | include/configs/omap3_evm_common.h | 30 +++++++++++++++++++++- | ||
17 | include/configs/omap3_evm_quick_mmc.h | 10 +++++++ | ||
18 | include/configs/omap3_evm_quick_nand.h | 22 +++++++++++++++++ | ||
19 | 7 files changed, 152 insertions(+), 37 deletions(-) | ||
20 | delete mode 100644 board/ti/evm/config.mk | ||
21 | |||
22 | diff --git a/arch/arm/include/asm/arch-omap3/mem.h b/arch/arm/include/asm/arch-omap3/mem.h | ||
23 | index 4ea5f74..5fd02d4 100644 | ||
24 | --- a/arch/arm/include/asm/arch-omap3/mem.h | ||
25 | +++ b/arch/arm/include/asm/arch-omap3/mem.h | ||
26 | @@ -123,6 +123,32 @@ enum { | ||
27 | V_MCFG_BANKALLOCATION_RBC | \ | ||
28 | V_MCFG_B32NOT16_32 | V_MCFG_DEEPPD_EN | V_MCFG_RAMTYPE_DDR | ||
29 | |||
30 | +/* Hynix part of AM/DM37xEVM (200MHz optimized) */ | ||
31 | +#define HYNIX_TDAL_200 6 | ||
32 | +#define HYNIX_TDPL_200 3 | ||
33 | +#define HYNIX_TRRD_200 2 | ||
34 | +#define HYNIX_TRCD_200 4 | ||
35 | +#define HYNIX_TRP_200 3 | ||
36 | +#define HYNIX_TRAS_200 8 | ||
37 | +#define HYNIX_TRC_200 11 | ||
38 | +#define HYNIX_TRFC_200 18 | ||
39 | +#define HYNIX_V_ACTIMA_200 \ | ||
40 | + ACTIM_CTRLA(HYNIX_TRFC_200, HYNIX_TRC_200, \ | ||
41 | + HYNIX_TRAS_200, HYNIX_TRP_200, \ | ||
42 | + HYNIX_TRCD_200, HYNIX_TRRD_200, \ | ||
43 | + HYNIX_TDPL_200, HYNIX_TDAL_200) | ||
44 | + | ||
45 | +#define HYNIX_TWTR_200 2 | ||
46 | +#define HYNIX_TCKE_200 1 | ||
47 | +#define HYNIX_TXP_200 1 | ||
48 | +#define HYNIX_XSR_200 28 | ||
49 | +#define HYNIX_V_ACTIMB_200 \ | ||
50 | + ACTIM_CTRLB(HYNIX_TWTR_200, HYNIX_TCKE_200, \ | ||
51 | + HYNIX_TXP_200, HYNIX_XSR_200) | ||
52 | + | ||
53 | +#define HYNIX_RASWIDTH_200 0x3 | ||
54 | +#define HYNIX_V_MCFG_200(size) MCFG((size), HYNIX_RASWIDTH_200) | ||
55 | + | ||
56 | /* Infineon part of 3430SDP (165MHz optimized) 6.06ns */ | ||
57 | #define INFINEON_TDAL_165 6 /* Twr/Tck + Trp/tck */ | ||
58 | /* 15/6 + 18/6 = 5.5 -> 6 */ | ||
59 | diff --git a/board/ti/evm/config.mk b/board/ti/evm/config.mk | ||
60 | deleted file mode 100644 | ||
61 | index d173eef..0000000 | ||
62 | --- a/board/ti/evm/config.mk | ||
63 | +++ /dev/null | ||
64 | @@ -1,33 +0,0 @@ | ||
65 | -# | ||
66 | -# (C) Copyright 2006 - 2008 | ||
67 | -# Texas Instruments, <www.ti.com> | ||
68 | -# | ||
69 | -# EVM uses OMAP3 (ARM-CortexA8) cpu | ||
70 | -# see http://www.ti.com/ for more information on Texas Instruments | ||
71 | -# | ||
72 | -# See file CREDITS for list of people who contributed to this | ||
73 | -# project. | ||
74 | -# | ||
75 | -# This program is free software; you can redistribute it and/or | ||
76 | -# modify it under the terms of the GNU General Public License as | ||
77 | -# published by the Free Software Foundation; either version 2 of | ||
78 | -# the License, or (at your option) any later version. | ||
79 | -# | ||
80 | -# This program is distributed in the hope that it will be useful, | ||
81 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
82 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
83 | -# GNU General Public License for more details. | ||
84 | -# | ||
85 | -# You should have received a copy of the GNU General Public License | ||
86 | -# along with this program; if not, write to the Free Software | ||
87 | -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
88 | -# MA 02111-1307 USA | ||
89 | -# | ||
90 | -# Physical Address: | ||
91 | -# 8000'0000 (bank0) | ||
92 | -# A000/0000 (bank1) | ||
93 | -# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000 | ||
94 | -# (mem base + reserved) | ||
95 | - | ||
96 | -# For use with external or internal boots. | ||
97 | -CONFIG_SYS_TEXT_BASE = 0x80008000 | ||
98 | diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c | ||
99 | index 8c43463..8497aee 100644 | ||
100 | --- a/board/ti/evm/evm.c | ||
101 | +++ b/board/ti/evm/evm.c | ||
102 | @@ -1,5 +1,5 @@ | ||
103 | /* | ||
104 | - * (C) Copyright 2004-2008 | ||
105 | + * (C) Copyright 2004-2011 | ||
106 | * Texas Instruments, <www.ti.com> | ||
107 | * | ||
108 | * Author : | ||
109 | @@ -37,6 +37,7 @@ | ||
110 | #include <asm/gpio.h> | ||
111 | #include <i2c.h> | ||
112 | #include <asm/mach-types.h> | ||
113 | +#include <linux/mtd/nand.h> | ||
114 | #include "evm.h" | ||
115 | |||
116 | #define OMAP3EVM_GPIO_ETH_RST_GEN1 64 | ||
117 | @@ -119,6 +120,42 @@ int board_init(void) | ||
118 | return 0; | ||
119 | } | ||
120 | |||
121 | +#ifdef CONFIG_SPL_BUILD | ||
122 | +/* | ||
123 | + * Routine: get_board_mem_timings | ||
124 | + * Description: If we use SPL then there is no x-loader nor config header | ||
125 | + * so we have to setup the DDR timings ourself on the first bank. This | ||
126 | + * provides the timing values back to the function that configures | ||
127 | + * the memory. | ||
128 | + */ | ||
129 | +void get_board_mem_timings(u32 *mcfg, u32 *ctrla, u32 *ctrlb, u32 *rfr_ctrl, | ||
130 | + u32 *mr) | ||
131 | +{ | ||
132 | + int pop_mfr, pop_id; | ||
133 | + | ||
134 | + /* | ||
135 | + * We need to identify what PoP memory is on the board so that | ||
136 | + * we know what timings to use. To map the ID values please see | ||
137 | + * nand_ids.c | ||
138 | + */ | ||
139 | + identify_nand_chip(&pop_mfr, &pop_id); | ||
140 | + | ||
141 | + if (pop_mfr == NAND_MFR_HYNIX && pop_id == 0xbc) { | ||
142 | + /* 256MB DDR */ | ||
143 | + *mcfg = HYNIX_V_MCFG_200(256 << 20); | ||
144 | + *ctrla = HYNIX_V_ACTIMA_200; | ||
145 | + *ctrlb = HYNIX_V_ACTIMB_200; | ||
146 | + } else { | ||
147 | + /* 128MB DDR */ | ||
148 | + *mcfg = MICRON_V_MCFG_165(128 << 20); | ||
149 | + *ctrla = MICRON_V_ACTIMA_165; | ||
150 | + *ctrlb = MICRON_V_ACTIMB_165; | ||
151 | + } | ||
152 | + *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz; | ||
153 | + *mr = MICRON_V_MR_165; | ||
154 | +} | ||
155 | +#endif | ||
156 | + | ||
157 | /* | ||
158 | * Routine: misc_init_r | ||
159 | * Description: Init ethernet (done here so udelay works) | ||
160 | @@ -238,7 +275,7 @@ int board_eth_init(bd_t *bis) | ||
161 | } | ||
162 | #endif /* CONFIG_CMD_NET */ | ||
163 | |||
164 | -#ifdef CONFIG_GENERIC_MMC | ||
165 | +#if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD) | ||
166 | int board_mmc_init(bd_t *bis) | ||
167 | { | ||
168 | omap_mmc_init(0); | ||
169 | diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h | ||
170 | index 47ec39f..dc611ca 100644 | ||
171 | --- a/include/configs/omap3_evm.h | ||
172 | +++ b/include/configs/omap3_evm.h | ||
173 | @@ -84,6 +84,13 @@ | ||
174 | #define CONFIG_GENERIC_MMC | ||
175 | #define CONFIG_OMAP_HSMMC | ||
176 | #define CONFIG_DOS_PARTITION | ||
177 | +/* SPL */ | ||
178 | +#define CONFIG_SPL_MMC_SUPPORT | ||
179 | +#define CONFIG_SPL_FAT_SUPPORT | ||
180 | +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */ | ||
181 | +#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x200 /* 256 KB */ | ||
182 | +#define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION 1 | ||
183 | +#define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME "u-boot.img" | ||
184 | |||
185 | /* USB | ||
186 | * | ||
187 | @@ -94,6 +101,26 @@ | ||
188 | #define CONFIG_MUSB_HCD | ||
189 | /* #define CONFIG_MUSB_UDC */ | ||
190 | |||
191 | +/* NAND SPL */ | ||
192 | +#define CONFIG_SPL_NAND_SIMPLE | ||
193 | +#define CONFIG_SPL_NAND_SUPPORT | ||
194 | +#define CONFIG_SYS_NAND_5_ADDR_CYCLE | ||
195 | +#define CONFIG_SYS_NAND_PAGE_COUNT 64 | ||
196 | +#define CONFIG_SYS_NAND_PAGE_SIZE 2048 | ||
197 | +#define CONFIG_SYS_NAND_OOBSIZE 64 | ||
198 | +#define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024) | ||
199 | +#define CONFIG_SYS_NAND_BAD_BLOCK_POS 0 | ||
200 | +#define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9,\ | ||
201 | + 10, 11, 12, 13} | ||
202 | +#define CONFIG_SYS_NAND_ECCSIZE 512 | ||
203 | +#define CONFIG_SYS_NAND_ECCBYTES 3 | ||
204 | +#define CONFIG_SYS_NAND_ECCSTEPS (CONFIG_SYS_NAND_PAGE_SIZE / \ | ||
205 | + CONFIG_SYS_NAND_ECCSIZE) | ||
206 | +#define CONFIG_SYS_NAND_ECCTOTAL (CONFIG_SYS_NAND_ECCBYTES * \ | ||
207 | + CONFIG_SYS_NAND_ECCSTEPS) | ||
208 | +#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE | ||
209 | +#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 | ||
210 | + | ||
211 | /* ----------------------------------------------------------------------------- | ||
212 | * Include common board configuration | ||
213 | * ----------------------------------------------------------------------------- | ||
214 | diff --git a/include/configs/omap3_evm_common.h b/include/configs/omap3_evm_common.h | ||
215 | index 54aa7a7..a2aeb76 100644 | ||
216 | --- a/include/configs/omap3_evm_common.h | ||
217 | +++ b/include/configs/omap3_evm_common.h | ||
218 | @@ -27,7 +27,6 @@ | ||
219 | #define CONFIG_SDRC /* The chip has SDRC controller */ | ||
220 | |||
221 | #define CONFIG_OMAP3_EVM /* This is a OMAP3 EVM */ | ||
222 | -#define CONFIG_OMAP3_MICRON_DDR /* with MICRON DDR part */ | ||
223 | #define CONFIG_TWL4030_POWER /* with TWL4030 PMIC */ | ||
224 | |||
225 | #undef CONFIG_USE_IRQ /* no support for IRQs */ | ||
226 | @@ -71,7 +70,6 @@ | ||
227 | */ | ||
228 | #define CONFIG_NR_DRAM_BANKS 2 | ||
229 | #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0 | ||
230 | -#define PHYS_SDRAM_1_SIZE (32 << 20) | ||
231 | #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1 | ||
232 | |||
233 | /* SDRAM Bank Allocation method */ | ||
234 | @@ -289,4 +287,32 @@ | ||
235 | /* Uncomment to define the board revision statically */ | ||
236 | /* #define CONFIG_STATIC_BOARD_REV OMAP3EVM_BOARD_GEN_2 */ | ||
237 | |||
238 | +/* Defines for SPL */ | ||
239 | +#define CONFIG_SPL | ||
240 | +#define CONFIG_SPL_TEXT_BASE 0x40200800 | ||
241 | +#define CONFIG_SPL_MAX_SIZE (45 * 1024) /* 45 KB */ | ||
242 | +#define CONFIG_SPL_STACK LOW_LEVEL_SRAM_STACK | ||
243 | + | ||
244 | +#define CONFIG_SPL_BSS_START_ADDR 0x80000000 | ||
245 | +#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */ | ||
246 | + | ||
247 | +#define CONFIG_SPL_LIBCOMMON_SUPPORT | ||
248 | +#define CONFIG_SPL_LIBDISK_SUPPORT | ||
249 | +#define CONFIG_SPL_I2C_SUPPORT | ||
250 | +#define CONFIG_SPL_LIBGENERIC_SUPPORT | ||
251 | +#define CONFIG_SPL_SERIAL_SUPPORT | ||
252 | +#define CONFIG_SPL_POWER_SUPPORT | ||
253 | +#define CONFIG_SPL_OMAP3_ID_NAND | ||
254 | +#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds" | ||
255 | + | ||
256 | +/* | ||
257 | + * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM | ||
258 | + * 64 bytes before this address should be set aside for u-boot.img's | ||
259 | + * header. That is 0x800FFFC0--0x80100000 should not be used for any | ||
260 | + * other needs. | ||
261 | + */ | ||
262 | +#define CONFIG_SYS_TEXT_BASE 0x80100000 | ||
263 | +#define CONFIG_SYS_SPL_MALLOC_START 0x80208000 | ||
264 | +#define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000 | ||
265 | + | ||
266 | #endif /* __OMAP3_EVM_COMMON_H */ | ||
267 | diff --git a/include/configs/omap3_evm_quick_mmc.h b/include/configs/omap3_evm_quick_mmc.h | ||
268 | index 691e4c2..912da7d 100644 | ||
269 | --- a/include/configs/omap3_evm_quick_mmc.h | ||
270 | +++ b/include/configs/omap3_evm_quick_mmc.h | ||
271 | @@ -88,4 +88,14 @@ | ||
272 | "root=/dev/mmcblk0p2 rw " \ | ||
273 | "rootfstype=ext3 rootwait" | ||
274 | |||
275 | +/* | ||
276 | + * SPL | ||
277 | + */ | ||
278 | +#define CONFIG_SPL_MMC_SUPPORT | ||
279 | +#define CONFIG_SPL_FAT_SUPPORT | ||
280 | +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */ | ||
281 | +#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x200 /* 256 KB */ | ||
282 | +#define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION 1 | ||
283 | +#define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME "u-boot.img" | ||
284 | + | ||
285 | #endif /* __OMAP3_EVM_QUICK_MMC_H */ | ||
286 | diff --git a/include/configs/omap3_evm_quick_nand.h b/include/configs/omap3_evm_quick_nand.h | ||
287 | index 2d18314..2f879c0 100644 | ||
288 | --- a/include/configs/omap3_evm_quick_nand.h | ||
289 | +++ b/include/configs/omap3_evm_quick_nand.h | ||
290 | @@ -76,4 +76,26 @@ | ||
291 | "root=/dev/mtdblock4 rw " \ | ||
292 | "rootfstype=jffs2 " | ||
293 | |||
294 | +/* | ||
295 | + * SPL | ||
296 | + */ | ||
297 | +#define CONFIG_SPL_NAND_SIMPLE | ||
298 | +#define CONFIG_SPL_NAND_SUPPORT | ||
299 | +#define CONFIG_SYS_NAND_5_ADDR_CYCLE | ||
300 | +#define CONFIG_SYS_NAND_PAGE_COUNT 64 | ||
301 | +#define CONFIG_SYS_NAND_PAGE_SIZE 2048 | ||
302 | +#define CONFIG_SYS_NAND_OOBSIZE 64 | ||
303 | +#define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024) | ||
304 | +#define CONFIG_SYS_NAND_BAD_BLOCK_POS 0 | ||
305 | +#define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9,\ | ||
306 | + 10, 11, 12, 13} | ||
307 | +#define CONFIG_SYS_NAND_ECCSIZE 512 | ||
308 | +#define CONFIG_SYS_NAND_ECCBYTES 3 | ||
309 | +#define CONFIG_SYS_NAND_ECCSTEPS (CONFIG_SYS_NAND_PAGE_SIZE / \ | ||
310 | + CONFIG_SYS_NAND_ECCSIZE) | ||
311 | +#define CONFIG_SYS_NAND_ECCTOTAL (CONFIG_SYS_NAND_ECCBYTES * \ | ||
312 | + CONFIG_SYS_NAND_ECCSTEPS) | ||
313 | +#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE | ||
314 | +#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 | ||
315 | + | ||
316 | #endif /* __OMAP3_EVM_QUICK_NAND_H */ | ||
317 | -- | ||
318 | 1.7.2.5 | ||
319 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0013-AM3517-Add-SPL-support.patch b/recipes-bsp/u-boot/u-boot/2011.09/0013-AM3517-Add-SPL-support.patch deleted file mode 100644 index cb9c1b28..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09/0013-AM3517-Add-SPL-support.patch +++ /dev/null | |||
@@ -1,150 +0,0 @@ | |||
1 | From aff5a412e0353407420ed63246ea630988ebf469 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Rini <trini@ti.com> | ||
3 | Date: Fri, 18 Nov 2011 12:48:10 +0000 | ||
4 | Subject: [PATCH 13/21] AM3517: Add SPL support | ||
5 | |||
6 | The only change of note is that we move from 0x80008000 to 0x80100000 | ||
7 | for CONFIG_SYS_TEXT_BASE | ||
8 | |||
9 | Cc: Vaibhav Hiremath <hvaibhav@ti.com> | ||
10 | Signed-off-by: Tom Rini <trini@ti.com> | ||
11 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
12 | --- | ||
13 | board/logicpd/am3517evm/am3517evm.c | 2 +- | ||
14 | board/logicpd/am3517evm/config.mk | 30 ------------------ | ||
15 | include/configs/am3517_evm.h | 57 +++++++++++++++++++++++++++++++++- | ||
16 | 3 files changed, 56 insertions(+), 33 deletions(-) | ||
17 | delete mode 100644 board/logicpd/am3517evm/config.mk | ||
18 | |||
19 | diff --git a/board/logicpd/am3517evm/am3517evm.c b/board/logicpd/am3517evm/am3517evm.c | ||
20 | index c0a006a..0a105bf 100644 | ||
21 | --- a/board/logicpd/am3517evm/am3517evm.c | ||
22 | +++ b/board/logicpd/am3517evm/am3517evm.c | ||
23 | @@ -76,7 +76,7 @@ void set_muxconf_regs(void) | ||
24 | MUX_AM3517EVM(); | ||
25 | } | ||
26 | |||
27 | -#ifdef CONFIG_GENERIC_MMC | ||
28 | +#if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD) | ||
29 | int board_mmc_init(bd_t *bis) | ||
30 | { | ||
31 | omap_mmc_init(0); | ||
32 | diff --git a/board/logicpd/am3517evm/config.mk b/board/logicpd/am3517evm/config.mk | ||
33 | deleted file mode 100644 | ||
34 | index 71ec5d0..0000000 | ||
35 | --- a/board/logicpd/am3517evm/config.mk | ||
36 | +++ /dev/null | ||
37 | @@ -1,30 +0,0 @@ | ||
38 | -# | ||
39 | -# Author: Vaibhav Hiremath <hvaibhav@ti.com> | ||
40 | -# | ||
41 | -# Based on ti/evm/config.mk | ||
42 | -# | ||
43 | -# Copyright (C) 2010 | ||
44 | -# Texas Instruments Incorporated - http://www.ti.com/ | ||
45 | -# | ||
46 | -# This program is free software; you can redistribute it and/or modify | ||
47 | -# it under the terms of the GNU General Public License as published by | ||
48 | -# the Free Software Foundation; either version 2 of the License, or | ||
49 | -# (at your option) any later version. | ||
50 | -# | ||
51 | -# This program is distributed in the hope that it will be useful, | ||
52 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
53 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
54 | -# GNU General Public License for more details. | ||
55 | -# | ||
56 | -# You should have received a copy of the GNU General Public License | ||
57 | -# along with this program; if not, write to the Free Software | ||
58 | -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
59 | -# | ||
60 | -# Physical Address: | ||
61 | -# 8000'0000 (bank0) | ||
62 | -# A000/0000 (bank1) | ||
63 | -# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000 | ||
64 | -# (mem base + reserved) | ||
65 | - | ||
66 | -# For use with external or internal boots. | ||
67 | -CONFIG_SYS_TEXT_BASE = 0x80008000 | ||
68 | diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h | ||
69 | index 1c70b9d..4a1c72c 100644 | ||
70 | --- a/include/configs/am3517_evm.h | ||
71 | +++ b/include/configs/am3517_evm.h | ||
72 | @@ -63,7 +63,6 @@ | ||
73 | /* | ||
74 | * DDR related | ||
75 | */ | ||
76 | -#define CONFIG_OMAP3_MICRON_DDR 1 /* Micron DDR */ | ||
77 | #define CONFIG_SYS_CS0_SIZE (256 * 1024 * 1024) | ||
78 | |||
79 | /* | ||
80 | @@ -273,7 +272,6 @@ | ||
81 | */ | ||
82 | #define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */ | ||
83 | #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0 | ||
84 | -#define PHYS_SDRAM_1_SIZE (32 << 20) /* at least 32 MiB */ | ||
85 | #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1 | ||
86 | |||
87 | /* SDRAM Bank Allocation method */ | ||
88 | @@ -331,4 +329,59 @@ | ||
89 | #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \ | ||
90 | CONFIG_SYS_INIT_RAM_SIZE - \ | ||
91 | GENERATED_GBL_DATA_SIZE) | ||
92 | + | ||
93 | +/* Defines for SPL */ | ||
94 | +#define CONFIG_SPL | ||
95 | +#define CONFIG_SPL_NAND_SIMPLE | ||
96 | +#define CONFIG_SPL_TEXT_BASE 0x40200800 | ||
97 | +#define CONFIG_SPL_MAX_SIZE (45 * 1024) | ||
98 | +#define CONFIG_SPL_STACK LOW_LEVEL_SRAM_STACK | ||
99 | + | ||
100 | +#define CONFIG_SPL_BSS_START_ADDR 0x80000000 | ||
101 | +#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */ | ||
102 | + | ||
103 | +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */ | ||
104 | +#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x200 /* 256 KB */ | ||
105 | +#define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION 1 | ||
106 | +#define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME "u-boot.img" | ||
107 | + | ||
108 | +#define CONFIG_SPL_LIBCOMMON_SUPPORT | ||
109 | +#define CONFIG_SPL_LIBDISK_SUPPORT | ||
110 | +#define CONFIG_SPL_I2C_SUPPORT | ||
111 | +#define CONFIG_SPL_LIBGENERIC_SUPPORT | ||
112 | +#define CONFIG_SPL_MMC_SUPPORT | ||
113 | +#define CONFIG_SPL_FAT_SUPPORT | ||
114 | +#define CONFIG_SPL_SERIAL_SUPPORT | ||
115 | +#define CONFIG_SPL_NAND_SUPPORT | ||
116 | +#define CONFIG_SPL_POWER_SUPPORT | ||
117 | +#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds" | ||
118 | + | ||
119 | +/* NAND boot config */ | ||
120 | +#define CONFIG_SYS_NAND_5_ADDR_CYCLE | ||
121 | +#define CONFIG_SYS_NAND_PAGE_COUNT 64 | ||
122 | +#define CONFIG_SYS_NAND_PAGE_SIZE 2048 | ||
123 | +#define CONFIG_SYS_NAND_OOBSIZE 64 | ||
124 | +#define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024) | ||
125 | +#define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS | ||
126 | +#define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9,\ | ||
127 | + 10, 11, 12, 13} | ||
128 | +#define CONFIG_SYS_NAND_ECCSIZE 512 | ||
129 | +#define CONFIG_SYS_NAND_ECCBYTES 3 | ||
130 | +#define CONFIG_SYS_NAND_ECCSTEPS (CONFIG_SYS_NAND_PAGE_SIZE / \ | ||
131 | + CONFIG_SYS_NAND_ECCSIZE) | ||
132 | +#define CONFIG_SYS_NAND_ECCTOTAL (CONFIG_SYS_NAND_ECCBYTES * \ | ||
133 | + CONFIG_SYS_NAND_ECCSTEPS) | ||
134 | +#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE | ||
135 | +#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 | ||
136 | + | ||
137 | +/* | ||
138 | + * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM | ||
139 | + * 64 bytes before this address should be set aside for u-boot.img's | ||
140 | + * header. That is 0x800FFFC0--0x80100000 should not be used for any | ||
141 | + * other needs. | ||
142 | + */ | ||
143 | +#define CONFIG_SYS_TEXT_BASE 0x80100000 | ||
144 | +#define CONFIG_SYS_SPL_MALLOC_START 0x80208000 | ||
145 | +#define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000 | ||
146 | + | ||
147 | #endif /* __CONFIG_H */ | ||
148 | -- | ||
149 | 1.7.2.5 | ||
150 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0014-AM3517-CraneBoard-Add-SPL-support.patch b/recipes-bsp/u-boot/u-boot/2011.09/0014-AM3517-CraneBoard-Add-SPL-support.patch deleted file mode 100644 index 22a3e71d..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09/0014-AM3517-CraneBoard-Add-SPL-support.patch +++ /dev/null | |||
@@ -1,150 +0,0 @@ | |||
1 | From 04567bb3a9e3b8aefe2a58c339c592c4b62b79d3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Rini <trini@ti.com> | ||
3 | Date: Fri, 18 Nov 2011 12:48:11 +0000 | ||
4 | Subject: [PATCH 14/21] AM3517 CraneBoard: Add SPL support | ||
5 | |||
6 | The only change of note is that we move from 0x80008000 to 0x80100000 | ||
7 | for CONFIG_SYS_TEXT_BASE | ||
8 | |||
9 | Cc: Nagendra T S <nagendra@mistralsolutions.com> | ||
10 | Tested-by: Koen Kooi <k-kooi@ti.com> | ||
11 | Signed-off-by: Tom Rini <trini@ti.com> | ||
12 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
13 | --- | ||
14 | board/ti/am3517crane/am3517crane.c | 2 +- | ||
15 | board/ti/am3517crane/config.mk | 29 ------------------ | ||
16 | include/configs/am3517_crane.h | 57 ++++++++++++++++++++++++++++++++++- | ||
17 | 3 files changed, 56 insertions(+), 32 deletions(-) | ||
18 | delete mode 100644 board/ti/am3517crane/config.mk | ||
19 | |||
20 | diff --git a/board/ti/am3517crane/am3517crane.c b/board/ti/am3517crane/am3517crane.c | ||
21 | index cd5683d..436645a 100644 | ||
22 | --- a/board/ti/am3517crane/am3517crane.c | ||
23 | +++ b/board/ti/am3517crane/am3517crane.c | ||
24 | @@ -75,7 +75,7 @@ void set_muxconf_regs(void) | ||
25 | MUX_AM3517CRANE(); | ||
26 | } | ||
27 | |||
28 | -#ifdef CONFIG_GENERIC_MMC | ||
29 | +#if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD) | ||
30 | int board_mmc_init(bd_t *bis) | ||
31 | { | ||
32 | omap_mmc_init(0); | ||
33 | diff --git a/board/ti/am3517crane/config.mk b/board/ti/am3517crane/config.mk | ||
34 | deleted file mode 100644 | ||
35 | index c6a18b5..0000000 | ||
36 | --- a/board/ti/am3517crane/config.mk | ||
37 | +++ /dev/null | ||
38 | @@ -1,29 +0,0 @@ | ||
39 | -# | ||
40 | -# Author: Srinath R <srinath@mistralsolutions.com> | ||
41 | -# | ||
42 | -# Based on logicpd/am3517evm/config.mk | ||
43 | -# | ||
44 | -# Copyright (C) 2011 Mistral Solutions Pvt Ltd | ||
45 | -# | ||
46 | -# This program is free software; you can redistribute it and/or modify | ||
47 | -# it under the terms of the GNU General Public License as published by | ||
48 | -# the Free Software Foundation; either version 2 of the License, or | ||
49 | -# (at your option) any later version. | ||
50 | -# | ||
51 | -# This program is distributed in the hope that it will be useful, | ||
52 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
53 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
54 | -# GNU General Public License for more details. | ||
55 | -# | ||
56 | -# You should have received a copy of the GNU General Public License | ||
57 | -# along with this program; if not, write to the Free Software | ||
58 | -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
59 | -# | ||
60 | -# Physical Address: | ||
61 | -# 8000'0000 (bank0) | ||
62 | -# A000/0000 (bank1) | ||
63 | -# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000 | ||
64 | -# (mem base + reserved) | ||
65 | - | ||
66 | -# For use with external or internal boots. | ||
67 | -CONFIG_SYS_TEXT_BASE = 0x80008000 | ||
68 | diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h | ||
69 | index 8842a18..68cbf37 100644 | ||
70 | --- a/include/configs/am3517_crane.h | ||
71 | +++ b/include/configs/am3517_crane.h | ||
72 | @@ -64,7 +64,6 @@ | ||
73 | /* | ||
74 | * DDR related | ||
75 | */ | ||
76 | -#define CONFIG_OMAP3_MICRON_DDR 1 /* Micron DDR */ | ||
77 | #define CONFIG_SYS_CS0_SIZE (256 * 1024 * 1024) | ||
78 | |||
79 | /* | ||
80 | @@ -274,7 +273,6 @@ | ||
81 | */ | ||
82 | #define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */ | ||
83 | #define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0 | ||
84 | -#define PHYS_SDRAM_1_SIZE (32 << 20) /* at least 32 MiB */ | ||
85 | #define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1 | ||
86 | |||
87 | /* SDRAM Bank Allocation method */ | ||
88 | @@ -330,4 +328,59 @@ | ||
89 | #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \ | ||
90 | CONFIG_SYS_INIT_RAM_SIZE - \ | ||
91 | GENERATED_GBL_DATA_SIZE) | ||
92 | + | ||
93 | +/* Defines for SPL */ | ||
94 | +#define CONFIG_SPL | ||
95 | +#define CONFIG_SPL_NAND_SIMPLE | ||
96 | +#define CONFIG_SPL_TEXT_BASE 0x40200800 | ||
97 | +#define CONFIG_SPL_MAX_SIZE (45 * 1024) | ||
98 | +#define CONFIG_SPL_STACK LOW_LEVEL_SRAM_STACK | ||
99 | + | ||
100 | +#define CONFIG_SPL_BSS_START_ADDR 0x80000000 | ||
101 | +#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */ | ||
102 | + | ||
103 | +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */ | ||
104 | +#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x200 /* 256 KB */ | ||
105 | +#define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION 1 | ||
106 | +#define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME "u-boot.img" | ||
107 | + | ||
108 | +#define CONFIG_SPL_LIBCOMMON_SUPPORT | ||
109 | +#define CONFIG_SPL_LIBDISK_SUPPORT | ||
110 | +#define CONFIG_SPL_I2C_SUPPORT | ||
111 | +#define CONFIG_SPL_LIBGENERIC_SUPPORT | ||
112 | +#define CONFIG_SPL_MMC_SUPPORT | ||
113 | +#define CONFIG_SPL_FAT_SUPPORT | ||
114 | +#define CONFIG_SPL_SERIAL_SUPPORT | ||
115 | +#define CONFIG_SPL_NAND_SUPPORT | ||
116 | +#define CONFIG_SPL_POWER_SUPPORT | ||
117 | +#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds" | ||
118 | + | ||
119 | +/* NAND boot config */ | ||
120 | +#define CONFIG_SYS_NAND_5_ADDR_CYCLE | ||
121 | +#define CONFIG_SYS_NAND_PAGE_COUNT 64 | ||
122 | +#define CONFIG_SYS_NAND_PAGE_SIZE 2048 | ||
123 | +#define CONFIG_SYS_NAND_OOBSIZE 64 | ||
124 | +#define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024) | ||
125 | +#define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS | ||
126 | +#define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9,\ | ||
127 | + 10, 11, 12, 13} | ||
128 | +#define CONFIG_SYS_NAND_ECCSIZE 512 | ||
129 | +#define CONFIG_SYS_NAND_ECCBYTES 3 | ||
130 | +#define CONFIG_SYS_NAND_ECCSTEPS (CONFIG_SYS_NAND_PAGE_SIZE / \ | ||
131 | + CONFIG_SYS_NAND_ECCSIZE) | ||
132 | +#define CONFIG_SYS_NAND_ECCTOTAL (CONFIG_SYS_NAND_ECCBYTES * \ | ||
133 | + CONFIG_SYS_NAND_ECCSTEPS) | ||
134 | +#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE | ||
135 | +#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 | ||
136 | + | ||
137 | +/* | ||
138 | + * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM | ||
139 | + * 64 bytes before this address should be set aside for u-boot.img's | ||
140 | + * header. That is 0x800FFFC0--0x80100000 should not be used for any | ||
141 | + * other needs. | ||
142 | + */ | ||
143 | +#define CONFIG_SYS_TEXT_BASE 0x80100000 | ||
144 | +#define CONFIG_SYS_SPL_MALLOC_START 0x80208000 | ||
145 | +#define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000 | ||
146 | + | ||
147 | #endif /* __CONFIG_H */ | ||
148 | -- | ||
149 | 1.7.2.5 | ||
150 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0015-HACK-beagleboard-config-disable-cache-for-USB.patch b/recipes-bsp/u-boot/u-boot/2011.09/0015-HACK-beagleboard-config-disable-cache-for-USB.patch deleted file mode 100644 index ec1ec26e..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09/0015-HACK-beagleboard-config-disable-cache-for-USB.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From 3fe471d34ef6575bc49c9f85ed74368e3ac25ad6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Kridner <jdk@ti.com> | ||
3 | Date: Sun, 18 Sep 2011 12:16:31 -0400 | ||
4 | Subject: [PATCH 15/21] HACK: beagleboard: config: disable cache for USB | ||
5 | |||
6 | There is currently a bug in the USB code for the BeagleBoard that is | ||
7 | worked-around by disabling the cache. | ||
8 | |||
9 | See http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/108224 | ||
10 | |||
11 | Signed-off-by: Jason Kridner <jdk@ti.com> | ||
12 | --- | ||
13 | include/configs/omap3_beagle.h | 4 ++++ | ||
14 | 1 files changed, 4 insertions(+), 0 deletions(-) | ||
15 | |||
16 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
17 | index 941ec38..569d747 100644 | ||
18 | --- a/include/configs/omap3_beagle.h | ||
19 | +++ b/include/configs/omap3_beagle.h | ||
20 | @@ -36,6 +36,10 @@ | ||
21 | #define CONFIG_OMAP3430 1 /* which is in a 3430 */ | ||
22 | #define CONFIG_OMAP3_BEAGLE 1 /* working with BEAGLE */ | ||
23 | |||
24 | +/* TODO: WORK-AROUND for bug in BeagleBoard-specific USB */ | ||
25 | +#define CONFIG_SYS_ICACHE_OFF | ||
26 | +#define CONFIG_SYS_DCACHE_OFF | ||
27 | + | ||
28 | #define CONFIG_SDRC /* The chip has SDRC controller */ | ||
29 | |||
30 | #include <asm/arch/cpu.h> /* get chip and board defs */ | ||
31 | -- | ||
32 | 1.7.2.5 | ||
33 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0016-beagleboard-config-enable-gpio-command.patch b/recipes-bsp/u-boot/u-boot/2011.09/0016-beagleboard-config-enable-gpio-command.patch deleted file mode 100644 index 268932b7..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09/0016-beagleboard-config-enable-gpio-command.patch +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | From e5bf80f2fb4af9a2627541cb8bc8686e8a9e8404 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Kridner <jdk@ti.com> | ||
3 | Date: Tue, 6 Sep 2011 18:56:11 -0400 | ||
4 | Subject: [PATCH 16/21] beagleboard: config: enable gpio command | ||
5 | |||
6 | Now that we are using the generic GPIO framework, enable the command. | ||
7 | --- | ||
8 | include/configs/omap3_beagle.h | 1 + | ||
9 | 1 files changed, 1 insertions(+), 0 deletions(-) | ||
10 | |||
11 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
12 | index 569d747..337ca29 100644 | ||
13 | --- a/include/configs/omap3_beagle.h | ||
14 | +++ b/include/configs/omap3_beagle.h | ||
15 | @@ -164,6 +164,7 @@ | ||
16 | #define CONFIG_CMD_PING | ||
17 | #define CONFIG_CMD_DHCP | ||
18 | #define CONFIG_CMD_SETEXPR /* Evaluate expressions */ | ||
19 | +#define CONFIG_CMD_GPIO | ||
20 | |||
21 | #undef CONFIG_CMD_FLASH /* flinfo, erase, protect */ | ||
22 | #undef CONFIG_CMD_FPGA /* FPGA configuration Support */ | ||
23 | -- | ||
24 | 1.7.2.5 | ||
25 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0017-Increased-some-timeout-durations-for-MMC-and-EHCI.patch b/recipes-bsp/u-boot/u-boot/2011.09/0017-Increased-some-timeout-durations-for-MMC-and-EHCI.patch deleted file mode 100644 index 9aeb5485..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09/0017-Increased-some-timeout-durations-for-MMC-and-EHCI.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From 7ba57c9e6372c067609797cbac53f8a14691fc2d Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Kridner <jdk@ti.com> | ||
3 | Date: Wed, 7 Sep 2011 08:56:48 -0400 | ||
4 | Subject: [PATCH 17/21] Increased some timeout durations for MMC and EHCI | ||
5 | |||
6 | --- | ||
7 | drivers/mmc/omap_hsmmc.c | 2 +- | ||
8 | include/usb.h | 2 +- | ||
9 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
10 | |||
11 | diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c | ||
12 | index c38b9e6..5054a21 100644 | ||
13 | --- a/drivers/mmc/omap_hsmmc.c | ||
14 | +++ b/drivers/mmc/omap_hsmmc.c | ||
15 | @@ -34,7 +34,7 @@ | ||
16 | #include <asm/arch/sys_proto.h> | ||
17 | |||
18 | /* If we fail after 1 second wait, something is really bad */ | ||
19 | -#define MAX_RETRY_MS 1000 | ||
20 | +#define MAX_RETRY_MS 5000 | ||
21 | |||
22 | static int mmc_read_data(struct hsmmc *mmc_base, char *buf, unsigned int size); | ||
23 | static int mmc_write_data(struct hsmmc *mmc_base, const char *buf, | ||
24 | diff --git a/include/usb.h b/include/usb.h | ||
25 | index 06170cd..0d99b92 100644 | ||
26 | --- a/include/usb.h | ||
27 | +++ b/include/usb.h | ||
28 | @@ -46,7 +46,7 @@ | ||
29 | * This is the timeout to allow for submitting an urb in ms. We allow more | ||
30 | * time for a BULK device to react - some are slow. | ||
31 | */ | ||
32 | -#define USB_TIMEOUT_MS(pipe) (usb_pipebulk(pipe) ? 5000 : 1000) | ||
33 | +#define USB_TIMEOUT_MS(pipe) (usb_pipebulk(pipe) ? 5000 : 5000) | ||
34 | |||
35 | /* device request (setup) */ | ||
36 | struct devrequest { | ||
37 | -- | ||
38 | 1.7.2.5 | ||
39 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0018-beagleboard-mount-rootfs-RO-instead-of-RW-at-boot.patch b/recipes-bsp/u-boot/u-boot/2011.09/0018-beagleboard-mount-rootfs-RO-instead-of-RW-at-boot.patch deleted file mode 100644 index b571a4e4..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09/0018-beagleboard-mount-rootfs-RO-instead-of-RW-at-boot.patch +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | From daa9fa5f66a1b370072f1e91fd51c6a5e3d81fd8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Sun, 27 Nov 2011 14:43:58 +0100 | ||
4 | Subject: [PATCH 18/21] beagleboard: mount rootfs RO instead of RW at boot | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | include/configs/omap3_beagle.h | 2 +- | ||
9 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
10 | |||
11 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
12 | index 337ca29..186586f 100644 | ||
13 | --- a/include/configs/omap3_beagle.h | ||
14 | +++ b/include/configs/omap3_beagle.h | ||
15 | @@ -226,7 +226,7 @@ | ||
16 | "dvimode=640x480MR-16@60\0" \ | ||
17 | "defaultdisplay=dvi\0" \ | ||
18 | "mmcdev=0\0" \ | ||
19 | - "mmcroot=/dev/mmcblk0p2 rw\0" \ | ||
20 | + "mmcroot=/dev/mmcblk0p2 ro\0" \ | ||
21 | "mmcrootfstype=ext3 rootwait\0" \ | ||
22 | "nandroot=ubi0:rootfs ubi.mtd=4\0" \ | ||
23 | "nandrootfstype=ubifs\0" \ | ||
24 | -- | ||
25 | 1.7.2.5 | ||
26 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0019-BeagleBoard-config-Really-switch-to-ttyO2.patch b/recipes-bsp/u-boot/u-boot/2011.09/0019-BeagleBoard-config-Really-switch-to-ttyO2.patch deleted file mode 100644 index 1d21612c..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09/0019-BeagleBoard-config-Really-switch-to-ttyO2.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | From ceb3c55ff226f068edb369342e3bd2db70ca8827 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Sun, 27 Nov 2011 14:46:04 +0100 | ||
4 | Subject: [PATCH 19/21] BeagleBoard: config: Really switch to ttyO2 | ||
5 | |||
6 | The previous commit changed it to "zero two" instead of the proper "Oh two". This was completely broken! | ||
7 | |||
8 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
9 | --- | ||
10 | include/configs/omap3_beagle.h | 2 +- | ||
11 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
12 | |||
13 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
14 | index 186586f..833f86a 100644 | ||
15 | --- a/include/configs/omap3_beagle.h | ||
16 | +++ b/include/configs/omap3_beagle.h | ||
17 | @@ -217,7 +217,7 @@ | ||
18 | "rdaddr=0x81000000\0" \ | ||
19 | "usbtty=cdc_acm\0" \ | ||
20 | "bootfile=uImage.beagle\0" \ | ||
21 | - "console=tty02,115200n8\0" \ | ||
22 | + "console=ttyO2,115200n8\0" \ | ||
23 | "mpurate=auto\0" \ | ||
24 | "buddy=none "\ | ||
25 | "optargs=\0" \ | ||
26 | -- | ||
27 | 1.7.2.5 | ||
28 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0020-beagleboard-add-support-for-TCT-Beacon-board.patch b/recipes-bsp/u-boot/u-boot/2011.09/0020-beagleboard-add-support-for-TCT-Beacon-board.patch deleted file mode 100644 index 39c2a36c..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09/0020-beagleboard-add-support-for-TCT-Beacon-board.patch +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | From e368b3cc2b281146c7848a2044e8a7d457ea1e38 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Sat, 8 Oct 2011 21:56:35 +0200 | ||
4 | Subject: [PATCH 20/21] beagleboard: add support for TCT Beacon board | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | board/ti/beagle/beagle.c | 10 ++++++++++ | ||
9 | board/ti/beagle/beagle.h | 7 +++++++ | ||
10 | 2 files changed, 17 insertions(+), 0 deletions(-) | ||
11 | |||
12 | diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c | ||
13 | index 6a457cb..9c2e6d0 100644 | ||
14 | --- a/board/ti/beagle/beagle.c | ||
15 | +++ b/board/ti/beagle/beagle.c | ||
16 | @@ -59,11 +59,14 @@ extern volatile struct ehci_hcor *hcor; | ||
17 | #define TWL4030_I2C_BUS 0 | ||
18 | #define EXPANSION_EEPROM_I2C_BUS 1 | ||
19 | #define EXPANSION_EEPROM_I2C_ADDRESS 0x50 | ||
20 | +#define DVI_EDID_I2C_BUS 2 | ||
21 | +#define DVI_EDID_I2C_ADDRESS 0x50 | ||
22 | |||
23 | #define TINCANTOOLS_ZIPPY 0x01000100 | ||
24 | #define TINCANTOOLS_ZIPPY2 0x02000100 | ||
25 | #define TINCANTOOLS_TRAINER 0x04000100 | ||
26 | #define TINCANTOOLS_SHOWDOG 0x03000100 | ||
27 | +#define TINCANTOOLS_BEACON 0x05000100 | ||
28 | #define KBADC_BEAGLEFPGA 0x01000600 | ||
29 | #define LW_BEAGLETOUCH 0x01000700 | ||
30 | #define BRAINMUX_LCDOG 0x01000800 | ||
31 | @@ -351,6 +354,13 @@ int misc_init_r(void) | ||
32 | setenv("defaultdisplay", "showdoglcd"); | ||
33 | setenv("buddy", "showdog"); | ||
34 | break; | ||
35 | + case TINCANTOOLS_BEACON: | ||
36 | + printf("Recognized Tincantools Beacon board (rev %d %s)\n", | ||
37 | + expansion_config.revision, | ||
38 | + expansion_config.fab_revision); | ||
39 | + MUX_TINCANTOOLS_BEACON(); | ||
40 | + setenv("buddy", "beacon"); | ||
41 | + break; | ||
42 | case KBADC_BEAGLEFPGA: | ||
43 | printf("Recognized KBADC Beagle FPGA board\n"); | ||
44 | MUX_KBADC_BEAGLEFPGA(); | ||
45 | diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h | ||
46 | index 18bfaa8..6a9ad73 100644 | ||
47 | --- a/board/ti/beagle/beagle.h | ||
48 | +++ b/board/ti/beagle/beagle.h | ||
49 | @@ -456,6 +456,13 @@ const omap3_sysinfo sysinfo = { | ||
50 | MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTU | EN | M4)) /*GPIO_141*/\ | ||
51 | MUX_VAL(CP(MCBSP1_CLKX), (IEN | PTU | EN | M4)) /*GPIO_162*/ | ||
52 | |||
53 | +#define MUX_TINCANTOOLS_BEACON() \ | ||
54 | + MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M4)) /*GPIO_135*/\ | ||
55 | + MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN | M4)) /*GPIO_136*/\ | ||
56 | + MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M4)) /*GPIO_137*/\ | ||
57 | + MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | EN | M4)) /*GPIO_138*/\ | ||
58 | + MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M4)) /*GPIO_139*/\ | ||
59 | + | ||
60 | #define MUX_KBADC_BEAGLEFPGA() \ | ||
61 | MUX_VAL(CP(MCBSP1_CLKR), (IEN | PTU | DIS | M1)) /*MCSPI4_CLK*/\ | ||
62 | MUX_VAL(CP(MCBSP1_DX), (IDIS | PTU | DIS | M1)) /*MCSPI4_SIMO*/\ | ||
63 | -- | ||
64 | 1.7.2.5 | ||
65 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09/0021-beagleboard-add-support-for-scanning-loop-through-ex.patch b/recipes-bsp/u-boot/u-boot/2011.09/0021-beagleboard-add-support-for-scanning-loop-through-ex.patch deleted file mode 100644 index a2df7ca4..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09/0021-beagleboard-add-support-for-scanning-loop-through-ex.patch +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | From 78fd05bd746f623de3150469a9f6f4e9531a17c4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Sun, 27 Nov 2011 14:53:56 +0100 | ||
4 | Subject: [PATCH 21/21] beagleboard: add support for scanning loop-through expansionboards like the uLCD-lite | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | board/ti/beagle/beagle.c | 30 ++++++++++++++++++++++++++---- | ||
9 | include/configs/omap3_beagle.h | 2 ++ | ||
10 | 2 files changed, 28 insertions(+), 4 deletions(-) | ||
11 | |||
12 | diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c | ||
13 | index 9c2e6d0..5ea50d1 100644 | ||
14 | --- a/board/ti/beagle/beagle.c | ||
15 | +++ b/board/ti/beagle/beagle.c | ||
16 | @@ -74,6 +74,7 @@ extern volatile struct ehci_hcor *hcor; | ||
17 | #define BBTOYS_WIFI 0x01000B00 | ||
18 | #define BBTOYS_VGA 0x02000B00 | ||
19 | #define BBTOYS_LCD 0x03000B00 | ||
20 | +#define BBTOYS_ULCD 0x04000B00 | ||
21 | #define BEAGLE_NO_EEPROM 0xffffffff | ||
22 | |||
23 | DECLARE_GLOBAL_DATA_PTR; | ||
24 | @@ -209,18 +210,18 @@ void get_board_mem_timings(u32 *mcfg, u32 *ctrla, u32 *ctrlb, u32 *rfr_ctrl, | ||
25 | * bus 1 for the availability of an AT24C01B serial EEPROM. | ||
26 | * returns the device_vendor field from the EEPROM | ||
27 | */ | ||
28 | -unsigned int get_expansion_id(void) | ||
29 | +unsigned int get_expansion_id(int eeprom_address) | ||
30 | { | ||
31 | i2c_set_bus_num(EXPANSION_EEPROM_I2C_BUS); | ||
32 | |||
33 | /* return BEAGLE_NO_EEPROM if eeprom doesn't respond */ | ||
34 | - if (i2c_probe(EXPANSION_EEPROM_I2C_ADDRESS) == 1) { | ||
35 | + if (i2c_probe(eeprom_address) == 1) { | ||
36 | i2c_set_bus_num(TWL4030_I2C_BUS); | ||
37 | return BEAGLE_NO_EEPROM; | ||
38 | } | ||
39 | |||
40 | /* read configuration data */ | ||
41 | - i2c_read(EXPANSION_EEPROM_I2C_ADDRESS, 0, 1, (u8 *)&expansion_config, | ||
42 | + i2c_read(eeprom_address, 0, 1, (u8 *)&expansion_config, | ||
43 | sizeof(expansion_config)); | ||
44 | |||
45 | i2c_set_bus_num(TWL4030_I2C_BUS); | ||
46 | @@ -323,7 +324,7 @@ int misc_init_r(void) | ||
47 | TWL4030_PM_RECEIVER_DEV_GRP_P1); | ||
48 | } | ||
49 | |||
50 | - switch (get_expansion_id()) { | ||
51 | + switch (get_expansion_id(EXPANSION_EEPROM_I2C_ADDRESS)) { | ||
52 | case TINCANTOOLS_ZIPPY: | ||
53 | printf("Recognized Tincantools Zippy board (rev %d %s)\n", | ||
54 | expansion_config.revision, | ||
55 | @@ -402,6 +403,27 @@ int misc_init_r(void) | ||
56 | if (expansion_config.content == 1) | ||
57 | setenv(expansion_config.env_var, expansion_config.env_setting); | ||
58 | |||
59 | + /* Scan 0x51 as well for loop-thru boards */ | ||
60 | + switch (get_expansion_id(EXPANSION_EEPROM_I2C_ADDRESS + 1)) { | ||
61 | + case BBTOYS_ULCD: | ||
62 | + printf("Recognized BeagleBoardToys uLCD-lite board\n"); | ||
63 | + setenv("buddy2", "bbtoys-ulcd"); | ||
64 | + setenv("defaultdisplay", "lcd"); | ||
65 | + setenv("uenvcmd", "i2c dev 1 ; i2c mw 40 00 00; i2c mw 40 04 80; i2c mw 40 0d 05; i2c mw 40 0d 15"); | ||
66 | + break; | ||
67 | + case BEAGLE_NO_EEPROM: | ||
68 | + printf("No EEPROM on expansion board\n"); | ||
69 | + setenv("buddy2", "none"); | ||
70 | + break; | ||
71 | + default: | ||
72 | + printf("Unrecognized expansion board: %x\n", | ||
73 | + expansion_config.device_vendor); | ||
74 | + setenv("buddy2", "unknown"); | ||
75 | + } | ||
76 | + | ||
77 | + if (expansion_config.content == 1) | ||
78 | + setenv(expansion_config.env_var, expansion_config.env_setting); | ||
79 | + | ||
80 | twl4030_power_init(); | ||
81 | switch (get_board_revision()) { | ||
82 | case REVISION_XM_A: | ||
83 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
84 | index 833f86a..1cc46dc 100644 | ||
85 | --- a/include/configs/omap3_beagle.h | ||
86 | +++ b/include/configs/omap3_beagle.h | ||
87 | @@ -220,6 +220,7 @@ | ||
88 | "console=ttyO2,115200n8\0" \ | ||
89 | "mpurate=auto\0" \ | ||
90 | "buddy=none "\ | ||
91 | + "buddy2=none "\ | ||
92 | "optargs=\0" \ | ||
93 | "camera=none\0" \ | ||
94 | "vram=12M\0" \ | ||
95 | @@ -236,6 +237,7 @@ | ||
96 | "${optargs} " \ | ||
97 | "mpurate=${mpurate} " \ | ||
98 | "buddy=${buddy} "\ | ||
99 | + "buddy2=${buddy2} "\ | ||
100 | "camera=${camera} "\ | ||
101 | "vram=${vram} " \ | ||
102 | "omapfb.mode=dvi:${dvimode} " \ | ||
103 | -- | ||
104 | 1.7.2.5 | ||
105 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09git/0001-am335x_evm-add-option-to-boot-kernel-from-boot-in-ex.patch b/recipes-bsp/u-boot/u-boot/2011.09git/0001-am335x_evm-add-option-to-boot-kernel-from-boot-in-ex.patch deleted file mode 100644 index 03569d16..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09git/0001-am335x_evm-add-option-to-boot-kernel-from-boot-in-ex.patch +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | From 65ba75f46ec4c9749996ec290fa1c5e4e6264ce3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Tue, 1 Nov 2011 12:21:07 +0100 | ||
4 | Subject: [PATCH 01/10] am335x_evm: add option to boot kernel from /boot in | ||
5 | ext2/3 filesystem | ||
6 | |||
7 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
8 | --- | ||
9 | include/configs/am335x_evm.h | 1 + | ||
10 | 1 file changed, 1 insertion(+) | ||
11 | |||
12 | diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h | ||
13 | index 44a8500..83ccb5a 100755 | ||
14 | --- a/include/configs/am335x_evm.h | ||
15 | +++ b/include/configs/am335x_evm.h | ||
16 | @@ -75,6 +75,7 @@ | ||
17 | "importbootenv=echo Importing environment from mmc ...; " \ | ||
18 | "env import -t $loadaddr $filesize\0" \ | ||
19 | "mmc_load_uimage=fatload mmc ${mmc_dev} ${kloadaddr} ${bootfile}\0" \ | ||
20 | + "mmc_load_uimage_ext2=ext2load ${mmc_dev} ${kloadaddr} /boot/${bootfile}\0" \ | ||
21 | "optargs=\0" \ | ||
22 | "bootargs_defaults=setenv bootargs " \ | ||
23 | "console=${console} " \ | ||
24 | -- | ||
25 | 1.7.10 | ||
26 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09git/0002-am335x_evm-set-bootdelay-to-1.patch b/recipes-bsp/u-boot/u-boot/2011.09git/0002-am335x_evm-set-bootdelay-to-1.patch deleted file mode 100644 index fdce9c41..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09git/0002-am335x_evm-set-bootdelay-to-1.patch +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | From cb92653d26476880602a20b62da03a35d36d622e Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Tue, 1 Nov 2011 12:21:38 +0100 | ||
4 | Subject: [PATCH 02/10] am335x_evm: set bootdelay to 1 | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | include/configs/am335x_evm.h | 2 +- | ||
9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
10 | |||
11 | diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h | ||
12 | index 83ccb5a..2558775 100755 | ||
13 | --- a/include/configs/am335x_evm.h | ||
14 | +++ b/include/configs/am335x_evm.h | ||
15 | @@ -127,7 +127,7 @@ | ||
16 | |||
17 | #ifndef CONFIG_RESTORE_FLASH | ||
18 | /* set to negative value for no autoboot */ | ||
19 | -#define CONFIG_BOOTDELAY 3 | ||
20 | +#define CONFIG_BOOTDELAY 1 | ||
21 | |||
22 | #define CONFIG_BOOTCOMMAND \ | ||
23 | "if mmc rescan; then " \ | ||
24 | -- | ||
25 | 1.7.10 | ||
26 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09git/0003-am335x-evm-make-MMC-rootfs-RO-on-boot-so-fsck-works.patch b/recipes-bsp/u-boot/u-boot/2011.09git/0003-am335x-evm-make-MMC-rootfs-RO-on-boot-so-fsck-works.patch deleted file mode 100644 index 8096df0a..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09git/0003-am335x-evm-make-MMC-rootfs-RO-on-boot-so-fsck-works.patch +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | From ca9a3452249bfda3d9a8096794b4fbfbf212d72f Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Tue, 1 Nov 2011 12:22:30 +0100 | ||
4 | Subject: [PATCH 03/10] am335x-evm: make MMC rootfs RO on boot so fsck works | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | include/configs/am335x_evm.h | 2 +- | ||
9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
10 | |||
11 | diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h | ||
12 | index 2558775..1b4fa37 100755 | ||
13 | --- a/include/configs/am335x_evm.h | ||
14 | +++ b/include/configs/am335x_evm.h | ||
15 | @@ -50,7 +50,7 @@ | ||
16 | "script_addr=0x81900000\0" \ | ||
17 | "console=ttyO0,115200n8\0" \ | ||
18 | "mmc_dev=0\0" \ | ||
19 | - "mmc_root=/dev/mmcblk0p2 rw\0" \ | ||
20 | + "mmc_root=/dev/mmcblk0p2 ro\0" \ | ||
21 | "nand_root=ubi0:rootfs rw ubi.mtd=7,2048\0" \ | ||
22 | "spi_root=/dev/mtdblock4 rw\0" \ | ||
23 | "nor_root=/dev/mtdblock3 rw\0" \ | ||
24 | -- | ||
25 | 1.7.10 | ||
26 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09git/0004-am335x_evm-switch-to-ext4.patch b/recipes-bsp/u-boot/u-boot/2011.09git/0004-am335x_evm-switch-to-ext4.patch deleted file mode 100644 index 3d8495eb..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09git/0004-am335x_evm-switch-to-ext4.patch +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | From 97fa23e167d3e4b46c71a5fac1a5e9aa39f0a551 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Mon, 7 Nov 2011 21:33:32 +0100 | ||
4 | Subject: [PATCH 04/10] am335x_evm: switch to ext4 | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | include/configs/am335x_evm.h | 2 +- | ||
9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
10 | |||
11 | diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h | ||
12 | index 1b4fa37..3d37058 100755 | ||
13 | --- a/include/configs/am335x_evm.h | ||
14 | +++ b/include/configs/am335x_evm.h | ||
15 | @@ -54,7 +54,7 @@ | ||
16 | "nand_root=ubi0:rootfs rw ubi.mtd=7,2048\0" \ | ||
17 | "spi_root=/dev/mtdblock4 rw\0" \ | ||
18 | "nor_root=/dev/mtdblock3 rw\0" \ | ||
19 | - "mmc_root_fs_type=ext3 rootwait\0" \ | ||
20 | + "mmc_root_fs_type=ext4 rootwait\0" \ | ||
21 | "nand_root_fs_type=ubifs rootwait=1\0" \ | ||
22 | "spi_root_fs_type=jffs2\0" \ | ||
23 | "nor_root_fs_type=jffs2\0" \ | ||
24 | -- | ||
25 | 1.7.10 | ||
26 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09git/0005-am335x-evm-enable-i2c2-pinmux-for-beaglebone.patch b/recipes-bsp/u-boot/u-boot/2011.09git/0005-am335x-evm-enable-i2c2-pinmux-for-beaglebone.patch deleted file mode 100644 index fa2790dc..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09git/0005-am335x-evm-enable-i2c2-pinmux-for-beaglebone.patch +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | From e2121ca4fd82f8313b764fe7fb24511ef7d10904 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Wed, 16 Nov 2011 18:57:12 +0100 | ||
4 | Subject: [PATCH 05/10] am335x-evm: enable i2c2 pinmux for beaglebone | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | board/ti/am335x/mux.c | 18 ++++++++++++++++++ | ||
9 | 1 file changed, 18 insertions(+) | ||
10 | |||
11 | diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c | ||
12 | index 885b33f..70645d4 100644 | ||
13 | --- a/board/ti/am335x/mux.c | ||
14 | +++ b/board/ti/am335x/mux.c | ||
15 | @@ -310,6 +310,12 @@ static struct module_pin_mux i2c1_pin_mux[] = { | ||
16 | {-1}, | ||
17 | }; | ||
18 | |||
19 | +static struct module_pin_mux i2c2_pin_mux[] = { | ||
20 | + {OFFSET(uart1_ctsn), (MODE(3) | RXACTIVE | PULLUDEN | SLEWCTRL)}, /* I2C_DATA */ | ||
21 | + {OFFSET(uart1_rtsn), (MODE(3) | RXACTIVE | PULLUDEN | SLEWCTRL)}, /* I2C_SCLK */ | ||
22 | + {-1}, | ||
23 | +}; | ||
24 | + | ||
25 | #ifndef CONFIG_NO_ETH | ||
26 | static struct module_pin_mux rgmii1_pin_mux[] = { | ||
27 | {OFFSET(mii1_txen), MODE(2)}, /* RGMII1_TCTL */ | ||
28 | @@ -598,6 +604,7 @@ static struct evm_pin_mux sk_evm_pin_mux[] = { | ||
29 | static struct evm_pin_mux beaglebone_pin_mux[] = { | ||
30 | {uart0_pin_mux, PROFILE_ALL, DEV_ON_BASEBOARD}, | ||
31 | {i2c1_pin_mux, PROFILE_ALL & ~PROFILE_2 & ~PROFILE_4, DEV_ON_BASEBOARD}, | ||
32 | + {i2c2_pin_mux, PROFILE_ALL, DEV_ON_BASEBOARD}, | ||
33 | #ifdef CONFIG_NAND | ||
34 | {nand_pin_mux, PROFILE_ALL & ~PROFILE_2 & ~PROFILE_3, DEV_ON_DGHTR_BRD}, | ||
35 | #endif | ||
36 | @@ -617,6 +624,7 @@ static struct evm_pin_mux beaglebone_pin_mux[] = { | ||
37 | static struct evm_pin_mux beaglebone_old_pin_mux[] = { | ||
38 | {uart0_pin_mux, PROFILE_ALL, DEV_ON_BASEBOARD}, | ||
39 | {i2c1_pin_mux, PROFILE_ALL & ~PROFILE_2 & ~PROFILE_4, DEV_ON_BASEBOARD}, | ||
40 | + {i2c2_pin_mux, PROFILE_ALL, DEV_ON_BASEBOARD}, | ||
41 | #ifdef CONFIG_NAND | ||
42 | {nand_pin_mux, PROFILE_ALL & ~PROFILE_2 & ~PROFILE_3, DEV_ON_DGHTR_BRD}, | ||
43 | #endif | ||
44 | @@ -713,6 +721,16 @@ void enable_i2c0_pin_mux(void) | ||
45 | configure_module_pin_mux(i2c0_pin_mux); | ||
46 | } | ||
47 | |||
48 | +void enable_i2c1_pin_mux(void) | ||
49 | +{ | ||
50 | + configure_module_pin_mux(i2c1_pin_mux); | ||
51 | +} | ||
52 | + | ||
53 | +void enable_i2c2_pin_mux(void) | ||
54 | +{ | ||
55 | + configure_module_pin_mux(i2c2_pin_mux); | ||
56 | +} | ||
57 | + | ||
58 | void enable_uart0_pin_mux(void) | ||
59 | { | ||
60 | configure_module_pin_mux(uart0_pin_mux); | ||
61 | -- | ||
62 | 1.7.10 | ||
63 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09git/0006-ext2load-increase-read-speed.patch b/recipes-bsp/u-boot/u-boot/2011.09git/0006-ext2load-increase-read-speed.patch deleted file mode 100644 index ee33d908..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09git/0006-ext2load-increase-read-speed.patch +++ /dev/null | |||
@@ -1,74 +0,0 @@ | |||
1 | From f6894e8bc193d225267e4d58a633354e9937c93d Mon Sep 17 00:00:00 2001 | ||
2 | From: "u-boot@lakedaemon.net" <u-boot@lakedaemon.net> | ||
3 | Date: Wed, 28 Mar 2012 04:37:11 +0000 | ||
4 | Subject: [PATCH 06/10] ext2load: increase read speed | ||
5 | |||
6 | This patch dramatically drops the amount of time u-boot needs to read a | ||
7 | file from an ext2 partition. On a typical 2 to 5 MB file (kernels and | ||
8 | initrds) it goes from tens of seconds to a couple seconds. | ||
9 | |||
10 | All we are doing here is grouping contiguous blocks into one read. | ||
11 | |||
12 | Boot tested on Globalscale Technologies Dreamplug (Kirkwood ARM SoC) | ||
13 | with three different files. sha1sums were calculated in Linux | ||
14 | userspace, and then confirmed after ext2load. | ||
15 | |||
16 | Signed-off-by: Jason Cooper <u-boot@lakedaemon.net> | ||
17 | --- | ||
18 | fs/ext2/ext2fs.c | 26 ++++++++++++++++++++++++-- | ||
19 | 1 file changed, 24 insertions(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/fs/ext2/ext2fs.c b/fs/ext2/ext2fs.c | ||
22 | index e119e13..8531db5 100644 | ||
23 | --- a/fs/ext2/ext2fs.c | ||
24 | +++ b/fs/ext2/ext2fs.c | ||
25 | @@ -414,7 +414,6 @@ int ext2fs_read_file | ||
26 | if (blknr < 0) { | ||
27 | return (-1); | ||
28 | } | ||
29 | - blknr = blknr << log2blocksize; | ||
30 | |||
31 | /* Last block. */ | ||
32 | if (i == blockcnt - 1) { | ||
33 | @@ -432,6 +431,29 @@ int ext2fs_read_file | ||
34 | blockend -= skipfirst; | ||
35 | } | ||
36 | |||
37 | + /* grab middle blocks in one go */ | ||
38 | + if (i != pos / blocksize && i != blockcnt - 1 && blockcnt > 3) { | ||
39 | + int oldblk = blknr; | ||
40 | + int blocknxt; | ||
41 | + while (i < blockcnt - 1) { | ||
42 | + blocknxt = ext2fs_read_block(node, i + 1); | ||
43 | + if (blocknxt == (oldblk + 1)) { | ||
44 | + oldblk = blocknxt; | ||
45 | + i++; | ||
46 | + } else { | ||
47 | + blocknxt = ext2fs_read_block(node, i); | ||
48 | + break; | ||
49 | + } | ||
50 | + } | ||
51 | + | ||
52 | + if (oldblk == blknr) | ||
53 | + blockend = blocksize; | ||
54 | + else | ||
55 | + blockend = (1 + blocknxt - blknr) * blocksize; | ||
56 | + } | ||
57 | + | ||
58 | + blknr = blknr << log2blocksize; | ||
59 | + | ||
60 | /* If the block number is 0 this block is not stored on disk but | ||
61 | is zero filled instead. */ | ||
62 | if (blknr) { | ||
63 | @@ -444,7 +466,7 @@ int ext2fs_read_file | ||
64 | } else { | ||
65 | memset (buf, 0, blocksize - skipfirst); | ||
66 | } | ||
67 | - buf += blocksize - skipfirst; | ||
68 | + buf += blockend - skipfirst; | ||
69 | } | ||
70 | return (len); | ||
71 | } | ||
72 | -- | ||
73 | 1.7.10 | ||
74 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09git/0007-am335x-evm-fix-ext2load-and-specify-partition-for-bo.patch b/recipes-bsp/u-boot/u-boot/2011.09git/0007-am335x-evm-fix-ext2load-and-specify-partition-for-bo.patch deleted file mode 100644 index ba7cf033..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09git/0007-am335x-evm-fix-ext2load-and-specify-partition-for-bo.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From 160a0a0145cbe4bca9c0f71286fc8529e57c21c4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Sun, 1 Apr 2012 22:57:37 +0200 | ||
4 | Subject: [PATCH 07/10] am335x-evm: fix ext2load and specify partition for | ||
5 | both fatload and ext2load | ||
6 | |||
7 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
8 | --- | ||
9 | include/configs/am335x_evm.h | 5 ++--- | ||
10 | 1 file changed, 2 insertions(+), 3 deletions(-) | ||
11 | |||
12 | diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h | ||
13 | index 3d37058..a81d716 100755 | ||
14 | --- a/include/configs/am335x_evm.h | ||
15 | +++ b/include/configs/am335x_evm.h | ||
16 | @@ -74,9 +74,8 @@ | ||
17 | "loadbootenv=fatload mmc ${mmc_dev} ${loadaddr} ${bootenv}\0" \ | ||
18 | "importbootenv=echo Importing environment from mmc ...; " \ | ||
19 | "env import -t $loadaddr $filesize\0" \ | ||
20 | - "mmc_load_uimage=fatload mmc ${mmc_dev} ${kloadaddr} ${bootfile}\0" \ | ||
21 | - "mmc_load_uimage_ext2=ext2load ${mmc_dev} ${kloadaddr} /boot/${bootfile}\0" \ | ||
22 | - "optargs=\0" \ | ||
23 | + "mmc_load_uimage=fatload mmc ${mmc_dev}:1 ${kloadaddr} ${bootfile}\0" \ | ||
24 | + "mmc_load_uimage_ext2=ext2load mmc ${mmc_dev}:2 ${kloadaddr} /boot/${bootfile}\0" \ | ||
25 | "bootargs_defaults=setenv bootargs " \ | ||
26 | "console=${console} " \ | ||
27 | "${optargs}\0" \ | ||
28 | -- | ||
29 | 1.7.10 | ||
30 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09git/0008-am335x-evm-load-uImage-from-boot-instead-of-VFAT.patch b/recipes-bsp/u-boot/u-boot/2011.09git/0008-am335x-evm-load-uImage-from-boot-instead-of-VFAT.patch deleted file mode 100644 index 70408b6a..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09git/0008-am335x-evm-load-uImage-from-boot-instead-of-VFAT.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From b01ee680bab7b40f6dc9b8087630e5c0251c6fcd Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Sun, 1 Apr 2012 23:10:22 +0200 | ||
4 | Subject: [PATCH 08/10] am335x-evm: load uImage from /boot instead of VFAT | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | include/configs/am335x_evm.h | 4 ++-- | ||
9 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
10 | |||
11 | diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h | ||
12 | index a81d716..e42febe 100755 | ||
13 | --- a/include/configs/am335x_evm.h | ||
14 | +++ b/include/configs/am335x_evm.h | ||
15 | @@ -101,7 +101,7 @@ | ||
16 | "nfsroot=${serverip}:${rootpath},${nfsopts} rw " \ | ||
17 | "ip=dhcp\0" \ | ||
18 | "mmc_boot=run mmc_args; " \ | ||
19 | - "run mmc_load_uimage; " \ | ||
20 | + "run mmc_load_uimage_ext2; " \ | ||
21 | "bootm ${kloadaddr}\0" \ | ||
22 | "nand_boot=echo Booting from nand ...; " \ | ||
23 | "run nand_args; " \ | ||
24 | @@ -139,7 +139,7 @@ | ||
25 | "echo Running uenvcmd ...;" \ | ||
26 | "run uenvcmd;" \ | ||
27 | "fi;" \ | ||
28 | - "if run mmc_load_uimage; then " \ | ||
29 | + "if run mmc_load_uimage_ext2; then " \ | ||
30 | "run mmc_args;" \ | ||
31 | "bootm ${kloadaddr};" \ | ||
32 | "fi;" \ | ||
33 | -- | ||
34 | 1.7.10 | ||
35 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09git/0009-ext4fs-ls-load-support.patch b/recipes-bsp/u-boot/u-boot/2011.09git/0009-ext4fs-ls-load-support.patch deleted file mode 100644 index 37ef5d4a..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09git/0009-ext4fs-ls-load-support.patch +++ /dev/null | |||
@@ -1,2362 +0,0 @@ | |||
1 | From 4e2f3f39a37883bddbe92a71045cb90f489e1d5f Mon Sep 17 00:00:00 2001 | ||
2 | From: "uma.shankar" <uma.shankar@samsung.com> | ||
3 | Date: Mon, 9 Jan 2012 07:54:50 +0000 | ||
4 | Subject: [PATCH 09/10] ext4fs ls load support | ||
5 | |||
6 | Signed-off-by: Uma Shankar <uma.shankar@samsung.com> | ||
7 | Signed-off-by: Manjunatha C Achar <a.manjunatha@samsung.com> | ||
8 | Signed-off-by: Iqbal Shareef <iqbal.ams@samsung.com> | ||
9 | Signed-off-by: Hakgoo Lee <goodguy.lee@samsung.com> | ||
10 | --- | ||
11 | Makefile | 2 +- | ||
12 | common/Makefile | 1 + | ||
13 | common/cmd_ext4.c | 266 +++++++++++++++ | ||
14 | fs/Makefile | 1 + | ||
15 | fs/ext2/dev.c | 1 + | ||
16 | fs/ext2/ext2fs.c | 181 ++-------- | ||
17 | fs/ext4/Makefile | 51 +++ | ||
18 | fs/ext4/dev.c | 145 ++++++++ | ||
19 | fs/ext4/ext4_common.c | 875 +++++++++++++++++++++++++++++++++++++++++++++++++ | ||
20 | fs/ext4/ext4_common.h | 63 ++++ | ||
21 | fs/ext4/ext4fs.c | 228 +++++++++++++ | ||
22 | include/ext4fs.h | 132 ++++++++ | ||
23 | include/ext_common.h | 188 +++++++++++ | ||
24 | 13 files changed, 1977 insertions(+), 157 deletions(-) | ||
25 | create mode 100644 common/cmd_ext4.c | ||
26 | create mode 100644 fs/ext4/Makefile | ||
27 | create mode 100644 fs/ext4/dev.c | ||
28 | create mode 100644 fs/ext4/ext4_common.c | ||
29 | create mode 100644 fs/ext4/ext4_common.h | ||
30 | create mode 100644 fs/ext4/ext4fs.c | ||
31 | create mode 100644 include/ext4fs.h | ||
32 | create mode 100644 include/ext_common.h | ||
33 | |||
34 | diff --git a/Makefile b/Makefile | ||
35 | index 99b9278..6a5068d 100644 | ||
36 | --- a/Makefile | ||
37 | +++ b/Makefile | ||
38 | @@ -226,7 +226,7 @@ LIBS += arch/arm/cpu/ixp/npe/libnpe.o | ||
39 | endif | ||
40 | LIBS += arch/$(ARCH)/lib/lib$(ARCH).o | ||
41 | LIBS += fs/cramfs/libcramfs.o fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o \ | ||
42 | - fs/reiserfs/libreiserfs.o fs/ext2/libext2fs.o fs/yaffs2/libyaffs2.o \ | ||
43 | + fs/reiserfs/libreiserfs.o fs/ext2/libext2fs.o fs/ext4/libext4fs.o fs/yaffs2/libyaffs2.o \ | ||
44 | fs/ubifs/libubifs.o | ||
45 | LIBS += net/libnet.o | ||
46 | LIBS += disk/libdisk.o | ||
47 | diff --git a/common/Makefile b/common/Makefile | ||
48 | index 838ae25..b9b5c85 100644 | ||
49 | --- a/common/Makefile | ||
50 | +++ b/common/Makefile | ||
51 | @@ -87,6 +87,7 @@ COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += cmd_eeprom.o | ||
52 | COBJS-$(CONFIG_CMD_EEPROM) += cmd_eeprom.o | ||
53 | COBJS-$(CONFIG_CMD_ELF) += cmd_elf.o | ||
54 | COBJS-$(CONFIG_SYS_HUSH_PARSER) += cmd_exit.o | ||
55 | +COBJS-$(CONFIG_CMD_EXT4) += cmd_ext4.o | ||
56 | COBJS-$(CONFIG_CMD_EXT2) += cmd_ext2.o | ||
57 | COBJS-$(CONFIG_CMD_FAT) += cmd_fat.o | ||
58 | COBJS-$(CONFIG_CMD_FDC)$(CONFIG_CMD_FDOS) += cmd_fdc.o | ||
59 | diff --git a/common/cmd_ext4.c b/common/cmd_ext4.c | ||
60 | new file mode 100644 | ||
61 | index 0000000..2c53d2c | ||
62 | --- /dev/null | ||
63 | +++ b/common/cmd_ext4.c | ||
64 | @@ -0,0 +1,266 @@ | ||
65 | +/* | ||
66 | + * (C) Copyright 2011 - 2012 Samsung Electronics | ||
67 | + * EXT4 filesystem implementation in Uboot by | ||
68 | + * Uma Shankar <uma.shankar@samsung.com> | ||
69 | + * Manjunatha C Achar <a.manjunatha@samsung.com> | ||
70 | + * | ||
71 | + * Ext4fs support | ||
72 | + * made from existing cmd_ext2.c file of Uboot | ||
73 | + * | ||
74 | + * (C) Copyright 2004 | ||
75 | + * esd gmbh <www.esd-electronics.com> | ||
76 | + * Reinhard Arlt <reinhard.arlt@esd-electronics.com> | ||
77 | + * | ||
78 | + * made from cmd_reiserfs by | ||
79 | + * | ||
80 | + * (C) Copyright 2003 - 2004 | ||
81 | + * Sysgo Real-Time Solutions, AG <www.elinos.com> | ||
82 | + * Pavel Bartusek <pba@sysgo.com> | ||
83 | + * | ||
84 | + * This program is free software; you can redistribute it and/or | ||
85 | + * modify it under the terms of the GNU General Public License as | ||
86 | + * published by the Free Software Foundation; either version 2 of | ||
87 | + * the License, or (at your option) any later version. | ||
88 | + * | ||
89 | + * This program is distributed in the hope that it will be useful, | ||
90 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
91 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
92 | + * GNU General Public License for more details. | ||
93 | + * | ||
94 | + * You should have received a copy of the GNU General Public License | ||
95 | + * along with this program; if not, write to the Free Software | ||
96 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
97 | + * MA 02111-1307 USA | ||
98 | + * | ||
99 | + */ | ||
100 | + | ||
101 | +/* | ||
102 | + * Changelog: | ||
103 | + * 0.1 - Newly created file for ext4fs support. Taken from cmd_ext2.c | ||
104 | + * file in uboot. Added ext4fs ls and load support. | ||
105 | + */ | ||
106 | + | ||
107 | +#include <common.h> | ||
108 | +#include <part.h> | ||
109 | +#include <config.h> | ||
110 | +#include <command.h> | ||
111 | +#include <image.h> | ||
112 | +#include <linux/ctype.h> | ||
113 | +#include <asm/byteorder.h> | ||
114 | +#include <ext_common.h> | ||
115 | +#include <ext4fs.h> | ||
116 | +#include <linux/stat.h> | ||
117 | +#include <malloc.h> | ||
118 | + | ||
119 | +#if defined(CONFIG_CMD_USB) && defined(CONFIG_USB_STORAGE) | ||
120 | +#include <usb.h> | ||
121 | +#endif | ||
122 | + | ||
123 | +#if !defined(CONFIG_DOS_PARTITION) && !defined(CONFIG_EFI_PARTITION) | ||
124 | +#error DOS or EFI partition support must be selected | ||
125 | +#endif | ||
126 | + | ||
127 | +uint64_t total_sector; | ||
128 | +uint64_t part_offset; | ||
129 | + | ||
130 | +#define DOS_PART_MAGIC_OFFSET 0x1fe | ||
131 | +#define DOS_FS_TYPE_OFFSET 0x36 | ||
132 | +#define DOS_FS32_TYPE_OFFSET 0x52 | ||
133 | + | ||
134 | +static int do_ext4_load(cmd_tbl_t *cmdtp, int flag, int argc, | ||
135 | + char *const argv[]) | ||
136 | +{ | ||
137 | + char *filename = NULL; | ||
138 | + char *ep; | ||
139 | + int dev; | ||
140 | + unsigned long part = 1; | ||
141 | + ulong addr = 0; | ||
142 | + ulong part_length; | ||
143 | + int filelen; | ||
144 | + disk_partition_t info; | ||
145 | + struct ext_filesystem *fs; | ||
146 | + char buf[12]; | ||
147 | + unsigned long count; | ||
148 | + const char *addr_str; | ||
149 | + | ||
150 | + count = 0; | ||
151 | + addr = simple_strtoul(argv[3], NULL, 16); | ||
152 | + filename = getenv("bootfile"); | ||
153 | + switch (argc) { | ||
154 | + case 3: | ||
155 | + addr_str = getenv("loadaddr"); | ||
156 | + if (addr_str != NULL) | ||
157 | + addr = simple_strtoul(addr_str, NULL, 16); | ||
158 | + else | ||
159 | + addr = CONFIG_SYS_LOAD_ADDR; | ||
160 | + | ||
161 | + break; | ||
162 | + case 4: | ||
163 | + break; | ||
164 | + case 5: | ||
165 | + filename = argv[4]; | ||
166 | + break; | ||
167 | + case 6: | ||
168 | + filename = argv[4]; | ||
169 | + count = simple_strtoul(argv[5], NULL, 16); | ||
170 | + break; | ||
171 | + | ||
172 | + default: | ||
173 | + return cmd_usage(cmdtp); | ||
174 | + } | ||
175 | + | ||
176 | + if (!filename) { | ||
177 | + puts("** No boot file defined **\n"); | ||
178 | + return 1; | ||
179 | + } | ||
180 | + | ||
181 | + dev = (int)simple_strtoul(argv[2], &ep, 16); | ||
182 | + ext4_dev_desc = get_dev(argv[1], dev); | ||
183 | + if (ext4_dev_desc == NULL) { | ||
184 | + printf("** Block device %s %d not supported\n", argv[1], dev); | ||
185 | + return 1; | ||
186 | + } | ||
187 | + if (init_fs(ext4_dev_desc)) | ||
188 | + return 1; | ||
189 | + | ||
190 | + fs = get_fs(); | ||
191 | + if (*ep) { | ||
192 | + if (*ep != ':') { | ||
193 | + puts("** Invalid boot device, use `dev[:part]' **\n"); | ||
194 | + return 1; | ||
195 | + } | ||
196 | + part = simple_strtoul(++ep, NULL, 16); | ||
197 | + } | ||
198 | + | ||
199 | + if (part != 0) { | ||
200 | + if (get_partition_info(fs->dev_desc, part, &info)) { | ||
201 | + printf("** Bad partition %lu **\n", part); | ||
202 | + return 1; | ||
203 | + } | ||
204 | + | ||
205 | + if (strncmp((char *)info.type, BOOT_PART_TYPE, | ||
206 | + strlen(BOOT_PART_TYPE)) != 0) { | ||
207 | + printf("** Invalid partition type \"%s\"" | ||
208 | + " (expect \"" BOOT_PART_TYPE "\")\n", info.type); | ||
209 | + return 1; | ||
210 | + } | ||
211 | + printf("Loading file \"%s\" " | ||
212 | + "from %s device %d:%lu %s\n", | ||
213 | + filename, argv[1], dev, part, info.name); | ||
214 | + } else { | ||
215 | + printf("Loading file \"%s\" from %s device %d\n", | ||
216 | + filename, argv[1], dev); | ||
217 | + } | ||
218 | + | ||
219 | + part_length = ext4fs_set_blk_dev(fs->dev_desc, part); | ||
220 | + if (part_length == 0) { | ||
221 | + printf("**Bad partition - %s %d:%lu **\n", argv[1], dev, part); | ||
222 | + ext4fs_close(); | ||
223 | + return 1; | ||
224 | + } | ||
225 | + | ||
226 | + if (!ext4fs_mount(part_length)) { | ||
227 | + printf("** Bad ext2 partition or disk - %s %d:%lu **\n", | ||
228 | + argv[1], dev, part); | ||
229 | + ext4fs_close(); | ||
230 | + return 1; | ||
231 | + } | ||
232 | + | ||
233 | + filelen = ext4fs_open(filename); | ||
234 | + if (filelen < 0) { | ||
235 | + printf("** File not found %s\n", filename); | ||
236 | + ext4fs_close(); | ||
237 | + return 1; | ||
238 | + } | ||
239 | + if ((count < filelen) && (count != 0)) | ||
240 | + filelen = count; | ||
241 | + | ||
242 | + if (ext4fs_read((char *)addr, filelen) != filelen) { | ||
243 | + printf("** Unable to read \"%s\" from %s %d:%lu **\n", | ||
244 | + filename, argv[1], dev, part); | ||
245 | + ext4fs_close(); | ||
246 | + return 1; | ||
247 | + } | ||
248 | + | ||
249 | + ext4fs_close(); | ||
250 | + deinit_fs(fs->dev_desc); | ||
251 | + /* Loading ok, update default load address */ | ||
252 | + load_addr = addr; | ||
253 | + | ||
254 | + printf("%d bytes read\n", filelen); | ||
255 | + sprintf(buf, "%X", filelen); | ||
256 | + setenv("filesize", buf); | ||
257 | + | ||
258 | + return 0; | ||
259 | +} | ||
260 | + | ||
261 | +static int do_ext4_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) | ||
262 | +{ | ||
263 | + const char *filename = "/"; | ||
264 | + int dev; | ||
265 | + unsigned long part = 1; | ||
266 | + char *ep; | ||
267 | + struct ext_filesystem *fs; | ||
268 | + int part_length; | ||
269 | + | ||
270 | + if (argc < 3) | ||
271 | + return cmd_usage(cmdtp); | ||
272 | + | ||
273 | + dev = (int)simple_strtoul(argv[2], &ep, 16); | ||
274 | + ext4_dev_desc = get_dev(argv[1], dev); | ||
275 | + | ||
276 | + if (ext4_dev_desc == NULL) { | ||
277 | + printf("\n** Block device %s %d not supported\n", argv[1], dev); | ||
278 | + return 1; | ||
279 | + } | ||
280 | + | ||
281 | + if (init_fs(ext4_dev_desc)) | ||
282 | + return 1; | ||
283 | + | ||
284 | + fs = get_fs(); | ||
285 | + if (*ep) { | ||
286 | + if (*ep != ':') { | ||
287 | + puts("\n** Invalid boot device, use `dev[:part]' **\n"); | ||
288 | + return 1; | ||
289 | + } | ||
290 | + part = simple_strtoul(++ep, NULL, 16); | ||
291 | + } | ||
292 | + | ||
293 | + if (argc == 4) | ||
294 | + filename = argv[3]; | ||
295 | + | ||
296 | + part_length = ext4fs_set_blk_dev(fs->dev_desc, part); | ||
297 | + if (part_length == 0) { | ||
298 | + printf("** Bad partition - %s %d:%lu **\n", argv[1], dev, part); | ||
299 | + ext4fs_close(); | ||
300 | + return 1; | ||
301 | + } | ||
302 | + | ||
303 | + if (!ext4fs_mount(part_length)) { | ||
304 | + printf("** Bad ext2 partition or disk - %s %d:%lu **\n", | ||
305 | + argv[1], dev, part); | ||
306 | + ext4fs_close(); | ||
307 | + return 1; | ||
308 | + } | ||
309 | + if (ext4fs_ls(filename)) { | ||
310 | + printf("** Error ext2fs_ls() **\n"); | ||
311 | + ext4fs_close(); | ||
312 | + return 1; | ||
313 | + }; | ||
314 | + | ||
315 | + ext4fs_close(); | ||
316 | + deinit_fs(fs->dev_desc); | ||
317 | + | ||
318 | + return 0; | ||
319 | +} | ||
320 | + | ||
321 | +U_BOOT_CMD(ext4ls, 4, 1, do_ext4_ls, | ||
322 | + "list files in a directory (default /)", | ||
323 | + "<interface> <dev[:part]> [directory]\n" | ||
324 | + " - list files from 'dev' on 'interface' in a 'directory'"); | ||
325 | + | ||
326 | +U_BOOT_CMD(ext4load, 6, 0, do_ext4_load, | ||
327 | + "load binary file from a Ext2 filesystem", | ||
328 | + "<interface> <dev[:part]> [addr] [filename] [bytes]\n" | ||
329 | + " - load binary file 'filename' from 'dev' on 'interface'\n" | ||
330 | + " to address 'addr' from ext2 filesystem"); | ||
331 | diff --git a/fs/Makefile b/fs/Makefile | ||
332 | index 22aad12..00a8f37 100644 | ||
333 | --- a/fs/Makefile | ||
334 | +++ b/fs/Makefile | ||
335 | @@ -23,6 +23,7 @@ | ||
336 | # | ||
337 | |||
338 | subdirs-$(CONFIG_CMD_CRAMFS) := cramfs | ||
339 | +subdirs-$(CONFIG_CMD_EXT4) += ext4 | ||
340 | subdirs-$(CONFIG_CMD_EXT2) += ext2 | ||
341 | subdirs-$(CONFIG_CMD_FAT) += fat | ||
342 | subdirs-$(CONFIG_CMD_FDOS) += fdos | ||
343 | diff --git a/fs/ext2/dev.c b/fs/ext2/dev.c | ||
344 | index 78851d0..339a16e 100644 | ||
345 | --- a/fs/ext2/dev.c | ||
346 | +++ b/fs/ext2/dev.c | ||
347 | @@ -27,6 +27,7 @@ | ||
348 | #include <common.h> | ||
349 | #include <config.h> | ||
350 | #include <ext2fs.h> | ||
351 | +#include <ext_common.h> | ||
352 | |||
353 | static block_dev_desc_t *ext2fs_block_dev_desc; | ||
354 | static disk_partition_t part_info; | ||
355 | diff --git a/fs/ext2/ext2fs.c b/fs/ext2/ext2fs.c | ||
356 | index 8531db5..ea3d98c 100644 | ||
357 | --- a/fs/ext2/ext2fs.c | ||
358 | +++ b/fs/ext2/ext2fs.c | ||
359 | @@ -25,152 +25,16 @@ | ||
360 | |||
361 | #include <common.h> | ||
362 | #include <ext2fs.h> | ||
363 | +#include <ext_common.h> | ||
364 | #include <malloc.h> | ||
365 | #include <asm/byteorder.h> | ||
366 | |||
367 | extern int ext2fs_devread (int sector, int byte_offset, int byte_len, | ||
368 | char *buf); | ||
369 | |||
370 | -/* Magic value used to identify an ext2 filesystem. */ | ||
371 | -#define EXT2_MAGIC 0xEF53 | ||
372 | -/* Amount of indirect blocks in an inode. */ | ||
373 | -#define INDIRECT_BLOCKS 12 | ||
374 | -/* Maximum lenght of a pathname. */ | ||
375 | -#define EXT2_PATH_MAX 4096 | ||
376 | -/* Maximum nesting of symlinks, used to prevent a loop. */ | ||
377 | -#define EXT2_MAX_SYMLINKCNT 8 | ||
378 | - | ||
379 | -/* Filetype used in directory entry. */ | ||
380 | -#define FILETYPE_UNKNOWN 0 | ||
381 | -#define FILETYPE_REG 1 | ||
382 | -#define FILETYPE_DIRECTORY 2 | ||
383 | -#define FILETYPE_SYMLINK 7 | ||
384 | - | ||
385 | -/* Filetype information as used in inodes. */ | ||
386 | -#define FILETYPE_INO_MASK 0170000 | ||
387 | -#define FILETYPE_INO_REG 0100000 | ||
388 | -#define FILETYPE_INO_DIRECTORY 0040000 | ||
389 | -#define FILETYPE_INO_SYMLINK 0120000 | ||
390 | - | ||
391 | -/* Bits used as offset in sector */ | ||
392 | -#define DISK_SECTOR_BITS 9 | ||
393 | - | ||
394 | -/* Log2 size of ext2 block in 512 blocks. */ | ||
395 | -#define LOG2_EXT2_BLOCK_SIZE(data) (__le32_to_cpu (data->sblock.log2_block_size) + 1) | ||
396 | - | ||
397 | -/* Log2 size of ext2 block in bytes. */ | ||
398 | -#define LOG2_BLOCK_SIZE(data) (__le32_to_cpu (data->sblock.log2_block_size) + 10) | ||
399 | - | ||
400 | -/* The size of an ext2 block in bytes. */ | ||
401 | -#define EXT2_BLOCK_SIZE(data) (1 << LOG2_BLOCK_SIZE(data)) | ||
402 | - | ||
403 | -/* The ext2 superblock. */ | ||
404 | -struct ext2_sblock { | ||
405 | - uint32_t total_inodes; | ||
406 | - uint32_t total_blocks; | ||
407 | - uint32_t reserved_blocks; | ||
408 | - uint32_t free_blocks; | ||
409 | - uint32_t free_inodes; | ||
410 | - uint32_t first_data_block; | ||
411 | - uint32_t log2_block_size; | ||
412 | - uint32_t log2_fragment_size; | ||
413 | - uint32_t blocks_per_group; | ||
414 | - uint32_t fragments_per_group; | ||
415 | - uint32_t inodes_per_group; | ||
416 | - uint32_t mtime; | ||
417 | - uint32_t utime; | ||
418 | - uint16_t mnt_count; | ||
419 | - uint16_t max_mnt_count; | ||
420 | - uint16_t magic; | ||
421 | - uint16_t fs_state; | ||
422 | - uint16_t error_handling; | ||
423 | - uint16_t minor_revision_level; | ||
424 | - uint32_t lastcheck; | ||
425 | - uint32_t checkinterval; | ||
426 | - uint32_t creator_os; | ||
427 | - uint32_t revision_level; | ||
428 | - uint16_t uid_reserved; | ||
429 | - uint16_t gid_reserved; | ||
430 | - uint32_t first_inode; | ||
431 | - uint16_t inode_size; | ||
432 | - uint16_t block_group_number; | ||
433 | - uint32_t feature_compatibility; | ||
434 | - uint32_t feature_incompat; | ||
435 | - uint32_t feature_ro_compat; | ||
436 | - uint32_t unique_id[4]; | ||
437 | - char volume_name[16]; | ||
438 | - char last_mounted_on[64]; | ||
439 | - uint32_t compression_info; | ||
440 | -}; | ||
441 | - | ||
442 | -/* The ext2 blockgroup. */ | ||
443 | -struct ext2_block_group { | ||
444 | - uint32_t block_id; | ||
445 | - uint32_t inode_id; | ||
446 | - uint32_t inode_table_id; | ||
447 | - uint16_t free_blocks; | ||
448 | - uint16_t free_inodes; | ||
449 | - uint16_t used_dir_cnt; | ||
450 | - uint32_t reserved[3]; | ||
451 | -}; | ||
452 | - | ||
453 | -/* The ext2 inode. */ | ||
454 | -struct ext2_inode { | ||
455 | - uint16_t mode; | ||
456 | - uint16_t uid; | ||
457 | - uint32_t size; | ||
458 | - uint32_t atime; | ||
459 | - uint32_t ctime; | ||
460 | - uint32_t mtime; | ||
461 | - uint32_t dtime; | ||
462 | - uint16_t gid; | ||
463 | - uint16_t nlinks; | ||
464 | - uint32_t blockcnt; /* Blocks of 512 bytes!! */ | ||
465 | - uint32_t flags; | ||
466 | - uint32_t osd1; | ||
467 | - union { | ||
468 | - struct datablocks { | ||
469 | - uint32_t dir_blocks[INDIRECT_BLOCKS]; | ||
470 | - uint32_t indir_block; | ||
471 | - uint32_t double_indir_block; | ||
472 | - uint32_t tripple_indir_block; | ||
473 | - } blocks; | ||
474 | - char symlink[60]; | ||
475 | - } b; | ||
476 | - uint32_t version; | ||
477 | - uint32_t acl; | ||
478 | - uint32_t dir_acl; | ||
479 | - uint32_t fragment_addr; | ||
480 | - uint32_t osd2[3]; | ||
481 | -}; | ||
482 | - | ||
483 | -/* The header of an ext2 directory entry. */ | ||
484 | -struct ext2_dirent { | ||
485 | - uint32_t inode; | ||
486 | - uint16_t direntlen; | ||
487 | - uint8_t namelen; | ||
488 | - uint8_t filetype; | ||
489 | -}; | ||
490 | - | ||
491 | -struct ext2fs_node { | ||
492 | - struct ext2_data *data; | ||
493 | - struct ext2_inode inode; | ||
494 | - int ino; | ||
495 | - int inode_read; | ||
496 | -}; | ||
497 | - | ||
498 | -/* Information about a "mounted" ext2 filesystem. */ | ||
499 | -struct ext2_data { | ||
500 | - struct ext2_sblock sblock; | ||
501 | - struct ext2_inode *inode; | ||
502 | - struct ext2fs_node diropen; | ||
503 | -}; | ||
504 | - | ||
505 | - | ||
506 | -typedef struct ext2fs_node *ext2fs_node_t; | ||
507 | |||
508 | struct ext2_data *ext2fs_root = NULL; | ||
509 | -ext2fs_node_t ext2fs_file = NULL; | ||
510 | +struct ext2fs_node *ext2fs_file; | ||
511 | int symlinknest = 0; | ||
512 | uint32_t *indir1_block = NULL; | ||
513 | int indir1_size = 0; | ||
514 | @@ -243,14 +107,16 @@ static int ext2fs_read_inode | ||
515 | } | ||
516 | |||
517 | |||
518 | -void ext2fs_free_node (ext2fs_node_t node, ext2fs_node_t currroot) { | ||
519 | +void ext2fs_free_node(struct ext2fs_node *node, struct ext2fs_node *currroot) | ||
520 | +{ | ||
521 | if ((node != &ext2fs_root->diropen) && (node != currroot)) { | ||
522 | free (node); | ||
523 | } | ||
524 | } | ||
525 | |||
526 | |||
527 | -static int ext2fs_read_block (ext2fs_node_t node, int fileblock) { | ||
528 | +static int ext2fs_read_block(struct ext2fs_node *node, int fileblock) | ||
529 | +{ | ||
530 | struct ext2_data *data = node->data; | ||
531 | struct ext2_inode *inode = &node->inode; | ||
532 | int blknr; | ||
533 | @@ -390,7 +256,8 @@ static int ext2fs_read_block (ext2fs_node_t node, int fileblock) { | ||
534 | |||
535 | |||
536 | int ext2fs_read_file | ||
537 | - (ext2fs_node_t node, int pos, unsigned int len, char *buf) { | ||
538 | + (struct ext2fs_node *node, int pos, unsigned int len, char *buf) | ||
539 | +{ | ||
540 | int i; | ||
541 | int blockcnt; | ||
542 | int log2blocksize = LOG2_EXT2_BLOCK_SIZE (node->data); | ||
543 | @@ -471,8 +338,8 @@ int ext2fs_read_file | ||
544 | return (len); | ||
545 | } | ||
546 | |||
547 | - | ||
548 | -static int ext2fs_iterate_dir (ext2fs_node_t dir, char *name, ext2fs_node_t * fnode, int *ftype) | ||
549 | +int ext2fs_iterate_dir(struct ext2fs_node *dir, char *name, | ||
550 | + struct ext2fs_node **fnode, int *ftype) | ||
551 | { | ||
552 | unsigned int fpos = 0; | ||
553 | int status; | ||
554 | @@ -501,7 +368,7 @@ static int ext2fs_iterate_dir (ext2fs_node_t dir, char *name, ext2fs_node_t * fn | ||
555 | } | ||
556 | if (dirent.namelen != 0) { | ||
557 | char filename[dirent.namelen + 1]; | ||
558 | - ext2fs_node_t fdiro; | ||
559 | + struct ext2fs_node *fdiro; | ||
560 | int type = FILETYPE_UNKNOWN; | ||
561 | |||
562 | status = ext2fs_read_file (diro, | ||
563 | @@ -603,8 +470,8 @@ static int ext2fs_iterate_dir (ext2fs_node_t dir, char *name, ext2fs_node_t * fn | ||
564 | return (0); | ||
565 | } | ||
566 | |||
567 | - | ||
568 | -static char *ext2fs_read_symlink (ext2fs_node_t node) { | ||
569 | +static char *ext2fs_read_symlink(struct ext2fs_node *node) | ||
570 | +{ | ||
571 | char *symlink; | ||
572 | struct ext2fs_node *diro = node; | ||
573 | int status; | ||
574 | @@ -641,15 +508,16 @@ static char *ext2fs_read_symlink (ext2fs_node_t node) { | ||
575 | |||
576 | |||
577 | int ext2fs_find_file1 | ||
578 | - (const char *currpath, | ||
579 | - ext2fs_node_t currroot, ext2fs_node_t * currfound, int *foundtype) { | ||
580 | + (const char *currpath, struct ext2fs_node *currroot, | ||
581 | + struct ext2fs_node **currfound, int *foundtype) | ||
582 | +{ | ||
583 | char fpath[strlen (currpath) + 1]; | ||
584 | char *name = fpath; | ||
585 | char *next; | ||
586 | int status; | ||
587 | int type = FILETYPE_DIRECTORY; | ||
588 | - ext2fs_node_t currnode = currroot; | ||
589 | - ext2fs_node_t oldnode = currroot; | ||
590 | + struct ext2fs_node *currnode = currroot; | ||
591 | + struct ext2fs_node *oldnode = currroot; | ||
592 | |||
593 | strncpy (fpath, currpath, strlen (currpath) + 1); | ||
594 | |||
595 | @@ -745,8 +613,9 @@ int ext2fs_find_file1 | ||
596 | |||
597 | |||
598 | int ext2fs_find_file | ||
599 | - (const char *path, | ||
600 | - ext2fs_node_t rootnode, ext2fs_node_t * foundnode, int expecttype) { | ||
601 | + (const char *path, struct ext2fs_node *rootnode, | ||
602 | + struct ext2fs_node **foundnode, int expecttype) | ||
603 | +{ | ||
604 | int status; | ||
605 | int foundtype = FILETYPE_DIRECTORY; | ||
606 | |||
607 | @@ -772,7 +641,7 @@ int ext2fs_find_file | ||
608 | |||
609 | |||
610 | int ext2fs_ls (const char *dirname) { | ||
611 | - ext2fs_node_t dirnode; | ||
612 | + struct ext2fs_node *dirnode; | ||
613 | int status; | ||
614 | |||
615 | if (ext2fs_root == NULL) { | ||
616 | @@ -792,7 +661,7 @@ int ext2fs_ls (const char *dirname) { | ||
617 | |||
618 | |||
619 | int ext2fs_open (const char *filename) { | ||
620 | - ext2fs_node_t fdiro = NULL; | ||
621 | + struct ext2fs_node *fdiro = NULL; | ||
622 | int status; | ||
623 | int len; | ||
624 | |||
625 | @@ -822,8 +691,8 @@ fail: | ||
626 | } | ||
627 | |||
628 | |||
629 | -int ext2fs_close (void | ||
630 | - ) { | ||
631 | +int ext2fs_close(void) | ||
632 | +{ | ||
633 | if ((ext2fs_file != NULL) && (ext2fs_root != NULL)) { | ||
634 | ext2fs_free_node (ext2fs_file, &ext2fs_root->diropen); | ||
635 | ext2fs_file = NULL; | ||
636 | diff --git a/fs/ext4/Makefile b/fs/ext4/Makefile | ||
637 | new file mode 100644 | ||
638 | index 0000000..7add4ab | ||
639 | --- /dev/null | ||
640 | +++ b/fs/ext4/Makefile | ||
641 | @@ -0,0 +1,51 @@ | ||
642 | +# | ||
643 | +# (C) Copyright 2006 | ||
644 | +# Wolfgang Denk, DENX Software Engineering, wd@denx.de. | ||
645 | +# | ||
646 | +# (C) Copyright 2003 | ||
647 | +# Pavel Bartusek, Sysgo Real-Time Solutions AG, pba@sysgo.de | ||
648 | +# | ||
649 | +# | ||
650 | +# See file CREDITS for list of people who contributed to this | ||
651 | +# project. | ||
652 | +# | ||
653 | +# This program is free software; you can redistribute it and/or | ||
654 | +# modify it under the terms of the GNU General Public License as | ||
655 | +# published by the Free Software Foundation; either version 2 of | ||
656 | +# the License, or (at your option) any later version. | ||
657 | +# | ||
658 | +# This program is distributed in the hope that it will be useful, | ||
659 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
660 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
661 | +# GNU General Public License for more details. | ||
662 | +# | ||
663 | +# You should have received a copy of the GNU General Public License | ||
664 | +# along with this program; if not, write to the Free Software | ||
665 | +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
666 | +# MA 02111-1307 USA | ||
667 | +# | ||
668 | + | ||
669 | +include $(TOPDIR)/config.mk | ||
670 | + | ||
671 | +LIB = $(obj)libext4fs.o | ||
672 | + | ||
673 | +AOBJS = | ||
674 | +COBJS-$(CONFIG_CMD_EXT4) := ext4fs.o ext4_common.o dev.o | ||
675 | + | ||
676 | +SRCS := $(AOBJS:.o=.S) $(COBJS-y:.o=.c) | ||
677 | +OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS-y)) | ||
678 | + | ||
679 | + | ||
680 | +all: $(LIB) $(AOBJS) | ||
681 | + | ||
682 | +$(LIB): $(obj).depend $(OBJS) | ||
683 | + $(call cmd_link_o_target, $(OBJS)) | ||
684 | + | ||
685 | +######################################################################### | ||
686 | + | ||
687 | +# defines $(obj).depend target | ||
688 | +include $(SRCTREE)/rules.mk | ||
689 | + | ||
690 | +sinclude $(obj).depend | ||
691 | + | ||
692 | +######################################################################### | ||
693 | diff --git a/fs/ext4/dev.c b/fs/ext4/dev.c | ||
694 | new file mode 100644 | ||
695 | index 0000000..2054be3 | ||
696 | --- /dev/null | ||
697 | +++ b/fs/ext4/dev.c | ||
698 | @@ -0,0 +1,145 @@ | ||
699 | +/* | ||
700 | + * (C) Copyright 2011 - 2012 Samsung Electronics | ||
701 | + * EXT4 filesystem implementation in Uboot by | ||
702 | + * Uma Shankar <uma.shankar@samsung.com> | ||
703 | + * Manjunatha C Achar <a.manjunatha@samsung.com> | ||
704 | + * | ||
705 | + * made from existing ext2/dev.c file of Uboot | ||
706 | + * (C) Copyright 2004 | ||
707 | + * esd gmbh <www.esd-electronics.com> | ||
708 | + * Reinhard Arlt <reinhard.arlt@esd-electronics.com> | ||
709 | + * | ||
710 | + * based on code of fs/reiserfs/dev.c by | ||
711 | + * | ||
712 | + * (C) Copyright 2003 - 2004 | ||
713 | + * Sysgo AG, <www.elinos.com>, Pavel Bartusek <pba@sysgo.com> | ||
714 | + * | ||
715 | + * This program is free software; you can redistribute it and/or modify | ||
716 | + * it under the terms of the GNU General Public License as published by | ||
717 | + * the Free Software Foundation; either version 2 of the License, or | ||
718 | + * (at your option) any later version. | ||
719 | + * | ||
720 | + * This program is distributed in the hope that it will be useful, | ||
721 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
722 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
723 | + * GNU General Public License for more details. | ||
724 | + * | ||
725 | + * You should have received a copy of the GNU General Public License | ||
726 | + * along with this program; if not, write to the Free Software | ||
727 | + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
728 | + * | ||
729 | + */ | ||
730 | + | ||
731 | +/* | ||
732 | + * Changelog: | ||
733 | + * 0.1 - Newly created file for ext4fs support. Taken from | ||
734 | + * fs/ext2/dev.c file in uboot. | ||
735 | + */ | ||
736 | + | ||
737 | +#include <common.h> | ||
738 | +#include <config.h> | ||
739 | +#include <ext_common.h> | ||
740 | + | ||
741 | +static block_dev_desc_t *ext4fs_block_dev_desc; | ||
742 | +static disk_partition_t part_info; | ||
743 | + | ||
744 | +int ext4fs_set_blk_dev(block_dev_desc_t *rbdd, int part) | ||
745 | +{ | ||
746 | + ext4fs_block_dev_desc = rbdd; | ||
747 | + | ||
748 | + if (part == 0) { | ||
749 | + /* disk doesn't use partition table */ | ||
750 | + part_info.start = 0; | ||
751 | + part_info.size = rbdd->lba; | ||
752 | + part_info.blksz = rbdd->blksz; | ||
753 | + } else { | ||
754 | + if (get_partition_info(ext4fs_block_dev_desc, | ||
755 | + part, &part_info)) | ||
756 | + return 0; | ||
757 | + } | ||
758 | + return part_info.size; | ||
759 | +} | ||
760 | + | ||
761 | +int ext4fs_devread(int sector, int byte_offset, int byte_len, char *buf) | ||
762 | +{ | ||
763 | + char sec_buf[SECTOR_SIZE]; | ||
764 | + unsigned block_len; | ||
765 | + | ||
766 | + /* Check partition boundaries */ | ||
767 | + if ((sector < 0) | ||
768 | + || ((sector + ((byte_offset + byte_len - 1) >> SECTOR_BITS)) >= | ||
769 | + part_info.size)) { | ||
770 | + printf("%s read outside partition %d\n", __func__, sector); | ||
771 | + return 0; | ||
772 | + } | ||
773 | + | ||
774 | + /* Get the read to the beginning of a partition */ | ||
775 | + sector += byte_offset >> SECTOR_BITS; | ||
776 | + byte_offset &= SECTOR_SIZE - 1; | ||
777 | + | ||
778 | + debug(" <%d, %d, %d>\n", sector, byte_offset, byte_len); | ||
779 | + | ||
780 | + if (ext4fs_block_dev_desc == NULL) { | ||
781 | + printf("** Invalid Block Device Descriptor (NULL)\n"); | ||
782 | + return 0; | ||
783 | + } | ||
784 | + | ||
785 | + if (byte_offset != 0) { | ||
786 | + /* read first part which isn't aligned with start of sector */ | ||
787 | + if (ext4fs_block_dev_desc-> | ||
788 | + block_read(ext4fs_block_dev_desc->dev, | ||
789 | + part_info.start + sector, 1, | ||
790 | + (unsigned long *) sec_buf) != 1) { | ||
791 | + printf(" ** ext2fs_devread() read error **\n"); | ||
792 | + return 0; | ||
793 | + } | ||
794 | + memcpy(buf, sec_buf + byte_offset, | ||
795 | + min(SECTOR_SIZE - byte_offset, byte_len)); | ||
796 | + buf += min(SECTOR_SIZE - byte_offset, byte_len); | ||
797 | + byte_len -= min(SECTOR_SIZE - byte_offset, byte_len); | ||
798 | + sector++; | ||
799 | + } | ||
800 | + | ||
801 | + if (byte_len == 0) | ||
802 | + return 1; | ||
803 | + | ||
804 | + /* read sector aligned part */ | ||
805 | + block_len = byte_len & ~(SECTOR_SIZE - 1); | ||
806 | + | ||
807 | + if (block_len == 0) { | ||
808 | + u8 p[SECTOR_SIZE]; | ||
809 | + | ||
810 | + block_len = SECTOR_SIZE; | ||
811 | + ext4fs_block_dev_desc->block_read(ext4fs_block_dev_desc->dev, | ||
812 | + part_info.start + sector, | ||
813 | + 1, (unsigned long *)p); | ||
814 | + memcpy(buf, p, byte_len); | ||
815 | + return 1; | ||
816 | + } | ||
817 | + | ||
818 | + if (ext4fs_block_dev_desc->block_read(ext4fs_block_dev_desc->dev, | ||
819 | + part_info.start + sector, | ||
820 | + block_len / SECTOR_SIZE, | ||
821 | + (unsigned long *) buf) != | ||
822 | + block_len / SECTOR_SIZE) { | ||
823 | + printf(" ** %s read error - block\n", __func__); | ||
824 | + return 0; | ||
825 | + } | ||
826 | + block_len = byte_len & ~(SECTOR_SIZE - 1); | ||
827 | + buf += block_len; | ||
828 | + byte_len -= block_len; | ||
829 | + sector += block_len / SECTOR_SIZE; | ||
830 | + | ||
831 | + if (byte_len != 0) { | ||
832 | + /* read rest of data which are not in whole sector */ | ||
833 | + if (ext4fs_block_dev_desc-> | ||
834 | + block_read(ext4fs_block_dev_desc->dev, | ||
835 | + part_info.start + sector, 1, | ||
836 | + (unsigned long *) sec_buf) != 1) { | ||
837 | + printf("* %s read error - last part\n", __func__); | ||
838 | + return 0; | ||
839 | + } | ||
840 | + memcpy(buf, sec_buf, byte_len); | ||
841 | + } | ||
842 | + return 1; | ||
843 | +} | ||
844 | diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c | ||
845 | new file mode 100644 | ||
846 | index 0000000..d9deefe | ||
847 | --- /dev/null | ||
848 | +++ b/fs/ext4/ext4_common.c | ||
849 | @@ -0,0 +1,875 @@ | ||
850 | +/* | ||
851 | + * (C) Copyright 2011 - 2012 Samsung Electronics | ||
852 | + * EXT4 filesystem implementation in Uboot by | ||
853 | + * Uma Shankar <uma.shankar@samsung.com> | ||
854 | + * Manjunatha C Achar <a.manjunatha@samsung.com> | ||
855 | + * | ||
856 | + * ext4ls and ext4load : Based on ext2 ls load support in Uboot. | ||
857 | + * | ||
858 | + * (C) Copyright 2004 | ||
859 | + * esd gmbh <www.esd-electronics.com> | ||
860 | + * Reinhard Arlt <reinhard.arlt@esd-electronics.com> | ||
861 | + * | ||
862 | + * based on code from grub2 fs/ext2.c and fs/fshelp.c by | ||
863 | + * GRUB -- GRand Unified Bootloader | ||
864 | + * Copyright (C) 2003, 2004 Free Software Foundation, Inc. | ||
865 | + * | ||
866 | + * This program is free software; you can redistribute it and/or modify | ||
867 | + * it under the terms of the GNU General Public License as published by | ||
868 | + * the Free Software Foundation; either version 2 of the License, or | ||
869 | + * (at your option) any later version. | ||
870 | + * | ||
871 | + * This program is distributed in the hope that it will be useful, | ||
872 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
873 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
874 | + * GNU General Public License for more details. | ||
875 | + * | ||
876 | + * You should have received a copy of the GNU General Public License | ||
877 | + * along with this program; if not, write to the Free Software | ||
878 | + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
879 | + */ | ||
880 | + | ||
881 | +#include <common.h> | ||
882 | +#include <ext_common.h> | ||
883 | +#include <ext4fs.h> | ||
884 | +#include <malloc.h> | ||
885 | +#include <stddef.h> | ||
886 | +#include <linux/stat.h> | ||
887 | +#include <linux/time.h> | ||
888 | +#include <asm/byteorder.h> | ||
889 | +#include "ext4_common.h" | ||
890 | + | ||
891 | +struct ext2_data *ext4fs_root; | ||
892 | +struct ext2fs_node *ext4fs_file; | ||
893 | +uint32_t *ext4fs_indir1_block; | ||
894 | +int ext4fs_indir1_size; | ||
895 | +int ext4fs_indir1_blkno = -1; | ||
896 | +uint32_t *ext4fs_indir2_block; | ||
897 | +int ext4fs_indir2_size; | ||
898 | +int ext4fs_indir2_blkno = -1; | ||
899 | + | ||
900 | +uint32_t *ext4fs_indir3_block; | ||
901 | +int ext4fs_indir3_size; | ||
902 | +int ext4fs_indir3_blkno = -1; | ||
903 | +struct ext2_inode *g_parent_inode; | ||
904 | +static int symlinknest; | ||
905 | + | ||
906 | +static struct ext4_extent_header *ext4fs_get_extent_block | ||
907 | + (struct ext2_data *data, char *buf, | ||
908 | + struct ext4_extent_header *ext_block, | ||
909 | + uint32_t fileblock, int log2_blksz) | ||
910 | +{ | ||
911 | + struct ext4_extent_idx *index; | ||
912 | + unsigned long long block; | ||
913 | + struct ext_filesystem *fs = get_fs(); | ||
914 | + int i; | ||
915 | + | ||
916 | + while (1) { | ||
917 | + index = (struct ext4_extent_idx *)(ext_block + 1); | ||
918 | + | ||
919 | + if (le32_to_cpu(ext_block->eh_magic) != EXT4_EXT_MAGIC) | ||
920 | + return 0; | ||
921 | + | ||
922 | + if (ext_block->eh_depth == 0) | ||
923 | + return ext_block; | ||
924 | + i = -1; | ||
925 | + do { | ||
926 | + i++; | ||
927 | + if (i >= le32_to_cpu(ext_block->eh_entries)) | ||
928 | + break; | ||
929 | + } while (fileblock > le32_to_cpu(index[i].ei_block)); | ||
930 | + | ||
931 | + if (--i < 0) | ||
932 | + return 0; | ||
933 | + | ||
934 | + block = le32_to_cpu(index[i].ei_leaf_hi); | ||
935 | + block = (block << 32) + le32_to_cpu(index[i].ei_leaf_lo); | ||
936 | + | ||
937 | + if (ext4fs_devread(block << log2_blksz, 0, fs->blksz, buf)) | ||
938 | + ext_block = (struct ext4_extent_header *)buf; | ||
939 | + else | ||
940 | + return 0; | ||
941 | + } | ||
942 | +} | ||
943 | + | ||
944 | +static int ext4fs_blockgroup | ||
945 | + (struct ext2_data *data, int group, struct ext2_block_group *blkgrp) | ||
946 | +{ | ||
947 | + long int blkno; | ||
948 | + unsigned int blkoff, desc_per_blk; | ||
949 | + | ||
950 | + desc_per_blk = EXT2_BLOCK_SIZE(data) / sizeof(struct ext2_block_group); | ||
951 | + | ||
952 | + blkno = __le32_to_cpu(data->sblock.first_data_block) + 1 + | ||
953 | + group / desc_per_blk; | ||
954 | + blkoff = (group % desc_per_blk) * sizeof(struct ext2_block_group); | ||
955 | + | ||
956 | + debug("ext4fs read %d group descriptor (blkno %ld blkoff %u)\n", | ||
957 | + group, blkno, blkoff); | ||
958 | + | ||
959 | + return ext4fs_devread(blkno << LOG2_EXT2_BLOCK_SIZE(data), | ||
960 | + blkoff, sizeof(struct ext2_block_group), | ||
961 | + (char *)blkgrp); | ||
962 | +} | ||
963 | + | ||
964 | +int ext4fs_read_inode(struct ext2_data *data, int ino, struct ext2_inode *inode) | ||
965 | +{ | ||
966 | + struct ext2_block_group blkgrp; | ||
967 | + struct ext2_sblock *sblock = &data->sblock; | ||
968 | + struct ext_filesystem *fs = get_fs(); | ||
969 | + int inodes_per_block, status; | ||
970 | + long int blkno; | ||
971 | + unsigned int blkoff; | ||
972 | + | ||
973 | + /* It is easier to calculate if the first inode is 0. */ | ||
974 | + ino--; | ||
975 | + status = ext4fs_blockgroup(data, ino / __le32_to_cpu | ||
976 | + (sblock->inodes_per_group), &blkgrp); | ||
977 | + if (status == 0) | ||
978 | + return 0; | ||
979 | + | ||
980 | + inodes_per_block = EXT2_BLOCK_SIZE(data) / fs->inodesz; | ||
981 | + blkno = __le32_to_cpu(blkgrp.inode_table_id) + | ||
982 | + (ino % __le32_to_cpu(sblock->inodes_per_group)) / inodes_per_block; | ||
983 | + blkoff = (ino % inodes_per_block) * fs->inodesz; | ||
984 | + /* Read the inode. */ | ||
985 | + status = ext4fs_devread(blkno << LOG2_EXT2_BLOCK_SIZE(data), blkoff, | ||
986 | + sizeof(struct ext2_inode), (char *)inode); | ||
987 | + if (status == 0) | ||
988 | + return 0; | ||
989 | + | ||
990 | + return 1; | ||
991 | +} | ||
992 | + | ||
993 | +long int read_allocated_block(struct ext2_inode *inode, int fileblock) | ||
994 | +{ | ||
995 | + long int blknr; | ||
996 | + int blksz; | ||
997 | + int log2_blksz; | ||
998 | + int status; | ||
999 | + long int rblock; | ||
1000 | + long int perblock_parent; | ||
1001 | + long int perblock_child; | ||
1002 | + unsigned long long start; | ||
1003 | + /* get the blocksize of the filesystem */ | ||
1004 | + blksz = EXT2_BLOCK_SIZE(ext4fs_root); | ||
1005 | + log2_blksz = LOG2_EXT2_BLOCK_SIZE(ext4fs_root); | ||
1006 | + if (le32_to_cpu(inode->flags) & EXT4_EXTENTS_FL) { | ||
1007 | + char *buf = zalloc(blksz); | ||
1008 | + if (!buf) | ||
1009 | + return -ENOMEM; | ||
1010 | + struct ext4_extent_header *ext_block; | ||
1011 | + struct ext4_extent *extent; | ||
1012 | + int i = -1; | ||
1013 | + ext_block = ext4fs_get_extent_block(ext4fs_root, buf, | ||
1014 | + (struct ext4_extent_header | ||
1015 | + *)inode->b. | ||
1016 | + blocks.dir_blocks, | ||
1017 | + fileblock, log2_blksz); | ||
1018 | + if (!ext_block) { | ||
1019 | + printf("invalid extent block\n"); | ||
1020 | + free(buf); | ||
1021 | + return -EINVAL; | ||
1022 | + } | ||
1023 | + | ||
1024 | + extent = (struct ext4_extent *)(ext_block + 1); | ||
1025 | + | ||
1026 | + do { | ||
1027 | + i++; | ||
1028 | + if (i >= le32_to_cpu(ext_block->eh_entries)) | ||
1029 | + break; | ||
1030 | + } while (fileblock >= le32_to_cpu(extent[i].ee_block)); | ||
1031 | + if (--i >= 0) { | ||
1032 | + fileblock -= le32_to_cpu(extent[i].ee_block); | ||
1033 | + if (fileblock >= le32_to_cpu(extent[i].ee_len)) { | ||
1034 | + free(buf); | ||
1035 | + return 0; | ||
1036 | + } | ||
1037 | + | ||
1038 | + start = le32_to_cpu(extent[i].ee_start_hi); | ||
1039 | + start = (start << 32) + | ||
1040 | + le32_to_cpu(extent[i].ee_start_lo); | ||
1041 | + free(buf); | ||
1042 | + return fileblock + start; | ||
1043 | + } | ||
1044 | + | ||
1045 | + printf("Extent Error\n"); | ||
1046 | + free(buf); | ||
1047 | + return -1; | ||
1048 | + } | ||
1049 | + | ||
1050 | + /* Direct blocks. */ | ||
1051 | + if (fileblock < INDIRECT_BLOCKS) | ||
1052 | + blknr = __le32_to_cpu(inode->b.blocks.dir_blocks[fileblock]); | ||
1053 | + | ||
1054 | + /* Indirect. */ | ||
1055 | + else if (fileblock < (INDIRECT_BLOCKS + (blksz / 4))) { | ||
1056 | + if (ext4fs_indir1_block == NULL) { | ||
1057 | + ext4fs_indir1_block = zalloc(blksz); | ||
1058 | + if (ext4fs_indir1_block == NULL) { | ||
1059 | + printf("** SI ext2fs read block (indir 1)" | ||
1060 | + "malloc failed. **\n"); | ||
1061 | + return -1; | ||
1062 | + } | ||
1063 | + ext4fs_indir1_size = blksz; | ||
1064 | + ext4fs_indir1_blkno = -1; | ||
1065 | + } | ||
1066 | + if (blksz != ext4fs_indir1_size) { | ||
1067 | + free(ext4fs_indir1_block); | ||
1068 | + ext4fs_indir1_block = NULL; | ||
1069 | + ext4fs_indir1_size = 0; | ||
1070 | + ext4fs_indir1_blkno = -1; | ||
1071 | + ext4fs_indir1_block = zalloc(blksz); | ||
1072 | + if (ext4fs_indir1_block == NULL) { | ||
1073 | + printf("** SI ext2fs read block (indir 1):" | ||
1074 | + "malloc failed. **\n"); | ||
1075 | + return -1; | ||
1076 | + } | ||
1077 | + ext4fs_indir1_size = blksz; | ||
1078 | + } | ||
1079 | + if ((__le32_to_cpu(inode->b.blocks.indir_block) << | ||
1080 | + log2_blksz) != ext4fs_indir1_blkno) { | ||
1081 | + status = | ||
1082 | + ext4fs_devread(__le32_to_cpu | ||
1083 | + (inode->b.blocks. | ||
1084 | + indir_block) << log2_blksz, 0, | ||
1085 | + blksz, (char *)ext4fs_indir1_block); | ||
1086 | + if (status == 0) { | ||
1087 | + printf("** SI ext2fs read block (indir 1)" | ||
1088 | + "failed. **\n"); | ||
1089 | + return 0; | ||
1090 | + } | ||
1091 | + ext4fs_indir1_blkno = | ||
1092 | + __le32_to_cpu(inode->b.blocks. | ||
1093 | + indir_block) << log2_blksz; | ||
1094 | + } | ||
1095 | + blknr = __le32_to_cpu(ext4fs_indir1_block | ||
1096 | + [fileblock - INDIRECT_BLOCKS]); | ||
1097 | + } | ||
1098 | + /* Double indirect. */ | ||
1099 | + else if (fileblock < (INDIRECT_BLOCKS + (blksz / 4 * | ||
1100 | + (blksz / 4 + 1)))) { | ||
1101 | + | ||
1102 | + long int perblock = blksz / 4; | ||
1103 | + long int rblock = fileblock - (INDIRECT_BLOCKS + blksz / 4); | ||
1104 | + | ||
1105 | + if (ext4fs_indir1_block == NULL) { | ||
1106 | + ext4fs_indir1_block = zalloc(blksz); | ||
1107 | + if (ext4fs_indir1_block == NULL) { | ||
1108 | + printf("** DI ext2fs read block (indir 2 1)" | ||
1109 | + "malloc failed. **\n"); | ||
1110 | + return -1; | ||
1111 | + } | ||
1112 | + ext4fs_indir1_size = blksz; | ||
1113 | + ext4fs_indir1_blkno = -1; | ||
1114 | + } | ||
1115 | + if (blksz != ext4fs_indir1_size) { | ||
1116 | + free(ext4fs_indir1_block); | ||
1117 | + ext4fs_indir1_block = NULL; | ||
1118 | + ext4fs_indir1_size = 0; | ||
1119 | + ext4fs_indir1_blkno = -1; | ||
1120 | + ext4fs_indir1_block = zalloc(blksz); | ||
1121 | + if (ext4fs_indir1_block == NULL) { | ||
1122 | + printf("** DI ext2fs read block (indir 2 1)" | ||
1123 | + "malloc failed. **\n"); | ||
1124 | + return -1; | ||
1125 | + } | ||
1126 | + ext4fs_indir1_size = blksz; | ||
1127 | + } | ||
1128 | + if ((__le32_to_cpu(inode->b.blocks.double_indir_block) << | ||
1129 | + log2_blksz) != ext4fs_indir1_blkno) { | ||
1130 | + status = | ||
1131 | + ext4fs_devread(__le32_to_cpu | ||
1132 | + (inode->b.blocks. | ||
1133 | + double_indir_block) << log2_blksz, | ||
1134 | + 0, blksz, | ||
1135 | + (char *)ext4fs_indir1_block); | ||
1136 | + if (status == 0) { | ||
1137 | + printf("** DI ext2fs read block (indir 2 1)" | ||
1138 | + "failed. **\n"); | ||
1139 | + return -1; | ||
1140 | + } | ||
1141 | + ext4fs_indir1_blkno = | ||
1142 | + __le32_to_cpu(inode->b.blocks.double_indir_block) << | ||
1143 | + log2_blksz; | ||
1144 | + } | ||
1145 | + | ||
1146 | + if (ext4fs_indir2_block == NULL) { | ||
1147 | + ext4fs_indir2_block = zalloc(blksz); | ||
1148 | + if (ext4fs_indir2_block == NULL) { | ||
1149 | + printf("** DI ext2fs read block (indir 2 2)" | ||
1150 | + "malloc failed. **\n"); | ||
1151 | + return -1; | ||
1152 | + } | ||
1153 | + ext4fs_indir2_size = blksz; | ||
1154 | + ext4fs_indir2_blkno = -1; | ||
1155 | + } | ||
1156 | + if (blksz != ext4fs_indir2_size) { | ||
1157 | + free(ext4fs_indir2_block); | ||
1158 | + ext4fs_indir2_block = NULL; | ||
1159 | + ext4fs_indir2_size = 0; | ||
1160 | + ext4fs_indir2_blkno = -1; | ||
1161 | + ext4fs_indir2_block = zalloc(blksz); | ||
1162 | + if (ext4fs_indir2_block == NULL) { | ||
1163 | + printf("** DI ext2fs read block (indir 2 2)" | ||
1164 | + "malloc failed. **\n"); | ||
1165 | + return -1; | ||
1166 | + } | ||
1167 | + ext4fs_indir2_size = blksz; | ||
1168 | + } | ||
1169 | + if ((__le32_to_cpu(ext4fs_indir1_block[rblock / perblock]) << | ||
1170 | + log2_blksz) != ext4fs_indir2_blkno) { | ||
1171 | + status = ext4fs_devread(__le32_to_cpu | ||
1172 | + (ext4fs_indir1_block | ||
1173 | + [rblock / | ||
1174 | + perblock]) << log2_blksz, 0, | ||
1175 | + blksz, | ||
1176 | + (char *)ext4fs_indir2_block); | ||
1177 | + if (status == 0) { | ||
1178 | + printf("** DI ext2fs read block (indir 2 2)" | ||
1179 | + "failed. **\n"); | ||
1180 | + return -1; | ||
1181 | + } | ||
1182 | + ext4fs_indir2_blkno = | ||
1183 | + __le32_to_cpu(ext4fs_indir1_block[rblock | ||
1184 | + / | ||
1185 | + perblock]) << | ||
1186 | + log2_blksz; | ||
1187 | + } | ||
1188 | + blknr = __le32_to_cpu(ext4fs_indir2_block[rblock % perblock]); | ||
1189 | + } | ||
1190 | + /* Tripple indirect. */ | ||
1191 | + else { | ||
1192 | + rblock = fileblock - (INDIRECT_BLOCKS + blksz / 4 + | ||
1193 | + (blksz / 4 * blksz / 4)); | ||
1194 | + perblock_child = blksz / 4; | ||
1195 | + perblock_parent = ((blksz / 4) * (blksz / 4)); | ||
1196 | + | ||
1197 | + if (ext4fs_indir1_block == NULL) { | ||
1198 | + ext4fs_indir1_block = zalloc(blksz); | ||
1199 | + if (ext4fs_indir1_block == NULL) { | ||
1200 | + printf("** TI ext2fs read block (indir 2 1)" | ||
1201 | + "malloc failed. **\n"); | ||
1202 | + return -1; | ||
1203 | + } | ||
1204 | + ext4fs_indir1_size = blksz; | ||
1205 | + ext4fs_indir1_blkno = -1; | ||
1206 | + } | ||
1207 | + if (blksz != ext4fs_indir1_size) { | ||
1208 | + free(ext4fs_indir1_block); | ||
1209 | + ext4fs_indir1_block = NULL; | ||
1210 | + ext4fs_indir1_size = 0; | ||
1211 | + ext4fs_indir1_blkno = -1; | ||
1212 | + ext4fs_indir1_block = zalloc(blksz); | ||
1213 | + if (ext4fs_indir1_block == NULL) { | ||
1214 | + printf("** TI ext2fs read block (indir 2 1)" | ||
1215 | + "malloc failed. **\n"); | ||
1216 | + return -1; | ||
1217 | + } | ||
1218 | + ext4fs_indir1_size = blksz; | ||
1219 | + } | ||
1220 | + if ((__le32_to_cpu(inode->b.blocks.triple_indir_block) << | ||
1221 | + log2_blksz) != ext4fs_indir1_blkno) { | ||
1222 | + status = ext4fs_devread | ||
1223 | + (__le32_to_cpu(inode->b.blocks.triple_indir_block) | ||
1224 | + << log2_blksz, 0, blksz, | ||
1225 | + (char *)ext4fs_indir1_block); | ||
1226 | + if (status == 0) { | ||
1227 | + printf("** TI ext2fs read block (indir 2 1)" | ||
1228 | + "failed. **\n"); | ||
1229 | + return -1; | ||
1230 | + } | ||
1231 | + ext4fs_indir1_blkno = | ||
1232 | + __le32_to_cpu(inode->b.blocks.triple_indir_block) << | ||
1233 | + log2_blksz; | ||
1234 | + } | ||
1235 | + | ||
1236 | + if (ext4fs_indir2_block == NULL) { | ||
1237 | + ext4fs_indir2_block = zalloc(blksz); | ||
1238 | + if (ext4fs_indir2_block == NULL) { | ||
1239 | + printf("** TI ext2fs read block (indir 2 2)" | ||
1240 | + "malloc failed. **\n"); | ||
1241 | + return -1; | ||
1242 | + } | ||
1243 | + ext4fs_indir2_size = blksz; | ||
1244 | + ext4fs_indir2_blkno = -1; | ||
1245 | + } | ||
1246 | + if (blksz != ext4fs_indir2_size) { | ||
1247 | + free(ext4fs_indir2_block); | ||
1248 | + ext4fs_indir2_block = NULL; | ||
1249 | + ext4fs_indir2_size = 0; | ||
1250 | + ext4fs_indir2_blkno = -1; | ||
1251 | + ext4fs_indir2_block = zalloc(blksz); | ||
1252 | + if (ext4fs_indir2_block == NULL) { | ||
1253 | + printf("** TI ext2fs read block (indir 2 2)" | ||
1254 | + "malloc failed. **\n"); | ||
1255 | + return -1; | ||
1256 | + } | ||
1257 | + ext4fs_indir2_size = blksz; | ||
1258 | + } | ||
1259 | + if ((__le32_to_cpu(ext4fs_indir1_block[rblock / | ||
1260 | + perblock_parent]) << | ||
1261 | + log2_blksz) | ||
1262 | + != ext4fs_indir2_blkno) { | ||
1263 | + status = ext4fs_devread(__le32_to_cpu | ||
1264 | + (ext4fs_indir1_block | ||
1265 | + [rblock / | ||
1266 | + perblock_parent]) << | ||
1267 | + log2_blksz, 0, blksz, | ||
1268 | + (char *)ext4fs_indir2_block); | ||
1269 | + if (status == 0) { | ||
1270 | + printf("** TI ext2fs read block (indir 2 2)" | ||
1271 | + "failed. **\n"); | ||
1272 | + return -1; | ||
1273 | + } | ||
1274 | + ext4fs_indir2_blkno = | ||
1275 | + __le32_to_cpu(ext4fs_indir1_block[rblock / | ||
1276 | + perblock_parent]) | ||
1277 | + << log2_blksz; | ||
1278 | + } | ||
1279 | + | ||
1280 | + if (ext4fs_indir3_block == NULL) { | ||
1281 | + ext4fs_indir3_block = zalloc(blksz); | ||
1282 | + if (ext4fs_indir3_block == NULL) { | ||
1283 | + printf("** TI ext2fs read block (indir 2 2)" | ||
1284 | + "malloc failed. **\n"); | ||
1285 | + return -1; | ||
1286 | + } | ||
1287 | + ext4fs_indir3_size = blksz; | ||
1288 | + ext4fs_indir3_blkno = -1; | ||
1289 | + } | ||
1290 | + if (blksz != ext4fs_indir3_size) { | ||
1291 | + free(ext4fs_indir3_block); | ||
1292 | + ext4fs_indir3_block = NULL; | ||
1293 | + ext4fs_indir3_size = 0; | ||
1294 | + ext4fs_indir3_blkno = -1; | ||
1295 | + ext4fs_indir3_block = zalloc(blksz); | ||
1296 | + if (ext4fs_indir3_block == NULL) { | ||
1297 | + printf("** TI ext2fs read block (indir 2 2)" | ||
1298 | + "malloc failed. **\n"); | ||
1299 | + return -1; | ||
1300 | + } | ||
1301 | + ext4fs_indir3_size = blksz; | ||
1302 | + } | ||
1303 | + if ((__le32_to_cpu(ext4fs_indir2_block[rblock | ||
1304 | + / | ||
1305 | + perblock_child]) << | ||
1306 | + log2_blksz) != ext4fs_indir3_blkno) { | ||
1307 | + status = | ||
1308 | + ext4fs_devread(__le32_to_cpu | ||
1309 | + (ext4fs_indir2_block | ||
1310 | + [(rblock / perblock_child) | ||
1311 | + % (blksz / 4)]) << log2_blksz, 0, | ||
1312 | + blksz, (char *)ext4fs_indir3_block); | ||
1313 | + if (status == 0) { | ||
1314 | + printf("** TI ext2fs read block (indir 2 2)" | ||
1315 | + "failed. **\n"); | ||
1316 | + return -1; | ||
1317 | + } | ||
1318 | + ext4fs_indir3_blkno = | ||
1319 | + __le32_to_cpu(ext4fs_indir2_block[(rblock / | ||
1320 | + perblock_child) % | ||
1321 | + (blksz / | ||
1322 | + 4)]) << | ||
1323 | + log2_blksz; | ||
1324 | + } | ||
1325 | + | ||
1326 | + blknr = __le32_to_cpu(ext4fs_indir3_block | ||
1327 | + [rblock % perblock_child]); | ||
1328 | + } | ||
1329 | + debug("ext4fs_read_block %ld\n", blknr); | ||
1330 | + | ||
1331 | + return blknr; | ||
1332 | +} | ||
1333 | + | ||
1334 | +void ext4fs_close(void) | ||
1335 | +{ | ||
1336 | + if ((ext4fs_file != NULL) && (ext4fs_root != NULL)) { | ||
1337 | + ext4fs_free_node(ext4fs_file, &ext4fs_root->diropen); | ||
1338 | + ext4fs_file = NULL; | ||
1339 | + } | ||
1340 | + if (ext4fs_root != NULL) { | ||
1341 | + free(ext4fs_root); | ||
1342 | + ext4fs_root = NULL; | ||
1343 | + } | ||
1344 | + if (ext4fs_indir1_block != NULL) { | ||
1345 | + free(ext4fs_indir1_block); | ||
1346 | + ext4fs_indir1_block = NULL; | ||
1347 | + ext4fs_indir1_size = 0; | ||
1348 | + ext4fs_indir1_blkno = -1; | ||
1349 | + } | ||
1350 | + if (ext4fs_indir2_block != NULL) { | ||
1351 | + free(ext4fs_indir2_block); | ||
1352 | + ext4fs_indir2_block = NULL; | ||
1353 | + ext4fs_indir2_size = 0; | ||
1354 | + ext4fs_indir2_blkno = -1; | ||
1355 | + } | ||
1356 | + if (ext4fs_indir3_block != NULL) { | ||
1357 | + free(ext4fs_indir3_block); | ||
1358 | + ext4fs_indir3_block = NULL; | ||
1359 | + ext4fs_indir3_size = 0; | ||
1360 | + ext4fs_indir3_blkno = -1; | ||
1361 | + } | ||
1362 | +} | ||
1363 | + | ||
1364 | +int ext4fs_iterate_dir(struct ext2fs_node *dir, char *name, | ||
1365 | + struct ext2fs_node **fnode, int *ftype) | ||
1366 | +{ | ||
1367 | + unsigned int fpos = 0; | ||
1368 | + int status; | ||
1369 | + struct ext2fs_node *diro = (struct ext2fs_node *)dir; | ||
1370 | + | ||
1371 | +#ifdef DEBUG | ||
1372 | + if (name != NULL) | ||
1373 | + printf("Iterate dir %s\n", name); | ||
1374 | +#endif /* of DEBUG */ | ||
1375 | + if (!diro->inode_read) { | ||
1376 | + status = ext4fs_read_inode(diro->data, diro->ino, &diro->inode); | ||
1377 | + if (status == 0) | ||
1378 | + return 0; | ||
1379 | + } | ||
1380 | + /* Search the file. */ | ||
1381 | + while (fpos < __le32_to_cpu(diro->inode.size)) { | ||
1382 | + struct ext2_dirent dirent; | ||
1383 | + | ||
1384 | + status = ext4fs_read_file(diro, fpos, | ||
1385 | + sizeof(struct ext2_dirent), | ||
1386 | + (char *)&dirent); | ||
1387 | + if (status < 1) | ||
1388 | + return 0; | ||
1389 | + | ||
1390 | + if (dirent.namelen != 0) { | ||
1391 | + char filename[dirent.namelen + 1]; | ||
1392 | + struct ext2fs_node *fdiro; | ||
1393 | + int type = FILETYPE_UNKNOWN; | ||
1394 | + | ||
1395 | + status = ext4fs_read_file(diro, | ||
1396 | + fpos + | ||
1397 | + sizeof(struct ext2_dirent), | ||
1398 | + dirent.namelen, filename); | ||
1399 | + if (status < 1) | ||
1400 | + return 0; | ||
1401 | + | ||
1402 | + fdiro = zalloc(sizeof(struct ext2fs_node)); | ||
1403 | + if (!fdiro) | ||
1404 | + return 0; | ||
1405 | + | ||
1406 | + fdiro->data = diro->data; | ||
1407 | + fdiro->ino = __le32_to_cpu(dirent.inode); | ||
1408 | + | ||
1409 | + filename[dirent.namelen] = '\0'; | ||
1410 | + | ||
1411 | + if (dirent.filetype != FILETYPE_UNKNOWN) { | ||
1412 | + fdiro->inode_read = 0; | ||
1413 | + | ||
1414 | + if (dirent.filetype == FILETYPE_DIRECTORY) | ||
1415 | + type = FILETYPE_DIRECTORY; | ||
1416 | + else if (dirent.filetype == FILETYPE_SYMLINK) | ||
1417 | + type = FILETYPE_SYMLINK; | ||
1418 | + else if (dirent.filetype == FILETYPE_REG) | ||
1419 | + type = FILETYPE_REG; | ||
1420 | + } else { | ||
1421 | + status = ext4fs_read_inode(diro->data, | ||
1422 | + __le32_to_cpu | ||
1423 | + (dirent.inode), | ||
1424 | + &fdiro->inode); | ||
1425 | + if (status == 0) { | ||
1426 | + free(fdiro); | ||
1427 | + return 0; | ||
1428 | + } | ||
1429 | + fdiro->inode_read = 1; | ||
1430 | + | ||
1431 | + if ((__le16_to_cpu(fdiro->inode.mode) & | ||
1432 | + FILETYPE_INO_MASK) == | ||
1433 | + FILETYPE_INO_DIRECTORY) { | ||
1434 | + type = FILETYPE_DIRECTORY; | ||
1435 | + } else if ((__le16_to_cpu(fdiro->inode.mode) | ||
1436 | + & FILETYPE_INO_MASK) == | ||
1437 | + FILETYPE_INO_SYMLINK) { | ||
1438 | + type = FILETYPE_SYMLINK; | ||
1439 | + } else if ((__le16_to_cpu(fdiro->inode.mode) | ||
1440 | + & FILETYPE_INO_MASK) == | ||
1441 | + FILETYPE_INO_REG) { | ||
1442 | + type = FILETYPE_REG; | ||
1443 | + } | ||
1444 | + } | ||
1445 | +#ifdef DEBUG | ||
1446 | + printf("iterate >%s<\n", filename); | ||
1447 | +#endif /* of DEBUG */ | ||
1448 | + if ((name != NULL) && (fnode != NULL) | ||
1449 | + && (ftype != NULL)) { | ||
1450 | + if (strcmp(filename, name) == 0) { | ||
1451 | + *ftype = type; | ||
1452 | + *fnode = fdiro; | ||
1453 | + return 1; | ||
1454 | + } | ||
1455 | + } else { | ||
1456 | + if (fdiro->inode_read == 0) { | ||
1457 | + status = ext4fs_read_inode(diro->data, | ||
1458 | + __le32_to_cpu( | ||
1459 | + dirent.inode), | ||
1460 | + &fdiro->inode); | ||
1461 | + if (status == 0) { | ||
1462 | + free(fdiro); | ||
1463 | + return 0; | ||
1464 | + } | ||
1465 | + fdiro->inode_read = 1; | ||
1466 | + } | ||
1467 | + switch (type) { | ||
1468 | + case FILETYPE_DIRECTORY: | ||
1469 | + printf("<DIR> "); | ||
1470 | + break; | ||
1471 | + case FILETYPE_SYMLINK: | ||
1472 | + printf("<SYM> "); | ||
1473 | + break; | ||
1474 | + case FILETYPE_REG: | ||
1475 | + printf(" "); | ||
1476 | + break; | ||
1477 | + default: | ||
1478 | + printf("< ? > "); | ||
1479 | + break; | ||
1480 | + } | ||
1481 | + printf("%10d %s\n", | ||
1482 | + __le32_to_cpu(fdiro->inode.size), | ||
1483 | + filename); | ||
1484 | + } | ||
1485 | + free(fdiro); | ||
1486 | + } | ||
1487 | + fpos += __le16_to_cpu(dirent.direntlen); | ||
1488 | + } | ||
1489 | + return 0; | ||
1490 | +} | ||
1491 | + | ||
1492 | +static char *ext4fs_read_symlink(struct ext2fs_node *node) | ||
1493 | +{ | ||
1494 | + char *symlink; | ||
1495 | + struct ext2fs_node *diro = node; | ||
1496 | + int status; | ||
1497 | + | ||
1498 | + if (!diro->inode_read) { | ||
1499 | + status = ext4fs_read_inode(diro->data, diro->ino, &diro->inode); | ||
1500 | + if (status == 0) | ||
1501 | + return 0; | ||
1502 | + } | ||
1503 | + symlink = zalloc(__le32_to_cpu(diro->inode.size) + 1); | ||
1504 | + if (!symlink) | ||
1505 | + return 0; | ||
1506 | + | ||
1507 | + if (__le32_to_cpu(diro->inode.size) <= 60) { | ||
1508 | + strncpy(symlink, diro->inode.b.symlink, | ||
1509 | + __le32_to_cpu(diro->inode.size)); | ||
1510 | + } else { | ||
1511 | + status = ext4fs_read_file(diro, 0, | ||
1512 | + __le32_to_cpu(diro->inode.size), | ||
1513 | + symlink); | ||
1514 | + if (status == 0) { | ||
1515 | + free(symlink); | ||
1516 | + return 0; | ||
1517 | + } | ||
1518 | + } | ||
1519 | + symlink[__le32_to_cpu(diro->inode.size)] = '\0'; | ||
1520 | + return symlink; | ||
1521 | +} | ||
1522 | + | ||
1523 | +static int ext4fs_find_file1(const char *currpath, | ||
1524 | + struct ext2fs_node *currroot, | ||
1525 | + struct ext2fs_node **currfound, int *foundtype) | ||
1526 | +{ | ||
1527 | + char fpath[strlen(currpath) + 1]; | ||
1528 | + char *name = fpath; | ||
1529 | + char *next; | ||
1530 | + int status; | ||
1531 | + int type = FILETYPE_DIRECTORY; | ||
1532 | + struct ext2fs_node *currnode = currroot; | ||
1533 | + struct ext2fs_node *oldnode = currroot; | ||
1534 | + | ||
1535 | + strncpy(fpath, currpath, strlen(currpath) + 1); | ||
1536 | + | ||
1537 | + /* Remove all leading slashes. */ | ||
1538 | + while (*name == '/') | ||
1539 | + name++; | ||
1540 | + | ||
1541 | + if (!*name) { | ||
1542 | + *currfound = currnode; | ||
1543 | + return 1; | ||
1544 | + } | ||
1545 | + | ||
1546 | + for (;;) { | ||
1547 | + int found; | ||
1548 | + | ||
1549 | + /* Extract the actual part from the pathname. */ | ||
1550 | + next = strchr(name, '/'); | ||
1551 | + if (next) { | ||
1552 | + /* Remove all leading slashes. */ | ||
1553 | + while (*next == '/') | ||
1554 | + *(next++) = '\0'; | ||
1555 | + } | ||
1556 | + | ||
1557 | + if (type != FILETYPE_DIRECTORY) { | ||
1558 | + ext4fs_free_node(currnode, currroot); | ||
1559 | + return 0; | ||
1560 | + } | ||
1561 | + | ||
1562 | + oldnode = currnode; | ||
1563 | + | ||
1564 | + /* Iterate over the directory. */ | ||
1565 | + found = ext4fs_iterate_dir(currnode, name, &currnode, &type); | ||
1566 | + if (found == 0) | ||
1567 | + return 0; | ||
1568 | + | ||
1569 | + if (found == -1) | ||
1570 | + break; | ||
1571 | + | ||
1572 | + /* Read in the symlink and follow it. */ | ||
1573 | + if (type == FILETYPE_SYMLINK) { | ||
1574 | + char *symlink; | ||
1575 | + | ||
1576 | + /* Test if the symlink does not loop. */ | ||
1577 | + if (++symlinknest == 8) { | ||
1578 | + ext4fs_free_node(currnode, currroot); | ||
1579 | + ext4fs_free_node(oldnode, currroot); | ||
1580 | + return 0; | ||
1581 | + } | ||
1582 | + | ||
1583 | + symlink = ext4fs_read_symlink(currnode); | ||
1584 | + ext4fs_free_node(currnode, currroot); | ||
1585 | + | ||
1586 | + if (!symlink) { | ||
1587 | + ext4fs_free_node(oldnode, currroot); | ||
1588 | + return 0; | ||
1589 | + } | ||
1590 | + | ||
1591 | + debug("Got symlink >%s<\n", symlink); | ||
1592 | + | ||
1593 | + if (symlink[0] == '/') { | ||
1594 | + ext4fs_free_node(oldnode, currroot); | ||
1595 | + oldnode = &ext4fs_root->diropen; | ||
1596 | + } | ||
1597 | + | ||
1598 | + /* Lookup the node the symlink points to. */ | ||
1599 | + status = ext4fs_find_file1(symlink, oldnode, | ||
1600 | + &currnode, &type); | ||
1601 | + | ||
1602 | + free(symlink); | ||
1603 | + | ||
1604 | + if (status == 0) { | ||
1605 | + ext4fs_free_node(oldnode, currroot); | ||
1606 | + return 0; | ||
1607 | + } | ||
1608 | + } | ||
1609 | + | ||
1610 | + ext4fs_free_node(oldnode, currroot); | ||
1611 | + | ||
1612 | + /* Found the node! */ | ||
1613 | + if (!next || *next == '\0') { | ||
1614 | + *currfound = currnode; | ||
1615 | + *foundtype = type; | ||
1616 | + return 1; | ||
1617 | + } | ||
1618 | + name = next; | ||
1619 | + } | ||
1620 | + return -1; | ||
1621 | +} | ||
1622 | + | ||
1623 | +int ext4fs_find_file(const char *path, struct ext2fs_node *rootnode, | ||
1624 | + struct ext2fs_node **foundnode, int expecttype) | ||
1625 | +{ | ||
1626 | + int status; | ||
1627 | + int foundtype = FILETYPE_DIRECTORY; | ||
1628 | + | ||
1629 | + symlinknest = 0; | ||
1630 | + if (!path) | ||
1631 | + return 0; | ||
1632 | + | ||
1633 | + status = ext4fs_find_file1(path, rootnode, foundnode, &foundtype); | ||
1634 | + if (status == 0) | ||
1635 | + return 0; | ||
1636 | + | ||
1637 | + /* Check if the node that was found was of the expected type. */ | ||
1638 | + if ((expecttype == FILETYPE_REG) && (foundtype != expecttype)) | ||
1639 | + return 0; | ||
1640 | + else if ((expecttype == FILETYPE_DIRECTORY) | ||
1641 | + && (foundtype != expecttype)) | ||
1642 | + return 0; | ||
1643 | + | ||
1644 | + return 1; | ||
1645 | +} | ||
1646 | + | ||
1647 | +int ext4fs_open(const char *filename) | ||
1648 | +{ | ||
1649 | + struct ext2fs_node *fdiro = NULL; | ||
1650 | + int status; | ||
1651 | + int len; | ||
1652 | + | ||
1653 | + if (ext4fs_root == NULL) | ||
1654 | + return -1; | ||
1655 | + | ||
1656 | + ext4fs_file = NULL; | ||
1657 | + status = ext4fs_find_file(filename, &ext4fs_root->diropen, &fdiro, | ||
1658 | + FILETYPE_REG); | ||
1659 | + if (status == 0) | ||
1660 | + goto fail; | ||
1661 | + | ||
1662 | + if (!fdiro->inode_read) { | ||
1663 | + status = ext4fs_read_inode(fdiro->data, fdiro->ino, | ||
1664 | + &fdiro->inode); | ||
1665 | + if (status == 0) | ||
1666 | + goto fail; | ||
1667 | + } | ||
1668 | + len = __le32_to_cpu(fdiro->inode.size); | ||
1669 | + ext4fs_file = fdiro; | ||
1670 | + | ||
1671 | + return len; | ||
1672 | + fail: | ||
1673 | + ext4fs_free_node(fdiro, &ext4fs_root->diropen); | ||
1674 | + | ||
1675 | + return -1; | ||
1676 | +} | ||
1677 | + | ||
1678 | +int ext4fs_mount(unsigned part_length) | ||
1679 | +{ | ||
1680 | + struct ext2_data *data; | ||
1681 | + int status; | ||
1682 | + struct ext_filesystem *fs = get_fs(); | ||
1683 | + data = zalloc(sizeof(struct ext2_data)); | ||
1684 | + if (!data) | ||
1685 | + return 0; | ||
1686 | + | ||
1687 | + /* Read the superblock. */ | ||
1688 | + status = ext4fs_devread(1 * 2, 0, sizeof(struct ext2_sblock), | ||
1689 | + (char *)&data->sblock); | ||
1690 | + | ||
1691 | + if (status == 0) | ||
1692 | + goto fail; | ||
1693 | + | ||
1694 | + /* Make sure this is an ext2 filesystem. */ | ||
1695 | + if (__le16_to_cpu(data->sblock.magic) != EXT2_MAGIC) | ||
1696 | + goto fail; | ||
1697 | + | ||
1698 | + if (__le32_to_cpu(data->sblock.revision_level == 0)) | ||
1699 | + fs->inodesz = 128; | ||
1700 | + else | ||
1701 | + fs->inodesz = __le16_to_cpu(data->sblock.inode_size); | ||
1702 | + | ||
1703 | + debug("EXT2 rev %d, inode_size %d\n", | ||
1704 | + __le32_to_cpu(data->sblock.revision_level), fs->inodesz); | ||
1705 | + | ||
1706 | + data->diropen.data = data; | ||
1707 | + data->diropen.ino = 2; | ||
1708 | + data->diropen.inode_read = 1; | ||
1709 | + data->inode = &data->diropen.inode; | ||
1710 | + | ||
1711 | + status = ext4fs_read_inode(data, 2, data->inode); | ||
1712 | + if (status == 0) | ||
1713 | + goto fail; | ||
1714 | + | ||
1715 | + ext4fs_root = data; | ||
1716 | + | ||
1717 | + return 1; | ||
1718 | + fail: | ||
1719 | + printf("Failed to mount ext2 filesystem...\n"); | ||
1720 | + free(data); | ||
1721 | + ext4fs_root = NULL; | ||
1722 | + | ||
1723 | + return 0; | ||
1724 | +} | ||
1725 | diff --git a/fs/ext4/ext4_common.h b/fs/ext4/ext4_common.h | ||
1726 | new file mode 100644 | ||
1727 | index 0000000..18e6ad1 | ||
1728 | --- /dev/null | ||
1729 | +++ b/fs/ext4/ext4_common.h | ||
1730 | @@ -0,0 +1,63 @@ | ||
1731 | +/* | ||
1732 | + * (C) Copyright 2011 - 2012 Samsung Electronics | ||
1733 | + * EXT4 filesystem implementation in Uboot by | ||
1734 | + * Uma Shankar <uma.shankar@samsung.com> | ||
1735 | + * Manjunatha C Achar <a.manjunatha@samsung.com> | ||
1736 | + * | ||
1737 | + * ext4ls and ext4load : based on ext2 ls load support in Uboot. | ||
1738 | + * | ||
1739 | + * (C) Copyright 2004 | ||
1740 | + * esd gmbh <www.esd-electronics.com> | ||
1741 | + * Reinhard Arlt <reinhard.arlt@esd-electronics.com> | ||
1742 | + * | ||
1743 | + * based on code from grub2 fs/ext2.c and fs/fshelp.c by | ||
1744 | + * GRUB -- GRand Unified Bootloader | ||
1745 | + * Copyright (C) 2003, 2004 Free Software Foundation, Inc. | ||
1746 | + * | ||
1747 | + * This program is free software; you can redistribute it and/or modify | ||
1748 | + * it under the terms of the GNU General Public License as published by | ||
1749 | + * the Free Software Foundation; either version 2 of the License, or | ||
1750 | + * (at your option) any later version. | ||
1751 | + * | ||
1752 | + * This program is distributed in the hope that it will be useful, | ||
1753 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1754 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1755 | + * GNU General Public License for more details. | ||
1756 | + * | ||
1757 | + * You should have received a copy of the GNU General Public License | ||
1758 | + * along with this program; if not, write to the Free Software | ||
1759 | + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
1760 | + */ | ||
1761 | + | ||
1762 | +#ifndef __EXT4_COMMON__ | ||
1763 | +#define __EXT4_COMMON__ | ||
1764 | +#include <ext_common.h> | ||
1765 | +#include <ext4fs.h> | ||
1766 | +#include <malloc.h> | ||
1767 | +#include <asm/errno.h> | ||
1768 | + | ||
1769 | +#define YES 1 | ||
1770 | +#define NO 0 | ||
1771 | +#define TRUE 1 | ||
1772 | +#define FALSE 0 | ||
1773 | +#define RECOVER 1 | ||
1774 | +#define SCAN 0 | ||
1775 | + | ||
1776 | +#define S_IFLNK 0120000 /* symbolic link */ | ||
1777 | +#define BLOCK_NO_ONE 1 | ||
1778 | +#define SUPERBLOCK_SECTOR 2 | ||
1779 | +#define SUPERBLOCK_SIZE 1024 | ||
1780 | +#define F_FILE 1 | ||
1781 | + | ||
1782 | +#define zalloc(size) calloc(1, size) | ||
1783 | + | ||
1784 | +extern unsigned long part_offset; | ||
1785 | +int ext4fs_read_inode(struct ext2_data *data, int ino, | ||
1786 | + struct ext2_inode *inode); | ||
1787 | +int ext4fs_read_file(struct ext2fs_node *node, int pos, | ||
1788 | + unsigned int len, char *buf); | ||
1789 | +int ext4fs_find_file(const char *path, struct ext2fs_node *rootnode, | ||
1790 | + struct ext2fs_node **foundnode, int expecttype); | ||
1791 | +int ext4fs_iterate_dir(struct ext2fs_node *dir, char *name, | ||
1792 | + struct ext2fs_node **fnode, int *ftype); | ||
1793 | +#endif | ||
1794 | diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c | ||
1795 | new file mode 100644 | ||
1796 | index 0000000..7933769 | ||
1797 | --- /dev/null | ||
1798 | +++ b/fs/ext4/ext4fs.c | ||
1799 | @@ -0,0 +1,228 @@ | ||
1800 | +/* | ||
1801 | + * (C) Copyright 2011 - 2012 Samsung Electronics | ||
1802 | + * EXT4 filesystem implementation in Uboot by | ||
1803 | + * Uma Shankar <uma.shankar@samsung.com> | ||
1804 | + * Manjunatha C Achar <a.manjunatha@samsung.com> | ||
1805 | + * | ||
1806 | + * ext4ls and ext4load : Based on ext2 ls and load support in Uboot. | ||
1807 | + * Ext4 read optimization taken from Open-Moko | ||
1808 | + * Qi bootloader | ||
1809 | + * | ||
1810 | + * (C) Copyright 2004 | ||
1811 | + * esd gmbh <www.esd-electronics.com> | ||
1812 | + * Reinhard Arlt <reinhard.arlt@esd-electronics.com> | ||
1813 | + * | ||
1814 | + * based on code from grub2 fs/ext2.c and fs/fshelp.c by | ||
1815 | + * GRUB -- GRand Unified Bootloader | ||
1816 | + * Copyright (C) 2003, 2004 Free Software Foundation, Inc. | ||
1817 | + * | ||
1818 | + * This program is free software; you can redistribute it and/or modify | ||
1819 | + * it under the terms of the GNU General Public License as published by | ||
1820 | + * the Free Software Foundation; either version 2 of the License, or | ||
1821 | + * (at your option) any later version. | ||
1822 | + * | ||
1823 | + * This program is distributed in the hope that it will be useful, | ||
1824 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1825 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1826 | + * GNU General Public License for more details. | ||
1827 | + * | ||
1828 | + * You should have received a copy of the GNU General Public License | ||
1829 | + * along with this program; if not, write to the Free Software | ||
1830 | + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
1831 | + */ | ||
1832 | + | ||
1833 | +#include <common.h> | ||
1834 | +#include <malloc.h> | ||
1835 | +#include <ext_common.h> | ||
1836 | +#include <ext4fs.h> | ||
1837 | +#include <linux/stat.h> | ||
1838 | +#include <linux/time.h> | ||
1839 | +#include <asm/byteorder.h> | ||
1840 | +#include "ext4_common.h" | ||
1841 | + | ||
1842 | +int ext4fs_symlinknest; | ||
1843 | +block_dev_desc_t *ext4_dev_desc; | ||
1844 | + | ||
1845 | +struct ext_filesystem *get_fs(void) | ||
1846 | +{ | ||
1847 | + if (ext4_dev_desc == NULL || ext4_dev_desc->priv == NULL) | ||
1848 | + printf("Invalid Input Arguments %s\n", __func__); | ||
1849 | + | ||
1850 | + return ext4_dev_desc->priv; | ||
1851 | +} | ||
1852 | + | ||
1853 | +int init_fs(block_dev_desc_t *dev_desc) | ||
1854 | +{ | ||
1855 | + struct ext_filesystem *fs; | ||
1856 | + if (dev_desc == NULL) { | ||
1857 | + printf("Invalid Input Arguments %s\n", __func__); | ||
1858 | + return -EINVAL; | ||
1859 | + } | ||
1860 | + | ||
1861 | + fs = zalloc(sizeof(struct ext_filesystem)); | ||
1862 | + if (fs == NULL) { | ||
1863 | + printf("malloc failed: %s\n", __func__); | ||
1864 | + return -ENOMEM; | ||
1865 | + } | ||
1866 | + | ||
1867 | + fs->dev_desc = dev_desc; | ||
1868 | + dev_desc->priv = fs; | ||
1869 | + | ||
1870 | + return 0; | ||
1871 | +} | ||
1872 | + | ||
1873 | +void deinit_fs(block_dev_desc_t *dev_desc) | ||
1874 | +{ | ||
1875 | + if (dev_desc == NULL) { | ||
1876 | + printf("Invalid Input Arguments %s\n", __func__); | ||
1877 | + return; | ||
1878 | + } | ||
1879 | + free(dev_desc->priv); | ||
1880 | + dev_desc->priv = NULL; | ||
1881 | +} | ||
1882 | + | ||
1883 | +void ext4fs_free_node(struct ext2fs_node *node, struct ext2fs_node *currroot) | ||
1884 | +{ | ||
1885 | + if ((node != &ext4fs_root->diropen) && (node != currroot)) | ||
1886 | + free(node); | ||
1887 | +} | ||
1888 | + | ||
1889 | +/* | ||
1890 | + * Taken from openmoko-kernel mailing list: By Andy green | ||
1891 | + * Optimized read file API : collects and defers contiguous sector | ||
1892 | + * reads into one potentially more efficient larger sequential read action | ||
1893 | + */ | ||
1894 | +int ext4fs_read_file(struct ext2fs_node *node, int pos, | ||
1895 | + unsigned int len, char *buf) | ||
1896 | +{ | ||
1897 | + int i; | ||
1898 | + int blockcnt; | ||
1899 | + int log2blocksize = LOG2_EXT2_BLOCK_SIZE(node->data); | ||
1900 | + int blocksize = 1 << (log2blocksize + DISK_SECTOR_BITS); | ||
1901 | + unsigned int filesize = __le32_to_cpu(node->inode.size); | ||
1902 | + int previous_block_number = -1; | ||
1903 | + int delayed_start = 0; | ||
1904 | + int delayed_extent = 0; | ||
1905 | + int delayed_skipfirst = 0; | ||
1906 | + int delayed_next = 0; | ||
1907 | + char *delayed_buf = NULL; | ||
1908 | + short status; | ||
1909 | + | ||
1910 | + /* Adjust len so it we can't read past the end of the file. */ | ||
1911 | + if (len > filesize) | ||
1912 | + len = filesize; | ||
1913 | + | ||
1914 | + blockcnt = ((len + pos) + blocksize - 1) / blocksize; | ||
1915 | + | ||
1916 | + for (i = pos / blocksize; i < blockcnt; i++) { | ||
1917 | + int blknr; | ||
1918 | + int blockoff = pos % blocksize; | ||
1919 | + int blockend = blocksize; | ||
1920 | + int skipfirst = 0; | ||
1921 | + blknr = read_allocated_block(&(node->inode), i); | ||
1922 | + if (blknr < 0) | ||
1923 | + return -1; | ||
1924 | + | ||
1925 | + blknr = blknr << log2blocksize; | ||
1926 | + | ||
1927 | + /* Last block. */ | ||
1928 | + if (i == blockcnt - 1) { | ||
1929 | + blockend = (len + pos) % blocksize; | ||
1930 | + | ||
1931 | + /* The last portion is exactly blocksize. */ | ||
1932 | + if (!blockend) | ||
1933 | + blockend = blocksize; | ||
1934 | + } | ||
1935 | + | ||
1936 | + /* First block. */ | ||
1937 | + if (i == pos / blocksize) { | ||
1938 | + skipfirst = blockoff; | ||
1939 | + blockend -= skipfirst; | ||
1940 | + } | ||
1941 | + if (blknr) { | ||
1942 | + int status; | ||
1943 | + | ||
1944 | + if (previous_block_number != -1) { | ||
1945 | + if (delayed_next == blknr) { | ||
1946 | + delayed_extent += blockend; | ||
1947 | + delayed_next += blockend >> SECTOR_BITS; | ||
1948 | + } else { /* spill */ | ||
1949 | + status = ext4fs_devread(delayed_start, | ||
1950 | + delayed_skipfirst, | ||
1951 | + delayed_extent, | ||
1952 | + delayed_buf); | ||
1953 | + if (status == 0) | ||
1954 | + return -1; | ||
1955 | + previous_block_number = blknr; | ||
1956 | + delayed_start = blknr; | ||
1957 | + delayed_extent = blockend; | ||
1958 | + delayed_skipfirst = skipfirst; | ||
1959 | + delayed_buf = buf; | ||
1960 | + delayed_next = blknr + | ||
1961 | + (blockend >> SECTOR_BITS); | ||
1962 | + } | ||
1963 | + } else { | ||
1964 | + previous_block_number = blknr; | ||
1965 | + delayed_start = blknr; | ||
1966 | + delayed_extent = blockend; | ||
1967 | + delayed_skipfirst = skipfirst; | ||
1968 | + delayed_buf = buf; | ||
1969 | + delayed_next = blknr + | ||
1970 | + (blockend >> SECTOR_BITS); | ||
1971 | + } | ||
1972 | + } else { | ||
1973 | + if (previous_block_number != -1) { | ||
1974 | + /* spill */ | ||
1975 | + status = ext4fs_devread(delayed_start, | ||
1976 | + delayed_skipfirst, | ||
1977 | + delayed_extent, | ||
1978 | + delayed_buf); | ||
1979 | + if (status == 0) | ||
1980 | + return -1; | ||
1981 | + previous_block_number = -1; | ||
1982 | + } | ||
1983 | + memset(buf, 0, blocksize - skipfirst); | ||
1984 | + } | ||
1985 | + buf += blocksize - skipfirst; | ||
1986 | + } | ||
1987 | + if (previous_block_number != -1) { | ||
1988 | + /* spill */ | ||
1989 | + status = ext4fs_devread(delayed_start, | ||
1990 | + delayed_skipfirst, delayed_extent, | ||
1991 | + delayed_buf); | ||
1992 | + if (status == 0) | ||
1993 | + return -1; | ||
1994 | + previous_block_number = -1; | ||
1995 | + } | ||
1996 | + | ||
1997 | + return len; | ||
1998 | +} | ||
1999 | + | ||
2000 | +int ext4fs_ls(const char *dirname) | ||
2001 | +{ | ||
2002 | + struct ext2fs_node *dirnode; | ||
2003 | + int status; | ||
2004 | + | ||
2005 | + if (dirname == NULL) | ||
2006 | + return 0; | ||
2007 | + | ||
2008 | + status = ext4fs_find_file(dirname, &ext4fs_root->diropen, &dirnode, | ||
2009 | + FILETYPE_DIRECTORY); | ||
2010 | + if (status != 1) { | ||
2011 | + printf("** Can not find directory. **\n"); | ||
2012 | + return 1; | ||
2013 | + } | ||
2014 | + | ||
2015 | + ext4fs_iterate_dir(dirnode, NULL, NULL, NULL); | ||
2016 | + ext4fs_free_node(dirnode, &ext4fs_root->diropen); | ||
2017 | + | ||
2018 | + return 0; | ||
2019 | +} | ||
2020 | + | ||
2021 | +int ext4fs_read(char *buf, unsigned len) | ||
2022 | +{ | ||
2023 | + if (ext4fs_root == NULL || ext4fs_file == NULL) | ||
2024 | + return 0; | ||
2025 | + | ||
2026 | + return ext4fs_read_file(ext4fs_file, 0, len, buf); | ||
2027 | +} | ||
2028 | diff --git a/include/ext4fs.h b/include/ext4fs.h | ||
2029 | new file mode 100644 | ||
2030 | index 0000000..58a6a1d | ||
2031 | --- /dev/null | ||
2032 | +++ b/include/ext4fs.h | ||
2033 | @@ -0,0 +1,132 @@ | ||
2034 | +/* | ||
2035 | + * (C) Copyright 2011 - 2012 Samsung Electronics | ||
2036 | + * EXT4 filesystem implementation in Uboot by | ||
2037 | + * Uma Shankar <uma.shankar@samsung.com> | ||
2038 | + * Manjunatha C Achar <a.manjunatha@samsung.com> | ||
2039 | + * | ||
2040 | + * Ext4 Extent data structures are taken from original ext4 fs code | ||
2041 | + * as found in the linux kernel. | ||
2042 | + * | ||
2043 | + * Copyright (c) 2003-2006, Cluster File Systems, Inc, info@clusterfs.com | ||
2044 | + * Written by Alex Tomas <alex@clusterfs.com> | ||
2045 | + * | ||
2046 | + * This program is free software; you can redistribute it and/or modify | ||
2047 | + * it under the terms of the GNU General Public License version 2 as | ||
2048 | + * published by the Free Software Foundation. | ||
2049 | + * | ||
2050 | + * This program is distributed in the hope that it will be useful, | ||
2051 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2052 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2053 | + * GNU General Public License for more details. | ||
2054 | + * | ||
2055 | + * You should have received a copy of the GNU General Public License | ||
2056 | + * along with this program; if not, write to the Free Software | ||
2057 | + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
2058 | + */ | ||
2059 | + | ||
2060 | +#ifndef __EXT4__ | ||
2061 | +#define __EXT4__ | ||
2062 | +#include <ext_common.h> | ||
2063 | + | ||
2064 | +#define EXT4_EXTENTS_FL 0x00080000 /* Inode uses extents */ | ||
2065 | +#define EXT4_EXT_MAGIC 0xf30a | ||
2066 | +#define EXT4_FEATURE_RO_COMPAT_GDT_CSUM 0x0010 | ||
2067 | +#define EXT4_FEATURE_INCOMPAT_EXTENTS 0x0040 | ||
2068 | +#define EXT4_INDIRECT_BLOCKS 12 | ||
2069 | + | ||
2070 | +#define EXT4_BG_INODE_UNINIT 0x0001 | ||
2071 | +#define EXT4_BG_BLOCK_UNINIT 0x0002 | ||
2072 | +#define EXT4_BG_INODE_ZEROED 0x0004 | ||
2073 | + | ||
2074 | +/* | ||
2075 | + * ext4_inode has i_block array (60 bytes total). | ||
2076 | + * The first 12 bytes store ext4_extent_header; | ||
2077 | + * the remainder stores an array of ext4_extent. | ||
2078 | + */ | ||
2079 | + | ||
2080 | +/* | ||
2081 | + * This is the extent on-disk structure. | ||
2082 | + * It's used at the bottom of the tree. | ||
2083 | + */ | ||
2084 | +struct ext4_extent { | ||
2085 | + __le32 ee_block; /* first logical block extent covers */ | ||
2086 | + __le16 ee_len; /* number of blocks covered by extent */ | ||
2087 | + __le16 ee_start_hi; /* high 16 bits of physical block */ | ||
2088 | + __le32 ee_start_lo; /* low 32 bits of physical block */ | ||
2089 | +}; | ||
2090 | + | ||
2091 | +/* | ||
2092 | + * This is index on-disk structure. | ||
2093 | + * It's used at all the levels except the bottom. | ||
2094 | + */ | ||
2095 | +struct ext4_extent_idx { | ||
2096 | + __le32 ei_block; /* index covers logical blocks from 'block' */ | ||
2097 | + __le32 ei_leaf_lo; /* pointer to the physical block of the next * | ||
2098 | + * level. leaf or next index could be there */ | ||
2099 | + __le16 ei_leaf_hi; /* high 16 bits of physical block */ | ||
2100 | + __u16 ei_unused; | ||
2101 | +}; | ||
2102 | + | ||
2103 | +/* Each block (leaves and indexes), even inode-stored has header. */ | ||
2104 | +struct ext4_extent_header { | ||
2105 | + __le16 eh_magic; /* probably will support different formats */ | ||
2106 | + __le16 eh_entries; /* number of valid entries */ | ||
2107 | + __le16 eh_max; /* capacity of store in entries */ | ||
2108 | + __le16 eh_depth; /* has tree real underlying blocks? */ | ||
2109 | + __le32 eh_generation; /* generation of the tree */ | ||
2110 | +}; | ||
2111 | + | ||
2112 | +struct ext_filesystem { | ||
2113 | + /* Total Sector of partition */ | ||
2114 | + uint64_t total_sect; | ||
2115 | + /* Block size of partition */ | ||
2116 | + uint32_t blksz; | ||
2117 | + /* Inode size of partition */ | ||
2118 | + uint32_t inodesz; | ||
2119 | + /* Sectors per Block */ | ||
2120 | + uint32_t sect_perblk; | ||
2121 | + /* Group Descriptor Block Number */ | ||
2122 | + uint32_t gdtable_blkno; | ||
2123 | + /* Total block groups of partition */ | ||
2124 | + uint32_t no_blkgrp; | ||
2125 | + /* No of blocks required for bgdtable */ | ||
2126 | + uint32_t no_blk_pergdt; | ||
2127 | + /* Superblock */ | ||
2128 | + struct ext2_sblock *sb; | ||
2129 | + /* Block group descritpor table */ | ||
2130 | + struct ext2_block_group *gd; | ||
2131 | + char *gdtable; | ||
2132 | + | ||
2133 | + /* Block Bitmap Related */ | ||
2134 | + unsigned char **blk_bmaps; | ||
2135 | + long int curr_blkno; | ||
2136 | + uint16_t first_pass_bbmap; | ||
2137 | + | ||
2138 | + /* Inode Bitmap Related */ | ||
2139 | + unsigned char **inode_bmaps; | ||
2140 | + int curr_inode_no; | ||
2141 | + uint16_t first_pass_ibmap; | ||
2142 | + | ||
2143 | + /* Journal Related */ | ||
2144 | + | ||
2145 | + /* Block Device Descriptor */ | ||
2146 | + block_dev_desc_t *dev_desc; | ||
2147 | +}; | ||
2148 | + | ||
2149 | +extern block_dev_desc_t *ext4_dev_desc; | ||
2150 | +extern struct ext2_data *ext4fs_root; | ||
2151 | +extern struct ext2fs_node *ext4fs_file; | ||
2152 | + | ||
2153 | +struct ext_filesystem *get_fs(void); | ||
2154 | +int init_fs(block_dev_desc_t *dev_desc); | ||
2155 | +void deinit_fs(block_dev_desc_t *dev_desc); | ||
2156 | +int ext4fs_open(const char *filename); | ||
2157 | +int ext4fs_read(char *buf, unsigned len); | ||
2158 | +int ext4fs_mount(unsigned part_length); | ||
2159 | +void ext4fs_close(void); | ||
2160 | +int ext4fs_ls(const char *dirname); | ||
2161 | +void ext4fs_free_node(struct ext2fs_node *node, struct ext2fs_node *currroot); | ||
2162 | +int ext4fs_devread(int sector, int byte_offset, int byte_len, char *buf); | ||
2163 | +int ext4fs_set_blk_dev(block_dev_desc_t *rbdd, int part); | ||
2164 | +long int read_allocated_block(struct ext2_inode *inode, int fileblock); | ||
2165 | +#endif | ||
2166 | diff --git a/include/ext_common.h b/include/ext_common.h | ||
2167 | new file mode 100644 | ||
2168 | index 0000000..5d48021 | ||
2169 | --- /dev/null | ||
2170 | +++ b/include/ext_common.h | ||
2171 | @@ -0,0 +1,188 @@ | ||
2172 | +/* | ||
2173 | + * (C) Copyright 2011 - 2012 Samsung Electronics | ||
2174 | + * EXT4 filesystem implementation in Uboot by | ||
2175 | + * Uma Shankar <uma.shankar@samsung.com> | ||
2176 | + * Manjunatha C Achar <a.manjunatha@samsung.com> | ||
2177 | + * | ||
2178 | + * Data structures and headers for ext4 support have been taken from | ||
2179 | + * ext2 ls load support in Uboot | ||
2180 | + * | ||
2181 | + * (C) Copyright 2004 | ||
2182 | + * esd gmbh <www.esd-electronics.com> | ||
2183 | + * Reinhard Arlt <reinhard.arlt@esd-electronics.com> | ||
2184 | + * | ||
2185 | + * based on code from grub2 fs/ext2.c and fs/fshelp.c by | ||
2186 | + * GRUB -- GRand Unified Bootloader | ||
2187 | + * Copyright (C) 2003, 2004 Free Software Foundation, Inc. | ||
2188 | + * | ||
2189 | + * This program is free software; you can redistribute it and/or modify | ||
2190 | + * it under the terms of the GNU General Public License as published by | ||
2191 | + * the Free Software Foundation; either version 2 of the License, or | ||
2192 | + * (at your option) any later version. | ||
2193 | + * | ||
2194 | + * This program is distributed in the hope that it will be useful, | ||
2195 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2196 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2197 | + * GNU General Public License for more details. | ||
2198 | + * | ||
2199 | + * You should have received a copy of the GNU General Public License | ||
2200 | + * along with this program; if not, write to the Free Software | ||
2201 | + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
2202 | + */ | ||
2203 | + | ||
2204 | +#ifndef __EXT_COMMON__ | ||
2205 | +#define __EXT_COMMON__ | ||
2206 | + | ||
2207 | +#define SECTOR_SIZE 0x200 | ||
2208 | +#define SECTOR_BITS 9 | ||
2209 | + | ||
2210 | +/* Magic value used to identify an ext2 filesystem. */ | ||
2211 | +#define EXT2_MAGIC 0xEF53 | ||
2212 | +/* Amount of indirect blocks in an inode. */ | ||
2213 | +#define INDIRECT_BLOCKS 12 | ||
2214 | +/* Maximum lenght of a pathname. */ | ||
2215 | +#define EXT2_PATH_MAX 4096 | ||
2216 | +/* Maximum nesting of symlinks, used to prevent a loop. */ | ||
2217 | +#define EXT2_MAX_SYMLINKCNT 8 | ||
2218 | + | ||
2219 | +/* Filetype used in directory entry. */ | ||
2220 | +#define FILETYPE_UNKNOWN 0 | ||
2221 | +#define FILETYPE_REG 1 | ||
2222 | +#define FILETYPE_DIRECTORY 2 | ||
2223 | +#define FILETYPE_SYMLINK 7 | ||
2224 | + | ||
2225 | +/* Filetype information as used in inodes. */ | ||
2226 | +#define FILETYPE_INO_MASK 0170000 | ||
2227 | +#define FILETYPE_INO_REG 0100000 | ||
2228 | +#define FILETYPE_INO_DIRECTORY 0040000 | ||
2229 | +#define FILETYPE_INO_SYMLINK 0120000 | ||
2230 | +#define EXT2_ROOT_INO 2 /* Root inode */ | ||
2231 | + | ||
2232 | +/* Bits used as offset in sector */ | ||
2233 | +#define DISK_SECTOR_BITS 9 | ||
2234 | +/* The size of an ext2 block in bytes. */ | ||
2235 | +#define EXT2_BLOCK_SIZE(data) (1 << LOG2_BLOCK_SIZE(data)) | ||
2236 | + | ||
2237 | +/* Log2 size of ext2 block in 512 blocks. */ | ||
2238 | +#define LOG2_EXT2_BLOCK_SIZE(data) (__le32_to_cpu \ | ||
2239 | + (data->sblock.log2_block_size) + 1) | ||
2240 | + | ||
2241 | +/* Log2 size of ext2 block in bytes. */ | ||
2242 | +#define LOG2_BLOCK_SIZE(data) (__le32_to_cpu \ | ||
2243 | + (data->sblock.log2_block_size) + 10) | ||
2244 | +#define INODE_SIZE_FILESYSTEM(data) (__le32_to_cpu \ | ||
2245 | + (data->sblock.inode_size)) | ||
2246 | + | ||
2247 | +#define EXT2_FT_DIR 2 | ||
2248 | +#define SUCCESS 1 | ||
2249 | + | ||
2250 | +/* Macro-instructions used to manage several block sizes */ | ||
2251 | +#define EXT2_MIN_BLOCK_LOG_SIZE 10 /* 1024 */ | ||
2252 | +#define EXT2_MAX_BLOCK_LOG_SIZE 16 /* 65536 */ | ||
2253 | +#define EXT2_MIN_BLOCK_SIZE (1 << EXT2_MIN_BLOCK_LOG_SIZE) | ||
2254 | +#define EXT2_MAX_BLOCK_SIZE (1 << EXT2_MAX_BLOCK_LOG_SIZE) | ||
2255 | + | ||
2256 | +/* The ext2 superblock. */ | ||
2257 | +struct ext2_sblock { | ||
2258 | + uint32_t total_inodes; | ||
2259 | + uint32_t total_blocks; | ||
2260 | + uint32_t reserved_blocks; | ||
2261 | + uint32_t free_blocks; | ||
2262 | + uint32_t free_inodes; | ||
2263 | + uint32_t first_data_block; | ||
2264 | + uint32_t log2_block_size; | ||
2265 | + uint32_t log2_fragment_size; | ||
2266 | + uint32_t blocks_per_group; | ||
2267 | + uint32_t fragments_per_group; | ||
2268 | + uint32_t inodes_per_group; | ||
2269 | + uint32_t mtime; | ||
2270 | + uint32_t utime; | ||
2271 | + uint16_t mnt_count; | ||
2272 | + uint16_t max_mnt_count; | ||
2273 | + uint16_t magic; | ||
2274 | + uint16_t fs_state; | ||
2275 | + uint16_t error_handling; | ||
2276 | + uint16_t minor_revision_level; | ||
2277 | + uint32_t lastcheck; | ||
2278 | + uint32_t checkinterval; | ||
2279 | + uint32_t creator_os; | ||
2280 | + uint32_t revision_level; | ||
2281 | + uint16_t uid_reserved; | ||
2282 | + uint16_t gid_reserved; | ||
2283 | + uint32_t first_inode; | ||
2284 | + uint16_t inode_size; | ||
2285 | + uint16_t block_group_number; | ||
2286 | + uint32_t feature_compatibility; | ||
2287 | + uint32_t feature_incompat; | ||
2288 | + uint32_t feature_ro_compat; | ||
2289 | + uint32_t unique_id[4]; | ||
2290 | + char volume_name[16]; | ||
2291 | + char last_mounted_on[64]; | ||
2292 | + uint32_t compression_info; | ||
2293 | +}; | ||
2294 | + | ||
2295 | +struct ext2_block_group { | ||
2296 | + __u32 block_id; /* Blocks bitmap block */ | ||
2297 | + __u32 inode_id; /* Inodes bitmap block */ | ||
2298 | + __u32 inode_table_id; /* Inodes table block */ | ||
2299 | + __u16 free_blocks; /* Free blocks count */ | ||
2300 | + __u16 free_inodes; /* Free inodes count */ | ||
2301 | + __u16 used_dir_cnt; /* Directories count */ | ||
2302 | + __u16 bg_flags; | ||
2303 | + __u32 bg_reserved[2]; | ||
2304 | + __u16 bg_itable_unused; /* Unused inodes count */ | ||
2305 | + __u16 bg_checksum; /* crc16(s_uuid+grouo_num+group_desc)*/ | ||
2306 | +}; | ||
2307 | + | ||
2308 | +/* The ext2 inode. */ | ||
2309 | +struct ext2_inode { | ||
2310 | + uint16_t mode; | ||
2311 | + uint16_t uid; | ||
2312 | + uint32_t size; | ||
2313 | + uint32_t atime; | ||
2314 | + uint32_t ctime; | ||
2315 | + uint32_t mtime; | ||
2316 | + uint32_t dtime; | ||
2317 | + uint16_t gid; | ||
2318 | + uint16_t nlinks; | ||
2319 | + uint32_t blockcnt; /* Blocks of 512 bytes!! */ | ||
2320 | + uint32_t flags; | ||
2321 | + uint32_t osd1; | ||
2322 | + union { | ||
2323 | + struct datablocks { | ||
2324 | + uint32_t dir_blocks[INDIRECT_BLOCKS]; | ||
2325 | + uint32_t indir_block; | ||
2326 | + uint32_t double_indir_block; | ||
2327 | + uint32_t triple_indir_block; | ||
2328 | + } blocks; | ||
2329 | + char symlink[60]; | ||
2330 | + } b; | ||
2331 | + uint32_t version; | ||
2332 | + uint32_t acl; | ||
2333 | + uint32_t dir_acl; | ||
2334 | + uint32_t fragment_addr; | ||
2335 | + uint32_t osd2[3]; | ||
2336 | +}; | ||
2337 | + | ||
2338 | +/* The header of an ext2 directory entry. */ | ||
2339 | +struct ext2_dirent { | ||
2340 | + uint32_t inode; | ||
2341 | + uint16_t direntlen; | ||
2342 | + uint8_t namelen; | ||
2343 | + uint8_t filetype; | ||
2344 | +}; | ||
2345 | + | ||
2346 | +struct ext2fs_node { | ||
2347 | + struct ext2_data *data; | ||
2348 | + struct ext2_inode inode; | ||
2349 | + int ino; | ||
2350 | + int inode_read; | ||
2351 | +}; | ||
2352 | + | ||
2353 | +/* Information about a "mounted" ext2 filesystem. */ | ||
2354 | +struct ext2_data { | ||
2355 | + struct ext2_sblock sblock; | ||
2356 | + struct ext2_inode *inode; | ||
2357 | + struct ext2fs_node diropen; | ||
2358 | +}; | ||
2359 | +#endif | ||
2360 | -- | ||
2361 | 1.7.10 | ||
2362 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09git/0010-am335x-switch-to-ext4-mode.patch b/recipes-bsp/u-boot/u-boot/2011.09git/0010-am335x-switch-to-ext4-mode.patch deleted file mode 100644 index 4511b6b5..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.09git/0010-am335x-switch-to-ext4-mode.patch +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | From 9e1a99476875b1f1e6e34e70d9bf6e77d3ac8fba Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Wed, 4 Apr 2012 00:06:31 +0200 | ||
4 | Subject: [PATCH 10/10] am335x: switch to ext4 mode | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | include/configs/am335x_evm.h | 7 ++++--- | ||
9 | 1 file changed, 4 insertions(+), 3 deletions(-) | ||
10 | |||
11 | diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h | ||
12 | index e42febe..e2be380 100755 | ||
13 | --- a/include/configs/am335x_evm.h | ||
14 | +++ b/include/configs/am335x_evm.h | ||
15 | @@ -75,7 +75,7 @@ | ||
16 | "importbootenv=echo Importing environment from mmc ...; " \ | ||
17 | "env import -t $loadaddr $filesize\0" \ | ||
18 | "mmc_load_uimage=fatload mmc ${mmc_dev}:1 ${kloadaddr} ${bootfile}\0" \ | ||
19 | - "mmc_load_uimage_ext2=ext2load mmc ${mmc_dev}:2 ${kloadaddr} /boot/${bootfile}\0" \ | ||
20 | + "mmc_load_uimage_ext4=ext4load mmc ${mmc_dev}:2 ${kloadaddr} /boot/${bootfile}\0" \ | ||
21 | "bootargs_defaults=setenv bootargs " \ | ||
22 | "console=${console} " \ | ||
23 | "${optargs}\0" \ | ||
24 | @@ -101,7 +101,7 @@ | ||
25 | "nfsroot=${serverip}:${rootpath},${nfsopts} rw " \ | ||
26 | "ip=dhcp\0" \ | ||
27 | "mmc_boot=run mmc_args; " \ | ||
28 | - "run mmc_load_uimage_ext2; " \ | ||
29 | + "run mmc_load_uimage_ext4; " \ | ||
30 | "bootm ${kloadaddr}\0" \ | ||
31 | "nand_boot=echo Booting from nand ...; " \ | ||
32 | "run nand_args; " \ | ||
33 | @@ -139,7 +139,7 @@ | ||
34 | "echo Running uenvcmd ...;" \ | ||
35 | "run uenvcmd;" \ | ||
36 | "fi;" \ | ||
37 | - "if run mmc_load_uimage_ext2; then " \ | ||
38 | + "if run mmc_load_uimage_ext4; then " \ | ||
39 | "run mmc_args;" \ | ||
40 | "bootm ${kloadaddr};" \ | ||
41 | "fi;" \ | ||
42 | @@ -426,6 +426,7 @@ | ||
43 | #define CONFIG_DOS_PARTITION | ||
44 | #define CONFIG_CMD_FAT | ||
45 | #define CONFIG_CMD_EXT2 | ||
46 | +#define CONFIG_CMD_EXT4 | ||
47 | #endif | ||
48 | |||
49 | /* Unsupported features */ | ||
50 | -- | ||
51 | 1.7.10 | ||
52 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.12/0001-beagleboard-mount-rootfs-RO-instead-of-RW-at-boot.patch b/recipes-bsp/u-boot/u-boot/2011.12/0001-beagleboard-mount-rootfs-RO-instead-of-RW-at-boot.patch deleted file mode 100644 index 02f91c51..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.12/0001-beagleboard-mount-rootfs-RO-instead-of-RW-at-boot.patch +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | From e435374789db01c9499ec169b295496f039ec401 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Sun, 27 Nov 2011 14:43:58 +0100 | ||
4 | Subject: [PATCH 01/10] beagleboard: mount rootfs RO instead of RW at boot | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | include/configs/omap3_beagle.h | 2 +- | ||
9 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
10 | |||
11 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
12 | index 91af8a0..d4f33d0 100644 | ||
13 | --- a/include/configs/omap3_beagle.h | ||
14 | +++ b/include/configs/omap3_beagle.h | ||
15 | @@ -220,7 +220,7 @@ | ||
16 | "dvimode=640x480MR-16@60\0" \ | ||
17 | "defaultdisplay=dvi\0" \ | ||
18 | "mmcdev=0\0" \ | ||
19 | - "mmcroot=/dev/mmcblk0p2 rw\0" \ | ||
20 | + "mmcroot=/dev/mmcblk0p2 ro\0" \ | ||
21 | "mmcrootfstype=ext3 rootwait\0" \ | ||
22 | "nandroot=ubi0:rootfs ubi.mtd=4\0" \ | ||
23 | "nandrootfstype=ubifs\0" \ | ||
24 | -- | ||
25 | 1.7.2.5 | ||
26 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.12/0002-beagleboard-add-support-for-TCT-Beacon-board.patch b/recipes-bsp/u-boot/u-boot/2011.12/0002-beagleboard-add-support-for-TCT-Beacon-board.patch deleted file mode 100644 index df3a09e0..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.12/0002-beagleboard-add-support-for-TCT-Beacon-board.patch +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | From 7c1bb614d0235c69e118f0552cbf46047f557b8c Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Sat, 8 Oct 2011 21:56:35 +0200 | ||
4 | Subject: [PATCH 02/10] beagleboard: add support for TCT Beacon board | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | board/ti/beagle/beagle.c | 10 ++++++++++ | ||
9 | board/ti/beagle/beagle.h | 7 +++++++ | ||
10 | 2 files changed, 17 insertions(+), 0 deletions(-) | ||
11 | |||
12 | diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c | ||
13 | index 6a457cb..9c2e6d0 100644 | ||
14 | --- a/board/ti/beagle/beagle.c | ||
15 | +++ b/board/ti/beagle/beagle.c | ||
16 | @@ -59,11 +59,14 @@ extern volatile struct ehci_hcor *hcor; | ||
17 | #define TWL4030_I2C_BUS 0 | ||
18 | #define EXPANSION_EEPROM_I2C_BUS 1 | ||
19 | #define EXPANSION_EEPROM_I2C_ADDRESS 0x50 | ||
20 | +#define DVI_EDID_I2C_BUS 2 | ||
21 | +#define DVI_EDID_I2C_ADDRESS 0x50 | ||
22 | |||
23 | #define TINCANTOOLS_ZIPPY 0x01000100 | ||
24 | #define TINCANTOOLS_ZIPPY2 0x02000100 | ||
25 | #define TINCANTOOLS_TRAINER 0x04000100 | ||
26 | #define TINCANTOOLS_SHOWDOG 0x03000100 | ||
27 | +#define TINCANTOOLS_BEACON 0x05000100 | ||
28 | #define KBADC_BEAGLEFPGA 0x01000600 | ||
29 | #define LW_BEAGLETOUCH 0x01000700 | ||
30 | #define BRAINMUX_LCDOG 0x01000800 | ||
31 | @@ -351,6 +354,13 @@ int misc_init_r(void) | ||
32 | setenv("defaultdisplay", "showdoglcd"); | ||
33 | setenv("buddy", "showdog"); | ||
34 | break; | ||
35 | + case TINCANTOOLS_BEACON: | ||
36 | + printf("Recognized Tincantools Beacon board (rev %d %s)\n", | ||
37 | + expansion_config.revision, | ||
38 | + expansion_config.fab_revision); | ||
39 | + MUX_TINCANTOOLS_BEACON(); | ||
40 | + setenv("buddy", "beacon"); | ||
41 | + break; | ||
42 | case KBADC_BEAGLEFPGA: | ||
43 | printf("Recognized KBADC Beagle FPGA board\n"); | ||
44 | MUX_KBADC_BEAGLEFPGA(); | ||
45 | diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h | ||
46 | index 18bfaa8..6a9ad73 100644 | ||
47 | --- a/board/ti/beagle/beagle.h | ||
48 | +++ b/board/ti/beagle/beagle.h | ||
49 | @@ -456,6 +456,13 @@ const omap3_sysinfo sysinfo = { | ||
50 | MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTU | EN | M4)) /*GPIO_141*/\ | ||
51 | MUX_VAL(CP(MCBSP1_CLKX), (IEN | PTU | EN | M4)) /*GPIO_162*/ | ||
52 | |||
53 | +#define MUX_TINCANTOOLS_BEACON() \ | ||
54 | + MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M4)) /*GPIO_135*/\ | ||
55 | + MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN | M4)) /*GPIO_136*/\ | ||
56 | + MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M4)) /*GPIO_137*/\ | ||
57 | + MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | EN | M4)) /*GPIO_138*/\ | ||
58 | + MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M4)) /*GPIO_139*/\ | ||
59 | + | ||
60 | #define MUX_KBADC_BEAGLEFPGA() \ | ||
61 | MUX_VAL(CP(MCBSP1_CLKR), (IEN | PTU | DIS | M1)) /*MCSPI4_CLK*/\ | ||
62 | MUX_VAL(CP(MCBSP1_DX), (IDIS | PTU | DIS | M1)) /*MCSPI4_SIMO*/\ | ||
63 | -- | ||
64 | 1.7.2.5 | ||
65 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.12/0003-beagleboard-add-support-for-scanning-loop-through-ex.patch b/recipes-bsp/u-boot/u-boot/2011.12/0003-beagleboard-add-support-for-scanning-loop-through-ex.patch deleted file mode 100644 index 1bbe14e7..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.12/0003-beagleboard-add-support-for-scanning-loop-through-ex.patch +++ /dev/null | |||
@@ -1,121 +0,0 @@ | |||
1 | From c8c3b1adff56c49f20732846a7087e95f6916e61 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Sun, 27 Nov 2011 14:53:56 +0100 | ||
4 | Subject: [PATCH 03/10] beagleboard: add support for scanning loop-through expansionboards like the uLCD-lite | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | board/ti/beagle/beagle.c | 30 ++++++++++++++++++++++++++---- | ||
9 | include/configs/omap3_beagle.h | 4 ++++ | ||
10 | 2 files changed, 30 insertions(+), 4 deletions(-) | ||
11 | |||
12 | diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c | ||
13 | index 9c2e6d0..5ea50d1 100644 | ||
14 | --- a/board/ti/beagle/beagle.c | ||
15 | +++ b/board/ti/beagle/beagle.c | ||
16 | @@ -74,6 +74,7 @@ extern volatile struct ehci_hcor *hcor; | ||
17 | #define BBTOYS_WIFI 0x01000B00 | ||
18 | #define BBTOYS_VGA 0x02000B00 | ||
19 | #define BBTOYS_LCD 0x03000B00 | ||
20 | +#define BBTOYS_ULCD 0x04000B00 | ||
21 | #define BEAGLE_NO_EEPROM 0xffffffff | ||
22 | |||
23 | DECLARE_GLOBAL_DATA_PTR; | ||
24 | @@ -209,18 +210,18 @@ void get_board_mem_timings(u32 *mcfg, u32 *ctrla, u32 *ctrlb, u32 *rfr_ctrl, | ||
25 | * bus 1 for the availability of an AT24C01B serial EEPROM. | ||
26 | * returns the device_vendor field from the EEPROM | ||
27 | */ | ||
28 | -unsigned int get_expansion_id(void) | ||
29 | +unsigned int get_expansion_id(int eeprom_address) | ||
30 | { | ||
31 | i2c_set_bus_num(EXPANSION_EEPROM_I2C_BUS); | ||
32 | |||
33 | /* return BEAGLE_NO_EEPROM if eeprom doesn't respond */ | ||
34 | - if (i2c_probe(EXPANSION_EEPROM_I2C_ADDRESS) == 1) { | ||
35 | + if (i2c_probe(eeprom_address) == 1) { | ||
36 | i2c_set_bus_num(TWL4030_I2C_BUS); | ||
37 | return BEAGLE_NO_EEPROM; | ||
38 | } | ||
39 | |||
40 | /* read configuration data */ | ||
41 | - i2c_read(EXPANSION_EEPROM_I2C_ADDRESS, 0, 1, (u8 *)&expansion_config, | ||
42 | + i2c_read(eeprom_address, 0, 1, (u8 *)&expansion_config, | ||
43 | sizeof(expansion_config)); | ||
44 | |||
45 | i2c_set_bus_num(TWL4030_I2C_BUS); | ||
46 | @@ -323,7 +324,7 @@ int misc_init_r(void) | ||
47 | TWL4030_PM_RECEIVER_DEV_GRP_P1); | ||
48 | } | ||
49 | |||
50 | - switch (get_expansion_id()) { | ||
51 | + switch (get_expansion_id(EXPANSION_EEPROM_I2C_ADDRESS)) { | ||
52 | case TINCANTOOLS_ZIPPY: | ||
53 | printf("Recognized Tincantools Zippy board (rev %d %s)\n", | ||
54 | expansion_config.revision, | ||
55 | @@ -402,6 +403,27 @@ int misc_init_r(void) | ||
56 | if (expansion_config.content == 1) | ||
57 | setenv(expansion_config.env_var, expansion_config.env_setting); | ||
58 | |||
59 | + /* Scan 0x51 as well for loop-thru boards */ | ||
60 | + switch (get_expansion_id(EXPANSION_EEPROM_I2C_ADDRESS + 1)) { | ||
61 | + case BBTOYS_ULCD: | ||
62 | + printf("Recognized BeagleBoardToys uLCD-lite board\n"); | ||
63 | + setenv("buddy2", "bbtoys-ulcd"); | ||
64 | + setenv("defaultdisplay", "lcd"); | ||
65 | + //setenv("uenvcmd", "i2c dev 1 ; i2c mw 40 00 00; i2c mw 40 04 80; i2c mw 40 0d 05; i2c mw 40 0d 15"); | ||
66 | + break; | ||
67 | + case BEAGLE_NO_EEPROM: | ||
68 | + printf("No EEPROM on expansion board\n"); | ||
69 | + setenv("buddy2", "none"); | ||
70 | + break; | ||
71 | + default: | ||
72 | + printf("Unrecognized expansion board: %x\n", | ||
73 | + expansion_config.device_vendor); | ||
74 | + setenv("buddy2", "unknown"); | ||
75 | + } | ||
76 | + | ||
77 | + if (expansion_config.content == 1) | ||
78 | + setenv(expansion_config.env_var, expansion_config.env_setting); | ||
79 | + | ||
80 | twl4030_power_init(); | ||
81 | switch (get_board_revision()) { | ||
82 | case REVISION_XM_A: | ||
83 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
84 | index d4f33d0..65ab8ee 100644 | ||
85 | --- a/include/configs/omap3_beagle.h | ||
86 | +++ b/include/configs/omap3_beagle.h | ||
87 | @@ -214,6 +214,7 @@ | ||
88 | "console=ttyO2,115200n8\0" \ | ||
89 | "mpurate=auto\0" \ | ||
90 | "buddy=none "\ | ||
91 | + "buddy2=none "\ | ||
92 | "optargs=\0" \ | ||
93 | "camera=none\0" \ | ||
94 | "vram=12M\0" \ | ||
95 | @@ -230,6 +231,7 @@ | ||
96 | "${optargs} " \ | ||
97 | "mpurate=${mpurate} " \ | ||
98 | "buddy=${buddy} "\ | ||
99 | + "buddy2=${buddy2} "\ | ||
100 | "camera=${camera} "\ | ||
101 | "vram=${vram} " \ | ||
102 | "omapfb.mode=dvi:${dvimode} " \ | ||
103 | @@ -240,6 +242,7 @@ | ||
104 | "${optargs} " \ | ||
105 | "mpurate=${mpurate} " \ | ||
106 | "buddy=${buddy} "\ | ||
107 | + "buddy2=${buddy2} "\ | ||
108 | "camera=${camera} "\ | ||
109 | "vram=${vram} " \ | ||
110 | "omapfb.mode=dvi:${dvimode} " \ | ||
111 | @@ -254,6 +257,7 @@ | ||
112 | "${optargs} " \ | ||
113 | "mpurate=${mpurate} " \ | ||
114 | "buddy=${buddy} "\ | ||
115 | + "buddy2=${buddy2} "\ | ||
116 | "vram=${vram} " \ | ||
117 | "omapfb.mode=dvi:${dvimode} " \ | ||
118 | "omapdss.def_disp=${defaultdisplay} " \ | ||
119 | -- | ||
120 | 1.7.2.5 | ||
121 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.12/0004-omap4-common-mount-root-RO.patch b/recipes-bsp/u-boot/u-boot/2011.12/0004-omap4-common-mount-root-RO.patch deleted file mode 100644 index ed340a03..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.12/0004-omap4-common-mount-root-RO.patch +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | From e4ac25df241bc2f3e6e2b7116529e82dfa5aab00 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Thu, 8 Dec 2011 17:22:59 +0100 | ||
4 | Subject: [PATCH 04/10] omap4-common: mount root RO | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | include/configs/omap4_common.h | 2 +- | ||
9 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
10 | |||
11 | diff --git a/include/configs/omap4_common.h b/include/configs/omap4_common.h | ||
12 | index a989721..54760e9 100644 | ||
13 | --- a/include/configs/omap4_common.h | ||
14 | +++ b/include/configs/omap4_common.h | ||
15 | @@ -154,7 +154,7 @@ | ||
16 | "usbtty=cdc_acm\0" \ | ||
17 | "vram=16M\0" \ | ||
18 | "mmcdev=0\0" \ | ||
19 | - "mmcroot=/dev/mmcblk0p2 rw\0" \ | ||
20 | + "mmcroot=/dev/mmcblk0p2 ro\0" \ | ||
21 | "mmcrootfstype=ext3 rootwait\0" \ | ||
22 | "mmcargs=setenv bootargs console=${console} " \ | ||
23 | "vram=${vram} " \ | ||
24 | -- | ||
25 | 1.7.2.5 | ||
26 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.12/0005-omap4-common-use-ext4-by-default.patch b/recipes-bsp/u-boot/u-boot/2011.12/0005-omap4-common-use-ext4-by-default.patch deleted file mode 100644 index 97dab04d..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.12/0005-omap4-common-use-ext4-by-default.patch +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | From 9e4679bdc5a2f3908f9d5e757c9706c0040e3643 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Thu, 8 Dec 2011 17:23:24 +0100 | ||
4 | Subject: [PATCH 05/10] omap4-common: use ext4 by default | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | include/configs/omap4_common.h | 2 +- | ||
9 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
10 | |||
11 | diff --git a/include/configs/omap4_common.h b/include/configs/omap4_common.h | ||
12 | index 54760e9..7637688 100644 | ||
13 | --- a/include/configs/omap4_common.h | ||
14 | +++ b/include/configs/omap4_common.h | ||
15 | @@ -155,7 +155,7 @@ | ||
16 | "vram=16M\0" \ | ||
17 | "mmcdev=0\0" \ | ||
18 | "mmcroot=/dev/mmcblk0p2 ro\0" \ | ||
19 | - "mmcrootfstype=ext3 rootwait\0" \ | ||
20 | + "mmcrootfstype=ext4 rootwait\0" \ | ||
21 | "mmcargs=setenv bootargs console=${console} " \ | ||
22 | "vram=${vram} " \ | ||
23 | "root=${mmcroot} " \ | ||
24 | -- | ||
25 | 1.7.2.5 | ||
26 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.12/0006-OMAP-MMC-Add-delay-before-waiting-for-status.patch b/recipes-bsp/u-boot/u-boot/2011.12/0006-OMAP-MMC-Add-delay-before-waiting-for-status.patch deleted file mode 100644 index 84293651..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.12/0006-OMAP-MMC-Add-delay-before-waiting-for-status.patch +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | From 64e971ecd4bb1dec118b5687dfa7c57790922bba Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmx.de> | ||
3 | Date: Wed, 21 Dec 2011 23:56:35 +0000 | ||
4 | Subject: [PATCH 06/10] OMAP MMC: Add delay before waiting for status | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Loading kernel from MMC created the following error message reproducable: | ||
10 | |||
11 | | reading uImage | ||
12 | | mmc_send_cmd: timedout waiting for stat! | ||
13 | | | ||
14 | | 2860468 bytes read | ||
15 | |||
16 | Tested on overo with OMAP3530: | ||
17 | * OMAP3530-GP ES3.1, CPU-OPP2, L3-165MHz, Max CPU Clock 720 mHz | ||
18 | Die ID #470e000400000000040398d31402100c | ||
19 | * OMAP3530-GP ES3.1, CPU-OPP2, L3-165MHz, Max CPU Clock 600 mHz | ||
20 | Die ID #112000040000000004035c140101b011 | ||
21 | |||
22 | Signed-off-by: Andreas Müller <schnitzeltony@gmx.de> | ||
23 | --- | ||
24 | drivers/mmc/omap_hsmmc.c | 4 ++++ | ||
25 | 1 files changed, 4 insertions(+), 0 deletions(-) | ||
26 | |||
27 | diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c | ||
28 | index c38b9e6..ac91e5d 100644 | ||
29 | --- a/drivers/mmc/omap_hsmmc.c | ||
30 | +++ b/drivers/mmc/omap_hsmmc.c | ||
31 | @@ -197,6 +197,10 @@ static int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, | ||
32 | unsigned int flags, mmc_stat; | ||
33 | ulong start; | ||
34 | |||
35 | + /* Delay added before checking the status */ | ||
36 | + if (cmd->cmdidx == MMC_CMD_SEND_STATUS) | ||
37 | + udelay(1); /* wait 1 us */ | ||
38 | + | ||
39 | start = get_timer(0); | ||
40 | while ((readl(&mmc_base->pstate) & DATI_MASK) == DATI_CMDDIS) { | ||
41 | if (get_timer(0) - start > MAX_RETRY_MS) { | ||
42 | -- | ||
43 | 1.7.2.5 | ||
44 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.12/0007-config-Always-use-GNU-ld.patch b/recipes-bsp/u-boot/u-boot/2011.12/0007-config-Always-use-GNU-ld.patch deleted file mode 100644 index 64685e39..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.12/0007-config-Always-use-GNU-ld.patch +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | From a8dc33253472328f2af04973575f26e9106db1c3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 21 Dec 2011 08:53:02 -0800 | ||
4 | Subject: [PATCH] config: Always use GNU ld | ||
5 | |||
6 | This patch makes sure that we always use the GNU ld. u-boot uses certain | ||
7 | construct e.g. OVERLAY which are not implemented in gold therefore it | ||
8 | always needs GNU ld for linking. It works well if default linker in | ||
9 | toolchain is GNU ld but in some cases we can have gold to be the | ||
10 | default linker and also ship GNU ld but not as default in such cases | ||
11 | its called $(PREFIX)ld.bfd, with this patch we make sure that if | ||
12 | $(PREFIX)ld.bfd exists than we use that for our ld. This way it | ||
13 | does not matter what the default ld is. | ||
14 | |||
15 | Upstream-status: Pending | ||
16 | |||
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
18 | --- | ||
19 | config.mk | 4 +++- | ||
20 | 1 files changed, 3 insertions(+), 1 deletions(-) | ||
21 | |||
22 | diff --git a/config.mk b/config.mk | ||
23 | index ddaa477..139dfa0 100644 | ||
24 | --- a/config.mk | ||
25 | +++ b/config.mk | ||
26 | @@ -126,11 +126,13 @@ cc-option = $(strip $(if $(findstring $1,$(CC_OPTIONS)),$1,\ | ||
27 | $(if $(call cc-option-sys,$1),$1,$2))) | ||
28 | endif | ||
29 | |||
30 | +exists_bfd_ld = $(shell if $(CROSS_COMPILE)ld.bfd -v > /dev/null 2>&1; \ | ||
31 | + then echo "$(1)"; else echo "$(2)"; fi; ) | ||
32 | # | ||
33 | # Include the make variables (CC, etc...) | ||
34 | # | ||
35 | AS = $(CROSS_COMPILE)as | ||
36 | -LD = $(CROSS_COMPILE)ld | ||
37 | +LD = $(call exists_bfd_ld, "$(CROSS_COMPILE)ld.bfd", "$(CROSS_COMPILE)ld") | ||
38 | CC = $(CROSS_COMPILE)gcc | ||
39 | CPP = $(CC) -E | ||
40 | AR = $(CROSS_COMPILE)ar | ||
41 | -- | ||
42 | 1.7.9.1 | ||
43 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.12/0008-Revert-armv7-disable-L2-cache-in-cleanup_before_linu.patch b/recipes-bsp/u-boot/u-boot/2011.12/0008-Revert-armv7-disable-L2-cache-in-cleanup_before_linu.patch deleted file mode 100644 index 9a13b691..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.12/0008-Revert-armv7-disable-L2-cache-in-cleanup_before_linu.patch +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | From 076f5b5c65a0f0652f5ba8b5328c52c76e951aaa Mon Sep 17 00:00:00 2001 | ||
2 | From: Philip Balister <philip@opensdr.com> | ||
3 | Date: Mon, 16 Jan 2012 09:45:11 -0500 | ||
4 | Subject: [PATCH 08/10] Revert "armv7: disable L2 cache in cleanup_before_linux()" | ||
5 | |||
6 | This reverts commit dc7100f4080952798413fb63bb4134b22c57623a. | ||
7 | --- | ||
8 | arch/arm/cpu/armv7/cpu.c | 1 - | ||
9 | 1 files changed, 0 insertions(+), 1 deletions(-) | ||
10 | |||
11 | diff --git a/arch/arm/cpu/armv7/cpu.c b/arch/arm/cpu/armv7/cpu.c | ||
12 | index 662c496..091e3e0 100644 | ||
13 | --- a/arch/arm/cpu/armv7/cpu.c | ||
14 | +++ b/arch/arm/cpu/armv7/cpu.c | ||
15 | @@ -65,7 +65,6 @@ int cleanup_before_linux(void) | ||
16 | * dcache_disable() in turn flushes the d-cache and disables MMU | ||
17 | */ | ||
18 | dcache_disable(); | ||
19 | - v7_outer_cache_disable(); | ||
20 | |||
21 | /* | ||
22 | * After D-cache is flushed and before it is disabled there may | ||
23 | -- | ||
24 | 1.7.2.5 | ||
25 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.12/0009-Beagleboard-Correct-memory-size-on-rev-C4.patch b/recipes-bsp/u-boot/u-boot/2011.12/0009-Beagleboard-Correct-memory-size-on-rev-C4.patch deleted file mode 100644 index be95db63..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.12/0009-Beagleboard-Correct-memory-size-on-rev-C4.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From 588d0e7259e17f302cb79d12ed0f47410a0d8697 Mon Sep 17 00:00:00 2001 | ||
2 | From: robertcnelson@gmail.com <robertcnelson@gmail.com> | ||
3 | Date: Fri, 27 Jan 2012 07:09:42 +0000 | ||
4 | Subject: [PATCH 09/10] Beagleboard: Correct memory size on rev C4 | ||
5 | |||
6 | Beagleboard: Correct memory size on rev C4 | ||
7 | |||
8 | The logic for the rev C4 boards was missing one of the cases | ||
9 | (variant with Micron NAND and 2x128MB). | ||
10 | |||
11 | Signed-off-by: Robert Nelson <robertcnelson@gmail.com> | ||
12 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
13 | --- | ||
14 | board/ti/beagle/beagle.c | 7 +++++++ | ||
15 | 1 files changed, 7 insertions(+), 0 deletions(-) | ||
16 | |||
17 | diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c | ||
18 | index 5ea50d1..4555977 100644 | ||
19 | --- a/board/ti/beagle/beagle.c | ||
20 | +++ b/board/ti/beagle/beagle.c | ||
21 | @@ -169,6 +169,13 @@ void get_board_mem_timings(u32 *mcfg, u32 *ctrla, u32 *ctrlb, u32 *rfr_ctrl, | ||
22 | *ctrlb = NUMONYX_V_ACTIMB_165; | ||
23 | *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz; | ||
24 | break; | ||
25 | + } else if (pop_mfr == NAND_MFR_MICRON && pop_id == 0xba) { | ||
26 | + /* Beagleboard Rev C4, 512MB Nand/256MB DDR*/ | ||
27 | + *mcfg = MICRON_V_MCFG_165(128 << 20); | ||
28 | + *ctrla = MICRON_V_ACTIMA_165; | ||
29 | + *ctrlb = MICRON_V_ACTIMB_165; | ||
30 | + *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz; | ||
31 | + break; | ||
32 | } else if (pop_mfr == NAND_MFR_MICRON && pop_id == 0xbc) { | ||
33 | /* Beagleboard Rev C5, 256MB DDR */ | ||
34 | *mcfg = MICRON_V_MCFG_200(256 << 20); | ||
35 | -- | ||
36 | 1.7.2.5 | ||
37 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.12/0010-OMAP3-Correct-get_sdr_cs_offset-mask.patch b/recipes-bsp/u-boot/u-boot/2011.12/0010-OMAP3-Correct-get_sdr_cs_offset-mask.patch deleted file mode 100644 index b9b61e57..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.12/0010-OMAP3-Correct-get_sdr_cs_offset-mask.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From 351fcc22c10beb005f589584b91298269a81aa52 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Rini <trini@ti.com> | ||
3 | Date: Wed, 18 Jan 2012 08:28:50 +0000 | ||
4 | Subject: [PATCH 10/10] OMAP3: Correct get_sdr_cs_offset mask | ||
5 | |||
6 | OMAP3: Correct get_sdr_cs_offset mask | ||
7 | |||
8 | The function get_sdr_cs_offset reads the CS_CFG register in the SDRC | ||
9 | to determine where CS1 is mapped to. make_cs1_contiguous() will set | ||
10 | CS1 to follow after CS0. The CS_CFG register has values in bits 9:8 | ||
11 | and 3:0 but we had erroneously been testing 5:4 and 3:0 resulting in | ||
12 | incorrect offsets on platforms with less than 128MB as 3:0 describe | ||
13 | 128MB hunks and 9:8 describe 32MB offsets after the 128MB hunk. | ||
14 | |||
15 | Tested-by: Grant Erickson <marathon96@gmail.com> | ||
16 | Signed-off-by: Tom Rini <trini@ti.com> | ||
17 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
18 | --- | ||
19 | arch/arm/cpu/armv7/omap3/sdrc.c | 2 +- | ||
20 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
21 | |||
22 | diff --git a/arch/arm/cpu/armv7/omap3/sdrc.c b/arch/arm/cpu/armv7/omap3/sdrc.c | ||
23 | index a27b4b1..91f42c0 100644 | ||
24 | --- a/arch/arm/cpu/armv7/omap3/sdrc.c | ||
25 | +++ b/arch/arm/cpu/armv7/omap3/sdrc.c | ||
26 | @@ -102,7 +102,7 @@ u32 get_sdr_cs_offset(u32 cs) | ||
27 | return 0; | ||
28 | |||
29 | offset = readl(&sdrc_base->cs_cfg); | ||
30 | - offset = (offset & 15) << 27 | (offset & 0x30) << 17; | ||
31 | + offset = (offset & 15) << 27 | (offset & 0x300) << 17; | ||
32 | |||
33 | return offset; | ||
34 | } | ||
35 | -- | ||
36 | 1.7.2.5 | ||
37 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.12/0011-ext2load-increase-read-speed.patch b/recipes-bsp/u-boot/u-boot/2011.12/0011-ext2load-increase-read-speed.patch deleted file mode 100644 index 2adb1db9..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.12/0011-ext2load-increase-read-speed.patch +++ /dev/null | |||
@@ -1,74 +0,0 @@ | |||
1 | From e4181abd88a932bc38054af05d39a633656caefa Mon Sep 17 00:00:00 2001 | ||
2 | From: "u-boot@lakedaemon.net" <u-boot@lakedaemon.net> | ||
3 | Date: Wed, 28 Mar 2012 04:37:11 +0000 | ||
4 | Subject: [PATCH 11/13] ext2load: increase read speed | ||
5 | |||
6 | This patch dramatically drops the amount of time u-boot needs to read a | ||
7 | file from an ext2 partition. On a typical 2 to 5 MB file (kernels and | ||
8 | initrds) it goes from tens of seconds to a couple seconds. | ||
9 | |||
10 | All we are doing here is grouping contiguous blocks into one read. | ||
11 | |||
12 | Boot tested on Globalscale Technologies Dreamplug (Kirkwood ARM SoC) | ||
13 | with three different files. sha1sums were calculated in Linux | ||
14 | userspace, and then confirmed after ext2load. | ||
15 | |||
16 | Signed-off-by: Jason Cooper <u-boot@lakedaemon.net> | ||
17 | --- | ||
18 | fs/ext2/ext2fs.c | 26 ++++++++++++++++++++++++-- | ||
19 | 1 file changed, 24 insertions(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/fs/ext2/ext2fs.c b/fs/ext2/ext2fs.c | ||
22 | index e119e13..8531db5 100644 | ||
23 | --- a/fs/ext2/ext2fs.c | ||
24 | +++ b/fs/ext2/ext2fs.c | ||
25 | @@ -414,7 +414,6 @@ int ext2fs_read_file | ||
26 | if (blknr < 0) { | ||
27 | return (-1); | ||
28 | } | ||
29 | - blknr = blknr << log2blocksize; | ||
30 | |||
31 | /* Last block. */ | ||
32 | if (i == blockcnt - 1) { | ||
33 | @@ -432,6 +431,29 @@ int ext2fs_read_file | ||
34 | blockend -= skipfirst; | ||
35 | } | ||
36 | |||
37 | + /* grab middle blocks in one go */ | ||
38 | + if (i != pos / blocksize && i != blockcnt - 1 && blockcnt > 3) { | ||
39 | + int oldblk = blknr; | ||
40 | + int blocknxt; | ||
41 | + while (i < blockcnt - 1) { | ||
42 | + blocknxt = ext2fs_read_block(node, i + 1); | ||
43 | + if (blocknxt == (oldblk + 1)) { | ||
44 | + oldblk = blocknxt; | ||
45 | + i++; | ||
46 | + } else { | ||
47 | + blocknxt = ext2fs_read_block(node, i); | ||
48 | + break; | ||
49 | + } | ||
50 | + } | ||
51 | + | ||
52 | + if (oldblk == blknr) | ||
53 | + blockend = blocksize; | ||
54 | + else | ||
55 | + blockend = (1 + blocknxt - blknr) * blocksize; | ||
56 | + } | ||
57 | + | ||
58 | + blknr = blknr << log2blocksize; | ||
59 | + | ||
60 | /* If the block number is 0 this block is not stored on disk but | ||
61 | is zero filled instead. */ | ||
62 | if (blknr) { | ||
63 | @@ -444,7 +466,7 @@ int ext2fs_read_file | ||
64 | } else { | ||
65 | memset (buf, 0, blocksize - skipfirst); | ||
66 | } | ||
67 | - buf += blocksize - skipfirst; | ||
68 | + buf += blockend - skipfirst; | ||
69 | } | ||
70 | return (len); | ||
71 | } | ||
72 | -- | ||
73 | 1.7.10 | ||
74 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.12/0012-ext4fs-ls-load-support.patch b/recipes-bsp/u-boot/u-boot/2011.12/0012-ext4fs-ls-load-support.patch deleted file mode 100644 index c16a2d8c..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.12/0012-ext4fs-ls-load-support.patch +++ /dev/null | |||
@@ -1,2362 +0,0 @@ | |||
1 | From 04a6b1d60a4fec316992b11837d6347117cbb670 Mon Sep 17 00:00:00 2001 | ||
2 | From: "uma.shankar" <uma.shankar@samsung.com> | ||
3 | Date: Mon, 9 Jan 2012 07:54:50 +0000 | ||
4 | Subject: [PATCH 12/13] ext4fs ls load support | ||
5 | |||
6 | Signed-off-by: Uma Shankar <uma.shankar@samsung.com> | ||
7 | Signed-off-by: Manjunatha C Achar <a.manjunatha@samsung.com> | ||
8 | Signed-off-by: Iqbal Shareef <iqbal.ams@samsung.com> | ||
9 | Signed-off-by: Hakgoo Lee <goodguy.lee@samsung.com> | ||
10 | --- | ||
11 | Makefile | 2 +- | ||
12 | common/Makefile | 1 + | ||
13 | common/cmd_ext4.c | 266 +++++++++++++++ | ||
14 | fs/Makefile | 1 + | ||
15 | fs/ext2/dev.c | 1 + | ||
16 | fs/ext2/ext2fs.c | 181 ++-------- | ||
17 | fs/ext4/Makefile | 51 +++ | ||
18 | fs/ext4/dev.c | 145 ++++++++ | ||
19 | fs/ext4/ext4_common.c | 875 +++++++++++++++++++++++++++++++++++++++++++++++++ | ||
20 | fs/ext4/ext4_common.h | 63 ++++ | ||
21 | fs/ext4/ext4fs.c | 228 +++++++++++++ | ||
22 | include/ext4fs.h | 132 ++++++++ | ||
23 | include/ext_common.h | 188 +++++++++++ | ||
24 | 13 files changed, 1977 insertions(+), 157 deletions(-) | ||
25 | create mode 100644 common/cmd_ext4.c | ||
26 | create mode 100644 fs/ext4/Makefile | ||
27 | create mode 100644 fs/ext4/dev.c | ||
28 | create mode 100644 fs/ext4/ext4_common.c | ||
29 | create mode 100644 fs/ext4/ext4_common.h | ||
30 | create mode 100644 fs/ext4/ext4fs.c | ||
31 | create mode 100644 include/ext4fs.h | ||
32 | create mode 100644 include/ext_common.h | ||
33 | |||
34 | diff --git a/Makefile b/Makefile | ||
35 | index 0438f1e..51cc8c8 100644 | ||
36 | --- a/Makefile | ||
37 | +++ b/Makefile | ||
38 | @@ -235,7 +235,7 @@ LIBS += dts/libdts.o | ||
39 | endif | ||
40 | LIBS += arch/$(ARCH)/lib/lib$(ARCH).o | ||
41 | LIBS += fs/cramfs/libcramfs.o fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o \ | ||
42 | - fs/reiserfs/libreiserfs.o fs/ext2/libext2fs.o fs/yaffs2/libyaffs2.o \ | ||
43 | + fs/reiserfs/libreiserfs.o fs/ext2/libext2fs.o fs/ext4/libext4fs.o fs/yaffs2/libyaffs2.o \ | ||
44 | fs/ubifs/libubifs.o | ||
45 | LIBS += net/libnet.o | ||
46 | LIBS += disk/libdisk.o | ||
47 | diff --git a/common/Makefile b/common/Makefile | ||
48 | index 2d9ae8c..f5243f6 100644 | ||
49 | --- a/common/Makefile | ||
50 | +++ b/common/Makefile | ||
51 | @@ -86,6 +86,7 @@ COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += cmd_eeprom.o | ||
52 | COBJS-$(CONFIG_CMD_EEPROM) += cmd_eeprom.o | ||
53 | COBJS-$(CONFIG_CMD_ELF) += cmd_elf.o | ||
54 | COBJS-$(CONFIG_SYS_HUSH_PARSER) += cmd_exit.o | ||
55 | +COBJS-$(CONFIG_CMD_EXT4) += cmd_ext4.o | ||
56 | COBJS-$(CONFIG_CMD_EXT2) += cmd_ext2.o | ||
57 | COBJS-$(CONFIG_CMD_FAT) += cmd_fat.o | ||
58 | COBJS-$(CONFIG_CMD_FDC)$(CONFIG_CMD_FDOS) += cmd_fdc.o | ||
59 | diff --git a/common/cmd_ext4.c b/common/cmd_ext4.c | ||
60 | new file mode 100644 | ||
61 | index 0000000..2c53d2c | ||
62 | --- /dev/null | ||
63 | +++ b/common/cmd_ext4.c | ||
64 | @@ -0,0 +1,266 @@ | ||
65 | +/* | ||
66 | + * (C) Copyright 2011 - 2012 Samsung Electronics | ||
67 | + * EXT4 filesystem implementation in Uboot by | ||
68 | + * Uma Shankar <uma.shankar@samsung.com> | ||
69 | + * Manjunatha C Achar <a.manjunatha@samsung.com> | ||
70 | + * | ||
71 | + * Ext4fs support | ||
72 | + * made from existing cmd_ext2.c file of Uboot | ||
73 | + * | ||
74 | + * (C) Copyright 2004 | ||
75 | + * esd gmbh <www.esd-electronics.com> | ||
76 | + * Reinhard Arlt <reinhard.arlt@esd-electronics.com> | ||
77 | + * | ||
78 | + * made from cmd_reiserfs by | ||
79 | + * | ||
80 | + * (C) Copyright 2003 - 2004 | ||
81 | + * Sysgo Real-Time Solutions, AG <www.elinos.com> | ||
82 | + * Pavel Bartusek <pba@sysgo.com> | ||
83 | + * | ||
84 | + * This program is free software; you can redistribute it and/or | ||
85 | + * modify it under the terms of the GNU General Public License as | ||
86 | + * published by the Free Software Foundation; either version 2 of | ||
87 | + * the License, or (at your option) any later version. | ||
88 | + * | ||
89 | + * This program is distributed in the hope that it will be useful, | ||
90 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
91 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
92 | + * GNU General Public License for more details. | ||
93 | + * | ||
94 | + * You should have received a copy of the GNU General Public License | ||
95 | + * along with this program; if not, write to the Free Software | ||
96 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
97 | + * MA 02111-1307 USA | ||
98 | + * | ||
99 | + */ | ||
100 | + | ||
101 | +/* | ||
102 | + * Changelog: | ||
103 | + * 0.1 - Newly created file for ext4fs support. Taken from cmd_ext2.c | ||
104 | + * file in uboot. Added ext4fs ls and load support. | ||
105 | + */ | ||
106 | + | ||
107 | +#include <common.h> | ||
108 | +#include <part.h> | ||
109 | +#include <config.h> | ||
110 | +#include <command.h> | ||
111 | +#include <image.h> | ||
112 | +#include <linux/ctype.h> | ||
113 | +#include <asm/byteorder.h> | ||
114 | +#include <ext_common.h> | ||
115 | +#include <ext4fs.h> | ||
116 | +#include <linux/stat.h> | ||
117 | +#include <malloc.h> | ||
118 | + | ||
119 | +#if defined(CONFIG_CMD_USB) && defined(CONFIG_USB_STORAGE) | ||
120 | +#include <usb.h> | ||
121 | +#endif | ||
122 | + | ||
123 | +#if !defined(CONFIG_DOS_PARTITION) && !defined(CONFIG_EFI_PARTITION) | ||
124 | +#error DOS or EFI partition support must be selected | ||
125 | +#endif | ||
126 | + | ||
127 | +uint64_t total_sector; | ||
128 | +uint64_t part_offset; | ||
129 | + | ||
130 | +#define DOS_PART_MAGIC_OFFSET 0x1fe | ||
131 | +#define DOS_FS_TYPE_OFFSET 0x36 | ||
132 | +#define DOS_FS32_TYPE_OFFSET 0x52 | ||
133 | + | ||
134 | +static int do_ext4_load(cmd_tbl_t *cmdtp, int flag, int argc, | ||
135 | + char *const argv[]) | ||
136 | +{ | ||
137 | + char *filename = NULL; | ||
138 | + char *ep; | ||
139 | + int dev; | ||
140 | + unsigned long part = 1; | ||
141 | + ulong addr = 0; | ||
142 | + ulong part_length; | ||
143 | + int filelen; | ||
144 | + disk_partition_t info; | ||
145 | + struct ext_filesystem *fs; | ||
146 | + char buf[12]; | ||
147 | + unsigned long count; | ||
148 | + const char *addr_str; | ||
149 | + | ||
150 | + count = 0; | ||
151 | + addr = simple_strtoul(argv[3], NULL, 16); | ||
152 | + filename = getenv("bootfile"); | ||
153 | + switch (argc) { | ||
154 | + case 3: | ||
155 | + addr_str = getenv("loadaddr"); | ||
156 | + if (addr_str != NULL) | ||
157 | + addr = simple_strtoul(addr_str, NULL, 16); | ||
158 | + else | ||
159 | + addr = CONFIG_SYS_LOAD_ADDR; | ||
160 | + | ||
161 | + break; | ||
162 | + case 4: | ||
163 | + break; | ||
164 | + case 5: | ||
165 | + filename = argv[4]; | ||
166 | + break; | ||
167 | + case 6: | ||
168 | + filename = argv[4]; | ||
169 | + count = simple_strtoul(argv[5], NULL, 16); | ||
170 | + break; | ||
171 | + | ||
172 | + default: | ||
173 | + return cmd_usage(cmdtp); | ||
174 | + } | ||
175 | + | ||
176 | + if (!filename) { | ||
177 | + puts("** No boot file defined **\n"); | ||
178 | + return 1; | ||
179 | + } | ||
180 | + | ||
181 | + dev = (int)simple_strtoul(argv[2], &ep, 16); | ||
182 | + ext4_dev_desc = get_dev(argv[1], dev); | ||
183 | + if (ext4_dev_desc == NULL) { | ||
184 | + printf("** Block device %s %d not supported\n", argv[1], dev); | ||
185 | + return 1; | ||
186 | + } | ||
187 | + if (init_fs(ext4_dev_desc)) | ||
188 | + return 1; | ||
189 | + | ||
190 | + fs = get_fs(); | ||
191 | + if (*ep) { | ||
192 | + if (*ep != ':') { | ||
193 | + puts("** Invalid boot device, use `dev[:part]' **\n"); | ||
194 | + return 1; | ||
195 | + } | ||
196 | + part = simple_strtoul(++ep, NULL, 16); | ||
197 | + } | ||
198 | + | ||
199 | + if (part != 0) { | ||
200 | + if (get_partition_info(fs->dev_desc, part, &info)) { | ||
201 | + printf("** Bad partition %lu **\n", part); | ||
202 | + return 1; | ||
203 | + } | ||
204 | + | ||
205 | + if (strncmp((char *)info.type, BOOT_PART_TYPE, | ||
206 | + strlen(BOOT_PART_TYPE)) != 0) { | ||
207 | + printf("** Invalid partition type \"%s\"" | ||
208 | + " (expect \"" BOOT_PART_TYPE "\")\n", info.type); | ||
209 | + return 1; | ||
210 | + } | ||
211 | + printf("Loading file \"%s\" " | ||
212 | + "from %s device %d:%lu %s\n", | ||
213 | + filename, argv[1], dev, part, info.name); | ||
214 | + } else { | ||
215 | + printf("Loading file \"%s\" from %s device %d\n", | ||
216 | + filename, argv[1], dev); | ||
217 | + } | ||
218 | + | ||
219 | + part_length = ext4fs_set_blk_dev(fs->dev_desc, part); | ||
220 | + if (part_length == 0) { | ||
221 | + printf("**Bad partition - %s %d:%lu **\n", argv[1], dev, part); | ||
222 | + ext4fs_close(); | ||
223 | + return 1; | ||
224 | + } | ||
225 | + | ||
226 | + if (!ext4fs_mount(part_length)) { | ||
227 | + printf("** Bad ext2 partition or disk - %s %d:%lu **\n", | ||
228 | + argv[1], dev, part); | ||
229 | + ext4fs_close(); | ||
230 | + return 1; | ||
231 | + } | ||
232 | + | ||
233 | + filelen = ext4fs_open(filename); | ||
234 | + if (filelen < 0) { | ||
235 | + printf("** File not found %s\n", filename); | ||
236 | + ext4fs_close(); | ||
237 | + return 1; | ||
238 | + } | ||
239 | + if ((count < filelen) && (count != 0)) | ||
240 | + filelen = count; | ||
241 | + | ||
242 | + if (ext4fs_read((char *)addr, filelen) != filelen) { | ||
243 | + printf("** Unable to read \"%s\" from %s %d:%lu **\n", | ||
244 | + filename, argv[1], dev, part); | ||
245 | + ext4fs_close(); | ||
246 | + return 1; | ||
247 | + } | ||
248 | + | ||
249 | + ext4fs_close(); | ||
250 | + deinit_fs(fs->dev_desc); | ||
251 | + /* Loading ok, update default load address */ | ||
252 | + load_addr = addr; | ||
253 | + | ||
254 | + printf("%d bytes read\n", filelen); | ||
255 | + sprintf(buf, "%X", filelen); | ||
256 | + setenv("filesize", buf); | ||
257 | + | ||
258 | + return 0; | ||
259 | +} | ||
260 | + | ||
261 | +static int do_ext4_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) | ||
262 | +{ | ||
263 | + const char *filename = "/"; | ||
264 | + int dev; | ||
265 | + unsigned long part = 1; | ||
266 | + char *ep; | ||
267 | + struct ext_filesystem *fs; | ||
268 | + int part_length; | ||
269 | + | ||
270 | + if (argc < 3) | ||
271 | + return cmd_usage(cmdtp); | ||
272 | + | ||
273 | + dev = (int)simple_strtoul(argv[2], &ep, 16); | ||
274 | + ext4_dev_desc = get_dev(argv[1], dev); | ||
275 | + | ||
276 | + if (ext4_dev_desc == NULL) { | ||
277 | + printf("\n** Block device %s %d not supported\n", argv[1], dev); | ||
278 | + return 1; | ||
279 | + } | ||
280 | + | ||
281 | + if (init_fs(ext4_dev_desc)) | ||
282 | + return 1; | ||
283 | + | ||
284 | + fs = get_fs(); | ||
285 | + if (*ep) { | ||
286 | + if (*ep != ':') { | ||
287 | + puts("\n** Invalid boot device, use `dev[:part]' **\n"); | ||
288 | + return 1; | ||
289 | + } | ||
290 | + part = simple_strtoul(++ep, NULL, 16); | ||
291 | + } | ||
292 | + | ||
293 | + if (argc == 4) | ||
294 | + filename = argv[3]; | ||
295 | + | ||
296 | + part_length = ext4fs_set_blk_dev(fs->dev_desc, part); | ||
297 | + if (part_length == 0) { | ||
298 | + printf("** Bad partition - %s %d:%lu **\n", argv[1], dev, part); | ||
299 | + ext4fs_close(); | ||
300 | + return 1; | ||
301 | + } | ||
302 | + | ||
303 | + if (!ext4fs_mount(part_length)) { | ||
304 | + printf("** Bad ext2 partition or disk - %s %d:%lu **\n", | ||
305 | + argv[1], dev, part); | ||
306 | + ext4fs_close(); | ||
307 | + return 1; | ||
308 | + } | ||
309 | + if (ext4fs_ls(filename)) { | ||
310 | + printf("** Error ext2fs_ls() **\n"); | ||
311 | + ext4fs_close(); | ||
312 | + return 1; | ||
313 | + }; | ||
314 | + | ||
315 | + ext4fs_close(); | ||
316 | + deinit_fs(fs->dev_desc); | ||
317 | + | ||
318 | + return 0; | ||
319 | +} | ||
320 | + | ||
321 | +U_BOOT_CMD(ext4ls, 4, 1, do_ext4_ls, | ||
322 | + "list files in a directory (default /)", | ||
323 | + "<interface> <dev[:part]> [directory]\n" | ||
324 | + " - list files from 'dev' on 'interface' in a 'directory'"); | ||
325 | + | ||
326 | +U_BOOT_CMD(ext4load, 6, 0, do_ext4_load, | ||
327 | + "load binary file from a Ext2 filesystem", | ||
328 | + "<interface> <dev[:part]> [addr] [filename] [bytes]\n" | ||
329 | + " - load binary file 'filename' from 'dev' on 'interface'\n" | ||
330 | + " to address 'addr' from ext2 filesystem"); | ||
331 | diff --git a/fs/Makefile b/fs/Makefile | ||
332 | index 22aad12..00a8f37 100644 | ||
333 | --- a/fs/Makefile | ||
334 | +++ b/fs/Makefile | ||
335 | @@ -23,6 +23,7 @@ | ||
336 | # | ||
337 | |||
338 | subdirs-$(CONFIG_CMD_CRAMFS) := cramfs | ||
339 | +subdirs-$(CONFIG_CMD_EXT4) += ext4 | ||
340 | subdirs-$(CONFIG_CMD_EXT2) += ext2 | ||
341 | subdirs-$(CONFIG_CMD_FAT) += fat | ||
342 | subdirs-$(CONFIG_CMD_FDOS) += fdos | ||
343 | diff --git a/fs/ext2/dev.c b/fs/ext2/dev.c | ||
344 | index 874e211..315ff53 100644 | ||
345 | --- a/fs/ext2/dev.c | ||
346 | +++ b/fs/ext2/dev.c | ||
347 | @@ -27,6 +27,7 @@ | ||
348 | #include <common.h> | ||
349 | #include <config.h> | ||
350 | #include <ext2fs.h> | ||
351 | +#include <ext_common.h> | ||
352 | |||
353 | static block_dev_desc_t *ext2fs_block_dev_desc; | ||
354 | static disk_partition_t part_info; | ||
355 | diff --git a/fs/ext2/ext2fs.c b/fs/ext2/ext2fs.c | ||
356 | index 8531db5..ea3d98c 100644 | ||
357 | --- a/fs/ext2/ext2fs.c | ||
358 | +++ b/fs/ext2/ext2fs.c | ||
359 | @@ -25,152 +25,16 @@ | ||
360 | |||
361 | #include <common.h> | ||
362 | #include <ext2fs.h> | ||
363 | +#include <ext_common.h> | ||
364 | #include <malloc.h> | ||
365 | #include <asm/byteorder.h> | ||
366 | |||
367 | extern int ext2fs_devread (int sector, int byte_offset, int byte_len, | ||
368 | char *buf); | ||
369 | |||
370 | -/* Magic value used to identify an ext2 filesystem. */ | ||
371 | -#define EXT2_MAGIC 0xEF53 | ||
372 | -/* Amount of indirect blocks in an inode. */ | ||
373 | -#define INDIRECT_BLOCKS 12 | ||
374 | -/* Maximum lenght of a pathname. */ | ||
375 | -#define EXT2_PATH_MAX 4096 | ||
376 | -/* Maximum nesting of symlinks, used to prevent a loop. */ | ||
377 | -#define EXT2_MAX_SYMLINKCNT 8 | ||
378 | - | ||
379 | -/* Filetype used in directory entry. */ | ||
380 | -#define FILETYPE_UNKNOWN 0 | ||
381 | -#define FILETYPE_REG 1 | ||
382 | -#define FILETYPE_DIRECTORY 2 | ||
383 | -#define FILETYPE_SYMLINK 7 | ||
384 | - | ||
385 | -/* Filetype information as used in inodes. */ | ||
386 | -#define FILETYPE_INO_MASK 0170000 | ||
387 | -#define FILETYPE_INO_REG 0100000 | ||
388 | -#define FILETYPE_INO_DIRECTORY 0040000 | ||
389 | -#define FILETYPE_INO_SYMLINK 0120000 | ||
390 | - | ||
391 | -/* Bits used as offset in sector */ | ||
392 | -#define DISK_SECTOR_BITS 9 | ||
393 | - | ||
394 | -/* Log2 size of ext2 block in 512 blocks. */ | ||
395 | -#define LOG2_EXT2_BLOCK_SIZE(data) (__le32_to_cpu (data->sblock.log2_block_size) + 1) | ||
396 | - | ||
397 | -/* Log2 size of ext2 block in bytes. */ | ||
398 | -#define LOG2_BLOCK_SIZE(data) (__le32_to_cpu (data->sblock.log2_block_size) + 10) | ||
399 | - | ||
400 | -/* The size of an ext2 block in bytes. */ | ||
401 | -#define EXT2_BLOCK_SIZE(data) (1 << LOG2_BLOCK_SIZE(data)) | ||
402 | - | ||
403 | -/* The ext2 superblock. */ | ||
404 | -struct ext2_sblock { | ||
405 | - uint32_t total_inodes; | ||
406 | - uint32_t total_blocks; | ||
407 | - uint32_t reserved_blocks; | ||
408 | - uint32_t free_blocks; | ||
409 | - uint32_t free_inodes; | ||
410 | - uint32_t first_data_block; | ||
411 | - uint32_t log2_block_size; | ||
412 | - uint32_t log2_fragment_size; | ||
413 | - uint32_t blocks_per_group; | ||
414 | - uint32_t fragments_per_group; | ||
415 | - uint32_t inodes_per_group; | ||
416 | - uint32_t mtime; | ||
417 | - uint32_t utime; | ||
418 | - uint16_t mnt_count; | ||
419 | - uint16_t max_mnt_count; | ||
420 | - uint16_t magic; | ||
421 | - uint16_t fs_state; | ||
422 | - uint16_t error_handling; | ||
423 | - uint16_t minor_revision_level; | ||
424 | - uint32_t lastcheck; | ||
425 | - uint32_t checkinterval; | ||
426 | - uint32_t creator_os; | ||
427 | - uint32_t revision_level; | ||
428 | - uint16_t uid_reserved; | ||
429 | - uint16_t gid_reserved; | ||
430 | - uint32_t first_inode; | ||
431 | - uint16_t inode_size; | ||
432 | - uint16_t block_group_number; | ||
433 | - uint32_t feature_compatibility; | ||
434 | - uint32_t feature_incompat; | ||
435 | - uint32_t feature_ro_compat; | ||
436 | - uint32_t unique_id[4]; | ||
437 | - char volume_name[16]; | ||
438 | - char last_mounted_on[64]; | ||
439 | - uint32_t compression_info; | ||
440 | -}; | ||
441 | - | ||
442 | -/* The ext2 blockgroup. */ | ||
443 | -struct ext2_block_group { | ||
444 | - uint32_t block_id; | ||
445 | - uint32_t inode_id; | ||
446 | - uint32_t inode_table_id; | ||
447 | - uint16_t free_blocks; | ||
448 | - uint16_t free_inodes; | ||
449 | - uint16_t used_dir_cnt; | ||
450 | - uint32_t reserved[3]; | ||
451 | -}; | ||
452 | - | ||
453 | -/* The ext2 inode. */ | ||
454 | -struct ext2_inode { | ||
455 | - uint16_t mode; | ||
456 | - uint16_t uid; | ||
457 | - uint32_t size; | ||
458 | - uint32_t atime; | ||
459 | - uint32_t ctime; | ||
460 | - uint32_t mtime; | ||
461 | - uint32_t dtime; | ||
462 | - uint16_t gid; | ||
463 | - uint16_t nlinks; | ||
464 | - uint32_t blockcnt; /* Blocks of 512 bytes!! */ | ||
465 | - uint32_t flags; | ||
466 | - uint32_t osd1; | ||
467 | - union { | ||
468 | - struct datablocks { | ||
469 | - uint32_t dir_blocks[INDIRECT_BLOCKS]; | ||
470 | - uint32_t indir_block; | ||
471 | - uint32_t double_indir_block; | ||
472 | - uint32_t tripple_indir_block; | ||
473 | - } blocks; | ||
474 | - char symlink[60]; | ||
475 | - } b; | ||
476 | - uint32_t version; | ||
477 | - uint32_t acl; | ||
478 | - uint32_t dir_acl; | ||
479 | - uint32_t fragment_addr; | ||
480 | - uint32_t osd2[3]; | ||
481 | -}; | ||
482 | - | ||
483 | -/* The header of an ext2 directory entry. */ | ||
484 | -struct ext2_dirent { | ||
485 | - uint32_t inode; | ||
486 | - uint16_t direntlen; | ||
487 | - uint8_t namelen; | ||
488 | - uint8_t filetype; | ||
489 | -}; | ||
490 | - | ||
491 | -struct ext2fs_node { | ||
492 | - struct ext2_data *data; | ||
493 | - struct ext2_inode inode; | ||
494 | - int ino; | ||
495 | - int inode_read; | ||
496 | -}; | ||
497 | - | ||
498 | -/* Information about a "mounted" ext2 filesystem. */ | ||
499 | -struct ext2_data { | ||
500 | - struct ext2_sblock sblock; | ||
501 | - struct ext2_inode *inode; | ||
502 | - struct ext2fs_node diropen; | ||
503 | -}; | ||
504 | - | ||
505 | - | ||
506 | -typedef struct ext2fs_node *ext2fs_node_t; | ||
507 | |||
508 | struct ext2_data *ext2fs_root = NULL; | ||
509 | -ext2fs_node_t ext2fs_file = NULL; | ||
510 | +struct ext2fs_node *ext2fs_file; | ||
511 | int symlinknest = 0; | ||
512 | uint32_t *indir1_block = NULL; | ||
513 | int indir1_size = 0; | ||
514 | @@ -243,14 +107,16 @@ static int ext2fs_read_inode | ||
515 | } | ||
516 | |||
517 | |||
518 | -void ext2fs_free_node (ext2fs_node_t node, ext2fs_node_t currroot) { | ||
519 | +void ext2fs_free_node(struct ext2fs_node *node, struct ext2fs_node *currroot) | ||
520 | +{ | ||
521 | if ((node != &ext2fs_root->diropen) && (node != currroot)) { | ||
522 | free (node); | ||
523 | } | ||
524 | } | ||
525 | |||
526 | |||
527 | -static int ext2fs_read_block (ext2fs_node_t node, int fileblock) { | ||
528 | +static int ext2fs_read_block(struct ext2fs_node *node, int fileblock) | ||
529 | +{ | ||
530 | struct ext2_data *data = node->data; | ||
531 | struct ext2_inode *inode = &node->inode; | ||
532 | int blknr; | ||
533 | @@ -390,7 +256,8 @@ static int ext2fs_read_block (ext2fs_node_t node, int fileblock) { | ||
534 | |||
535 | |||
536 | int ext2fs_read_file | ||
537 | - (ext2fs_node_t node, int pos, unsigned int len, char *buf) { | ||
538 | + (struct ext2fs_node *node, int pos, unsigned int len, char *buf) | ||
539 | +{ | ||
540 | int i; | ||
541 | int blockcnt; | ||
542 | int log2blocksize = LOG2_EXT2_BLOCK_SIZE (node->data); | ||
543 | @@ -471,8 +338,8 @@ int ext2fs_read_file | ||
544 | return (len); | ||
545 | } | ||
546 | |||
547 | - | ||
548 | -static int ext2fs_iterate_dir (ext2fs_node_t dir, char *name, ext2fs_node_t * fnode, int *ftype) | ||
549 | +int ext2fs_iterate_dir(struct ext2fs_node *dir, char *name, | ||
550 | + struct ext2fs_node **fnode, int *ftype) | ||
551 | { | ||
552 | unsigned int fpos = 0; | ||
553 | int status; | ||
554 | @@ -501,7 +368,7 @@ static int ext2fs_iterate_dir (ext2fs_node_t dir, char *name, ext2fs_node_t * fn | ||
555 | } | ||
556 | if (dirent.namelen != 0) { | ||
557 | char filename[dirent.namelen + 1]; | ||
558 | - ext2fs_node_t fdiro; | ||
559 | + struct ext2fs_node *fdiro; | ||
560 | int type = FILETYPE_UNKNOWN; | ||
561 | |||
562 | status = ext2fs_read_file (diro, | ||
563 | @@ -603,8 +470,8 @@ static int ext2fs_iterate_dir (ext2fs_node_t dir, char *name, ext2fs_node_t * fn | ||
564 | return (0); | ||
565 | } | ||
566 | |||
567 | - | ||
568 | -static char *ext2fs_read_symlink (ext2fs_node_t node) { | ||
569 | +static char *ext2fs_read_symlink(struct ext2fs_node *node) | ||
570 | +{ | ||
571 | char *symlink; | ||
572 | struct ext2fs_node *diro = node; | ||
573 | int status; | ||
574 | @@ -641,15 +508,16 @@ static char *ext2fs_read_symlink (ext2fs_node_t node) { | ||
575 | |||
576 | |||
577 | int ext2fs_find_file1 | ||
578 | - (const char *currpath, | ||
579 | - ext2fs_node_t currroot, ext2fs_node_t * currfound, int *foundtype) { | ||
580 | + (const char *currpath, struct ext2fs_node *currroot, | ||
581 | + struct ext2fs_node **currfound, int *foundtype) | ||
582 | +{ | ||
583 | char fpath[strlen (currpath) + 1]; | ||
584 | char *name = fpath; | ||
585 | char *next; | ||
586 | int status; | ||
587 | int type = FILETYPE_DIRECTORY; | ||
588 | - ext2fs_node_t currnode = currroot; | ||
589 | - ext2fs_node_t oldnode = currroot; | ||
590 | + struct ext2fs_node *currnode = currroot; | ||
591 | + struct ext2fs_node *oldnode = currroot; | ||
592 | |||
593 | strncpy (fpath, currpath, strlen (currpath) + 1); | ||
594 | |||
595 | @@ -745,8 +613,9 @@ int ext2fs_find_file1 | ||
596 | |||
597 | |||
598 | int ext2fs_find_file | ||
599 | - (const char *path, | ||
600 | - ext2fs_node_t rootnode, ext2fs_node_t * foundnode, int expecttype) { | ||
601 | + (const char *path, struct ext2fs_node *rootnode, | ||
602 | + struct ext2fs_node **foundnode, int expecttype) | ||
603 | +{ | ||
604 | int status; | ||
605 | int foundtype = FILETYPE_DIRECTORY; | ||
606 | |||
607 | @@ -772,7 +641,7 @@ int ext2fs_find_file | ||
608 | |||
609 | |||
610 | int ext2fs_ls (const char *dirname) { | ||
611 | - ext2fs_node_t dirnode; | ||
612 | + struct ext2fs_node *dirnode; | ||
613 | int status; | ||
614 | |||
615 | if (ext2fs_root == NULL) { | ||
616 | @@ -792,7 +661,7 @@ int ext2fs_ls (const char *dirname) { | ||
617 | |||
618 | |||
619 | int ext2fs_open (const char *filename) { | ||
620 | - ext2fs_node_t fdiro = NULL; | ||
621 | + struct ext2fs_node *fdiro = NULL; | ||
622 | int status; | ||
623 | int len; | ||
624 | |||
625 | @@ -822,8 +691,8 @@ fail: | ||
626 | } | ||
627 | |||
628 | |||
629 | -int ext2fs_close (void | ||
630 | - ) { | ||
631 | +int ext2fs_close(void) | ||
632 | +{ | ||
633 | if ((ext2fs_file != NULL) && (ext2fs_root != NULL)) { | ||
634 | ext2fs_free_node (ext2fs_file, &ext2fs_root->diropen); | ||
635 | ext2fs_file = NULL; | ||
636 | diff --git a/fs/ext4/Makefile b/fs/ext4/Makefile | ||
637 | new file mode 100644 | ||
638 | index 0000000..7add4ab | ||
639 | --- /dev/null | ||
640 | +++ b/fs/ext4/Makefile | ||
641 | @@ -0,0 +1,51 @@ | ||
642 | +# | ||
643 | +# (C) Copyright 2006 | ||
644 | +# Wolfgang Denk, DENX Software Engineering, wd@denx.de. | ||
645 | +# | ||
646 | +# (C) Copyright 2003 | ||
647 | +# Pavel Bartusek, Sysgo Real-Time Solutions AG, pba@sysgo.de | ||
648 | +# | ||
649 | +# | ||
650 | +# See file CREDITS for list of people who contributed to this | ||
651 | +# project. | ||
652 | +# | ||
653 | +# This program is free software; you can redistribute it and/or | ||
654 | +# modify it under the terms of the GNU General Public License as | ||
655 | +# published by the Free Software Foundation; either version 2 of | ||
656 | +# the License, or (at your option) any later version. | ||
657 | +# | ||
658 | +# This program is distributed in the hope that it will be useful, | ||
659 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
660 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
661 | +# GNU General Public License for more details. | ||
662 | +# | ||
663 | +# You should have received a copy of the GNU General Public License | ||
664 | +# along with this program; if not, write to the Free Software | ||
665 | +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
666 | +# MA 02111-1307 USA | ||
667 | +# | ||
668 | + | ||
669 | +include $(TOPDIR)/config.mk | ||
670 | + | ||
671 | +LIB = $(obj)libext4fs.o | ||
672 | + | ||
673 | +AOBJS = | ||
674 | +COBJS-$(CONFIG_CMD_EXT4) := ext4fs.o ext4_common.o dev.o | ||
675 | + | ||
676 | +SRCS := $(AOBJS:.o=.S) $(COBJS-y:.o=.c) | ||
677 | +OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS-y)) | ||
678 | + | ||
679 | + | ||
680 | +all: $(LIB) $(AOBJS) | ||
681 | + | ||
682 | +$(LIB): $(obj).depend $(OBJS) | ||
683 | + $(call cmd_link_o_target, $(OBJS)) | ||
684 | + | ||
685 | +######################################################################### | ||
686 | + | ||
687 | +# defines $(obj).depend target | ||
688 | +include $(SRCTREE)/rules.mk | ||
689 | + | ||
690 | +sinclude $(obj).depend | ||
691 | + | ||
692 | +######################################################################### | ||
693 | diff --git a/fs/ext4/dev.c b/fs/ext4/dev.c | ||
694 | new file mode 100644 | ||
695 | index 0000000..2054be3 | ||
696 | --- /dev/null | ||
697 | +++ b/fs/ext4/dev.c | ||
698 | @@ -0,0 +1,145 @@ | ||
699 | +/* | ||
700 | + * (C) Copyright 2011 - 2012 Samsung Electronics | ||
701 | + * EXT4 filesystem implementation in Uboot by | ||
702 | + * Uma Shankar <uma.shankar@samsung.com> | ||
703 | + * Manjunatha C Achar <a.manjunatha@samsung.com> | ||
704 | + * | ||
705 | + * made from existing ext2/dev.c file of Uboot | ||
706 | + * (C) Copyright 2004 | ||
707 | + * esd gmbh <www.esd-electronics.com> | ||
708 | + * Reinhard Arlt <reinhard.arlt@esd-electronics.com> | ||
709 | + * | ||
710 | + * based on code of fs/reiserfs/dev.c by | ||
711 | + * | ||
712 | + * (C) Copyright 2003 - 2004 | ||
713 | + * Sysgo AG, <www.elinos.com>, Pavel Bartusek <pba@sysgo.com> | ||
714 | + * | ||
715 | + * This program is free software; you can redistribute it and/or modify | ||
716 | + * it under the terms of the GNU General Public License as published by | ||
717 | + * the Free Software Foundation; either version 2 of the License, or | ||
718 | + * (at your option) any later version. | ||
719 | + * | ||
720 | + * This program is distributed in the hope that it will be useful, | ||
721 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
722 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
723 | + * GNU General Public License for more details. | ||
724 | + * | ||
725 | + * You should have received a copy of the GNU General Public License | ||
726 | + * along with this program; if not, write to the Free Software | ||
727 | + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
728 | + * | ||
729 | + */ | ||
730 | + | ||
731 | +/* | ||
732 | + * Changelog: | ||
733 | + * 0.1 - Newly created file for ext4fs support. Taken from | ||
734 | + * fs/ext2/dev.c file in uboot. | ||
735 | + */ | ||
736 | + | ||
737 | +#include <common.h> | ||
738 | +#include <config.h> | ||
739 | +#include <ext_common.h> | ||
740 | + | ||
741 | +static block_dev_desc_t *ext4fs_block_dev_desc; | ||
742 | +static disk_partition_t part_info; | ||
743 | + | ||
744 | +int ext4fs_set_blk_dev(block_dev_desc_t *rbdd, int part) | ||
745 | +{ | ||
746 | + ext4fs_block_dev_desc = rbdd; | ||
747 | + | ||
748 | + if (part == 0) { | ||
749 | + /* disk doesn't use partition table */ | ||
750 | + part_info.start = 0; | ||
751 | + part_info.size = rbdd->lba; | ||
752 | + part_info.blksz = rbdd->blksz; | ||
753 | + } else { | ||
754 | + if (get_partition_info(ext4fs_block_dev_desc, | ||
755 | + part, &part_info)) | ||
756 | + return 0; | ||
757 | + } | ||
758 | + return part_info.size; | ||
759 | +} | ||
760 | + | ||
761 | +int ext4fs_devread(int sector, int byte_offset, int byte_len, char *buf) | ||
762 | +{ | ||
763 | + char sec_buf[SECTOR_SIZE]; | ||
764 | + unsigned block_len; | ||
765 | + | ||
766 | + /* Check partition boundaries */ | ||
767 | + if ((sector < 0) | ||
768 | + || ((sector + ((byte_offset + byte_len - 1) >> SECTOR_BITS)) >= | ||
769 | + part_info.size)) { | ||
770 | + printf("%s read outside partition %d\n", __func__, sector); | ||
771 | + return 0; | ||
772 | + } | ||
773 | + | ||
774 | + /* Get the read to the beginning of a partition */ | ||
775 | + sector += byte_offset >> SECTOR_BITS; | ||
776 | + byte_offset &= SECTOR_SIZE - 1; | ||
777 | + | ||
778 | + debug(" <%d, %d, %d>\n", sector, byte_offset, byte_len); | ||
779 | + | ||
780 | + if (ext4fs_block_dev_desc == NULL) { | ||
781 | + printf("** Invalid Block Device Descriptor (NULL)\n"); | ||
782 | + return 0; | ||
783 | + } | ||
784 | + | ||
785 | + if (byte_offset != 0) { | ||
786 | + /* read first part which isn't aligned with start of sector */ | ||
787 | + if (ext4fs_block_dev_desc-> | ||
788 | + block_read(ext4fs_block_dev_desc->dev, | ||
789 | + part_info.start + sector, 1, | ||
790 | + (unsigned long *) sec_buf) != 1) { | ||
791 | + printf(" ** ext2fs_devread() read error **\n"); | ||
792 | + return 0; | ||
793 | + } | ||
794 | + memcpy(buf, sec_buf + byte_offset, | ||
795 | + min(SECTOR_SIZE - byte_offset, byte_len)); | ||
796 | + buf += min(SECTOR_SIZE - byte_offset, byte_len); | ||
797 | + byte_len -= min(SECTOR_SIZE - byte_offset, byte_len); | ||
798 | + sector++; | ||
799 | + } | ||
800 | + | ||
801 | + if (byte_len == 0) | ||
802 | + return 1; | ||
803 | + | ||
804 | + /* read sector aligned part */ | ||
805 | + block_len = byte_len & ~(SECTOR_SIZE - 1); | ||
806 | + | ||
807 | + if (block_len == 0) { | ||
808 | + u8 p[SECTOR_SIZE]; | ||
809 | + | ||
810 | + block_len = SECTOR_SIZE; | ||
811 | + ext4fs_block_dev_desc->block_read(ext4fs_block_dev_desc->dev, | ||
812 | + part_info.start + sector, | ||
813 | + 1, (unsigned long *)p); | ||
814 | + memcpy(buf, p, byte_len); | ||
815 | + return 1; | ||
816 | + } | ||
817 | + | ||
818 | + if (ext4fs_block_dev_desc->block_read(ext4fs_block_dev_desc->dev, | ||
819 | + part_info.start + sector, | ||
820 | + block_len / SECTOR_SIZE, | ||
821 | + (unsigned long *) buf) != | ||
822 | + block_len / SECTOR_SIZE) { | ||
823 | + printf(" ** %s read error - block\n", __func__); | ||
824 | + return 0; | ||
825 | + } | ||
826 | + block_len = byte_len & ~(SECTOR_SIZE - 1); | ||
827 | + buf += block_len; | ||
828 | + byte_len -= block_len; | ||
829 | + sector += block_len / SECTOR_SIZE; | ||
830 | + | ||
831 | + if (byte_len != 0) { | ||
832 | + /* read rest of data which are not in whole sector */ | ||
833 | + if (ext4fs_block_dev_desc-> | ||
834 | + block_read(ext4fs_block_dev_desc->dev, | ||
835 | + part_info.start + sector, 1, | ||
836 | + (unsigned long *) sec_buf) != 1) { | ||
837 | + printf("* %s read error - last part\n", __func__); | ||
838 | + return 0; | ||
839 | + } | ||
840 | + memcpy(buf, sec_buf, byte_len); | ||
841 | + } | ||
842 | + return 1; | ||
843 | +} | ||
844 | diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c | ||
845 | new file mode 100644 | ||
846 | index 0000000..d9deefe | ||
847 | --- /dev/null | ||
848 | +++ b/fs/ext4/ext4_common.c | ||
849 | @@ -0,0 +1,875 @@ | ||
850 | +/* | ||
851 | + * (C) Copyright 2011 - 2012 Samsung Electronics | ||
852 | + * EXT4 filesystem implementation in Uboot by | ||
853 | + * Uma Shankar <uma.shankar@samsung.com> | ||
854 | + * Manjunatha C Achar <a.manjunatha@samsung.com> | ||
855 | + * | ||
856 | + * ext4ls and ext4load : Based on ext2 ls load support in Uboot. | ||
857 | + * | ||
858 | + * (C) Copyright 2004 | ||
859 | + * esd gmbh <www.esd-electronics.com> | ||
860 | + * Reinhard Arlt <reinhard.arlt@esd-electronics.com> | ||
861 | + * | ||
862 | + * based on code from grub2 fs/ext2.c and fs/fshelp.c by | ||
863 | + * GRUB -- GRand Unified Bootloader | ||
864 | + * Copyright (C) 2003, 2004 Free Software Foundation, Inc. | ||
865 | + * | ||
866 | + * This program is free software; you can redistribute it and/or modify | ||
867 | + * it under the terms of the GNU General Public License as published by | ||
868 | + * the Free Software Foundation; either version 2 of the License, or | ||
869 | + * (at your option) any later version. | ||
870 | + * | ||
871 | + * This program is distributed in the hope that it will be useful, | ||
872 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
873 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
874 | + * GNU General Public License for more details. | ||
875 | + * | ||
876 | + * You should have received a copy of the GNU General Public License | ||
877 | + * along with this program; if not, write to the Free Software | ||
878 | + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
879 | + */ | ||
880 | + | ||
881 | +#include <common.h> | ||
882 | +#include <ext_common.h> | ||
883 | +#include <ext4fs.h> | ||
884 | +#include <malloc.h> | ||
885 | +#include <stddef.h> | ||
886 | +#include <linux/stat.h> | ||
887 | +#include <linux/time.h> | ||
888 | +#include <asm/byteorder.h> | ||
889 | +#include "ext4_common.h" | ||
890 | + | ||
891 | +struct ext2_data *ext4fs_root; | ||
892 | +struct ext2fs_node *ext4fs_file; | ||
893 | +uint32_t *ext4fs_indir1_block; | ||
894 | +int ext4fs_indir1_size; | ||
895 | +int ext4fs_indir1_blkno = -1; | ||
896 | +uint32_t *ext4fs_indir2_block; | ||
897 | +int ext4fs_indir2_size; | ||
898 | +int ext4fs_indir2_blkno = -1; | ||
899 | + | ||
900 | +uint32_t *ext4fs_indir3_block; | ||
901 | +int ext4fs_indir3_size; | ||
902 | +int ext4fs_indir3_blkno = -1; | ||
903 | +struct ext2_inode *g_parent_inode; | ||
904 | +static int symlinknest; | ||
905 | + | ||
906 | +static struct ext4_extent_header *ext4fs_get_extent_block | ||
907 | + (struct ext2_data *data, char *buf, | ||
908 | + struct ext4_extent_header *ext_block, | ||
909 | + uint32_t fileblock, int log2_blksz) | ||
910 | +{ | ||
911 | + struct ext4_extent_idx *index; | ||
912 | + unsigned long long block; | ||
913 | + struct ext_filesystem *fs = get_fs(); | ||
914 | + int i; | ||
915 | + | ||
916 | + while (1) { | ||
917 | + index = (struct ext4_extent_idx *)(ext_block + 1); | ||
918 | + | ||
919 | + if (le32_to_cpu(ext_block->eh_magic) != EXT4_EXT_MAGIC) | ||
920 | + return 0; | ||
921 | + | ||
922 | + if (ext_block->eh_depth == 0) | ||
923 | + return ext_block; | ||
924 | + i = -1; | ||
925 | + do { | ||
926 | + i++; | ||
927 | + if (i >= le32_to_cpu(ext_block->eh_entries)) | ||
928 | + break; | ||
929 | + } while (fileblock > le32_to_cpu(index[i].ei_block)); | ||
930 | + | ||
931 | + if (--i < 0) | ||
932 | + return 0; | ||
933 | + | ||
934 | + block = le32_to_cpu(index[i].ei_leaf_hi); | ||
935 | + block = (block << 32) + le32_to_cpu(index[i].ei_leaf_lo); | ||
936 | + | ||
937 | + if (ext4fs_devread(block << log2_blksz, 0, fs->blksz, buf)) | ||
938 | + ext_block = (struct ext4_extent_header *)buf; | ||
939 | + else | ||
940 | + return 0; | ||
941 | + } | ||
942 | +} | ||
943 | + | ||
944 | +static int ext4fs_blockgroup | ||
945 | + (struct ext2_data *data, int group, struct ext2_block_group *blkgrp) | ||
946 | +{ | ||
947 | + long int blkno; | ||
948 | + unsigned int blkoff, desc_per_blk; | ||
949 | + | ||
950 | + desc_per_blk = EXT2_BLOCK_SIZE(data) / sizeof(struct ext2_block_group); | ||
951 | + | ||
952 | + blkno = __le32_to_cpu(data->sblock.first_data_block) + 1 + | ||
953 | + group / desc_per_blk; | ||
954 | + blkoff = (group % desc_per_blk) * sizeof(struct ext2_block_group); | ||
955 | + | ||
956 | + debug("ext4fs read %d group descriptor (blkno %ld blkoff %u)\n", | ||
957 | + group, blkno, blkoff); | ||
958 | + | ||
959 | + return ext4fs_devread(blkno << LOG2_EXT2_BLOCK_SIZE(data), | ||
960 | + blkoff, sizeof(struct ext2_block_group), | ||
961 | + (char *)blkgrp); | ||
962 | +} | ||
963 | + | ||
964 | +int ext4fs_read_inode(struct ext2_data *data, int ino, struct ext2_inode *inode) | ||
965 | +{ | ||
966 | + struct ext2_block_group blkgrp; | ||
967 | + struct ext2_sblock *sblock = &data->sblock; | ||
968 | + struct ext_filesystem *fs = get_fs(); | ||
969 | + int inodes_per_block, status; | ||
970 | + long int blkno; | ||
971 | + unsigned int blkoff; | ||
972 | + | ||
973 | + /* It is easier to calculate if the first inode is 0. */ | ||
974 | + ino--; | ||
975 | + status = ext4fs_blockgroup(data, ino / __le32_to_cpu | ||
976 | + (sblock->inodes_per_group), &blkgrp); | ||
977 | + if (status == 0) | ||
978 | + return 0; | ||
979 | + | ||
980 | + inodes_per_block = EXT2_BLOCK_SIZE(data) / fs->inodesz; | ||
981 | + blkno = __le32_to_cpu(blkgrp.inode_table_id) + | ||
982 | + (ino % __le32_to_cpu(sblock->inodes_per_group)) / inodes_per_block; | ||
983 | + blkoff = (ino % inodes_per_block) * fs->inodesz; | ||
984 | + /* Read the inode. */ | ||
985 | + status = ext4fs_devread(blkno << LOG2_EXT2_BLOCK_SIZE(data), blkoff, | ||
986 | + sizeof(struct ext2_inode), (char *)inode); | ||
987 | + if (status == 0) | ||
988 | + return 0; | ||
989 | + | ||
990 | + return 1; | ||
991 | +} | ||
992 | + | ||
993 | +long int read_allocated_block(struct ext2_inode *inode, int fileblock) | ||
994 | +{ | ||
995 | + long int blknr; | ||
996 | + int blksz; | ||
997 | + int log2_blksz; | ||
998 | + int status; | ||
999 | + long int rblock; | ||
1000 | + long int perblock_parent; | ||
1001 | + long int perblock_child; | ||
1002 | + unsigned long long start; | ||
1003 | + /* get the blocksize of the filesystem */ | ||
1004 | + blksz = EXT2_BLOCK_SIZE(ext4fs_root); | ||
1005 | + log2_blksz = LOG2_EXT2_BLOCK_SIZE(ext4fs_root); | ||
1006 | + if (le32_to_cpu(inode->flags) & EXT4_EXTENTS_FL) { | ||
1007 | + char *buf = zalloc(blksz); | ||
1008 | + if (!buf) | ||
1009 | + return -ENOMEM; | ||
1010 | + struct ext4_extent_header *ext_block; | ||
1011 | + struct ext4_extent *extent; | ||
1012 | + int i = -1; | ||
1013 | + ext_block = ext4fs_get_extent_block(ext4fs_root, buf, | ||
1014 | + (struct ext4_extent_header | ||
1015 | + *)inode->b. | ||
1016 | + blocks.dir_blocks, | ||
1017 | + fileblock, log2_blksz); | ||
1018 | + if (!ext_block) { | ||
1019 | + printf("invalid extent block\n"); | ||
1020 | + free(buf); | ||
1021 | + return -EINVAL; | ||
1022 | + } | ||
1023 | + | ||
1024 | + extent = (struct ext4_extent *)(ext_block + 1); | ||
1025 | + | ||
1026 | + do { | ||
1027 | + i++; | ||
1028 | + if (i >= le32_to_cpu(ext_block->eh_entries)) | ||
1029 | + break; | ||
1030 | + } while (fileblock >= le32_to_cpu(extent[i].ee_block)); | ||
1031 | + if (--i >= 0) { | ||
1032 | + fileblock -= le32_to_cpu(extent[i].ee_block); | ||
1033 | + if (fileblock >= le32_to_cpu(extent[i].ee_len)) { | ||
1034 | + free(buf); | ||
1035 | + return 0; | ||
1036 | + } | ||
1037 | + | ||
1038 | + start = le32_to_cpu(extent[i].ee_start_hi); | ||
1039 | + start = (start << 32) + | ||
1040 | + le32_to_cpu(extent[i].ee_start_lo); | ||
1041 | + free(buf); | ||
1042 | + return fileblock + start; | ||
1043 | + } | ||
1044 | + | ||
1045 | + printf("Extent Error\n"); | ||
1046 | + free(buf); | ||
1047 | + return -1; | ||
1048 | + } | ||
1049 | + | ||
1050 | + /* Direct blocks. */ | ||
1051 | + if (fileblock < INDIRECT_BLOCKS) | ||
1052 | + blknr = __le32_to_cpu(inode->b.blocks.dir_blocks[fileblock]); | ||
1053 | + | ||
1054 | + /* Indirect. */ | ||
1055 | + else if (fileblock < (INDIRECT_BLOCKS + (blksz / 4))) { | ||
1056 | + if (ext4fs_indir1_block == NULL) { | ||
1057 | + ext4fs_indir1_block = zalloc(blksz); | ||
1058 | + if (ext4fs_indir1_block == NULL) { | ||
1059 | + printf("** SI ext2fs read block (indir 1)" | ||
1060 | + "malloc failed. **\n"); | ||
1061 | + return -1; | ||
1062 | + } | ||
1063 | + ext4fs_indir1_size = blksz; | ||
1064 | + ext4fs_indir1_blkno = -1; | ||
1065 | + } | ||
1066 | + if (blksz != ext4fs_indir1_size) { | ||
1067 | + free(ext4fs_indir1_block); | ||
1068 | + ext4fs_indir1_block = NULL; | ||
1069 | + ext4fs_indir1_size = 0; | ||
1070 | + ext4fs_indir1_blkno = -1; | ||
1071 | + ext4fs_indir1_block = zalloc(blksz); | ||
1072 | + if (ext4fs_indir1_block == NULL) { | ||
1073 | + printf("** SI ext2fs read block (indir 1):" | ||
1074 | + "malloc failed. **\n"); | ||
1075 | + return -1; | ||
1076 | + } | ||
1077 | + ext4fs_indir1_size = blksz; | ||
1078 | + } | ||
1079 | + if ((__le32_to_cpu(inode->b.blocks.indir_block) << | ||
1080 | + log2_blksz) != ext4fs_indir1_blkno) { | ||
1081 | + status = | ||
1082 | + ext4fs_devread(__le32_to_cpu | ||
1083 | + (inode->b.blocks. | ||
1084 | + indir_block) << log2_blksz, 0, | ||
1085 | + blksz, (char *)ext4fs_indir1_block); | ||
1086 | + if (status == 0) { | ||
1087 | + printf("** SI ext2fs read block (indir 1)" | ||
1088 | + "failed. **\n"); | ||
1089 | + return 0; | ||
1090 | + } | ||
1091 | + ext4fs_indir1_blkno = | ||
1092 | + __le32_to_cpu(inode->b.blocks. | ||
1093 | + indir_block) << log2_blksz; | ||
1094 | + } | ||
1095 | + blknr = __le32_to_cpu(ext4fs_indir1_block | ||
1096 | + [fileblock - INDIRECT_BLOCKS]); | ||
1097 | + } | ||
1098 | + /* Double indirect. */ | ||
1099 | + else if (fileblock < (INDIRECT_BLOCKS + (blksz / 4 * | ||
1100 | + (blksz / 4 + 1)))) { | ||
1101 | + | ||
1102 | + long int perblock = blksz / 4; | ||
1103 | + long int rblock = fileblock - (INDIRECT_BLOCKS + blksz / 4); | ||
1104 | + | ||
1105 | + if (ext4fs_indir1_block == NULL) { | ||
1106 | + ext4fs_indir1_block = zalloc(blksz); | ||
1107 | + if (ext4fs_indir1_block == NULL) { | ||
1108 | + printf("** DI ext2fs read block (indir 2 1)" | ||
1109 | + "malloc failed. **\n"); | ||
1110 | + return -1; | ||
1111 | + } | ||
1112 | + ext4fs_indir1_size = blksz; | ||
1113 | + ext4fs_indir1_blkno = -1; | ||
1114 | + } | ||
1115 | + if (blksz != ext4fs_indir1_size) { | ||
1116 | + free(ext4fs_indir1_block); | ||
1117 | + ext4fs_indir1_block = NULL; | ||
1118 | + ext4fs_indir1_size = 0; | ||
1119 | + ext4fs_indir1_blkno = -1; | ||
1120 | + ext4fs_indir1_block = zalloc(blksz); | ||
1121 | + if (ext4fs_indir1_block == NULL) { | ||
1122 | + printf("** DI ext2fs read block (indir 2 1)" | ||
1123 | + "malloc failed. **\n"); | ||
1124 | + return -1; | ||
1125 | + } | ||
1126 | + ext4fs_indir1_size = blksz; | ||
1127 | + } | ||
1128 | + if ((__le32_to_cpu(inode->b.blocks.double_indir_block) << | ||
1129 | + log2_blksz) != ext4fs_indir1_blkno) { | ||
1130 | + status = | ||
1131 | + ext4fs_devread(__le32_to_cpu | ||
1132 | + (inode->b.blocks. | ||
1133 | + double_indir_block) << log2_blksz, | ||
1134 | + 0, blksz, | ||
1135 | + (char *)ext4fs_indir1_block); | ||
1136 | + if (status == 0) { | ||
1137 | + printf("** DI ext2fs read block (indir 2 1)" | ||
1138 | + "failed. **\n"); | ||
1139 | + return -1; | ||
1140 | + } | ||
1141 | + ext4fs_indir1_blkno = | ||
1142 | + __le32_to_cpu(inode->b.blocks.double_indir_block) << | ||
1143 | + log2_blksz; | ||
1144 | + } | ||
1145 | + | ||
1146 | + if (ext4fs_indir2_block == NULL) { | ||
1147 | + ext4fs_indir2_block = zalloc(blksz); | ||
1148 | + if (ext4fs_indir2_block == NULL) { | ||
1149 | + printf("** DI ext2fs read block (indir 2 2)" | ||
1150 | + "malloc failed. **\n"); | ||
1151 | + return -1; | ||
1152 | + } | ||
1153 | + ext4fs_indir2_size = blksz; | ||
1154 | + ext4fs_indir2_blkno = -1; | ||
1155 | + } | ||
1156 | + if (blksz != ext4fs_indir2_size) { | ||
1157 | + free(ext4fs_indir2_block); | ||
1158 | + ext4fs_indir2_block = NULL; | ||
1159 | + ext4fs_indir2_size = 0; | ||
1160 | + ext4fs_indir2_blkno = -1; | ||
1161 | + ext4fs_indir2_block = zalloc(blksz); | ||
1162 | + if (ext4fs_indir2_block == NULL) { | ||
1163 | + printf("** DI ext2fs read block (indir 2 2)" | ||
1164 | + "malloc failed. **\n"); | ||
1165 | + return -1; | ||
1166 | + } | ||
1167 | + ext4fs_indir2_size = blksz; | ||
1168 | + } | ||
1169 | + if ((__le32_to_cpu(ext4fs_indir1_block[rblock / perblock]) << | ||
1170 | + log2_blksz) != ext4fs_indir2_blkno) { | ||
1171 | + status = ext4fs_devread(__le32_to_cpu | ||
1172 | + (ext4fs_indir1_block | ||
1173 | + [rblock / | ||
1174 | + perblock]) << log2_blksz, 0, | ||
1175 | + blksz, | ||
1176 | + (char *)ext4fs_indir2_block); | ||
1177 | + if (status == 0) { | ||
1178 | + printf("** DI ext2fs read block (indir 2 2)" | ||
1179 | + "failed. **\n"); | ||
1180 | + return -1; | ||
1181 | + } | ||
1182 | + ext4fs_indir2_blkno = | ||
1183 | + __le32_to_cpu(ext4fs_indir1_block[rblock | ||
1184 | + / | ||
1185 | + perblock]) << | ||
1186 | + log2_blksz; | ||
1187 | + } | ||
1188 | + blknr = __le32_to_cpu(ext4fs_indir2_block[rblock % perblock]); | ||
1189 | + } | ||
1190 | + /* Tripple indirect. */ | ||
1191 | + else { | ||
1192 | + rblock = fileblock - (INDIRECT_BLOCKS + blksz / 4 + | ||
1193 | + (blksz / 4 * blksz / 4)); | ||
1194 | + perblock_child = blksz / 4; | ||
1195 | + perblock_parent = ((blksz / 4) * (blksz / 4)); | ||
1196 | + | ||
1197 | + if (ext4fs_indir1_block == NULL) { | ||
1198 | + ext4fs_indir1_block = zalloc(blksz); | ||
1199 | + if (ext4fs_indir1_block == NULL) { | ||
1200 | + printf("** TI ext2fs read block (indir 2 1)" | ||
1201 | + "malloc failed. **\n"); | ||
1202 | + return -1; | ||
1203 | + } | ||
1204 | + ext4fs_indir1_size = blksz; | ||
1205 | + ext4fs_indir1_blkno = -1; | ||
1206 | + } | ||
1207 | + if (blksz != ext4fs_indir1_size) { | ||
1208 | + free(ext4fs_indir1_block); | ||
1209 | + ext4fs_indir1_block = NULL; | ||
1210 | + ext4fs_indir1_size = 0; | ||
1211 | + ext4fs_indir1_blkno = -1; | ||
1212 | + ext4fs_indir1_block = zalloc(blksz); | ||
1213 | + if (ext4fs_indir1_block == NULL) { | ||
1214 | + printf("** TI ext2fs read block (indir 2 1)" | ||
1215 | + "malloc failed. **\n"); | ||
1216 | + return -1; | ||
1217 | + } | ||
1218 | + ext4fs_indir1_size = blksz; | ||
1219 | + } | ||
1220 | + if ((__le32_to_cpu(inode->b.blocks.triple_indir_block) << | ||
1221 | + log2_blksz) != ext4fs_indir1_blkno) { | ||
1222 | + status = ext4fs_devread | ||
1223 | + (__le32_to_cpu(inode->b.blocks.triple_indir_block) | ||
1224 | + << log2_blksz, 0, blksz, | ||
1225 | + (char *)ext4fs_indir1_block); | ||
1226 | + if (status == 0) { | ||
1227 | + printf("** TI ext2fs read block (indir 2 1)" | ||
1228 | + "failed. **\n"); | ||
1229 | + return -1; | ||
1230 | + } | ||
1231 | + ext4fs_indir1_blkno = | ||
1232 | + __le32_to_cpu(inode->b.blocks.triple_indir_block) << | ||
1233 | + log2_blksz; | ||
1234 | + } | ||
1235 | + | ||
1236 | + if (ext4fs_indir2_block == NULL) { | ||
1237 | + ext4fs_indir2_block = zalloc(blksz); | ||
1238 | + if (ext4fs_indir2_block == NULL) { | ||
1239 | + printf("** TI ext2fs read block (indir 2 2)" | ||
1240 | + "malloc failed. **\n"); | ||
1241 | + return -1; | ||
1242 | + } | ||
1243 | + ext4fs_indir2_size = blksz; | ||
1244 | + ext4fs_indir2_blkno = -1; | ||
1245 | + } | ||
1246 | + if (blksz != ext4fs_indir2_size) { | ||
1247 | + free(ext4fs_indir2_block); | ||
1248 | + ext4fs_indir2_block = NULL; | ||
1249 | + ext4fs_indir2_size = 0; | ||
1250 | + ext4fs_indir2_blkno = -1; | ||
1251 | + ext4fs_indir2_block = zalloc(blksz); | ||
1252 | + if (ext4fs_indir2_block == NULL) { | ||
1253 | + printf("** TI ext2fs read block (indir 2 2)" | ||
1254 | + "malloc failed. **\n"); | ||
1255 | + return -1; | ||
1256 | + } | ||
1257 | + ext4fs_indir2_size = blksz; | ||
1258 | + } | ||
1259 | + if ((__le32_to_cpu(ext4fs_indir1_block[rblock / | ||
1260 | + perblock_parent]) << | ||
1261 | + log2_blksz) | ||
1262 | + != ext4fs_indir2_blkno) { | ||
1263 | + status = ext4fs_devread(__le32_to_cpu | ||
1264 | + (ext4fs_indir1_block | ||
1265 | + [rblock / | ||
1266 | + perblock_parent]) << | ||
1267 | + log2_blksz, 0, blksz, | ||
1268 | + (char *)ext4fs_indir2_block); | ||
1269 | + if (status == 0) { | ||
1270 | + printf("** TI ext2fs read block (indir 2 2)" | ||
1271 | + "failed. **\n"); | ||
1272 | + return -1; | ||
1273 | + } | ||
1274 | + ext4fs_indir2_blkno = | ||
1275 | + __le32_to_cpu(ext4fs_indir1_block[rblock / | ||
1276 | + perblock_parent]) | ||
1277 | + << log2_blksz; | ||
1278 | + } | ||
1279 | + | ||
1280 | + if (ext4fs_indir3_block == NULL) { | ||
1281 | + ext4fs_indir3_block = zalloc(blksz); | ||
1282 | + if (ext4fs_indir3_block == NULL) { | ||
1283 | + printf("** TI ext2fs read block (indir 2 2)" | ||
1284 | + "malloc failed. **\n"); | ||
1285 | + return -1; | ||
1286 | + } | ||
1287 | + ext4fs_indir3_size = blksz; | ||
1288 | + ext4fs_indir3_blkno = -1; | ||
1289 | + } | ||
1290 | + if (blksz != ext4fs_indir3_size) { | ||
1291 | + free(ext4fs_indir3_block); | ||
1292 | + ext4fs_indir3_block = NULL; | ||
1293 | + ext4fs_indir3_size = 0; | ||
1294 | + ext4fs_indir3_blkno = -1; | ||
1295 | + ext4fs_indir3_block = zalloc(blksz); | ||
1296 | + if (ext4fs_indir3_block == NULL) { | ||
1297 | + printf("** TI ext2fs read block (indir 2 2)" | ||
1298 | + "malloc failed. **\n"); | ||
1299 | + return -1; | ||
1300 | + } | ||
1301 | + ext4fs_indir3_size = blksz; | ||
1302 | + } | ||
1303 | + if ((__le32_to_cpu(ext4fs_indir2_block[rblock | ||
1304 | + / | ||
1305 | + perblock_child]) << | ||
1306 | + log2_blksz) != ext4fs_indir3_blkno) { | ||
1307 | + status = | ||
1308 | + ext4fs_devread(__le32_to_cpu | ||
1309 | + (ext4fs_indir2_block | ||
1310 | + [(rblock / perblock_child) | ||
1311 | + % (blksz / 4)]) << log2_blksz, 0, | ||
1312 | + blksz, (char *)ext4fs_indir3_block); | ||
1313 | + if (status == 0) { | ||
1314 | + printf("** TI ext2fs read block (indir 2 2)" | ||
1315 | + "failed. **\n"); | ||
1316 | + return -1; | ||
1317 | + } | ||
1318 | + ext4fs_indir3_blkno = | ||
1319 | + __le32_to_cpu(ext4fs_indir2_block[(rblock / | ||
1320 | + perblock_child) % | ||
1321 | + (blksz / | ||
1322 | + 4)]) << | ||
1323 | + log2_blksz; | ||
1324 | + } | ||
1325 | + | ||
1326 | + blknr = __le32_to_cpu(ext4fs_indir3_block | ||
1327 | + [rblock % perblock_child]); | ||
1328 | + } | ||
1329 | + debug("ext4fs_read_block %ld\n", blknr); | ||
1330 | + | ||
1331 | + return blknr; | ||
1332 | +} | ||
1333 | + | ||
1334 | +void ext4fs_close(void) | ||
1335 | +{ | ||
1336 | + if ((ext4fs_file != NULL) && (ext4fs_root != NULL)) { | ||
1337 | + ext4fs_free_node(ext4fs_file, &ext4fs_root->diropen); | ||
1338 | + ext4fs_file = NULL; | ||
1339 | + } | ||
1340 | + if (ext4fs_root != NULL) { | ||
1341 | + free(ext4fs_root); | ||
1342 | + ext4fs_root = NULL; | ||
1343 | + } | ||
1344 | + if (ext4fs_indir1_block != NULL) { | ||
1345 | + free(ext4fs_indir1_block); | ||
1346 | + ext4fs_indir1_block = NULL; | ||
1347 | + ext4fs_indir1_size = 0; | ||
1348 | + ext4fs_indir1_blkno = -1; | ||
1349 | + } | ||
1350 | + if (ext4fs_indir2_block != NULL) { | ||
1351 | + free(ext4fs_indir2_block); | ||
1352 | + ext4fs_indir2_block = NULL; | ||
1353 | + ext4fs_indir2_size = 0; | ||
1354 | + ext4fs_indir2_blkno = -1; | ||
1355 | + } | ||
1356 | + if (ext4fs_indir3_block != NULL) { | ||
1357 | + free(ext4fs_indir3_block); | ||
1358 | + ext4fs_indir3_block = NULL; | ||
1359 | + ext4fs_indir3_size = 0; | ||
1360 | + ext4fs_indir3_blkno = -1; | ||
1361 | + } | ||
1362 | +} | ||
1363 | + | ||
1364 | +int ext4fs_iterate_dir(struct ext2fs_node *dir, char *name, | ||
1365 | + struct ext2fs_node **fnode, int *ftype) | ||
1366 | +{ | ||
1367 | + unsigned int fpos = 0; | ||
1368 | + int status; | ||
1369 | + struct ext2fs_node *diro = (struct ext2fs_node *)dir; | ||
1370 | + | ||
1371 | +#ifdef DEBUG | ||
1372 | + if (name != NULL) | ||
1373 | + printf("Iterate dir %s\n", name); | ||
1374 | +#endif /* of DEBUG */ | ||
1375 | + if (!diro->inode_read) { | ||
1376 | + status = ext4fs_read_inode(diro->data, diro->ino, &diro->inode); | ||
1377 | + if (status == 0) | ||
1378 | + return 0; | ||
1379 | + } | ||
1380 | + /* Search the file. */ | ||
1381 | + while (fpos < __le32_to_cpu(diro->inode.size)) { | ||
1382 | + struct ext2_dirent dirent; | ||
1383 | + | ||
1384 | + status = ext4fs_read_file(diro, fpos, | ||
1385 | + sizeof(struct ext2_dirent), | ||
1386 | + (char *)&dirent); | ||
1387 | + if (status < 1) | ||
1388 | + return 0; | ||
1389 | + | ||
1390 | + if (dirent.namelen != 0) { | ||
1391 | + char filename[dirent.namelen + 1]; | ||
1392 | + struct ext2fs_node *fdiro; | ||
1393 | + int type = FILETYPE_UNKNOWN; | ||
1394 | + | ||
1395 | + status = ext4fs_read_file(diro, | ||
1396 | + fpos + | ||
1397 | + sizeof(struct ext2_dirent), | ||
1398 | + dirent.namelen, filename); | ||
1399 | + if (status < 1) | ||
1400 | + return 0; | ||
1401 | + | ||
1402 | + fdiro = zalloc(sizeof(struct ext2fs_node)); | ||
1403 | + if (!fdiro) | ||
1404 | + return 0; | ||
1405 | + | ||
1406 | + fdiro->data = diro->data; | ||
1407 | + fdiro->ino = __le32_to_cpu(dirent.inode); | ||
1408 | + | ||
1409 | + filename[dirent.namelen] = '\0'; | ||
1410 | + | ||
1411 | + if (dirent.filetype != FILETYPE_UNKNOWN) { | ||
1412 | + fdiro->inode_read = 0; | ||
1413 | + | ||
1414 | + if (dirent.filetype == FILETYPE_DIRECTORY) | ||
1415 | + type = FILETYPE_DIRECTORY; | ||
1416 | + else if (dirent.filetype == FILETYPE_SYMLINK) | ||
1417 | + type = FILETYPE_SYMLINK; | ||
1418 | + else if (dirent.filetype == FILETYPE_REG) | ||
1419 | + type = FILETYPE_REG; | ||
1420 | + } else { | ||
1421 | + status = ext4fs_read_inode(diro->data, | ||
1422 | + __le32_to_cpu | ||
1423 | + (dirent.inode), | ||
1424 | + &fdiro->inode); | ||
1425 | + if (status == 0) { | ||
1426 | + free(fdiro); | ||
1427 | + return 0; | ||
1428 | + } | ||
1429 | + fdiro->inode_read = 1; | ||
1430 | + | ||
1431 | + if ((__le16_to_cpu(fdiro->inode.mode) & | ||
1432 | + FILETYPE_INO_MASK) == | ||
1433 | + FILETYPE_INO_DIRECTORY) { | ||
1434 | + type = FILETYPE_DIRECTORY; | ||
1435 | + } else if ((__le16_to_cpu(fdiro->inode.mode) | ||
1436 | + & FILETYPE_INO_MASK) == | ||
1437 | + FILETYPE_INO_SYMLINK) { | ||
1438 | + type = FILETYPE_SYMLINK; | ||
1439 | + } else if ((__le16_to_cpu(fdiro->inode.mode) | ||
1440 | + & FILETYPE_INO_MASK) == | ||
1441 | + FILETYPE_INO_REG) { | ||
1442 | + type = FILETYPE_REG; | ||
1443 | + } | ||
1444 | + } | ||
1445 | +#ifdef DEBUG | ||
1446 | + printf("iterate >%s<\n", filename); | ||
1447 | +#endif /* of DEBUG */ | ||
1448 | + if ((name != NULL) && (fnode != NULL) | ||
1449 | + && (ftype != NULL)) { | ||
1450 | + if (strcmp(filename, name) == 0) { | ||
1451 | + *ftype = type; | ||
1452 | + *fnode = fdiro; | ||
1453 | + return 1; | ||
1454 | + } | ||
1455 | + } else { | ||
1456 | + if (fdiro->inode_read == 0) { | ||
1457 | + status = ext4fs_read_inode(diro->data, | ||
1458 | + __le32_to_cpu( | ||
1459 | + dirent.inode), | ||
1460 | + &fdiro->inode); | ||
1461 | + if (status == 0) { | ||
1462 | + free(fdiro); | ||
1463 | + return 0; | ||
1464 | + } | ||
1465 | + fdiro->inode_read = 1; | ||
1466 | + } | ||
1467 | + switch (type) { | ||
1468 | + case FILETYPE_DIRECTORY: | ||
1469 | + printf("<DIR> "); | ||
1470 | + break; | ||
1471 | + case FILETYPE_SYMLINK: | ||
1472 | + printf("<SYM> "); | ||
1473 | + break; | ||
1474 | + case FILETYPE_REG: | ||
1475 | + printf(" "); | ||
1476 | + break; | ||
1477 | + default: | ||
1478 | + printf("< ? > "); | ||
1479 | + break; | ||
1480 | + } | ||
1481 | + printf("%10d %s\n", | ||
1482 | + __le32_to_cpu(fdiro->inode.size), | ||
1483 | + filename); | ||
1484 | + } | ||
1485 | + free(fdiro); | ||
1486 | + } | ||
1487 | + fpos += __le16_to_cpu(dirent.direntlen); | ||
1488 | + } | ||
1489 | + return 0; | ||
1490 | +} | ||
1491 | + | ||
1492 | +static char *ext4fs_read_symlink(struct ext2fs_node *node) | ||
1493 | +{ | ||
1494 | + char *symlink; | ||
1495 | + struct ext2fs_node *diro = node; | ||
1496 | + int status; | ||
1497 | + | ||
1498 | + if (!diro->inode_read) { | ||
1499 | + status = ext4fs_read_inode(diro->data, diro->ino, &diro->inode); | ||
1500 | + if (status == 0) | ||
1501 | + return 0; | ||
1502 | + } | ||
1503 | + symlink = zalloc(__le32_to_cpu(diro->inode.size) + 1); | ||
1504 | + if (!symlink) | ||
1505 | + return 0; | ||
1506 | + | ||
1507 | + if (__le32_to_cpu(diro->inode.size) <= 60) { | ||
1508 | + strncpy(symlink, diro->inode.b.symlink, | ||
1509 | + __le32_to_cpu(diro->inode.size)); | ||
1510 | + } else { | ||
1511 | + status = ext4fs_read_file(diro, 0, | ||
1512 | + __le32_to_cpu(diro->inode.size), | ||
1513 | + symlink); | ||
1514 | + if (status == 0) { | ||
1515 | + free(symlink); | ||
1516 | + return 0; | ||
1517 | + } | ||
1518 | + } | ||
1519 | + symlink[__le32_to_cpu(diro->inode.size)] = '\0'; | ||
1520 | + return symlink; | ||
1521 | +} | ||
1522 | + | ||
1523 | +static int ext4fs_find_file1(const char *currpath, | ||
1524 | + struct ext2fs_node *currroot, | ||
1525 | + struct ext2fs_node **currfound, int *foundtype) | ||
1526 | +{ | ||
1527 | + char fpath[strlen(currpath) + 1]; | ||
1528 | + char *name = fpath; | ||
1529 | + char *next; | ||
1530 | + int status; | ||
1531 | + int type = FILETYPE_DIRECTORY; | ||
1532 | + struct ext2fs_node *currnode = currroot; | ||
1533 | + struct ext2fs_node *oldnode = currroot; | ||
1534 | + | ||
1535 | + strncpy(fpath, currpath, strlen(currpath) + 1); | ||
1536 | + | ||
1537 | + /* Remove all leading slashes. */ | ||
1538 | + while (*name == '/') | ||
1539 | + name++; | ||
1540 | + | ||
1541 | + if (!*name) { | ||
1542 | + *currfound = currnode; | ||
1543 | + return 1; | ||
1544 | + } | ||
1545 | + | ||
1546 | + for (;;) { | ||
1547 | + int found; | ||
1548 | + | ||
1549 | + /* Extract the actual part from the pathname. */ | ||
1550 | + next = strchr(name, '/'); | ||
1551 | + if (next) { | ||
1552 | + /* Remove all leading slashes. */ | ||
1553 | + while (*next == '/') | ||
1554 | + *(next++) = '\0'; | ||
1555 | + } | ||
1556 | + | ||
1557 | + if (type != FILETYPE_DIRECTORY) { | ||
1558 | + ext4fs_free_node(currnode, currroot); | ||
1559 | + return 0; | ||
1560 | + } | ||
1561 | + | ||
1562 | + oldnode = currnode; | ||
1563 | + | ||
1564 | + /* Iterate over the directory. */ | ||
1565 | + found = ext4fs_iterate_dir(currnode, name, &currnode, &type); | ||
1566 | + if (found == 0) | ||
1567 | + return 0; | ||
1568 | + | ||
1569 | + if (found == -1) | ||
1570 | + break; | ||
1571 | + | ||
1572 | + /* Read in the symlink and follow it. */ | ||
1573 | + if (type == FILETYPE_SYMLINK) { | ||
1574 | + char *symlink; | ||
1575 | + | ||
1576 | + /* Test if the symlink does not loop. */ | ||
1577 | + if (++symlinknest == 8) { | ||
1578 | + ext4fs_free_node(currnode, currroot); | ||
1579 | + ext4fs_free_node(oldnode, currroot); | ||
1580 | + return 0; | ||
1581 | + } | ||
1582 | + | ||
1583 | + symlink = ext4fs_read_symlink(currnode); | ||
1584 | + ext4fs_free_node(currnode, currroot); | ||
1585 | + | ||
1586 | + if (!symlink) { | ||
1587 | + ext4fs_free_node(oldnode, currroot); | ||
1588 | + return 0; | ||
1589 | + } | ||
1590 | + | ||
1591 | + debug("Got symlink >%s<\n", symlink); | ||
1592 | + | ||
1593 | + if (symlink[0] == '/') { | ||
1594 | + ext4fs_free_node(oldnode, currroot); | ||
1595 | + oldnode = &ext4fs_root->diropen; | ||
1596 | + } | ||
1597 | + | ||
1598 | + /* Lookup the node the symlink points to. */ | ||
1599 | + status = ext4fs_find_file1(symlink, oldnode, | ||
1600 | + &currnode, &type); | ||
1601 | + | ||
1602 | + free(symlink); | ||
1603 | + | ||
1604 | + if (status == 0) { | ||
1605 | + ext4fs_free_node(oldnode, currroot); | ||
1606 | + return 0; | ||
1607 | + } | ||
1608 | + } | ||
1609 | + | ||
1610 | + ext4fs_free_node(oldnode, currroot); | ||
1611 | + | ||
1612 | + /* Found the node! */ | ||
1613 | + if (!next || *next == '\0') { | ||
1614 | + *currfound = currnode; | ||
1615 | + *foundtype = type; | ||
1616 | + return 1; | ||
1617 | + } | ||
1618 | + name = next; | ||
1619 | + } | ||
1620 | + return -1; | ||
1621 | +} | ||
1622 | + | ||
1623 | +int ext4fs_find_file(const char *path, struct ext2fs_node *rootnode, | ||
1624 | + struct ext2fs_node **foundnode, int expecttype) | ||
1625 | +{ | ||
1626 | + int status; | ||
1627 | + int foundtype = FILETYPE_DIRECTORY; | ||
1628 | + | ||
1629 | + symlinknest = 0; | ||
1630 | + if (!path) | ||
1631 | + return 0; | ||
1632 | + | ||
1633 | + status = ext4fs_find_file1(path, rootnode, foundnode, &foundtype); | ||
1634 | + if (status == 0) | ||
1635 | + return 0; | ||
1636 | + | ||
1637 | + /* Check if the node that was found was of the expected type. */ | ||
1638 | + if ((expecttype == FILETYPE_REG) && (foundtype != expecttype)) | ||
1639 | + return 0; | ||
1640 | + else if ((expecttype == FILETYPE_DIRECTORY) | ||
1641 | + && (foundtype != expecttype)) | ||
1642 | + return 0; | ||
1643 | + | ||
1644 | + return 1; | ||
1645 | +} | ||
1646 | + | ||
1647 | +int ext4fs_open(const char *filename) | ||
1648 | +{ | ||
1649 | + struct ext2fs_node *fdiro = NULL; | ||
1650 | + int status; | ||
1651 | + int len; | ||
1652 | + | ||
1653 | + if (ext4fs_root == NULL) | ||
1654 | + return -1; | ||
1655 | + | ||
1656 | + ext4fs_file = NULL; | ||
1657 | + status = ext4fs_find_file(filename, &ext4fs_root->diropen, &fdiro, | ||
1658 | + FILETYPE_REG); | ||
1659 | + if (status == 0) | ||
1660 | + goto fail; | ||
1661 | + | ||
1662 | + if (!fdiro->inode_read) { | ||
1663 | + status = ext4fs_read_inode(fdiro->data, fdiro->ino, | ||
1664 | + &fdiro->inode); | ||
1665 | + if (status == 0) | ||
1666 | + goto fail; | ||
1667 | + } | ||
1668 | + len = __le32_to_cpu(fdiro->inode.size); | ||
1669 | + ext4fs_file = fdiro; | ||
1670 | + | ||
1671 | + return len; | ||
1672 | + fail: | ||
1673 | + ext4fs_free_node(fdiro, &ext4fs_root->diropen); | ||
1674 | + | ||
1675 | + return -1; | ||
1676 | +} | ||
1677 | + | ||
1678 | +int ext4fs_mount(unsigned part_length) | ||
1679 | +{ | ||
1680 | + struct ext2_data *data; | ||
1681 | + int status; | ||
1682 | + struct ext_filesystem *fs = get_fs(); | ||
1683 | + data = zalloc(sizeof(struct ext2_data)); | ||
1684 | + if (!data) | ||
1685 | + return 0; | ||
1686 | + | ||
1687 | + /* Read the superblock. */ | ||
1688 | + status = ext4fs_devread(1 * 2, 0, sizeof(struct ext2_sblock), | ||
1689 | + (char *)&data->sblock); | ||
1690 | + | ||
1691 | + if (status == 0) | ||
1692 | + goto fail; | ||
1693 | + | ||
1694 | + /* Make sure this is an ext2 filesystem. */ | ||
1695 | + if (__le16_to_cpu(data->sblock.magic) != EXT2_MAGIC) | ||
1696 | + goto fail; | ||
1697 | + | ||
1698 | + if (__le32_to_cpu(data->sblock.revision_level == 0)) | ||
1699 | + fs->inodesz = 128; | ||
1700 | + else | ||
1701 | + fs->inodesz = __le16_to_cpu(data->sblock.inode_size); | ||
1702 | + | ||
1703 | + debug("EXT2 rev %d, inode_size %d\n", | ||
1704 | + __le32_to_cpu(data->sblock.revision_level), fs->inodesz); | ||
1705 | + | ||
1706 | + data->diropen.data = data; | ||
1707 | + data->diropen.ino = 2; | ||
1708 | + data->diropen.inode_read = 1; | ||
1709 | + data->inode = &data->diropen.inode; | ||
1710 | + | ||
1711 | + status = ext4fs_read_inode(data, 2, data->inode); | ||
1712 | + if (status == 0) | ||
1713 | + goto fail; | ||
1714 | + | ||
1715 | + ext4fs_root = data; | ||
1716 | + | ||
1717 | + return 1; | ||
1718 | + fail: | ||
1719 | + printf("Failed to mount ext2 filesystem...\n"); | ||
1720 | + free(data); | ||
1721 | + ext4fs_root = NULL; | ||
1722 | + | ||
1723 | + return 0; | ||
1724 | +} | ||
1725 | diff --git a/fs/ext4/ext4_common.h b/fs/ext4/ext4_common.h | ||
1726 | new file mode 100644 | ||
1727 | index 0000000..18e6ad1 | ||
1728 | --- /dev/null | ||
1729 | +++ b/fs/ext4/ext4_common.h | ||
1730 | @@ -0,0 +1,63 @@ | ||
1731 | +/* | ||
1732 | + * (C) Copyright 2011 - 2012 Samsung Electronics | ||
1733 | + * EXT4 filesystem implementation in Uboot by | ||
1734 | + * Uma Shankar <uma.shankar@samsung.com> | ||
1735 | + * Manjunatha C Achar <a.manjunatha@samsung.com> | ||
1736 | + * | ||
1737 | + * ext4ls and ext4load : based on ext2 ls load support in Uboot. | ||
1738 | + * | ||
1739 | + * (C) Copyright 2004 | ||
1740 | + * esd gmbh <www.esd-electronics.com> | ||
1741 | + * Reinhard Arlt <reinhard.arlt@esd-electronics.com> | ||
1742 | + * | ||
1743 | + * based on code from grub2 fs/ext2.c and fs/fshelp.c by | ||
1744 | + * GRUB -- GRand Unified Bootloader | ||
1745 | + * Copyright (C) 2003, 2004 Free Software Foundation, Inc. | ||
1746 | + * | ||
1747 | + * This program is free software; you can redistribute it and/or modify | ||
1748 | + * it under the terms of the GNU General Public License as published by | ||
1749 | + * the Free Software Foundation; either version 2 of the License, or | ||
1750 | + * (at your option) any later version. | ||
1751 | + * | ||
1752 | + * This program is distributed in the hope that it will be useful, | ||
1753 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1754 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1755 | + * GNU General Public License for more details. | ||
1756 | + * | ||
1757 | + * You should have received a copy of the GNU General Public License | ||
1758 | + * along with this program; if not, write to the Free Software | ||
1759 | + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
1760 | + */ | ||
1761 | + | ||
1762 | +#ifndef __EXT4_COMMON__ | ||
1763 | +#define __EXT4_COMMON__ | ||
1764 | +#include <ext_common.h> | ||
1765 | +#include <ext4fs.h> | ||
1766 | +#include <malloc.h> | ||
1767 | +#include <asm/errno.h> | ||
1768 | + | ||
1769 | +#define YES 1 | ||
1770 | +#define NO 0 | ||
1771 | +#define TRUE 1 | ||
1772 | +#define FALSE 0 | ||
1773 | +#define RECOVER 1 | ||
1774 | +#define SCAN 0 | ||
1775 | + | ||
1776 | +#define S_IFLNK 0120000 /* symbolic link */ | ||
1777 | +#define BLOCK_NO_ONE 1 | ||
1778 | +#define SUPERBLOCK_SECTOR 2 | ||
1779 | +#define SUPERBLOCK_SIZE 1024 | ||
1780 | +#define F_FILE 1 | ||
1781 | + | ||
1782 | +#define zalloc(size) calloc(1, size) | ||
1783 | + | ||
1784 | +extern unsigned long part_offset; | ||
1785 | +int ext4fs_read_inode(struct ext2_data *data, int ino, | ||
1786 | + struct ext2_inode *inode); | ||
1787 | +int ext4fs_read_file(struct ext2fs_node *node, int pos, | ||
1788 | + unsigned int len, char *buf); | ||
1789 | +int ext4fs_find_file(const char *path, struct ext2fs_node *rootnode, | ||
1790 | + struct ext2fs_node **foundnode, int expecttype); | ||
1791 | +int ext4fs_iterate_dir(struct ext2fs_node *dir, char *name, | ||
1792 | + struct ext2fs_node **fnode, int *ftype); | ||
1793 | +#endif | ||
1794 | diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c | ||
1795 | new file mode 100644 | ||
1796 | index 0000000..7933769 | ||
1797 | --- /dev/null | ||
1798 | +++ b/fs/ext4/ext4fs.c | ||
1799 | @@ -0,0 +1,228 @@ | ||
1800 | +/* | ||
1801 | + * (C) Copyright 2011 - 2012 Samsung Electronics | ||
1802 | + * EXT4 filesystem implementation in Uboot by | ||
1803 | + * Uma Shankar <uma.shankar@samsung.com> | ||
1804 | + * Manjunatha C Achar <a.manjunatha@samsung.com> | ||
1805 | + * | ||
1806 | + * ext4ls and ext4load : Based on ext2 ls and load support in Uboot. | ||
1807 | + * Ext4 read optimization taken from Open-Moko | ||
1808 | + * Qi bootloader | ||
1809 | + * | ||
1810 | + * (C) Copyright 2004 | ||
1811 | + * esd gmbh <www.esd-electronics.com> | ||
1812 | + * Reinhard Arlt <reinhard.arlt@esd-electronics.com> | ||
1813 | + * | ||
1814 | + * based on code from grub2 fs/ext2.c and fs/fshelp.c by | ||
1815 | + * GRUB -- GRand Unified Bootloader | ||
1816 | + * Copyright (C) 2003, 2004 Free Software Foundation, Inc. | ||
1817 | + * | ||
1818 | + * This program is free software; you can redistribute it and/or modify | ||
1819 | + * it under the terms of the GNU General Public License as published by | ||
1820 | + * the Free Software Foundation; either version 2 of the License, or | ||
1821 | + * (at your option) any later version. | ||
1822 | + * | ||
1823 | + * This program is distributed in the hope that it will be useful, | ||
1824 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1825 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1826 | + * GNU General Public License for more details. | ||
1827 | + * | ||
1828 | + * You should have received a copy of the GNU General Public License | ||
1829 | + * along with this program; if not, write to the Free Software | ||
1830 | + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
1831 | + */ | ||
1832 | + | ||
1833 | +#include <common.h> | ||
1834 | +#include <malloc.h> | ||
1835 | +#include <ext_common.h> | ||
1836 | +#include <ext4fs.h> | ||
1837 | +#include <linux/stat.h> | ||
1838 | +#include <linux/time.h> | ||
1839 | +#include <asm/byteorder.h> | ||
1840 | +#include "ext4_common.h" | ||
1841 | + | ||
1842 | +int ext4fs_symlinknest; | ||
1843 | +block_dev_desc_t *ext4_dev_desc; | ||
1844 | + | ||
1845 | +struct ext_filesystem *get_fs(void) | ||
1846 | +{ | ||
1847 | + if (ext4_dev_desc == NULL || ext4_dev_desc->priv == NULL) | ||
1848 | + printf("Invalid Input Arguments %s\n", __func__); | ||
1849 | + | ||
1850 | + return ext4_dev_desc->priv; | ||
1851 | +} | ||
1852 | + | ||
1853 | +int init_fs(block_dev_desc_t *dev_desc) | ||
1854 | +{ | ||
1855 | + struct ext_filesystem *fs; | ||
1856 | + if (dev_desc == NULL) { | ||
1857 | + printf("Invalid Input Arguments %s\n", __func__); | ||
1858 | + return -EINVAL; | ||
1859 | + } | ||
1860 | + | ||
1861 | + fs = zalloc(sizeof(struct ext_filesystem)); | ||
1862 | + if (fs == NULL) { | ||
1863 | + printf("malloc failed: %s\n", __func__); | ||
1864 | + return -ENOMEM; | ||
1865 | + } | ||
1866 | + | ||
1867 | + fs->dev_desc = dev_desc; | ||
1868 | + dev_desc->priv = fs; | ||
1869 | + | ||
1870 | + return 0; | ||
1871 | +} | ||
1872 | + | ||
1873 | +void deinit_fs(block_dev_desc_t *dev_desc) | ||
1874 | +{ | ||
1875 | + if (dev_desc == NULL) { | ||
1876 | + printf("Invalid Input Arguments %s\n", __func__); | ||
1877 | + return; | ||
1878 | + } | ||
1879 | + free(dev_desc->priv); | ||
1880 | + dev_desc->priv = NULL; | ||
1881 | +} | ||
1882 | + | ||
1883 | +void ext4fs_free_node(struct ext2fs_node *node, struct ext2fs_node *currroot) | ||
1884 | +{ | ||
1885 | + if ((node != &ext4fs_root->diropen) && (node != currroot)) | ||
1886 | + free(node); | ||
1887 | +} | ||
1888 | + | ||
1889 | +/* | ||
1890 | + * Taken from openmoko-kernel mailing list: By Andy green | ||
1891 | + * Optimized read file API : collects and defers contiguous sector | ||
1892 | + * reads into one potentially more efficient larger sequential read action | ||
1893 | + */ | ||
1894 | +int ext4fs_read_file(struct ext2fs_node *node, int pos, | ||
1895 | + unsigned int len, char *buf) | ||
1896 | +{ | ||
1897 | + int i; | ||
1898 | + int blockcnt; | ||
1899 | + int log2blocksize = LOG2_EXT2_BLOCK_SIZE(node->data); | ||
1900 | + int blocksize = 1 << (log2blocksize + DISK_SECTOR_BITS); | ||
1901 | + unsigned int filesize = __le32_to_cpu(node->inode.size); | ||
1902 | + int previous_block_number = -1; | ||
1903 | + int delayed_start = 0; | ||
1904 | + int delayed_extent = 0; | ||
1905 | + int delayed_skipfirst = 0; | ||
1906 | + int delayed_next = 0; | ||
1907 | + char *delayed_buf = NULL; | ||
1908 | + short status; | ||
1909 | + | ||
1910 | + /* Adjust len so it we can't read past the end of the file. */ | ||
1911 | + if (len > filesize) | ||
1912 | + len = filesize; | ||
1913 | + | ||
1914 | + blockcnt = ((len + pos) + blocksize - 1) / blocksize; | ||
1915 | + | ||
1916 | + for (i = pos / blocksize; i < blockcnt; i++) { | ||
1917 | + int blknr; | ||
1918 | + int blockoff = pos % blocksize; | ||
1919 | + int blockend = blocksize; | ||
1920 | + int skipfirst = 0; | ||
1921 | + blknr = read_allocated_block(&(node->inode), i); | ||
1922 | + if (blknr < 0) | ||
1923 | + return -1; | ||
1924 | + | ||
1925 | + blknr = blknr << log2blocksize; | ||
1926 | + | ||
1927 | + /* Last block. */ | ||
1928 | + if (i == blockcnt - 1) { | ||
1929 | + blockend = (len + pos) % blocksize; | ||
1930 | + | ||
1931 | + /* The last portion is exactly blocksize. */ | ||
1932 | + if (!blockend) | ||
1933 | + blockend = blocksize; | ||
1934 | + } | ||
1935 | + | ||
1936 | + /* First block. */ | ||
1937 | + if (i == pos / blocksize) { | ||
1938 | + skipfirst = blockoff; | ||
1939 | + blockend -= skipfirst; | ||
1940 | + } | ||
1941 | + if (blknr) { | ||
1942 | + int status; | ||
1943 | + | ||
1944 | + if (previous_block_number != -1) { | ||
1945 | + if (delayed_next == blknr) { | ||
1946 | + delayed_extent += blockend; | ||
1947 | + delayed_next += blockend >> SECTOR_BITS; | ||
1948 | + } else { /* spill */ | ||
1949 | + status = ext4fs_devread(delayed_start, | ||
1950 | + delayed_skipfirst, | ||
1951 | + delayed_extent, | ||
1952 | + delayed_buf); | ||
1953 | + if (status == 0) | ||
1954 | + return -1; | ||
1955 | + previous_block_number = blknr; | ||
1956 | + delayed_start = blknr; | ||
1957 | + delayed_extent = blockend; | ||
1958 | + delayed_skipfirst = skipfirst; | ||
1959 | + delayed_buf = buf; | ||
1960 | + delayed_next = blknr + | ||
1961 | + (blockend >> SECTOR_BITS); | ||
1962 | + } | ||
1963 | + } else { | ||
1964 | + previous_block_number = blknr; | ||
1965 | + delayed_start = blknr; | ||
1966 | + delayed_extent = blockend; | ||
1967 | + delayed_skipfirst = skipfirst; | ||
1968 | + delayed_buf = buf; | ||
1969 | + delayed_next = blknr + | ||
1970 | + (blockend >> SECTOR_BITS); | ||
1971 | + } | ||
1972 | + } else { | ||
1973 | + if (previous_block_number != -1) { | ||
1974 | + /* spill */ | ||
1975 | + status = ext4fs_devread(delayed_start, | ||
1976 | + delayed_skipfirst, | ||
1977 | + delayed_extent, | ||
1978 | + delayed_buf); | ||
1979 | + if (status == 0) | ||
1980 | + return -1; | ||
1981 | + previous_block_number = -1; | ||
1982 | + } | ||
1983 | + memset(buf, 0, blocksize - skipfirst); | ||
1984 | + } | ||
1985 | + buf += blocksize - skipfirst; | ||
1986 | + } | ||
1987 | + if (previous_block_number != -1) { | ||
1988 | + /* spill */ | ||
1989 | + status = ext4fs_devread(delayed_start, | ||
1990 | + delayed_skipfirst, delayed_extent, | ||
1991 | + delayed_buf); | ||
1992 | + if (status == 0) | ||
1993 | + return -1; | ||
1994 | + previous_block_number = -1; | ||
1995 | + } | ||
1996 | + | ||
1997 | + return len; | ||
1998 | +} | ||
1999 | + | ||
2000 | +int ext4fs_ls(const char *dirname) | ||
2001 | +{ | ||
2002 | + struct ext2fs_node *dirnode; | ||
2003 | + int status; | ||
2004 | + | ||
2005 | + if (dirname == NULL) | ||
2006 | + return 0; | ||
2007 | + | ||
2008 | + status = ext4fs_find_file(dirname, &ext4fs_root->diropen, &dirnode, | ||
2009 | + FILETYPE_DIRECTORY); | ||
2010 | + if (status != 1) { | ||
2011 | + printf("** Can not find directory. **\n"); | ||
2012 | + return 1; | ||
2013 | + } | ||
2014 | + | ||
2015 | + ext4fs_iterate_dir(dirnode, NULL, NULL, NULL); | ||
2016 | + ext4fs_free_node(dirnode, &ext4fs_root->diropen); | ||
2017 | + | ||
2018 | + return 0; | ||
2019 | +} | ||
2020 | + | ||
2021 | +int ext4fs_read(char *buf, unsigned len) | ||
2022 | +{ | ||
2023 | + if (ext4fs_root == NULL || ext4fs_file == NULL) | ||
2024 | + return 0; | ||
2025 | + | ||
2026 | + return ext4fs_read_file(ext4fs_file, 0, len, buf); | ||
2027 | +} | ||
2028 | diff --git a/include/ext4fs.h b/include/ext4fs.h | ||
2029 | new file mode 100644 | ||
2030 | index 0000000..58a6a1d | ||
2031 | --- /dev/null | ||
2032 | +++ b/include/ext4fs.h | ||
2033 | @@ -0,0 +1,132 @@ | ||
2034 | +/* | ||
2035 | + * (C) Copyright 2011 - 2012 Samsung Electronics | ||
2036 | + * EXT4 filesystem implementation in Uboot by | ||
2037 | + * Uma Shankar <uma.shankar@samsung.com> | ||
2038 | + * Manjunatha C Achar <a.manjunatha@samsung.com> | ||
2039 | + * | ||
2040 | + * Ext4 Extent data structures are taken from original ext4 fs code | ||
2041 | + * as found in the linux kernel. | ||
2042 | + * | ||
2043 | + * Copyright (c) 2003-2006, Cluster File Systems, Inc, info@clusterfs.com | ||
2044 | + * Written by Alex Tomas <alex@clusterfs.com> | ||
2045 | + * | ||
2046 | + * This program is free software; you can redistribute it and/or modify | ||
2047 | + * it under the terms of the GNU General Public License version 2 as | ||
2048 | + * published by the Free Software Foundation. | ||
2049 | + * | ||
2050 | + * This program is distributed in the hope that it will be useful, | ||
2051 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2052 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2053 | + * GNU General Public License for more details. | ||
2054 | + * | ||
2055 | + * You should have received a copy of the GNU General Public License | ||
2056 | + * along with this program; if not, write to the Free Software | ||
2057 | + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
2058 | + */ | ||
2059 | + | ||
2060 | +#ifndef __EXT4__ | ||
2061 | +#define __EXT4__ | ||
2062 | +#include <ext_common.h> | ||
2063 | + | ||
2064 | +#define EXT4_EXTENTS_FL 0x00080000 /* Inode uses extents */ | ||
2065 | +#define EXT4_EXT_MAGIC 0xf30a | ||
2066 | +#define EXT4_FEATURE_RO_COMPAT_GDT_CSUM 0x0010 | ||
2067 | +#define EXT4_FEATURE_INCOMPAT_EXTENTS 0x0040 | ||
2068 | +#define EXT4_INDIRECT_BLOCKS 12 | ||
2069 | + | ||
2070 | +#define EXT4_BG_INODE_UNINIT 0x0001 | ||
2071 | +#define EXT4_BG_BLOCK_UNINIT 0x0002 | ||
2072 | +#define EXT4_BG_INODE_ZEROED 0x0004 | ||
2073 | + | ||
2074 | +/* | ||
2075 | + * ext4_inode has i_block array (60 bytes total). | ||
2076 | + * The first 12 bytes store ext4_extent_header; | ||
2077 | + * the remainder stores an array of ext4_extent. | ||
2078 | + */ | ||
2079 | + | ||
2080 | +/* | ||
2081 | + * This is the extent on-disk structure. | ||
2082 | + * It's used at the bottom of the tree. | ||
2083 | + */ | ||
2084 | +struct ext4_extent { | ||
2085 | + __le32 ee_block; /* first logical block extent covers */ | ||
2086 | + __le16 ee_len; /* number of blocks covered by extent */ | ||
2087 | + __le16 ee_start_hi; /* high 16 bits of physical block */ | ||
2088 | + __le32 ee_start_lo; /* low 32 bits of physical block */ | ||
2089 | +}; | ||
2090 | + | ||
2091 | +/* | ||
2092 | + * This is index on-disk structure. | ||
2093 | + * It's used at all the levels except the bottom. | ||
2094 | + */ | ||
2095 | +struct ext4_extent_idx { | ||
2096 | + __le32 ei_block; /* index covers logical blocks from 'block' */ | ||
2097 | + __le32 ei_leaf_lo; /* pointer to the physical block of the next * | ||
2098 | + * level. leaf or next index could be there */ | ||
2099 | + __le16 ei_leaf_hi; /* high 16 bits of physical block */ | ||
2100 | + __u16 ei_unused; | ||
2101 | +}; | ||
2102 | + | ||
2103 | +/* Each block (leaves and indexes), even inode-stored has header. */ | ||
2104 | +struct ext4_extent_header { | ||
2105 | + __le16 eh_magic; /* probably will support different formats */ | ||
2106 | + __le16 eh_entries; /* number of valid entries */ | ||
2107 | + __le16 eh_max; /* capacity of store in entries */ | ||
2108 | + __le16 eh_depth; /* has tree real underlying blocks? */ | ||
2109 | + __le32 eh_generation; /* generation of the tree */ | ||
2110 | +}; | ||
2111 | + | ||
2112 | +struct ext_filesystem { | ||
2113 | + /* Total Sector of partition */ | ||
2114 | + uint64_t total_sect; | ||
2115 | + /* Block size of partition */ | ||
2116 | + uint32_t blksz; | ||
2117 | + /* Inode size of partition */ | ||
2118 | + uint32_t inodesz; | ||
2119 | + /* Sectors per Block */ | ||
2120 | + uint32_t sect_perblk; | ||
2121 | + /* Group Descriptor Block Number */ | ||
2122 | + uint32_t gdtable_blkno; | ||
2123 | + /* Total block groups of partition */ | ||
2124 | + uint32_t no_blkgrp; | ||
2125 | + /* No of blocks required for bgdtable */ | ||
2126 | + uint32_t no_blk_pergdt; | ||
2127 | + /* Superblock */ | ||
2128 | + struct ext2_sblock *sb; | ||
2129 | + /* Block group descritpor table */ | ||
2130 | + struct ext2_block_group *gd; | ||
2131 | + char *gdtable; | ||
2132 | + | ||
2133 | + /* Block Bitmap Related */ | ||
2134 | + unsigned char **blk_bmaps; | ||
2135 | + long int curr_blkno; | ||
2136 | + uint16_t first_pass_bbmap; | ||
2137 | + | ||
2138 | + /* Inode Bitmap Related */ | ||
2139 | + unsigned char **inode_bmaps; | ||
2140 | + int curr_inode_no; | ||
2141 | + uint16_t first_pass_ibmap; | ||
2142 | + | ||
2143 | + /* Journal Related */ | ||
2144 | + | ||
2145 | + /* Block Device Descriptor */ | ||
2146 | + block_dev_desc_t *dev_desc; | ||
2147 | +}; | ||
2148 | + | ||
2149 | +extern block_dev_desc_t *ext4_dev_desc; | ||
2150 | +extern struct ext2_data *ext4fs_root; | ||
2151 | +extern struct ext2fs_node *ext4fs_file; | ||
2152 | + | ||
2153 | +struct ext_filesystem *get_fs(void); | ||
2154 | +int init_fs(block_dev_desc_t *dev_desc); | ||
2155 | +void deinit_fs(block_dev_desc_t *dev_desc); | ||
2156 | +int ext4fs_open(const char *filename); | ||
2157 | +int ext4fs_read(char *buf, unsigned len); | ||
2158 | +int ext4fs_mount(unsigned part_length); | ||
2159 | +void ext4fs_close(void); | ||
2160 | +int ext4fs_ls(const char *dirname); | ||
2161 | +void ext4fs_free_node(struct ext2fs_node *node, struct ext2fs_node *currroot); | ||
2162 | +int ext4fs_devread(int sector, int byte_offset, int byte_len, char *buf); | ||
2163 | +int ext4fs_set_blk_dev(block_dev_desc_t *rbdd, int part); | ||
2164 | +long int read_allocated_block(struct ext2_inode *inode, int fileblock); | ||
2165 | +#endif | ||
2166 | diff --git a/include/ext_common.h b/include/ext_common.h | ||
2167 | new file mode 100644 | ||
2168 | index 0000000..5d48021 | ||
2169 | --- /dev/null | ||
2170 | +++ b/include/ext_common.h | ||
2171 | @@ -0,0 +1,188 @@ | ||
2172 | +/* | ||
2173 | + * (C) Copyright 2011 - 2012 Samsung Electronics | ||
2174 | + * EXT4 filesystem implementation in Uboot by | ||
2175 | + * Uma Shankar <uma.shankar@samsung.com> | ||
2176 | + * Manjunatha C Achar <a.manjunatha@samsung.com> | ||
2177 | + * | ||
2178 | + * Data structures and headers for ext4 support have been taken from | ||
2179 | + * ext2 ls load support in Uboot | ||
2180 | + * | ||
2181 | + * (C) Copyright 2004 | ||
2182 | + * esd gmbh <www.esd-electronics.com> | ||
2183 | + * Reinhard Arlt <reinhard.arlt@esd-electronics.com> | ||
2184 | + * | ||
2185 | + * based on code from grub2 fs/ext2.c and fs/fshelp.c by | ||
2186 | + * GRUB -- GRand Unified Bootloader | ||
2187 | + * Copyright (C) 2003, 2004 Free Software Foundation, Inc. | ||
2188 | + * | ||
2189 | + * This program is free software; you can redistribute it and/or modify | ||
2190 | + * it under the terms of the GNU General Public License as published by | ||
2191 | + * the Free Software Foundation; either version 2 of the License, or | ||
2192 | + * (at your option) any later version. | ||
2193 | + * | ||
2194 | + * This program is distributed in the hope that it will be useful, | ||
2195 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2196 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2197 | + * GNU General Public License for more details. | ||
2198 | + * | ||
2199 | + * You should have received a copy of the GNU General Public License | ||
2200 | + * along with this program; if not, write to the Free Software | ||
2201 | + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
2202 | + */ | ||
2203 | + | ||
2204 | +#ifndef __EXT_COMMON__ | ||
2205 | +#define __EXT_COMMON__ | ||
2206 | + | ||
2207 | +#define SECTOR_SIZE 0x200 | ||
2208 | +#define SECTOR_BITS 9 | ||
2209 | + | ||
2210 | +/* Magic value used to identify an ext2 filesystem. */ | ||
2211 | +#define EXT2_MAGIC 0xEF53 | ||
2212 | +/* Amount of indirect blocks in an inode. */ | ||
2213 | +#define INDIRECT_BLOCKS 12 | ||
2214 | +/* Maximum lenght of a pathname. */ | ||
2215 | +#define EXT2_PATH_MAX 4096 | ||
2216 | +/* Maximum nesting of symlinks, used to prevent a loop. */ | ||
2217 | +#define EXT2_MAX_SYMLINKCNT 8 | ||
2218 | + | ||
2219 | +/* Filetype used in directory entry. */ | ||
2220 | +#define FILETYPE_UNKNOWN 0 | ||
2221 | +#define FILETYPE_REG 1 | ||
2222 | +#define FILETYPE_DIRECTORY 2 | ||
2223 | +#define FILETYPE_SYMLINK 7 | ||
2224 | + | ||
2225 | +/* Filetype information as used in inodes. */ | ||
2226 | +#define FILETYPE_INO_MASK 0170000 | ||
2227 | +#define FILETYPE_INO_REG 0100000 | ||
2228 | +#define FILETYPE_INO_DIRECTORY 0040000 | ||
2229 | +#define FILETYPE_INO_SYMLINK 0120000 | ||
2230 | +#define EXT2_ROOT_INO 2 /* Root inode */ | ||
2231 | + | ||
2232 | +/* Bits used as offset in sector */ | ||
2233 | +#define DISK_SECTOR_BITS 9 | ||
2234 | +/* The size of an ext2 block in bytes. */ | ||
2235 | +#define EXT2_BLOCK_SIZE(data) (1 << LOG2_BLOCK_SIZE(data)) | ||
2236 | + | ||
2237 | +/* Log2 size of ext2 block in 512 blocks. */ | ||
2238 | +#define LOG2_EXT2_BLOCK_SIZE(data) (__le32_to_cpu \ | ||
2239 | + (data->sblock.log2_block_size) + 1) | ||
2240 | + | ||
2241 | +/* Log2 size of ext2 block in bytes. */ | ||
2242 | +#define LOG2_BLOCK_SIZE(data) (__le32_to_cpu \ | ||
2243 | + (data->sblock.log2_block_size) + 10) | ||
2244 | +#define INODE_SIZE_FILESYSTEM(data) (__le32_to_cpu \ | ||
2245 | + (data->sblock.inode_size)) | ||
2246 | + | ||
2247 | +#define EXT2_FT_DIR 2 | ||
2248 | +#define SUCCESS 1 | ||
2249 | + | ||
2250 | +/* Macro-instructions used to manage several block sizes */ | ||
2251 | +#define EXT2_MIN_BLOCK_LOG_SIZE 10 /* 1024 */ | ||
2252 | +#define EXT2_MAX_BLOCK_LOG_SIZE 16 /* 65536 */ | ||
2253 | +#define EXT2_MIN_BLOCK_SIZE (1 << EXT2_MIN_BLOCK_LOG_SIZE) | ||
2254 | +#define EXT2_MAX_BLOCK_SIZE (1 << EXT2_MAX_BLOCK_LOG_SIZE) | ||
2255 | + | ||
2256 | +/* The ext2 superblock. */ | ||
2257 | +struct ext2_sblock { | ||
2258 | + uint32_t total_inodes; | ||
2259 | + uint32_t total_blocks; | ||
2260 | + uint32_t reserved_blocks; | ||
2261 | + uint32_t free_blocks; | ||
2262 | + uint32_t free_inodes; | ||
2263 | + uint32_t first_data_block; | ||
2264 | + uint32_t log2_block_size; | ||
2265 | + uint32_t log2_fragment_size; | ||
2266 | + uint32_t blocks_per_group; | ||
2267 | + uint32_t fragments_per_group; | ||
2268 | + uint32_t inodes_per_group; | ||
2269 | + uint32_t mtime; | ||
2270 | + uint32_t utime; | ||
2271 | + uint16_t mnt_count; | ||
2272 | + uint16_t max_mnt_count; | ||
2273 | + uint16_t magic; | ||
2274 | + uint16_t fs_state; | ||
2275 | + uint16_t error_handling; | ||
2276 | + uint16_t minor_revision_level; | ||
2277 | + uint32_t lastcheck; | ||
2278 | + uint32_t checkinterval; | ||
2279 | + uint32_t creator_os; | ||
2280 | + uint32_t revision_level; | ||
2281 | + uint16_t uid_reserved; | ||
2282 | + uint16_t gid_reserved; | ||
2283 | + uint32_t first_inode; | ||
2284 | + uint16_t inode_size; | ||
2285 | + uint16_t block_group_number; | ||
2286 | + uint32_t feature_compatibility; | ||
2287 | + uint32_t feature_incompat; | ||
2288 | + uint32_t feature_ro_compat; | ||
2289 | + uint32_t unique_id[4]; | ||
2290 | + char volume_name[16]; | ||
2291 | + char last_mounted_on[64]; | ||
2292 | + uint32_t compression_info; | ||
2293 | +}; | ||
2294 | + | ||
2295 | +struct ext2_block_group { | ||
2296 | + __u32 block_id; /* Blocks bitmap block */ | ||
2297 | + __u32 inode_id; /* Inodes bitmap block */ | ||
2298 | + __u32 inode_table_id; /* Inodes table block */ | ||
2299 | + __u16 free_blocks; /* Free blocks count */ | ||
2300 | + __u16 free_inodes; /* Free inodes count */ | ||
2301 | + __u16 used_dir_cnt; /* Directories count */ | ||
2302 | + __u16 bg_flags; | ||
2303 | + __u32 bg_reserved[2]; | ||
2304 | + __u16 bg_itable_unused; /* Unused inodes count */ | ||
2305 | + __u16 bg_checksum; /* crc16(s_uuid+grouo_num+group_desc)*/ | ||
2306 | +}; | ||
2307 | + | ||
2308 | +/* The ext2 inode. */ | ||
2309 | +struct ext2_inode { | ||
2310 | + uint16_t mode; | ||
2311 | + uint16_t uid; | ||
2312 | + uint32_t size; | ||
2313 | + uint32_t atime; | ||
2314 | + uint32_t ctime; | ||
2315 | + uint32_t mtime; | ||
2316 | + uint32_t dtime; | ||
2317 | + uint16_t gid; | ||
2318 | + uint16_t nlinks; | ||
2319 | + uint32_t blockcnt; /* Blocks of 512 bytes!! */ | ||
2320 | + uint32_t flags; | ||
2321 | + uint32_t osd1; | ||
2322 | + union { | ||
2323 | + struct datablocks { | ||
2324 | + uint32_t dir_blocks[INDIRECT_BLOCKS]; | ||
2325 | + uint32_t indir_block; | ||
2326 | + uint32_t double_indir_block; | ||
2327 | + uint32_t triple_indir_block; | ||
2328 | + } blocks; | ||
2329 | + char symlink[60]; | ||
2330 | + } b; | ||
2331 | + uint32_t version; | ||
2332 | + uint32_t acl; | ||
2333 | + uint32_t dir_acl; | ||
2334 | + uint32_t fragment_addr; | ||
2335 | + uint32_t osd2[3]; | ||
2336 | +}; | ||
2337 | + | ||
2338 | +/* The header of an ext2 directory entry. */ | ||
2339 | +struct ext2_dirent { | ||
2340 | + uint32_t inode; | ||
2341 | + uint16_t direntlen; | ||
2342 | + uint8_t namelen; | ||
2343 | + uint8_t filetype; | ||
2344 | +}; | ||
2345 | + | ||
2346 | +struct ext2fs_node { | ||
2347 | + struct ext2_data *data; | ||
2348 | + struct ext2_inode inode; | ||
2349 | + int ino; | ||
2350 | + int inode_read; | ||
2351 | +}; | ||
2352 | + | ||
2353 | +/* Information about a "mounted" ext2 filesystem. */ | ||
2354 | +struct ext2_data { | ||
2355 | + struct ext2_sblock sblock; | ||
2356 | + struct ext2_inode *inode; | ||
2357 | + struct ext2fs_node diropen; | ||
2358 | +}; | ||
2359 | +#endif | ||
2360 | -- | ||
2361 | 1.7.10 | ||
2362 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.12/0013-beagleboard-switch-mmcroots-to-ext4.patch b/recipes-bsp/u-boot/u-boot/2011.12/0013-beagleboard-switch-mmcroots-to-ext4.patch deleted file mode 100644 index c80dfc2b..00000000 --- a/recipes-bsp/u-boot/u-boot/2011.12/0013-beagleboard-switch-mmcroots-to-ext4.patch +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | From f5b19d6609a540a9eafa60dad902e7416df57771 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Mon, 30 Apr 2012 11:10:07 +0200 | ||
4 | Subject: [PATCH 13/13] beagleboard: switch mmcroots to ext4 | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | include/configs/omap3_beagle.h | 5 +++-- | ||
9 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
10 | |||
11 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
12 | index 65ab8ee..3157d47 100644 | ||
13 | --- a/include/configs/omap3_beagle.h | ||
14 | +++ b/include/configs/omap3_beagle.h | ||
15 | @@ -140,6 +140,7 @@ | ||
16 | |||
17 | #define CONFIG_CMD_CACHE | ||
18 | #define CONFIG_CMD_EXT2 /* EXT2 Support */ | ||
19 | +#define CONFIG_CMD_EXT4 | ||
20 | #define CONFIG_CMD_FAT /* FAT support */ | ||
21 | #define CONFIG_CMD_JFFS2 /* JFFS2 Support */ | ||
22 | #define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */ | ||
23 | @@ -222,7 +223,7 @@ | ||
24 | "defaultdisplay=dvi\0" \ | ||
25 | "mmcdev=0\0" \ | ||
26 | "mmcroot=/dev/mmcblk0p2 ro\0" \ | ||
27 | - "mmcrootfstype=ext3 rootwait\0" \ | ||
28 | + "mmcrootfstype=ext4 rootwait\0" \ | ||
29 | "nandroot=ubi0:rootfs ubi.mtd=4\0" \ | ||
30 | "nandrootfstype=ubifs\0" \ | ||
31 | "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=0x81000000,64M\0" \ | ||
32 | @@ -265,7 +266,7 @@ | ||
33 | "rootfstype=${ramrootfstype}\0" \ | ||
34 | "loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ | ||
35 | "loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ | ||
36 | - "loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} /boot/uImage\0" \ | ||
37 | + "loaduimage=ext4load mmc ${mmcdev}:2 ${loadaddr} /boot/uImage\0" \ | ||
38 | "mmcboot=echo Booting from mmc ...; " \ | ||
39 | "run mmcargs; " \ | ||
40 | "bootm ${loadaddr}\0" \ | ||
41 | -- | ||
42 | 1.7.10 | ||
43 | |||
diff --git a/recipes-bsp/u-boot/u-boot/600mhz.patch b/recipes-bsp/u-boot/u-boot/600mhz.patch deleted file mode 100644 index 3a7fce2c..00000000 --- a/recipes-bsp/u-boot/u-boot/600mhz.patch +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | From 7189f933a151c3f2f4778aaaefa1a3b037368bed Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Sat, 8 Jan 2011 19:13:31 +0100 | ||
4 | Subject: [PATCH 02/10] 600mhz.patch | ||
5 | |||
6 | --- | ||
7 | include/asm-arm/arch-omap3/clocks_omap3.h | 2 +- | ||
8 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
9 | |||
10 | diff --git a/include/asm-arm/arch-omap3/clocks_omap3.h b/include/asm-arm/arch-omap3/clocks_omap3.h | ||
11 | index 661407b..e148d68 100644 | ||
12 | --- a/include/asm-arm/arch-omap3/clocks_omap3.h | ||
13 | +++ b/include/asm-arm/arch-omap3/clocks_omap3.h | ||
14 | @@ -71,7 +71,7 @@ | ||
15 | #define MPU_FSEL_13_ES1 0x03 | ||
16 | #define MPU_M2_13_ES1 0x01 | ||
17 | |||
18 | -#define MPU_M_13_ES2 0x1F4 | ||
19 | +#define MPU_M_13_ES2 0x258 | ||
20 | #define MPU_N_13_ES2 0x0C | ||
21 | #define MPU_FSEL_13_ES2 0x03 | ||
22 | #define MPU_M2_13_ES2 0x01 | ||
23 | -- | ||
24 | 1.6.6.1 | ||
25 | |||
diff --git a/recipes-bsp/u-boot/u-boot/ai-logo.patch b/recipes-bsp/u-boot/u-boot/ai-logo.patch deleted file mode 100644 index 53f06b83..00000000 --- a/recipes-bsp/u-boot/u-boot/ai-logo.patch +++ /dev/null | |||
@@ -1,1353 +0,0 @@ | |||
1 | From b5c3e2dae5e435a1429239b4e53a45a992415cdd Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Sat, 8 Jan 2011 19:16:51 +0100 | ||
4 | Subject: [PATCH 08/10] ai-logo.patch | ||
5 | |||
6 | --- | ||
7 | board/omap3/beagle/beagle.c | 141 ++++++ | ||
8 | board/omap3/beagle/logo.h | 1171 +++++++++++++++++++++++++++++++++++++++++++ | ||
9 | 2 files changed, 1312 insertions(+), 0 deletions(-) | ||
10 | create mode 100644 board/omap3/beagle/logo.h | ||
11 | |||
12 | diff --git a/board/omap3/beagle/beagle.c b/board/omap3/beagle/beagle.c | ||
13 | index 39073db..d5ec63e 100644 | ||
14 | --- a/board/omap3/beagle/beagle.c | ||
15 | +++ b/board/omap3/beagle/beagle.c | ||
16 | @@ -35,9 +35,147 @@ | ||
17 | #include <asm/arch/sys_proto.h> | ||
18 | #include <asm/mach-types.h> | ||
19 | #include "beagle.h" | ||
20 | +#include "logo.h" | ||
21 | + | ||
22 | +#define LOGO_SCREEN_WIDTH 1024 | ||
23 | +#define LOGO_SCREEN_HEIGHT 600 | ||
24 | +#define LOGO_FILL_COLOUR 0x0 | ||
25 | |||
26 | static int beagle_revision_c; | ||
27 | |||
28 | +void dss_init(void) | ||
29 | +{ | ||
30 | + unsigned int i, k=0; | ||
31 | + unsigned char pixel[3]; | ||
32 | + int offset = 0; | ||
33 | + | ||
34 | + /* Fill up to the logo */ | ||
35 | + for (i = 0; i < 2 * (LOGO_SCREEN_WIDTH * ((LOGO_SCREEN_HEIGHT/2) - (height/2))); i += 2) { | ||
36 | + *((unsigned short *)(0x85000000 + i)) = LOGO_FILL_COLOUR; | ||
37 | + } | ||
38 | + offset += i; | ||
39 | + | ||
40 | + /* Paint the image data */ | ||
41 | + for (i = 0; i < height; i++) { | ||
42 | + for (k = 0; k < LOGO_SCREEN_WIDTH; k++) { | ||
43 | + if(k < (LOGO_SCREEN_WIDTH / 2 - width / 2) || k >= (LOGO_SCREEN_WIDTH / 2 + width / 2)) | ||
44 | + *((unsigned short *)(0x85000000 + offset + 2*k)) = LOGO_FILL_COLOUR; | ||
45 | + else { | ||
46 | + HEADER_PIXEL(header_data, pixel); | ||
47 | + *((unsigned short *)(0x85000000 + offset + 2*k)) = | ||
48 | + ((((pixel[0])&0xf8) << 8) | | ||
49 | + (((pixel[1])&0xfc) << 3) | | ||
50 | + (((pixel[2])&0xf8) >> 3)); | ||
51 | + } | ||
52 | + } | ||
53 | + | ||
54 | + offset += 2 * LOGO_SCREEN_WIDTH; | ||
55 | + } | ||
56 | + | ||
57 | + /* Fill the rest */ | ||
58 | + for (i = 0; i < 2 * (LOGO_SCREEN_WIDTH * ((LOGO_SCREEN_HEIGHT/2) - (height/2))); i += 2) { | ||
59 | + *((unsigned short *)(0x85000000 + offset + i)) = LOGO_FILL_COLOUR; | ||
60 | + } | ||
61 | + | ||
62 | + *((uint *) 0x48310034) = 0xfefffedf; | ||
63 | + *((uint *) 0x48310094) = 0x01000120; | ||
64 | + *((uint *) 0x48004D44) = 0x0001b00c; | ||
65 | + *((uint *) 0x48004E40) = 0x00001002; | ||
66 | + *((uint *) 0x48004D00) = 0x00370037; | ||
67 | + | ||
68 | + *((uint *) 0x48050C00) = 0x00000002; | ||
69 | + *((uint *) 0x48050C04) = 0x0000001B; | ||
70 | + *((uint *) 0x48050C08) = 0x00000040; | ||
71 | + *((uint *) 0x48050C0C) = 0x00000000; | ||
72 | + *((uint *) 0x48050C10) = 0x00000000; | ||
73 | + *((uint *) 0x48050C14) = 0x00008000; | ||
74 | + *((uint *) 0x48050C18) = 0x00000000; | ||
75 | + *((uint *) 0x48050C1C) = 0x00008359; | ||
76 | + *((uint *) 0x48050C20) = 0x0000020C; | ||
77 | + *((uint *) 0x48050C24) = 0x00000000; | ||
78 | + *((uint *) 0x48050C28) = 0x043F2631; | ||
79 | + *((uint *) 0x48050C2C) = 0x00000024; | ||
80 | + *((uint *) 0x48050C30) = 0x00000130; | ||
81 | + *((uint *) 0x48050C34) = 0x00000198; | ||
82 | + *((uint *) 0x48050C38) = 0x000001C0; | ||
83 | + *((uint *) 0x48050C3C) = 0x0000006A; | ||
84 | + *((uint *) 0x48050C40) = 0x0000005C; | ||
85 | + *((uint *) 0x48050C44) = 0x00000000; | ||
86 | + *((uint *) 0x48050C48) = 0x00000001; | ||
87 | + *((uint *) 0x48050C4C) = 0x0000003F; | ||
88 | + *((uint *) 0x48050C50) = 0x21F07C1F; | ||
89 | + *((uint *) 0x48050C54) = 0x00000000; | ||
90 | + *((uint *) 0x48050C58) = 0x00000015; | ||
91 | + *((uint *) 0x48050C5C) = 0x00001400; | ||
92 | + *((uint *) 0x48050C60) = 0x00000000; | ||
93 | + *((uint *) 0x48050C64) = 0x069300F4; | ||
94 | + *((uint *) 0x48050C68) = 0x0016020C; | ||
95 | + *((uint *) 0x48050C6C) = 0x00060107; | ||
96 | + *((uint *) 0x48050C70) = 0x008D034E; | ||
97 | + *((uint *) 0x48050C74) = 0x000F0359; | ||
98 | + *((uint *) 0x48050C78) = 0x01A00000; | ||
99 | + *((uint *) 0x48050C7C) = 0x020501A0; | ||
100 | + *((uint *) 0x48050C80) = 0x01AC0024; | ||
101 | + *((uint *) 0x48050C84) = 0x020D01AC; | ||
102 | + *((uint *) 0x48050C88) = 0x00000006; | ||
103 | + *((uint *) 0x48050C8C) = 0x00000000; | ||
104 | + *((uint *) 0x48050C90) = 0x03480079; | ||
105 | + *((uint *) 0x48050C94) = 0x02040024; | ||
106 | + *((uint *) 0x48050C98) = 0x00000000; | ||
107 | + *((uint *) 0x48050C9C) = 0x00000000; | ||
108 | + *((uint *) 0x48050CA0) = 0x0001008A; | ||
109 | + *((uint *) 0x48050CA4) = 0x01AC0106; | ||
110 | + *((uint *) 0x48050CA8) = 0x01060006; | ||
111 | + *((uint *) 0x48050CAC) = 0x00000000; | ||
112 | + *((uint *) 0x48050CB0) = 0x00140001; | ||
113 | + *((uint *) 0x48050CB4) = 0x00010001; | ||
114 | + *((uint *) 0x48050CB8) = 0x00FF0000; | ||
115 | + *((uint *) 0x48050CBC) = 0x00000000; | ||
116 | + *((uint *) 0x48050CC0) = 0x00000000; | ||
117 | + *((uint *) 0x48050CC4) = 0x0000000D; | ||
118 | + *((uint *) 0x48050CC8) = 0x00000000; | ||
119 | + *((uint *) 0x48050010) = 0x00000001; | ||
120 | + *((uint *) 0x48050040) = 0x00000078; | ||
121 | + *((uint *) 0x48050044) = 0x00000000; | ||
122 | + *((uint *) 0x48050048) = 0x00000000; | ||
123 | + *((uint *) 0x48050050) = 0x00000000; | ||
124 | + *((uint *) 0x48050058) = 0x00000000; | ||
125 | + *((uint *) 0x48050410) = 0x00002015; | ||
126 | + *((uint *) 0x48050414) = 0x00000001; | ||
127 | + *((uint *) 0x48050444) = 0x00000004; | ||
128 | + *((uint *) 0x4805044c) = 0xFFFFFFFF; | ||
129 | + *((uint *) 0x48050450) = 0x00000000; | ||
130 | + *((uint *) 0x48050454) = 0x00000000; | ||
131 | + *((uint *) 0x48050458) = 0x00000000; | ||
132 | + *((uint *) 0x48050464) = 0x02600202; | ||
133 | + *((uint *) 0x48050468) = 0x00700200; | ||
134 | + *((uint *) 0x4805046c) = 0x00000000; | ||
135 | + *((uint *) 0x48050470) = 0x00010007; | ||
136 | + *((uint *) 0x48050478) = 0x00ef027f; | ||
137 | + *((uint *) 0x4805047c) = 0x02ff03ff; | ||
138 | + *((uint *) 0x48050480) = 0x85000000; | ||
139 | + *((uint *) 0x48050484) = 0x85000000; | ||
140 | + *((uint *) 0x48050488) = 0x00000000; | ||
141 | + *((uint *) 0x4805048c) = 0x02ff03ff; | ||
142 | + *((uint *) 0x480504a0) = 0x0000008d; | ||
143 | + *((uint *) 0x480504a4) = 0x03fc03bc; | ||
144 | + *((uint *) 0x480504a8) = 0x00000400; | ||
145 | + *((uint *) 0x480504ac) = 0x00000001; | ||
146 | + *((uint *) 0x480504b0) = 0x00000001; | ||
147 | + *((uint *) 0x480504b4) = 0x00000000; | ||
148 | + *((uint *) 0x480504b8) = 0x807ff000; | ||
149 | + udelay(1000); | ||
150 | + *((uint *) 0x48050440) = 0x0001836b; | ||
151 | + udelay(1000); | ||
152 | + *((uint *) 0x48050440) = 0x0001836b; | ||
153 | + udelay(1000); | ||
154 | + *((uint *) 0x48050440) = 0x0001836b; | ||
155 | + udelay(1000); | ||
156 | + | ||
157 | + /* Turn on GPT9 PWM */ | ||
158 | + *((uint *) 0x49040024) = 0x80; | ||
159 | +} | ||
160 | + | ||
161 | /* | ||
162 | * Routine: board_init | ||
163 | * Description: Early hardware init. | ||
164 | @@ -118,6 +256,9 @@ int misc_init_r(void) | ||
165 | |||
166 | dieid_num_r(); | ||
167 | |||
168 | + /* Touch Book logo */ | ||
169 | + dss_init(); | ||
170 | + | ||
171 | return 0; | ||
172 | } | ||
173 | |||
174 | diff --git a/board/omap3/beagle/logo.h b/board/omap3/beagle/logo.h | ||
175 | new file mode 100644 | ||
176 | index 0000000..c0996ac | ||
177 | --- /dev/null | ||
178 | +++ b/board/omap3/beagle/logo.h | ||
179 | @@ -0,0 +1,1171 @@ | ||
180 | +/* GIMP header image file format (RGB): /Documents/Desktop/u-boot-black.h */ | ||
181 | + | ||
182 | +static unsigned int width = 136; | ||
183 | +static unsigned int height = 136; | ||
184 | + | ||
185 | +/* Call this macro repeatedly. After each use, the pixel data can be extracted */ | ||
186 | + | ||
187 | +#define HEADER_PIXEL(data,pixel) {\ | ||
188 | + pixel[0] = (((data[0] - 33) << 2) | ((data[1] - 33) >> 4)); \ | ||
189 | + pixel[1] = ((((data[1] - 33) & 0xF) << 4) | ((data[2] - 33) >> 2)); \ | ||
190 | + pixel[2] = ((((data[2] - 33) & 0x3) << 6) | ((data[3] - 33))); \ | ||
191 | + data += 4; \ | ||
192 | +} | ||
193 | +static char *header_data = | ||
194 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
195 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
196 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
197 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
198 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
199 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
200 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
201 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!(R]?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
202 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
203 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
204 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
205 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
206 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
207 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
208 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
209 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!(RY?7VB9F:+3YO$A````````````" | ||
210 | + "````````O,;WB)'#1E\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
211 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
212 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
213 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
214 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
215 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
216 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
217 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!(RY?" | ||
218 | + "B)'\"````````````````````````````````````````````````Y?$@:W2E%2%2" | ||
219 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
220 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
221 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
222 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
223 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
224 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
225 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
226 | + "!!!!!!!!!!!!!!!!!!!!%2%2>H.S````````````````````````````````````" | ||
227 | + "````````````````````````````YO(A1E!`!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
228 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
229 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
230 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
231 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
232 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
233 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
234 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!+SIKO,;W````````" | ||
235 | + "````````````````````````````````````````````````````````````````" | ||
236 | + "````B)'\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
237 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
238 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
239 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
240 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
241 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
242 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
243 | + "!!!!!!!!!!!!+SEJY?$@````````````````````````````````````````````" | ||
244 | + "````````````````````````````````````````JK3D%B)3!!!!!!!!!!!!!!!!" | ||
245 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
246 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
247 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
248 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
249 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
250 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
251 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!(RY?YO$@````````````````" | ||
252 | + "````````````````````````````````````````````````````````````````" | ||
253 | + "````````````B9+#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
254 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
255 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
256 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
257 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
258 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
259 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
260 | + "!!!!!!!!O<;W````````````````````````````````````````````````````" | ||
261 | + "````````````````````````````````````````````````;'6E!!!!!!!!!!!!" | ||
262 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
263 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
264 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
265 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
266 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
267 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
268 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!:W2E````````````````````````" | ||
269 | + "````````````````````````````````````````````````````````````````" | ||
270 | + "````````````````````+SIK!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
271 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
272 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
273 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
274 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
275 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
276 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
277 | + "(RY?YO$A````````````````````````````````````````````````````````" | ||
278 | + "````````````````````````````````````````````````````JK3E!!!!!!!!" | ||
279 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
280 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
281 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
282 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
283 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
284 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
285 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!>8*S````````````````````````````" | ||
286 | + "````````````````````````````````````````````````````````````````" | ||
287 | + "````````````````````````+SIJ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
288 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
289 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
290 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
291 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
292 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
293 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
294 | + "YO$@````````````````````````````````````````````````````````````" | ||
295 | + "````````````````````````````````````````````````````````B9+#!!!!" | ||
296 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
297 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
298 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
299 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
300 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
301 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
302 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!1E!`````````````````````````````````" | ||
303 | + "````````````````````````````````````````````````````````````````" | ||
304 | + "````````````````````````YO$A!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
305 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
306 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
307 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
308 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
309 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
310 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!;'6F" | ||
311 | + "````````````````````````````````````````````````````````````````" | ||
312 | + "````````````````````````````````````````````````````````````+SIK" | ||
313 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
314 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
315 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
316 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
317 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
318 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
319 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!J[3E````````````````````````````````" | ||
320 | + "````````````````````````````````````````````````````````````````" | ||
321 | + "````````````````````````````4EN,!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
322 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
323 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
324 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
325 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
326 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
327 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!JK/D" | ||
328 | + "````````````````````````````````````````````````````````````````" | ||
329 | + "````````````````````````````````````````````````````````````:W2E" | ||
330 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
331 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
332 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
333 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
334 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
335 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
336 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````````````````" | ||
337 | + "````````````````````````````````````````````````````````````````" | ||
338 | + "````````````````````````````:W2E!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
339 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
340 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
341 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
342 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
343 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
344 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````" | ||
345 | + "````````````````````````````````````````````````````````````````" | ||
346 | + "````````````````````````````````````````````````````````````:W2E" | ||
347 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
348 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
349 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
350 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
351 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
352 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
353 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!O<;W````````````````````````````````" | ||
354 | + "````````````````````````````````````````````````````````````````" | ||
355 | + "````````````````````````````;'6F!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
356 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
357 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.D1U.T5U.T5V.T5U" | ||
358 | + ".T5V.T5V.T5U.T5U%2%2!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
359 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
360 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
361 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!JK/D" | ||
362 | + "````````````````````````````````````````````````````````````````" | ||
363 | + "````````````````````````````````````````````````````````````7F>8" | ||
364 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
365 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.T5U:W6E" | ||
366 | + "F:+3JK3D````````````````````````````````````````````````T-L+JK/D" | ||
367 | + ":W2E1E!`(R]@!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
368 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
369 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
370 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!>8*S````````````````````````````````" | ||
371 | + "````````````````````````````````````````````````````````````````" | ||
372 | + "````````````````````````````.D1U!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
373 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
374 | + "!!!!!!!!(R]?7FB8JK3E````````````````````````````````````````````" | ||
375 | + "````````````````````````````````````````````O<;W>H*S+SIK!!!!!!!!" | ||
376 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
377 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
378 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1D]`" | ||
379 | + "````````````````````````````````````````````````````````````````" | ||
380 | + "````````````````````````````````````````````````````````````!!!!" | ||
381 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
382 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!%B)24ER,O<;W````````````````````````" | ||
383 | + "````````````````````````````````````````````````````````````````" | ||
384 | + "````````````````````````T-L,>H*S)\"]@!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
385 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
386 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
387 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!%B)2````````````````````````````````" | ||
388 | + "````````````````````````````````````````````````````````````````" | ||
389 | + "````````````````````````F:+3!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
390 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)\"]@B)'\"YO(A" | ||
391 | + "````````````````````````````````````````````````````````````````" | ||
392 | + "````````````````````````````````````````````````````````````````" | ||
393 | + "````J[3E.T5U!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
394 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
395 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
396 | + "B)'\"````````````````````````````````````````````````````````````" | ||
397 | + "````````````````````````````````````````````````````````1E\"!!!!!" | ||
398 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
399 | + "!!!!!!!!!!!!)\"]@B)'\"````````````````````````````````````````````" | ||
400 | + "````````````````````````````````````````````````````````````````" | ||
401 | + "````````````````````````````````````````````J[3E.T5V!!!!!!!!!!!!" | ||
402 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
403 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
404 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!+SIJ````````````````````````````" | ||
405 | + "````````````````````````````````````````````````````````````````" | ||
406 | + "````````````````````T-H+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
407 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!:W2EYO$A````````````````" | ||
408 | + "````````````````````````````````````````````````````````````````" | ||
409 | + "````````````````````````````````````````````````````````````````" | ||
410 | + "````````````````````FJ/3(RY?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
411 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
412 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
413 | + "!!!!B)'\"````````````````````````````````````````````````````````" | ||
414 | + "````````````````````````````````````````````````````1D]`!!!!!!!!" | ||
415 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
416 | + ".T5VT-L+````````````````````````````````````````````````````````" | ||
417 | + "````````````````````````````````````````````````````````````````" | ||
418 | + "````````````````````````````````````````````````````````YO$A7VB9" | ||
419 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
420 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
421 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!%2%2YO$A````````````````````" | ||
422 | + "````````````````````````````````````````````````````````````````" | ||
423 | + "````````````````F:+3!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
424 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!>8*S````````````````````````````````" | ||
425 | + "````````````````````````````````````````````````````````````````" | ||
426 | + "````````````````````````````````````````````````````````````````" | ||
427 | + "````````````````````````````````J[3E(RY?!!!!!!!!!!!!!!!!!!!!!!!!" | ||
428 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
429 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
430 | + "!!!!!!!!+SIJ````````````````````````````````````````````````````" | ||
431 | + "````````````````````````````````````````````O<;W%2%2!!!!!!!!!!!!" | ||
432 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!%2%2O<;W````" | ||
433 | + "````````````````````````````````````````````````````````````````" | ||
434 | + "````````````````````````````````````````````````````````````````" | ||
435 | + "````````````````````````````````````````````````````````````````" | ||
436 | + "````YO$A.T5U!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
437 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
438 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!4EN,````````````````" | ||
439 | + "````````````````````````````````````````````````````````````````" | ||
440 | + "````````O<;W%B%2!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
441 | + "!!!!!!!!!!!!!!!!+SEJYO$A````````````````````````````````````````" | ||
442 | + "````````````````````````````````````````````````````````````````" | ||
443 | + "````````````````````````````````````````````````````````````````" | ||
444 | + "````````````````````````````````````````````4ER,!!!!!!!!!!!!!!!!" | ||
445 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
446 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
447 | + "!!!!!!!!!!!!!!!!1E!`YO$A````````````````````````````````````````" | ||
448 | + "````````````````````````````````````O<;W%B)2!!!!!!!!!!!!!!!!!!!!" | ||
449 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!+SIJYO$A````````````" | ||
450 | + "````````````````````````````````````````````````````````````````" | ||
451 | + "````````````````````````````````````````````````````````````````" | ||
452 | + "````````````````````````````````````````````````````````````````" | ||
453 | + "````````````````B)'\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
454 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
455 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!+SIJO<;W````" | ||
456 | + "````````````````````````````````````````````````````````````````" | ||
457 | + ">H*S%B)3!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
458 | + "!!!!!!!!1D]`YO$A````````````````````````````````````````````````" | ||
459 | + "````````````````````````````````````````````````````````````````" | ||
460 | + "````````````````````````````````````````````````````````````````" | ||
461 | + "````````````````````````````````````````````````````B)'\"!!!!!!!!" | ||
462 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
463 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
464 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!4UR,T=L,````````````````````````````" | ||
465 | + "````````````````````````JK/D.T5V!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
466 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!+SIKYO$@````````````````````" | ||
467 | + "````````````````````````````````````````````````````````````````" | ||
468 | + "````````````````````````````````````````````````````````````````" | ||
469 | + "````````````````````````````````````````````````````````````````" | ||
470 | + "````````````````````````B)'\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
471 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
472 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
473 | + "!!!!1D]`B)'\"YO$@````````````````````````````T-L,>8*S+SIK!!!!!!!!" | ||
474 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
475 | + ",#IKYO$A````````````````````````````````````````````````````````" | ||
476 | + "````````````````````````````````````````````````````````````````" | ||
477 | + "````````````````````````````````````````````````````````````````" | ||
478 | + "````````````````````````````````````````````````````````````4UR," | ||
479 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
480 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
481 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)\"]@.T5V.D5U.T5V" | ||
482 | + ".T5U.T5U%2%2!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
483 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!%2%2T-L+````````````````````````````" | ||
484 | + "````````````````````````````````````````````````````````````````" | ||
485 | + "````````````````````````````````````````````````````````````````" | ||
486 | + "````````````````````````````````````````````````````````````````" | ||
487 | + "````````````````````````````````1D]`!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
488 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
489 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
490 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
491 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!JK/D" | ||
492 | + "````````````````````````````````````````````````````````````````" | ||
493 | + "````````````````````````````````````````````````````````````````" | ||
494 | + "````````````````````````````````````````````````````````````````" | ||
495 | + "````````````````````````````````````````````````````````````````" | ||
496 | + "Y?$@)\"]@!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
497 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
498 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
499 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
500 | + "!!!!!!!!!!!!!!!!!!!!!!!!7F>8````````````````````````````````````" | ||
501 | + "````````````````````````````````````````````````````````````````" | ||
502 | + "````````````````````````````````````````````````````````````````" | ||
503 | + "````````````````````````````````````````````````````````````````" | ||
504 | + "````````````````````````````````````JK/D!!!!!!!!!!!!!!!!!!!!!!!!" | ||
505 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
506 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
507 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
508 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!(R]?YO$A````" | ||
509 | + "````````````````````````````````````````````````````````````````" | ||
510 | + "````````````````````````````````````````````````````````````````" | ||
511 | + "````````````````````````````````````````````````````````````````" | ||
512 | + "````````````````````````````````````````````````````````````````" | ||
513 | + "````````7F>8!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
514 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
515 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
516 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
517 | + "!!!!!!!!!!!!!!!!!!!!JK/D````````````````````````````````````````" | ||
518 | + "````````````````````````````````````````````````````````````````" | ||
519 | + "````````````````````````````````````````````````````````````````" | ||
520 | + "````````````````````````````````````````````````````````````````" | ||
521 | + "````````````````````````````````````````YO$A(R]?!!!!!!!!!!!!!!!!" | ||
522 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
523 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
524 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
525 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1D]`````````````" | ||
526 | + "````````````````````````````````````````````````````````````````" | ||
527 | + "````````````````````````````````````````````````````````````````" | ||
528 | + "````````````````````````````````````````````````````````````````" | ||
529 | + "````````````````````````````````````````````````````````````````" | ||
530 | + "````````````B)'\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
531 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
532 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
533 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
534 | + "!!!!!!!!!!!!!!!!T-L+````````````````````````````````````````````" | ||
535 | + "````````````````````````````````````````````````````````````````" | ||
536 | + "````````````````````````````````````````````````````````````````" | ||
537 | + "````````````````````````````````````````````````````````````````" | ||
538 | + "````````````````````````````````````````````````+SEJ!!!!!!!!!!!!" | ||
539 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
540 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
541 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
542 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!4EN,````````````````" | ||
543 | + "````````````````````````````````````````````````````````````````" | ||
544 | + "````````````````````````````````````````````````````````````````" | ||
545 | + "````````````````````````````````````````````````````````````````" | ||
546 | + "````````````````````````````````````````````````````````````````" | ||
547 | + "````````````````B)'\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
548 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
549 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
550 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
551 | + "!!!!!!!!!!!!O<;W````````````````````````````````````````````````" | ||
552 | + "````````````````````````````````````````````````````````````````" | ||
553 | + "````````````````````````````````````````````````````````````````" | ||
554 | + "````````````````````````````````````````````````````````````````" | ||
555 | + "````````````````````````````````````````````````````(R]?!!!!!!!!" | ||
556 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
557 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
558 | + "!!!!!!!!(R]@7F>8F:+3T=L,````````````O<;WB9+#4ER,%B)3!!!!!!!!!!!!" | ||
559 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!+SIK````````````````````" | ||
560 | + "````````````````````````````````````````````````````````````````" | ||
561 | + "````````````````````````````````````````````````YO$AJ[3E:W2E:W2E" | ||
562 | + ";'6F:W2EFJ+3T-L+````````````````````````````````````````````````" | ||
563 | + "````````````````````````````````````````````````````````````````" | ||
564 | + "````````````````````>8*S!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
565 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
566 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!(RY?B9+#````````````````````````" | ||
567 | + "````````````````YO$@;'6E%2%2!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
568 | + "!!!!!!!!B)'\"````````````````````````````````````````````````````" | ||
569 | + "````````````````````````````````````````````````````````````````" | ||
570 | + "````````F:+31E!`!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!,#IK>H*SYO$@````" | ||
571 | + "````````````````````````````````````````````````````````````````" | ||
572 | + "````````````````````````````````````````````````````Y?$@!!!!!!!!" | ||
573 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
574 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!;'6E" | ||
575 | + "````````````````````````````````````````````````````````YO$A.T5V" | ||
576 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!YO(A````````````````````" | ||
577 | + "````````````````````````````````````````````````````````````````" | ||
578 | + "````````````````````````````````O<;W.T5V!!!!!!!!!!!!!!!!!!!!!!!!" | ||
579 | + "!!!!!!!!!!!!!!!!!!!!!!!!%2%2>8*S````````````````````````````````" | ||
580 | + "````````````````````````````````````````````````````````````````" | ||
581 | + "````````````````````````1E\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
582 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
583 | + "!!!!!!!!!!!!!!!!!!!!!!!!B)'\"````````````````````````````````````" | ||
584 | + "````````````````````````````````4ER,!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
585 | + "!!!!.T5U````````````````````````````````````````````````````````" | ||
586 | + "````````````````````````````````````````````````````````````B)'\"" | ||
587 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
588 | + "1E!`Y?$@````````````````````````````````````````````````````````" | ||
589 | + "````````````````````````````````````````````````````````>8*S!!!!" | ||
590 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
591 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!B)'\"````````" | ||
592 | + "````````````````````````````````````````````````````````````````" | ||
593 | + "````4EN,!!!!!!!!!!!!!!!!!!!!!!!!!!!!;'6E````````````````````````" | ||
594 | + "````````````````````````````````````````````````````````````````" | ||
595 | + "````````````````````````4ER,!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
596 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!+SIJYO$A````````````````````" | ||
597 | + "````````````````````````````````````````````````````````````````" | ||
598 | + "````````````````````````T-L+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
599 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
600 | + "!!!!!!!!!!!!!!!!:W2E````````````````````````````````````````````" | ||
601 | + "````````````````````````````````````````+SIK!!!!!!!!!!!!!!!!!!!!" | ||
602 | + "!!!!JK3D````````````````````````````````````````````````````````" | ||
603 | + "````````````````````````````````````````````````````B9+#!!!!!!!!" | ||
604 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
605 | + "!!!!!!!!.T5V````````````````````````````````````````````````````" | ||
606 | + "````````````````````````````````````````````````````````````%2%2" | ||
607 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
608 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!(R]?````````````````" | ||
609 | + "````````````````````````````````````````````````````````````````" | ||
610 | + "````````T-L+!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````````" | ||
611 | + "````````````````````````````````````````````````````````````````" | ||
612 | + "````````````````T-H+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
613 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!:W2E````````````````" | ||
614 | + "````````````````````````````````````````````````````````````````" | ||
615 | + "````````````````````````````.D1U!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
616 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
617 | + "!!!!!!!!!!!!B)'\"````````````````````````````````````````````````" | ||
618 | + "````````````````````````````````````````````4EN,!!!!!!!!!!!!!!!!" | ||
619 | + "+SIK````````````````````````````````````````````````````````````" | ||
620 | + "````````````````````````````````````````````````.D1U!!!!!!!!!!!!" | ||
621 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
622 | + "!!!!!!!!!!!!%2%2YO(A````````````````````````````````````````````" | ||
623 | + "````````````````````````````````````````````````````````````:W2E" | ||
624 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
625 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)\"]@````````````````````" | ||
626 | + "````````````````````````````````````````````````````````````````" | ||
627 | + "````````````T=L,!!!!!!!!!!!!!!!!.T5U````````````````````````````" | ||
628 | + "````````````````````````````````````````````````````````````````" | ||
629 | + "````````````T=L,!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
630 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!;'6F````````````" | ||
631 | + "````````````````````````````````````````````````````````````````" | ||
632 | + "````````````````````````````B)'\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
633 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
634 | + "!!!!!!!!7F>8````````````````````````````````````````````````````" | ||
635 | + "````````````````````````````````````````````````+SIK!!!!!!!!!!!!" | ||
636 | + "7F>8````````````````````````````````````````````````````````````" | ||
637 | + "````````````````````````````````````````````;'6F!!!!!!!!!!!!!!!!" | ||
638 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
639 | + "!!!!!!!!!!!!!!!!+SIJ````````````````````````````````````````````" | ||
640 | + "````````````````````````````````````````````````````````````J[3E" | ||
641 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
642 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!F:+3````````````````````" | ||
643 | + "````````````````````````````````````````````````````````````````" | ||
644 | + "````````````````7F>8!!!!!!!!!!!!;'6E````````````````````````````" | ||
645 | + "````````````````````````````````````````````````````````````````" | ||
646 | + "````````````.T5V!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
647 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!YO$A````````" | ||
648 | + "````````````````````````````````````````````````````````````````" | ||
649 | + "````````````````````````````JK/D!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
650 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
651 | + "!!!!!!!!O<;W````````````````````````````````````````````````````" | ||
652 | + "````````````````````````````````````````````````>8*S!!!!!!!!!!!!" | ||
653 | + ";'6F````````````````````````````````````````````````````````````" | ||
654 | + "````````````````````````````````````````````+SIJ!!!!!!!!!!!!!!!!" | ||
655 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
656 | + "!!!!!!!!!!!!!!!!!!!!JK3D````````````````````````````````````````" | ||
657 | + "````````````````````````````````````````````````````````````O<;W" | ||
658 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
659 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````" | ||
660 | + "````````````````````````````````````````````````````````````````" | ||
661 | + "````````````````JK/D!!!!!!!!!!!!;'6E````````````````````````````" | ||
662 | + "````````````````````````````````````````````````````````````````" | ||
663 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
664 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!J[3E````````" | ||
665 | + "````````````````````````````````````````````````````````````````" | ||
666 | + "````````````````````````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
667 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
668 | + "!!!!!!!!````````````````````````````````````````````````````````" | ||
669 | + "````````````````````````````````````````````````JK3D!!!!!!!!!!!!" | ||
670 | + ";'6F````````````````````````````````````````````````````````````" | ||
671 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
672 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
673 | + "!!!!!!!!!!!!!!!!!!!!JK/D````````````````````````````````````````" | ||
674 | + "````````````````````````````````````````````````````````````````" | ||
675 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
676 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````" | ||
677 | + "````````````````````````````````````````````````````````````````" | ||
678 | + "````````````````JK/D!!!!!!!!!!!!:W2E````````````````````````````" | ||
679 | + "````````````````````````````````````````````````````````````````" | ||
680 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
681 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!JK/D````````" | ||
682 | + "````````````````````````````````````````````````````````````````" | ||
683 | + "````````````````````````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
684 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
685 | + "!!!!!!!!````````````````````````````````````````````````````````" | ||
686 | + "````````````````````````````````````````````````JK/D!!!!!!!!!!!!" | ||
687 | + ";'6F````````````````````````````````````````````````````````````" | ||
688 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
689 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
690 | + "!!!!!!!!!!!!!!!!!!!!JK3E````````````````````````````````````````" | ||
691 | + "````````````````````````````````````````````````````````````````" | ||
692 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
693 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````" | ||
694 | + "````````````````````````````````````````````````````````````````" | ||
695 | + "````````````````JK3E!!!!!!!!!!!!:W2E````````````````````````````" | ||
696 | + "````````````````````````````````````````````````````````````````" | ||
697 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
698 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!J[3E````````" | ||
699 | + "````````````````````````````````````````````````````````````````" | ||
700 | + "````````````````````````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
701 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
702 | + "!!!!!!!!````````````````````````````````````````````````````````" | ||
703 | + "````````````````````````````````````````````````JK/D!!!!!!!!!!!!" | ||
704 | + ";'6F````````````````````````````````````````````````````````````" | ||
705 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
706 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
707 | + "!!!!!!!!!!!!!!!!!!!!JK/D````````````````````````````````````````" | ||
708 | + "````````````````````````````````````````````````````````````````" | ||
709 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
710 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````" | ||
711 | + "````````````````````````````````````````````````````````````````" | ||
712 | + "````````````````JK3E!!!!!!!!!!!!;'6E````````````````````````````" | ||
713 | + "````````````````````````````````````````````````````````````````" | ||
714 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
715 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!J[3E````````" | ||
716 | + "````````````````````````````````````````````````````````````````" | ||
717 | + "````````````````````````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
718 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
719 | + "!!!!!!!!````````````````````````````````````````````````````````" | ||
720 | + "````````````````````````````````````````````````JK/D!!!!!!!!!!!!" | ||
721 | + ":W2E````````````````````````````````````````````````````````````" | ||
722 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
723 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
724 | + "!!!!!!!!!!!!!!!!!!!!J[3E````````````````````````````````````````" | ||
725 | + "````````````````````````````````````````````````````````````````" | ||
726 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
727 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````" | ||
728 | + "````````````````````````````````````````````````````````````````" | ||
729 | + "````````````````JK/D!!!!!!!!!!!!;'6E````````````````````````````" | ||
730 | + "````````````````````````````````````````````````````````````````" | ||
731 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
732 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!JK3E````````" | ||
733 | + "````````````````````````````````````````````````````````````````" | ||
734 | + "````````````````````````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
735 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
736 | + "!!!!!!!!````````````````````````````````````````````````````````" | ||
737 | + "````````````````````````````````````````````````JK3D!!!!!!!!!!!!" | ||
738 | + ";'6E````````````````````````````````````````````````````````````" | ||
739 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
740 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
741 | + "!!!!!!!!!!!!!!!!!!!!J[3E````````````````````````````````````````" | ||
742 | + "````````````````````````````````````````````````````````````````" | ||
743 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
744 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````" | ||
745 | + "````````````````````````````````````````````````````````````````" | ||
746 | + "````````````````JK/D!!!!!!!!!!!!:W2E````````````````````````````" | ||
747 | + "````````````````````````````````````````````````````````````````" | ||
748 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
749 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!JK/D````````" | ||
750 | + "````````````````````````````````````````````````````````````````" | ||
751 | + "````````````````````````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
752 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
753 | + "!!!!!!!!````````````````````````````````````````````````````````" | ||
754 | + "````````````````````````````````````````````````JK3E!!!!!!!!!!!!" | ||
755 | + ":W2E````````````````````````````````````````````````````````````" | ||
756 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
757 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
758 | + "!!!!!!!!!!!!!!!!!!!!JK3E````````````````````````````````````````" | ||
759 | + "````````````````````````````````````````````````````````````````" | ||
760 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
761 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````" | ||
762 | + "````````````````````````````````````````````````````````````````" | ||
763 | + "````````````````JK/D!!!!!!!!!!!!;'6E````````````````````````````" | ||
764 | + "````````````````````````````````````````````````````````````````" | ||
765 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
766 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!JK/D````````" | ||
767 | + "````````````````````````````````````````````````````````````````" | ||
768 | + "````````````````````````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
769 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
770 | + "!!!!!!!!````````````````````````````````````````````````````````" | ||
771 | + "````````````````````````````````````````````````JK/D!!!!!!!!!!!!" | ||
772 | + ":W2E````````````````````````````````````````````````````````````" | ||
773 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
774 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
775 | + "!!!!!!!!!!!!!!!!!!!!JK/D````````````````````````````````````````" | ||
776 | + "````````````````````````````````````````````````````````````````" | ||
777 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
778 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````" | ||
779 | + "````````````````````````````````````````````````````````````````" | ||
780 | + "````````````````JK/D!!!!!!!!!!!!:W2E````````````````````````````" | ||
781 | + "````````````````````````````````````````````````````````````````" | ||
782 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
783 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!JK3E````````" | ||
784 | + "````````````````````````````````````````````````````````````````" | ||
785 | + "````````````````````````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
786 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
787 | + "!!!!!!!!````````````````````````````````````````````````````````" | ||
788 | + "````````````````````````````````````````````````JK/D!!!!!!!!!!!!" | ||
789 | + ";'6E````````````````````````````````````````````````````````````" | ||
790 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
791 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
792 | + "!!!!!!!!!!!!!!!!!!!!JK3E````````````````````````````````````````" | ||
793 | + "````````````````````````````````````````````````````````````````" | ||
794 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
795 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````" | ||
796 | + "````````````````````````````````````````````````````````````````" | ||
797 | + "````````````````JK3E!!!!!!!!!!!!;'6E````````````````````````````" | ||
798 | + "````````````````````````````````````````````````````````````````" | ||
799 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
800 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!JK3D````````" | ||
801 | + "````````````````````````````````````````````````````````````````" | ||
802 | + "````````````````````````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
803 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
804 | + "!!!!!!!!````````````````````````````````````````````````````````" | ||
805 | + "````````````````````````````````````````````````JK/D!!!!!!!!!!!!" | ||
806 | + ":W2E````````````````````````````````````````````````````````````" | ||
807 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
808 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
809 | + "!!!!!!!!!!!!!!!!!!!!JK/D````````````````````````````````````````" | ||
810 | + "````````````````````````````````````````````````````````````````" | ||
811 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
812 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````" | ||
813 | + "````````````````````````````````````````````````````````````````" | ||
814 | + "````````````````JK3E!!!!!!!!!!!!;'6E````````````````````````````" | ||
815 | + "````````````````````````````````````````````````````````````````" | ||
816 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
817 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!JK/D````````" | ||
818 | + "````````````````````````````````````````````````````````````````" | ||
819 | + "````````````````````````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
820 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
821 | + "!!!!!!!!````````````````````````````````````````````````````````" | ||
822 | + "````````````````````````````````````````````````JK/D!!!!!!!!!!!!" | ||
823 | + ":W2E````````````````````````````````````````````````````````````" | ||
824 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
825 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
826 | + "!!!!!!!!!!!!!!!!!!!!JK/D````````````````````````````````````````" | ||
827 | + "````````````````````````````````````````````````````````````````" | ||
828 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
829 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````" | ||
830 | + "````````````````````````````````````````````````````````````````" | ||
831 | + "````````````````J[3E!!!!!!!!!!!!;'6F````````````````````````````" | ||
832 | + "````````````````````````````````````````````````````````````````" | ||
833 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
834 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!JK/D````````" | ||
835 | + "````````````````````````````````````````````````````````````````" | ||
836 | + "````````````````````````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
837 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
838 | + "!!!!!!!!````````````````````````````````````````````````````````" | ||
839 | + "````````````````````````````````````````````````J[3E!!!!!!!!!!!!" | ||
840 | + ";'6F````````````````````````````````````````````````````````````" | ||
841 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
842 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
843 | + "!!!!!!!!!!!!!!!!!!!!JK/D````````````````````````````````````````" | ||
844 | + "````````````````````````````````````````````````````````````````" | ||
845 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
846 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````" | ||
847 | + "````````````````````````````````````````````````````````````````" | ||
848 | + "````````````````JK/D!!!!!!!!!!!!:W2E````````````````````````````" | ||
849 | + "````````````````````````````````````````````````````````````````" | ||
850 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
851 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!JK3D````````" | ||
852 | + "````````````````````````````````````````````````````````````````" | ||
853 | + "````````````````````````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
854 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
855 | + "!!!!!!!!````````````````````````````````````````````````````````" | ||
856 | + "````````````````````````````````````````````````JK3D!!!!!!!!!!!!" | ||
857 | + ";'6F````````````````````````````````````````````````````````````" | ||
858 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
859 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
860 | + "!!!!!!!!!!!!!!!!!!!!J[3E````````````````````````````````````````" | ||
861 | + "````````````````````````````````````````````````````````````````" | ||
862 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
863 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````" | ||
864 | + "````````````````````````````````````````````````````````````````" | ||
865 | + "````````````````JK/D!!!!!!!!!!!!;'6E````````````````````````````" | ||
866 | + "````````````````````````````````````````````````````````````````" | ||
867 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
868 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!JK/D````````" | ||
869 | + "````````````````````````````````````````````````````````````````" | ||
870 | + "````````````````````````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
871 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
872 | + "!!!!!!!!````````````````````````````````````````````````````````" | ||
873 | + "````````````````````````````````````````````````JK3D!!!!!!!!!!!!" | ||
874 | + ":W2E````````````````````````````````````````````````````````````" | ||
875 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
876 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
877 | + "!!!!!!!!!!!!!!!!!!!!JK3D````````````````````````````````````````" | ||
878 | + "````````````````````````````````````````````````````````````````" | ||
879 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
880 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````" | ||
881 | + "````````````````````````````````````````````````````````````````" | ||
882 | + "````````````````JK/D!!!!!!!!!!!!:W2E````````````````````````````" | ||
883 | + "````````````````````````````````````````````````````````````````" | ||
884 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
885 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!J[3E````````" | ||
886 | + "````````````````````````````````````````````````````````````````" | ||
887 | + "````````````````````````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
888 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
889 | + "!!!!!!!!````````````````````````````````````````````````````````" | ||
890 | + "````````````````````````````````````````````````JK/D!!!!!!!!!!!!" | ||
891 | + ";'6E````````````````````````````````````````````````````````````" | ||
892 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
893 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
894 | + "!!!!!!!!!!!!!!!!!!!!JK/D````````````````````````````````````````" | ||
895 | + "````````````````````````````````````````````````````````````````" | ||
896 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
897 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````" | ||
898 | + "````````````````````````````````````````````````````````````````" | ||
899 | + "````````````````J[3E!!!!!!!!!!!!;'6E````````````````````````````" | ||
900 | + "````````````````````````````````````````````````````````````````" | ||
901 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
902 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!JK/D````````" | ||
903 | + "````````````````````````````````````````````````````````````````" | ||
904 | + "````````````````````````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
905 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
906 | + "!!!!!!!!````````````````````````````````````````````````````````" | ||
907 | + "````````````````````````````````````````````````JK/D!!!!!!!!!!!!" | ||
908 | + ";'6E````````````````````````````````````````````````````````````" | ||
909 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
910 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
911 | + "!!!!!!!!!!!!!!!!!!!!JK/D````````````````````````````````````````" | ||
912 | + "````````````````````````````````````````````````````````````````" | ||
913 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
914 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````" | ||
915 | + "````````````````````````````````````````````````````````````````" | ||
916 | + "````````````````JK3D!!!!!!!!!!!!:W2E````````````````````````````" | ||
917 | + "````````````````````````````````````````````````````````````````" | ||
918 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
919 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!JK/D````````" | ||
920 | + "````````````````````````````````````````````````````````````````" | ||
921 | + "````````````````````````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
922 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
923 | + "!!!!!!!!````````````````````````````````````````````````````````" | ||
924 | + "````````````````````````````````````````````````JK3D!!!!!!!!!!!!" | ||
925 | + ";'6E````````````````````````````````````````````````````````````" | ||
926 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
927 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
928 | + "!!!!!!!!!!!!!!!!!!!!JK/D````````````````````````````````````````" | ||
929 | + "````````````````````````````````````````````````````````````````" | ||
930 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
931 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````" | ||
932 | + "````````````````````````````````````````````````````````````````" | ||
933 | + "````````````````J[3E!!!!!!!!!!!!:W2E````````````````````````````" | ||
934 | + "````````````````````````````````````````````````````````````````" | ||
935 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
936 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!JK3E````````" | ||
937 | + "````````````````````````````````````````````````````````````````" | ||
938 | + "````````````````````````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
939 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
940 | + "!!!!!!!!````````````````````````````````````````````````````````" | ||
941 | + "````````````````````````````````````````````````JK3D!!!!!!!!!!!!" | ||
942 | + ";'6E````````````````````````````````````````````````````````````" | ||
943 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
944 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
945 | + "!!!!!!!!!!!!!!!!!!!!JK3D````````````````````````````````````````" | ||
946 | + "````````````````````````````````````````````````````````````````" | ||
947 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
948 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````" | ||
949 | + "````````````````````````````````````````````````````````````````" | ||
950 | + "````````````````J[3E!!!!!!!!!!!!;'6F````````````````````````````" | ||
951 | + "````````````````````````````````````````````````````````````````" | ||
952 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
953 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!JK/D````````" | ||
954 | + "````````````````````````````````````````````````````````````````" | ||
955 | + "````````````````````````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
956 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
957 | + "!!!!!!!!````````````````````````````````````````````````````````" | ||
958 | + "````````````````````````````````````````````````JK/D!!!!!!!!!!!!" | ||
959 | + ":W2E````````````````````````````````````````````````````````````" | ||
960 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
961 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
962 | + "!!!!!!!!!!!!!!!!!!!!J[3E````````````````````````````````````````" | ||
963 | + "````````````````````````````````````````````````````````````````" | ||
964 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
965 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````" | ||
966 | + "````````````````````````````````````````````````````````````````" | ||
967 | + "````````````````J[3E!!!!!!!!!!!!;'6F````````````````````````````" | ||
968 | + "````````````````````````````````````````````````````````````````" | ||
969 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
970 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!JK/D````````" | ||
971 | + "````````````````````````````````````````````````````````````````" | ||
972 | + "````````````````````````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
973 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
974 | + "!!!!!!!!````````````````````````````````````````````````````````" | ||
975 | + "````````````````````````````````````````````````JK/D!!!!!!!!!!!!" | ||
976 | + ":W2E````````````````````````````````````````````````````````````" | ||
977 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
978 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
979 | + "!!!!!!!!!!!!!!!!!!!!JK/D````````````````````````````````````````" | ||
980 | + "````````````````````````````````````````````````````````````````" | ||
981 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
982 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````" | ||
983 | + "````````````````````````````````````````````````````````````````" | ||
984 | + "````````````````J[3E!!!!!!!!!!!!;'6F````````````````````````````" | ||
985 | + "````````````````````````````````````````````````````````````````" | ||
986 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
987 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!JK3D````````" | ||
988 | + "````````````````````````````````````````````````````````````````" | ||
989 | + "````````````````````````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
990 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
991 | + "!!!!!!!!````````````````````````````````````````````````````````" | ||
992 | + "````````````````````````````````````````````````JK/D!!!!!!!!!!!!" | ||
993 | + ";'6E````````````````````````````````````````````````````````````" | ||
994 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
995 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
996 | + "!!!!!!!!!!!!!!!!!!!!JK3E````````````````````````````````````````" | ||
997 | + "````````````````````````````````````````````````````````````````" | ||
998 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
999 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````" | ||
1000 | + "````````````````````````````````````````````````````````````````" | ||
1001 | + "````````````````J[3E!!!!!!!!!!!!;'6E````````````````````````````" | ||
1002 | + "````````````````````````````````````````````````````````````````" | ||
1003 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1004 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!JK3E````````" | ||
1005 | + "````````````````````````````````````````````````````````````````" | ||
1006 | + "````````````````````````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1007 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1008 | + "!!!!!!!!````````````````````````````````````````````````````````" | ||
1009 | + "````````````````````````````````````````````````JK3E!!!!!!!!!!!!" | ||
1010 | + ":W2E````````````````````````````````````````````````````````````" | ||
1011 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
1012 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1013 | + "!!!!!!!!!!!!!!!!!!!!JK/D````````````````````````````````````````" | ||
1014 | + "````````````````````````````````````````````````````````````````" | ||
1015 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1016 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````" | ||
1017 | + "````````````````````````````````````````````````````````````````" | ||
1018 | + "````````````````JK/D!!!!!!!!!!!!;'6E````````````````````````````" | ||
1019 | + "````````````````````````````````````````````````````````````````" | ||
1020 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1021 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!JK/D````````" | ||
1022 | + "````````````````````````````````````````````````````````````````" | ||
1023 | + "````````````````````````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1024 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1025 | + "!!!!!!!!````````````````````````````````````````````````````````" | ||
1026 | + "````````````````````````````````````````````````JK/D!!!!!!!!!!!!" | ||
1027 | + ";'6E````````````````````````````````````````````````````````````" | ||
1028 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
1029 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1030 | + "!!!!!!!!!!!!!!!!!!!!JK/D````````````````````````````````````````" | ||
1031 | + "````````````````````````````````````````````````````````````````" | ||
1032 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1033 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!````````````````````````" | ||
1034 | + "````````````````````````````````````````````````````````````````" | ||
1035 | + "````````````````JK3D!!!!!!!!!!!!;'6E````````````````````````````" | ||
1036 | + "````````````````````````````````````````````````````````````````" | ||
1037 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1038 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!J[3E````````" | ||
1039 | + "````````````````````````````````````````````````````````````````" | ||
1040 | + "````````````````````````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1041 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1042 | + "!!!!!!!!````````````````````````````````````````````````````````" | ||
1043 | + "````````````````````````````````````````````````JK3E!!!!!!!!!!!!" | ||
1044 | + ":W2E````````````````````````````````````````````````````````````" | ||
1045 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
1046 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1047 | + "!!!!!!!!!!!!!!!!!!!!J[3E````````````````````````````````````````" | ||
1048 | + "````````````````````````````````````````````````````````````````" | ||
1049 | + "%2%2!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1050 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!+SIK````````````````````````" | ||
1051 | + "````````````````````````````````````````````````````````````````" | ||
1052 | + "````````````````:W2E!!!!!!!!!!!!;'6E````````````````````````````" | ||
1053 | + "````````````````````````````````````````````````````````````````" | ||
1054 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1055 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!>8*S````````" | ||
1056 | + "````````````````````````````````````````````````````````````````" | ||
1057 | + "````````````````````````````````1E!`!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1058 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1059 | + "!!!!7F>8````````````````````````````````````````````````````````" | ||
1060 | + "````````````````````````````````````````````````;'6F!!!!!!!!!!!!" | ||
1061 | + ";'6F````````````````````````````````````````````````````````````" | ||
1062 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
1063 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1064 | + "!!!!!!!!!!!!!!!!!!!!:W2E````````````````````````````````````````" | ||
1065 | + "````````````````````````````````````````````````````````````````" | ||
1066 | + "B)'\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1067 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!O<;X````````````````````````" | ||
1068 | + "````````````````````````````````````````````````````````````````" | ||
1069 | + "````````````````7FB8!!!!!!!!!!!!:W2E````````````````````````````" | ||
1070 | + "````````````````````````````````````````````````````````````````" | ||
1071 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1072 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1E!`````````" | ||
1073 | + "````````````````````````````````````````````````````````````````" | ||
1074 | + "````````````````````````````````````(RY?!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1075 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1076 | + ".T5U````````````````````````````````````````````````````````````" | ||
1077 | + "````````````````````````````````````````````````.D1U!!!!!!!!!!!!" | ||
1078 | + ";'6F````````````````````````````````````````````````````````````" | ||
1079 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
1080 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1081 | + "!!!!!!!!!!!!!!!!!!!!+SIK````````````````````````````````````````" | ||
1082 | + "````````````````````````````````````````````````````````````````" | ||
1083 | + "````JK/D!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1084 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!O<;W````````````````````````````" | ||
1085 | + "````````````````````````````````````````````````````````````````" | ||
1086 | + "````````````````%2%2!!!!!!!!!!!!:W2E````````````````````````````" | ||
1087 | + "````````````````````````````````````````````````````````````````" | ||
1088 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1089 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!YO$A````" | ||
1090 | + "````````````````````````````````````````````````````````````````" | ||
1091 | + "````````````````````````````````````````7F>8!!!!!!!!!!!!!!!!!!!!" | ||
1092 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!>8*S" | ||
1093 | + "````````````````````````````````````````````````````````````````" | ||
1094 | + "````````````````````````````````````````````T=L,!!!!!!!!!!!!!!!!" | ||
1095 | + ":W2E````````````````````````````````````````````````````````````" | ||
1096 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
1097 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1098 | + "!!!!!!!!!!!!!!!!!!!!!!!!F:+3````````````````````````````````````" | ||
1099 | + "````````````````````````````````````````````````````````````````" | ||
1100 | + "````````````4EN,!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1101 | + "!!!!!!!!!!!!!!!!!!!!!!!!4EN,````````````````````````````````````" | ||
1102 | + "````````````````````````````````````````````````````````````````" | ||
1103 | + "````````````B)'\"!!!!!!!!!!!!!!!!:W2E````````````````````````````" | ||
1104 | + "````````````````````````````````````````````````````````````````" | ||
1105 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1106 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!7F>8````" | ||
1107 | + "````````````````````````````````````````````````````````````````" | ||
1108 | + "````````````````````````````````````````````````;'6F!!!!!!!!!!!!" | ||
1109 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!B)'\"````````" | ||
1110 | + "````````````````````````````````````````````````````````````````" | ||
1111 | + "````````````````````````````````````````````1E\"!!!!!!!!!!!!!!!!!" | ||
1112 | + ";'6E````````````````````````````````````````````````````````````" | ||
1113 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
1114 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1115 | + "!!!!!!!!!!!!!!!!!!!!!!!!(RY?````````````````````````````````````" | ||
1116 | + "````````````````````````````````````````````````````````````````" | ||
1117 | + "````````````````````JK3E.D1U!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1118 | + "!!!!!!!!!!!!.T5UO<;W````````````````````````````````````````````" | ||
1119 | + "````````````````````````````````````````````````````````````````" | ||
1120 | + "````````````%2%2!!!!!!!!!!!!!!!!;'6F````````````````````````````" | ||
1121 | + "````````````````````````````````````````````````````````````````" | ||
1122 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1123 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!O<;W" | ||
1124 | + "````````````````````````````````````````````````````````````````" | ||
1125 | + "````````````````````````````````````````````````````````````JK3E" | ||
1126 | + "1E!`%2%2!!!!!!!!!!!!!!!!!!!!!!!!%2%24UR,JK3D````````````````````" | ||
1127 | + "````````````````````````````````````````````````````````````````" | ||
1128 | + "````````````````````````````````````````F:+3!!!!!!!!!!!!!!!!!!!!" | ||
1129 | + ";'6E````````````````````````````````````````````````````````````" | ||
1130 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
1131 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1132 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!4ER,````````````````````````````````" | ||
1133 | + "````````````````````````````````````````````````````````````````" | ||
1134 | + "````````````````````````````````````````O<?XF:+3;'6E:W2EJ[3EO<;W" | ||
1135 | + "````````````````````````````````````````````````````````````````" | ||
1136 | + "````````````````````````````````````````````````````````````````" | ||
1137 | + "````````1D]`!!!!!!!!!!!!!!!!!!!!:W2E````````````````````````````" | ||
1138 | + "````````````````````````````````````````````````````````````````" | ||
1139 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1140 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!%B)2" | ||
1141 | + "YO$A````````````````````````````````````````````````````````````" | ||
1142 | + "````````````````````````````````````````````````````````````````" | ||
1143 | + "````````````````````````````````````````````````````````````````" | ||
1144 | + "````````````````````````````````````````````````````````````````" | ||
1145 | + "````````````````````````````````````T-L+!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1146 | + ";'6E````````````````````````````````````````````````````````````" | ||
1147 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
1148 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1149 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!;'6F````````````````````````````" | ||
1150 | + "````````````````````````````````````````````````````````````````" | ||
1151 | + "````````````````````````````````````````````````````````````````" | ||
1152 | + "````````````````````````````````````````````````````````````````" | ||
1153 | + "````````````````````````````````````````````````````````````````" | ||
1154 | + "````4UR,!!!!!!!!!!!!!!!!!!!!!!!!:W2E````````````````````````````" | ||
1155 | + "````````````````````````````````````````````````````````````````" | ||
1156 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1157 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1158 | + "%B%2YO(A````````````````````````````````````````````````````````" | ||
1159 | + "````````````````````````````````````````````````````````````````" | ||
1160 | + "````````````````````````````````````````````````````````````````" | ||
1161 | + "````````````````````````````````````````````````````````````````" | ||
1162 | + "````````````````````````````````T=L,!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1163 | + ":W2E````````````````````````````````````````````````````````````" | ||
1164 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
1165 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1166 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!;'6E````````````````````````" | ||
1167 | + "````````````````````````````````````````````````````````````````" | ||
1168 | + "````````````````````````````````````````````````````````````````" | ||
1169 | + "````````````````````````````````````````````````````````````````" | ||
1170 | + "````````````````````````````````````````````````````````````````" | ||
1171 | + "4EN,!!!!!!!!!!!!!!!!!!!!!!!!!!!!:W2E````````````````````````````" | ||
1172 | + "````````````````````````````````````````````````````````````````" | ||
1173 | + "````````````!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1174 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1175 | + "!!!!!!!!T-H+````````````````````````````````````````````````````" | ||
1176 | + "````````````````````````````````````````````````````````````````" | ||
1177 | + "````````````````````````````````````````````````````````````````" | ||
1178 | + "````````````````````````````````````````````````````````````````" | ||
1179 | + "````````````````````````````JK/D!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1180 | + ":W2E````````````````````````````````````````````````````````````" | ||
1181 | + "````````````````````````````````````````````!!!!!!!!!!!!!!!!!!!!" | ||
1182 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1183 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.T5V````````````````````" | ||
1184 | + "````````````````````````````````````````````````````````````````" | ||
1185 | + "````````````````````````````````````````````````````````````````" | ||
1186 | + "````````````````````````````````````````````````````````````````" | ||
1187 | + "````````````````````````````````````````````````````````````+SIJ" | ||
1188 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.D5U````````````````````````````" | ||
1189 | + "````````````````````````````````````````````````````````````````" | ||
1190 | + "````````JK/D!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1191 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1192 | + "!!!!!!!!!!!!>8*S````````````````````````````````````````````````" | ||
1193 | + "````````````````````````````````````````````````````````````````" | ||
1194 | + "````````````````````````````````````````````````````````````````" | ||
1195 | + "````````````````````````````````````````````````````````````````" | ||
1196 | + "````````````````````````;'6F!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1197 | + "%B)2````````````````````````````````````````````````````````````" | ||
1198 | + "````````````````````````````````````````>8*S!!!!!!!!!!!!!!!!!!!!" | ||
1199 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1200 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!%B)3O,;W````````````" | ||
1201 | + "````````````````````````````````````````````````````````````````" | ||
1202 | + "````````````````````````````````````````````````````````````````" | ||
1203 | + "````````````````````````````````````````````````````````````````" | ||
1204 | + "````````````````````````````````````````````````````JK3E!!!!!!!!" | ||
1205 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!F:+2````````````````````````" | ||
1206 | + "````````````````````````````````````````````````````````````````" | ||
1207 | + "````````+SIK!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1208 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1209 | + "!!!!!!!!!!!!!!!!(RY?YO$@````````````````````````````````````````" | ||
1210 | + "````````````````````````````````````````````````````````````````" | ||
1211 | + "````````````````````````````````````````````````````````````````" | ||
1212 | + "````````````````````````````````````````````````````````````````" | ||
1213 | + "````````````````T-L+%B)3!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1214 | + "!!!!.D1U````````````````````````````````````````````````````````" | ||
1215 | + "````````````````````````````````````JK/D!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1216 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1217 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!+SIK````````" | ||
1218 | + "````````````````````````````````````````````````````````````````" | ||
1219 | + "````````````````````````````````````````````````````````````````" | ||
1220 | + "````````````````````````````````````````````````````````````````" | ||
1221 | + "````````````````````````````````````````````YO$A+SIK!!!!!!!!!!!!" | ||
1222 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!F:+3````````````````````" | ||
1223 | + "````````````````````````````````````````````````````````````````" | ||
1224 | + "````.T5U!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1225 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1226 | + "!!!!!!!!!!!!!!!!!!!!!!!!4EN,````````````````````````````````````" | ||
1227 | + "````````````````````````````````````````````````````````````````" | ||
1228 | + "````````````````````````````````````````````````````````````````" | ||
1229 | + "````````````````````````````````````````````````````````````````" | ||
1230 | + "````````````+SIJ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1231 | + "!!!!!!!!%2%2YO$@````````````````````````````````````````````````" | ||
1232 | + "````````````````````````````````>8*S!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1233 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1234 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!4EN," | ||
1235 | + "````````````````````````````````````````````````````````````````" | ||
1236 | + "````````````````````````````````````````````````````````````````" | ||
1237 | + "````````````````````````````````````````````````````````````````" | ||
1238 | + "````````````````````````````````````````4EN,!!!!!!!!!!!!!!!!!!!!" | ||
1239 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!+SIK````````````````" | ||
1240 | + "````````````````````````````````````````````````````````````JK3E" | ||
1241 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1242 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1243 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!4UR,````````````````````````````" | ||
1244 | + "````````````````````````````````````````````````````````````````" | ||
1245 | + "````````````````````````````````````````````````````````````````" | ||
1246 | + "````````````````````````````````````````````````````````````````" | ||
1247 | + "YO$@+SIJ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1248 | + "!!!!!!!!!!!!!!!!.T5UYO$A````````````````````````````````````````" | ||
1249 | + "````````````````````````F:+2%2%2!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1250 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1251 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1252 | + "!!!!+SIKYO(A````````````````````````````````````````````````````" | ||
1253 | + "````````````````````````````````````````````````````````````````" | ||
1254 | + "````````````````````````````````````````````````````````````````" | ||
1255 | + "````````````````````````````YO$@+SIK!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1256 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!+SIJO<;W````" | ||
1257 | + "````````````````````````````````````````````````````;'6E!!!!!!!!" | ||
1258 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1259 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1260 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)\"]@O<;W````````````````" | ||
1261 | + "````````````````````````````````````````````````````````````````" | ||
1262 | + "````````````````````````````````````````````````````````````````" | ||
1263 | + "````````````````````````````````````````````````````````JK/D%B)3" | ||
1264 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1265 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!4ER,T=L,````````````````````````````" | ||
1266 | + "````````````B9+#(R]@!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1267 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1268 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1269 | + "!!!!!!!!!!!!%2%2>8*S````````````````````````````````````````````" | ||
1270 | + "````````````````````````````````````````````````````````````````" | ||
1271 | + "````````````````````````````````````````````````````````````````" | ||
1272 | + "````````````````````;'6F!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1273 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1274 | + "!!!!1E!`>H*SJK/DT-L+````````JK3EF:+37F>8(R]?!!!!!!!!!!!!!!!!!!!!" | ||
1275 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1276 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1277 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.D1UT-L+````" | ||
1278 | + "````````````````````````````````````````````````````````````````" | ||
1279 | + "````````````````````````````````````````````````````````````````" | ||
1280 | + "````````````````````````````````````````````O<;W+SIJ!!!!!!!!!!!!" | ||
1281 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1282 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1283 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1284 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1285 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1286 | + "!!!!!!!!!!!!!!!!!!!!!!!!%B)2:W2EYO$A````````````````````````````" | ||
1287 | + "````````````````````````````````````````````````````````````````" | ||
1288 | + "````````````````````````````````````````````````````````````````" | ||
1289 | + "````Y?$@:W2E!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1290 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1291 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1292 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1293 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1294 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1295 | + "(R]?B)'\"````````````````````````````````````````````````````````" | ||
1296 | + "````````````````````````````````````````````````````````````````" | ||
1297 | + "````````````````````````````YO$@:W2E%B)2!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1298 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1299 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1300 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1301 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1302 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1303 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!(R]?>8*SYO$@````````````" | ||
1304 | + "````````````````````````````````````````````````````````````````" | ||
1305 | + "````````````````````````````````````````````````````YO$@;'6E%2%2" | ||
1306 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1307 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1308 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1309 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1310 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1311 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1312 | + "!!!!!!!!!!!!!!!!%2%24UR,JK/D````````````````````````````````````" | ||
1313 | + "````````````````````````````````````````````````````````````````" | ||
1314 | + "````````````F:+34EN,!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1315 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1316 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1317 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1318 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1319 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1320 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!(R]?" | ||
1321 | + "4EN,F:+3YO(A````````````````````````````````````````````````````" | ||
1322 | + "````````````````````````````YO(AF:+34ER,%B)2!!!!!!!!!!!!!!!!!!!!" | ||
1323 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1324 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1325 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1326 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1327 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1328 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1329 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!+SIJ4ER,>8*SJK/DT=L," | ||
1330 | + "````````````````````````````````````````T-L+JK/D>8*S4ER,+SEJ!!!!" | ||
1331 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1332 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1333 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1334 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1335 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1336 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1337 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1338 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!+SIK.T5U.D1U.T5V.T5U(R]?" | ||
1339 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1340 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1341 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1342 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1343 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1344 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1345 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1346 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1347 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1348 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1349 | + "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | ||
1350 | + ""; | ||
1351 | -- | ||
1352 | 1.6.6.1 | ||
1353 | |||
diff --git a/recipes-bsp/u-boot/u-boot/beagleboard/fw_env.config b/recipes-bsp/u-boot/u-boot/beagleboard/fw_env.config deleted file mode 100644 index ba8147a4..00000000 --- a/recipes-bsp/u-boot/u-boot/beagleboard/fw_env.config +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | /dev/mtd5 0x0 0x20000 0x20000 | ||
diff --git a/recipes-bsp/u-boot/u-boot/dont-inline-weak-symbols.patch b/recipes-bsp/u-boot/u-boot/dont-inline-weak-symbols.patch deleted file mode 100644 index 4c37e006..00000000 --- a/recipes-bsp/u-boot/u-boot/dont-inline-weak-symbols.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | diff --git a/lib_arm/board.c b/lib_arm/board.c | ||
2 | index 5d05d9b..0e7fa9a 100644 | ||
3 | --- a/lib_arm/board.c | ||
4 | +++ b/lib_arm/board.c | ||
5 | @@ -122,20 +122,20 @@ void *sbrk (ptrdiff_t increment) | ||
6 | ************************************************************************ | ||
7 | * May be supplied by boards if desired | ||
8 | */ | ||
9 | -void inline __coloured_LED_init (void) {} | ||
10 | -void inline coloured_LED_init (void) __attribute__((weak, alias("__coloured_LED_init"))); | ||
11 | -void inline __red_LED_on (void) {} | ||
12 | -void inline red_LED_on (void) __attribute__((weak, alias("__red_LED_on"))); | ||
13 | -void inline __red_LED_off(void) {} | ||
14 | -void inline red_LED_off(void) __attribute__((weak, alias("__red_LED_off"))); | ||
15 | -void inline __green_LED_on(void) {} | ||
16 | -void inline green_LED_on(void) __attribute__((weak, alias("__green_LED_on"))); | ||
17 | -void inline __green_LED_off(void) {} | ||
18 | -void inline green_LED_off(void)__attribute__((weak, alias("__green_LED_off"))); | ||
19 | -void inline __yellow_LED_on(void) {} | ||
20 | -void inline yellow_LED_on(void)__attribute__((weak, alias("__yellow_LED_on"))); | ||
21 | -void inline __yellow_LED_off(void) {} | ||
22 | -void inline yellow_LED_off(void)__attribute__((weak, alias("__yellow_LED_off"))); | ||
23 | +void __coloured_LED_init (void) {} | ||
24 | +void coloured_LED_init (void) __attribute__((weak, alias("__coloured_LED_init"))); | ||
25 | +void __red_LED_on (void) {} | ||
26 | +void red_LED_on (void) __attribute__((weak, alias("__red_LED_on"))); | ||
27 | +void __red_LED_off(void) {} | ||
28 | +void red_LED_off(void) __attribute__((weak, alias("__red_LED_off"))); | ||
29 | +void __green_LED_on(void) {} | ||
30 | +void green_LED_on(void) __attribute__((weak, alias("__green_LED_on"))); | ||
31 | +void __green_LED_off(void) {} | ||
32 | +void green_LED_off(void)__attribute__((weak, alias("__green_LED_off"))); | ||
33 | +void __yellow_LED_on(void) {} | ||
34 | +void yellow_LED_on(void)__attribute__((weak, alias("__yellow_LED_on"))); | ||
35 | +void __yellow_LED_off(void) {} | ||
36 | +void yellow_LED_off(void)__attribute__((weak, alias("__yellow_LED_off"))); | ||
37 | |||
38 | /************************************************************************ | ||
39 | * Init Utilities * | ||
diff --git a/recipes-bsp/u-boot/u-boot/dont-inline-weak-symbols2.patch b/recipes-bsp/u-boot/u-boot/dont-inline-weak-symbols2.patch deleted file mode 100644 index 5931ccf0..00000000 --- a/recipes-bsp/u-boot/u-boot/dont-inline-weak-symbols2.patch +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | Patch initially created by Ron Lee and archived in OE patchwork at | ||
2 | http://patchwork.openembedded.org/patch/1534/. | ||
3 | |||
4 | GCC 4.4 complains about this now. | ||
5 | |||
6 | Signed-off-by: Ron Lee <ron@debian.org> | ||
7 | --- | ||
8 | lib_arm/board.c | 18 +++++++++--------- | ||
9 | 1 files changed, 9 insertions(+), 9 deletions(-) | ||
10 | |||
11 | --- a/lib_arm/board.c | ||
12 | +++ b/lib_arm/board.c | ||
13 | @@ -124,23 +124,23 @@ | ||
14 | * May be supplied by boards if desired | ||
15 | */ | ||
16 | void inline __coloured_LED_init (void) {} | ||
17 | -void inline coloured_LED_init (void) __attribute__((weak, alias("__coloured_LED_init"))); | ||
18 | +void coloured_LED_init (void) __attribute__((weak, alias("__coloured_LED_init"))); | ||
19 | void inline __red_LED_on (void) {} | ||
20 | -void inline red_LED_on (void) __attribute__((weak, alias("__red_LED_on"))); | ||
21 | +void red_LED_on (void) __attribute__((weak, alias("__red_LED_on"))); | ||
22 | void inline __red_LED_off(void) {} | ||
23 | -void inline red_LED_off(void) __attribute__((weak, alias("__red_LED_off"))); | ||
24 | +void red_LED_off(void) __attribute__((weak, alias("__red_LED_off"))); | ||
25 | void inline __green_LED_on(void) {} | ||
26 | -void inline green_LED_on(void) __attribute__((weak, alias("__green_LED_on"))); | ||
27 | +void green_LED_on(void) __attribute__((weak, alias("__green_LED_on"))); | ||
28 | void inline __green_LED_off(void) {} | ||
29 | -void inline green_LED_off(void)__attribute__((weak, alias("__green_LED_off"))); | ||
30 | +void green_LED_off(void)__attribute__((weak, alias("__green_LED_off"))); | ||
31 | void inline __yellow_LED_on(void) {} | ||
32 | -void inline yellow_LED_on(void)__attribute__((weak, alias("__yellow_LED_on"))); | ||
33 | +void yellow_LED_on(void)__attribute__((weak, alias("__yellow_LED_on"))); | ||
34 | void inline __yellow_LED_off(void) {} | ||
35 | -void inline yellow_LED_off(void)__attribute__((weak, alias("__yellow_LED_off"))); | ||
36 | +void yellow_LED_off(void)__attribute__((weak, alias("__yellow_LED_off"))); | ||
37 | void inline __blue_LED_on(void) {} | ||
38 | -void inline blue_LED_on(void)__attribute__((weak, alias("__blue_LED_on"))); | ||
39 | +void blue_LED_on(void)__attribute__((weak, alias("__blue_LED_on"))); | ||
40 | void inline __blue_LED_off(void) {} | ||
41 | -void inline blue_LED_off(void)__attribute__((weak, alias("__blue_LED_off"))); | ||
42 | +void blue_LED_off(void)__attribute__((weak, alias("__blue_LED_off"))); | ||
43 | |||
44 | /************************************************************************ | ||
45 | * Init Utilities * | ||
diff --git a/recipes-bsp/u-boot/u-boot/dss2.patch b/recipes-bsp/u-boot/u-boot/dss2.patch deleted file mode 100644 index 768743fc..00000000 --- a/recipes-bsp/u-boot/u-boot/dss2.patch +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | From af839210aa4c643506c6c27270a7f823c6bd0d58 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Sat, 8 Jan 2011 19:12:59 +0100 | ||
4 | Subject: [PATCH 01/10] dss2.patch | ||
5 | |||
6 | --- | ||
7 | include/configs/omap3_beagle.h | 15 +++++++++++---- | ||
8 | include/configs/omap3_overo.h | 15 +++++++++++---- | ||
9 | 2 files changed, 22 insertions(+), 8 deletions(-) | ||
10 | |||
11 | diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h | ||
12 | index a3d9cf6..f7899b9 100644 | ||
13 | --- a/include/configs/omap3_beagle.h | ||
14 | +++ b/include/configs/omap3_beagle.h | ||
15 | @@ -156,14 +156,21 @@ | ||
16 | #define CONFIG_EXTRA_ENV_SETTINGS \ | ||
17 | "loadaddr=0x82000000\0" \ | ||
18 | "console=ttyS2,115200n8\0" \ | ||
19 | - "videomode=1024x768@60,vxres=1024,vyres=768\0" \ | ||
20 | - "videospec=omapfb:vram:2M,vram:4M\0" \ | ||
21 | + "vram=12M\0" \ | ||
22 | + "dvimode=1024x768MR-16@60\0" \ | ||
23 | + "defaultdisplay=dvi\0" \ | ||
24 | "mmcargs=setenv bootargs console=${console} " \ | ||
25 | - "video=${videospec},mode:${videomode} " \ | ||
26 | + "vram=${vram} " \ | ||
27 | + "omapfb.mode=dvi:${dvimode} " \ | ||
28 | + "omapfb.debug=y " \ | ||
29 | + "omapdss.def_disp=${defaultdisplay} " \ | ||
30 | "root=/dev/mmcblk0p2 rw " \ | ||
31 | "rootfstype=ext3 rootwait\0" \ | ||
32 | "nandargs=setenv bootargs console=${console} " \ | ||
33 | - "video=${videospec},mode:${videomode} " \ | ||
34 | + "vram=${vram} " \ | ||
35 | + "omapfb.mode=dvi:${dvimode} " \ | ||
36 | + "omapfb.debug=y " \ | ||
37 | + "omapdss.def_disp=${defaultdisplay} " \ | ||
38 | "root=/dev/mtdblock4 rw " \ | ||
39 | "rootfstype=jffs2\0" \ | ||
40 | "loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \ | ||
41 | diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h | ||
42 | index fed6ff5..6162d6c 100644 | ||
43 | --- a/include/configs/omap3_overo.h | ||
44 | +++ b/include/configs/omap3_overo.h | ||
45 | @@ -147,14 +147,21 @@ | ||
46 | #define CONFIG_EXTRA_ENV_SETTINGS \ | ||
47 | "loadaddr=0x82000000\0" \ | ||
48 | "console=ttyS2,115200n8\0" \ | ||
49 | - "videomode=1024x768@60,vxres=1024,vyres=768\0" \ | ||
50 | - "videospec=omapfb:vram:2M,vram:4M\0" \ | ||
51 | + "vram=12M\0" \ | ||
52 | + "dvimode=1024x768MR-16@60\0" \ | ||
53 | + "defaultdisplay=dvi\0" \ | ||
54 | "mmcargs=setenv bootargs console=${console} " \ | ||
55 | - "video=${videospec},mode:${videomode} " \ | ||
56 | + "vram=${vram} " \ | ||
57 | + "omapfb.mode=dvi:${dvimode} " \ | ||
58 | + "omapfb.debug=y " \ | ||
59 | + "omapdss.def_disp=${defaultdisplay} " \ | ||
60 | "root=/dev/mmcblk0p2 rw " \ | ||
61 | "rootfstype=ext3 rootwait\0" \ | ||
62 | "nandargs=setenv bootargs console=${console} " \ | ||
63 | - "video=${videospec},mode:${videomode} " \ | ||
64 | + "vram=${vram} " \ | ||
65 | + "omapfb.mode=dvi:${dvimode} " \ | ||
66 | + "omapfb.debug=y " \ | ||
67 | + "omapdss.def_disp=${defaultdisplay} " \ | ||
68 | "root=/dev/mtdblock4 rw " \ | ||
69 | "rootfstype=jffs2\0" \ | ||
70 | "loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \ | ||
71 | -- | ||
72 | 1.6.6.1 | ||
73 | |||
diff --git a/recipes-bsp/u-boot/u-boot/fw_env.config b/recipes-bsp/u-boot/u-boot/fw_env.config deleted file mode 100644 index d9112c22..00000000 --- a/recipes-bsp/u-boot/u-boot/fw_env.config +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | # Configuration file for fw_(printenv/saveenv) utility. | ||
2 | # Up to two entries are valid, in this case the redundant | ||
3 | # environment sector is assumed present. | ||
4 | # Notice, that the "Number of sectors" is ignored on NOR. | ||
5 | |||
6 | # MTD device name Device offset Env. size Flash sector size Number of sectors | ||
7 | /dev/mtd2 0x0000 0x20000 0x20000 | ||
8 | |||
diff --git a/recipes-bsp/u-boot/u-boot/headphone.patch b/recipes-bsp/u-boot/u-boot/headphone.patch deleted file mode 100644 index dacb30b1..00000000 --- a/recipes-bsp/u-boot/u-boot/headphone.patch +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | From c26fbaf25d06dcec26e1c2b6669345bd08c8be5f Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Sat, 8 Jan 2011 19:16:16 +0100 | ||
4 | Subject: [PATCH 06/10] headphone.patch | ||
5 | |||
6 | --- | ||
7 | board/omap3/beagle/beagle.c | 4 ++-- | ||
8 | board/omap3/beagle/beagle.h | 4 ++-- | ||
9 | 2 files changed, 4 insertions(+), 4 deletions(-) | ||
10 | |||
11 | diff --git a/board/omap3/beagle/beagle.c b/board/omap3/beagle/beagle.c | ||
12 | index 7eb70ee..39073db 100644 | ||
13 | --- a/board/omap3/beagle/beagle.c | ||
14 | +++ b/board/omap3/beagle/beagle.c | ||
15 | @@ -104,12 +104,12 @@ int misc_init_r(void) | ||
16 | power_init_r(); | ||
17 | |||
18 | /* Configure GPIOs to output */ | ||
19 | - writel(~(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), &gpio6_base->oe); | ||
20 | + writel(~(GPIO16 | GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), &gpio6_base->oe); | ||
21 | writel(~(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 | | ||
22 | GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe); | ||
23 | |||
24 | /* Set GPIOs */ | ||
25 | - writel(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1, | ||
26 | + writel(GPIO16 | GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1, | ||
27 | &gpio6_base->setdataout); | ||
28 | writel(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 | | ||
29 | GPIO15 | GPIO14 | GPIO13 | GPIO12, &gpio5_base->setdataout); | ||
30 | diff --git a/board/omap3/beagle/beagle.h b/board/omap3/beagle/beagle.h | ||
31 | index 876dd4f..e77ab43 100644 | ||
32 | --- a/board/omap3/beagle/beagle.h | ||
33 | +++ b/board/omap3/beagle/beagle.h | ||
34 | @@ -115,8 +115,8 @@ const omap3_sysinfo sysinfo = { | ||
35 | MUX_VAL(CP(GPMC_NCS1), (IDIS | PTU | EN | M0)) /*GPMC_nCS1*/\ | ||
36 | MUX_VAL(CP(GPMC_NCS2), (IDIS | PTU | EN | M0)) /*GPMC_nCS2*/\ | ||
37 | MUX_VAL(CP(GPMC_NCS3), (IDIS | PTU | EN | M0)) /*GPMC_nCS3*/\ | ||
38 | - MUX_VAL(CP(GPMC_NCS4), (IDIS | PTU | EN | M0)) /*GPMC_nCS4*/\ | ||
39 | - MUX_VAL(CP(GPMC_NCS5), (IDIS | PTD | DIS | M0)) /*GPMC_nCS5*/\ | ||
40 | + MUX_VAL(CP(GPMC_NCS4), (IDIS | PTU | DIS | M3)) /*GPMC_nCS4 -- GPT9_PWM*/\ | ||
41 | + MUX_VAL(CP(GPMC_NCS5), (IEN | PTD | DIS | M4)) /*GPMC_nCS5 -- PHONES_DETECT GPIO_56*/\ | ||
42 | MUX_VAL(CP(GPMC_NCS6), (IEN | PTD | DIS | M1)) /*SYS_nDMA_REQ2*/\ | ||
43 | MUX_VAL(CP(GPMC_NCS7), (IEN | PTU | EN | M1)) /*SYS_nDMA_REQ3*/\ | ||
44 | MUX_VAL(CP(GPMC_NBE1), (IEN | PTD | DIS | M0)) /*GPMC_nBE1*/\ | ||
45 | -- | ||
46 | 1.6.6.1 | ||
47 | |||
diff --git a/recipes-bsp/u-boot/u-boot/mmcinit.patch b/recipes-bsp/u-boot/u-boot/mmcinit.patch deleted file mode 100644 index a48d9eb9..00000000 --- a/recipes-bsp/u-boot/u-boot/mmcinit.patch +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | From 412e0ab7334defa38c8d3732fb0076f4957843f0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Sat, 8 Jan 2011 19:17:07 +0100 | ||
4 | Subject: [PATCH 09/10] mmcinit.patch | ||
5 | |||
6 | --- | ||
7 | common/cmd_mmc.c | 11 +++++++++++ | ||
8 | 1 files changed, 11 insertions(+), 0 deletions(-) | ||
9 | |||
10 | diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c | ||
11 | index 039fe59..c1958ba 100644 | ||
12 | --- a/common/cmd_mmc.c | ||
13 | +++ b/common/cmd_mmc.c | ||
14 | @@ -91,6 +91,17 @@ U_BOOT_CMD( | ||
15 | "init [dev] - init MMC sub system\n" | ||
16 | "mmc device [dev] - show or set current device\n" | ||
17 | ); | ||
18 | +int do_mmcinit (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) | ||
19 | +{ | ||
20 | + char *argv2[] = {"mmc", "init"}; | ||
21 | + return do_mmc (cmdtp, flag, 2, argv2); | ||
22 | +} | ||
23 | + | ||
24 | +U_BOOT_CMD( | ||
25 | + mmcinit, 1, 0, do_mmcinit, | ||
26 | + "mmcinit - init mmc card\n", | ||
27 | + NULL | ||
28 | +); | ||
29 | #else /* !CONFIG_GENERIC_MMC */ | ||
30 | |||
31 | static void print_mmcinfo(struct mmc *mmc) | ||
32 | -- | ||
33 | 1.6.6.1 | ||
34 | |||
diff --git a/recipes-bsp/u-boot/u-boot/new-pinmux.patch b/recipes-bsp/u-boot/u-boot/new-pinmux.patch deleted file mode 100644 index b64204d3..00000000 --- a/recipes-bsp/u-boot/u-boot/new-pinmux.patch +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | From 71a2717bf4f85bf4cb55b9cad653a4b9bb966489 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Sat, 8 Jan 2011 19:15:25 +0100 | ||
4 | Subject: [PATCH 03/10] newpinmux.patch | ||
5 | |||
6 | --- | ||
7 | board/omap3/beagle/beagle.h | 38 +++++++++++++++++++------------------- | ||
8 | 1 files changed, 19 insertions(+), 19 deletions(-) | ||
9 | |||
10 | diff --git a/board/omap3/beagle/beagle.h b/board/omap3/beagle/beagle.h | ||
11 | index 00b15cb..2ba6a12 100644 | ||
12 | --- a/board/omap3/beagle/beagle.h | ||
13 | +++ b/board/omap3/beagle/beagle.h | ||
14 | @@ -201,16 +201,16 @@ const omap3_sysinfo sysinfo = { | ||
15 | MUX_VAL(CP(MMC1_DAT6), (IEN | PTU | EN | M0)) /*MMC1_DAT6*/\ | ||
16 | MUX_VAL(CP(MMC1_DAT7), (IEN | PTU | EN | M0)) /*MMC1_DAT7*/\ | ||
17 | /*Wireless LAN */\ | ||
18 | - MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M4)) /*GPIO_130*/\ | ||
19 | - MUX_VAL(CP(MMC2_CMD), (IEN | PTU | EN | M4)) /*GPIO_131*/\ | ||
20 | - MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M4)) /*GPIO_132*/\ | ||
21 | - MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M4)) /*GPIO_133*/\ | ||
22 | - MUX_VAL(CP(MMC2_DAT2), (IEN | PTU | EN | M4)) /*GPIO_134*/\ | ||
23 | - MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M4)) /*GPIO_135*/\ | ||
24 | - MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN | M4)) /*GPIO_136*/\ | ||
25 | - MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M4)) /*GPIO_137*/\ | ||
26 | - MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | EN | M4)) /*GPIO_138*/\ | ||
27 | - MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M4)) /*GPIO_139*/\ | ||
28 | + MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M0)) /*MMC2_CLK*/\ | ||
29 | + MUX_VAL(CP(MMC2_CMD), (IEN | PTU | EN | M0)) /*MMC2_CMD*/\ | ||
30 | + MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M0)) /*MMC2_DAT0*/\ | ||
31 | + MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M0)) /*MMC2_DAT1*/\ | ||
32 | + MUX_VAL(CP(MMC2_DAT2), (IEN | PTU | EN | M0)) /*MMC2_DAT2*/\ | ||
33 | + MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M0)) /*MMC2_DAT3*/\ | ||
34 | + MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN | M1)) /*MMC2_DIR_DAT0*/\ | ||
35 | + MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M1)) /*MMC2_DIR_DAT1*/\ | ||
36 | + MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | EN | M1)) /*MMC2_DIR_CMD*/\ | ||
37 | + MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M1)) /*MMC2_CLKIN*/\ | ||
38 | /*Bluetooth*/\ | ||
39 | MUX_VAL(CP(MCBSP3_DX), (IEN | PTD | DIS | M1)) /*UART2_CTS*/\ | ||
40 | MUX_VAL(CP(MCBSP3_DR), (IDIS | PTD | DIS | M1)) /*UART2_RTS*/\ | ||
41 | @@ -225,10 +225,10 @@ const omap3_sysinfo sysinfo = { | ||
42 | MUX_VAL(CP(UART1_RTS), (IDIS | PTD | DIS | M4)) /*GPIO_149*/ \ | ||
43 | MUX_VAL(CP(UART1_CTS), (IDIS | PTD | DIS | M4)) /*GPIO_150*/ \ | ||
44 | MUX_VAL(CP(UART1_RX), (IEN | PTD | DIS | M0)) /*UART1_RX*/\ | ||
45 | - MUX_VAL(CP(MCBSP4_CLKX), (IEN | PTD | DIS | M1)) /*SSI1_DAT_RX*/\ | ||
46 | - MUX_VAL(CP(MCBSP4_DR), (IEN | PTD | DIS | M1)) /*SSI1_FLAG_RX*/\ | ||
47 | - MUX_VAL(CP(MCBSP4_DX), (IEN | PTD | DIS | M1)) /*SSI1_RDY_RX*/\ | ||
48 | - MUX_VAL(CP(MCBSP4_FSX), (IEN | PTD | DIS | M1)) /*SSI1_WAKE*/\ | ||
49 | + MUX_VAL(CP(MCBSP4_CLKX), (IEN | PTU | EN | M4)) /*GPIO_152*/\ | ||
50 | + MUX_VAL(CP(MCBSP4_DR), (IEN | PTU | EN | M4)) /*GPIO_153*/\ | ||
51 | + MUX_VAL(CP(MCBSP4_DX), (IEN | PTU | EN | M4)) /*GPIO_154*/\ | ||
52 | + MUX_VAL(CP(MCBSP4_FSX), (IEN | PTU | EN | M4)) /*GPIO_155*/\ | ||
53 | MUX_VAL(CP(MCBSP1_CLKR), (IDIS | PTD | DIS | M4)) /*GPIO_156*/\ | ||
54 | MUX_VAL(CP(MCBSP1_FSR), (IDIS | PTU | EN | M4)) /*GPIO_157*/\ | ||
55 | MUX_VAL(CP(MCBSP1_DX), (IDIS | PTD | DIS | M4)) /*GPIO_158*/\ | ||
56 | @@ -255,8 +255,8 @@ const omap3_sysinfo sysinfo = { | ||
57 | MUX_VAL(CP(HSUSB0_DATA7), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA7*/\ | ||
58 | MUX_VAL(CP(I2C1_SCL), (IEN | PTU | EN | M0)) /*I2C1_SCL*/\ | ||
59 | MUX_VAL(CP(I2C1_SDA), (IEN | PTU | EN | M0)) /*I2C1_SDA*/\ | ||
60 | - MUX_VAL(CP(I2C2_SCL), (IEN | PTU | EN | M4)) /*GPIO_168*/\ | ||
61 | - MUX_VAL(CP(I2C2_SDA), (IEN | PTU | EN | M4)) /*GPIO_183*/\ | ||
62 | + MUX_VAL(CP(I2C2_SCL), (IEN | PTU | EN | M0)) /*I2C2_SCL*/\ | ||
63 | + MUX_VAL(CP(I2C2_SDA), (IEN | PTU | EN | M0)) /*I2C2_SDA*/\ | ||
64 | MUX_VAL(CP(I2C3_SCL), (IEN | PTU | EN | M0)) /*I2C3_SCL*/\ | ||
65 | MUX_VAL(CP(I2C3_SDA), (IEN | PTU | EN | M0)) /*I2C3_SDA*/\ | ||
66 | MUX_VAL(CP(I2C4_SCL), (IEN | PTU | EN | M0)) /*I2C4_SCL*/\ | ||
67 | @@ -374,9 +374,9 @@ const omap3_sysinfo sysinfo = { | ||
68 | MUX_VAL(CP(SDRC_CKE1), (IDIS | PTU | EN | M0)) /*sdrc_cke1*/ | ||
69 | |||
70 | #define MUX_BEAGLE_C() \ | ||
71 | - MUX_VAL(CP(MCBSP3_DX), (IEN | PTD | DIS | M4)) /*GPIO_140*/\ | ||
72 | - MUX_VAL(CP(MCBSP3_DR), (IEN | PTD | DIS | M4)) /*GPIO_142*/\ | ||
73 | - MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_141*/\ | ||
74 | + MUX_VAL(CP(MCBSP3_DX), (IEN | PTD | DIS | M4)) /*GPIO_140*/\ | ||
75 | + MUX_VAL(CP(MCBSP3_DR), (IEN | PTD | DIS | M4)) /*GPIO_142*/\ | ||
76 | + MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_141*/\ | ||
77 | MUX_VAL(CP(UART2_CTS), (IEN | PTU | EN | M0)) /*UART2_CTS*/\ | ||
78 | MUX_VAL(CP(UART2_RTS), (IDIS | PTD | DIS | M0)) /*UART2_RTS*/\ | ||
79 | MUX_VAL(CP(UART2_TX), (IDIS | PTD | DIS | M0)) /*UART2_TX*/ | ||
80 | -- | ||
81 | 1.6.6.1 | ||
82 | |||
diff --git a/recipes-bsp/u-boot/u-boot/power.patch b/recipes-bsp/u-boot/u-boot/power.patch deleted file mode 100644 index 6403e299..00000000 --- a/recipes-bsp/u-boot/u-boot/power.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | From 62d6dee28046b333125ebbd1f0c5d946a3ea329a Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Sat, 8 Jan 2011 19:16:32 +0100 | ||
4 | Subject: [PATCH 07/10] power.patch | ||
5 | |||
6 | --- | ||
7 | board/omap3/beagle/beagle.h | 4 ++-- | ||
8 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
9 | |||
10 | diff --git a/board/omap3/beagle/beagle.h b/board/omap3/beagle/beagle.h | ||
11 | index e77ab43..1828153 100644 | ||
12 | --- a/board/omap3/beagle/beagle.h | ||
13 | +++ b/board/omap3/beagle/beagle.h | ||
14 | @@ -255,8 +255,8 @@ const omap3_sysinfo sysinfo = { | ||
15 | MUX_VAL(CP(HSUSB0_DATA7), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA7*/\ | ||
16 | MUX_VAL(CP(I2C1_SCL), (IEN | PTU | EN | M0)) /*I2C1_SCL*/\ | ||
17 | MUX_VAL(CP(I2C1_SDA), (IEN | PTU | EN | M0)) /*I2C1_SDA*/\ | ||
18 | - MUX_VAL(CP(I2C2_SCL), (IEN | PTU | EN | M0)) /*I2C2_SCL*/\ | ||
19 | - MUX_VAL(CP(I2C2_SDA), (IEN | PTU | EN | M0)) /*I2C2_SDA*/\ | ||
20 | + MUX_VAL(CP(I2C2_SCL), (IEN | PTU | EN | M4)) /*GPIO_168*/\ | ||
21 | + MUX_VAL(CP(I2C2_SDA), (IEN | PTU | EN | M4)) /*GPIO_183*/\ | ||
22 | MUX_VAL(CP(I2C3_SCL), (IEN | PTU | EN | M0)) /*I2C3_SCL*/\ | ||
23 | MUX_VAL(CP(I2C3_SDA), (IEN | PTU | EN | M0)) /*I2C3_SDA*/\ | ||
24 | MUX_VAL(CP(I2C4_SCL), (IEN | PTU | EN | M0)) /*I2C4_SCL*/\ | ||
25 | -- | ||
26 | 1.6.6.1 | ||
27 | |||
diff --git a/recipes-bsp/u-boot/u-boot/spi3.patch b/recipes-bsp/u-boot/u-boot/spi3.patch deleted file mode 100644 index 5c46ed5a..00000000 --- a/recipes-bsp/u-boot/u-boot/spi3.patch +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | From 17d40dae02b56f1f4c4f3766e20b7b4c69596049 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Sat, 8 Jan 2011 19:15:52 +0100 | ||
4 | Subject: [PATCH 04/10] spi3.patch | ||
5 | |||
6 | --- | ||
7 | board/omap3/beagle/beagle.h | 20 ++++++++++---------- | ||
8 | 1 files changed, 10 insertions(+), 10 deletions(-) | ||
9 | |||
10 | diff --git a/board/omap3/beagle/beagle.h b/board/omap3/beagle/beagle.h | ||
11 | index 2ba6a12..743e32c 100644 | ||
12 | --- a/board/omap3/beagle/beagle.h | ||
13 | +++ b/board/omap3/beagle/beagle.h | ||
14 | @@ -201,16 +201,16 @@ const omap3_sysinfo sysinfo = { | ||
15 | MUX_VAL(CP(MMC1_DAT6), (IEN | PTU | EN | M0)) /*MMC1_DAT6*/\ | ||
16 | MUX_VAL(CP(MMC1_DAT7), (IEN | PTU | EN | M0)) /*MMC1_DAT7*/\ | ||
17 | /*Wireless LAN */\ | ||
18 | - MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M0)) /*MMC2_CLK*/\ | ||
19 | - MUX_VAL(CP(MMC2_CMD), (IEN | PTU | EN | M0)) /*MMC2_CMD*/\ | ||
20 | - MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M0)) /*MMC2_DAT0*/\ | ||
21 | - MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M0)) /*MMC2_DAT1*/\ | ||
22 | - MUX_VAL(CP(MMC2_DAT2), (IEN | PTU | EN | M0)) /*MMC2_DAT2*/\ | ||
23 | - MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M0)) /*MMC2_DAT3*/\ | ||
24 | - MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN | M1)) /*MMC2_DIR_DAT0*/\ | ||
25 | - MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M1)) /*MMC2_DIR_DAT1*/\ | ||
26 | - MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | EN | M1)) /*MMC2_DIR_CMD*/\ | ||
27 | - MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M1)) /*MMC2_CLKIN*/\ | ||
28 | + MUX_VAL(CP(MMC2_CLK), (IEN | PTU | DIS | M1)) /*MCSPI3_CLK*/\ | ||
29 | + MUX_VAL(CP(MMC2_CMD), (IEN | PTU | DIS | M1)) /*MCSPI3_SIMO*/\ | ||
30 | + MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M1)) /*MCSPI3_SOMI*/\ | ||
31 | + MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M4)) /*GPIO_133*/\ | ||
32 | + MUX_VAL(CP(MMC2_DAT2), (IEN | PTU | EN | M1)) /*MCSPI3_CS1*/\ | ||
33 | + MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M1)) /*MCSPI3_CS0*/\ | ||
34 | + MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN | M4)) /*GPIO_136*/\ | ||
35 | + MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M4)) /*GPIO_137*/\ | ||
36 | + MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | EN | M4)) /*GPIO_138*/\ | ||
37 | + MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M4)) /*GPIO_139*/\ | ||
38 | /*Bluetooth*/\ | ||
39 | MUX_VAL(CP(MCBSP3_DX), (IEN | PTD | DIS | M1)) /*UART2_CTS*/\ | ||
40 | MUX_VAL(CP(MCBSP3_DR), (IDIS | PTD | DIS | M1)) /*UART2_RTS*/\ | ||
41 | -- | ||
42 | 1.6.6.1 | ||
43 | |||
diff --git a/recipes-bsp/u-boot/u-boot/spi4.patch b/recipes-bsp/u-boot/u-boot/spi4.patch deleted file mode 100644 index 4c92a7e0..00000000 --- a/recipes-bsp/u-boot/u-boot/spi4.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From b2b7765ad59b5422df9337ee6c6f838a381b86c0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Sat, 8 Jan 2011 19:15:59 +0100 | ||
4 | Subject: [PATCH 05/10] spi4.patch | ||
5 | |||
6 | --- | ||
7 | board/omap3/beagle/beagle.h | 12 ++++++------ | ||
8 | 1 files changed, 6 insertions(+), 6 deletions(-) | ||
9 | |||
10 | diff --git a/board/omap3/beagle/beagle.h b/board/omap3/beagle/beagle.h | ||
11 | index 743e32c..876dd4f 100644 | ||
12 | --- a/board/omap3/beagle/beagle.h | ||
13 | +++ b/board/omap3/beagle/beagle.h | ||
14 | @@ -229,13 +229,13 @@ const omap3_sysinfo sysinfo = { | ||
15 | MUX_VAL(CP(MCBSP4_DR), (IEN | PTU | EN | M4)) /*GPIO_153*/\ | ||
16 | MUX_VAL(CP(MCBSP4_DX), (IEN | PTU | EN | M4)) /*GPIO_154*/\ | ||
17 | MUX_VAL(CP(MCBSP4_FSX), (IEN | PTU | EN | M4)) /*GPIO_155*/\ | ||
18 | - MUX_VAL(CP(MCBSP1_CLKR), (IDIS | PTD | DIS | M4)) /*GPIO_156*/\ | ||
19 | - MUX_VAL(CP(MCBSP1_FSR), (IDIS | PTU | EN | M4)) /*GPIO_157*/\ | ||
20 | - MUX_VAL(CP(MCBSP1_DX), (IDIS | PTD | DIS | M4)) /*GPIO_158*/\ | ||
21 | - MUX_VAL(CP(MCBSP1_DR), (IDIS | PTD | DIS | M4)) /*GPIO_159*/\ | ||
22 | + MUX_VAL(CP(MCBSP1_CLKR), (IEN | PTU | DIS | M1)) /*MCSPI4_CLK*/\ | ||
23 | + MUX_VAL(CP(MCBSP1_FSR), (IEN | PTU | EN | M4)) /*GPIO_157*/\ | ||
24 | + MUX_VAL(CP(MCBSP1_DX), (IEN | PTU | DIS | M1)) /*MCSPI4_SIMO*/\ | ||
25 | + MUX_VAL(CP(MCBSP1_DR), (IEN | PTU | EN | M1)) /*MCSPI4_SOMI*/\ | ||
26 | MUX_VAL(CP(MCBSP_CLKS), (IEN | PTU | DIS | M0)) /*McBSP_CLKS*/\ | ||
27 | - MUX_VAL(CP(MCBSP1_FSX), (IDIS | PTD | DIS | M4)) /*GPIO_161*/\ | ||
28 | - MUX_VAL(CP(MCBSP1_CLKX), (IDIS | PTD | DIS | M4)) /*GPIO_162*/\ | ||
29 | + MUX_VAL(CP(MCBSP1_FSX), (IEN | PTU | EN | M1)) /*MCSPI4_CS0*/\ | ||
30 | + MUX_VAL(CP(MCBSP1_CLKX), (IEN | PTU | EN | M4)) /*GPIO_162*/\ | ||
31 | /*Serial Interface*/\ | ||
32 | MUX_VAL(CP(UART3_CTS_RCTX), (IEN | PTD | EN | M0)) /*UART3_CTS_RCTX*/\ | ||
33 | MUX_VAL(CP(UART3_RTS_SD), (IDIS | PTD | DIS | M0)) /*UART3_RTS_SD */\ | ||
34 | -- | ||
35 | 1.6.6.1 | ||
36 | |||