diff options
5 files changed, 167 insertions, 1 deletions
diff --git a/recipes-bsp/u-boot/u-boot/2011.09git/0001-mach-types-Add-new-beaglebone-machine-type.patch b/recipes-bsp/u-boot/u-boot/2011.09git/0001-mach-types-Add-new-beaglebone-machine-type.patch new file mode 100644 index 00000000..6f12d6c1 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot/2011.09git/0001-mach-types-Add-new-beaglebone-machine-type.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From ec41c3f94a9a498d1f7061abd98e41a66c0ab13e Mon Sep 17 00:00:00 2001 | ||
2 | From: Steve Kipisz <s-kipisz2@ti.com> | ||
3 | Date: Thu, 13 Oct 2011 14:42:35 -0500 | ||
4 | Subject: [PATCH 1/4] mach-types: Add new beaglebone machine type. | ||
5 | |||
6 | * New machine type is 3808 | ||
7 | |||
8 | Signed-off-by: Steve Kipisz <s-kipisz2@ti.com> | ||
9 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
10 | --- | ||
11 | arch/arm/include/asm/mach-types.h | 13 +++++++++++++ | ||
12 | 1 files changed, 13 insertions(+), 0 deletions(-) | ||
13 | |||
14 | diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h | ||
15 | index c6ea523..68ac2ba 100644 | ||
16 | --- a/arch/arm/include/asm/mach-types.h | ||
17 | +++ b/arch/arm/include/asm/mach-types.h | ||
18 | @@ -3314,6 +3314,7 @@ extern unsigned int __machine_arch_type; | ||
19 | #define MACH_TYPE_GOFLEXHOME 3338 | ||
20 | #define MACH_TYPE_TIAM335EVM 3589 | ||
21 | #define MACH_TYPE_TIAM335IAEVM 3684 | ||
22 | +#define MACH_TYPE_BEAGLEBONE 3808 | ||
23 | |||
24 | #ifdef CONFIG_ARCH_EBSA110 | ||
25 | # ifdef machine_arch_type | ||
26 | @@ -42927,6 +42928,18 @@ extern unsigned int __machine_arch_type; | ||
27 | # define machine_is_tiam335evm() (0) | ||
28 | #endif | ||
29 | |||
30 | +#ifdef CONFIG_MACH_BEAGLEBONE | ||
31 | +# ifdef machine_arch_type | ||
32 | +# undef machine_arch_type | ||
33 | +# define machine_arch_type __machine_arch_type | ||
34 | +# else | ||
35 | +# define machine_arch_type MACH_TYPE_BEAGLEBONE | ||
36 | +# endif | ||
37 | +# define machine_is_beaglebone() (machine_arch_type == MACH_TYPE_BEAGLEBONE) | ||
38 | +#else | ||
39 | +# define machine_is_beaglebone() (0) | ||
40 | +#endif | ||
41 | + | ||
42 | /* | ||
43 | * These have not yet been registered | ||
44 | */ | ||
45 | -- | ||
46 | 1.6.6.1 | ||
47 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09git/0002-evm-If-beaglebone-is-detected-pass-the-MACH_TYPE_BEA.patch b/recipes-bsp/u-boot/u-boot/2011.09git/0002-evm-If-beaglebone-is-detected-pass-the-MACH_TYPE_BEA.patch new file mode 100644 index 00000000..7b8e52be --- /dev/null +++ b/recipes-bsp/u-boot/u-boot/2011.09git/0002-evm-If-beaglebone-is-detected-pass-the-MACH_TYPE_BEA.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 17c0530b1539fb8813efc11c60dd87fd9a3a074b Mon Sep 17 00:00:00 2001 | ||
2 | From: Steve Kipisz <s-kipisz2@ti.com> | ||
3 | Date: Thu, 13 Oct 2011 16:31:26 -0500 | ||
4 | Subject: [PATCH 2/4] evm: If beaglebone is detected, pass the MACH_TYPE_BEAGLEBONE to Linux | ||
5 | |||
6 | Signed-off-by: Steve Kipisz <s-kipisz2@ti.com> | ||
7 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
8 | --- | ||
9 | board/ti/am335x/evm.c | 4 +++- | ||
10 | 1 files changed, 3 insertions(+), 1 deletions(-) | ||
11 | |||
12 | diff --git a/board/ti/am335x/evm.c b/board/ti/am335x/evm.c | ||
13 | index 95e790b..af34bfd 100755 | ||
14 | --- a/board/ti/am335x/evm.c | ||
15 | +++ b/board/ti/am335x/evm.c | ||
16 | @@ -447,7 +447,9 @@ static void detect_daughter_board_profile(void) | ||
17 | int board_evm_init(void) | ||
18 | { | ||
19 | /* mach type passed to kernel */ | ||
20 | - if (board_id == IA_BOARD) | ||
21 | + if (board_id == BONE_BOARD) | ||
22 | + gd->bd->bi_arch_number = MACH_TYPE_BEAGLEBONE; | ||
23 | + else if (board_id == IA_BOARD) | ||
24 | gd->bd->bi_arch_number = MACH_TYPE_TIAM335IAEVM; | ||
25 | else | ||
26 | gd->bd->bi_arch_number = MACH_TYPE_TIAM335EVM; | ||
27 | -- | ||
28 | 1.6.6.1 | ||
29 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09git/0003-am335x_evm-single-byte-address-EEPROM-for-board-iden.patch b/recipes-bsp/u-boot/u-boot/2011.09git/0003-am335x_evm-single-byte-address-EEPROM-for-board-iden.patch new file mode 100644 index 00000000..d4ea6073 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot/2011.09git/0003-am335x_evm-single-byte-address-EEPROM-for-board-iden.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From 52165b34c2fbcfe93f4cfabb616c2feb3ea7344f Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Kridner <jdk@ti.com> | ||
3 | Date: Thu, 13 Oct 2011 23:50:35 -0400 | ||
4 | Subject: [PATCH 3/4] am335x_evm: single-byte address EEPROM for board identifier | ||
5 | |||
6 | The BeagleBone has an EEPROM that uses a single byte address instead of a | ||
7 | 2-byte address used by the EVM versions. This simply adds a quick attempt | ||
8 | at reading the board identifier header with a 1-byte address if the header | ||
9 | signature isn't correct using a 2-byte address. | ||
10 | |||
11 | This is only build tested. Having a script to program the expected EEPROM | ||
12 | contents would help me reduce my time to test this. | ||
13 | |||
14 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
15 | --- | ||
16 | board/ti/am335x/evm.c | 14 ++++++++++++-- | ||
17 | 1 files changed, 12 insertions(+), 2 deletions(-) | ||
18 | |||
19 | diff --git a/board/ti/am335x/evm.c b/board/ti/am335x/evm.c | ||
20 | index af34bfd..f484a3c 100755 | ||
21 | --- a/board/ti/am335x/evm.c | ||
22 | +++ b/board/ti/am335x/evm.c | ||
23 | @@ -496,8 +496,18 @@ int board_init(void) | ||
24 | } | ||
25 | |||
26 | if (header.magic != 0xEE3355AA) { | ||
27 | - printf("Incorrect magic number in EEPROM\n"); | ||
28 | - goto err_out; | ||
29 | + /* read the eeprom using i2c again, but use only a 1 byte address */ | ||
30 | + if (i2c_read(I2C_BASE_BOARD_ADDR, 0, 1, (uchar *)&header, | ||
31 | + sizeof(header))) { | ||
32 | + printf("Could not read the EEPROM; something fundamentally" | ||
33 | + " wrong on the I2C bus.\n"); | ||
34 | + goto err_out; | ||
35 | + } | ||
36 | + | ||
37 | + if (header.magic != 0xEE3355AA) { | ||
38 | + printf("Incorrect magic number in EEPROM\n"); | ||
39 | + goto err_out; | ||
40 | + } | ||
41 | } | ||
42 | |||
43 | detect_daughter_board(); | ||
44 | -- | ||
45 | 1.6.6.1 | ||
46 | |||
diff --git a/recipes-bsp/u-boot/u-boot/2011.09git/0004-am335x-evm-fall-back-to-bone-if-header.config-is-emp.patch b/recipes-bsp/u-boot/u-boot/2011.09git/0004-am335x-evm-fall-back-to-bone-if-header.config-is-emp.patch new file mode 100644 index 00000000..db3ae69c --- /dev/null +++ b/recipes-bsp/u-boot/u-boot/2011.09git/0004-am335x-evm-fall-back-to-bone-if-header.config-is-emp.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 3e3ac90cdd7fade62e898453f529364e4d9c7589 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Tue, 18 Oct 2011 19:18:56 +0200 | ||
4 | Subject: [PATCH 4/4] am335x-evm: fall back to bone if header.config is empty | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
7 | --- | ||
8 | board/ti/am335x/evm.c | 8 ++++---- | ||
9 | 1 files changed, 4 insertions(+), 4 deletions(-) | ||
10 | |||
11 | diff --git a/board/ti/am335x/evm.c b/board/ti/am335x/evm.c | ||
12 | index f484a3c..1c3ba2c 100755 | ||
13 | --- a/board/ti/am335x/evm.c | ||
14 | +++ b/board/ti/am335x/evm.c | ||
15 | @@ -495,6 +495,7 @@ int board_init(void) | ||
16 | goto err_out; | ||
17 | } | ||
18 | |||
19 | + printf("EEPROM ID:\n magic: %#08x\n name: %8s\n version: %4s\n serial: %12s\n config: %32s\n mac_addr: %s\n", header.magic, header.name, header.version, header.serial, header.config, header.mac_addr); | ||
20 | if (header.magic != 0xEE3355AA) { | ||
21 | /* read the eeprom using i2c again, but use only a 1 byte address */ | ||
22 | if (i2c_read(I2C_BASE_BOARD_ADDR, 0, 1, (uchar *)&header, | ||
23 | @@ -522,11 +523,10 @@ int board_init(void) | ||
24 | board_id = IPP_BOARD; | ||
25 | } else { | ||
26 | printf("Did not find a recognized configuration, " | ||
27 | - "assuming General purpose EVM in Profile 0 with " | ||
28 | - "Daughter board\n"); | ||
29 | - board_id = GP_BOARD; | ||
30 | + "assuming BeagleBone\n"); | ||
31 | + board_id = BONE_BOARD; | ||
32 | profile = 1; /* profile 0 is internally considered as 1 */ | ||
33 | - daughter_board_connected = 1; | ||
34 | + daughter_board_connected = 0; | ||
35 | } | ||
36 | |||
37 | configure_evm_pin_mux(board_id, profile, daughter_board_connected); | ||
38 | -- | ||
39 | 1.6.6.1 | ||
40 | |||
diff --git a/recipes-bsp/u-boot/u-boot_2011.10rc.bb b/recipes-bsp/u-boot/u-boot_2011.10rc.bb index e10c8955..ad104d69 100644 --- a/recipes-bsp/u-boot/u-boot_2011.10rc.bb +++ b/recipes-bsp/u-boot/u-boot_2011.10rc.bb | |||
@@ -4,7 +4,7 @@ require u-boot.inc | |||
4 | COMPATIBLE_MACHINE = "(ti33x)" | 4 | COMPATIBLE_MACHINE = "(ti33x)" |
5 | DEFAULT_PREFERENCE_ti33x = "99" | 5 | DEFAULT_PREFERENCE_ti33x = "99" |
6 | PV = "2011.09+git" | 6 | PV = "2011.09+git" |
7 | PR = "r9" | 7 | PR = "r10" |
8 | 8 | ||
9 | # SPL build | 9 | # SPL build |
10 | UBOOT_BINARY = "u-boot.img" | 10 | UBOOT_BINARY = "u-boot.img" |
@@ -15,6 +15,10 @@ SRC_URI = "git://github.com/trini/u-boot.git;protocol=git;branch=int_am335xpsp_0 | |||
15 | file://2011.09git/0001-am335x_evm-boot-kernel-from-ext2-3-filesystem.patch \ | 15 | file://2011.09git/0001-am335x_evm-boot-kernel-from-ext2-3-filesystem.patch \ |
16 | file://2011.09git/0002-am335x_evm-set-bootdelay-to-0.patch \ | 16 | file://2011.09git/0002-am335x_evm-set-bootdelay-to-0.patch \ |
17 | file://2011.09git/0003-am335x-evm-make-rootfs-RO-on-boot.patch \ | 17 | file://2011.09git/0003-am335x-evm-make-rootfs-RO-on-boot.patch \ |
18 | file://2011.09git/0001-mach-types-Add-new-beaglebone-machine-type.patch \ | ||
19 | file://2011.09git/0002-evm-If-beaglebone-is-detected-pass-the-MACH_TYPE_BEA.patch \ | ||
20 | file://2011.09git/0003-am335x_evm-single-byte-address-EEPROM-for-board-iden.patch \ | ||
21 | file://2011.09git/0004-am335x-evm-fall-back-to-bone-if-header.config-is-emp.patch \ | ||
18 | " | 22 | " |
19 | 23 | ||
20 | SRCREV = "3fb65523c5994718b56a3b4b18ddf1ef3ffc02dc" | 24 | SRCREV = "3fb65523c5994718b56a3b4b18ddf1ef3ffc02dc" |