diff mbox

[U-Boot,v3,4/4] arm: ls102xa: Enable Driver Model SPI for ls1021atwr

Message ID 1431955503-10979-1-git-send-email-haikun.wang@freescale.com
State Accepted
Delegated to: Jagannadha Sutradharudu Teki
Headers show

Commit Message

Haikun.Wang@freescale.com May 18, 2015, 1:25 p.m. UTC
From: Haikun Wang <Haikun.Wang@freescale.com>

Enable Driver Model SPI for ls1021atwr board.
DSPI and QSPI only be enabled when boot from QSPI.
DSPI and QSPI are compatible under Driver Model SPI.

Signed-off-by: Haikun Wang <Haikun.Wang@freescale.com>
Change-Id: I6342807da7725ae8b678952117c8758c75a61d3d
Reviewed-on: http://git.am.freescale.net:8181/33447
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar@freescale.com>
---
Changes in v3:
- IS_ENABLED(CONFIG_XXX) is only work with configure option in Kconfig,
  and DM core code use IS_ENABLED(), so configure option in head file
  can't work, so remove CONFIG_OF_CONTROL CONFIG_OF_SEPARATE CONFIG_DM CONFIG_DM_SPI

Changes in v2:
- Move all changes inside of CONFIG_QSPI_BOOT 

Changes in v1: None
 include/configs/ls1021atwr.h | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

Comments

Jagan Teki June 16, 2015, 8:55 a.m. UTC | #1
Pls- resend this series by adding Data Flash driver to it.

On 18 May 2015 at 18:55, Haikun Wang <haikun.wang@freescale.com> wrote:
> From: Haikun Wang <Haikun.Wang@freescale.com>
>
> Enable Driver Model SPI for ls1021atwr board.
> DSPI and QSPI only be enabled when boot from QSPI.
> DSPI and QSPI are compatible under Driver Model SPI.
>
> Signed-off-by: Haikun Wang <Haikun.Wang@freescale.com>
> Change-Id: I6342807da7725ae8b678952117c8758c75a61d3d
> Reviewed-on: http://git.am.freescale.net:8181/33447
> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
> Reviewed-by: Prabhakar Kushwaha <prabhakar@freescale.com>
> ---
> Changes in v3:
> - IS_ENABLED(CONFIG_XXX) is only work with configure option in Kconfig,
>   and DM core code use IS_ENABLED(), so configure option in head file
>   can't work, so remove CONFIG_OF_CONTROL CONFIG_OF_SEPARATE CONFIG_DM CONFIG_DM_SPI
>
> Changes in v2:
> - Move all changes inside of CONFIG_QSPI_BOOT
>
> Changes in v1: None
>  include/configs/ls1021atwr.h | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
> index 729205f..13e3aa4 100644
> --- a/include/configs/ls1021atwr.h
> +++ b/include/configs/ls1021atwr.h
> @@ -229,16 +229,22 @@
>  #define CONFIG_CMD_FAT
>  #define CONFIG_DOS_PARTITION
>
> -/* QSPI */
> +/* SPI */
>  #ifdef CONFIG_QSPI_BOOT
> +/* QSPI */
>  #define CONFIG_FSL_QSPI
>  #define QSPI0_AMBA_BASE                        0x40000000
>  #define FSL_QSPI_FLASH_SIZE            (1 << 24)
>  #define FSL_QSPI_FLASH_NUM             2
>
> +#define CONFIG_SPI_FLASH_STMICRO
> +
> +/* DM SPI */
> +#if defined(CONFIG_FSL_DSPI) || defined(CONFIG_FSL_QSPI)
>  #define CONFIG_CMD_SF
> +#define CONFIG_DM_SPI_FLASH
>  #define CONFIG_SPI_FLASH
> -#define CONFIG_SPI_FLASH_STMICRO
> +#endif
>  #endif
>
>  /*
> --
> 2.1.0.27.g96db324
>
Haikun.Wang@freescale.com June 17, 2015, 9:11 a.m. UTC | #2
On 6/16/2015 4:55 PM, Jagan Teki wrote:
> Pls- resend this series by adding Data Flash driver to it.
In fact we only have Atmel Dataflash on ls1021aqds board.
And I have add the "#define CONFIG_SF_DATAFLASH" in ls1021aqds.h.
Please see below patch:
[U-Boot,v3,3/4] arm: ls102xa: Enable Driver Model SPI for ls1021aqds

Best regards,
Wang Haikun
>
> On 18 May 2015 at 18:55, Haikun Wang <haikun.wang@freescale.com> wrote:
>> From: Haikun Wang <Haikun.Wang@freescale.com>
>>
>> Enable Driver Model SPI for ls1021atwr board.
>> DSPI and QSPI only be enabled when boot from QSPI.
>> DSPI and QSPI are compatible under Driver Model SPI.
>>
>> Signed-off-by: Haikun Wang <Haikun.Wang@freescale.com>
>> Change-Id: I6342807da7725ae8b678952117c8758c75a61d3d
>> Reviewed-on: http://git.am.freescale.net:8181/33447
>> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
>> Reviewed-by: Prabhakar Kushwaha <prabhakar@freescale.com>
>> ---
>> Changes in v3:
>> - IS_ENABLED(CONFIG_XXX) is only work with configure option in Kconfig,
>>    and DM core code use IS_ENABLED(), so configure option in head file
>>    can't work, so remove CONFIG_OF_CONTROL CONFIG_OF_SEPARATE CONFIG_DM CONFIG_DM_SPI
>>
>> Changes in v2:
>> - Move all changes inside of CONFIG_QSPI_BOOT
>>
>> Changes in v1: None
>>   include/configs/ls1021atwr.h | 10 ++++++++--
>>   1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
>> index 729205f..13e3aa4 100644
>> --- a/include/configs/ls1021atwr.h
>> +++ b/include/configs/ls1021atwr.h
>> @@ -229,16 +229,22 @@
>>   #define CONFIG_CMD_FAT
>>   #define CONFIG_DOS_PARTITION
>>
>> -/* QSPI */
>> +/* SPI */
>>   #ifdef CONFIG_QSPI_BOOT
>> +/* QSPI */
>>   #define CONFIG_FSL_QSPI
>>   #define QSPI0_AMBA_BASE                        0x40000000
>>   #define FSL_QSPI_FLASH_SIZE            (1 << 24)
>>   #define FSL_QSPI_FLASH_NUM             2
>>
>> +#define CONFIG_SPI_FLASH_STMICRO
>> +
>> +/* DM SPI */
>> +#if defined(CONFIG_FSL_DSPI) || defined(CONFIG_FSL_QSPI)
>>   #define CONFIG_CMD_SF
>> +#define CONFIG_DM_SPI_FLASH
>>   #define CONFIG_SPI_FLASH
>> -#define CONFIG_SPI_FLASH_STMICRO
>> +#endif
>>   #endif
>>
>>   /*
>> --
>> 2.1.0.27.g96db324
>>
>
>
>
Bin Meng June 17, 2015, 9:36 a.m. UTC | #3
Hi Haikun,

On Mon, May 18, 2015 at 9:25 PM, Haikun Wang <haikun.wang@freescale.com> wrote:
> From: Haikun Wang <Haikun.Wang@freescale.com>
>
> Enable Driver Model SPI for ls1021atwr board.
> DSPI and QSPI only be enabled when boot from QSPI.
> DSPI and QSPI are compatible under Driver Model SPI.
>
> Signed-off-by: Haikun Wang <Haikun.Wang@freescale.com>
> Change-Id: I6342807da7725ae8b678952117c8758c75a61d3d
> Reviewed-on: http://git.am.freescale.net:8181/33447

Is this URL Freescale internal? I cannot access it.

> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
> Reviewed-by: Prabhakar Kushwaha <prabhakar@freescale.com>
> ---
> Changes in v3:
> - IS_ENABLED(CONFIG_XXX) is only work with configure option in Kconfig,
>   and DM core code use IS_ENABLED(), so configure option in head file
>   can't work, so remove CONFIG_OF_CONTROL CONFIG_OF_SEPARATE CONFIG_DM CONFIG_DM_SPI
>
> Changes in v2:
> - Move all changes inside of CONFIG_QSPI_BOOT
>
> Changes in v1: None
>  include/configs/ls1021atwr.h | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
> index 729205f..13e3aa4 100644
> --- a/include/configs/ls1021atwr.h
> +++ b/include/configs/ls1021atwr.h
> @@ -229,16 +229,22 @@
>  #define CONFIG_CMD_FAT
>  #define CONFIG_DOS_PARTITION
>
> -/* QSPI */
> +/* SPI */
>  #ifdef CONFIG_QSPI_BOOT
> +/* QSPI */
>  #define CONFIG_FSL_QSPI
>  #define QSPI0_AMBA_BASE                        0x40000000
>  #define FSL_QSPI_FLASH_SIZE            (1 << 24)
>  #define FSL_QSPI_FLASH_NUM             2
>
> +#define CONFIG_SPI_FLASH_STMICRO
> +
> +/* DM SPI */
> +#if defined(CONFIG_FSL_DSPI) || defined(CONFIG_FSL_QSPI)
>  #define CONFIG_CMD_SF
> +#define CONFIG_DM_SPI_FLASH
>  #define CONFIG_SPI_FLASH
> -#define CONFIG_SPI_FLASH_STMICRO
> +#endif
>  #endif
>
>  /*
> --

Regards,
Bin
Simon Glass June 17, 2015, 12:30 p.m. UTC | #4
Hi,

On 17 June 2015 at 03:36, Bin Meng <bmeng.cn@gmail.com> wrote:
> Hi Haikun,
>
> On Mon, May 18, 2015 at 9:25 PM, Haikun Wang <haikun.wang@freescale.com> wrote:
>> From: Haikun Wang <Haikun.Wang@freescale.com>
>>
>> Enable Driver Model SPI for ls1021atwr board.
>> DSPI and QSPI only be enabled when boot from QSPI.
>> DSPI and QSPI are compatible under Driver Model SPI.
>>
>> Signed-off-by: Haikun Wang <Haikun.Wang@freescale.com>
>> Change-Id: I6342807da7725ae8b678952117c8758c75a61d3d
>> Reviewed-on: http://git.am.freescale.net:8181/33447
>
> Is this URL Freescale internal? I cannot access it.
>

Looks like it. BTW patman will remove these Gerrit tags automatically.

>> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
>> Reviewed-by: Prabhakar Kushwaha <prabhakar@freescale.com>
>> ---
>> Changes in v3:
>> - IS_ENABLED(CONFIG_XXX) is only work with configure option in Kconfig,
>>   and DM core code use IS_ENABLED(), so configure option in head file
>>   can't work, so remove CONFIG_OF_CONTROL CONFIG_OF_SEPARATE CONFIG_DM CONFIG_DM_SPI
>>
>> Changes in v2:
>> - Move all changes inside of CONFIG_QSPI_BOOT
>>
>> Changes in v1: None
>>  include/configs/ls1021atwr.h | 10 ++++++++--
>>  1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
>> index 729205f..13e3aa4 100644
>> --- a/include/configs/ls1021atwr.h
>> +++ b/include/configs/ls1021atwr.h
>> @@ -229,16 +229,22 @@
>>  #define CONFIG_CMD_FAT
>>  #define CONFIG_DOS_PARTITION
>>
>> -/* QSPI */
>> +/* SPI */
>>  #ifdef CONFIG_QSPI_BOOT
>> +/* QSPI */
>>  #define CONFIG_FSL_QSPI
>>  #define QSPI0_AMBA_BASE                        0x40000000
>>  #define FSL_QSPI_FLASH_SIZE            (1 << 24)
>>  #define FSL_QSPI_FLASH_NUM             2
>>
>> +#define CONFIG_SPI_FLASH_STMICRO
>> +
>> +/* DM SPI */
>> +#if defined(CONFIG_FSL_DSPI) || defined(CONFIG_FSL_QSPI)
>>  #define CONFIG_CMD_SF
>> +#define CONFIG_DM_SPI_FLASH
>>  #define CONFIG_SPI_FLASH
>> -#define CONFIG_SPI_FLASH_STMICRO
>> +#endif
>>  #endif
>>
>>  /*
>> --

Regards,
Simon
Haikun.Wang@freescale.com June 18, 2015, 2:20 a.m. UTC | #5
On 6/17/2015 8:30 PM, Simon Glass wrote:
> Hi,
>
> On 17 June 2015 at 03:36, Bin Meng <bmeng.cn@gmail.com> wrote:
>> Hi Haikun,
>>
>> On Mon, May 18, 2015 at 9:25 PM, Haikun Wang <haikun.wang@freescale.com> wrote:
>>> From: Haikun Wang <Haikun.Wang@freescale.com>
>>>
>>> Enable Driver Model SPI for ls1021atwr board.
>>> DSPI and QSPI only be enabled when boot from QSPI.
>>> DSPI and QSPI are compatible under Driver Model SPI.
>>>
>>> Signed-off-by: Haikun Wang <Haikun.Wang@freescale.com>
>>> Change-Id: I6342807da7725ae8b678952117c8758c75a61d3d
>>> Reviewed-on: http://git.am.freescale.net:8181/33447
>>
>> Is this URL Freescale internal? I cannot access it.
>>
>
> Looks like it. BTW patman will remove these Gerrit tags automatically.
Yes, it is our internal URL.
I forget to remove it.
It couldn't be better if it will be removed automatically.

Best regards,
Wang Haikun
>
>>> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
>>> Reviewed-by: Prabhakar Kushwaha <prabhakar@freescale.com>
>>> ---
>>> Changes in v3:
>>> - IS_ENABLED(CONFIG_XXX) is only work with configure option in Kconfig,
>>>    and DM core code use IS_ENABLED(), so configure option in head file
>>>    can't work, so remove CONFIG_OF_CONTROL CONFIG_OF_SEPARATE CONFIG_DM CONFIG_DM_SPI
>>>
>>> Changes in v2:
>>> - Move all changes inside of CONFIG_QSPI_BOOT
>>>
>>> Changes in v1: None
>>>   include/configs/ls1021atwr.h | 10 ++++++++--
>>>   1 file changed, 8 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
>>> index 729205f..13e3aa4 100644
>>> --- a/include/configs/ls1021atwr.h
>>> +++ b/include/configs/ls1021atwr.h
>>> @@ -229,16 +229,22 @@
>>>   #define CONFIG_CMD_FAT
>>>   #define CONFIG_DOS_PARTITION
>>>
>>> -/* QSPI */
>>> +/* SPI */
>>>   #ifdef CONFIG_QSPI_BOOT
>>> +/* QSPI */
>>>   #define CONFIG_FSL_QSPI
>>>   #define QSPI0_AMBA_BASE                        0x40000000
>>>   #define FSL_QSPI_FLASH_SIZE            (1 << 24)
>>>   #define FSL_QSPI_FLASH_NUM             2
>>>
>>> +#define CONFIG_SPI_FLASH_STMICRO
>>> +
>>> +/* DM SPI */
>>> +#if defined(CONFIG_FSL_DSPI) || defined(CONFIG_FSL_QSPI)
>>>   #define CONFIG_CMD_SF
>>> +#define CONFIG_DM_SPI_FLASH
>>>   #define CONFIG_SPI_FLASH
>>> -#define CONFIG_SPI_FLASH_STMICRO
>>> +#endif
>>>   #endif
>>>
>>>   /*
>>> --
>
> Regards,
> Simon
>
Jagan Teki June 18, 2015, 6:54 a.m. UTC | #6
On 18 June 2015 at 07:50, Wang Haikun <Haikun.Wang@freescale.com> wrote:
> On 6/17/2015 8:30 PM, Simon Glass wrote:
>> Hi,
>>
>> On 17 June 2015 at 03:36, Bin Meng <bmeng.cn@gmail.com> wrote:
>>> Hi Haikun,
>>>
>>> On Mon, May 18, 2015 at 9:25 PM, Haikun Wang <haikun.wang@freescale.com> wrote:
>>>> From: Haikun Wang <Haikun.Wang@freescale.com>
>>>>
>>>> Enable Driver Model SPI for ls1021atwr board.
>>>> DSPI and QSPI only be enabled when boot from QSPI.
>>>> DSPI and QSPI are compatible under Driver Model SPI.
>>>>
>>>> Signed-off-by: Haikun Wang <Haikun.Wang@freescale.com>
>>>> Change-Id: I6342807da7725ae8b678952117c8758c75a61d3d
>>>> Reviewed-on: http://git.am.freescale.net:8181/33447>
> Best regards,
> Wang Haikun
>>
>>>
>>> Is this URL Freescale internal? I cannot access it.
>>>
>>
>> Looks like it. BTW patman will remove these Gerrit tags automatically.
> Yes, it is our internal URL.
> I forget to remove it.
> It couldn't be better if it will be removed automatically.

I will remove if something not remove automatically.

Anyone have any comments on these patch-set, I'm planning to take these.

https://patchwork.ozlabs.org/patch/473391/
https://patchwork.ozlabs.org/patch/473392/
https://patchwork.ozlabs.org/patch/473393/
https://patchwork.ozlabs.org/patch/473394/

>>>> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
>>>> Reviewed-by: Prabhakar Kushwaha <prabhakar@freescale.com>
>>>> ---
>>>> Changes in v3:
>>>> - IS_ENABLED(CONFIG_XXX) is only work with configure option in Kconfig,
>>>>    and DM core code use IS_ENABLED(), so configure option in head file
>>>>    can't work, so remove CONFIG_OF_CONTROL CONFIG_OF_SEPARATE CONFIG_DM CONFIG_DM_SPI
>>>>
>>>> Changes in v2:
>>>> - Move all changes inside of CONFIG_QSPI_BOOT
>>>>
>>>> Changes in v1: None
>>>>   include/configs/ls1021atwr.h | 10 ++++++++--
>>>>   1 file changed, 8 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
>>>> index 729205f..13e3aa4 100644
>>>> --- a/include/configs/ls1021atwr.h
>>>> +++ b/include/configs/ls1021atwr.h
>>>> @@ -229,16 +229,22 @@
>>>>   #define CONFIG_CMD_FAT
>>>>   #define CONFIG_DOS_PARTITION
>>>>
>>>> -/* QSPI */
>>>> +/* SPI */
>>>>   #ifdef CONFIG_QSPI_BOOT
>>>> +/* QSPI */
>>>>   #define CONFIG_FSL_QSPI
>>>>   #define QSPI0_AMBA_BASE                        0x40000000
>>>>   #define FSL_QSPI_FLASH_SIZE            (1 << 24)
>>>>   #define FSL_QSPI_FLASH_NUM             2
>>>>
>>>> +#define CONFIG_SPI_FLASH_STMICRO
>>>> +
>>>> +/* DM SPI */
>>>> +#if defined(CONFIG_FSL_DSPI) || defined(CONFIG_FSL_QSPI)
>>>>   #define CONFIG_CMD_SF
>>>> +#define CONFIG_DM_SPI_FLASH
>>>>   #define CONFIG_SPI_FLASH
>>>> -#define CONFIG_SPI_FLASH_STMICRO
>>>> +#endif
>>>>   #endif
>>>>
>>>>   /*
>>>> --

thanks!
Simon Glass June 18, 2015, 3:18 p.m. UTC | #7
Hi Jagan,

On 18 June 2015 at 00:54, Jagan Teki <jteki@openedev.com> wrote:
> On 18 June 2015 at 07:50, Wang Haikun <Haikun.Wang@freescale.com> wrote:
>> On 6/17/2015 8:30 PM, Simon Glass wrote:
>>> Hi,
>>>
>>> On 17 June 2015 at 03:36, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>> Hi Haikun,
>>>>
>>>> On Mon, May 18, 2015 at 9:25 PM, Haikun Wang <haikun.wang@freescale.com> wrote:
>>>>> From: Haikun Wang <Haikun.Wang@freescale.com>
>>>>>
>>>>> Enable Driver Model SPI for ls1021atwr board.
>>>>> DSPI and QSPI only be enabled when boot from QSPI.
>>>>> DSPI and QSPI are compatible under Driver Model SPI.
>>>>>
>>>>> Signed-off-by: Haikun Wang <Haikun.Wang@freescale.com>
>>>>> Change-Id: I6342807da7725ae8b678952117c8758c75a61d3d
>>>>> Reviewed-on: http://git.am.freescale.net:8181/33447>
>> Best regards,
>> Wang Haikun
>>>
>>>>
>>>> Is this URL Freescale internal? I cannot access it.
>>>>
>>>
>>> Looks like it. BTW patman will remove these Gerrit tags automatically.
>> Yes, it is our internal URL.
>> I forget to remove it.
>> It couldn't be better if it will be removed automatically.
>
> I will remove if something not remove automatically.
>
> Anyone have any comments on these patch-set, I'm planning to take these.
>
> https://patchwork.ozlabs.org/patch/473391/
> https://patchwork.ozlabs.org/patch/473392/
> https://patchwork.ozlabs.org/patch/473393/
> https://patchwork.ozlabs.org/patch/473394/
>

I already reviewed the first two and they seem good to me.

[snip]

Regards,
Simon
Jagan Teki June 19, 2015, 7:34 a.m. UTC | #8
On 18 June 2015 at 12:24, Jagan Teki <jteki@openedev.com> wrote:
> On 18 June 2015 at 07:50, Wang Haikun <Haikun.Wang@freescale.com> wrote:
>> On 6/17/2015 8:30 PM, Simon Glass wrote:
>>> Hi,
>>>
>>> On 17 June 2015 at 03:36, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>> Hi Haikun,
>>>>
>>>> On Mon, May 18, 2015 at 9:25 PM, Haikun Wang <haikun.wang@freescale.com> wrote:
>>>>> From: Haikun Wang <Haikun.Wang@freescale.com>
>>>>>
>>>>> Enable Driver Model SPI for ls1021atwr board.
>>>>> DSPI and QSPI only be enabled when boot from QSPI.
>>>>> DSPI and QSPI are compatible under Driver Model SPI.
>>>>>
>>>>> Signed-off-by: Haikun Wang <Haikun.Wang@freescale.com>
>>>>> Change-Id: I6342807da7725ae8b678952117c8758c75a61d3d

Where is this commit id? I couldn't see it on "git log"

>>>>> Reviewed-on: http://git.am.freescale.net:8181/33447>
>> Best regards,
>> Wang Haikun
>>>
>>>>
>>>> Is this URL Freescale internal? I cannot access it.
>>>>
>>>
>>> Looks like it. BTW patman will remove these Gerrit tags automatically.
>> Yes, it is our internal URL.
>> I forget to remove it.
>> It couldn't be better if it will be removed automatically.
>
> I will remove if something not remove automatically.
>
> Anyone have any comments on these patch-set, I'm planning to take these.
>
> https://patchwork.ozlabs.org/patch/473391/
> https://patchwork.ozlabs.org/patch/473392/
> https://patchwork.ozlabs.org/patch/473393/
> https://patchwork.ozlabs.org/patch/473394/
>
>>>>> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
>>>>> Reviewed-by: Prabhakar Kushwaha <prabhakar@freescale.com>
>>>>> ---
>>>>> Changes in v3:
>>>>> - IS_ENABLED(CONFIG_XXX) is only work with configure option in Kconfig,
>>>>>    and DM core code use IS_ENABLED(), so configure option in head file
>>>>>    can't work, so remove CONFIG_OF_CONTROL CONFIG_OF_SEPARATE CONFIG_DM CONFIG_DM_SPI
>>>>>
>>>>> Changes in v2:
>>>>> - Move all changes inside of CONFIG_QSPI_BOOT
>>>>>
>>>>> Changes in v1: None
>>>>>   include/configs/ls1021atwr.h | 10 ++++++++--
>>>>>   1 file changed, 8 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
>>>>> index 729205f..13e3aa4 100644
>>>>> --- a/include/configs/ls1021atwr.h
>>>>> +++ b/include/configs/ls1021atwr.h
>>>>> @@ -229,16 +229,22 @@
>>>>>   #define CONFIG_CMD_FAT
>>>>>   #define CONFIG_DOS_PARTITION
>>>>>
>>>>> -/* QSPI */
>>>>> +/* SPI */
>>>>>   #ifdef CONFIG_QSPI_BOOT
>>>>> +/* QSPI */
>>>>>   #define CONFIG_FSL_QSPI
>>>>>   #define QSPI0_AMBA_BASE                        0x40000000
>>>>>   #define FSL_QSPI_FLASH_SIZE            (1 << 24)
>>>>>   #define FSL_QSPI_FLASH_NUM             2
>>>>>
>>>>> +#define CONFIG_SPI_FLASH_STMICRO
>>>>> +
>>>>> +/* DM SPI */
>>>>> +#if defined(CONFIG_FSL_DSPI) || defined(CONFIG_FSL_QSPI)
>>>>>   #define CONFIG_CMD_SF
>>>>> +#define CONFIG_DM_SPI_FLASH
>>>>>   #define CONFIG_SPI_FLASH
>>>>> -#define CONFIG_SPI_FLASH_STMICRO
>>>>> +#endif
>>>>>   #endif
>>>>>
>>>>>   /*

thanks!
--
Jagan | openedev.
Haikun.Wang@freescale.com June 19, 2015, 7:50 a.m. UTC | #9
On 6/19/2015 3:34 PM, Jagan Teki wrote:
> On 18 June 2015 at 12:24, Jagan Teki <jteki@openedev.com> wrote:
>> On 18 June 2015 at 07:50, Wang Haikun <Haikun.Wang@freescale.com> wrote:
>>> On 6/17/2015 8:30 PM, Simon Glass wrote:
>>>> Hi,
>>>>
>>>> On 17 June 2015 at 03:36, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>> Hi Haikun,
>>>>>
>>>>> On Mon, May 18, 2015 at 9:25 PM, Haikun Wang <haikun.wang@freescale.com> wrote:
>>>>>> From: Haikun Wang <Haikun.Wang@freescale.com>
>>>>>>
>>>>>> Enable Driver Model SPI for ls1021atwr board.
>>>>>> DSPI and QSPI only be enabled when boot from QSPI.
>>>>>> DSPI and QSPI are compatible under Driver Model SPI.
>>>>>>
>>>>>> Signed-off-by: Haikun Wang <Haikun.Wang@freescale.com>
>>>>>> Change-Id: I6342807da7725ae8b678952117c8758c75a61d3d
>
> Where is this commit id? I couldn't see it on "git log"
Hi Jagan,

It is not a git commit ID, it is a code review task ID of gerrit in fact.
I'm sorry again for forgetting remove it when submit patch.

Best regards,
Wang Haikun
>
>>>>>> Reviewed-on: http://git.am.freescale.net:8181/33447>
>>> Best regards,
>>> Wang Haikun
>>>>
>>>>>
>>>>> Is this URL Freescale internal? I cannot access it.
>>>>>
>>>>
>>>> Looks like it. BTW patman will remove these Gerrit tags automatically.
>>> Yes, it is our internal URL.
>>> I forget to remove it.
>>> It couldn't be better if it will be removed automatically.
>>
>> I will remove if something not remove automatically.
>>
>> Anyone have any comments on these patch-set, I'm planning to take these.
>>
>> https://patchwork.ozlabs.org/patch/473391/
>> https://patchwork.ozlabs.org/patch/473392/
>> https://patchwork.ozlabs.org/patch/473393/
>> https://patchwork.ozlabs.org/patch/473394/
>>
>>>>>> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
>>>>>> Reviewed-by: Prabhakar Kushwaha <prabhakar@freescale.com>
>>>>>> ---
>>>>>> Changes in v3:
>>>>>> - IS_ENABLED(CONFIG_XXX) is only work with configure option in Kconfig,
>>>>>>     and DM core code use IS_ENABLED(), so configure option in head file
>>>>>>     can't work, so remove CONFIG_OF_CONTROL CONFIG_OF_SEPARATE CONFIG_DM CONFIG_DM_SPI
>>>>>>
>>>>>> Changes in v2:
>>>>>> - Move all changes inside of CONFIG_QSPI_BOOT
>>>>>>
>>>>>> Changes in v1: None
>>>>>>    include/configs/ls1021atwr.h | 10 ++++++++--
>>>>>>    1 file changed, 8 insertions(+), 2 deletions(-)
>>>>>>
>>>>>> diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
>>>>>> index 729205f..13e3aa4 100644
>>>>>> --- a/include/configs/ls1021atwr.h
>>>>>> +++ b/include/configs/ls1021atwr.h
>>>>>> @@ -229,16 +229,22 @@
>>>>>>    #define CONFIG_CMD_FAT
>>>>>>    #define CONFIG_DOS_PARTITION
>>>>>>
>>>>>> -/* QSPI */
>>>>>> +/* SPI */
>>>>>>    #ifdef CONFIG_QSPI_BOOT
>>>>>> +/* QSPI */
>>>>>>    #define CONFIG_FSL_QSPI
>>>>>>    #define QSPI0_AMBA_BASE                        0x40000000
>>>>>>    #define FSL_QSPI_FLASH_SIZE            (1 << 24)
>>>>>>    #define FSL_QSPI_FLASH_NUM             2
>>>>>>
>>>>>> +#define CONFIG_SPI_FLASH_STMICRO
>>>>>> +
>>>>>> +/* DM SPI */
>>>>>> +#if defined(CONFIG_FSL_DSPI) || defined(CONFIG_FSL_QSPI)
>>>>>>    #define CONFIG_CMD_SF
>>>>>> +#define CONFIG_DM_SPI_FLASH
>>>>>>    #define CONFIG_SPI_FLASH
>>>>>> -#define CONFIG_SPI_FLASH_STMICRO
>>>>>> +#endif
>>>>>>    #endif
>>>>>>
>>>>>>    /*
>
> thanks!
> --
> Jagan | openedev.
>
Jagan Teki June 19, 2015, 8:14 a.m. UTC | #10
On 19 June 2015 at 13:20, Wang Haikun <Haikun.Wang@freescale.com> wrote:
> On 6/19/2015 3:34 PM, Jagan Teki wrote:
>> On 18 June 2015 at 12:24, Jagan Teki <jteki@openedev.com> wrote:
>>> On 18 June 2015 at 07:50, Wang Haikun <Haikun.Wang@freescale.com> wrote:
>>>> On 6/17/2015 8:30 PM, Simon Glass wrote:
>>>>> Hi,
>>>>>
>>>>> On 17 June 2015 at 03:36, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>> Hi Haikun,
>>>>>>
>>>>>> On Mon, May 18, 2015 at 9:25 PM, Haikun Wang <haikun.wang@freescale.com> wrote:
>>>>>>> From: Haikun Wang <Haikun.Wang@freescale.com>
>>>>>>>
>>>>>>> Enable Driver Model SPI for ls1021atwr board.
>>>>>>> DSPI and QSPI only be enabled when boot from QSPI.
>>>>>>> DSPI and QSPI are compatible under Driver Model SPI.
>>>>>>>
>>>>>>> Signed-off-by: Haikun Wang <Haikun.Wang@freescale.com>
>>>>>>> Change-Id: I6342807da7725ae8b678952117c8758c75a61d3d
>>
>> Where is this commit id? I couldn't see it on "git log"
> Hi Jagan,
>
> It is not a git commit ID, it is a code review task ID of gerrit in fact.
> I'm sorry again for forgetting remove it when submit patch.
>
> Best regards,
> Wang Haikun
>>
>>>>>>> Reviewed-on: http://git.am.freescale.net:8181/33447>
>>>> Best regards,
>>>> Wang Haikun
>>>>>
>>>>>>
>>>>>> Is this URL Freescale internal? I cannot access it.
>>>>>>
>>>>>
>>>>> Looks like it. BTW patman will remove these Gerrit tags automatically.
>>>> Yes, it is our internal URL.
>>>> I forget to remove it.
>>>> It couldn't be better if it will be removed automatically.
>>>
>>> I will remove if something not remove automatically.
>>>
>>> Anyone have any comments on these patch-set, I'm planning to take these.
>>>
>>> https://patchwork.ozlabs.org/patch/473391/
>>> https://patchwork.ozlabs.org/patch/473392/
>>> https://patchwork.ozlabs.org/patch/473393/
>>> https://patchwork.ozlabs.org/patch/473394/

Applied to u-boot-spi/master

thanks!
Jagan Teki June 25, 2015, 1:24 p.m. UTC | #11
On 19 June 2015 at 13:44, Jagan Teki <jteki@openedev.com> wrote:
> On 19 June 2015 at 13:20, Wang Haikun <Haikun.Wang@freescale.com> wrote:
>> On 6/19/2015 3:34 PM, Jagan Teki wrote:
>>> On 18 June 2015 at 12:24, Jagan Teki <jteki@openedev.com> wrote:
>>>> On 18 June 2015 at 07:50, Wang Haikun <Haikun.Wang@freescale.com> wrote:
>>>>> On 6/17/2015 8:30 PM, Simon Glass wrote:
>>>>>> Hi,
>>>>>>
>>>>>> On 17 June 2015 at 03:36, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>>> Hi Haikun,
>>>>>>>
>>>>>>> On Mon, May 18, 2015 at 9:25 PM, Haikun Wang <haikun.wang@freescale.com> wrote:
>>>>>>>> From: Haikun Wang <Haikun.Wang@freescale.com>
>>>>>>>>
>>>>>>>> Enable Driver Model SPI for ls1021atwr board.
>>>>>>>> DSPI and QSPI only be enabled when boot from QSPI.
>>>>>>>> DSPI and QSPI are compatible under Driver Model SPI.
>>>>>>>>
>>>>>>>> Signed-off-by: Haikun Wang <Haikun.Wang@freescale.com>
>>>>>>>> Change-Id: I6342807da7725ae8b678952117c8758c75a61d3d
>>>
>>> Where is this commit id? I couldn't see it on "git log"
>> Hi Jagan,
>>
>> It is not a git commit ID, it is a code review task ID of gerrit in fact.
>> I'm sorry again for forgetting remove it when submit patch.
>>
>> Best regards,
>> Wang Haikun
>>>
>>>>>>>> Reviewed-on: http://git.am.freescale.net:8181/33447>
>>>>> Best regards,
>>>>> Wang Haikun
>>>>>>
>>>>>>>
>>>>>>> Is this URL Freescale internal? I cannot access it.
>>>>>>>
>>>>>>
>>>>>> Looks like it. BTW patman will remove these Gerrit tags automatically.
>>>>> Yes, it is our internal URL.
>>>>> I forget to remove it.
>>>>> It couldn't be better if it will be removed automatically.
>>>>
>>>> I will remove if something not remove automatically.
>>>>
>>>> Anyone have any comments on these patch-set, I'm planning to take these.
>>>>
>>>> https://patchwork.ozlabs.org/patch/473391/
>>>> https://patchwork.ozlabs.org/patch/473392/

>>>> https://patchwork.ozlabs.org/patch/473393/
>>>> https://patchwork.ozlabs.org/patch/473394/
Few CONFIG_DM_* were missing in these two patches, did these patches
have any dependencies with other series, please look at and let me know.

thanks!
Haikun.Wang@freescale.com June 26, 2015, 3:13 a.m. UTC | #12
On 6/25/2015 9:24 PM, Jagan Teki wrote:
> On 19 June 2015 at 13:44, Jagan Teki <jteki@openedev.com> wrote:
>> On 19 June 2015 at 13:20, Wang Haikun <Haikun.Wang@freescale.com> wrote:
>>> On 6/19/2015 3:34 PM, Jagan Teki wrote:
>>>> On 18 June 2015 at 12:24, Jagan Teki <jteki@openedev.com> wrote:
>>>>> On 18 June 2015 at 07:50, Wang Haikun <Haikun.Wang@freescale.com> wrote:
>>>>>> On 6/17/2015 8:30 PM, Simon Glass wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> On 17 June 2015 at 03:36, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>>>> Hi Haikun,
>>>>>>>>
>>>>>>>> On Mon, May 18, 2015 at 9:25 PM, Haikun Wang <haikun.wang@freescale.com> wrote:
>>>>>>>>> From: Haikun Wang <Haikun.Wang@freescale.com>
>>>>>>>>>
>>>>>>>>> Enable Driver Model SPI for ls1021atwr board.
>>>>>>>>> DSPI and QSPI only be enabled when boot from QSPI.
>>>>>>>>> DSPI and QSPI are compatible under Driver Model SPI.
>>>>>>>>>
>>>>>>>>> Signed-off-by: Haikun Wang <Haikun.Wang@freescale.com>
>>>>>>>>> Change-Id: I6342807da7725ae8b678952117c8758c75a61d3d
>>>>
>>>> Where is this commit id? I couldn't see it on "git log"
>>> Hi Jagan,
>>>
>>> It is not a git commit ID, it is a code review task ID of gerrit in fact.
>>> I'm sorry again for forgetting remove it when submit patch.
>>>
>>> Best regards,
>>> Wang Haikun
>>>>
>>>>>>>>> Reviewed-on: http://git.am.freescale.net:8181/33447>
>>>>>> Best regards,
>>>>>> Wang Haikun
>>>>>>>
>>>>>>>>
>>>>>>>> Is this URL Freescale internal? I cannot access it.
>>>>>>>>
>>>>>>>
>>>>>>> Looks like it. BTW patman will remove these Gerrit tags automatically.
>>>>>> Yes, it is our internal URL.
>>>>>> I forget to remove it.
>>>>>> It couldn't be better if it will be removed automatically.
>>>>>
>>>>> I will remove if something not remove automatically.
>>>>>
>>>>> Anyone have any comments on these patch-set, I'm planning to take these.
>>>>>
>>>>> https://patchwork.ozlabs.org/patch/473391/
>>>>> https://patchwork.ozlabs.org/patch/473392/
>
>>>>> https://patchwork.ozlabs.org/patch/473393/
>>>>> https://patchwork.ozlabs.org/patch/473394/
> Few CONFIG_DM_* were missing in these two patches, did these patches
> have any dependencies with other series, please look at and let me know.

I found that macro IS_ENABLED(CONFIG_XXX) is only work with configure 
option in Kconfig, and DM core code use IS_ENABLED(), so configure 
option in head file can't work, so remove CONFIG_OF_CONTROL 
CONFIG_OF_SEPARATE CONFIG_DM CONFIG_DM_SPI in the head file.
>
> thanks!
>
Jagan Teki June 26, 2015, 6:43 a.m. UTC | #13
On 26 June 2015 at 08:43, Wang Haikun <Haikun.Wang@freescale.com> wrote:
> On 6/25/2015 9:24 PM, Jagan Teki wrote:
>> On 19 June 2015 at 13:44, Jagan Teki <jteki@openedev.com> wrote:
>>> On 19 June 2015 at 13:20, Wang Haikun <Haikun.Wang@freescale.com> wrote:
>>>> On 6/19/2015 3:34 PM, Jagan Teki wrote:
>>>>> On 18 June 2015 at 12:24, Jagan Teki <jteki@openedev.com> wrote:
>>>>>> On 18 June 2015 at 07:50, Wang Haikun <Haikun.Wang@freescale.com> wrote:
>>>>>>> On 6/17/2015 8:30 PM, Simon Glass wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> On 17 June 2015 at 03:36, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>>>>> Hi Haikun,
>>>>>>>>>
>>>>>>>>> On Mon, May 18, 2015 at 9:25 PM, Haikun Wang <haikun.wang@freescale.com> wrote:
>>>>>>>>>> From: Haikun Wang <Haikun.Wang@freescale.com>
>>>>>>>>>>
>>>>>>>>>> Enable Driver Model SPI for ls1021atwr board.
>>>>>>>>>> DSPI and QSPI only be enabled when boot from QSPI.
>>>>>>>>>> DSPI and QSPI are compatible under Driver Model SPI.
>>>>>>>>>>
>>>>>>>>>> Signed-off-by: Haikun Wang <Haikun.Wang@freescale.com>
>>>>>>>>>> Change-Id: I6342807da7725ae8b678952117c8758c75a61d3d
>>>>>
>>>>> Where is this commit id? I couldn't see it on "git log"
>>>> Hi Jagan,
>>>>
>>>> It is not a git commit ID, it is a code review task ID of gerrit in fact.
>>>> I'm sorry again for forgetting remove it when submit patch.
>>>>
>>>> Best regards,
>>>> Wang Haikun
>>>>>
>>>>>>>>>> Reviewed-on: http://git.am.freescale.net:8181/33447>
>>>>>>> Best regards,
>>>>>>> Wang Haikun
>>>>>>>>
>>>>>>>>>
>>>>>>>>> Is this URL Freescale internal? I cannot access it.
>>>>>>>>>
>>>>>>>>
>>>>>>>> Looks like it. BTW patman will remove these Gerrit tags automatically.
>>>>>>> Yes, it is our internal URL.
>>>>>>> I forget to remove it.
>>>>>>> It couldn't be better if it will be removed automatically.
>>>>>>
>>>>>> I will remove if something not remove automatically.
>>>>>>
>>>>>> Anyone have any comments on these patch-set, I'm planning to take these.
>>>>>>
>>>>>> https://patchwork.ozlabs.org/patch/473391/
>>>>>> https://patchwork.ozlabs.org/patch/473392/
>>
>>>>>> https://patchwork.ozlabs.org/patch/473393/
>>>>>> https://patchwork.ozlabs.org/patch/473394/
>> Few CONFIG_DM_* were missing in these two patches, did these patches
>> have any dependencies with other series, please look at and let me know.
>
> I found that macro IS_ENABLED(CONFIG_XXX) is only work with configure
> option in Kconfig, and DM core code use IS_ENABLED(), so configure
> option in head file can't work, so remove CONFIG_OF_CONTROL
> CONFIG_OF_SEPARATE CONFIG_DM CONFIG_DM_SPI in the head file.

Please send the patch for this fix, found build errors by picking these patches.

thanks!
Haikun.Wang@freescale.com June 26, 2015, 8:18 a.m. UTC | #14
On 6/26/2015 2:43 PM, Jagan Teki wrote:
> On 26 June 2015 at 08:43, Wang Haikun <Haikun.Wang@freescale.com> wrote:
>> On 6/25/2015 9:24 PM, Jagan Teki wrote:
>>> On 19 June 2015 at 13:44, Jagan Teki <jteki@openedev.com> wrote:
>>>> On 19 June 2015 at 13:20, Wang Haikun <Haikun.Wang@freescale.com> wrote:
>>>>> On 6/19/2015 3:34 PM, Jagan Teki wrote:
>>>>>> On 18 June 2015 at 12:24, Jagan Teki <jteki@openedev.com> wrote:
>>>>>>> On 18 June 2015 at 07:50, Wang Haikun <Haikun.Wang@freescale.com> wrote:
>>>>>>>> On 6/17/2015 8:30 PM, Simon Glass wrote:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> On 17 June 2015 at 03:36, Bin Meng <bmeng.cn@gmail.com> wrote:
>>>>>>>>>> Hi Haikun,
>>>>>>>>>>
>>>>>>>>>> On Mon, May 18, 2015 at 9:25 PM, Haikun Wang <haikun.wang@freescale.com> wrote:
>>>>>>>>>>> From: Haikun Wang <Haikun.Wang@freescale.com>
>>>>>>>>>>>
>>>>>>>>>>> Enable Driver Model SPI for ls1021atwr board.
>>>>>>>>>>> DSPI and QSPI only be enabled when boot from QSPI.
>>>>>>>>>>> DSPI and QSPI are compatible under Driver Model SPI.
>>>>>>>>>>>
>>>>>>>>>>> Signed-off-by: Haikun Wang <Haikun.Wang@freescale.com>
>>>>>>>>>>> Change-Id: I6342807da7725ae8b678952117c8758c75a61d3d
>>>>>>
>>>>>> Where is this commit id? I couldn't see it on "git log"
>>>>> Hi Jagan,
>>>>>
>>>>> It is not a git commit ID, it is a code review task ID of gerrit in fact.
>>>>> I'm sorry again for forgetting remove it when submit patch.
>>>>>
>>>>> Best regards,
>>>>> Wang Haikun
>>>>>>
>>>>>>>>>>> Reviewed-on: http://git.am.freescale.net:8181/33447>
>>>>>>>> Best regards,
>>>>>>>> Wang Haikun
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Is this URL Freescale internal? I cannot access it.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Looks like it. BTW patman will remove these Gerrit tags automatically.
>>>>>>>> Yes, it is our internal URL.
>>>>>>>> I forget to remove it.
>>>>>>>> It couldn't be better if it will be removed automatically.
>>>>>>>
>>>>>>> I will remove if something not remove automatically.
>>>>>>>
>>>>>>> Anyone have any comments on these patch-set, I'm planning to take these.
>>>>>>>
>>>>>>> https://patchwork.ozlabs.org/patch/473391/
>>>>>>> https://patchwork.ozlabs.org/patch/473392/
>>>
>>>>>>> https://patchwork.ozlabs.org/patch/473393/
>>>>>>> https://patchwork.ozlabs.org/patch/473394/
>>> Few CONFIG_DM_* were missing in these two patches, did these patches
>>> have any dependencies with other series, please look at and let me know.
>>
>> I found that macro IS_ENABLED(CONFIG_XXX) is only work with configure
>> option in Kconfig, and DM core code use IS_ENABLED(), so configure
>> option in head file can't work, so remove CONFIG_OF_CONTROL
>> CONFIG_OF_SEPARATE CONFIG_DM CONFIG_DM_SPI in the head file.
>
> Please send the patch for this fix, found build errors by picking these patches.
I plan to add those configure options CONFIG_OF_CONTROL CONFIG_DM 
CONFIG_DM_SPI to board defconfig.
>
> thanks!
>
diff mbox

Patch

diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
index 729205f..13e3aa4 100644
--- a/include/configs/ls1021atwr.h
+++ b/include/configs/ls1021atwr.h
@@ -229,16 +229,22 @@ 
 #define CONFIG_CMD_FAT
 #define CONFIG_DOS_PARTITION
 
-/* QSPI */
+/* SPI */
 #ifdef CONFIG_QSPI_BOOT
+/* QSPI */
 #define CONFIG_FSL_QSPI
 #define QSPI0_AMBA_BASE			0x40000000
 #define FSL_QSPI_FLASH_SIZE		(1 << 24)
 #define FSL_QSPI_FLASH_NUM		2
 
+#define CONFIG_SPI_FLASH_STMICRO
+
+/* DM SPI */
+#if defined(CONFIG_FSL_DSPI) || defined(CONFIG_FSL_QSPI)
 #define CONFIG_CMD_SF
+#define CONFIG_DM_SPI_FLASH
 #define CONFIG_SPI_FLASH
-#define CONFIG_SPI_FLASH_STMICRO
+#endif
 #endif
 
 /*