Re: [U-Boot] [PATCH v5] Add support for Eukrea CPUAT91 SBC
Dear Dirk Behme, In message <4a7f3b9a.2030...@googlemail.com> you wrote: > > > Please do not add such scripting to the top level Makefile. Perform it > > in your board config file instead. > > Not sure if this is 'standard' for at91, but I saw something similar in > > http://git.denx.de/?p=u-boot/u-boot-arm.git;a=blobdiff;f=Makefile;h=c9d315ae98f2272659b88405cd2b94265f3bbfc3;hp=54c0b67499510f83fa642b9684ad95ce832de1b9;hb=f8ea12cf9be98508096dc4102a6ef40cb484fdd3;hpb=c6b5600aee06a13e556837c3065f7f8721d56ec9 Yes, I know. This has been accepted and even pretty usual style for a long time - too long, actually. The Makefile has grown way too long. Sometimes it takes a long time until we learn a lesson. Now I want to get rid of most of such longish scripting in the Makefile, and I started rejecting all patches that add such stuff. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de They're usually so busy thinking about what happens next that the only time they ever find out what is happening now is when they come to look back on it. - Terry Pratchett, _Wyrd Sisters_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5] Add support for Eukrea CPUAT91 SBC
Dear Wolfgang, Wolfgang Denk wrote: > Dear Eric Benard, > > In message <1249816414-18989-1-git-send-email-e...@eukrea.com> you wrote: >> CPUAT91 is built around Atmel's AT91RM9200 and has up to 16MB of NOR >> flash, up to 128MB of SDRAM, and includes a Micrel KS8721 PHY in RMII >> mode. > ... >> meesc \ >> diff --git a/Makefile b/Makefile >> index 54c0b67..2386cdc 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -2674,6 +2674,19 @@ at91rm9200ek_config : unconfig >> cmc_pu2_config : unconfig >> @$(MKCONFIG) $(@:_config=) arm arm920t cmc_pu2 NULL at91rm9200 >> >> +cpuat91_ram_config \ >> +cpuat91_config : unconfig >> +@mkdir -p $(obj)include >> +@if [ "$(findstring _ram_,$@)" ] ; then \ >> +echo "#define CONFIG_SKIP_LOWLEVEL_INIT" >> >> $(obj)include/config.h; \ >> +echo "#define CONFIG_SKIP_RELOCATE_UBOOT" >> >> $(obj)include/config.h; \ >> +$(XECHO) "... CPUAT91 configured for RAM" ; \ >> +else \ >> +echo "#define CONFIG_BOOTDELAY 1" >>$(obj)include/config.h ; \ >> +$(XECHO) "... CPUAT91 configured for Flash" ;\ >> +fi; >> +@$(MKCONFIG) -a cpuat91 arm arm920t cpuat91 eukrea at91rm9200 >> + >> csb637_config : unconfig >> @$(MKCONFIG) $(@:_config=) arm arm920t csb637 NULL at91rm9200 > > Please do not add such scripting to the top level Makefile. Perform it > in your board config file instead. Not sure if this is 'standard' for at91, but I saw something similar in http://git.denx.de/?p=u-boot/u-boot-arm.git;a=blobdiff;f=Makefile;h=c9d315ae98f2272659b88405cd2b94265f3bbfc3;hp=54c0b67499510f83fa642b9684ad95ce832de1b9;hb=f8ea12cf9be98508096dc4102a6ef40cb484fdd3;hpb=c6b5600aee06a13e556837c3065f7f8721d56ec9 Best regards Dirk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5] Add support for Eukrea CPUAT91 SBC
Dear Eric Benard, In message <1249816414-18989-1-git-send-email-e...@eukrea.com> you wrote: > CPUAT91 is built around Atmel's AT91RM9200 and has up to 16MB of NOR > flash, up to 128MB of SDRAM, and includes a Micrel KS8721 PHY in RMII > mode. ... > meesc \ > diff --git a/Makefile b/Makefile > index 54c0b67..2386cdc 100644 > --- a/Makefile > +++ b/Makefile > @@ -2674,6 +2674,19 @@ at91rm9200ek_config: unconfig > cmc_pu2_config : unconfig > @$(MKCONFIG) $(@:_config=) arm arm920t cmc_pu2 NULL at91rm9200 > > +cpuat91_ram_config \ > +cpuat91_config : unconfig > + @mkdir -p $(obj)include > + @if [ "$(findstring _ram_,$@)" ] ; then \ > + echo "#define CONFIG_SKIP_LOWLEVEL_INIT" >> > $(obj)include/config.h; \ > + echo "#define CONFIG_SKIP_RELOCATE_UBOOT" >> > $(obj)include/config.h; \ > + $(XECHO) "... CPUAT91 configured for RAM" ; \ > + else \ > + echo "#define CONFIG_BOOTDELAY 1" >>$(obj)include/config.h ; \ > + $(XECHO) "... CPUAT91 configured for Flash" ;\ > + fi; > + @$(MKCONFIG) -a cpuat91 arm arm920t cpuat91 eukrea at91rm9200 > + > csb637_config: unconfig > @$(MKCONFIG) $(@:_config=) arm arm920t csb637 NULL at91rm9200 Please do not add such scripting to the top level Makefile. Perform it in your board config file instead. For an example, please see http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/65499 ... > +int board_init(void) > +{ > + /* Enable Ctrlc */ > + console_init_f(); > + > + /* memory and cpu-speed are setup before relocation > + * so we do _nothing_ here > + */ Incorrect multicomment style. > +unsigned char ks8721_initphy(AT91PS_EMAC p_mac) > +{ > + unsigned char ret = 1; > + unsigned short intvalue; > + > + at91rm9200_EmacEnableMDIO(p_mac); > + > + if (!ks8721_getlinkspeed(p_mac)) { > + /* Try another time */ > + ret = ks8721_getlinkspeed(p_mac); > + } Move comment up into the "if" line, and remove the braces for a single-line statement. ... > +unsigned char ks8721_autonegotiate(AT91PS_EMAC p_mac, int *status) > +{ > + unsigned short value; > + unsigned short phyanar; > + unsigned short phyanalpar; > + > + /* Set ks8721 control register */ > + if (!at91rm9200_EmacReadPhy(p_mac, > + CONFIG_PHY_ADDRESS | KS8721_BMCR, &value)) > + return 0; Here and everywhere else: please add braces around multiline statements. > + value &= ~KS8721_AUTONEG; /* remove autonegotiation enable */ > + value |= KS8721_ISOLATE;/* Electrically isolate PHY */ > + if (!at91rm9200_EmacWritePhy(p_mac, > + CONFIG_PHY_ADDRESS | KS8721_BMCR, &value)) > + return 0; > + > + /* Set the Auto_negotiation Advertisement Register */ > + /* MII advertising for Next page, 100BaseTxFD and HD, */ > + /* 10BaseTFD and HD, IEEE 802.3 */ Incorrect multiline comment style. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de "Do we define evil as the absence of goodness? It seems only logical that shit happens--we discover this by the process of elimination." -- Larry Wall ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5] Add support for Eukrea CPUAT91 SBC
Dear Eric Benard, In message <1249816414-18989-1-git-send-email-e...@eukrea.com> you wrote: > CPUAT91 is built around Atmel's AT91RM9200 and has up to 16MB of NOR > flash, up to 128MB of SDRAM, and includes a Micrel KS8721 PHY in RMII > mode. ... > +cpuat91_ram_config \ > +cpuat91_config : unconfig > + @mkdir -p $(obj)include > + @if [ "$(findstring _ram_,$@)" ] ; then \ > + echo "#define CONFIG_SKIP_LOWLEVEL_INIT" >> > $(obj)include/config.h; \ > + echo "#define CONFIG_SKIP_RELOCATE_UBOOT" >> > $(obj)include/config.h; \ > + $(XECHO) "... CPUAT91 configured for RAM" ; \ > + else \ > + echo "#define CONFIG_BOOTDELAY 1" >>$(obj)include/config.h ; \ > + $(XECHO) "... CPUAT91 configured for Flash" ;\ > + fi; > + @$(MKCONFIG) -a cpuat91 arm arm920t cpuat91 eukrea at91rm9200 > + > csb637_config: unconfig > @$(MKCONFIG) $(@:_config=) arm arm920t csb637 NULL at91rm9200 Please do not add such scripting to the top level Makefile. Perform it in your board config file instead. For an example, please see http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/65499 > +unsigned char ks8721_autonegotiate(AT91PS_EMAC p_mac, int *status) > +{ ... > + /* Set the Auto_negotiation Advertisement Register */ > + /* MII advertising for Next page, 100BaseTxFD and HD, */ > + /* 10BaseTFD and HD, IEEE 802.3 */ Incorrect multiline comment style. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Madness has no purpose. Or reason. But it may have a goal. -- Spock, "The Alternative Factor", stardate 3088.7 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5] Add support for Eukrea CPUAT91 SBC
On 13:13 Sun 09 Aug , Eric Benard wrote: > CPUAT91 is built around Atmel's AT91RM9200 and has up to 16MB of NOR > flash, up to 128MB of SDRAM, and includes a Micrel KS8721 PHY in RMII > mode. > > v3 : fix coding style issues > v4 : fix coding style in ks8721 > v5 : fix following Jean Christophe's review please this here version information > > Signed-off-by: Eric Benard > --- here next time > MAINTAINERS |4 + > MAKEALL |1 + > Makefile| 13 ++ > board/eukrea/cpuat91/Makefile | 50 > board/eukrea/cpuat91/config.mk |1 + > board/eukrea/cpuat91/cpuat91.c | 86 ++ > cpu/arm920t/at91rm9200/Makefile |5 +- > cpu/arm920t/at91rm9200/ks8721.c | 242 > +++ > include/configs/cpuat91.h | 226 > include/ks8721.h| 78 + > 10 files changed, 704 insertions(+), 2 deletions(-) > create mode 100644 board/eukrea/cpuat91/Makefile > create mode 100644 board/eukrea/cpuat91/config.mk > create mode 100644 board/eukrea/cpuat91/cpuat91.c > create mode 100644 cpu/arm920t/at91rm9200/ks8721.c > create mode 100644 include/configs/cpuat91.h > create mode 100644 include/ks8721.h > Ben is also it ok for you this patch? Best Regards, J. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5] Add support for Eukrea CPUAT91 SBC
CPUAT91 is built around Atmel's AT91RM9200 and has up to 16MB of NOR flash, up to 128MB of SDRAM, and includes a Micrel KS8721 PHY in RMII mode. v3 : fix coding style issues v4 : fix coding style in ks8721 v5 : fix following Jean Christophe's review Signed-off-by: Eric Benard --- MAINTAINERS |4 + MAKEALL |1 + Makefile| 13 ++ board/eukrea/cpuat91/Makefile | 50 board/eukrea/cpuat91/config.mk |1 + board/eukrea/cpuat91/cpuat91.c | 86 ++ cpu/arm920t/at91rm9200/Makefile |5 +- cpu/arm920t/at91rm9200/ks8721.c | 242 +++ include/configs/cpuat91.h | 226 include/ks8721.h| 78 + 10 files changed, 704 insertions(+), 2 deletions(-) create mode 100644 board/eukrea/cpuat91/Makefile create mode 100644 board/eukrea/cpuat91/config.mk create mode 100644 board/eukrea/cpuat91/cpuat91.c create mode 100644 cpu/arm920t/at91rm9200/ks8721.c create mode 100644 include/configs/cpuat91.h create mode 100644 include/ks8721.h diff --git a/MAINTAINERS b/MAINTAINERS index 620604c..e45a5ef 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -521,6 +521,10 @@ Dirk Behme omap3_beagleARM CORTEX-A8 (OMAP3530 SoC) +Eric Benard + + cpuat91 ARM920T + Rishi Bhattacharya omap5912osk ARM926EJS diff --git a/MAKEALL b/MAKEALL index edebaea..97a29f2 100755 --- a/MAKEALL +++ b/MAKEALL @@ -600,6 +600,7 @@ LIST_at91=" \ at91sam9m10g45ek\ at91sam9rlek\ cmc_pu2 \ + cpuat91 \ csb637 \ kb9202 \ meesc \ diff --git a/Makefile b/Makefile index 54c0b67..2386cdc 100644 --- a/Makefile +++ b/Makefile @@ -2674,6 +2674,19 @@ at91rm9200ek_config : unconfig cmc_pu2_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm920t cmc_pu2 NULL at91rm9200 +cpuat91_ram_config \ +cpuat91_config : unconfig + @mkdir -p $(obj)include + @if [ "$(findstring _ram_,$@)" ] ; then \ + echo "#define CONFIG_SKIP_LOWLEVEL_INIT" >> $(obj)include/config.h; \ + echo "#define CONFIG_SKIP_RELOCATE_UBOOT" >> $(obj)include/config.h; \ + $(XECHO) "... CPUAT91 configured for RAM" ; \ + else \ + echo "#define CONFIG_BOOTDELAY 1" >>$(obj)include/config.h ; \ + $(XECHO) "... CPUAT91 configured for Flash" ;\ + fi; + @$(MKCONFIG) -a cpuat91 arm arm920t cpuat91 eukrea at91rm9200 + csb637_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm920t csb637 NULL at91rm9200 diff --git a/board/eukrea/cpuat91/Makefile b/board/eukrea/cpuat91/Makefile new file mode 100644 index 000..08a90dc --- /dev/null +++ b/board/eukrea/cpuat91/Makefile @@ -0,0 +1,50 @@ +# +# (C) Copyright 2003-2006 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).a + +COBJS := cpuat91.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak .depend + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/eukrea/cpuat91/config.mk b/board/eukrea/cpuat91/config.mk new file mode 100644 index 000..ef8dda0 --- /dev/null +++ b/board/eukrea/cpuat91/config.mk @@ -0,0 +1 @@ +TEXT_BASE = 0x21F0 diff --git a/board/eukrea/cpuat91/cpuat91.c b/board/eukrea/cpuat91/cpuat91.c new file mode 100644 index 000..ae8eb76 --- /dev/null +++ b/board/eukrea/cpuat91/cpuat91.c @@ -0,0 +1,86 @@ +/* + * (C) Copyright 2006 Eukrea Electromatique + * Eric Be