diff options
author | Joel A Fernandes <joelagnel@ti.com> | 2011-10-23 18:09:44 -0500 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-10-24 08:38:01 +0200 |
commit | 2ea9f93740259be7eee59edeb88e632c5441fb58 (patch) | |
tree | 343fc827da2e246727a8f15dc71e03a5fb8dda21 /recipes-kernel | |
parent | a3b48d3291c64c87a0eb206e7672ca73f69c67ed (diff) | |
download | meta-ti-2ea9f93740259be7eee59edeb88e632c5441fb58.tar.gz |
linux-ti33x-psp 3.1rc8: Update to latest SRCREV, add EEPROM patches
* Updated to latest SRCREV and bump PR.
Added following patches being submitted to PSP currently:
* EEPROM patches required to get EEPROM working correctly on BBB without
breaking support for EVM.
* omap_mux_init_signal patch to safe guard against incorrectly setting up pinmux.
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'recipes-kernel')
4 files changed, 159 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.0+3.1rc/0001-am335x-Check-return-value-of-omap_mux_init_signal.patch b/recipes-kernel/linux/linux-ti33x-psp-3.0+3.1rc/0001-am335x-Check-return-value-of-omap_mux_init_signal.patch new file mode 100644 index 00000000..3ce2df8b --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.0+3.1rc/0001-am335x-Check-return-value-of-omap_mux_init_signal.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From b11df2bf8e19b8a4d4e4bb6eae59fde6a1498920 Mon Sep 17 00:00:00 2001 | ||
2 | From: Joel A Fernandes <joelagnel@ti.com> | ||
3 | Date: Wed, 19 Oct 2011 20:11:00 -0500 | ||
4 | Subject: [PATCH 1/3] am335x: Check return value of omap_mux_init_signal | ||
5 | |||
6 | This helps guard against setting up pin muxmode incorrectly | ||
7 | |||
8 | Signed-off-by: Joel A Fernandes <joelagnel@ti.com> | ||
9 | --- | ||
10 | arch/arm/mach-omap2/board-am335xevm.c | 8 +++++--- | ||
11 | 1 files changed, 5 insertions(+), 3 deletions(-) | ||
12 | |||
13 | diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c | ||
14 | index 187f758..f959d95 100644 | ||
15 | --- a/arch/arm/mach-omap2/board-am335xevm.c | ||
16 | +++ b/arch/arm/mach-omap2/board-am335xevm.c | ||
17 | @@ -590,9 +590,11 @@ static void setup_pin_mux(struct pinmux_config *pin_mux) | ||
18 | { | ||
19 | int i; | ||
20 | |||
21 | - for (i = 0; pin_mux->string_name != NULL; pin_mux++) | ||
22 | - omap_mux_init_signal(pin_mux->string_name, pin_mux->val); | ||
23 | - | ||
24 | + for (i = 0; pin_mux->string_name != NULL; pin_mux++) { | ||
25 | + if(omap_mux_init_signal(pin_mux->string_name, pin_mux->val) < 0) { | ||
26 | + printk(KERN_ERR "Failed to setup pinmux for %s\n", pin_mux->string_name); | ||
27 | + } | ||
28 | + } | ||
29 | } | ||
30 | |||
31 | /* | ||
32 | -- | ||
33 | 1.7.4.1 | ||
34 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.0+3.1rc/0002-at24-Add-ability-to-dynamically-reconfigure-chip-inf.patch b/recipes-kernel/linux/linux-ti33x-psp-3.0+3.1rc/0002-at24-Add-ability-to-dynamically-reconfigure-chip-inf.patch new file mode 100644 index 00000000..5d0d580d --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.0+3.1rc/0002-at24-Add-ability-to-dynamically-reconfigure-chip-inf.patch | |||
@@ -0,0 +1,57 @@ | |||
1 | From 8d0697f8962ef52e06012101efdea7713e0e5055 Mon Sep 17 00:00:00 2001 | ||
2 | From: Joel A Fernandes <joelagnel@ti.com> | ||
3 | Date: Sat, 22 Oct 2011 12:56:44 -0500 | ||
4 | Subject: [PATCH 2/3] at24: Add ability to dynamically reconfigure chip information | ||
5 | |||
6 | As some EEPROMs are used for board name detection, it is not possible to detect | ||
7 | in advance which EEPROM type is connected without detecting the board first. | ||
8 | |||
9 | In board-a335xevm.c, we use a trial and error approach and this requires for us | ||
10 | to reconfigure the driver with a new 'eeprom_info' structure different from any | ||
11 | earlier ones that were passed. | ||
12 | |||
13 | We add new accessor functions to the at24 driver to help with this. | ||
14 | |||
15 | Signed-off-by: Joel A Fernandes <joelagnel@ti.com> | ||
16 | --- | ||
17 | drivers/misc/eeprom/at24.c | 11 +++++++++++ | ||
18 | include/linux/i2c/at24.h | 3 +++ | ||
19 | 2 files changed, 14 insertions(+), 0 deletions(-) | ||
20 | |||
21 | diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c | ||
22 | index ab1ad41..41ebc1f 100644 | ||
23 | --- a/drivers/misc/eeprom/at24.c | ||
24 | +++ b/drivers/misc/eeprom/at24.c | ||
25 | @@ -456,6 +456,17 @@ static ssize_t at24_macc_write(struct memory_accessor *macc, const char *buf, | ||
26 | return at24_write(at24, buf, offset, count); | ||
27 | } | ||
28 | |||
29 | +struct at24_platform_data *at24_macc_getpdata(struct memory_accessor *macc) | ||
30 | +{ | ||
31 | + struct at24_data *at24 = container_of(macc, struct at24_data, macc); | ||
32 | + return &at24->chip; | ||
33 | +} | ||
34 | + | ||
35 | +void at24_macc_setpdata(struct memory_accessor *macc, struct at24_platform_data *chip) | ||
36 | +{ | ||
37 | + struct at24_data *at24 = container_of(macc, struct at24_data, macc); | ||
38 | + at24->chip = *chip; | ||
39 | +} | ||
40 | /*-------------------------------------------------------------------------*/ | ||
41 | |||
42 | #ifdef CONFIG_OF | ||
43 | diff --git a/include/linux/i2c/at24.h b/include/linux/i2c/at24.h | ||
44 | index 8ace930..7872912 100644 | ||
45 | --- a/include/linux/i2c/at24.h | ||
46 | +++ b/include/linux/i2c/at24.h | ||
47 | @@ -29,4 +29,7 @@ struct at24_platform_data { | ||
48 | void *context; | ||
49 | }; | ||
50 | |||
51 | +struct at24_platform_data *at24_macc_getpdata(struct memory_accessor *macc); | ||
52 | +void at24_macc_setpdata(struct memory_accessor *macc, struct at24_platform_data *chip); | ||
53 | + | ||
54 | #endif /* _LINUX_AT24_H */ | ||
55 | -- | ||
56 | 1.7.4.1 | ||
57 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.0+3.1rc/0003-am335x-evm-Reconfigure-EEPROM-with-new-eeprom_info-in.patch b/recipes-kernel/linux/linux-ti33x-psp-3.0+3.1rc/0003-am335x-evm-Reconfigure-EEPROM-with-new-eeprom_info-in.patch new file mode 100644 index 00000000..9d3bb6eb --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.0+3.1rc/0003-am335x-evm-Reconfigure-EEPROM-with-new-eeprom_info-in.patch | |||
@@ -0,0 +1,65 @@ | |||
1 | From 18a4a980113f7b290c5694239b0e9b21fb7fe132 Mon Sep 17 00:00:00 2001 | ||
2 | From: Joel A Fernandes <joelagnel@ti.com> | ||
3 | Date: Sat, 22 Oct 2011 13:03:08 -0500 | ||
4 | Subject: [PATCH 3/3] am335x-evm: Reconfigure EEPROM with new eeprom_info incase of failure | ||
5 | |||
6 | The earlier bone boards have an 8-bit address capable EEPROM with 2kbit size | ||
7 | and 16 byte page size. This is very different from the EEPROM on the AM335x | ||
8 | EVM and causes problem when reading for board detection and other purposes. | ||
9 | |||
10 | We first attempt a read with the original EEPROM settings and incase of an | ||
11 | invalid header, we reconfigure the EEPROM driver with bone_eeprom_info and | ||
12 | perform a restart of the setup function to reread all EEPROM data again this | ||
13 | time with the correct EEPROM configuration. | ||
14 | |||
15 | This patch is required to get EEPROM reading working correctly on bone board | ||
16 | without breaking support for EVM. | ||
17 | |||
18 | Signed-off-by: Joel A Fernandes <joelagnel@ti.com> | ||
19 | --- | ||
20 | arch/arm/mach-omap2/board-am335xevm.c | 15 +++++++++++++++ | ||
21 | 1 files changed, 15 insertions(+), 0 deletions(-) | ||
22 | |||
23 | diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c | ||
24 | index f959d95..eb18fb9 100644 | ||
25 | --- a/arch/arm/mach-omap2/board-am335xevm.c | ||
26 | +++ b/arch/arm/mach-omap2/board-am335xevm.c | ||
27 | @@ -1387,6 +1387,8 @@ static void am335x_setup_daughter_board(struct memory_accessor *m, void *c) | ||
28 | } | ||
29 | } | ||
30 | |||
31 | +static struct at24_platform_data bone_eeprom_info; | ||
32 | + | ||
33 | static void am335x_evm_setup(struct memory_accessor *mem_acc, void *context) | ||
34 | { | ||
35 | int ret; | ||
36 | @@ -1413,6 +1415,11 @@ static void am335x_evm_setup(struct memory_accessor *mem_acc, void *context) | ||
37 | } | ||
38 | |||
39 | if (config.header != AM335X_EEPROM_HEADER) { | ||
40 | + if(memcmp(at24_macc_getpdata(mem_acc), &bone_eeprom_info, | ||
41 | + sizeof(struct at24_platform_data)) != 0) { | ||
42 | + at24_macc_setpdata(mem_acc, &bone_eeprom_info); | ||
43 | + return am335x_evm_setup(mem_acc, context); | ||
44 | + } | ||
45 | pr_warning("AM335X: wrong header 0x%x, expected 0x%x\n", | ||
46 | config.header, AM335X_EEPROM_HEADER); | ||
47 | goto out; | ||
48 | @@ -1485,6 +1492,14 @@ static struct at24_platform_data am335x_baseboard_eeprom_info = { | ||
49 | .context = (void *)NULL, | ||
50 | }; | ||
51 | |||
52 | +static struct at24_platform_data bone_eeprom_info = { | ||
53 | + .byte_len = (2*1024) / 8, | ||
54 | + .page_size = 16, | ||
55 | + .flags = 0x0, | ||
56 | + .setup = am335x_evm_setup, | ||
57 | + .context = (void *)NULL, | ||
58 | +}; | ||
59 | + | ||
60 | /* | ||
61 | * Daughter board Detection. | ||
62 | * Every board has a ID memory (EEPROM) on board. We probe these devices at | ||
63 | -- | ||
64 | 1.7.4.1 | ||
65 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp_3.0+3.1rc.bb b/recipes-kernel/linux/linux-ti33x-psp_3.0+3.1rc.bb index 9c043570..bffebeaf 100644 --- a/recipes-kernel/linux/linux-ti33x-psp_3.0+3.1rc.bb +++ b/recipes-kernel/linux/linux-ti33x-psp_3.0+3.1rc.bb | |||
@@ -27,6 +27,9 @@ SRC_URI += "git://arago-project.org/git/projects/linux-am33x.git;protocol=git;br | |||
27 | PATCHES_OVER_PSP = " \ | 27 | PATCHES_OVER_PSP = " \ |
28 | file://0001-f_rndis-HACK-around-undefined-variables.patch \ | 28 | file://0001-f_rndis-HACK-around-undefined-variables.patch \ |
29 | file://0001-am335x-Add-pin-mux-and-init-for-beaglebone-specific-.patch \ | 29 | file://0001-am335x-Add-pin-mux-and-init-for-beaglebone-specific-.patch \ |
30 | file://0001-am335x-Check-return-value-of-omap_mux_init_signal.patch \ | ||
31 | file://0002-at24-Add-ability-to-dynamically-reconfigure-chip-inf.patch \ | ||
32 | file://0003-am335x-evm-Reconfigure-EEPROM-with-new-eeprom_info-in.patch \ | ||
30 | " | 33 | " |
31 | 34 | ||
32 | SRC_URI += "${@base_contains('DISTRO_FEATURES', 'tipspkernel', "", "${PATCHES_OVER_PSP}", d)}" | 35 | SRC_URI += "${@base_contains('DISTRO_FEATURES', 'tipspkernel', "", "${PATCHES_OVER_PSP}", d)}" |