[U-Boot] [RFC] arm926ejs, at91: add common phy_reset function

Heiko Schocher
2013-11-13T05:04:51Z

Hello Bo,

Am 13.11.2013 02:35, schrieb Bo Shen:
> Hi Heiko,
>
> On 11/12/2013 09:50 PM, Heiko Schocher wrote:
>> Hello Andreas,
>>
>> Am 12.11.2013 13:56, schrieb Andreas Bie?mann:
>>> Hello Heiko,
>>>
>>> On 11/12/2013 11:21 AM, Heiko Schocher wrote:
>>>> add common phy reset code into a common function.
>>>>
>>>> Signed-off-by: Heiko Schocher<hs@denx.de>
>>>> Cc: Andreas Bie?mann<andreas.devel@googlemail.com>
>>>> Cc: Bo Shen<voice.shen@atmel.com>
>>>> Cc: Jens Scharsig<esw@bus-elektronik.de>
>>>> Cc: Sergey Lapin<slapin@ossfans.org>
>>>> Cc: Stelian Pop<stelian@popies.net>
>>>> Cc: Albin Tonnerre<albin.tonnerre@free-electrons.com>
>>>> Cc: Eric Benard<eric@eukrea.com>
>>>> Cc: Markus Hubig<mhubig@imko.de>
>>>>
>>>> ---
>>>> Patch based on the spl patchset from Bo Shen (as I want to
>>>> collect this function in at91-common directory), see:
>>>> http://lists.denx.de/pipermail/u-boot/2013-November/166272.html
>>>> (reworked this against newest Kconfig Makefile changes ...
>>>> @Bo: Do you plan an update for this patchset for the Kconfig changes?
>>>
>>> @Bo: I'll review the patches also these days.
>
> After Andreas finish reviewing the code, I will update this patchset for the Kconfig changes if needed.

Great, so I wait for your update, before I sent my updated
patch, thanks!

>> Perfect!
>>
>>>> Maybe my change in arch/arm/cpu/at91-common/Makefile
>>>> could be done better... Do we have a common define for
>>>> all this variants?
>>>
>>> I think not, but how about defining a new one?
>>
>> I am fine with this too...
>>
>>>> ---
>>>> arch/arm/cpu/Makefile | 1 +
>>>> arch/arm/cpu/at91-common/Makefile | 5 +++
>>>> arch/arm/cpu/at91-common/phy.c | 48
>>>> +++++++++++++++++++++++++
>>>> arch/arm/include/asm/arch-at91/at91_common.h | 1 +
>>>> board/BuS/vl_ma2sc/vl_ma2sc.c | 18 ++--------
>>>> board/afeb9260/afeb9260.c | 18 +---------
>>>> board/atmel/at91sam9260ek/at91sam9260ek.c | 19 +---------
>>>> board/atmel/at91sam9263ek/at91sam9263ek.c | 19 ++--------
>>>> board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c | 19 +---------
>>>> board/bluewater/snapper9260/snapper9260.c | 16 +--------
>>>> board/calao/sbc35_a9g20/sbc35_a9g20.c | 19 +---------
>>>> board/eukrea/cpu9260/cpu9260.c | 18 +---------
>>>> board/taskit/stamp9g20/stamp9g20.c | 31 +---------------
>>>> spl/Makefile | 4 ---
>>>> 14 files changed, 66 insertions(+), 170 deletions(-)
>>>> create mode 100644 arch/arm/cpu/at91-common/phy.c
>>>>
>>>> diff --git a/arch/arm/cpu/Makefile b/arch/arm/cpu/Makefile
>>>> index fd0da53..886347d 100644
>>>> --- a/arch/arm/cpu/Makefile
>>>> +++ b/arch/arm/cpu/Makefile
>>>> @@ -1,2 +1,3 @@
>>>> obj-$(CONFIG_TEGRA) += $(SOC)-common/
>>>> obj-$(CONFIG_TEGRA) += tegra-common/
>>>> +obj-$(CONFIG_AT91FAMILY) += at91-common/
>
> <snip>
>
>>>> diff --git a/spl/Makefile b/spl/Makefile
>>>> index 736c6ca..cbd3d27 100644
>>>> --- a/spl/Makefile
>>>> +++ b/spl/Makefile
>>>> @@ -111,10 +111,6 @@ ifneq ($(CONFIG_MX23)$(CONFIG_MX35),)
>>>> LIBS-y += arch/$(ARCH)/imx-common/libimx-common.o
>>>> endif
>>>>
>>>> -ifeq ($(SOC),at91)
>>>> -LIBS-y += arch/$(ARCH)/cpu/at91-common/libat91-common.o
>>>> -endif
>>>> -
>>>
>>> That should not be removed here.
>>
>> See my change in arch/arm/cpu/Makefile
>>
>> With this change, this in the spl/Makefile is not needed ...
>> I did this, because arch/arm/cpu/at91-common/ contains not only
>> spl code. But maybe this should be changed in the spl patchset
>> from bo?
>
> I am not fully got your means. what should I change?

Could you add to your patchset the following change?

>>>> diff --git a/arch/arm/cpu/Makefile b/arch/arm/cpu/Makefile
>>>> index fd0da53..886347d 100644
>>>> --- a/arch/arm/cpu/Makefile
>>>> +++ b/arch/arm/cpu/Makefile
>>>> @@ -1,2 +1,3 @@
>>>> obj-$(CONFIG_TEGRA) += $(SOC)-common/
>>>> obj-$(CONFIG_TEGRA) += tegra-common/
>>>> +obj-$(CONFIG_AT91FAMILY) += at91-common/
>>>> diff --git a/spl/Makefile b/spl/Makefile
>>>> index 736c6ca..cbd3d27 100644
>>>> --- a/spl/Makefile
>>>> +++ b/spl/Makefile
>>>> @@ -111,10 +111,6 @@ ifneq ($(CONFIG_MX23)$(CONFIG_MX35),)
>>>> LIBS-y += arch/$(ARCH)/imx-common/libimx-common.o
>>>> endif
>>>>
>>>> -ifeq ($(SOC),at91)
>>>> -LIBS-y += arch/$(ARCH)/cpu/at91-common/libat91-common.o
>>>> -endif
>>>> -

bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany