* [U-Boot] [PATCH V2 0/4] cm-fx6 updates
@ 2014-10-29 15:56 Nikita Kiryanov
2014-10-29 15:56 ` [U-Boot] [PATCH V2 1/4] arm: mx6: cm_fx6: change issd gpio order Nikita Kiryanov
` (4 more replies)
0 siblings, 5 replies; 16+ messages in thread
From: Nikita Kiryanov @ 2014-10-29 15:56 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>
Changes in V2:
- Added board_preboot_os to bootm.h
- Split "common: introduce board_preboot_os hook" into 2 patches
Nikita Kiryanov (4):
arm: mx6: cm_fx6: change issd gpio order
arm: mx6: cm_fx6: detect 1GB DRAM correctly on solo
common: introduce board_preboot_os hook
arm: mx6: cm_fx6: power down sata on OS boot
board/compulab/cm_fx6/cm_fx6.c | 8 +++++++-
board/compulab/cm_fx6/spl.c | 7 ++++---
common/bootm_os.c | 7 +++++++
include/bootm.h | 1 +
4 files changed, 19 insertions(+), 4 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 16+ messages in thread* [U-Boot] [PATCH V2 1/4] arm: mx6: cm_fx6: change issd gpio order 2014-10-29 15:56 [U-Boot] [PATCH V2 0/4] cm-fx6 updates Nikita Kiryanov @ 2014-10-29 15:56 ` Nikita Kiryanov 2014-10-29 16:01 ` Nikita Kiryanov 2014-11-02 14:33 ` Igor Grinberg 2014-10-29 15:56 ` [U-Boot] [PATCH V2 2/4] arm: mx6: cm_fx6: detect 1GB DRAM correctly on solo Nikita Kiryanov ` (3 subsequent siblings) 4 siblings, 2 replies; 16+ messages in thread From: Nikita Kiryanov @ 2014-10-29 15:56 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] 16+ messages in thread
* [U-Boot] [PATCH V2 1/4] arm: mx6: cm_fx6: change issd gpio order 2014-10-29 15:56 ` [U-Boot] [PATCH V2 1/4] arm: mx6: cm_fx6: change issd gpio order Nikita Kiryanov @ 2014-10-29 16:01 ` Nikita Kiryanov 2014-11-02 14:33 ` Igor Grinberg 1 sibling, 0 replies; 16+ messages in thread From: Nikita Kiryanov @ 2014-10-29 16:01 UTC (permalink / raw) To: u-boot Forgot the changelog: On 29/10/14 17:56, Nikita Kiryanov wrote: > 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> > --- Changes in V2: - No changes. > 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) > -- Regards, Nikita Kiryanov ^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH V2 1/4] arm: mx6: cm_fx6: change issd gpio order 2014-10-29 15:56 ` [U-Boot] [PATCH V2 1/4] arm: mx6: cm_fx6: change issd gpio order Nikita Kiryanov 2014-10-29 16:01 ` Nikita Kiryanov @ 2014-11-02 14:33 ` Igor Grinberg 1 sibling, 0 replies; 16+ messages in thread From: Igor Grinberg @ 2014-11-02 14:33 UTC (permalink / raw) To: u-boot On 10/29/14 17:56, Nikita Kiryanov wrote: > 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> Acked-by: Igor Grinberg <grinberg@compulab.co.il> -- Regards, Igor. ^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH V2 2/4] arm: mx6: cm_fx6: detect 1GB DRAM correctly on solo 2014-10-29 15:56 [U-Boot] [PATCH V2 0/4] cm-fx6 updates Nikita Kiryanov 2014-10-29 15:56 ` [U-Boot] [PATCH V2 1/4] arm: mx6: cm_fx6: change issd gpio order Nikita Kiryanov @ 2014-10-29 15:56 ` Nikita Kiryanov 2014-10-29 16:02 ` Nikita Kiryanov 2014-11-02 14:34 ` Igor Grinberg 2014-10-29 15:56 ` [U-Boot] [PATCH V2 3/4] common: introduce board_preboot_os hook Nikita Kiryanov ` (2 subsequent siblings) 4 siblings, 2 replies; 16+ messages in thread From: Nikita Kiryanov @ 2014-10-29 15:56 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] 16+ messages in thread
* [U-Boot] [PATCH V2 2/4] arm: mx6: cm_fx6: detect 1GB DRAM correctly on solo 2014-10-29 15:56 ` [U-Boot] [PATCH V2 2/4] arm: mx6: cm_fx6: detect 1GB DRAM correctly on solo Nikita Kiryanov @ 2014-10-29 16:02 ` Nikita Kiryanov 2014-11-02 14:34 ` Igor Grinberg 1 sibling, 0 replies; 16+ messages in thread From: Nikita Kiryanov @ 2014-10-29 16:02 UTC (permalink / raw) To: u-boot Forgot the changelog: On 29/10/14 17:56, Nikita Kiryanov wrote: > 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> > --- Changes in V2: - No changes. > 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; > } > -- Regards, Nikita Kiryanov ^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH V2 2/4] arm: mx6: cm_fx6: detect 1GB DRAM correctly on solo 2014-10-29 15:56 ` [U-Boot] [PATCH V2 2/4] arm: mx6: cm_fx6: detect 1GB DRAM correctly on solo Nikita Kiryanov 2014-10-29 16:02 ` Nikita Kiryanov @ 2014-11-02 14:34 ` Igor Grinberg 1 sibling, 0 replies; 16+ messages in thread From: Igor Grinberg @ 2014-11-02 14:34 UTC (permalink / raw) To: u-boot On 10/29/14 17:56, Nikita Kiryanov wrote: > 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> Acked-by: Igor Grinberg <grinberg@compulab.co.il> -- Regards, Igor. ^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH V2 3/4] common: introduce board_preboot_os hook 2014-10-29 15:56 [U-Boot] [PATCH V2 0/4] cm-fx6 updates Nikita Kiryanov 2014-10-29 15:56 ` [U-Boot] [PATCH V2 1/4] arm: mx6: cm_fx6: change issd gpio order Nikita Kiryanov 2014-10-29 15:56 ` [U-Boot] [PATCH V2 2/4] arm: mx6: cm_fx6: detect 1GB DRAM correctly on solo Nikita Kiryanov @ 2014-10-29 15:56 ` Nikita Kiryanov 2014-10-29 15:59 ` Otavio Salvador ` (2 more replies) 2014-10-29 15:56 ` [U-Boot] [PATCH V2 4/4] arm: mx6: cm_fx6: power down sata on OS boot Nikita Kiryanov 2014-11-05 16:19 ` [U-Boot] [PATCH V2 0/4] cm-fx6 updates Stefano Babic 4 siblings, 3 replies; 16+ messages in thread From: Nikita Kiryanov @ 2014-10-29 15:56 UTC (permalink / raw) To: u-boot Introduce board specific function board_preboot_os() to allow for board specific config before we boot. 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> Cc: Jeroen Hofstee <jeroen@myspectrum.nl> Cc: Otavio Salvador <otavio@ossystems.com.br> --- Changes in V2: - Added board_preboot_os to bootm.h - Split cm_fx6 stuff into a separate patch common/bootm_os.c | 7 +++++++ include/bootm.h | 1 + 2 files changed, 8 insertions(+) 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' */ diff --git a/include/bootm.h b/include/bootm.h index b3d1a62..7a57264 100644 --- a/include/bootm.h +++ b/include/bootm.h @@ -55,5 +55,6 @@ int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], int states, bootm_headers_t *images, int boot_progress); void arch_preboot_os(void); +void board_preboot_os(void); #endif -- 1.9.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH V2 3/4] common: introduce board_preboot_os hook 2014-10-29 15:56 ` [U-Boot] [PATCH V2 3/4] common: introduce board_preboot_os hook Nikita Kiryanov @ 2014-10-29 15:59 ` Otavio Salvador 2014-11-02 14:36 ` Igor Grinberg 2014-11-05 12:32 ` Stefano Babic 2 siblings, 0 replies; 16+ messages in thread From: Otavio Salvador @ 2014-10-29 15:59 UTC (permalink / raw) To: u-boot On Wed, Oct 29, 2014 at 1:56 PM, Nikita Kiryanov <nikita@compulab.co.il> wrote: > Introduce board specific function board_preboot_os() to allow for board > specific config before we boot. > > 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> > Cc: Jeroen Hofstee <jeroen@myspectrum.nl> > Cc: Otavio Salvador <otavio@ossystems.com.br> Acked-by: Otavio Salvador <otavio@ossystems.com.br> -- 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] 16+ messages in thread
* [U-Boot] [PATCH V2 3/4] common: introduce board_preboot_os hook 2014-10-29 15:56 ` [U-Boot] [PATCH V2 3/4] common: introduce board_preboot_os hook Nikita Kiryanov 2014-10-29 15:59 ` Otavio Salvador @ 2014-11-02 14:36 ` Igor Grinberg 2014-11-05 12:32 ` Stefano Babic 2 siblings, 0 replies; 16+ messages in thread From: Igor Grinberg @ 2014-11-02 14:36 UTC (permalink / raw) To: u-boot On 10/29/14 17:56, Nikita Kiryanov wrote: > Introduce board specific function board_preboot_os() to allow for board > specific config before we boot. > > 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> > Cc: Jeroen Hofstee <jeroen@myspectrum.nl> > Cc: Otavio Salvador <otavio@ossystems.com.br> Acked-by: Igor Grinberg <grinberg@compulab.co.il> -- Regards, Igor. ^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH V2 3/4] common: introduce board_preboot_os hook 2014-10-29 15:56 ` [U-Boot] [PATCH V2 3/4] common: introduce board_preboot_os hook Nikita Kiryanov 2014-10-29 15:59 ` Otavio Salvador 2014-11-02 14:36 ` Igor Grinberg @ 2014-11-05 12:32 ` Stefano Babic 2014-11-06 11:31 ` Nikita Kiryanov 2 siblings, 1 reply; 16+ messages in thread From: Stefano Babic @ 2014-11-05 12:32 UTC (permalink / raw) To: u-boot Hi Nikita, On 29/10/2014 16:56, Nikita Kiryanov wrote: > Introduce board specific function board_preboot_os() to allow for board > specific config before we boot. > > 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> > Cc: Jeroen Hofstee <jeroen@myspectrum.nl> > Cc: Otavio Salvador <otavio@ossystems.com.br> > --- > Changes in V2: > - Added board_preboot_os to bootm.h > - Split cm_fx6 stuff into a separate patch > > common/bootm_os.c | 7 +++++++ > include/bootm.h | 1 + > 2 files changed, 8 insertions(+) > There is something that does not convince me. Really, the general statement should be to turn all devices off before booting the kernel, because this is what Linux expects. That said, this could be later solved with dm, because we will can iterate through all drivers and call a shutdown function. Currently, "preboot" functions are turning off the hardware, so the name is already misleading. And I see that arch_preboot_os() was also convinced (because it is weak) to become a board_preboot, for example here: board/renesas/koelsch/koelsch.c (and in other renesas implementation, too). I have some concerns adding a new weak function, that enables some further hooks inside board code. I find it not well scalable. In your case, you need such as sata_shutdown(), and it should be responsibility of the general sata code to call something specific for the board, if necessary. In current code, bootm_disable_interrupts() calls also usb_stop() and eth_halt(), - nothing to do with the name of the function. IMHO it should be better to move the code to shutdown interface inside boot_selected_os(), or having a common function "disable_hardware()" that calls usb_stop(), eth_halt() and then, why not, a sata_stop(). There is also in arch/arm/imx-common/cpu.c a derived implementation for arch_preboot_os(). Really it has nothing to do with arch, as I can see: it shuts down only the IPU. But it is another hook, and IMHO it is better stopping sata here as adding a hidden callback. Best regards, Stefano Babic > 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' */ > diff --git a/include/bootm.h b/include/bootm.h > index b3d1a62..7a57264 100644 > --- a/include/bootm.h > +++ b/include/bootm.h > @@ -55,5 +55,6 @@ int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], > int states, bootm_headers_t *images, int boot_progress); > > void arch_preboot_os(void); > +void board_preboot_os(void); > > #endif > -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de ===================================================================== ^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH V2 3/4] common: introduce board_preboot_os hook 2014-11-05 12:32 ` Stefano Babic @ 2014-11-06 11:31 ` Nikita Kiryanov 0 siblings, 0 replies; 16+ messages in thread From: Nikita Kiryanov @ 2014-11-06 11:31 UTC (permalink / raw) To: u-boot Hi Stefano, On 11/05/2014 02:32 PM, Stefano Babic wrote: > Hi Nikita, > > On 29/10/2014 16:56, Nikita Kiryanov wrote: >> Introduce board specific function board_preboot_os() to allow for board >> specific config before we boot. >> >> 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> >> Cc: Jeroen Hofstee <jeroen@myspectrum.nl> >> Cc: Otavio Salvador <otavio@ossystems.com.br> >> --- >> Changes in V2: >> - Added board_preboot_os to bootm.h >> - Split cm_fx6 stuff into a separate patch >> >> common/bootm_os.c | 7 +++++++ >> include/bootm.h | 1 + >> 2 files changed, 8 insertions(+) >> > > There is something that does not convince me. Really, the general > statement should be to turn all devices off before booting the kernel, > because this is what Linux expects. That said, this could be later > solved with dm, because we will can iterate through all drivers and call > a shutdown function. > > Currently, "preboot" functions are turning off the hardware, so the name > is already misleading. And I see that arch_preboot_os() was also > convinced (because it is weak) to become a board_preboot, for example > here: board/renesas/koelsch/koelsch.c (and in other renesas > implementation, too). > > I have some concerns adding a new weak function, that enables some > further hooks inside board code. I find it not well scalable. > In your case, you need such as sata_shutdown(), and it should be > responsibility of the general sata code to call something specific for > the board, if necessary. > > In current code, bootm_disable_interrupts() calls also usb_stop() and > eth_halt(), - nothing to do with the name of the function. IMHO it > should be better to move the code to shutdown interface inside > boot_selected_os(), or having a common function "disable_hardware()" > that calls usb_stop(), eth_halt() and then, why not, a sata_stop(). > > There is also in arch/arm/imx-common/cpu.c a derived implementation for > arch_preboot_os(). Really it has nothing to do with arch, as I can see: > it shuts down only the IPU. But it is another hook, and IMHO it is > better stopping sata here as adding a hidden callback. You make some good points. I'll switch to using arch_preboot_os until there's a better way of doing this. -- Regards, Nikita Kiryanov ^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH V2 4/4] arm: mx6: cm_fx6: power down sata on OS boot 2014-10-29 15:56 [U-Boot] [PATCH V2 0/4] cm-fx6 updates Nikita Kiryanov ` (2 preceding siblings ...) 2014-10-29 15:56 ` [U-Boot] [PATCH V2 3/4] common: introduce board_preboot_os hook Nikita Kiryanov @ 2014-10-29 15:56 ` Nikita Kiryanov 2014-10-29 15:59 ` Otavio Salvador 2014-11-02 14:36 ` Igor Grinberg 2014-11-05 16:19 ` [U-Boot] [PATCH V2 0/4] cm-fx6 updates Stefano Babic 4 siblings, 2 replies; 16+ messages in thread From: Nikita Kiryanov @ 2014-10-29 15:56 UTC (permalink / raw) To: u-boot If sata is used by U-Boot, the Linux kernel fails to detect the ssd correctly afterwards. Power off sata on OS boot so that Linux will have a clean state to work with. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Stefano Babic <sbabic@denx.de> Cc: Jeroen Hofstee <jeroen@myspectrum.nl> Cc: Otavio Salvador <otavio@ossystems.com.br> --- Changes in V2: - New patch split off the previous patch. board/compulab/cm_fx6/cm_fx6.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c index 0206ae8..676de40 100644 --- a/board/compulab/cm_fx6/cm_fx6.c +++ b/board/compulab/cm_fx6/cm_fx6.c @@ -15,6 +15,7 @@ #include <netdev.h> #include <fdt_support.h> #include <sata.h> +#include <bootm.h> #include <asm/arch/crm_regs.h> #include <asm/arch/sys_proto.h> #include <asm/arch/iomux.h> @@ -125,6 +126,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 -- 1.9.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH V2 4/4] arm: mx6: cm_fx6: power down sata on OS boot 2014-10-29 15:56 ` [U-Boot] [PATCH V2 4/4] arm: mx6: cm_fx6: power down sata on OS boot Nikita Kiryanov @ 2014-10-29 15:59 ` Otavio Salvador 2014-11-02 14:36 ` Igor Grinberg 1 sibling, 0 replies; 16+ messages in thread From: Otavio Salvador @ 2014-10-29 15:59 UTC (permalink / raw) To: u-boot On Wed, Oct 29, 2014 at 1:56 PM, Nikita Kiryanov <nikita@compulab.co.il> wrote: > If sata is used by U-Boot, the Linux kernel fails to detect the ssd > correctly afterwards. Power off sata on OS boot so that Linux will have > a clean state to work with. > > Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> > Cc: Igor Grinberg <grinberg@compulab.co.il> > Cc: Stefano Babic <sbabic@denx.de> > Cc: Jeroen Hofstee <jeroen@myspectrum.nl> > Cc: Otavio Salvador <otavio@ossystems.com.br> > --- Acked-by: Otavio Salvador <otavio@ossystems.com.br> -- 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] 16+ messages in thread
* [U-Boot] [PATCH V2 4/4] arm: mx6: cm_fx6: power down sata on OS boot 2014-10-29 15:56 ` [U-Boot] [PATCH V2 4/4] arm: mx6: cm_fx6: power down sata on OS boot Nikita Kiryanov 2014-10-29 15:59 ` Otavio Salvador @ 2014-11-02 14:36 ` Igor Grinberg 1 sibling, 0 replies; 16+ messages in thread From: Igor Grinberg @ 2014-11-02 14:36 UTC (permalink / raw) To: u-boot On 10/29/14 17:56, Nikita Kiryanov wrote: > If sata is used by U-Boot, the Linux kernel fails to detect the ssd > correctly afterwards. Power off sata on OS boot so that Linux will have > a clean state to work with. > > Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> > Cc: Igor Grinberg <grinberg@compulab.co.il> > Cc: Stefano Babic <sbabic@denx.de> > Cc: Jeroen Hofstee <jeroen@myspectrum.nl> > Cc: Otavio Salvador <otavio@ossystems.com.br> Acked-by: Igor Grinberg <grinberg@compulab.co.il> -- Regards, Igor. ^ permalink raw reply [flat|nested] 16+ messages in thread
* [U-Boot] [PATCH V2 0/4] cm-fx6 updates 2014-10-29 15:56 [U-Boot] [PATCH V2 0/4] cm-fx6 updates Nikita Kiryanov ` (3 preceding siblings ...) 2014-10-29 15:56 ` [U-Boot] [PATCH V2 4/4] arm: mx6: cm_fx6: power down sata on OS boot Nikita Kiryanov @ 2014-11-05 16:19 ` Stefano Babic 4 siblings, 0 replies; 16+ messages in thread From: Stefano Babic @ 2014-11-05 16:19 UTC (permalink / raw) To: u-boot On 29/10/2014 16:56, Nikita Kiryanov wrote: > 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> > > Changes in V2: > - Added board_preboot_os to bootm.h > - Split "common: introduce board_preboot_os hook" into 2 patches > > Nikita Kiryanov (4): > arm: mx6: cm_fx6: change issd gpio order > arm: mx6: cm_fx6: detect 1GB DRAM correctly on solo First two patches applied to u-boot-imx, thanks ! Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de ===================================================================== ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2014-11-06 11:31 UTC | newest] Thread overview: 16+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-10-29 15:56 [U-Boot] [PATCH V2 0/4] cm-fx6 updates Nikita Kiryanov 2014-10-29 15:56 ` [U-Boot] [PATCH V2 1/4] arm: mx6: cm_fx6: change issd gpio order Nikita Kiryanov 2014-10-29 16:01 ` Nikita Kiryanov 2014-11-02 14:33 ` Igor Grinberg 2014-10-29 15:56 ` [U-Boot] [PATCH V2 2/4] arm: mx6: cm_fx6: detect 1GB DRAM correctly on solo Nikita Kiryanov 2014-10-29 16:02 ` Nikita Kiryanov 2014-11-02 14:34 ` Igor Grinberg 2014-10-29 15:56 ` [U-Boot] [PATCH V2 3/4] common: introduce board_preboot_os hook Nikita Kiryanov 2014-10-29 15:59 ` Otavio Salvador 2014-11-02 14:36 ` Igor Grinberg 2014-11-05 12:32 ` Stefano Babic 2014-11-06 11:31 ` Nikita Kiryanov 2014-10-29 15:56 ` [U-Boot] [PATCH V2 4/4] arm: mx6: cm_fx6: power down sata on OS boot Nikita Kiryanov 2014-10-29 15:59 ` Otavio Salvador 2014-11-02 14:36 ` Igor Grinberg 2014-11-05 16:19 ` [U-Boot] [PATCH V2 0/4] cm-fx6 updates Stefano Babic
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox