* [U-Boot] [PATCH 0/3] cm-fx6 updates
@ 2014-10-29 13:08 Nikita Kiryanov
2014-10-29 13:08 ` [U-Boot] [PATCH 1/3] arm: mx6: cm_fx6: change issd gpio order Nikita Kiryanov
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Nikita Kiryanov @ 2014-10-29 13:08 UTC (permalink / raw)
To: u-boot
This patchset contains a bug fix for DRAM detection, support for Phison SSD,
and a new preboot hook.
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Nikita Kiryanov (3):
arm: mx6: cm_fx6: change issd gpio order
arm: mx6: cm_fx6: detect 1GB DRAM correctly on solo
common: introduce board_preboot_os hook
board/compulab/cm_fx6/cm_fx6.c | 7 ++++++-
board/compulab/cm_fx6/spl.c | 7 ++++---
common/bootm_os.c | 7 +++++++
3 files changed, 17 insertions(+), 4 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 1/3] arm: mx6: cm_fx6: change issd gpio order
2014-10-29 13:08 [U-Boot] [PATCH 0/3] cm-fx6 updates Nikita Kiryanov
@ 2014-10-29 13:08 ` Nikita Kiryanov
2014-10-29 13:08 ` [U-Boot] [PATCH 2/3] arm: mx6: cm_fx6: detect 1GB DRAM correctly on solo Nikita Kiryanov
2014-10-29 13:08 ` [U-Boot] [PATCH 3/3] common: introduce board_preboot_os hook Nikita Kiryanov
2 siblings, 0 replies; 7+ messages in thread
From: Nikita Kiryanov @ 2014-10-29 13:08 UTC (permalink / raw)
To: u-boot
Change the order in which GPIOs are toggled in SATA init sequence to
accomodate both SanDisk and Phison SSDs.
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
---
board/compulab/cm_fx6/cm_fx6.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
index 82681b1..0206ae8 100644
--- a/board/compulab/cm_fx6/cm_fx6.c
+++ b/board/compulab/cm_fx6/cm_fx6.c
@@ -31,12 +31,12 @@ DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_DWC_AHSATA
static int cm_fx6_issd_gpios[] = {
/* The order of the GPIOs in the array is important! */
+ CM_FX6_SATA_LDO_EN,
CM_FX6_SATA_PHY_SLP,
CM_FX6_SATA_NRSTDLY,
CM_FX6_SATA_PWREN,
CM_FX6_SATA_NSTANDBY1,
CM_FX6_SATA_NSTANDBY2,
- CM_FX6_SATA_LDO_EN,
};
static void cm_fx6_sata_power(int on)
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 2/3] arm: mx6: cm_fx6: detect 1GB DRAM correctly on solo
2014-10-29 13:08 [U-Boot] [PATCH 0/3] cm-fx6 updates Nikita Kiryanov
2014-10-29 13:08 ` [U-Boot] [PATCH 1/3] arm: mx6: cm_fx6: change issd gpio order Nikita Kiryanov
@ 2014-10-29 13:08 ` Nikita Kiryanov
2014-10-29 13:08 ` [U-Boot] [PATCH 3/3] common: introduce board_preboot_os hook Nikita Kiryanov
2 siblings, 0 replies; 7+ messages in thread
From: Nikita Kiryanov @ 2014-10-29 13:08 UTC (permalink / raw)
To: u-boot
The 1GB DRAM configuration on mx6 solo uses 2 chip selects, but
the code tests 1GB DRAM configuration as if it is all present on one
chip select, and thus cannot see the full range of available memory.
Refactor the check to detect 1GB DRAM correctly.
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
---
board/compulab/cm_fx6/spl.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/board/compulab/cm_fx6/spl.c b/board/compulab/cm_fx6/spl.c
index 3948ba2..6fe937b 100644
--- a/board/compulab/cm_fx6/spl.c
+++ b/board/compulab/cm_fx6/spl.c
@@ -235,10 +235,11 @@ static int cm_fx6_spl_dram_init(void)
spl_mx6s_dram_init(DDR_32BIT_1GB, false);
bank1_size = get_ram_size((long int *)PHYS_SDRAM_1, 0x80000000);
- if (bank1_size == 0x40000000)
- return 0;
-
+ bank2_size = get_ram_size((long int *)PHYS_SDRAM_2, 0x80000000);
if (bank1_size == 0x20000000) {
+ if (bank2_size == 0x20000000)
+ return 0;
+
spl_mx6s_dram_init(DDR_32BIT_512MB, true);
return 0;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 3/3] common: introduce board_preboot_os hook
2014-10-29 13:08 [U-Boot] [PATCH 0/3] cm-fx6 updates Nikita Kiryanov
2014-10-29 13:08 ` [U-Boot] [PATCH 1/3] arm: mx6: cm_fx6: change issd gpio order Nikita Kiryanov
2014-10-29 13:08 ` [U-Boot] [PATCH 2/3] arm: mx6: cm_fx6: detect 1GB DRAM correctly on solo Nikita Kiryanov
@ 2014-10-29 13:08 ` Nikita Kiryanov
2014-10-29 13:28 ` Jeroen Hofstee
2 siblings, 1 reply; 7+ messages in thread
From: Nikita Kiryanov @ 2014-10-29 13:08 UTC (permalink / raw)
To: u-boot
Introduce board specific function board_preboot_os() to allow for board
specific config before we boot, and use it on cm_fx6 to power off sata
so that Linux will be able to setup it correctly.
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
---
board/compulab/cm_fx6/cm_fx6.c | 5 +++++
common/bootm_os.c | 7 +++++++
2 files changed, 12 insertions(+)
diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
index 0206ae8..b44ee9d 100644
--- a/board/compulab/cm_fx6/cm_fx6.c
+++ b/board/compulab/cm_fx6/cm_fx6.c
@@ -125,6 +125,11 @@ int sata_initialize(void)
return err;
}
+
+void board_preboot_os(void)
+{
+ cm_fx6_sata_power(0);
+}
#else
static int cm_fx6_setup_issd(void) { return 0; }
#endif
diff --git a/common/bootm_os.c b/common/bootm_os.c
index 5be4467..95cd657 100644
--- a/common/bootm_os.c
+++ b/common/bootm_os.c
@@ -442,10 +442,17 @@ __weak void arch_preboot_os(void)
/* please define platform specific arch_preboot_os() */
}
+/* Allow for board specific config before we boot */
+__weak void board_preboot_os(void)
+{
+ /* please define board specific board_preboot_os() */
+}
+
int boot_selected_os(int argc, char * const argv[], int state,
bootm_headers_t *images, boot_os_fn *boot_fn)
{
arch_preboot_os();
+ board_preboot_os();
boot_fn(state, argc, argv, images);
/* Stand-alone may return when 'autostart' is 'no' */
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 3/3] common: introduce board_preboot_os hook
2014-10-29 13:08 ` [U-Boot] [PATCH 3/3] common: introduce board_preboot_os hook Nikita Kiryanov
@ 2014-10-29 13:28 ` Jeroen Hofstee
2014-10-29 15:23 ` Otavio Salvador
0 siblings, 1 reply; 7+ messages in thread
From: Jeroen Hofstee @ 2014-10-29 13:28 UTC (permalink / raw)
To: u-boot
Hello Nikita,
On 29-10-14 14:08, Nikita Kiryanov wrote:
> Introduce board specific function board_preboot_os() to allow for board
> specific config before we boot, and use it on cm_fx6 to power off sata
> so that Linux will be able to setup it correctly.
>
> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
> Cc: Igor Grinberg <grinberg@compulab.co.il>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Tom Rini <trini@ti.com>
..
> +
> +void board_preboot_os(void)
> +{
> + cm_fx6_sata_power(0);
> +}
>
> +/* Allow for board specific config before we boot */
> +__weak void board_preboot_os(void)
> +{
> + /* please define board specific board_preboot_os() */
> +}
> +
> int boot_selected_os(int argc, char * const argv[], int state,
> bootm_headers_t *images, boot_os_fn *boot_fn)
> {
> arch_preboot_os();
> + board_preboot_os();
> boot_fn(state, argc, argv, images);
Can you also add a prototype for the board_preboot_os in say
bootm.h or similiar and make sure those headers are included.
(it will warn otherwise with W=1).
Regards, Jeroen
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 3/3] common: introduce board_preboot_os hook
2014-10-29 13:28 ` Jeroen Hofstee
@ 2014-10-29 15:23 ` Otavio Salvador
2014-10-29 15:34 ` Nikita Kiryanov
0 siblings, 1 reply; 7+ messages in thread
From: Otavio Salvador @ 2014-10-29 15:23 UTC (permalink / raw)
To: u-boot
On Wed, Oct 29, 2014 at 11:28 AM, Jeroen Hofstee <jeroen@myspectrum.nl> wrote:
> On 29-10-14 14:08, Nikita Kiryanov wrote:
>>
>> Introduce board specific function board_preboot_os() to allow for board
>> specific config before we boot, and use it on cm_fx6 to power off sata
>> so that Linux will be able to setup it correctly.
>>
>> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
>> Cc: Igor Grinberg <grinberg@compulab.co.il>
>> Cc: Stefano Babic <sbabic@denx.de>
>> Cc: Tom Rini <trini@ti.com>
>
> ..
>>
>> +
>> +void board_preboot_os(void)
>> +{
>> + cm_fx6_sata_power(0);
>> +}
>> +/* Allow for board specific config before we boot */
>> +__weak void board_preboot_os(void)
>> +{
>> + /* please define board specific board_preboot_os() */
>> +}
>> +
>> int boot_selected_os(int argc, char * const argv[], int state,
>> bootm_headers_t *images, boot_os_fn *boot_fn)
>> {
>> arch_preboot_os();
>> + board_preboot_os();
>> boot_fn(state, argc, argv, images);
>
>
> Can you also add a prototype for the board_preboot_os in say
> bootm.h or similiar and make sure those headers are included.
> (it will warn otherwise with W=1).
and also split the patch in two.
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 3/3] common: introduce board_preboot_os hook
2014-10-29 15:23 ` Otavio Salvador
@ 2014-10-29 15:34 ` Nikita Kiryanov
0 siblings, 0 replies; 7+ messages in thread
From: Nikita Kiryanov @ 2014-10-29 15:34 UTC (permalink / raw)
To: u-boot
Hi Jeroen, Otavio,
On 29/10/14 17:23, Otavio Salvador wrote:
> On Wed, Oct 29, 2014 at 11:28 AM, Jeroen Hofstee <jeroen@myspectrum.nl> wrote:
>> On 29-10-14 14:08, Nikita Kiryanov wrote:
>>>
>>> Introduce board specific function board_preboot_os() to allow for board
>>> specific config before we boot, and use it on cm_fx6 to power off sata
>>> so that Linux will be able to setup it correctly.
>>>
>>> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
>>> Cc: Igor Grinberg <grinberg@compulab.co.il>
>>> Cc: Stefano Babic <sbabic@denx.de>
>>> Cc: Tom Rini <trini@ti.com>
>>
>> ..
>>>
>>> +
>>> +void board_preboot_os(void)
>>> +{
>>> + cm_fx6_sata_power(0);
>>> +}
>>> +/* Allow for board specific config before we boot */
>>> +__weak void board_preboot_os(void)
>>> +{
>>> + /* please define board specific board_preboot_os() */
>>> +}
>>> +
>>> int boot_selected_os(int argc, char * const argv[], int state,
>>> bootm_headers_t *images, boot_os_fn *boot_fn)
>>> {
>>> arch_preboot_os();
>>> + board_preboot_os();
>>> boot_fn(state, argc, argv, images);
>>
>>
>> Can you also add a prototype for the board_preboot_os in say
>> bootm.h or similiar and make sure those headers are included.
>> (it will warn otherwise with W=1).
>
Sure.
> and also split the patch in two.
>
Alright.
--
Regards,
Nikita Kiryanov
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-10-29 15:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-29 13:08 [U-Boot] [PATCH 0/3] cm-fx6 updates Nikita Kiryanov
2014-10-29 13:08 ` [U-Boot] [PATCH 1/3] arm: mx6: cm_fx6: change issd gpio order Nikita Kiryanov
2014-10-29 13:08 ` [U-Boot] [PATCH 2/3] arm: mx6: cm_fx6: detect 1GB DRAM correctly on solo Nikita Kiryanov
2014-10-29 13:08 ` [U-Boot] [PATCH 3/3] common: introduce board_preboot_os hook Nikita Kiryanov
2014-10-29 13:28 ` Jeroen Hofstee
2014-10-29 15:23 ` Otavio Salvador
2014-10-29 15:34 ` Nikita Kiryanov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox