All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] disabling mmc in spl when booting using bootrom
@ 2016-08-11 11:31 Sandy Patterson
  2016-08-11 11:35 ` Ziyuan Xu
  0 siblings, 1 reply; 8+ messages in thread
From: Sandy Patterson @ 2016-08-11 11:31 UTC (permalink / raw)
  To: u-boot

Simon,

I am trying to format a patch to disable MMC in the SPL if booting main
u-boot using BOOTROM, therefore the SPL MMC isn't needed.

Is the best solution to wrap every header file (rock2.h firefly-rk3288.h,
etc) with ifdefs on the BACK_TO_BROM define? Or would it be better to move
the SPL MMC define into rk3288-common.h and just have chromebook_jerry
undef it like it does the SPL GPIO code.

With that change, enabling BOOT_TO_BROM shrinks the spl from 32K to 23K.

Sandy

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] disabling mmc in spl when booting using bootrom
  2016-08-11 11:31 [U-Boot] disabling mmc in spl when booting using bootrom Sandy Patterson
@ 2016-08-11 11:35 ` Ziyuan Xu
  2016-08-11 11:39   ` Sandy Patterson
  2016-08-12 17:20   ` Simon Glass
  0 siblings, 2 replies; 8+ messages in thread
From: Ziyuan Xu @ 2016-08-11 11:35 UTC (permalink / raw)
  To: u-boot



On 2016?08?11? 19:31, Sandy Patterson wrote:
> Simon,
>
> I am trying to format a patch to disable MMC in the SPL if booting 
> main u-boot using BOOTROM, therefore the SPL MMC isn't needed.
>
> Is the best solution to wrap every header file (rock2.h 
> firefly-rk3288.h, etc) with ifdefs on the BACK_TO_BROM define? Or 
> would it be better to move the SPL MMC define into rk3288-common.h and 
> just have chromebook_jerry undef it like it does the SPL GPIO code.
>
> With that change, enabling BOOT_TO_BROM shrinks the spl from 32K to 23K.
Note that, firefly-rk3288 use OF_PLATDATA, we will use 
u-boot-spl-no-dtb.bin instead of u-boot-spl-dtb.bin, and the size of 
u-boot-spl-no-dtb.bin is almost 23K.

@Simon, I think we will update doc/README.rockchip if you insist on 
OF_PLATDATA for firefly-rk3288. we no longer use u-boot-spl-dtb.bin.:-)
>
> Sandy

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] disabling mmc in spl when booting using bootrom
  2016-08-11 11:35 ` Ziyuan Xu
@ 2016-08-11 11:39   ` Sandy Patterson
  2016-08-11 11:41     ` Ziyuan Xu
  2016-08-12 17:20   ` Simon Glass
  1 sibling, 1 reply; 8+ messages in thread
From: Sandy Patterson @ 2016-08-11 11:39 UTC (permalink / raw)
  To: u-boot

On Thu, Aug 11, 2016 at 7:35 AM, Ziyuan Xu <xzy.xu@rock-chips.com> wrote:

>
>
> On 2016?08?11? 19:31, Sandy Patterson wrote:
>
>> Simon,
>>
>> I am trying to format a patch to disable MMC in the SPL if booting main
>> u-boot using BOOTROM, therefore the SPL MMC isn't needed.
>>
>> Is the best solution to wrap every header file (rock2.h firefly-rk3288.h,
>> etc) with ifdefs on the BACK_TO_BROM define? Or would it be better to move
>> the SPL MMC define into rk3288-common.h and just have chromebook_jerry
>> undef it like it does the SPL GPIO code.
>>
>> With that change, enabling BOOT_TO_BROM shrinks the spl from 32K to 23K.
>>
> Note that, firefly-rk3288 use OF_PLATDATA, we will use
> u-boot-spl-no-dtb.bin instead of u-boot-spl-dtb.bin, and the size of
> u-boot-spl-no-dtb.bin is almost 23K.
>

The patch would apply if OF_PLATDATA is used too (Although I haven't tested
it). It would just shrink the SPL more right because you don't need the MMC
driver. I wasn't planning to change any of the defconfigs.


>
> @Simon, I think we will update doc/README.rockchip if you insist on
> OF_PLATDATA for firefly-rk3288. we no longer use u-boot-spl-dtb.bin.:-)
>
>>
>> Sandy
>>
>
>
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] disabling mmc in spl when booting using bootrom
  2016-08-11 11:39   ` Sandy Patterson
@ 2016-08-11 11:41     ` Ziyuan Xu
  0 siblings, 0 replies; 8+ messages in thread
From: Ziyuan Xu @ 2016-08-11 11:41 UTC (permalink / raw)
  To: u-boot



On 2016?08?11? 19:39, Sandy Patterson wrote:
>
> On Thu, Aug 11, 2016 at 7:35 AM, Ziyuan Xu <xzy.xu@rock-chips.com 
> <mailto:xzy.xu@rock-chips.com>> wrote:
>
>
>
>     On 2016?08?11? 19:31, Sandy Patterson wrote:
>
>         Simon,
>
>         I am trying to format a patch to disable MMC in the SPL if
>         booting main u-boot using BOOTROM, therefore the SPL MMC isn't
>         needed.
>
>         Is the best solution to wrap every header file (rock2.h
>         firefly-rk3288.h, etc) with ifdefs on the BACK_TO_BROM define?
>         Or would it be better to move the SPL MMC define into
>         rk3288-common.h and just have chromebook_jerry undef it like
>         it does the SPL GPIO code.
>
>         With that change, enabling BOOT_TO_BROM shrinks the spl from
>         32K to 23K.
>
>     Note that, firefly-rk3288 use OF_PLATDATA, we will use
>     u-boot-spl-no-dtb.bin instead of u-boot-spl-dtb.bin, and the size
>     of u-boot-spl-no-dtb.bin is almost 23K.
>
>
> The patch would apply if OF_PLATDATA is used too (Although I haven't 
> tested it). It would just shrink the SPL more right because you don't 
> need the MMC driver. I wasn't planning to change any of the defconfigs.
Okay, I'll have no objection to your doing it.
>
>
>     @Simon, I think we will update doc/README.rockchip if you insist
>     on OF_PLATDATA for firefly-rk3288. we no longer use
>     u-boot-spl-dtb.bin.:-)
>
>
>         Sandy
>
>
>
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] disabling mmc in spl when booting using bootrom
  2016-08-11 11:35 ` Ziyuan Xu
  2016-08-11 11:39   ` Sandy Patterson
@ 2016-08-12 17:20   ` Simon Glass
  2016-08-12 17:35     ` Sandy Patterson
  1 sibling, 1 reply; 8+ messages in thread
From: Simon Glass @ 2016-08-12 17:20 UTC (permalink / raw)
  To: u-boot

Hi Ziyuan,

On 11 August 2016 at 05:35, Ziyuan Xu <xzy.xu@rock-chips.com> wrote:
>
>
> On 2016?08?11? 19:31, Sandy Patterson wrote:
>>
>> Simon,
>>
>> I am trying to format a patch to disable MMC in the SPL if booting main
>> u-boot using BOOTROM, therefore the SPL MMC isn't needed.
>>
>> Is the best solution to wrap every header file (rock2.h firefly-rk3288.h,
>> etc) with ifdefs on the BACK_TO_BROM define? Or would it be better to move
>> the SPL MMC define into rk3288-common.h and just have chromebook_jerry undef
>> it like it does the SPL GPIO code.
>>
>> With that change, enabling BOOT_TO_BROM shrinks the spl from 32K to 23K.
>
> Note that, firefly-rk3288 use OF_PLATDATA, we will use u-boot-spl-no-dtb.bin
> instead of u-boot-spl-dtb.bin, and the size of u-boot-spl-no-dtb.bin is
> almost 23K.
>
> @Simon, I think we will update doc/README.rockchip if you insist on
> OF_PLATDATA for firefly-rk3288. we no longer use u-boot-spl-dtb.bin.:-)

I don't insist :-)

I really don't like OF_PLATDATA. But it cuts the size down a lot
(~6KB) and we are otherwise always running out of space on rk3288.

If there is a better idea, let's have it. Otherwise, yes we can update the docs.

Regards,
Simon

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] disabling mmc in spl when booting using bootrom
  2016-08-12 17:20   ` Simon Glass
@ 2016-08-12 17:35     ` Sandy Patterson
  2016-09-23  2:56       ` Simon Glass
  0 siblings, 1 reply; 8+ messages in thread
From: Sandy Patterson @ 2016-08-12 17:35 UTC (permalink / raw)
  To: u-boot

On Fri, Aug 12, 2016 at 1:20 PM, Simon Glass <sjg@chromium.org> wrote:

> Hi Ziyuan,
>
> On 11 August 2016 at 05:35, Ziyuan Xu <xzy.xu@rock-chips.com> wrote:
> >
> >
> > On 2016?08?11? 19:31, Sandy Patterson wrote:
> >>
> >> Simon,
> >>
> >> I am trying to format a patch to disable MMC in the SPL if booting main
> >> u-boot using BOOTROM, therefore the SPL MMC isn't needed.
> >>
> >> Is the best solution to wrap every header file (rock2.h
> firefly-rk3288.h,
> >> etc) with ifdefs on the BACK_TO_BROM define? Or would it be better to
> move
> >> the SPL MMC define into rk3288-common.h and just have chromebook_jerry
> undef
> >> it like it does the SPL GPIO code.
> >>
> >> With that change, enabling BOOT_TO_BROM shrinks the spl from 32K to 23K.
> >
> > Note that, firefly-rk3288 use OF_PLATDATA, we will use
> u-boot-spl-no-dtb.bin
> > instead of u-boot-spl-dtb.bin, and the size of u-boot-spl-no-dtb.bin is
> > almost 23K.
> >
> > @Simon, I think we will update doc/README.rockchip if you insist on
> > OF_PLATDATA for firefly-rk3288. we no longer use u-boot-spl-dtb.bin.:-)
>
> I don't insist :-)
>
> I really don't like OF_PLATDATA. But it cuts the size down a lot
> (~6KB) and we are otherwise always running out of space on rk3288.
>
> If there is a better idea, let's have it. Otherwise, yes we can update the
> docs.
>

@Ziyuan, I did my testing on rock2 which doesn't use OF_PLATDATA, the
firefly
board should see the same final size which is roughly equivalent to the
current
firefly SPL size.

We ran out of space in SPL. I too was afraid of using OF_PLATDATA mostly
from
Simon's commit message.

I would propose moving to using the BOOTROM to load U-Boot proper. You
shouldn't
need any of the media drivers since the BOOTROM was already able to load
the SPL
it should be fine loading the full U-Boot.

I get 9K from removing MMC from rock2. I'm happy to write a patch that
applies this logic
to the remainder of the rk3288 boards if that's the way you'd like to go.
You could test it by
enabling the BOOT_TO_BROM config.


>
> Regards,
> Simon
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] disabling mmc in spl when booting using bootrom
  2016-08-12 17:35     ` Sandy Patterson
@ 2016-09-23  2:56       ` Simon Glass
  2016-09-23 11:59         ` Sandy Patterson
  0 siblings, 1 reply; 8+ messages in thread
From: Simon Glass @ 2016-09-23  2:56 UTC (permalink / raw)
  To: u-boot

Hi Sandy,

On 12 August 2016 at 11:35, Sandy Patterson <apatterson@sightlogix.com> wrote:
>
>
> On Fri, Aug 12, 2016 at 1:20 PM, Simon Glass <sjg@chromium.org> wrote:
>>
>> Hi Ziyuan,
>>
>> On 11 August 2016 at 05:35, Ziyuan Xu <xzy.xu@rock-chips.com> wrote:
>> >
>> >
>> > On 2016?08?11? 19:31, Sandy Patterson wrote:
>> >>
>> >> Simon,
>> >>
>> >> I am trying to format a patch to disable MMC in the SPL if booting main
>> >> u-boot using BOOTROM, therefore the SPL MMC isn't needed.
>> >>
>> >> Is the best solution to wrap every header file (rock2.h
>> >> firefly-rk3288.h,
>> >> etc) with ifdefs on the BACK_TO_BROM define? Or would it be better to
>> >> move
>> >> the SPL MMC define into rk3288-common.h and just have chromebook_jerry
>> >> undef
>> >> it like it does the SPL GPIO code.
>> >>
>> >> With that change, enabling BOOT_TO_BROM shrinks the spl from 32K to
>> >> 23K.
>> >
>> > Note that, firefly-rk3288 use OF_PLATDATA, we will use
>> > u-boot-spl-no-dtb.bin
>> > instead of u-boot-spl-dtb.bin, and the size of u-boot-spl-no-dtb.bin is
>> > almost 23K.
>> >
>> > @Simon, I think we will update doc/README.rockchip if you insist on
>> > OF_PLATDATA for firefly-rk3288. we no longer use u-boot-spl-dtb.bin.:-)
>>
>> I don't insist :-)
>>
>> I really don't like OF_PLATDATA. But it cuts the size down a lot
>> (~6KB) and we are otherwise always running out of space on rk3288.
>>
>> If there is a better idea, let's have it. Otherwise, yes we can update the
>> docs.
>
>
> @Ziyuan, I did my testing on rock2 which doesn't use OF_PLATDATA, the
> firefly
> board should see the same final size which is roughly equivalent to the
> current
> firefly SPL size.
>
> We ran out of space in SPL. I too was afraid of using OF_PLATDATA mostly
> from
> Simon's commit message.
>
> I would propose moving to using the BOOTROM to load U-Boot proper. You
> shouldn't
> need any of the media drivers since the BOOTROM was already able to load the
> SPL
> it should be fine loading the full U-Boot.
>
> I get 9K from removing MMC from rock2. I'm happy to write a patch that
> applies this logic
> to the remainder of the rk3288 boards if that's the way you'd like to go.
> You could test it by
> enabling the BOOT_TO_BROM config.

My concern with the Rockchip back-to-brom feature is that then U-Boot
cannot load U-Boot normally as SPL likes to do. I think it is fine
when we are short on space, but OF_PLATDATA fixes that.

So I think the back-to-rom feature need to be optional on boards which
don't have to use it, since it uses a non-standard boot approach,

Regards,
Simon

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] disabling mmc in spl when booting using bootrom
  2016-09-23  2:56       ` Simon Glass
@ 2016-09-23 11:59         ` Sandy Patterson
  0 siblings, 0 replies; 8+ messages in thread
From: Sandy Patterson @ 2016-09-23 11:59 UTC (permalink / raw)
  To: u-boot

>
> My concern with the Rockchip back-to-brom feature is that then U-Boot
> cannot load U-Boot normally as SPL likes to do. I think it is fine
> when we are short on space, but OF_PLATDATA fixes that.
>
> So I think the back-to-rom feature need to be optional on boards which
> don't have to use it, since it uses a non-standard boot approach,
>
>
It seems like OF_PLATDATA could be used across the board for RK3288. We
found that the amount of code changes in the two approaches made us more
comfortable using the RK3288 BOOTROM to load u-boot proper. But that was
for our specific use case.

Thanks for the feedback. I'll abandon this changeset. Kever is essentially
doing what you recommend in his SDRAM patches anyway.

Sandy

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-09-23 11:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-11 11:31 [U-Boot] disabling mmc in spl when booting using bootrom Sandy Patterson
2016-08-11 11:35 ` Ziyuan Xu
2016-08-11 11:39   ` Sandy Patterson
2016-08-11 11:41     ` Ziyuan Xu
2016-08-12 17:20   ` Simon Glass
2016-08-12 17:35     ` Sandy Patterson
2016-09-23  2:56       ` Simon Glass
2016-09-23 11:59         ` Sandy Patterson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.