Re: [U-Boot] [PATCH] add support for EMK TOP7000 CPU module (new files)
Dear Reinhard Meyer, In message <4c091f79.5040...@emk-elektronik.de> you wrote: > > >> +static const struct sdram_config sdram_config = { > >> +.data_bits= SDRAM_DATA_16BIT, > >> +.row_bits= 13, > >> +.col_bits= 9, > >> +.bank_bits= 2, > >> +.cas= 3, > >> > > > > Indentation by TAB only - please fix globally. > > > That are verbatim copies from atngw100... Shall I fix there as well ? Yes, pelas e- a sa separate patch. > --030408090100080902020605 > Content-Type: text/x-vcard; charset=utf-8; > name="reinhard_meyer.vcf" > Content-Transfer-Encoding: 7bit > Content-Disposition: attachment; Can you please drop this when posting to mailing lists? Thanks. 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 "Text processing has made it possible to right-justify any idea, even one which cannot be justified on any other grounds." -- J. Finnegan, USC. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] add support for EMK TOP7000 CPU module (new files)
Wolfgang Denk schrieb: Dear "Reinhard Meyer (-VC)", In message <4c08ec47.5070...@emk-elektronik.de> you wrote: ... +static const struct sdram_config sdram_config = { +.data_bits= SDRAM_DATA_16BIT, +.row_bits= 13, +.col_bits= 9, +.bank_bits= 2, +.cas= 3, Indentation by TAB only - please fix globally. That are verbatim copies from atngw100... Shall I fix there as well ? <>___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] add support for EMK TOP7000 CPU module (new files)
Dear "Reinhard Meyer (-VC)", In message <4c08ec47.5070...@emk-elektronik.de> you wrote: > This Patch adds support for the EMK TOP7000 CPU Module > Part 1: new files > > Signed-off-by: Reinhard Meyer reinhard.me...@emk-elektronik.de But please clean up the code berfore resubmitting... > --- /dev/null > +++ b/board/emk/top7000/top7000.c ... > +static const struct sdram_config sdram_config = { > +.data_bits= SDRAM_DATA_16BIT, > +.row_bits= 13, > +.col_bits= 9, > +.bank_bits= 2, > +.cas= 3, Indentation by TAB only - please fix globally. > +#ifdef CONFIG_CMD_I2C > +// first select SCL and SDA gpio No C++ comments - please fix globally. > +portmux_select_gpio(PORTMUX_PORT_A,(1< +portmux_select_gpio(PORTMUX_PORT_A,(1< PORTMUX_DIR_OUTPUT|PORTMUX_INIT_LOW|PORTMUX_OPEN_DRAIN); Long lines wrapped by mailer. Please fix your mailer setup (or rather use "git send-email" for sending patches. Note: line too long - please fix globally. > +if (expected_size != actual_size) > +printf("Warning: Only %lu of %lu MiB SDRAM is working\n", > +actual_size >> 20, expected_size >> 20); Curly braces needed for multiline statements - please fix globally. > +int misc_init_r (void) --^ > +{ > +/* read 'factory' part of EEPROM */ > +extern void read_factory_r (void); > +read_factory_r (); -^ No spaces after function names - please fix globally. ... > --- /dev/null > +++ b/board/emk/top7000/u-boot.lds > @@ -0,0 +1,72 @@ > +/* -*- Fundamental -*- Incorrect multiline comment style - please fix globally. 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 PoB = "Prisoner of Bill" -- those held captive, unwillingly or other- wise, by the contemptible Microsoft monopoly. -- Tom Christiansen in <6abo45$3l...@csnews.cs.colorado.edu> ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] add support for EMK TOP7000 CPU module (new files)
Dear "Reinhard Meyer (-VC)", In message <4c08ec47.5070...@emk-elektronik.de> you wrote: > This Patch adds support for the EMK TOP7000 CPU Module > Part 1: new files > > Signed-off-by: Reinhard Meyer reinhard.me...@emk-elektronik.de NAK. Please submit as one patch so we have an atomic, bisectable commit. Thanks. 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 If A equals success, then the formula is A = X + Y + Z. X is work. Y is play. Z is keep your mouth shut. - Albert Einstein ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] add support for EMK TOP7000 CPU module (new files)
This Patch adds support for the EMK TOP7000 CPU Module Part 1: new files Signed-off-by: Reinhard Meyer reinhard.me...@emk-elektronik.de --- board/emk/top7000/Makefile | 41 board/emk/top7000/config.mk |3 + board/emk/top7000/top7000.c | 165 board/emk/top7000/u-boot.lds | 72 ++ include/configs/top7000.h| 214 ++ 5 files changed, 495 insertions(+), 0 deletions(-) create mode 100644 board/emk/top7000/Makefile create mode 100644 board/emk/top7000/config.mk create mode 100644 board/emk/top7000/top7000.c create mode 100644 board/emk/top7000/u-boot.lds create mode 100644 include/configs/top7000.h diff --git a/board/emk/top7000/Makefile b/board/emk/top7000/Makefile new file mode 100644 index 000..a36cc86 --- /dev/null +++ b/board/emk/top7000/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2005-2006 Atmel Corporation +# Copyright (C) 2010 EMK Elektronik +# +# 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:= $(BOARD).o ../common/vpd.o + +SRCS:= $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS:= $(addprefix $(obj),$(SOBJS) $(COBJS)) + +$(LIB): $(obj).depend $(OBJS) +$(AR) $(ARFLAGS) $@ $(OBJS) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/emk/top7000/config.mk b/board/emk/top7000/config.mk new file mode 100644 index 000..9a794e5 --- /dev/null +++ b/board/emk/top7000/config.mk @@ -0,0 +1,3 @@ +TEXT_BASE= 0x +PLATFORM_RELFLAGS+= -ffunction-sections -fdata-sections +PLATFORM_LDFLAGS+= --gc-sections diff --git a/board/emk/top7000/top7000.c b/board/emk/top7000/top7000.c new file mode 100644 index 000..a8edb91 --- /dev/null +++ b/board/emk/top7000/top7000.c @@ -0,0 +1,165 @@ +/* + * Copyright (C) 2006 Atmel Corporation + * COpyright (C) 2010 EMK Elektronik + * + * 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 + +#include +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +static const struct sdram_config sdram_config = { +.data_bits= SDRAM_DATA_16BIT, +.row_bits= 13, +.col_bits= 9, +.bank_bits= 2, +.cas= 3, +.twr= 2, +.trc= 7, +.trp= 2, +.trcd= 2, +.tras= 5, +.txsr= 5, +/* 7.81 us */ +.refresh_period= (781 * (SDRAMC_BUS_HZ / 1000)) / 10, +}; + +int board_early_init_f(void) +{ +/* Enable SDRAM in the EBI mux */ +hmatrix_slave_write(EBI, SFR, HMATRIX_BIT(EBI_SDRAM_ENABLE)); + +/* 16 data, 26 address lines */ +portmux_enable_ebi(16, 26, 0, PORTMUX_DRIVE_HIGH); +portmux_enable_usart1(PORTMUX_DRIVE_MIN); + +#if defined(CONFIG_MACB) +portmux_enable_macb0(PORTMUX_MACB_MII, PORTMUX_DRIVE_HIGH); +portmux_enable_macb1(PORTMUX_MACB_MII, PORTMUX_DRIVE_HIGH); +#endif +#if defined(CONFIG_MMC) +portmux_enable_mmci(0, PORTMUX_MMCI_4BIT, PORTMUX_DRIVE_LOW); +#endif +#if defined(CONFIG_ATMEL_SPI) +portmux_enable_spi0(1 << 0, PORTMUX_DRIVE_LOW); +#endif +#ifdef CONFIG_CMD_I2C +// first select SCL and SDA gpio +portmux_select_gpio(PORTMUX_PORT_A,(1<> 20, expected_size >> 20); + +retu